@dedesfr/prompter 0.8.23 → 1.0.0

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 (247) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +105 -77
  3. package/dist/cli/index.js +25 -1
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/init.d.ts +1 -7
  6. package/dist/commands/init.d.ts.map +1 -1
  7. package/dist/commands/init.js +60 -299
  8. package/dist/commands/init.js.map +1 -1
  9. package/dist/commands/login.d.ts +4 -0
  10. package/dist/commands/login.d.ts.map +1 -0
  11. package/dist/commands/login.js +56 -0
  12. package/dist/commands/login.js.map +1 -0
  13. package/dist/commands/logout.d.ts +4 -0
  14. package/dist/commands/logout.d.ts.map +1 -0
  15. package/dist/commands/logout.js +14 -0
  16. package/dist/commands/logout.js.map +1 -0
  17. package/dist/commands/update.d.ts.map +1 -1
  18. package/dist/commands/update.js +31 -41
  19. package/dist/commands/update.js.map +1 -1
  20. package/dist/commands/whoami.d.ts +4 -0
  21. package/dist/commands/whoami.d.ts.map +1 -0
  22. package/dist/commands/whoami.js +42 -0
  23. package/dist/commands/whoami.js.map +1 -0
  24. package/dist/core/auth-store.d.ts +10 -0
  25. package/dist/core/auth-store.d.ts.map +1 -0
  26. package/dist/core/auth-store.js +39 -0
  27. package/dist/core/auth-store.js.map +1 -0
  28. package/dist/core/configurators/slash/antigravity.d.ts +2 -5
  29. package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
  30. package/dist/core/configurators/slash/antigravity.js +2 -57
  31. package/dist/core/configurators/slash/antigravity.js.map +1 -1
  32. package/dist/core/configurators/slash/base.d.ts +6 -18
  33. package/dist/core/configurators/slash/base.d.ts.map +1 -1
  34. package/dist/core/configurators/slash/base.js +8 -77
  35. package/dist/core/configurators/slash/base.js.map +1 -1
  36. package/dist/core/configurators/slash/claude.d.ts +2 -5
  37. package/dist/core/configurators/slash/claude.d.ts.map +1 -1
  38. package/dist/core/configurators/slash/claude.js +2 -57
  39. package/dist/core/configurators/slash/claude.js.map +1 -1
  40. package/dist/core/configurators/slash/codex.d.ts +2 -5
  41. package/dist/core/configurators/slash/codex.d.ts.map +1 -1
  42. package/dist/core/configurators/slash/codex.js +2 -57
  43. package/dist/core/configurators/slash/codex.js.map +1 -1
  44. package/dist/core/configurators/slash/droid.d.ts +2 -5
  45. package/dist/core/configurators/slash/droid.d.ts.map +1 -1
  46. package/dist/core/configurators/slash/droid.js +2 -32
  47. package/dist/core/configurators/slash/droid.js.map +1 -1
  48. package/dist/core/configurators/slash/forge.d.ts +2 -5
  49. package/dist/core/configurators/slash/forge.d.ts.map +1 -1
  50. package/dist/core/configurators/slash/forge.js +2 -32
  51. package/dist/core/configurators/slash/forge.js.map +1 -1
  52. package/dist/core/configurators/slash/github-copilot.d.ts +2 -7
  53. package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
  54. package/dist/core/configurators/slash/github-copilot.js +2 -96
  55. package/dist/core/configurators/slash/github-copilot.js.map +1 -1
  56. package/dist/core/configurators/slash/index.d.ts +1 -1
  57. package/dist/core/configurators/slash/index.d.ts.map +1 -1
  58. package/dist/core/configurators/slash/index.js +1 -1
  59. package/dist/core/configurators/slash/index.js.map +1 -1
  60. package/dist/core/configurators/slash/kilocode.d.ts +2 -5
  61. package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
  62. package/dist/core/configurators/slash/kilocode.js +2 -57
  63. package/dist/core/configurators/slash/kilocode.js.map +1 -1
  64. package/dist/core/configurators/slash/opencode.d.ts +2 -5
  65. package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
  66. package/dist/core/configurators/slash/opencode.js +2 -57
  67. package/dist/core/configurators/slash/opencode.js.map +1 -1
  68. package/dist/core/configurators/slash/registry.d.ts +4 -4
  69. package/dist/core/configurators/slash/registry.d.ts.map +1 -1
  70. package/dist/core/configurators/slash/registry.js.map +1 -1
  71. package/dist/core/registry.d.ts +18 -0
  72. package/dist/core/registry.d.ts.map +1 -0
  73. package/dist/core/registry.js +94 -0
  74. package/dist/core/registry.js.map +1 -0
  75. package/dist/core/templates/index.d.ts +0 -1
  76. package/dist/core/templates/index.d.ts.map +1 -1
  77. package/dist/core/templates/index.js +0 -1
  78. package/dist/core/templates/index.js.map +1 -1
  79. package/package.json +7 -1
  80. package/AGENTS.md +0 -123
  81. package/CLAUDE.md +0 -17
  82. package/build.js +0 -20
  83. package/convex-setup.md +0 -403
  84. package/dist/core/templates/slash-command-templates.d.ts +0 -7
  85. package/dist/core/templates/slash-command-templates.d.ts.map +0 -1
  86. package/dist/core/templates/slash-command-templates.js +0 -1041
  87. package/dist/core/templates/slash-command-templates.js.map +0 -1
  88. package/prompt/ai-humanizer.md +0 -45
  89. package/prompt/api-contract-generator.md +0 -234
  90. package/prompt/apply.md +0 -17
  91. package/prompt/archive.md +0 -21
  92. package/prompt/design-system.md +0 -210
  93. package/prompt/document-explainer.md +0 -149
  94. package/prompt/epic-generator.md +0 -198
  95. package/prompt/epic-single.md +0 -47
  96. package/prompt/erd-generator.md +0 -130
  97. package/prompt/fsd-generator.md +0 -157
  98. package/prompt/prd-agent-generator.md +0 -147
  99. package/prompt/prd-generator.md +0 -195
  100. package/prompt/product-brief.md +0 -289
  101. package/prompt/proposal.md +0 -22
  102. package/prompt/qa-test-scenario.md +0 -133
  103. package/prompt/skill-creator.md +0 -350
  104. package/prompt/story-generator.md +0 -278
  105. package/prompt/story-single.md +0 -70
  106. package/prompt/tdd-generator.md +0 -294
  107. package/prompt/tdd-lite-generator.md +0 -224
  108. package/prompt/wireframe-generator.md +0 -219
  109. package/skills/ai-context-generator/SKILL.md +0 -54
  110. package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
  111. package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
  112. package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
  113. package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
  114. package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
  115. package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
  116. package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
  117. package/skills/cerebro/SKILL.md +0 -187
  118. package/skills/cerebro/references/agents.md +0 -213
  119. package/skills/code-review/SKILL.md +0 -373
  120. package/skills/code-review/assets/report-template-agent.md +0 -212
  121. package/skills/code-review/assets/report-template-compact.md +0 -81
  122. package/skills/code-review/assets/report-template-full.md +0 -264
  123. package/skills/code-review/assets/report-template-human.md +0 -168
  124. package/skills/code-review/references/universal-patterns.md +0 -495
  125. package/skills/design-md/README.md +0 -34
  126. package/skills/design-md/SKILL.md +0 -172
  127. package/skills/design-md/examples/DESIGN.md +0 -154
  128. package/skills/design-system-generator/SKILL.md +0 -324
  129. package/skills/design-system-generator/assets/design-system-template.md +0 -348
  130. package/skills/design-system-generator/references/extraction-patterns.md +0 -321
  131. package/skills/doc-builder/SKILL.md +0 -115
  132. package/skills/doc-builder/references/ui-patterns.md +0 -394
  133. package/skills/document-translator/SKILL.md +0 -58
  134. package/skills/enhance-prompt/README.md +0 -34
  135. package/skills/enhance-prompt/SKILL.md +0 -204
  136. package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
  137. package/skills/feature-planner/SKILL.md +0 -305
  138. package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
  139. package/skills/frontend-design/LICENSE.txt +0 -177
  140. package/skills/frontend-design/SKILL.md +0 -42
  141. package/skills/gamma-builder/SKILL.md +0 -134
  142. package/skills/laravel-code-review/SKILL.md +0 -383
  143. package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
  144. package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
  145. package/skills/laravel-code-review/assets/report-template-full.md +0 -253
  146. package/skills/laravel-code-review/assets/report-template-human.md +0 -159
  147. package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
  148. package/skills/laravel-code-review/references/php84-features.md +0 -442
  149. package/skills/mcp-builder/LICENSE.txt +0 -202
  150. package/skills/mcp-builder/SKILL.md +0 -236
  151. package/skills/mcp-builder/reference/evaluation.md +0 -602
  152. package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
  153. package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
  154. package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
  155. package/skills/mcp-builder/scripts/connections.py +0 -151
  156. package/skills/mcp-builder/scripts/evaluation.py +0 -373
  157. package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
  158. package/skills/mcp-builder/scripts/requirements.txt +0 -2
  159. package/skills/meeting-notes/SKILL.md +0 -159
  160. package/skills/meeting-notes/evals/evals.json +0 -23
  161. package/skills/project-orchestrator/SKILL.md +0 -487
  162. package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
  163. package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
  164. package/skills/prompter-specs/SKILL.md +0 -115
  165. package/skills/prompter-workflow/SKILL.md +0 -166
  166. package/skills/prompter-workflow/evals/evals.json +0 -89
  167. package/skills/sph-generator/SKILL.md +0 -488
  168. package/skills/ui-ux-pro/SKILL.md +0 -199
  169. package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
  170. package/skills/ui-ux-pro/references/component-patterns.md +0 -255
  171. package/skills/ui-ux-pro/references/design-principles.md +0 -167
  172. package/src/cli/index.ts +0 -223
  173. package/src/commands/archive.ts +0 -302
  174. package/src/commands/change.ts +0 -292
  175. package/src/commands/config.ts +0 -233
  176. package/src/commands/guide.ts +0 -50
  177. package/src/commands/init.ts +0 -899
  178. package/src/commands/list.ts +0 -194
  179. package/src/commands/show.ts +0 -138
  180. package/src/commands/spec.ts +0 -251
  181. package/src/commands/update.ts +0 -156
  182. package/src/commands/upgrade.ts +0 -30
  183. package/src/commands/validate.ts +0 -326
  184. package/src/core/artifact-graph/graph.ts +0 -167
  185. package/src/core/artifact-graph/index.ts +0 -44
  186. package/src/core/artifact-graph/instruction-loader.ts +0 -302
  187. package/src/core/artifact-graph/resolver.ts +0 -226
  188. package/src/core/artifact-graph/schema.ts +0 -124
  189. package/src/core/artifact-graph/state.ts +0 -64
  190. package/src/core/artifact-graph/types.ts +0 -65
  191. package/src/core/completions/command-registry.ts +0 -382
  192. package/src/core/completions/completion-provider.ts +0 -128
  193. package/src/core/completions/generators/bash-generator.ts +0 -191
  194. package/src/core/completions/generators/fish-generator.ts +0 -188
  195. package/src/core/completions/generators/powershell-generator.ts +0 -223
  196. package/src/core/completions/generators/zsh-generator.ts +0 -281
  197. package/src/core/completions/templates/bash-templates.ts +0 -24
  198. package/src/core/completions/templates/fish-templates.ts +0 -40
  199. package/src/core/completions/templates/powershell-templates.ts +0 -25
  200. package/src/core/completions/templates/zsh-templates.ts +0 -36
  201. package/src/core/completions/types.ts +0 -90
  202. package/src/core/config-schema.ts +0 -230
  203. package/src/core/config.ts +0 -181
  204. package/src/core/configurators/slash/antigravity.ts +0 -70
  205. package/src/core/configurators/slash/base.ts +0 -203
  206. package/src/core/configurators/slash/claude.ts +0 -70
  207. package/src/core/configurators/slash/codex.ts +0 -70
  208. package/src/core/configurators/slash/droid.ts +0 -44
  209. package/src/core/configurators/slash/forge.ts +0 -44
  210. package/src/core/configurators/slash/github-copilot.ts +0 -114
  211. package/src/core/configurators/slash/index.ts +0 -10
  212. package/src/core/configurators/slash/kilocode.ts +0 -70
  213. package/src/core/configurators/slash/opencode.ts +0 -70
  214. package/src/core/configurators/slash/registry.ts +0 -51
  215. package/src/core/converters/json-converter.ts +0 -62
  216. package/src/core/global-config.ts +0 -136
  217. package/src/core/parsers/change-parser.ts +0 -234
  218. package/src/core/parsers/markdown-parser.ts +0 -237
  219. package/src/core/parsers/requirement-blocks.ts +0 -234
  220. package/src/core/prompt-templates.ts +0 -3504
  221. package/src/core/schemas/base.schema.ts +0 -20
  222. package/src/core/schemas/change.schema.ts +0 -42
  223. package/src/core/schemas/index.ts +0 -20
  224. package/src/core/schemas/spec.schema.ts +0 -17
  225. package/src/core/skill-discovery.ts +0 -68
  226. package/src/core/specs-apply.ts +0 -483
  227. package/src/core/styles/palette.ts +0 -8
  228. package/src/core/templates/agents-template.ts +0 -459
  229. package/src/core/templates/claude-template.ts +0 -2
  230. package/src/core/templates/index.ts +0 -4
  231. package/src/core/templates/project-template.ts +0 -32
  232. package/src/core/templates/slash-command-templates.ts +0 -1068
  233. package/src/core/validation/constants.ts +0 -48
  234. package/src/core/validation/types.ts +0 -19
  235. package/src/core/validation/validator.ts +0 -449
  236. package/src/core/view.ts +0 -219
  237. package/src/index.ts +0 -1
  238. package/src/utils/change-metadata.ts +0 -171
  239. package/src/utils/change-utils.ts +0 -131
  240. package/src/utils/file-system.ts +0 -252
  241. package/src/utils/index.ts +0 -12
  242. package/src/utils/interactive.ts +0 -29
  243. package/src/utils/item-discovery.ts +0 -66
  244. package/src/utils/match.ts +0 -26
  245. package/src/utils/shell-detection.ts +0 -62
  246. package/src/utils/task-progress.ts +0 -43
  247. package/tsconfig.json +0 -28
@@ -1,199 +0,0 @@
1
- ---
2
- name: ui-ux-pro
3
- description: Design and revise UI/UX like a senior designer. Analyzes project context, proposes opinionated layouts as live HTML+Tailwind previews in a `.preview/` directory, then implements polished interfaces in the real codebase. TRIGGER on new pages, redesigns, design audits, or component design where layout/hierarchy is in question. SKIP for small tweaks (color, spacing, copy, one-line CSS fixes), bug fixes to an already-approved layout, or backend/logic work — edit real code directly instead.
4
- ---
5
-
6
- # UI UX Pro
7
-
8
- Act as a senior UI/UX designer. Make opinionated design decisions based on project context. Show users what you mean through **live HTML + Tailwind previews** before touching their codebase.
9
-
10
- ---
11
-
12
- ## Critical Rules (Read First)
13
-
14
- The failure modes to internalize — full context lives in the Workflow section below:
15
-
16
- 1. **Diagnose redesigns yourself** — never ask "what feels wrong?" Surface findings, then yield for the user's reply before building.
17
- 2. **Low-fi before high-fi; preview before real code.** No skipping tiers.
18
- 3. **Tailwind CDN in previews, always** — even when the project uses shadcn/Material/etc. Previews stay disposable.
19
- 4. **Section comments required** — every major HTML block gets `<!-- Section: Name -->` so users can give spatial feedback without reading code.
20
- 5. **Default one variant with a stated recommendation.** Offer alternatives only if asked.
21
- 6. **Never auto-delete `.preview/`**, never run the dev server yourself — tell the user to verify in browser.
22
- 7. **Mobile, tablet, desktop from Pass 1.** A layout that breaks on mobile is not done.
23
-
24
- ---
25
-
26
- ## Workflow
27
-
28
- `Step 0: Read context → Step 1: Decide mock vs. edit → Step 2: Discovery → Step 3: Low-fi → [approval] → Step 4: High-fi → [approval] → Step 5: Implement → Step 6: Iterate`
29
-
30
- ---
31
-
32
- ## Step 0: Read Project Context (Silent)
33
-
34
- Before designing, silently gather — do not ask the user:
35
-
36
- - Read `AGENTS.md` and `CLAUDE.md` for tech stack and conventions
37
- - Detect CSS system: Tailwind, shadcn/Radix/Material/Chakra, vanilla CSS, CSS-in-JS
38
- - Scan for design tokens: CSS variables, theme files, color palettes, font stacks
39
- - Note the frontend framework: React, Vue, Svelte, Next, Laravel Blade, etc.
40
-
41
- ---
42
-
43
- ## Step 1: Decide Mock vs. Edit
44
-
45
- Before discovery, decide the path. **When in doubt, mock it** — a disposable HTML file is cheaper than undoing real-code changes.
46
-
47
- ### Build a preview (continue to Step 2):
48
- - New page or feature
49
- - Major redesign
50
- - Multiple directions are plausible
51
- - User is non-technical and needs to see before reacting
52
-
53
- ### Edit real code directly (skip to Step 5):
54
- - Small tweak (color, spacing, copy)
55
- - Fixing a specific bug the user pointed at
56
- - Adding one element to an already-approved layout
57
- - Developer user asking for a specific change
58
-
59
- ---
60
-
61
- ## Step 2: Discovery
62
-
63
- ### New designs
64
- Ask one combined question: *"What is this for — page/feature, audience, and goal? Any vibe or reference is optional."* Proceed regardless of whether they give a vibe.
65
-
66
- ### Redesigns and audits
67
- Do NOT ask open-ended questions. Most users cannot articulate design problems.
68
-
69
- 1. Silently analyze the existing page — read the code or screenshot
70
- 2. Present a short diagnostic (3–4 bullets, plain language):
71
- ```
72
- Here's what I noticed:
73
- - Weak hierarchy — CTA competes with secondary content
74
- - Inconsistent spacing — no clear scale
75
- - Low contrast on the action button (likely fails WCAG AA)
76
- - Font sizes too uniform — headlines don't feel distinct
77
- ```
78
- 3. Ask: *"Anything to keep, or a vibe/reference in mind? Say go and I'll start the low-fi."*
79
- 4. **Yield to the user here.** End your turn after the diagnostic + question. Do not continue into preview construction in the same turn.
80
-
81
- ### Never ask:
82
- - "What feels wrong?" — diagnose it yourself
83
- - "What should stay?" — infer from the existing design
84
- - "Which direction resonates?" — you pick
85
- - "What color scheme?" — derive from brand or propose one
86
- - Multiple-choice aesthetic menus — overwhelming for non-designers
87
-
88
- ---
89
-
90
- ## Step 3: Preview (REQUIRED Before Any Real Code)
91
-
92
- ### File structure
93
- ```
94
- .preview/
95
- ├── <feature>-lowfi.html # Pass 1: grayscale layout
96
- ├── <feature>-v1.html # Pass 2: high-fi (recommended)
97
- ├── <feature>-v2.html # Optional variation
98
- └── variations.html # Hub if multiple variants exist
99
- ```
100
-
101
- - Files must be standalone, openable with `file://`
102
- - Add `.preview/` to `.gitignore` if not ignored (ask first if repo tracks it). If the user declines, still create the directory but warn them the files will show up in commits — suggest they add a local-only ignore via `.git/info/exclude`.
103
-
104
- ### CSS in previews
105
- Always use Tailwind CDN (`<script src="https://cdn.tailwindcss.com"></script>`), even if the project uses shadcn/Material. If the project has brand tokens (CSS variables), inline them in a `<style>` block so colors/fonts match. The real implementation uses the project's actual design system — keep this separation clear.
106
-
107
- ### Pass 1: Low-fi (grayscale, structural)
108
- - Grays and neutrals only — no brand colors
109
- - System font only — no custom typography
110
- - No shadows, gradients, or decorative effects
111
- - Focus: layout, hierarchy, spacing, content flow
112
- - **Include basic responsive behavior** — at minimum, the layout must not break on mobile. Use Tailwind responsive prefixes (`sm:`, `md:`, `lg:`) from the start.
113
- - File: `<feature>-lowfi.html`
114
-
115
- Present, wait for layout approval before proceeding.
116
-
117
- ### Pass 2: High-fi (after low-fi is approved)
118
- - Apply brand colors, typography, shadows, borders
119
- - Add hover/focus states, responsive breakpoints
120
- - File: `<feature>-v1.html`
121
-
122
- ### Delegating to `frontend-design` Skill
123
- If the `frontend-design` skill is available in the session, delegate the actual HTML markup construction to it — pass your layout decisions, section structure, and brand tokens, let it produce the markup. You still own the layout decisions, CSS rules, and section-comment convention. If not available, build the markup yourself.
124
-
125
- ### Variations
126
- Default to one. Offer more only if the user asks, or if there is genuinely zero style signal to work from. Max 3. When building multiple, create a `variations.html` hub that links or iframes all variants side-by-side. Always mark one as **Recommended ⭐** with a one-line reason.
127
-
128
- ### Proposal message format
129
- ```
130
- ## Design Proposal: [Feature Name]
131
-
132
- **Approach:** [1-2 sentences on direction and why]
133
- **Preview:** `.preview/<feature>-lowfi.html` (open in browser)
134
-
135
- ### Key Decisions
136
- - [Decision]: [rationale]
137
-
138
- This is a throwaway mock — once approved I'll build it in your codebase using [design system].
139
- Does the layout work? I can adjust any section before moving to high-fi.
140
- ```
141
-
142
- ---
143
-
144
- ## Step 5: Implementation (After Preview Approved)
145
-
146
- ### Order
147
- 1. Layout structure and spacing
148
- 2. Typography and color
149
- 3. Component details — use the project's design system (shadcn, Material, etc.)
150
- 4. Interaction states — hover, focus, loading, error, empty
151
- 5. Responsive breakpoints
152
- 6. Dark mode — if the project supports theming
153
-
154
- Check in after each chunk: *"Layout done — moving to typography, or want to adjust anything?"*
155
- When done: tell the user to open the page in their browser to verify.
156
-
157
- ### Rules (see [design-principles.md](references/design-principles.md) for full catalog)
158
- - No gratuitous gradients, glassmorphism, or trend effects without purpose
159
- - Intentional border-radius — not `rounded-full` on everything
160
- - Typography does 80% of the work
161
- - Color: 1–2 primaries, 1 accent, rest neutrals
162
- - Transitions: 150–200ms for small elements, 300–400ms for layout shifts
163
- - Whitespace creates hierarchy
164
-
165
- ### Adapting existing design
166
- - Preserve brand colors, fonts, recognizable patterns
167
- - Use existing CSS variables and design tokens
168
- - Flag conflicts between the user's request and their design system; recommend the best path
169
-
170
- ---
171
-
172
- ## Step 6: Iteration
173
-
174
- | User says | You do |
175
- |---|---|
176
- | "I like it but…" | Targeted tweak in preview, preserve what works |
177
- | "It's not what I imagined" | Revise preview before touching real code |
178
- | "Can you try…" | Update preview, re-present |
179
- | "Perfect!" | Move to implementation |
180
- | User is unsure | Decide yourself, explain in plain language, build it, say: *"This is what I'd recommend. Tell me if something feels off."* |
181
-
182
- ---
183
-
184
- ## Edge Cases
185
-
186
- - **No existing design** — derive from project type and stack, propose a cohesive starting point
187
- - **Screenshot input** — analyze visually, recreate as HTML preview to confirm understanding before implementing
188
- - **Design system conflict** — flag it, recommend extending the system vs. one-off, explain trade-off
189
- - **Accessibility** — always meet WCAG AA; if a request fails it, explain and offer an accessible alternative
190
- - **Performance** — flag heavy animations, large images, complex CSS; suggest alternatives
191
- - **Dark mode** — if the project supports theming, include a dark-mode variant (toggle or separate file)
192
-
193
- ---
194
-
195
- ## Resources
196
-
197
- - **Design principles**: [design-principles.md](references/design-principles.md) — Anti-AI-look patterns and visual quality checklist
198
- - **Component patterns**: [component-patterns.md](references/component-patterns.md) — Component states, sizing, and interaction patterns
199
- - **Design spec template**: [design-spec-template.md](assets/design-spec-template.md) — Structured output template for design handoff
@@ -1,173 +0,0 @@
1
- # Design Specification — [Project / Feature Name]
2
-
3
- > Generated on [date] | Direction: [chosen direction name]
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- **Target:** [page / component / feature description]
10
- **Framework:** [React / Vue / Svelte / etc.]
11
- **CSS Approach:** [Tailwind / CSS Modules / styled-components / vanilla CSS]
12
-
13
- ---
14
-
15
- ## Design Tokens
16
-
17
- ### Colors
18
-
19
- | Token | Value | Use |
20
- |---|---|---|
21
- | `--color-primary` | | Primary actions, brand accent |
22
- | `--color-primary-hover` | | Primary hover state |
23
- | `--color-secondary` | | Secondary actions, supporting |
24
- | `--color-background` | | Page background |
25
- | `--color-surface` | | Card/panel backgrounds |
26
- | `--color-text` | | Body text |
27
- | `--color-text-muted` | | Secondary text, captions |
28
- | `--color-border` | | Borders, dividers |
29
- | `--color-success` | | Success states |
30
- | `--color-warning` | | Warning states |
31
- | `--color-error` | | Error states |
32
-
33
- ### Typography
34
-
35
- | Token | Value | Use |
36
- |---|---|---|
37
- | `--font-family-body` | | Body text, UI elements |
38
- | `--font-family-heading` | | Headings (if different from body) |
39
- | `--font-family-mono` | | Code, technical data |
40
- | `--text-xs` | 12px / 1.5 | Captions, badges |
41
- | `--text-sm` | 14px / 1.5 | Secondary text, labels |
42
- | `--text-base` | 16px / 1.6 | Body text |
43
- | `--text-lg` | 18px / 1.5 | Subheadings, emphasis |
44
- | `--text-xl` | 20px / 1.4 | Section headings |
45
- | `--text-2xl` | 24px / 1.3 | Page headings |
46
- | `--text-3xl` | 32px / 1.2 | Display, hero |
47
- | `--text-4xl` | 48px / 1.1 | Large display |
48
-
49
- ### Spacing
50
-
51
- Base unit: `[4px / 8px]`
52
-
53
- | Token | Value | Use |
54
- |---|---|---|
55
- | `--space-1` | 4px | Tight gaps, inline spacing |
56
- | `--space-2` | 8px | Component internal padding |
57
- | `--space-3` | 12px | Compact element gaps |
58
- | `--space-4` | 16px | Standard element spacing |
59
- | `--space-6` | 24px | Section internal padding |
60
- | `--space-8` | 32px | Section gaps |
61
- | `--space-12` | 48px | Major section separation |
62
- | `--space-16` | 64px | Page-level spacing |
63
-
64
- ### Borders & Radii
65
-
66
- | Token | Value | Use |
67
- |---|---|---|
68
- | `--border-width` | | Default border width |
69
- | `--border-color` | | Default border color |
70
- | `--radius-sm` | | Buttons, inputs, small elements |
71
- | `--radius-md` | | Cards, panels |
72
- | `--radius-lg` | | Modals, large containers |
73
- | `--radius-full` | | Avatars, pills |
74
-
75
- ### Shadows
76
-
77
- | Token | Value | Use |
78
- |---|---|---|
79
- | `--shadow-sm` | | Subtle depth (cards) |
80
- | `--shadow-md` | | Moderate elevation (dropdowns) |
81
- | `--shadow-lg` | | High elevation (modals, popovers) |
82
-
83
- ### Transitions
84
-
85
- | Token | Value | Use |
86
- |---|---|---|
87
- | `--transition-fast` | 150ms ease | Hover states, small elements |
88
- | `--transition-base` | 200ms ease | Standard transitions |
89
- | `--transition-slow` | 300ms ease-in-out | Layout changes, modals |
90
-
91
- ---
92
-
93
- ## Layout
94
-
95
- ### Page Structure
96
-
97
- ```
98
- [Describe or diagram the overall page layout]
99
- [Include breakpoint behavior]
100
- ```
101
-
102
- ### Grid / Container
103
-
104
- - Max width: [value]
105
- - Columns: [count at each breakpoint]
106
- - Gutter: [value]
107
- - Margin: [value at each breakpoint]
108
-
109
- ### Breakpoints
110
-
111
- | Name | Min Width | Layout Changes |
112
- |---|---|---|
113
- | Mobile | 0px | [describe] |
114
- | Tablet | 768px | [describe] |
115
- | Desktop | 1024px | [describe] |
116
- | Wide | 1280px | [describe] |
117
-
118
- ---
119
-
120
- ## Components
121
-
122
- ### [Component Name]
123
-
124
- **Purpose:** [what the component does]
125
-
126
- **Variants:**
127
- - [variant 1]: [description]
128
- - [variant 2]: [description]
129
-
130
- **States:**
131
- | State | Visual Treatment |
132
- |---|---|
133
- | Default | |
134
- | Hover | |
135
- | Focus | |
136
- | Active | |
137
- | Disabled | |
138
- | Loading | |
139
- | Error | |
140
-
141
- **Specs:**
142
- - Height: [value by size]
143
- - Padding: [values]
144
- - Font: [size, weight]
145
- - Border radius: [value]
146
- - Colors: [token references]
147
-
148
- ---
149
-
150
- ## Interaction Patterns
151
-
152
- ### [Interaction Name]
153
-
154
- **Trigger:** [click / hover / scroll / load]
155
- **Behavior:** [describe the interaction]
156
- **Duration:** [transition timing]
157
- **Easing:** [easing function]
158
-
159
- ---
160
-
161
- ## Accessibility Notes
162
-
163
- - [ ] All contrast ratios meet WCAG AA
164
- - [ ] Focus indicators are visible and styled
165
- - [ ] Interactive elements have accessible labels
166
- - [ ] Heading hierarchy is logical
167
- - [ ] Motion respects `prefers-reduced-motion`
168
-
169
- ---
170
-
171
- ## Implementation Notes
172
-
173
- [Any technical notes, caveats, or implementation-specific guidance]
@@ -1,255 +0,0 @@
1
- # Component Patterns — UI Interaction Best Practices
2
-
3
- Reference for designing common UI components with proper states, accessibility, and interaction patterns. Load when designing or reviewing specific components.
4
-
5
- ---
6
-
7
- ## Buttons
8
-
9
- ### Hierarchy
10
-
11
- Every interface needs a clear button hierarchy:
12
-
13
- | Level | Name | Use Case | Visual Treatment |
14
- |---|---|---|---|
15
- | 1 | Primary | Main action per section/page | Filled, brand color, high contrast |
16
- | 2 | Secondary | Supporting actions | Outlined or muted fill |
17
- | 3 | Tertiary / Ghost | Low-priority actions, cancel | Text-only or very subtle background |
18
- | 4 | Destructive | Delete, remove, irreversible | Red/danger color, confirm pattern |
19
- | 5 | Icon-only | Compact actions (close, menu, edit) | Icon with tooltip, adequate touch target |
20
-
21
- ### Required States
22
-
23
- Every button must handle:
24
- - **Default** — Resting state
25
- - **Hover** — Subtle background/shadow change (desktop)
26
- - **Focus** — Visible ring/outline for keyboard users (2px offset, contrasting color)
27
- - **Active/Pressed** — Slightly darker, subtle depression
28
- - **Disabled** — Reduced opacity (0.5-0.6), no pointer events, `aria-disabled`
29
- - **Loading** — Spinner or dots replacing text, button disabled during action
30
-
31
- ### Sizing
32
-
33
- | Size | Height | Padding (x) | Font Size | Use Case |
34
- |---|---|---|---|---|
35
- | sm | 32px | 12px | 13-14px | Dense UI, table actions, tag actions |
36
- | md | 40px | 16px | 14-15px | Standard forms, toolbars |
37
- | lg | 48px | 24px | 16px | Hero CTAs, mobile-first interfaces |
38
-
39
- ### Accessibility
40
- - Minimum touch target: 44×44px (even if visual size is smaller, pad the clickable area)
41
- - Always include accessible label (text content or `aria-label` for icon buttons)
42
- - Don't rely on color alone — icons or text should reinforce meaning
43
-
44
- ---
45
-
46
- ## Forms
47
-
48
- ### Input Fields
49
-
50
- **Required states:**
51
- - Default — Clear border, label above
52
- - Focus — Highlighted border (brand color), optional subtle shadow
53
- - Filled — Same as default but with content
54
- - Error — Red/danger border, error message below, `aria-invalid="true"`
55
- - Disabled — Muted background, reduced opacity
56
- - Read-only — No border/minimal border, text appears as content
57
-
58
- **Layout rules:**
59
- - Label above input (not beside, not as placeholder)
60
- - Placeholder text is supplementary, never the only label
61
- - Error messages appear below the input, in context
62
- - Help text appears below label or below input, not as tooltip
63
- - Group related fields (name + email, street + city + state)
64
-
65
- **Sizing:**
66
-
67
- | Size | Height | Font Size | Use Case |
68
- |---|---|---|---|
69
- | sm | 32px | 13-14px | Dense forms, admin panels |
70
- | md | 40px | 14-15px | Standard forms |
71
- | lg | 48px | 16px | Landing pages, mobile |
72
-
73
- ### Select / Dropdown
74
-
75
- - Show current selection in the trigger
76
- - Keyboard navigation: arrow keys, type-ahead, Enter to select, Escape to close
77
- - Long lists: include search/filter
78
- - Multi-select: use checkboxes inside dropdown, show count or tags in trigger
79
-
80
- ### Checkbox & Radio
81
-
82
- - Minimum 44×44px touch target (including label)
83
- - Label always to the right of the indicator
84
- - Checkbox: independent selections (multi-select)
85
- - Radio: mutually exclusive within a group
86
- - Indeterminate checkbox state for "select all" with partial selection
87
-
88
- ### Form Validation
89
-
90
- - **Inline validation**: Validate on blur (not on every keystroke)
91
- - **Submit validation**: Validate all fields, focus the first error, scroll if needed
92
- - **Error messaging**: Specific ("Email must include @") not generic ("Invalid input")
93
- - **Success feedback**: Brief confirmation, then move on — don't celebrate trivial actions
94
-
95
- ---
96
-
97
- ## Cards
98
-
99
- ### When to Use
100
- - Displaying a collection of items with mixed content (image + text + actions)
101
- - Content that can be browsed and compared
102
- - NOT for single content blocks or sequential content (use sections instead)
103
-
104
- ### Anatomy
105
- 1. **Media area** (optional) — Image, video, or illustration at top or left
106
- 2. **Header** — Title, subtitle, metadata
107
- 3. **Body** — Description or summary content
108
- 4. **Footer** (optional) — Actions, tags, or secondary metadata
109
-
110
- ### Interaction Patterns
111
- - **Clickable card**: Entire card is a link, hover shows elevation change
112
- - **Card with actions**: Card is not clickable, specific buttons/links inside are
113
- - **Never both**: Don't make the whole card clickable AND have buttons inside it
114
-
115
- ### States
116
- - Default, Hover (if clickable), Selected (in a selection context), Loading (skeleton)
117
-
118
- ---
119
-
120
- ## Navigation
121
-
122
- ### Top Navigation (Navbar)
123
-
124
- - Logo/brand on the left
125
- - Primary nav items horizontally centered or right-aligned
126
- - Active page indicator: bold text, underline, or background highlight
127
- - Mobile: hamburger menu (3 lines) → slide-out or full-screen overlay
128
- - Sticky/fixed: include subtle shadow or border when scrolled
129
- - Max 5-7 primary items; overflow into "More" dropdown
130
-
131
- ### Sidebar Navigation
132
-
133
- - Collapsible for more content space
134
- - Active item: filled background with brand color, or left border accent
135
- - Group items with section headers
136
- - Icons + labels in expanded state, icons-only in collapsed state with tooltips
137
- - Scroll independently from main content
138
-
139
- ### Breadcrumbs
140
-
141
- - Show current location in hierarchy
142
- - Each segment is a link except the current page
143
- - Separator: `/` or `>` or chevron icon
144
- - Truncate long paths: show first, `...`, last 2 segments
145
-
146
- ### Tabs
147
-
148
- - Horizontal for 2-5 options, vertical for 5+ or when labels are long
149
- - Active tab: bold/colored text + bottom border (horizontal) or left border (vertical)
150
- - Tab content switches without page reload
151
- - Keyboard: arrow keys to switch, Tab to enter content area
152
- - Don't nest tabs within tabs
153
-
154
- ---
155
-
156
- ## Modals & Dialogs
157
-
158
- ### When to Use
159
- - Confirming destructive actions
160
- - Short forms that don't warrant a new page (login, quick edit)
161
- - Displaying focused content that blocks the main flow
162
-
163
- ### When NOT to Use
164
- - Displaying information that could be inline
165
- - Long forms or multi-step flows (use a page instead)
166
- - Welcome messages or tutorials (use onboarding flows)
167
-
168
- ### Anatomy
169
- - **Overlay/backdrop**: Semi-transparent dark (rgba(0,0,0,0.4-0.6))
170
- - **Container**: Centered, max-width 480-640px, adequate padding (24-32px)
171
- - **Header**: Title + close button (X) in top-right
172
- - **Body**: Content area, scrollable if content overflows
173
- - **Footer**: Action buttons (primary right, cancel left)
174
-
175
- ### Interaction
176
- - Escape key closes the modal
177
- - Clicking backdrop closes (for non-critical modals) or doesn't (for confirmations)
178
- - Focus trapped inside modal (Tab cycles through modal elements only)
179
- - Return focus to trigger element on close
180
- - Prevent body scroll while modal is open
181
-
182
- ---
183
-
184
- ## Tables
185
-
186
- ### Best Practices
187
- - Align text left, numbers right
188
- - Header row: bold, subtle background, sticky on scroll
189
- - Zebra striping OR subtle horizontal borders (not both)
190
- - Minimum row height: 48px for touch, 36px for dense desktop
191
- - Sortable columns: show sort indicator (arrow up/down)
192
- - Pagination or virtual scroll for large datasets
193
-
194
- ### Responsive
195
- - Priority columns stay visible, secondary columns hide on mobile
196
- - Alternative: card-based layout on mobile instead of table
197
- - Horizontal scroll as a last resort (wrap in a scroll container with shadow indicators)
198
-
199
- ---
200
-
201
- ## Feedback & Status
202
-
203
- ### Toast / Snackbar
204
- - Brief messages (1-2 lines), auto-dismiss after 4-6 seconds
205
- - Position: bottom-center or top-right
206
- - Types: success (green), error (red), warning (amber), info (blue/neutral)
207
- - Include dismiss action and optional undo for destructive actions
208
- - Stack new toasts, don't replace existing ones
209
-
210
- ### Empty States
211
- - Illustration or icon (purposeful, not decorative)
212
- - Clear headline: what this area is for
213
- - Description: why it's empty
214
- - CTA: how to populate it
215
- - Don't just show a blank white space
216
-
217
- ### Loading States
218
- - **Skeleton screens** (preferred): Gray placeholder shapes matching content layout
219
- - **Spinner**: Only for short, indeterminate waits (< 3 seconds expected)
220
- - **Progress bar**: For determinate operations with known duration
221
- - **Inline loading**: Button spinner, input loading indicator
222
-
223
- ### Error States
224
- - Page-level: Friendly message + illustration, retry button, link to support
225
- - Inline: Red border, error text below the field, `aria-invalid`
226
- - Network: "Something went wrong" with retry, not a technical error dump
227
- - 404: Helpful redirect suggestions, search, home link
228
-
229
- ---
230
-
231
- ## Accessibility Essentials
232
-
233
- ### Color & Contrast
234
- - Body text: 4.5:1 contrast ratio minimum (WCAG AA)
235
- - Large text (18px+ or 14px+ bold): 3:1 minimum
236
- - Interactive elements: 3:1 against adjacent colors
237
- - Don't use color as the only indicator — pair with icons, text, or patterns
238
-
239
- ### Keyboard Navigation
240
- - All interactive elements focusable via Tab
241
- - Visible focus indicator (not just browser default — design a custom one)
242
- - Logical tab order matching visual layout
243
- - Escape closes overlays, Enter activates buttons/links
244
-
245
- ### Screen Readers
246
- - Meaningful alt text for informational images
247
- - Empty alt (`alt=""`) for decorative images
248
- - Proper heading hierarchy (h1 → h2 → h3, no skipping)
249
- - ARIA labels for icon-only buttons and complex widgets
250
- - Live regions for dynamic content updates (toast notifications, form errors)
251
-
252
- ### Motion
253
- - Respect `prefers-reduced-motion` — disable or simplify animations
254
- - No auto-playing video or audio without user control
255
- - Avoid rapid flashing (3 flashes per second max)