@dedesfr/prompter 0.7.8 → 0.8.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 (91) hide show
  1. package/AGENTS.md +18 -0
  2. package/CHANGELOG.md +40 -0
  3. package/CLAUDE.md +17 -0
  4. package/dist/cli/index.js +2 -1
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/commands/init.d.ts +4 -0
  7. package/dist/commands/init.d.ts.map +1 -1
  8. package/dist/commands/init.js +164 -1
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/update.d.ts.map +1 -1
  11. package/dist/commands/update.js +21 -0
  12. package/dist/commands/update.js.map +1 -1
  13. package/dist/core/config.d.ts.map +1 -1
  14. package/dist/core/config.js +3 -1
  15. package/dist/core/config.js.map +1 -1
  16. package/dist/core/configurators/slash/antigravity.d.ts +1 -0
  17. package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
  18. package/dist/core/configurators/slash/antigravity.js +3 -0
  19. package/dist/core/configurators/slash/antigravity.js.map +1 -1
  20. package/dist/core/configurators/slash/base.d.ts +18 -0
  21. package/dist/core/configurators/slash/base.d.ts.map +1 -1
  22. package/dist/core/configurators/slash/base.js +65 -0
  23. package/dist/core/configurators/slash/base.js.map +1 -1
  24. package/dist/core/configurators/slash/claude.d.ts +1 -0
  25. package/dist/core/configurators/slash/claude.d.ts.map +1 -1
  26. package/dist/core/configurators/slash/claude.js +3 -0
  27. package/dist/core/configurators/slash/claude.js.map +1 -1
  28. package/dist/core/configurators/slash/codex.d.ts +1 -0
  29. package/dist/core/configurators/slash/codex.d.ts.map +1 -1
  30. package/dist/core/configurators/slash/codex.js +3 -0
  31. package/dist/core/configurators/slash/codex.js.map +1 -1
  32. package/dist/core/configurators/slash/droid.d.ts +10 -0
  33. package/dist/core/configurators/slash/droid.d.ts.map +1 -0
  34. package/dist/core/configurators/slash/droid.js +39 -0
  35. package/dist/core/configurators/slash/droid.js.map +1 -0
  36. package/dist/core/configurators/slash/forge.d.ts +10 -0
  37. package/dist/core/configurators/slash/forge.d.ts.map +1 -0
  38. package/dist/core/configurators/slash/forge.js +39 -0
  39. package/dist/core/configurators/slash/forge.js.map +1 -0
  40. package/dist/core/configurators/slash/github-copilot.d.ts +1 -0
  41. package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
  42. package/dist/core/configurators/slash/github-copilot.js +3 -0
  43. package/dist/core/configurators/slash/github-copilot.js.map +1 -1
  44. package/dist/core/configurators/slash/index.d.ts +2 -0
  45. package/dist/core/configurators/slash/index.d.ts.map +1 -1
  46. package/dist/core/configurators/slash/index.js +2 -0
  47. package/dist/core/configurators/slash/index.js.map +1 -1
  48. package/dist/core/configurators/slash/kilocode.d.ts +1 -0
  49. package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
  50. package/dist/core/configurators/slash/kilocode.js +3 -0
  51. package/dist/core/configurators/slash/kilocode.js.map +1 -1
  52. package/dist/core/configurators/slash/opencode.d.ts +1 -0
  53. package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
  54. package/dist/core/configurators/slash/opencode.js +3 -0
  55. package/dist/core/configurators/slash/opencode.js.map +1 -1
  56. package/dist/core/configurators/slash/registry.d.ts.map +1 -1
  57. package/dist/core/configurators/slash/registry.js +6 -0
  58. package/dist/core/configurators/slash/registry.js.map +1 -1
  59. package/dist/core/skill-discovery.d.ts +12 -0
  60. package/dist/core/skill-discovery.d.ts.map +1 -0
  61. package/dist/core/skill-discovery.js +58 -0
  62. package/dist/core/skill-discovery.js.map +1 -0
  63. package/package.json +1 -1
  64. package/skills/design-system-generator/SKILL.md +324 -0
  65. package/skills/design-system-generator/assets/design-system-template.md +348 -0
  66. package/skills/design-system-generator/references/extraction-patterns.md +321 -0
  67. package/skills/laravel-code-review/SKILL.md +383 -0
  68. package/skills/laravel-code-review/assets/report-template-agent.md +195 -0
  69. package/skills/laravel-code-review/assets/report-template-compact.md +79 -0
  70. package/skills/laravel-code-review/assets/report-template-full.md +253 -0
  71. package/skills/laravel-code-review/assets/report-template-human.md +159 -0
  72. package/skills/laravel-code-review/references/laravel-patterns.md +571 -0
  73. package/skills/laravel-code-review/references/php84-features.md +442 -0
  74. package/src/cli/index.ts +2 -1
  75. package/src/commands/init.ts +182 -2
  76. package/src/commands/update.ts +22 -0
  77. package/src/core/config.ts +3 -1
  78. package/src/core/configurators/slash/antigravity.ts +4 -0
  79. package/src/core/configurators/slash/base.ts +95 -0
  80. package/src/core/configurators/slash/claude.ts +4 -0
  81. package/src/core/configurators/slash/codex.ts +4 -0
  82. package/src/core/configurators/slash/droid.ts +44 -0
  83. package/src/core/configurators/slash/forge.ts +44 -0
  84. package/src/core/configurators/slash/github-copilot.ts +4 -0
  85. package/src/core/configurators/slash/index.ts +2 -0
  86. package/src/core/configurators/slash/kilocode.ts +4 -0
  87. package/src/core/configurators/slash/opencode.ts +4 -0
  88. package/src/core/configurators/slash/registry.ts +6 -0
  89. package/src/core/skill-discovery.ts +68 -0
  90. package/.claude/settings.local.json +0 -7
  91. package/.github/prompts/prd-agent-generator.prompt.md +0 -133
@@ -0,0 +1,58 @@
1
+ import { promises as fs } from 'fs';
2
+ import path from 'path';
3
+ import yaml from 'yaml';
4
+ /**
5
+ * Discover skills in a directory by scanning for subdirectories containing SKILL.md files.
6
+ * Parses YAML frontmatter (name, description) and extracts the markdown body.
7
+ */
8
+ export async function discoverSkills(skillsDir) {
9
+ const skills = [];
10
+ let entries;
11
+ try {
12
+ entries = await fs.readdir(skillsDir, { withFileTypes: true });
13
+ }
14
+ catch {
15
+ return skills;
16
+ }
17
+ for (const entry of entries) {
18
+ if (!entry.isDirectory())
19
+ continue;
20
+ const skillDir = path.join(skillsDir, entry.name);
21
+ const skillMdPath = path.join(skillDir, 'SKILL.md');
22
+ try {
23
+ const content = await fs.readFile(skillMdPath, 'utf-8');
24
+ const parsed = parseSkillMd(content);
25
+ if (parsed) {
26
+ skills.push({
27
+ name: parsed.name,
28
+ description: parsed.description,
29
+ sourcePath: skillDir,
30
+ body: parsed.body
31
+ });
32
+ }
33
+ }
34
+ catch {
35
+ // SKILL.md not found or unreadable, skip this directory
36
+ }
37
+ }
38
+ return skills.sort((a, b) => a.name.localeCompare(b.name));
39
+ }
40
+ function parseSkillMd(content) {
41
+ const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);
42
+ if (!match)
43
+ return null;
44
+ try {
45
+ const meta = yaml.parse(match[1]);
46
+ if (!meta.name || !meta.description)
47
+ return null;
48
+ return {
49
+ name: String(meta.name),
50
+ description: String(meta.description),
51
+ body: match[2].trim()
52
+ };
53
+ }
54
+ catch {
55
+ return null;
56
+ }
57
+ }
58
+ //# sourceMappingURL=skill-discovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-discovery.js","sourceRoot":"","sources":["../../src/core/skill-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,SAAiB;IAClD,MAAM,MAAM,GAAoB,EAAE,CAAC;IAEnC,IAAI,OAA8B,CAAC;IACnC,IAAI,CAAC;QACD,OAAO,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YAAE,SAAS;QAEnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAClD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAEpD,IAAI,CAAC;YACD,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;YAErC,IAAI,MAAM,EAAE,CAAC;gBACT,MAAM,CAAC,IAAI,CAAC;oBACR,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,WAAW,EAAE,MAAM,CAAC,WAAW;oBAC/B,UAAU,EAAE,QAAQ;oBACpB,IAAI,EAAE,MAAM,CAAC,IAAI;iBACpB,CAAC,CAAC;YACP,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACL,wDAAwD;QAC5D,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,YAAY,CAAC,OAAe;IACjC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;IAC3E,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAC;QAEjD,OAAO;YACH,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YACvB,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;YACrC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;SACxB,CAAC;IACN,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedesfr/prompter",
3
- "version": "0.7.8",
3
+ "version": "0.8.0",
4
4
  "description": "Enhance prompts directly in your AI coding workflow",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,324 @@
1
+ ---
2
+ name: design-system-generator
3
+ description: Generate a structured design system document from HTML pages, React components, or screenshots. Extracts colors, typography, spacing, shadows, borders, breakpoints, and component patterns into a reusable design system specification. Use when creating a design system from existing UI, auditing design consistency, or bootstrapping a new project's design tokens from reference material.
4
+ ---
5
+
6
+ # Design System Generator
7
+
8
+ Analyze UI input (HTML, React, screenshots, or live URLs) and produce a comprehensive design system document with extracted design tokens and component patterns.
9
+
10
+ ## Quick Start
11
+
12
+ 1. **DETERMINE INPUT TYPE** — Ask user for source material (files, URLs, or screenshots)
13
+ 2. **COLLECT INPUT** — Read files, scrape URLs, or analyze screenshots
14
+ 3. **EXTRACT TOKENS** — Pull colors, typography, spacing, shadows, borders, radii, breakpoints
15
+ 4. **IDENTIFY COMPONENTS** — Catalog reusable UI components and their variants
16
+ 5. **GENERATE DOCUMENT** — Output design system using the template in `assets/design-system-template.md`
17
+ 6. **SAVE OUTPUT** — Write to user-specified path or default `prompter/design-system.md`
18
+
19
+ ---
20
+
21
+ ## Step 0: Determine Input Type (REQUIRED)
22
+
23
+ Present the following options:
24
+
25
+ ```
26
+ What source material should I analyze?
27
+
28
+ 1. **HTML file(s)** — Static HTML pages with inline/linked CSS
29
+ 2. **React component(s)** — JSX/TSX files with CSS/Tailwind/styled-components
30
+ 3. **Live URL** — Scrape a live webpage for design tokens
31
+ 4. **Screenshot(s)** — Analyze visual design from images
32
+ 5. **CSS/SCSS file(s)** — Extract tokens directly from stylesheets
33
+ 6. **Tailwind config** — Parse tailwind.config.js/ts for design tokens
34
+ 7. **Mixed** — Combination of the above
35
+
36
+ Please select (1-7) or describe your input:
37
+ ```
38
+
39
+ Wait for user response before proceeding.
40
+
41
+ ---
42
+
43
+ ## Step 1: Collect & Parse Input
44
+
45
+ ### For HTML Files
46
+ 1. Read the HTML file(s) with `read_file`
47
+ 2. Extract all `<style>` blocks and inline `style` attributes
48
+ 3. Identify linked stylesheets via `<link rel="stylesheet">` and read those files
49
+ 4. Note all CSS custom properties (`--var-name`) declarations
50
+
51
+ ### For React Components
52
+ 1. Read JSX/TSX file(s)
53
+ 2. Detect styling approach:
54
+ - **CSS Modules** → read associated `.module.css` files
55
+ - **Tailwind CSS** → read `tailwind.config.js/ts`, catalog utility classes used
56
+ - **Styled-components/Emotion** → extract template literals
57
+ - **Inline styles** → extract style objects
58
+ - **CSS-in-JS (other)** → extract theme objects
59
+ 3. Identify component props that affect visual appearance (variant, size, color)
60
+
61
+ ### For Live URLs
62
+ 1. Use the scrape tool with `formats: ["html"]` to fetch the page
63
+ 2. Also request `formats: ["branding"]` if available for automated brand extraction
64
+ 3. Parse the returned HTML as if it were an HTML file input
65
+
66
+ ### For Screenshots
67
+ 1. Analyze the image for visual design elements
68
+ 2. Extract approximate color values using visual analysis
69
+ 3. Identify typography patterns (relative sizes, weights)
70
+ 4. Note spacing patterns and layout structure
71
+ 5. Catalog visible UI components
72
+
73
+ ### For CSS/SCSS Files
74
+ 1. Read the stylesheet(s) directly
75
+ 2. Parse CSS custom properties, SCSS variables, mixins
76
+ 3. Extract all token-relevant declarations
77
+
78
+ ### For Tailwind Config
79
+ 1. Read `tailwind.config.js` or `tailwind.config.ts`
80
+ 2. Extract `theme.extend` and base `theme` values
81
+ 3. Map Tailwind tokens to design system categories
82
+
83
+ ---
84
+
85
+ ## Step 2: Extract Design Tokens
86
+
87
+ For detailed extraction patterns per CSS property, see [extraction-patterns.md](references/extraction-patterns.md).
88
+
89
+ Extract tokens in this order of priority:
90
+
91
+ ### 2.1 Colors
92
+ - Background colors, text colors, border colors
93
+ - Group into semantic categories: `primary`, `secondary`, `accent`, `neutral`, `success`, `warning`, `error`, `info`
94
+ - Identify color scales (50–950 shades) when present
95
+ - Extract opacity/alpha variants
96
+ - Note dark mode / alternate theme colors if detected
97
+
98
+ ### 2.2 Typography
99
+ - Font families (heading, body, mono)
100
+ - Font sizes (map to scale: xs, sm, base, lg, xl, 2xl, etc.)
101
+ - Font weights used
102
+ - Line heights
103
+ - Letter spacing
104
+ - Text transform patterns
105
+
106
+ ### 2.3 Spacing
107
+ - Padding and margin values used
108
+ - Gap values in flex/grid layouts
109
+ - Map to a consistent scale (0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24...)
110
+ - Identify base unit (commonly 4px or 8px)
111
+
112
+ ### 2.4 Layout & Breakpoints
113
+ - Container max-widths
114
+ - Media query breakpoints (sm, md, lg, xl, 2xl)
115
+ - Grid column counts and gutter widths
116
+
117
+ ### 2.5 Borders & Radii
118
+ - Border widths
119
+ - Border styles
120
+ - Border radius values (none, sm, md, lg, full)
121
+
122
+ ### 2.6 Shadows
123
+ - Box shadow definitions
124
+ - Map to elevation scale (sm, md, lg, xl)
125
+ - Note any colored or inset shadows
126
+
127
+ ### 2.7 Transitions & Animation
128
+ - Transition durations
129
+ - Easing functions
130
+ - Named animations/keyframes
131
+
132
+ ### 2.8 Z-Index Scale
133
+ - All z-index values used
134
+ - Assign semantic names (dropdown, modal, tooltip, etc.)
135
+
136
+ ---
137
+
138
+ ## Step 3: Identify Components
139
+
140
+ Catalog reusable UI patterns found in the input:
141
+
142
+ For each component, document:
143
+ - **Name** — PascalCase identifier
144
+ - **Variants** — visual or behavioral variations (e.g., `primary`, `outline`, `ghost`)
145
+ - **Sizes** — available size options (sm, md, lg)
146
+ - **States** — hover, focus, active, disabled appearances
147
+ - **Tokens used** — which design tokens the component references
148
+
149
+ Common components to look for:
150
+ - Button, Input, Select, Checkbox, Radio, Toggle
151
+ - Card, Badge, Tag, Avatar, Alert
152
+ - Modal, Dropdown, Tooltip, Popover
153
+ - Table, List, Tabs, Accordion
154
+ - Navigation (Navbar, Sidebar, Breadcrumb)
155
+ - Form layouts, Grid systems
156
+
157
+ ---
158
+
159
+ ## Step 4: Generate Design System Document
160
+
161
+ 1. Read the template: `assets/design-system-template.md`
162
+ 2. Fill in all extracted tokens and component documentation
163
+ 3. Apply these rules:
164
+ - **Deduplicate** — Merge identical or near-identical values
165
+ - **Normalize** — Convert all color values to hex (with HSL in comments)
166
+ - **Scale** — Organize values into logical scales where possible
167
+ - **Name** — Apply semantic names to raw values
168
+ - **Omit empty sections** — Remove sections with no extracted tokens
169
+
170
+ ### Output Formats
171
+
172
+ Offer the user a choice of output format:
173
+
174
+ ```
175
+ Which output format would you like?
176
+
177
+ 1. **Markdown** (default) — Structured document for documentation
178
+ 2. **CSS Variables** — Ready-to-use :root custom properties
179
+ 3. **Tailwind Config** — tailwind.config.js theme object
180
+ 4. **JSON Tokens** — Design token JSON (W3C format compatible)
181
+ 5. **All** — Generate all formats
182
+
183
+ Please select (1-5) or press Enter for Markdown:
184
+ ```
185
+
186
+ ### Markdown Output
187
+ - Use the template from `assets/design-system-template.md`
188
+ - Include color swatches using inline HTML: `<span style="background:COLOR;width:24px;height:24px;display:inline-block;border-radius:4px;vertical-align:middle"></span>`
189
+ - Save to user-specified path or `prompter/design-system.md`
190
+
191
+ ### CSS Variables Output
192
+ - Generate a `:root` block with all tokens as custom properties
193
+ - Use `--ds-` prefix for namespacing
194
+ - Group by category with comments
195
+ - Save to `design-tokens.css`
196
+
197
+ ### Tailwind Config Output
198
+ - Generate a `theme.extend` object with all tokens mapped
199
+ - Save to `design-tokens.tailwind.js`
200
+
201
+ ### JSON Tokens Output
202
+ - Follow W3C Design Tokens format where applicable
203
+ - Nest by category → token name → `{ value, type, description }`
204
+ - Save to `design-tokens.json`
205
+
206
+ ---
207
+
208
+ ## Step 5: Save & Report
209
+
210
+ After generating the document:
211
+
212
+ 1. Save to the specified output path (default: `prompter/design-system.md`)
213
+ 2. Update `AGENTS.md` files (see Step 6 below)
214
+ 3. Print a summary:
215
+
216
+ ```
217
+ ✅ Design System Generated
218
+
219
+ 📄 Output: <file-path>
220
+ 🎨 Colors: <count> tokens extracted
221
+ 🔤 Typography: <count> tokens extracted
222
+ 📐 Spacing: <count> tokens extracted
223
+ 🧩 Components: <count> identified
224
+ 📊 Source: <input-type description>
225
+
226
+ Next steps:
227
+ - Review and adjust token names for your conventions
228
+ - Add component usage examples as needed
229
+ - Import tokens into your project's theme configuration
230
+ ```
231
+
232
+ ---
233
+
234
+ ## Step 6: Update AGENTS.md Files (REQUIRED)
235
+
236
+ After saving the design system document, update both AGENTS.md files in the project so AI assistants know the design system exists and where to find it.
237
+
238
+ ### 6.1 Update root `AGENTS.md`
239
+
240
+ Check if `AGENTS.md` exists in the project root. If it does:
241
+
242
+ 1. Look for an existing "Design System" section — if found, update it; if not, add it.
243
+ 2. Also update the `prompter/` directory tree if one is shown (add `design-system.md` to it).
244
+
245
+ Add or update this block (place it near the Prompter Workflow or Output Location section):
246
+
247
+ ```markdown
248
+ ## Design System
249
+
250
+ A project-level design system is generated and maintained at `prompter/design-system.md`.
251
+
252
+ - Generated by the `design-system-generator` skill (`prompter/skills/design-system-generator/`)
253
+ - Contains design tokens: colors, typography, spacing, borders, shadows, breakpoints, and components
254
+ - Consult this file when building UI components or making styling decisions to ensure consistency
255
+ - Regenerate it by invoking the `design-system-generator` skill with updated source material
256
+ ```
257
+
258
+ If the root `AGENTS.md` has a directory tree like:
259
+
260
+ ```
261
+ prompter/
262
+ ├── project.md
263
+ └── ...
264
+ ```
265
+
266
+ Add `design-system.md` to it:
267
+
268
+ ```
269
+ prompter/
270
+ ├── project.md # Project context (edit this!)
271
+ ├── design-system.md # Generated design system (see Design System section)
272
+ └── ...
273
+ ```
274
+
275
+ ### 6.2 Update `prompter/AGENTS.md`
276
+
277
+ Check if `prompter/AGENTS.md` exists. If it does:
278
+
279
+ 1. In the **Directory Structure** section, add `design-system.md` to the `prompter/` tree if not already present:
280
+
281
+ ```
282
+ prompter/
283
+ ├── project.md # Project conventions
284
+ ├── design-system.md # Generated design system (colors, typography, spacing, components)
285
+ ├── specs/
286
+ ...
287
+ ```
288
+
289
+ 2. In the **Before Any Task** > **Context Checklist**, add this entry if not already present:
290
+
291
+ ```markdown
292
+ - [ ] Read `prompter/design-system.md` for UI/styling decisions (if task involves frontend)
293
+ ```
294
+
295
+ 3. After the checklist, add or update a **Design System** block if not already present:
296
+
297
+ ```markdown
298
+ **Design System:**
299
+
300
+ The project design system lives at `prompter/design-system.md`. It is generated by the `design-system-generator` skill and contains design tokens (colors, typography, spacing, borders, shadows, breakpoints) and component patterns.
301
+
302
+ - Consult it before building or modifying UI components to stay consistent with established tokens
303
+ - Regenerate it with the `design-system-generator` skill when the visual design changes significantly
304
+ ```
305
+
306
+ ### 6.3 Skip gracefully if files don't exist
307
+
308
+ If either AGENTS.md file does not exist in the target project, skip that file silently — do not create it.
309
+
310
+ ---
311
+
312
+ ## Edge Cases
313
+
314
+ - **Insufficient input**: If very little design information is extractable, note gaps and suggest what the user should provide additionally
315
+ - **Conflicting values**: When similar but not identical values exist (e.g., `#333` and `#2d2d2d`), consolidate and note the original values
316
+ - **No components found**: If input is pure CSS variables or a config file, skip the Components section
317
+ - **Screenshot-only input**: Mark all extracted values as "approximate" and recommend verification
318
+
319
+ ---
320
+
321
+ ## Resources
322
+
323
+ - **Template**: [design-system-template.md](assets/design-system-template.md) — Output document template
324
+ - **Extraction patterns**: [extraction-patterns.md](references/extraction-patterns.md) — CSS property-to-token mapping rules and regex patterns