agentleFS
maxi3777maxi3777/claritykit/skills/clarify-ui/SKILL.md

clarify-ui

Skill0 starsChanged 3 months agoMITView on GitHub

Build an interactive HTML prototype — a functional shell with real interaction logic, no backend, no visual design — so the user can feel the UX before implementation, and iterate until approved. Invoke ONLY when the user names clarify-ui or clarity-flow enters the ui step; never self-activate from a passing mockup request.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Publish: Run clarity publish — the prototype appears in the site index alongside the diagrams.

    line 30
  2. Very specific:

    All artifacts live in the staging dir <projectRoot>/docs/clarity/ — for this capability, docs/clarity/prototypes/<name>/ (clarity root …

    line 46
  3. Very specific:

    All tools via the clarity CLI (never relative tool paths).

    line 49
  4. Distinctive:

    Never let prototype and behavior spec disagree.

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

clarify-ui — feel the app before building it

Called when a UI's experience must be judged by using it, not by reading about it. Produces docs/clarity/prototypes/<name>/index.html + ui-notes.md in the staging dir (see Paths), and registers the prototype in the preview site.

What the prototype is

  • A single self-contained HTML file (inline CSS/JS, placeholder data, no build step, no network calls) that opens straight in a browser — or via the preview server.
  • Behaviorally faithful to the approved behavior spec: if a behavior.yaml exists, every state, event, guard-outcome and transition is observable, and the embedded state machine mirrors the YAML 1:1 (state names identical). Actors are simulated with timers/promises; failures and cancellations must be triggerable (small dev panel: "simulate failure", "simulate slow network").
  • Visually neutral: grayscale, system fonts, boxes and labels. Layout, hierarchy, copy and interaction — real. Colors, icons, animation, branding — absent.

Method

  1. UI interview (batch the questions). Layout preferences? Navigation pattern? Reference apps the user likes? Density? Pet peeves? Record answers in ui-notes.md.
  2. Implement the prototype. One HTML file; states rendered as the UI the user sees in that state; controls wired to events; dev panel for actor outcomes.
  3. Publish. Run clarity publish — the prototype appears in the site index alongside the diagrams. Works with zero diagrams in the staging dir too (check is vacuously green; the site still builds). Never start the server yourself — that's the user-invoked clarity-preview skill. In conversation, walk the user through which flows to try, especially failure, retry and cancel paths — the conversation is the guide, the browser is the experience; don't point at files for explanation.
  4. Iterate until the user explicitly approves. Two kinds of feedback:
    • Behavioral ("cancel should keep the file selected") → if a behavior.yaml exists, change it FIRST, re-validate, redraw affected views, then update the prototype. The model stays the source of truth.
    • Presentational ("search should be at the top") → change the prototype + ui-notes.md.
  5. On approval: record it in ui-notes.md. What happens next (implementation, and how the prototype informs it) is the governing workflow's call.

Paths (derived, never chosen)

  • All artifacts live in the staging dir <projectRoot>/docs/clarity/ — for this capability, docs/clarity/prototypes/<name>/ (clarity root shows the derived root). Never invent or negotiate other locations.
  • All tools via the clarity CLI (never relative tool paths). If missing: export PATH="$HOME/.local/bin:$PATH", retry once, then STOP and report — never improvise.

Modifying existing artifacts

The prototype and ui-notes.md record presentation decisions; behavioral feedback goes through behavior.yaml first (the model is the source of truth), then the prototype is updated to match.

Fidelity checklist (verify before presenting)

  • Every specified state has a distinct, labeled UI representation
  • Every user-sourced event has a working control
  • Every actor outcome (done/error) can be simulated from the dev panel
  • Guard outcomes are demonstrable (e.g. retry limit reached → retry disabled)
  • No real backend calls, no external assets, opens offline
  • Grayscale only

Optional diagram

A journey (cross-module UX review: stages, actions, satisfaction scores — scores force honest UX thinking) is optional when the user wants to judge the experience across modules/stages, not just within this prototype. It must force a UX decision; otherwise skip it.

Rules

  • The prototype is throwaway: production code does not reuse it; it is the layout/interaction reference.
  • Never let prototype and behavior spec disagree. The spec wins — unless the user decides the behavior itself changes (then the spec changes first).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.