@dedesfr/prompter 0.9.0 → 1.1.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 (225) hide show
  1. package/CHANGELOG.md +35 -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 +35 -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 +0 -2
  17. package/dist/commands/update.d.ts.map +1 -1
  18. package/dist/commands/update.js +19 -48
  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/config.d.ts +0 -7
  29. package/dist/core/config.d.ts.map +1 -1
  30. package/dist/core/config.js +0 -128
  31. package/dist/core/config.js.map +1 -1
  32. package/dist/core/registry.d.ts +18 -0
  33. package/dist/core/registry.d.ts.map +1 -0
  34. package/dist/core/registry.js +94 -0
  35. package/dist/core/registry.js.map +1 -0
  36. package/package.json +7 -1
  37. package/AGENTS.md +0 -123
  38. package/CLAUDE.md +0 -17
  39. package/build.js +0 -20
  40. package/convex-setup.md +0 -403
  41. package/dist/core/prompt-templates.d.ts +0 -23
  42. package/dist/core/prompt-templates.d.ts.map +0 -1
  43. package/dist/core/prompt-templates.js +0 -3485
  44. package/dist/core/prompt-templates.js.map +0 -1
  45. package/prompt/ai-humanizer.md +0 -45
  46. package/prompt/api-contract-generator.md +0 -234
  47. package/prompt/apply.md +0 -17
  48. package/prompt/archive.md +0 -21
  49. package/prompt/design-system.md +0 -210
  50. package/prompt/document-explainer.md +0 -149
  51. package/prompt/epic-generator.md +0 -198
  52. package/prompt/epic-single.md +0 -47
  53. package/prompt/erd-generator.md +0 -130
  54. package/prompt/fsd-generator.md +0 -157
  55. package/prompt/prd-agent-generator.md +0 -147
  56. package/prompt/prd-generator.md +0 -195
  57. package/prompt/product-brief.md +0 -289
  58. package/prompt/proposal.md +0 -22
  59. package/prompt/qa-test-scenario.md +0 -133
  60. package/prompt/skill-creator.md +0 -350
  61. package/prompt/story-generator.md +0 -278
  62. package/prompt/story-single.md +0 -70
  63. package/prompt/tdd-generator.md +0 -294
  64. package/prompt/tdd-lite-generator.md +0 -224
  65. package/prompt/wireframe-generator.md +0 -219
  66. package/skills/ai-context-generator/SKILL.md +0 -54
  67. package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
  68. package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
  69. package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
  70. package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
  71. package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
  72. package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
  73. package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
  74. package/skills/ai-humanizer/SKILL.md +0 -50
  75. package/skills/api-contract-generator/SKILL.md +0 -243
  76. package/skills/apply/SKILL.md +0 -23
  77. package/skills/archive/SKILL.md +0 -27
  78. package/skills/cerebro/SKILL.md +0 -187
  79. package/skills/cerebro/references/agents.md +0 -213
  80. package/skills/code-review/SKILL.md +0 -373
  81. package/skills/code-review/assets/report-template-agent.md +0 -212
  82. package/skills/code-review/assets/report-template-compact.md +0 -81
  83. package/skills/code-review/assets/report-template-full.md +0 -264
  84. package/skills/code-review/assets/report-template-human.md +0 -168
  85. package/skills/code-review/references/universal-patterns.md +0 -495
  86. package/skills/design-md/README.md +0 -34
  87. package/skills/design-md/SKILL.md +0 -172
  88. package/skills/design-md/examples/DESIGN.md +0 -154
  89. package/skills/design-system/SKILL.md +0 -216
  90. package/skills/design-system-generator/SKILL.md +0 -324
  91. package/skills/design-system-generator/assets/design-system-template.md +0 -348
  92. package/skills/design-system-generator/references/extraction-patterns.md +0 -321
  93. package/skills/doc-builder/SKILL.md +0 -115
  94. package/skills/doc-builder/references/ui-patterns.md +0 -394
  95. package/skills/document-explainer/SKILL.md +0 -155
  96. package/skills/document-translator/SKILL.md +0 -58
  97. package/skills/enhance/SKILL.md +0 -47
  98. package/skills/enhance-prompt/README.md +0 -34
  99. package/skills/enhance-prompt/SKILL.md +0 -204
  100. package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
  101. package/skills/epic-generator/SKILL.md +0 -204
  102. package/skills/epic-single/SKILL.md +0 -63
  103. package/skills/erd-generator/SKILL.md +0 -138
  104. package/skills/feature-planner/SKILL.md +0 -305
  105. package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
  106. package/skills/frontend-design/LICENSE.txt +0 -177
  107. package/skills/frontend-design/SKILL.md +0 -42
  108. package/skills/fsd-generator/SKILL.md +0 -163
  109. package/skills/gamma-builder/SKILL.md +0 -134
  110. package/skills/laravel-code-review/SKILL.md +0 -383
  111. package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
  112. package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
  113. package/skills/laravel-code-review/assets/report-template-full.md +0 -253
  114. package/skills/laravel-code-review/assets/report-template-human.md +0 -159
  115. package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
  116. package/skills/laravel-code-review/references/php84-features.md +0 -442
  117. package/skills/mcp-builder/LICENSE.txt +0 -202
  118. package/skills/mcp-builder/SKILL.md +0 -236
  119. package/skills/mcp-builder/reference/evaluation.md +0 -602
  120. package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
  121. package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
  122. package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
  123. package/skills/mcp-builder/scripts/connections.py +0 -151
  124. package/skills/mcp-builder/scripts/evaluation.py +0 -373
  125. package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
  126. package/skills/mcp-builder/scripts/requirements.txt +0 -2
  127. package/skills/meeting-notes/SKILL.md +0 -159
  128. package/skills/meeting-notes/evals/evals.json +0 -23
  129. package/skills/prd-agent-generator/SKILL.md +0 -132
  130. package/skills/prd-generator/SKILL.md +0 -211
  131. package/skills/product-brief/SKILL.md +0 -141
  132. package/skills/project-orchestrator/SKILL.md +0 -487
  133. package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
  134. package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
  135. package/skills/prompter-specs/SKILL.md +0 -115
  136. package/skills/prompter-workflow/SKILL.md +0 -166
  137. package/skills/prompter-workflow/evals/evals.json +0 -89
  138. package/skills/proposal/SKILL.md +0 -28
  139. package/skills/qa-test-scenario/SKILL.md +0 -149
  140. package/skills/skill-creator/SKILL.md +0 -173
  141. package/skills/sph-generator/SKILL.md +0 -488
  142. package/skills/story-generator/SKILL.md +0 -285
  143. package/skills/story-single/SKILL.md +0 -86
  144. package/skills/tdd-generator/SKILL.md +0 -300
  145. package/skills/tdd-lite-generator/SKILL.md +0 -230
  146. package/skills/ui-ux-pro/SKILL.md +0 -199
  147. package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
  148. package/skills/ui-ux-pro/references/component-patterns.md +0 -255
  149. package/skills/ui-ux-pro/references/design-principles.md +0 -167
  150. package/skills/wireframe-generator/SKILL.md +0 -227
  151. package/src/cli/index.ts +0 -223
  152. package/src/commands/archive.ts +0 -302
  153. package/src/commands/change.ts +0 -292
  154. package/src/commands/config.ts +0 -233
  155. package/src/commands/guide.ts +0 -50
  156. package/src/commands/init.ts +0 -597
  157. package/src/commands/list.ts +0 -194
  158. package/src/commands/show.ts +0 -138
  159. package/src/commands/spec.ts +0 -251
  160. package/src/commands/update.ts +0 -129
  161. package/src/commands/upgrade.ts +0 -30
  162. package/src/commands/validate.ts +0 -326
  163. package/src/core/artifact-graph/graph.ts +0 -167
  164. package/src/core/artifact-graph/index.ts +0 -44
  165. package/src/core/artifact-graph/instruction-loader.ts +0 -302
  166. package/src/core/artifact-graph/resolver.ts +0 -226
  167. package/src/core/artifact-graph/schema.ts +0 -124
  168. package/src/core/artifact-graph/state.ts +0 -64
  169. package/src/core/artifact-graph/types.ts +0 -65
  170. package/src/core/completions/command-registry.ts +0 -382
  171. package/src/core/completions/completion-provider.ts +0 -128
  172. package/src/core/completions/generators/bash-generator.ts +0 -191
  173. package/src/core/completions/generators/fish-generator.ts +0 -188
  174. package/src/core/completions/generators/powershell-generator.ts +0 -223
  175. package/src/core/completions/generators/zsh-generator.ts +0 -281
  176. package/src/core/completions/templates/bash-templates.ts +0 -24
  177. package/src/core/completions/templates/fish-templates.ts +0 -40
  178. package/src/core/completions/templates/powershell-templates.ts +0 -25
  179. package/src/core/completions/templates/zsh-templates.ts +0 -36
  180. package/src/core/completions/types.ts +0 -90
  181. package/src/core/config-schema.ts +0 -230
  182. package/src/core/config.ts +0 -181
  183. package/src/core/configurators/slash/antigravity.ts +0 -10
  184. package/src/core/configurators/slash/base.ts +0 -109
  185. package/src/core/configurators/slash/claude.ts +0 -10
  186. package/src/core/configurators/slash/codex.ts +0 -10
  187. package/src/core/configurators/slash/droid.ts +0 -10
  188. package/src/core/configurators/slash/forge.ts +0 -10
  189. package/src/core/configurators/slash/github-copilot.ts +0 -10
  190. package/src/core/configurators/slash/index.ts +0 -10
  191. package/src/core/configurators/slash/kilocode.ts +0 -10
  192. package/src/core/configurators/slash/opencode.ts +0 -10
  193. package/src/core/configurators/slash/registry.ts +0 -51
  194. package/src/core/converters/json-converter.ts +0 -62
  195. package/src/core/global-config.ts +0 -136
  196. package/src/core/parsers/change-parser.ts +0 -234
  197. package/src/core/parsers/markdown-parser.ts +0 -237
  198. package/src/core/parsers/requirement-blocks.ts +0 -234
  199. package/src/core/prompt-templates.ts +0 -3504
  200. package/src/core/schemas/base.schema.ts +0 -20
  201. package/src/core/schemas/change.schema.ts +0 -42
  202. package/src/core/schemas/index.ts +0 -20
  203. package/src/core/schemas/spec.schema.ts +0 -17
  204. package/src/core/skill-discovery.ts +0 -68
  205. package/src/core/specs-apply.ts +0 -483
  206. package/src/core/styles/palette.ts +0 -8
  207. package/src/core/templates/agents-template.ts +0 -459
  208. package/src/core/templates/claude-template.ts +0 -2
  209. package/src/core/templates/index.ts +0 -3
  210. package/src/core/templates/project-template.ts +0 -32
  211. package/src/core/validation/constants.ts +0 -48
  212. package/src/core/validation/types.ts +0 -19
  213. package/src/core/validation/validator.ts +0 -449
  214. package/src/core/view.ts +0 -219
  215. package/src/index.ts +0 -1
  216. package/src/utils/change-metadata.ts +0 -171
  217. package/src/utils/change-utils.ts +0 -131
  218. package/src/utils/file-system.ts +0 -252
  219. package/src/utils/index.ts +0 -12
  220. package/src/utils/interactive.ts +0 -29
  221. package/src/utils/item-discovery.ts +0 -66
  222. package/src/utils/match.ts +0 -26
  223. package/src/utils/shell-detection.ts +0 -62
  224. package/src/utils/task-progress.ts +0 -43
  225. package/tsconfig.json +0 -28
@@ -1,321 +0,0 @@
1
- # Extraction Patterns Reference
2
-
3
- Mapping rules and regex patterns for extracting design tokens from CSS, HTML, React, and Tailwind sources.
4
-
5
- ---
6
-
7
- ## CSS Custom Properties
8
-
9
- Extract all `--` prefixed declarations from `:root`, `html`, `body`, or theme selectors.
10
-
11
- ```regex
12
- --[\w-]+\s*:\s*[^;]+
13
- ```
14
-
15
- Group by prefix conventions:
16
- - `--color-*`, `--c-*` → Colors
17
- - `--font-*`, `--text-*`, `--fs-*` → Typography
18
- - `--space-*`, `--spacing-*`, `--gap-*` → Spacing
19
- - `--radius-*`, `--rounded-*`, `--br-*` → Border Radii
20
- - `--shadow-*`, `--elevation-*` → Shadows
21
- - `--z-*`, `--zindex-*` → Z-Index
22
- - `--duration-*`, `--transition-*`, `--ease-*` → Transitions
23
-
24
- ---
25
-
26
- ## Color Extraction
27
-
28
- ### From CSS declarations
29
-
30
- Target properties:
31
- ```
32
- color, background-color, background, border-color, outline-color,
33
- fill, stroke, text-decoration-color, accent-color, caret-color,
34
- box-shadow (color component), --*-color
35
- ```
36
-
37
- ### Color format normalization
38
-
39
- Convert all formats to hex with HSL annotation:
40
- - `#RGB` → expand to `#RRGGBB`
41
- - `rgb(R, G, B)` → convert to hex
42
- - `rgba(R, G, B, A)` → note alpha separately
43
- - `hsl(H, S%, L%)` → convert to hex, keep HSL as annotation
44
- - `oklch(L C H)` → convert to hex equivalent
45
- - Named colors (`red`, `blue`) → convert to hex
46
-
47
- ### Semantic color grouping heuristics
48
-
49
- | CSS Pattern | Likely Category |
50
- |-------------|----------------|
51
- | `--primary*`, `--brand*`, `--accent*` | Primary/Accent |
52
- | `--secondary*` | Secondary |
53
- | `--gray*`, `--grey*`, `--neutral*`, `--slate*` | Neutral |
54
- | `--success*`, `--green*`, `--positive*` | Success |
55
- | `--warning*`, `--yellow*`, `--amber*`, `--caution*` | Warning |
56
- | `--error*`, `--red*`, `--danger*`, `--destructive*` | Error |
57
- | `--info*`, `--blue*` | Info |
58
- | `--bg*`, `--background*`, `--surface*` | Surface |
59
- | `--text*`, `--fg*`, `--foreground*` | Text |
60
-
61
- ### Color scale detection
62
-
63
- If multiple shades of the same hue exist, sort by lightness and assign scale numbers:
64
- - Lightest → 50
65
- - Darkest → 950
66
- - Map intermediate values to nearest: 100, 200, 300, 400, 500, 600, 700, 800, 900
67
-
68
- ---
69
-
70
- ## Typography Extraction
71
-
72
- ### Font family detection
73
-
74
- Target properties: `font-family`, `--font-*`
75
-
76
- Classify by usage:
77
- - Serif/Sans-serif → heading or body
78
- - Monospace → code/mono
79
- - If only one family found → assign to both heading + body
80
-
81
- ### Font size scale building
82
-
83
- Target properties: `font-size`, `--text-*`, `--fs-*`
84
-
85
- 1. Collect all unique `font-size` values
86
- 2. Sort ascending
87
- 3. Map to scale:
88
-
89
- | Range (px) | Token |
90
- |-----------|-------|
91
- | 10–11 | `xs` |
92
- | 12–13 | `sm` |
93
- | 14–16 | `base` |
94
- | 17–19 | `lg` |
95
- | 20–23 | `xl` |
96
- | 24–29 | `2xl` |
97
- | 30–35 | `3xl` |
98
- | 36+ | `4xl` |
99
-
100
- ### Font weight mapping
101
-
102
- Collect all `font-weight` values. Map to named tokens:
103
- - `100` → thin, `200` → extralight, `300` → light
104
- - `400` → normal, `500` → medium, `600` → semibold
105
- - `700` → bold, `800` → extrabold, `900` → black
106
-
107
- ---
108
-
109
- ## Spacing Extraction
110
-
111
- ### Collecting spacing values
112
-
113
- Target properties:
114
- ```
115
- margin, margin-top/right/bottom/left,
116
- padding, padding-top/right/bottom/left,
117
- gap, row-gap, column-gap, grid-gap,
118
- top, right, bottom, left (when used for spacing)
119
- ```
120
-
121
- ### Base unit detection
122
-
123
- 1. Collect all spacing values
124
- 2. Find GCD (Greatest Common Divisor) of the most common values
125
- 3. Typical base units: `4px`, `8px`
126
- 4. If values follow `4, 8, 12, 16, 20, 24, 32` → base = 4px
127
- 5. If values follow `8, 16, 24, 32, 40, 48, 64` → base = 8px
128
-
129
- ### Scale normalization
130
-
131
- Sort unique values and assign multipliers relative to base:
132
- ```
133
- 0px → space-0 (0×)
134
- 4px → space-1 (1×)
135
- 8px → space-2 (2×)
136
- 12px → space-3 (3×)
137
- 16px → space-4 (4×)
138
- ...
139
- ```
140
-
141
- ---
142
-
143
- ## Border & Radius Extraction
144
-
145
- ### Border radius values
146
-
147
- Target: `border-radius`, `border-*-radius`, `--radius-*`
148
-
149
- Map to scale:
150
- | Range (px) | Token |
151
- |-----------|-------|
152
- | 0 | `none` |
153
- | 1–3 | `sm` |
154
- | 4–7 | `md` |
155
- | 8–11 | `lg` |
156
- | 12–15 | `xl` |
157
- | 16+ | `2xl` |
158
- | 9999px, 50% | `full` |
159
-
160
- ---
161
-
162
- ## Shadow Extraction
163
-
164
- Target: `box-shadow`, `text-shadow`, `--shadow-*`
165
-
166
- Parse shadow values into components:
167
- ```
168
- box-shadow: <offset-x> <offset-y> <blur> <spread> <color>
169
- ```
170
-
171
- Map to elevation scale by blur radius:
172
- | Blur (px) | Token |
173
- |----------|-------|
174
- | 1–4 | `sm` |
175
- | 5–10 | `md` |
176
- | 11–20 | `lg` |
177
- | 21+ | `xl` |
178
- | `inset` keyword | `inner` |
179
-
180
- ---
181
-
182
- ## Breakpoint Extraction
183
-
184
- Target: `@media` queries with `min-width` or `max-width`
185
-
186
- ```regex
187
- @media\s*\([^)]*(?:min|max)-width\s*:\s*([\d.]+(?:px|em|rem))[^)]*\)
188
- ```
189
-
190
- Common breakpoint conventions:
191
- | Value | Token |
192
- |-------|-------|
193
- | 640px / 40em | `sm` |
194
- | 768px / 48em | `md` |
195
- | 1024px / 64em | `lg` |
196
- | 1280px / 80em | `xl` |
197
- | 1536px / 96em | `2xl` |
198
-
199
- ---
200
-
201
- ## Transition Extraction
202
-
203
- Target: `transition`, `transition-duration`, `transition-timing-function`, `animation-duration`
204
-
205
- ### Duration bucketing
206
-
207
- | Range (ms) | Token |
208
- |-----------|-------|
209
- | 50–100 | `fast` |
210
- | 150–300 | `normal` |
211
- | 300–500 | `slow` |
212
-
213
- ### Easing classification
214
-
215
- | Value | Token |
216
- |-------|-------|
217
- | `ease` | `default` |
218
- | `ease-in`, `cubic-bezier(0.4, 0, 1, 1)` | `in` |
219
- | `ease-out`, `cubic-bezier(0, 0, 0.2, 1)` | `out` |
220
- | `ease-in-out`, `cubic-bezier(0.4, 0, 0.2, 1)` | `in-out` |
221
-
222
- ---
223
-
224
- ## Z-Index Extraction
225
-
226
- Target: `z-index`, `--z-*`
227
-
228
- ### Semantic assignment heuristics
229
-
230
- Assign names based on context (selector or class name):
231
- | Selector Pattern | Token |
232
- |-----------------|-------|
233
- | `.dropdown*`, `.menu*`, `.select*` | `dropdown` |
234
- | `.sticky*`, `.fixed-header*` | `sticky` |
235
- | `.overlay*`, `.backdrop*` | `overlay` |
236
- | `.modal*`, `.dialog*` | `modal` |
237
- | `.popover*`, `.tooltip*` | `popover` |
238
- | `.toast*`, `.notification*`, `.snackbar*` | `toast` |
239
-
240
- ---
241
-
242
- ## Tailwind Class Extraction
243
-
244
- When input uses Tailwind utility classes, map classes to tokens:
245
-
246
- ### Color classes
247
- ```regex
248
- (?:bg|text|border|ring|fill|stroke)-(?:[\w]+-)?(?:\d{2,3}|black|white)
249
- ```
250
- Map to theme colors via `tailwind.config.js` or default palette.
251
-
252
- ### Spacing classes
253
- ```regex
254
- (?:m|p|gap|space-[xy])-(?:\d+(?:\.\d+)?|px|auto)
255
- ```
256
- Convert Tailwind spacing units: multiply by 4px (default).
257
-
258
- ### Typography classes
259
- ```regex
260
- (?:text|font|leading|tracking)-(?:xs|sm|base|lg|xl|[\d]xl|thin|light|normal|medium|semibold|bold|extrabold|black|tight|snug|normal|relaxed|loose|tighter|wider)
261
- ```
262
-
263
- ### Border/Radius classes
264
- ```regex
265
- rounded(?:-(?:sm|md|lg|xl|2xl|3xl|full|none))?
266
- border(?:-(?:\d+))?
267
- ```
268
-
269
- ---
270
-
271
- ## React/JSX Pattern Extraction
272
-
273
- ### Styled-components / Emotion
274
-
275
- Extract template literals from `styled.*` or `css` tagged templates:
276
- ```regex
277
- styled\.(\w+)`([^`]*)`
278
- css`([^`]*)`
279
- ```
280
-
281
- ### Style objects
282
-
283
- Extract from `style={{ }}` JSX attributes:
284
- ```regex
285
- style=\{\{([^}]*)\}\}
286
- ```
287
-
288
- Convert camelCase properties to kebab-case for token extraction.
289
-
290
- ### Theme objects
291
-
292
- Look for theme/token files:
293
- - `theme.ts`, `theme.js`, `tokens.ts`, `tokens.js`
294
- - `ThemeProvider` usage pointing to theme config
295
- - `createTheme()`, `extendTheme()` calls
296
-
297
- Extract nested token objects and flatten to design tokens.
298
-
299
- ---
300
-
301
- ## Dark Mode Detection
302
-
303
- ### CSS strategies
304
- - `@media (prefers-color-scheme: dark)` blocks
305
- - `.dark` class selector overrides
306
- - `[data-theme="dark"]` attribute selectors
307
-
308
- ### Tailwind dark mode
309
- - `dark:` prefix classes
310
- - Check `darkMode` config in `tailwind.config.js`
311
-
312
- When dark mode is detected, create a parallel token set documenting both light and dark values.
313
-
314
- ---
315
-
316
- ## Deduplication Rules
317
-
318
- 1. **Near-identical colors**: Merge colors within ΔE < 3 (perceptual difference). Keep the more frequently used value.
319
- 2. **Similar spacing**: If two values differ by ≤1px, keep the one that fits the base unit grid.
320
- 3. **Duplicate fonts**: Same family with different quoting → keep one.
321
- 4. **Shadow variants**: If two shadows only differ by color, document as one shadow with color token reference.
@@ -1,115 +0,0 @@
1
- ---
2
- name: doc-builder
3
- description: Generate interactive system flowchart documentation pages with Mermaid.js diagrams. Use this skill whenever the user asks to create documentation, document architecture, generate flowcharts, visualize system flows, or create technical diagrams for any scope — a single page, feature, module, or entire project/repo. Also use when the user says things like "create documentation for ...", "document this module", "generate system diagrams", or "visualize the architecture".
4
- ---
5
-
6
- # System Flowcharts Generator
7
-
8
- Generate interactive, self-contained HTML documentation pages with Mermaid.js flowchart diagrams. The pages follow a Mintlify-inspired design system with a sidebar, top navbar, module cards, and lazy-rendered diagrams.
9
-
10
- ## When to use
11
-
12
- - User asks to document a system, module, feature, or entire repo
13
- - User wants flowcharts, architecture diagrams, or system visualizations
14
- - User says "create documentation", "document the flows", "generate diagrams", etc.
15
-
16
- ## Workflow
17
-
18
- ### 1. Determine Scope and Output Strategy
19
-
20
- Ask the user (or infer from context) what they want documented. Then, after exploring the codebase, **recommend** whether to use a single file or multiple files — but let the user decide.
21
-
22
- When making your recommendation, consider:
23
- - **Number of flows/sections**: A feature with 3 flows fits comfortably in one file. A module with 12+ flows gets unwieldy.
24
- - **Content density**: If each flow has detailed diagrams and step timelines, even a few flows can make a single page very long.
25
- - **Navigability**: A single file with sidebar sections is simpler to share and browse. Multiple files are easier to maintain and load faster individually.
26
-
27
- Present your recommendation like: "This module has 8 major flows — I'd suggest splitting into separate pages per domain area with an index page, but I can also put it all in one file if you prefer. What do you think?"
28
-
29
- For multi-file output, create an `index.html` that links to each module's page. Each module page is fully self-contained (all CSS/JS inline).
30
-
31
- ### 2. Explore the Codebase
32
-
33
- Investigate the target scope to understand:
34
- - System architecture and module boundaries
35
- - Data flows and request lifecycles
36
- - Key processes, workflows, and decision points
37
- - External integrations and dependencies
38
- - Error handling paths
39
-
40
- ### 3. Identify Flowchart Content
41
-
42
- For each section/module, identify:
43
- - **Overview**: What the module does, its key components (rendered as module cards)
44
- - **Flows**: The major workflows worth diagramming (each becomes a sidebar section with a Mermaid flowchart)
45
- - **Steps**: Key process steps (rendered as timeline flow steps)
46
-
47
- ### 4. Generate the HTML
48
-
49
- Read the full design system spec from `references/ui-patterns.md` in this skill's directory. Follow it exactly — all design tokens, components, typography, responsive breakpoints, and JavaScript behavior.
50
-
51
- Key requirements:
52
- - Single self-contained HTML file per page (all CSS and JS inline)
53
- - Google Fonts loaded via `<link>` tag (Inter + Geist Mono)
54
- - Mermaid.js loaded via CDN
55
- - Left sidebar navigation with sections for Overview + each flow
56
- - Lazy Mermaid rendering (diagrams render only when their tab is activated)
57
- - Tab switching updates breadcrumbs and scrolls to top
58
- - Scroll animations via IntersectionObserver
59
- - Mobile responsive (sidebar collapses below 1024px)
60
-
61
- ### 5. Output Location
62
-
63
- Save output to `docs/` directory by default:
64
- - Single scope: `docs/flowcharts.html` or `docs/<name>-flowcharts.html`
65
- - Multi-file: `docs/flowcharts/index.html` + `docs/flowcharts/<module>.html`
66
-
67
- Ask the user if they want a different location.
68
-
69
- ---
70
-
71
- ## Mermaid Diagram Conventions
72
-
73
- Use consistent node styling to communicate meaning:
74
-
75
- | Color | Meaning | Mermaid Style |
76
- |-------|---------|---------------|
77
- | Cyan (`#06B6D4`) | Start/Entry point | `style A fill:#06B6D4,color:#fff` |
78
- | Green (`#18E299`) | System process | `style B fill:#18E299,color:#0F172A` |
79
- | Amber (`#F59E0B`) | Approval/Decision requiring human input | `style C fill:#F59E0B,color:#0F172A` |
80
- | Red (`#EF4444`) | Error/Rejection | `style D fill:#EF4444,color:#fff` |
81
- | White (`#ffffff`) | Standard process step | (default, no override needed) |
82
-
83
- Always include a legend after each diagram explaining the color conventions used.
84
-
85
- ## Mermaid Tips
86
-
87
- - Use `flowchart TD` (top-down) for most flows
88
- - Use descriptive node labels in quotes: `A["User Submits Form"]`
89
- - Use edge labels for conditions: `C -->|"Valid"| D`
90
- - Keep diagrams focused — if a flow has more than ~15 nodes, split into sub-flows
91
- - Use subgraphs to group related steps: `subgraph "Authentication" ... end`
92
-
93
- ---
94
-
95
- ## Index Page (Multi-file Output)
96
-
97
- When generating multiple module pages, create an `index.html` that:
98
- - Uses the same design system (topbar, styling)
99
- - Shows a grid of module cards (one per module page)
100
- - Each card links to the module's HTML file
101
- - Includes a brief project overview at the top
102
-
103
- ---
104
-
105
- ## Design System Reference
106
-
107
- The complete UI pattern specification is bundled at `references/ui-patterns.md`. Read it before generating any HTML. It contains:
108
- - All design tokens (colors, spacing, dimensions)
109
- - Typography specs (Inter + Geist Mono)
110
- - Component HTML/CSS patterns (topbar, sidebar, flowchart containers, module cards, flow steps, badges, legends)
111
- - Mermaid.js configuration block
112
- - JavaScript for tab switching, lazy rendering, scroll animations
113
- - Responsive breakpoints
114
-
115
- Follow the spec precisely — do not improvise styles or deviate from the documented patterns.