@gunkin/uiify 0.0.16-alpha → 0.0.19-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +34 -9
  2. package/package.json +1 -1
  3. package/skills/uiify/SKILL.md +125 -125
  4. package/skills/uiify/references/compositions/card-rhythm.md +14 -0
  5. package/skills/uiify/references/compositions/destructive-confirmation.md +15 -0
  6. package/skills/uiify/references/compositions/form-grouping.md +14 -0
  7. package/skills/uiify/references/compositions/hero-actions.md +14 -0
  8. package/skills/uiify/references/compositions/page-frame.md +14 -0
  9. package/skills/uiify/references/compositions/pricing-actions.md +13 -0
  10. package/skills/uiify/references/compositions/save-feedback.md +13 -0
  11. package/skills/uiify/references/compositions/table-controls.md +14 -0
  12. package/skills/uiify/references/elements/accordion.md +38 -0
  13. package/skills/uiify/references/elements/alert-modal.md +42 -0
  14. package/skills/uiify/references/elements/avatar.md +47 -0
  15. package/skills/uiify/references/elements/badge.md +47 -0
  16. package/skills/uiify/references/elements/bar-chart.md +61 -0
  17. package/skills/uiify/references/elements/breadcrumb.md +38 -0
  18. package/skills/uiify/references/elements/button.md +49 -0
  19. package/skills/uiify/references/elements/candle-chart.md +38 -0
  20. package/skills/uiify/references/elements/card.md +51 -0
  21. package/skills/uiify/references/elements/carousel.md +38 -0
  22. package/skills/uiify/references/elements/checkbox.md +39 -0
  23. package/skills/uiify/references/elements/code-block.md +50 -0
  24. package/skills/uiify/references/elements/collapsible.md +38 -0
  25. package/skills/uiify/references/elements/color-picker.md +39 -0
  26. package/skills/uiify/references/elements/combobox.md +37 -0
  27. package/skills/uiify/references/elements/command-palette.md +43 -0
  28. package/skills/uiify/references/elements/context-menu.md +38 -0
  29. package/skills/uiify/references/elements/cookie-banner.md +51 -0
  30. package/skills/uiify/references/elements/date-picker.md +43 -0
  31. package/skills/uiify/references/elements/divider.md +46 -0
  32. package/skills/uiify/references/elements/drawer.md +38 -0
  33. package/skills/uiify/references/elements/dropdown-menu.md +38 -0
  34. package/skills/uiify/references/elements/empty-state.md +50 -0
  35. package/skills/uiify/references/elements/feature-grid.md +54 -0
  36. package/skills/uiify/references/elements/field.md +44 -0
  37. package/skills/uiify/references/elements/file-upload.md +40 -0
  38. package/skills/uiify/references/elements/footer.md +45 -0
  39. package/skills/uiify/references/elements/form.md +41 -0
  40. package/skills/uiify/references/elements/header.md +42 -0
  41. package/skills/uiify/references/elements/hero.md +54 -0
  42. package/skills/uiify/references/elements/hover-card.md +38 -0
  43. package/skills/uiify/references/elements/image-gallery.md +52 -0
  44. package/skills/uiify/references/elements/inline-alert.md +46 -0
  45. package/skills/uiify/references/elements/input.md +41 -0
  46. package/skills/uiify/references/elements/line-chart.md +38 -0
  47. package/skills/uiify/references/elements/logo-wall.md +49 -0
  48. package/skills/uiify/references/elements/modal.md +38 -0
  49. package/skills/uiify/references/elements/number-field.md +39 -0
  50. package/skills/uiify/references/elements/otp-input.md +39 -0
  51. package/skills/uiify/references/elements/pagination.md +41 -0
  52. package/skills/uiify/references/elements/password-input.md +43 -0
  53. package/skills/uiify/references/elements/popup.md +38 -0
  54. package/skills/uiify/references/elements/pricing-table.md +66 -0
  55. package/skills/uiify/references/elements/progress-bar.md +47 -0
  56. package/skills/uiify/references/elements/radio-group.md +39 -0
  57. package/skills/uiify/references/elements/rating.md +39 -0
  58. package/skills/uiify/references/elements/search-input.md +45 -0
  59. package/skills/uiify/references/elements/segmented-control.md +39 -0
  60. package/skills/uiify/references/elements/select.md +42 -0
  61. package/skills/uiify/references/elements/sidebar.md +43 -0
  62. package/skills/uiify/references/elements/skeleton.md +38 -0
  63. package/skills/uiify/references/elements/slider.md +39 -0
  64. package/skills/uiify/references/elements/spinner.md +38 -0
  65. package/skills/uiify/references/elements/stats-bar.md +49 -0
  66. package/skills/uiify/references/elements/stepper.md +43 -0
  67. package/skills/uiify/references/elements/switch.md +41 -0
  68. package/skills/uiify/references/elements/table-of-contents.md +39 -0
  69. package/skills/uiify/references/elements/table.md +43 -0
  70. package/skills/uiify/references/elements/tabs.md +38 -0
  71. package/skills/uiify/references/elements/tags-input.md +39 -0
  72. package/skills/uiify/references/elements/testimonial.md +52 -0
  73. package/skills/uiify/references/elements/textarea.md +41 -0
  74. package/skills/uiify/references/elements/timeline.md +48 -0
  75. package/skills/uiify/references/elements/toast.md +39 -0
  76. package/skills/uiify/references/elements/toggle-group.md +39 -0
  77. package/skills/uiify/references/elements/toggle.md +39 -0
  78. package/skills/uiify/references/elements/toolbar.md +39 -0
  79. package/skills/uiify/references/elements/tooltip.md +38 -0
  80. package/skills/uiify/references/elements/virtual-scroll.md +39 -0
  81. package/skills/uiify/references/examples/alert-confirmation.md +34 -0
  82. package/skills/uiify/references/examples/field-validation.md +37 -0
  83. package/skills/uiify/references/examples/select-basic.md +35 -0
  84. package/skills/uiify/references/examples/table-controls.md +40 -0
  85. package/skills/uiify/references/guides/assets.md +14 -0
  86. package/skills/uiify/references/guides/content.md +11 -0
  87. package/skills/uiify/references/guides/hierarchy.md +14 -0
  88. package/skills/uiify/references/guides/reference.md +9 -0
  89. package/skills/uiify/references/guides/states.md +12 -0
  90. package/skills/uiify/references/guides/surface.md +27 -0
  91. package/skills/uiify/references/laws/accessibility.md +11 -0
  92. package/skills/uiify/references/laws/error-prevention.md +12 -0
  93. package/skills/uiify/references/laws/feedback.md +9 -0
  94. package/skills/uiify/references/laws/proximity.md +10 -0
  95. package/skills/uiify/references/laws/readability.md +9 -0
  96. package/skills/uiify/references/laws/von-restorff.md +9 -0
  97. package/skills/uiify/scripts/lint.mjs +1 -1
  98. package/skills/uiify/scripts/static.mjs +71 -14
package/README.md CHANGED
@@ -46,11 +46,19 @@ In a monorepo with hoisted dependencies, point to the nearest `node_modules/@gun
46
46
 
47
47
  ### `/uiify` page-building skill
48
48
 
49
- The package also includes the `/uiify` AI skill. Use it when an agent is creating or improving a
50
- web page with UIify: it maps the brief to available components, plans the page in `DESIGN.md`,
51
- implements the page in `src/App.tsx` when that file exists, and reports the checks it could run.
52
- It uses the installed package's component references and follows UIify's public styling and
53
- accessibility contracts. Invoke it explicitly so it runs only for page-building work.
49
+ The package also includes the `/uiify` AI skill. Invoke it explicitly when creating or improving a
50
+ web page with UIify. It adds component and UX knowledge to your request while preserving the agent's
51
+ normal workflow: no staged approvals, routine questions or special status output. It follows the
52
+ requested framework route and existing workspace conventions, reads version-matched component
53
+ references and supports custom UI for components UIify does not provide. Existing design decisions
54
+ are reused; invoking the skill does not require creating `DESIGN.md`.
55
+
56
+ The skill ships a compact index plus individually retrievable element, UX-law and composition
57
+ references under `skills/uiify/references/`. During planning it reads recipes for the requested
58
+ elements and relationships between them, then reads the public component docs for matched UIify
59
+ components. It does not load the whole catalog into the prompt. The private harness catalog is the
60
+ source for reviewed knowledge; the package contains only its curated public projection. Knowledge
61
+ is delivered as files, so this workflow does not require an MCP server.
54
62
 
55
63
  Install the skill into the directory your agent reads:
56
64
 
@@ -64,10 +72,15 @@ mkdir -p .claude/skills/uiify
64
72
  cp -R node_modules/@gunkin/uiify/skills/uiify/. .claude/skills/uiify/
65
73
  ```
66
74
 
67
- Then invoke `/uiify <page brief>` in Claude Code, or use the explicit skill invocation supported by
68
- your agent. Add `--auto` to run all stages without confirmation gates. Interactive runs pause at
69
- each stage so you can stop before implementation. The skill writes its design state to `DESIGN.md`
70
- and page code under `src/`; it does not create a page when `src/App.tsx` is absent.
75
+ Claude Code uses `/uiify <page brief>`; other agents use their documented explicit skill invocation.
76
+ No special execution flag is needed. The repository's manual smoke harness exercises Claude Code
77
+ only; activation syntax and token measurements do not establish behavior for other clients.
78
+
79
+ For verification, the skill reuses project tooling. If missing Playwright or axe-core tooling or
80
+ browser binaries are needed, the agent briefly explains what it will install and why before
81
+ installation. This is a notice, not a routine confirmation question. Installation follows project
82
+ rules, uses development dependencies and includes only what is needed. Unavailable checks are
83
+ reported as not run.
71
84
 
72
85
  ### Keeping the skill current when developing UIify
73
86
 
@@ -77,6 +90,18 @@ usage changes, and update the harness catalog when its coverage or gap status ch
77
90
  skill, then checks their tests and freshness. Review and commit generated changes with the component
78
91
  change. `npm run check:ai-harness` runs the focused tests and freshness checks without rewriting files.
79
92
 
93
+ For new design knowledge, inspect the component API and examples; record sourced evidence in the
94
+ private catalog; write a concise `release_body`; review the public projection for privacy and
95
+ usefulness; regenerate the skill; and run package-link and hygiene tests. Private evidence and owner
96
+ rationale stay in the harness source; changing private notes alone does not change what consumers
97
+ receive.
98
+
99
+ The optional paid eval runner records each agent and judge call separately. An unknown cost reserves
100
+ that call's configured cap and blocks later paid calls. `results.json` is atomically checkpointed
101
+ before and after calls and throughout page verification; an existing non-empty output directory is
102
+ not reused. This protects recorded progress but does not measure whether one skill produces better
103
+ designs than another.
104
+
80
105
  Documentation: https://uiify.gunkin.dev/
81
106
 
82
107
  MIT © Anton Gunkin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gunkin/uiify",
3
- "version": "0.0.16-alpha",
3
+ "version": "0.0.19-alpha",
4
4
  "description": "Native-first, accessible React 19 components that work before hydration.",
5
5
  "keywords": [
6
6
  "accessibility",
@@ -8,160 +8,160 @@ disable-model-invocation: true
8
8
 
9
9
  # /uiify
10
10
 
11
- Brief and flags: $ARGUMENTS
11
+ Page request: $ARGUMENTS
12
12
 
13
- This skill writes only DESIGN.md and files under src/.
13
+ Add UIify component and UX knowledge to the user's request. Follow the agent's normal workflow and the project's instructions; this skill is a reference, not a separate interaction protocol. Do not add approval gates, fixed stages, routine questions or pauses. Use ordinary language in the user's language for useful progress and results, without internal stage names or machine-readable status markers. Proceed with authorized work autonomously; handle genuine missing requirements through the agent's normal workflow.
14
14
 
15
- ## Stage chain
15
+ ## Project context
16
16
 
17
- Run the stages R0 to R4 in order and never skip or reorder one. Each stage has a marker line, a result and, except R4, a gate line after it. Every marker, state and gate line is exact and alone on its own line. The first gate, for example, is `UIIFY:GATE R0>R1 auto`. How you output them depends on the flags above.
17
+ Use the explicit request in the conversation if the client does not substitute `$ARGUMENTS`. Read repository instructions, the relevant package manifest and framework config, and a route example as needed. Resolve `@gunkin/uiify` from the selected workspace, including hoisted dependencies in parent workspaces. Follow the requested framework's route conventions and RSC/client boundaries. Create the requested route rather than replacing the home page; `src/App.tsx` is a destination only when it matches the request.
18
18
 
19
- **Interactive (no `--auto`).** Follow this protocol for every stage:
19
+ Reuse existing design decisions, tokens and conventions, including `DESIGN.md` when present. Do not create `DESIGN.md` or a managed state block merely because this skill was invoked. Create or update planning files only when the user or project workflow calls for them, preserving unrelated content. Keep changes within the requested page and necessary source files; setup and dependency changes follow the user's request and project rules.
20
20
 
21
- 1. Output the stage marker as plain text before you call any tool for that stage.
22
- 2. Do the stage's work; tools are allowed.
23
- 3. Output the stage's result.
24
- 4. Run the gate: ask once with AskUserQuestion ("Continue to the next stage?" with the options Continue and Stop). On Continue print `UIIFY:GATE <from>><to> asked` and go on. On Stop print `UIIFY:STOPPED` and end the run.
21
+ ## Choose an approach before composition
25
22
 
26
- Do not call any tool for a later stage until the current stage's gate line is output. A stage whose marker was not output did not happen.
23
+ Use the request to choose an internal approach; do not ask the user to choose a mode:
27
24
 
28
- **Auto (`--auto`).** Ask nothing. Do all tool work first without commentary: read the project (R0) and create `DESIGN.md` when R2 says to. Then output the whole chain in one final message, in stage order: each stage's marker and result, with `UIIFY:GATE <from>><to> auto` between stages, ending as R4 says. Output nothing else before that message.
25
+ - Reproduce an explicit visual reference while preserving its layout, content and recognizable details; read the reference guide before choosing composition and compare again after rendering.
26
+ - Extend the existing UI for a scoped change; keep surrounding routes and established design choices intact.
27
+ - Create or redesign when the request asks for a new page or a broad visual change.
28
+ - Audit when the user asks for findings rather than implementation; report observed issues and evidence.
29
29
 
30
- ### R0 activate
30
+ Use this precedence: explicit brief or reference → existing project → selected recipes → aesthetic guidance. This classification only guides the work; continue the agent's normal workflow.
31
31
 
32
- Marker `UIIFY:R0 activate`. Work: read the project. Does `package.json` list `@gunkin/uiify` under `dependencies` or `devDependencies`, and does `DESIGN.md` exist at the project root? Result: `UIIFY:STATE uiify=<yes|no> design=<found|missing>`.
32
+ When images or typography shape the composition, read `references/guides/assets.md` before choosing material. Skip it for routine UI changes where imagery and type are not part of the design decision.
33
33
 
34
- ### R1 coverage
34
+ ## Select knowledge for the page
35
35
 
36
- Marker `UIIFY:R1 coverage`. Work: split the brief into the page elements it needs and match each one to the index below by name or alias. Result: one line per element, `UIIFY:ELEMENT <name>|<binding>`. For an element the index lists, use its index name and its uiify column as the binding (a uiify component name or `gap`). For an element the index does not list, use a kebab-case name and the binding `unknown`.
36
+ Match the needed elements to the Index by name or alias. Use the listed component binding; never invent a binding. A `gap` or an unlisted element needs custom UI, not a guessed UIify API.
37
37
 
38
- ### R2 design
38
+ For each selected element with a fourth-column reference path, read that file once. A blank path means no curated recipe is available. From the Composition index, read only relationships where both elements are needed on the page. Read each selected reference and linked law once, including the related laws named by element recipes. Do not load the complete catalog or unrelated component references.
39
39
 
40
- Marker `UIIFY:R2 design`. Work:
40
+ For mapped components, read the resolved package's `agents/index.md` once and the relevant `agents/reference/components/<name>.md`, then adapt a documented example. Import from `@gunkin/uiify/components/<name>`. Inspect Runtime exports and the Types/declaration file before rendering: use the explicit `NameRoot` export when available. A namespace export is not itself a JSX component; use its `.Root` or an explicit root export. Prefer these version-matched references over memory. Use UIify wherever its documented API covers the interaction; for gaps, use semantic native HTML or custom components following UIify's public styling and accessibility contracts.
41
41
 
42
- 1. Read `DESIGN.md` and reuse its recorded decisions. If missing, create exactly the skeleton below. Preserve the YAML `tokens` and every byte outside the managed block. If its structure or existing managed block is malformed, report the problem and leave it unchanged.
43
- 2. Use the R1 bindings as the coverage map. The skill package intentionally contains no private element, law or composition catalog files; do not search for `references/elements/`, `references/laws/` or `references/compositions/` under the skill directory. R3 reads UIify's public component documentation when implementing mapped elements.
44
- 3. Consult the `frontend-design` skill when it is available for design direction. Use `web-design-guidelines` only when the task asks for a review, and consult `vercel-react-best-practices` only for a relevant performance decision. These optional skills are references, not dependencies; if absent, use the built-in guidance below. UIify's public component and styling contracts take precedence over any conflicting advice.
45
- 4. Ground the page in its actual subject, audience and primary job. Choose a visual direction that follows the brief and is specific to that subject. Plan a clear typography hierarchy, palette using the project's existing semantic roles, responsive layout, purposeful copy and one memorable signature detail. Use restraint around that signature; don't default to a gradient hero, repeated equal cards or decorative numbering without a reason. Preserve visible focus, keyboard-sized targets and reduced-motion behavior.
46
- 5. Example: for a settings page, group fields by the decision the person is making, keep labels and validation close to each control, and give one `Button` the save action. Use the package's documented anatomy:
42
+ ## Design guidance
47
43
 
48
- ```tsx
49
- <Field.Root id="email" invalid={invalid} required>
50
- <Field.Label fieldId="email" required>Email</Field.Label>
51
- <Field.Control as="input" fieldId="email" type="email" invalid={invalid} required />
52
- <Field.Error fieldId="email" invalid={invalid}>Enter a valid email address</Field.Error>
53
- </Field.Root>
54
- <Button type="submit">Save changes</Button>
55
- ```
44
+ Consult `frontend-design` when available for design direction; if absent, use the built-in guidance below. Consult `vercel-react-best-practices` for relevant React performance decisions and `web-design-guidelines` for reviews. These skills are optional references. UIify's public component and styling contracts take precedence over conflicting advice.
56
45
 
57
- Don't add an unrelated marketing hero or make every field group an equally prominent card.
58
- 6. Keep existing decisions and plan the page's element order, hierarchy, grouping, actions and visual direction as a decision with id `page-plan`, a concrete `decision`, `why` and `references`. Reuse an existing plan unless the brief requires an explicit revision; retain other decisions. Research only unresolved gaps or open decisions in a subagent, if both delegation and primary-source retrieval tools are available. Request a short summary with dated primary-source links. If those tools are unavailable, report unresolved gaps and keep them `proposed`. Record dates alongside the source URLs in `sources`. Only explicit owner approval can make a gap `accepted`; `--auto` never grants approval. Follow owner prose and report conflicts with the brief; interactive mode can clarify at the normal gate, while `--auto` preserves recorded choices.
59
- 7. Store state only in one JSON block beneath `## Decisions`, delimited by an opening `<!-- uiify:state -->` line and a closing `<!-- /uiify:state -->` line. Its exact shape is `{ "version": 1, "elements": ["R1-name"], "decisions": [{ "id": "page-plan", "decision": "concrete page plan and visual direction", "why": "reason", "references": ["public UIify docs or dated source URLs"] }], "gaps": [{ "element": "gap-name", "status": "proposed", "sources": [] }] }`. Empty lists are allowed; IDs and elements are unique; strings are nonempty. Do not put prose or fences inside the JSON block. Reject duplicate, unclosed, misplaced or invalid blocks. Insert the block immediately after the Decisions heading's newline, without changing surrounding bytes; replace only an existing block and its following newline. If state is unchanged, leave the whole file byte-identical. Keep existing gap acceptance and sources; do not infer approval from research.
46
+ After the page renders, review it with a guide only when its question applies:
60
47
 
61
- Result: summarize the stored page plan, reused decisions and unresolved gaps, including research limitations.
48
+ - `references/guides/surface.md` — what kind of page is this, and how expressive should it be?
49
+ - `references/guides/reference.md` — only when a reference or existing page is being compared.
50
+ - `references/guides/assets.md` — only when images or typography shape the composition.
51
+ - `references/guides/hierarchy.md` — what leads the eye, and do the parts read in the right order?
52
+ - `references/guides/content.md` — does the copy say what this page and each action actually do?
53
+ - `references/guides/states.md` — does the page still work outside the happy path?
62
54
 
63
- ```markdown
64
- ---
65
- tokens: {}
66
- ---
67
-
68
- # Design
55
+ Ground the visual direction in the subject, audience and primary job. Plan clear typography, hierarchy, grouping, purposeful copy and responsive layout using existing semantic color roles. Choose one signature detail appropriate to the subject and keep the rest restrained. Avoid defaulting to a gradient hero, repeated equal cards or decorative numbering without a reason. Preserve visible focus, keyboard-sized targets and reduced-motion behavior.
69
56
 
70
- ## Decisions
57
+ For a settings page, group fields by the decision the person makes, keep labels and validation close to controls, and give one `Button` the save action. Use documented anatomy:
71
58
 
72
- ## Gaps
59
+ ```tsx
60
+ <Field.Root id="email" invalid={invalid} required>
61
+ <Field.Label fieldId="email" required>Email</Field.Label>
62
+ <Field.Control as="input" fieldId="email" type="email" invalid={invalid} required />
63
+ <Field.Error fieldId="email" invalid={invalid}>Enter a valid email address</Field.Error>
64
+ </Field.Root>
65
+ <Button type="submit">Save changes</Button>
73
66
  ```
74
67
 
75
- ### R3 build
68
+ Do not add an unrelated marketing hero or make every field group an equally prominent card. For unresolved gaps, explain material limitations in plain language; research only when it helps the request. Research does not grant approval to change the library's public API or mark a catalog gap accepted.
76
69
 
77
- Marker `UIIFY:R3 build`. Work: if `src/App.tsx` exists, write the page into it (new components go under `src/`), following the R1 table and the stored `page-plan` in `DESIGN.md`. Read `node_modules/@gunkin/uiify/agents/index.md` once and adapt a relevant documented example when it matches the page; for each mapped component, read `node_modules/@gunkin/uiify/agents/reference/components/<name>.md`, then import it from `@gunkin/uiify/components/<name>`. Before rendering an export, inspect its Runtime exports and the Types/declaration file for component shape; use the explicit `NameRoot` export when available. A namespace export is not itself a JSX component; use its `.Root` or the explicit root export. For a `gap` or `unknown` element, use semantic native HTML and UIify's public styling contract, and consult public design-system or platform guidance for unresolved behavior when retrieval is available. Write no file outside `src/` and leave `DESIGN.md` as it is. If `src/App.tsx` does not exist, write nothing. Result: one sentence naming what you wrote and where, or where the page would go.
70
+ ## Verification guidance
78
71
 
79
- ### R4 verify
72
+ Use applicable project build, typecheck and test commands when permitted. The optional `node <resolved-skill-directory>/scripts/lint.mjs <project-root>` runs the static checks compiled from the published laws when this skill was built and prints their names; it does not read `DESIGN.md` or other design files. It inspects literal attributes of lowercase intrinsic JSX tags and of parts imported from `@gunkin/uiify/components` or `@gunkin/uiify/elements` (for example `Button` or `Field.Control`); other custom components are not analyzed. No findings is not proof of accessibility. Missing parsers or execution failures mean unavailable, never a pass.
80
73
 
81
- Marker `UIIFY:R4 verify`. Work: when commands are permitted and an execution tool is available, run `node <this-skill-directory>/scripts/lint.mjs <project-root>` and report its actual output. The script runs only the static subset enabled by accepted laws; no enabled checks is not proof of accessibility. Missing TypeScript/parser or another execution failure is unavailable, never a pass. If the consuming task prohibits commands, report "lint not run" with that reason; if no execution tool is available, report that limitation. When a browser tool is available and permitted, inspect the page and requested interactions without creating screenshot artifacts; otherwise report that browser verification was not run. Repair findings only under `src/` in at most two rounds, rerunning available checks after each. Do not edit DESIGN.md during repairs. Result: report executed checks, unavailable checks with reasons, repairs and remaining issues; never claim a check passed without running it. Then print `UIIFY:DONE` and stop.
74
+ Reuse existing browser and accessibility tooling to inspect responsive layouts, keyboard access and requested interactions. When missing tools are needed for quality verification, use Playwright for browser checks and axe-core (or the project's axe integration) for accessibility checks. Before installing missing Playwright or axe-core packages or downloading browser binaries, notify the user briefly in their language, explaining what will be installed and why. For example: “I'll install Playwright and axe-core as development tools to check the page in a browser and catch accessibility issues.” This is a notification, not a confirmation question; continue within existing authorization and respect project installation rules. Use the project's package manager and development dependencies, reuse existing integrations, and install only what is needed.
82
75
 
83
- ## Hard rules
84
-
85
- - Prefer published UIify component documentation over memory when implementing a mapped element.
86
- - Use a uiify component whenever the index names one for the element.
87
- - Ground visual choices in the brief and subject; don't impose one preferred palette or page template.
88
- - Apply optional frontend skills only when available and relevant; UIify's public contracts override generic advice.
89
- - Match elements only against the index: never invent a binding and never use an alias as the element name.
90
- - Run every stage in this conversation and never use context: fork.
91
- - Write only `DESIGN.md` and files under `src/`; R2 changes only its managed state block, R4 repairs only `src/` in at most two rounds.
76
+ Repair findings within the task's scope and rerun the affected checks. If commands, installation or browser execution are unavailable or prohibited, report those checks as not run and explain the limitation. Report actual checks and remaining issues in ordinary language; never claim a check passed without running it.
92
77
 
93
78
  ## Index
94
79
 
95
- One line per element: `element|aliases|uiify component or gap|` (the final field is reserved and empty).
80
+ One line per element: `element|aliases|uiify component or gap|reference path`. A blank final field means no curated reference.
81
+
82
+ ```text
83
+ accordion|faq-accordion,disclosure|accordion|references/elements/accordion.md
84
+ alert-modal|confirmation-dialog,alert-dialog|alert-modal|references/elements/alert-modal.md
85
+ avatar|profile-picture|gap|references/elements/avatar.md
86
+ badge|chip,tag|gap|references/elements/badge.md
87
+ bar-chart|column-chart|gap|references/elements/bar-chart.md
88
+ breadcrumb|breadcrumbs|breadcrumb|references/elements/breadcrumb.md
89
+ button|cta-button,icon-button,primary-button|button|references/elements/button.md
90
+ candle-chart|candlestick-chart|candle-chart|references/elements/candle-chart.md
91
+ card|content-card|gap|references/elements/card.md
92
+ carousel|testimonial-carousel,image-slider|carousel|references/elements/carousel.md
93
+ checkbox||checkbox|references/elements/checkbox.md
94
+ code-block|code-snippet|gap|references/elements/code-block.md
95
+ collapsible|expandable-section|collapsible|references/elements/collapsible.md
96
+ color-picker||color-picker|references/elements/color-picker.md
97
+ combobox|autocomplete,typeahead|combobox|references/elements/combobox.md
98
+ command-palette|spotlight-search|gap|references/elements/command-palette.md
99
+ context-menu|right-click-menu|context-menu|references/elements/context-menu.md
100
+ cookie-banner|cookie-consent|gap|references/elements/cookie-banner.md
101
+ date-picker|calendar-picker|gap|references/elements/date-picker.md
102
+ divider|separator|gap|references/elements/divider.md
103
+ drawer|sheet,off-canvas-menu|drawer|references/elements/drawer.md
104
+ dropdown-menu|menu|dropdown-menu|references/elements/dropdown-menu.md
105
+ empty-state|no-results|gap|references/elements/empty-state.md
106
+ feature-grid|feature-cards,feature-list|gap|references/elements/feature-grid.md
107
+ field|form-field|field|references/elements/field.md
108
+ file-upload|file-input,dropzone|file-upload|references/elements/file-upload.md
109
+ footer|site-footer|gap|references/elements/footer.md
110
+ form||form|references/elements/form.md
111
+ header|navbar,top-nav|header|references/elements/header.md
112
+ hero|hero-section,hero-banner|gap|references/elements/hero.md
113
+ hover-card||hover-card|references/elements/hover-card.md
114
+ image-gallery|gallery,lightbox|gap|references/elements/image-gallery.md
115
+ inline-alert|banner-alert,callout|gap|references/elements/inline-alert.md
116
+ input|text-input|input|references/elements/input.md
117
+ line-chart|sparkline|line-chart|references/elements/line-chart.md
118
+ logo-wall|logo-cloud,customer-logos|gap|references/elements/logo-wall.md
119
+ modal|dialog|modal|references/elements/modal.md
120
+ number-field|number-input|number-field|references/elements/number-field.md
121
+ otp-input|pin-input|otp-input|references/elements/otp-input.md
122
+ pagination||pagination|references/elements/pagination.md
123
+ password-input|show-hide-password|gap|references/elements/password-input.md
124
+ popup|popover|popup|references/elements/popup.md
125
+ pricing-table|pricing,plan-cards,pricing-plans|gap|references/elements/pricing-table.md
126
+ progress-bar|progress,linear-progress|gap|references/elements/progress-bar.md
127
+ radio-group|radio|radio-group|references/elements/radio-group.md
128
+ rating|star-rating|rating|references/elements/rating.md
129
+ search-input|search-box|gap|references/elements/search-input.md
130
+ segmented-control||segmented-control|references/elements/segmented-control.md
131
+ select|native-select|select|references/elements/select.md
132
+ sidebar|sidebar-nav,side-nav|gap|references/elements/sidebar.md
133
+ skeleton|skeleton-loader|skeleton|references/elements/skeleton.md
134
+ slider|range-slider|slider|references/elements/slider.md
135
+ spinner|loading-indicator|spinner|references/elements/spinner.md
136
+ stats-bar|stat-card,metrics|gap|references/elements/stats-bar.md
137
+ stepper|step-indicator,wizard-steps|gap|references/elements/stepper.md
138
+ switch|toggle-switch|switch|references/elements/switch.md
139
+ table|data-table,comparison-table|table|references/elements/table.md
140
+ table-of-contents|toc,in-page-nav|table-of-contents|references/elements/table-of-contents.md
141
+ tabs|tab-navigation|tabs|references/elements/tabs.md
142
+ tags-input|token-input|tags-input|references/elements/tags-input.md
143
+ testimonial|testimonials,quote-card|gap|references/elements/testimonial.md
144
+ textarea||textarea|references/elements/textarea.md
145
+ timeline||gap|references/elements/timeline.md
146
+ toast|snackbar,toast-notification|toast|references/elements/toast.md
147
+ toggle|toggle-button|toggle|references/elements/toggle.md
148
+ toggle-group|button-group|toggle-group|references/elements/toggle-group.md
149
+ toolbar||toolbar|references/elements/toolbar.md
150
+ tooltip||tooltip|references/elements/tooltip.md
151
+ virtual-scroll|virtualized-list|virtual-scroll|references/elements/virtual-scroll.md
152
+ ```
153
+
154
+ ## Composition index
155
+
156
+ One line per accepted relationship: `name|element,element|reference path`.
96
157
 
97
158
  ```text
98
- accordion|faq-accordion,disclosure|accordion|
99
- alert-modal|confirmation-dialog,alert-dialog|alert-modal|
100
- avatar|profile-picture|gap|
101
- badge|chip,tag|gap|
102
- bar-chart|column-chart|gap|
103
- breadcrumb|breadcrumbs|breadcrumb|
104
- button|cta-button,icon-button,primary-button|button|
105
- candle-chart|candlestick-chart|candle-chart|
106
- card|content-card|gap|
107
- carousel|testimonial-carousel,image-slider|carousel|
108
- checkbox||checkbox|
109
- code-block|code-snippet|gap|
110
- collapsible|expandable-section|collapsible|
111
- color-picker||color-picker|
112
- combobox|autocomplete,typeahead|combobox|
113
- command-palette|spotlight-search|gap|
114
- context-menu|right-click-menu|context-menu|
115
- cookie-banner|cookie-consent|gap|
116
- date-picker|calendar-picker|gap|
117
- divider|separator|gap|
118
- drawer|sheet,off-canvas-menu|drawer|
119
- dropdown-menu|menu|dropdown-menu|
120
- empty-state|no-results|gap|
121
- feature-grid|feature-cards,feature-list|gap|
122
- field|form-field|field|
123
- file-upload|file-input,dropzone|file-upload|
124
- footer|site-footer|gap|
125
- form||form|
126
- header|navbar,top-nav|header|
127
- hero|hero-section,hero-banner|gap|
128
- hover-card||hover-card|
129
- image-gallery|gallery,lightbox|gap|
130
- inline-alert|banner-alert,callout|gap|
131
- input|text-input|input|
132
- line-chart|sparkline|line-chart|
133
- logo-wall|logo-cloud,customer-logos|gap|
134
- modal|dialog|modal|
135
- number-field|number-input|number-field|
136
- otp-input|pin-input|otp-input|
137
- pagination||pagination|
138
- password-input|show-hide-password|gap|
139
- popup|popover|popup|
140
- pricing-table|pricing,plan-cards,pricing-plans|gap|
141
- progress-bar|progress,linear-progress|gap|
142
- radio-group|radio|radio-group|
143
- rating|star-rating|rating|
144
- search-input|search-box|gap|
145
- segmented-control||segmented-control|
146
- select|native-select|select|
147
- sidebar|sidebar-nav,side-nav|gap|
148
- skeleton|skeleton-loader|skeleton|
149
- slider|range-slider|slider|
150
- spinner|loading-indicator|spinner|
151
- stats-bar|stat-card,metrics|gap|
152
- stepper|step-indicator,wizard-steps|gap|
153
- switch|toggle-switch|switch|
154
- table|data-table,comparison-table|table|
155
- table-of-contents|toc,in-page-nav|table-of-contents|
156
- tabs|tab-navigation|tabs|
157
- tags-input|token-input|tags-input|
158
- testimonial|testimonials,quote-card|gap|
159
- textarea||textarea|
160
- timeline||gap|
161
- toast|snackbar,toast-notification|toast|
162
- toggle|toggle-button|toggle|
163
- toggle-group|button-group|toggle-group|
164
- toolbar||toolbar|
165
- tooltip||tooltip|
166
- virtual-scroll|virtualized-list|virtual-scroll|
159
+ card-rhythm|feature-grid,card|references/compositions/card-rhythm.md
160
+ destructive-confirmation|alert-modal,button|references/compositions/destructive-confirmation.md
161
+ form-grouping|form,field|references/compositions/form-grouping.md
162
+ hero-actions|hero,button|references/compositions/hero-actions.md
163
+ page-frame|header,footer|references/compositions/page-frame.md
164
+ pricing-actions|pricing-table,button|references/compositions/pricing-actions.md
165
+ save-feedback|button,toast|references/compositions/save-feedback.md
166
+ table-controls|table,pagination|references/compositions/table-controls.md
167
167
  ```
@@ -0,0 +1,14 @@
1
+ # card-rhythm
2
+
3
+ Use when both feature-grid and card are present.
4
+
5
+ Law: references/laws/proximity.md
6
+
7
+ ## Rule
8
+
9
+ Keep cards in one group only when the items share a purpose and hierarchy. Preserve readable separation and source order as the layout becomes a single column.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
14
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation.html) (verified 2026-10-16)
@@ -0,0 +1,15 @@
1
+ # destructive-confirmation
2
+
3
+ Use when both alert-modal and button are present.
4
+
5
+ Law: references/laws/error-prevention.md
6
+
7
+ ## Rule
8
+
9
+ State the consequence in the dialog title or message. Name both the destructive action and the safe way to cancel. Put initial focus on the safe action; Cancel and Escape preserve the item and return focus. After confirmation removes the item, move focus to a connected element. Identify the dialog and follow the modal-dialog keyboard pattern.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) (verified 2026-10-16)
14
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-16)
15
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-16)
@@ -0,0 +1,14 @@
1
+ # form-grouping
2
+
3
+ Use when both form and field are present.
4
+
5
+ Law: references/laws/proximity.md
6
+
7
+ ## Rule
8
+
9
+ Group related controls with a fieldset and legend. Keep each control labelled and present groups in the order people complete them.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/tutorials/forms/grouping/) (verified 2026-10-16)
14
+ - [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-16)
@@ -0,0 +1,14 @@
1
+ # hero-actions
2
+
3
+ Use when both hero and button are present.
4
+
5
+ Law: references/laws/von-restorff.md
6
+
7
+ ## Rule
8
+
9
+ Place the main action beside the hero message it advances, give it the clearest emphasis and an outcome-specific label, then place any secondary action after it with quieter treatment. Preserve that reading order when actions stack.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-17)
14
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-17)
@@ -0,0 +1,14 @@
1
+ # page-frame
2
+
3
+ Use when both header and footer are present.
4
+
5
+ Law: references/laws/readability.md
6
+
7
+ ## Rule
8
+
9
+ Use consistent page landmarks and repeated navigation order. Align header, main content and footer to one responsive content measure without clipping narrow screens.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/consistent-navigation.html) (verified 2026-10-16)
14
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
@@ -0,0 +1,13 @@
1
+ # pricing-actions
2
+
3
+ Use when both pricing-table and button are present.
4
+
5
+ Law: references/laws/proximity.md
6
+
7
+ ## Rule
8
+
9
+ Keep each plan action associated with the plan name, price and included features. Let the page stack plans at narrow widths without changing their reading order.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
@@ -0,0 +1,13 @@
1
+ # save-feedback
2
+
3
+ Use when both button and toast are present.
4
+
5
+ Law: references/laws/feedback.md
6
+
7
+ ## Rule
8
+
9
+ Place save feedback near the action it describes and announce the update as a status message. Preserve valid field values when validation fails; allow correction and a successful save. Keep the message understandable without color or motion.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (verified 2026-10-16)
@@ -0,0 +1,14 @@
1
+ # table-controls
2
+
3
+ Use when both table and pagination are present.
4
+
5
+ Law: references/laws/proximity.md
6
+
7
+ ## Rule
8
+
9
+ Keep labeled search and filters associated with the table they change. Applying a filter returns to a valid page with matching rows; Reset restores the original result set and first page. Identify the current page and preserve a clear sequence from controls to rows to pagination.
10
+
11
+ ## Sources
12
+
13
+ - [www.w3.org](https://www.w3.org/WAI/tutorials/forms/labels/) (verified 2026-10-16)
14
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html) (verified 2026-10-16)
@@ -0,0 +1,38 @@
1
+ # accordion
2
+
3
+ Binding: accordion
4
+
5
+ Reveal optional sections without hiding content most visitors need.
6
+
7
+ ## Use when
8
+
9
+ Use for FAQs or optional details when visitors need only a small subset. Keep content visible when most visitors need it; use `stepper` for sequential tasks.
10
+
11
+ ## Avoid when
12
+
13
+ Do not hide the page's main explanation or an action that is the only way to continue inside a closed section.
14
+
15
+ ## Structure
16
+
17
+ `Accordion` takes an `id`, `items` with a `value`, `label`, and `panel`, and `type="single"` or `"multiple"`. The visible summary is the question or section title; make it describe the revealed content. Single mode uses native `<details name>` grouping, so opening one section closes the other.
18
+
19
+ ## Responsive
20
+
21
+ Let long summaries wrap and preserve a clear open/closed cue. Keep summaries and their focus indicators visible at narrow widths.
22
+
23
+ ## States
24
+
25
+ Items start closed unless selected by `defaultValue`. Native `<details>` supports keyboard activation; its `name` group permits only one open section at a time. Search behavior for text inside closed sections can vary, so verify it in target browsers when page search matters.
26
+
27
+ ## Verify
28
+
29
+ Use Tab to reach each summary, Enter or Space to toggle it, and confirm the focus indicator remains visible. Check long labels, single and multiple modes, and whether browser find-in-page reveals matching closed content in supported target browsers.
30
+
31
+ ## Common mistake
32
+
33
+ Hiding the only primary action in a section that starts closed makes the page's next step easy to miss.
34
+
35
+ ## Sources
36
+
37
+ - [developer.mozilla.org](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) (verified 2026-10-17)
38
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/) (verified 2026-10-17)
@@ -0,0 +1,42 @@
1
+ # alert-modal
2
+
3
+ Binding: alert-modal
4
+
5
+ A short, important message requires an immediate response, especially confirmation before a consequential action
6
+
7
+ ## Use when
8
+
9
+ A short, important message requires an immediate response, especially confirmation before a consequential action. Use a regular modal for a task or optional information, and inline validation for recoverable form errors.
10
+
11
+ ## Avoid when
12
+
13
+ Do not use alert dialogs for routine notices or long, structured content. Do not make a destructive choice the default or leave consequences implicit.
14
+
15
+ ## Structure
16
+
17
+ The convenience `AlertModal` provides a trigger, visible title, optional short description, Cancel, and Action. State the consequence in the description and make both choices explicit; the action uses the destructive variant.
18
+
19
+ ## Responsive
20
+
21
+ Keep the message concise so it remains understandable in the modal at narrow widths and zoom. Allow the text to wrap; do not rely on color or icon alone to explain the consequence.
22
+
23
+ ## States
24
+
25
+ Tier 0 uses a native modal [dialog role=alertdialog] opened by native invokers. Cancel and Action request close. Use the client entry only when application-controlled state is required.
26
+
27
+ ## Verify
28
+
29
+ Check the accessible name and description, opening and closing by keyboard, focus containment and return, both explicit choices, and the narrow/zoomed layout. Confirm initial focus lands on Cancel, the safe choice: `AlertModal` renders Cancel before Action, so keep focusable content out of the dialog body above them.
30
+
31
+ ## Common mistake
32
+
33
+ A red Delete button is not enough: name what will be deleted and what happens after each choice.
34
+ Example: `references/examples/alert-confirmation.md`.
35
+
36
+ Related laws: references/laws/error-prevention.md, references/laws/accessibility.md
37
+
38
+ ## Sources
39
+
40
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) (verified 2026-10-17)
41
+ - [www.w3.org](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) (verified 2026-10-17)
42
+ - [www.w3.org](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html) (verified 2026-10-17)