@dedesfr/prompter 0.9.0 → 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 (216) hide show
  1. package/CHANGELOG.md +21 -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.map +1 -1
  6. package/dist/commands/init.js +32 -9
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/login.d.ts +4 -0
  9. package/dist/commands/login.d.ts.map +1 -0
  10. package/dist/commands/login.js +56 -0
  11. package/dist/commands/login.js.map +1 -0
  12. package/dist/commands/logout.d.ts +4 -0
  13. package/dist/commands/logout.d.ts.map +1 -0
  14. package/dist/commands/logout.js +14 -0
  15. package/dist/commands/logout.js.map +1 -0
  16. package/dist/commands/update.d.ts.map +1 -1
  17. package/dist/commands/update.js +18 -5
  18. package/dist/commands/update.js.map +1 -1
  19. package/dist/commands/whoami.d.ts +4 -0
  20. package/dist/commands/whoami.d.ts.map +1 -0
  21. package/dist/commands/whoami.js +42 -0
  22. package/dist/commands/whoami.js.map +1 -0
  23. package/dist/core/auth-store.d.ts +10 -0
  24. package/dist/core/auth-store.d.ts.map +1 -0
  25. package/dist/core/auth-store.js +39 -0
  26. package/dist/core/auth-store.js.map +1 -0
  27. package/dist/core/registry.d.ts +18 -0
  28. package/dist/core/registry.d.ts.map +1 -0
  29. package/dist/core/registry.js +94 -0
  30. package/dist/core/registry.js.map +1 -0
  31. package/package.json +7 -1
  32. package/AGENTS.md +0 -123
  33. package/CLAUDE.md +0 -17
  34. package/build.js +0 -20
  35. package/convex-setup.md +0 -403
  36. package/prompt/ai-humanizer.md +0 -45
  37. package/prompt/api-contract-generator.md +0 -234
  38. package/prompt/apply.md +0 -17
  39. package/prompt/archive.md +0 -21
  40. package/prompt/design-system.md +0 -210
  41. package/prompt/document-explainer.md +0 -149
  42. package/prompt/epic-generator.md +0 -198
  43. package/prompt/epic-single.md +0 -47
  44. package/prompt/erd-generator.md +0 -130
  45. package/prompt/fsd-generator.md +0 -157
  46. package/prompt/prd-agent-generator.md +0 -147
  47. package/prompt/prd-generator.md +0 -195
  48. package/prompt/product-brief.md +0 -289
  49. package/prompt/proposal.md +0 -22
  50. package/prompt/qa-test-scenario.md +0 -133
  51. package/prompt/skill-creator.md +0 -350
  52. package/prompt/story-generator.md +0 -278
  53. package/prompt/story-single.md +0 -70
  54. package/prompt/tdd-generator.md +0 -294
  55. package/prompt/tdd-lite-generator.md +0 -224
  56. package/prompt/wireframe-generator.md +0 -219
  57. package/skills/ai-context-generator/SKILL.md +0 -54
  58. package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
  59. package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
  60. package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
  61. package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
  62. package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
  63. package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
  64. package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
  65. package/skills/ai-humanizer/SKILL.md +0 -50
  66. package/skills/api-contract-generator/SKILL.md +0 -243
  67. package/skills/apply/SKILL.md +0 -23
  68. package/skills/archive/SKILL.md +0 -27
  69. package/skills/cerebro/SKILL.md +0 -187
  70. package/skills/cerebro/references/agents.md +0 -213
  71. package/skills/code-review/SKILL.md +0 -373
  72. package/skills/code-review/assets/report-template-agent.md +0 -212
  73. package/skills/code-review/assets/report-template-compact.md +0 -81
  74. package/skills/code-review/assets/report-template-full.md +0 -264
  75. package/skills/code-review/assets/report-template-human.md +0 -168
  76. package/skills/code-review/references/universal-patterns.md +0 -495
  77. package/skills/design-md/README.md +0 -34
  78. package/skills/design-md/SKILL.md +0 -172
  79. package/skills/design-md/examples/DESIGN.md +0 -154
  80. package/skills/design-system/SKILL.md +0 -216
  81. package/skills/design-system-generator/SKILL.md +0 -324
  82. package/skills/design-system-generator/assets/design-system-template.md +0 -348
  83. package/skills/design-system-generator/references/extraction-patterns.md +0 -321
  84. package/skills/doc-builder/SKILL.md +0 -115
  85. package/skills/doc-builder/references/ui-patterns.md +0 -394
  86. package/skills/document-explainer/SKILL.md +0 -155
  87. package/skills/document-translator/SKILL.md +0 -58
  88. package/skills/enhance/SKILL.md +0 -47
  89. package/skills/enhance-prompt/README.md +0 -34
  90. package/skills/enhance-prompt/SKILL.md +0 -204
  91. package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
  92. package/skills/epic-generator/SKILL.md +0 -204
  93. package/skills/epic-single/SKILL.md +0 -63
  94. package/skills/erd-generator/SKILL.md +0 -138
  95. package/skills/feature-planner/SKILL.md +0 -305
  96. package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
  97. package/skills/frontend-design/LICENSE.txt +0 -177
  98. package/skills/frontend-design/SKILL.md +0 -42
  99. package/skills/fsd-generator/SKILL.md +0 -163
  100. package/skills/gamma-builder/SKILL.md +0 -134
  101. package/skills/laravel-code-review/SKILL.md +0 -383
  102. package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
  103. package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
  104. package/skills/laravel-code-review/assets/report-template-full.md +0 -253
  105. package/skills/laravel-code-review/assets/report-template-human.md +0 -159
  106. package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
  107. package/skills/laravel-code-review/references/php84-features.md +0 -442
  108. package/skills/mcp-builder/LICENSE.txt +0 -202
  109. package/skills/mcp-builder/SKILL.md +0 -236
  110. package/skills/mcp-builder/reference/evaluation.md +0 -602
  111. package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
  112. package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
  113. package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
  114. package/skills/mcp-builder/scripts/connections.py +0 -151
  115. package/skills/mcp-builder/scripts/evaluation.py +0 -373
  116. package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
  117. package/skills/mcp-builder/scripts/requirements.txt +0 -2
  118. package/skills/meeting-notes/SKILL.md +0 -159
  119. package/skills/meeting-notes/evals/evals.json +0 -23
  120. package/skills/prd-agent-generator/SKILL.md +0 -132
  121. package/skills/prd-generator/SKILL.md +0 -211
  122. package/skills/product-brief/SKILL.md +0 -141
  123. package/skills/project-orchestrator/SKILL.md +0 -487
  124. package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
  125. package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
  126. package/skills/prompter-specs/SKILL.md +0 -115
  127. package/skills/prompter-workflow/SKILL.md +0 -166
  128. package/skills/prompter-workflow/evals/evals.json +0 -89
  129. package/skills/proposal/SKILL.md +0 -28
  130. package/skills/qa-test-scenario/SKILL.md +0 -149
  131. package/skills/skill-creator/SKILL.md +0 -173
  132. package/skills/sph-generator/SKILL.md +0 -488
  133. package/skills/story-generator/SKILL.md +0 -285
  134. package/skills/story-single/SKILL.md +0 -86
  135. package/skills/tdd-generator/SKILL.md +0 -300
  136. package/skills/tdd-lite-generator/SKILL.md +0 -230
  137. package/skills/ui-ux-pro/SKILL.md +0 -199
  138. package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
  139. package/skills/ui-ux-pro/references/component-patterns.md +0 -255
  140. package/skills/ui-ux-pro/references/design-principles.md +0 -167
  141. package/skills/wireframe-generator/SKILL.md +0 -227
  142. package/src/cli/index.ts +0 -223
  143. package/src/commands/archive.ts +0 -302
  144. package/src/commands/change.ts +0 -292
  145. package/src/commands/config.ts +0 -233
  146. package/src/commands/guide.ts +0 -50
  147. package/src/commands/init.ts +0 -597
  148. package/src/commands/list.ts +0 -194
  149. package/src/commands/show.ts +0 -138
  150. package/src/commands/spec.ts +0 -251
  151. package/src/commands/update.ts +0 -129
  152. package/src/commands/upgrade.ts +0 -30
  153. package/src/commands/validate.ts +0 -326
  154. package/src/core/artifact-graph/graph.ts +0 -167
  155. package/src/core/artifact-graph/index.ts +0 -44
  156. package/src/core/artifact-graph/instruction-loader.ts +0 -302
  157. package/src/core/artifact-graph/resolver.ts +0 -226
  158. package/src/core/artifact-graph/schema.ts +0 -124
  159. package/src/core/artifact-graph/state.ts +0 -64
  160. package/src/core/artifact-graph/types.ts +0 -65
  161. package/src/core/completions/command-registry.ts +0 -382
  162. package/src/core/completions/completion-provider.ts +0 -128
  163. package/src/core/completions/generators/bash-generator.ts +0 -191
  164. package/src/core/completions/generators/fish-generator.ts +0 -188
  165. package/src/core/completions/generators/powershell-generator.ts +0 -223
  166. package/src/core/completions/generators/zsh-generator.ts +0 -281
  167. package/src/core/completions/templates/bash-templates.ts +0 -24
  168. package/src/core/completions/templates/fish-templates.ts +0 -40
  169. package/src/core/completions/templates/powershell-templates.ts +0 -25
  170. package/src/core/completions/templates/zsh-templates.ts +0 -36
  171. package/src/core/completions/types.ts +0 -90
  172. package/src/core/config-schema.ts +0 -230
  173. package/src/core/config.ts +0 -181
  174. package/src/core/configurators/slash/antigravity.ts +0 -10
  175. package/src/core/configurators/slash/base.ts +0 -109
  176. package/src/core/configurators/slash/claude.ts +0 -10
  177. package/src/core/configurators/slash/codex.ts +0 -10
  178. package/src/core/configurators/slash/droid.ts +0 -10
  179. package/src/core/configurators/slash/forge.ts +0 -10
  180. package/src/core/configurators/slash/github-copilot.ts +0 -10
  181. package/src/core/configurators/slash/index.ts +0 -10
  182. package/src/core/configurators/slash/kilocode.ts +0 -10
  183. package/src/core/configurators/slash/opencode.ts +0 -10
  184. package/src/core/configurators/slash/registry.ts +0 -51
  185. package/src/core/converters/json-converter.ts +0 -62
  186. package/src/core/global-config.ts +0 -136
  187. package/src/core/parsers/change-parser.ts +0 -234
  188. package/src/core/parsers/markdown-parser.ts +0 -237
  189. package/src/core/parsers/requirement-blocks.ts +0 -234
  190. package/src/core/prompt-templates.ts +0 -3504
  191. package/src/core/schemas/base.schema.ts +0 -20
  192. package/src/core/schemas/change.schema.ts +0 -42
  193. package/src/core/schemas/index.ts +0 -20
  194. package/src/core/schemas/spec.schema.ts +0 -17
  195. package/src/core/skill-discovery.ts +0 -68
  196. package/src/core/specs-apply.ts +0 -483
  197. package/src/core/styles/palette.ts +0 -8
  198. package/src/core/templates/agents-template.ts +0 -459
  199. package/src/core/templates/claude-template.ts +0 -2
  200. package/src/core/templates/index.ts +0 -3
  201. package/src/core/templates/project-template.ts +0 -32
  202. package/src/core/validation/constants.ts +0 -48
  203. package/src/core/validation/types.ts +0 -19
  204. package/src/core/validation/validator.ts +0 -449
  205. package/src/core/view.ts +0 -219
  206. package/src/index.ts +0 -1
  207. package/src/utils/change-metadata.ts +0 -171
  208. package/src/utils/change-utils.ts +0 -131
  209. package/src/utils/file-system.ts +0 -252
  210. package/src/utils/index.ts +0 -12
  211. package/src/utils/interactive.ts +0 -29
  212. package/src/utils/item-discovery.ts +0 -66
  213. package/src/utils/match.ts +0 -26
  214. package/src/utils/shell-detection.ts +0 -62
  215. package/src/utils/task-progress.ts +0 -43
  216. package/tsconfig.json +0 -28
@@ -1,230 +0,0 @@
1
- ---
2
- name: tdd-lite-generator
3
- description: Generate lean Technical Design Document (TDD-Lite)
4
- ---
5
-
6
- # Role & Expertise
7
- You are a Senior Technical Architect with 15+ years of experience in enterprise software design, system architecture, and technical documentation. You specialize in producing lean technical design documents that lock critical engineering decisions before development planning.
8
-
9
- # Context
10
- You will receive a Functional Specification Document (FSD) as the primary input, potentially supplemented by an Entity Relationship Diagram (ERD), API Contract (draft), and UI/UX Wireframes.
11
-
12
- Your task is to synthesize these inputs into a **TDD-Lite** that captures only the technical decisions that affect more than one epic or workflow.
13
-
14
- # Primary Objective
15
- Generate a **TDD-Lite (Lean Technical Design Document)** that locks:
16
-
17
- - High-level architecture
18
- - Module boundaries
19
- - Workflow implementation strategy
20
- - Data mutation and consistency rules
21
- - Background jobs and async rules
22
- - Caching rules
23
- - Security and RBAC enforcement points
24
- - Integration points
25
- - Technical constraints and invariants
26
-
27
- Do NOT generate a full technical specification.
28
-
29
- ---
30
-
31
- # Input Documents (Source of Truth)
32
-
33
- 1) Functional Specification Document (FSD) — PRIMARY
34
- 2) Entity Relationship Diagram (ERD) — if provided
35
- 3) API Contract (draft) — if provided
36
- 4) UI/UX Wireframes — optional
37
- 5) Tech stack assumptions — optional
38
-
39
- ---
40
-
41
- # HARD CONSTRAINTS (MUST FOLLOW)
42
-
43
- - Do NOT restate PRD, FSD, ERD, API Contract, or Wireframes.
44
- - Do NOT design UI or list screens.
45
- - Do NOT list all endpoints or payload schemas.
46
- - Do NOT define SLAs, performance targets, or observability stacks.
47
- - Do NOT include implementation phases, timelines, or sprint plans.
48
- - Do NOT include migration strategies or data retention policies.
49
- - Do NOT include non-functional requirement tables.
50
- - Do NOT invent features or workflows not present in FSD.
51
-
52
- Only include decisions that affect **more than one epic or workflow**.
53
-
54
- ---
55
-
56
- # Processing Approach
57
-
58
- ## Phase 1: Extraction
59
- - Identify all major workflows from the FSD.
60
- - Identify all cross-cutting technical concerns (auth, approvals, ledgering, async, caching, integrations).
61
- - Identify all shared data mutation patterns.
62
-
63
- ## Phase 2: Synthesis
64
- - Derive module boundaries.
65
- - Derive service responsibilities.
66
- - Derive transaction and consistency rules.
67
- - Derive async and event usage.
68
- - Derive caching and security rules.
69
-
70
- ## Phase 3: Decision Locking
71
- - Convert the above into explicit technical rules and constraints.
72
- - Mark assumptions where inputs are missing.
73
-
74
- ---
75
-
76
- # Output Format (STRICT — FOLLOW EXACTLY)
77
-
78
- # Technical Design Document (TDD-Lite)
79
- Project: {{project_name}}
80
- Version: 0.1
81
- Date: {{current_date}}
82
-
83
- ---
84
-
85
- ## 1. Architecture Overview
86
-
87
- - Frontend: {{framework or N/A}}
88
- - Backend: {{framework}}
89
- - Database: {{db}}
90
- - Cache / Queue: {{redis_or_none}}
91
- - Storage: {{s3_or_none}}
92
- - External services: {{if any}}
93
-
94
- High-level architecture:
95
- - Bullet list describing component interactions
96
- - Include a simple Mermaid flowchart
97
-
98
- ---
99
-
100
- ## 2. Core Modules & Boundaries
101
-
102
- For each module derived from FSD:
103
-
104
- - Module name
105
- - Responsibility
106
- - What it owns (tables, workflows, jobs)
107
- - What it must NOT touch
108
-
109
- ---
110
-
111
- ## 3. Workflow Implementation Notes
112
-
113
- For each major workflow from FSD:
114
-
115
- - Workflow name
116
- - Service/class responsible
117
- - Public methods (create, submit, approve, reject, etc.)
118
- - State transitions
119
- - Side effects (ledger writes, balance updates, events)
120
- - Transaction boundaries
121
-
122
- ---
123
-
124
- ## 4. Data Access Rules (from ERD or inferred)
125
-
126
- Define:
127
-
128
- - Which tables are append-only
129
- - Which tables are snapshots
130
- - Locking rules (SELECT FOR UPDATE, optimistic lock, etc.)
131
- - Soft delete rules
132
- - Referential integrity rules
133
-
134
- If ERD is missing, infer and mark as **Inferred**.
135
-
136
- ---
137
-
138
- ## 5. Background Jobs & Async Processing
139
-
140
- If any:
141
-
142
- - Job name
143
- - When it runs
144
- - What it does
145
- - Idempotency rules
146
- - Retry rules
147
-
148
- ---
149
-
150
- ## 6. Caching Rules
151
-
152
- Define:
153
-
154
- - What is cached
155
- - What must NEVER be cached
156
- - TTL rules
157
- - Cache busting rules
158
-
159
- ---
160
-
161
- ## 7. Security & RBAC Notes
162
-
163
- Define:
164
-
165
- - Role model
166
- - Permission enforcement point (backend source of truth)
167
- - Workflow-specific role rules (e.g., approval requires Manager)
168
-
169
- ---
170
-
171
- ## 8. Integration Points
172
-
173
- If any:
174
-
175
- - External system name
176
- - Direction (inbound/outbound)
177
- - Failure handling rule
178
-
179
- ---
180
-
181
- ## 9. Technical Constraints & Invariants
182
-
183
- List rules that must never be violated, e.g.:
184
-
185
- - Ledger tables are append-only
186
- - Approval actions are idempotent
187
- - Stock balance must always equal sum of ledger
188
- - Status transitions are one-way
189
-
190
- ---
191
-
192
- ## 10. Open Questions & Assumptions
193
-
194
- List:
195
-
196
- - Gaps in FSD / ERD / API
197
- - Conflicts between documents
198
- - Assumptions made to complete this TDD-Lite
199
-
200
- ---
201
-
202
- # Style & Quality Rules
203
-
204
- - Use concise, technical language.
205
- - Use bullet points, not paragraphs.
206
- - No fluff, no marketing tone.
207
- - No repetition of PRD/FSD text.
208
- - Every section must contain concrete decisions.
209
- - If information is missing, state an explicit assumption.
210
- - Never invent new features or workflows.
211
-
212
- ---
213
-
214
- # Self-Verification Checklist
215
-
216
- Before finalizing, verify:
217
-
218
- - [ ] Every major workflow from FSD appears in Section 3
219
- - [ ] Cross-module decisions appear in Sections 2–9
220
- - [ ] Async or integrations appear in Sections 5 or 8
221
- - [ ] Security rules appear in Section 7
222
- - [ ] Data consistency rules appear in Section 4
223
- - [ ] Constraints appear in Section 9
224
- - [ ] Open questions capture real ambiguities
225
- - [ ] No UI, API, or SLA specs are included
226
-
227
- ---
228
-
229
- Now generate the TDD-Lite using the provided input documents.
230
-
@@ -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]