@dedesfr/prompter 0.6.11 → 0.6.13
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.
- package/CHANGELOG.md +56 -0
- package/dist/cli/index.js +10 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/design-system.d.ts +11 -0
- package/dist/commands/design-system.d.ts.map +1 -0
- package/dist/commands/design-system.js +97 -0
- package/dist/commands/design-system.js.map +1 -0
- package/dist/commands/guide.d.ts.map +1 -1
- package/dist/commands/guide.js +25 -0
- package/dist/commands/guide.js.map +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +6 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +2 -0
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +2 -0
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +2 -0
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +2 -0
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +2 -0
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +2 -0
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/prompt-templates.d.ts +1 -0
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +211 -0
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/templates/slash-command-templates.d.ts +1 -1
- package/dist/core/templates/slash-command-templates.d.ts.map +1 -1
- package/dist/core/templates/slash-command-templates.js +2 -1
- package/dist/core/templates/slash-command-templates.js.map +1 -1
- package/docs/tasks.md +1 -1
- package/package.json +1 -1
- package/prompt/design-system.md +210 -0
- package/src/cli/index.ts +11 -2
- package/src/commands/design-system.ts +118 -0
- package/src/commands/guide.ts +30 -0
- package/src/core/config.ts +6 -0
- package/src/core/configurators/slash/antigravity.ts +2 -0
- package/src/core/configurators/slash/claude.ts +2 -0
- package/src/core/configurators/slash/codex.ts +2 -0
- package/src/core/configurators/slash/github-copilot.ts +2 -0
- package/src/core/configurators/slash/kilocode.ts +2 -0
- package/src/core/configurators/slash/opencode.ts +2 -0
- package/src/core/prompt-templates.ts +211 -0
- package/src/core/templates/slash-command-templates.ts +3 -1
|
@@ -45,6 +45,217 @@ You are an expert copywriter and proofreader. Your mission is to meticulously re
|
|
|
45
45
|
- Be vigilant about proper punctuation in every sentence.
|
|
46
46
|
- Ensure the final output is indistinguishable from human writing.
|
|
47
47
|
`;
|
|
48
|
+
export const DESIGN_SYSTEM_TEMPLATE = `# Design System Documentation Generator
|
|
49
|
+
|
|
50
|
+
You are a senior design systems architect and technical writer with expertise in creating comprehensive, developer-friendly design system documentation. You combine deep knowledge of UI/UX principles, component architecture, and documentation best practices.
|
|
51
|
+
|
|
52
|
+
## Context
|
|
53
|
+
|
|
54
|
+
Design system documentation serves as the single source of truth for designers, developers, and stakeholders. It must be technically precise yet accessible, with clear examples and implementation guidance. Your documentation will enable consistent implementation across teams and platforms.
|
|
55
|
+
|
|
56
|
+
## Primary Objective
|
|
57
|
+
|
|
58
|
+
Generate complete, professional design system documentation that covers all aspects of a component, token set, pattern, or system element—from design rationale to implementation code.
|
|
59
|
+
|
|
60
|
+
## Documentation Process
|
|
61
|
+
|
|
62
|
+
1. **Analyze the Design Element**
|
|
63
|
+
- Identify the element type (component, token, pattern, layout)
|
|
64
|
+
- Determine its purpose and use cases
|
|
65
|
+
- Map relationships to other system elements
|
|
66
|
+
|
|
67
|
+
2. **Structure the Documentation**
|
|
68
|
+
- Apply the appropriate template based on element type
|
|
69
|
+
- Ensure logical flow from concept to implementation
|
|
70
|
+
- Include all required sections
|
|
71
|
+
|
|
72
|
+
3. **Generate Technical Content**
|
|
73
|
+
- Write clear descriptions and guidelines
|
|
74
|
+
- Create accurate code examples
|
|
75
|
+
- Define props, tokens, and specifications
|
|
76
|
+
- Document accessibility requirements
|
|
77
|
+
|
|
78
|
+
4. **Add Practical Guidance**
|
|
79
|
+
- Include do/don't examples
|
|
80
|
+
- Provide real-world usage scenarios
|
|
81
|
+
- Note common pitfalls and solutions
|
|
82
|
+
|
|
83
|
+
## Input Specifications
|
|
84
|
+
|
|
85
|
+
Provide any of the following:
|
|
86
|
+
- Component name or design element to document
|
|
87
|
+
- Existing design specs, Figma links, or visual references
|
|
88
|
+
- Code snippets or component implementations
|
|
89
|
+
- Specific framework requirements (React, Vue, Web Components, etc.)
|
|
90
|
+
- Brand/style constraints
|
|
91
|
+
- Target audience (designers, developers, both)
|
|
92
|
+
|
|
93
|
+
## Output Structure
|
|
94
|
+
|
|
95
|
+
### For Components:
|
|
96
|
+
|
|
97
|
+
# [Component Name]
|
|
98
|
+
|
|
99
|
+
## Overview
|
|
100
|
+
Brief description of the component's purpose and when to use it.
|
|
101
|
+
|
|
102
|
+
## Usage Guidelines
|
|
103
|
+
### When to Use
|
|
104
|
+
- [Scenario 1]
|
|
105
|
+
- [Scenario 2]
|
|
106
|
+
|
|
107
|
+
### When Not to Use
|
|
108
|
+
- [Alternative recommendation]
|
|
109
|
+
|
|
110
|
+
## Anatomy
|
|
111
|
+
[Description of component parts with visual reference]
|
|
112
|
+
|
|
113
|
+
| Part | Description | Required |
|
|
114
|
+
|------|-------------|----------|
|
|
115
|
+
| [Part name] | [Purpose] | Yes/No |
|
|
116
|
+
|
|
117
|
+
## Variants
|
|
118
|
+
### [Variant Name]
|
|
119
|
+
- **Use case:** [When to use this variant]
|
|
120
|
+
- **Visual:** [Description or reference]
|
|
121
|
+
|
|
122
|
+
## Props / API
|
|
123
|
+
|
|
124
|
+
| Prop | Type | Default | Description |
|
|
125
|
+
|------|------|---------|-------------|
|
|
126
|
+
| [name] | [type] | [default] | [description] |
|
|
127
|
+
|
|
128
|
+
## Design Tokens
|
|
129
|
+
|
|
130
|
+
| Token | Value | Usage |
|
|
131
|
+
|-------|-------|-------|
|
|
132
|
+
| [token-name] | [value] | [where applied] |
|
|
133
|
+
|
|
134
|
+
## States
|
|
135
|
+
- **Default:** [description]
|
|
136
|
+
- **Hover:** [description]
|
|
137
|
+
- **Active:** [description]
|
|
138
|
+
- **Focus:** [description]
|
|
139
|
+
- **Disabled:** [description]
|
|
140
|
+
|
|
141
|
+
## Accessibility
|
|
142
|
+
- **ARIA:** [Required attributes]
|
|
143
|
+
- **Keyboard:** [Interaction patterns]
|
|
144
|
+
- **Screen Reader:** [Announcements]
|
|
145
|
+
|
|
146
|
+
## Code Examples
|
|
147
|
+
|
|
148
|
+
### Basic Usage
|
|
149
|
+
\`\`\`[framework]
|
|
150
|
+
[code example]
|
|
151
|
+
\`\`\`
|
|
152
|
+
|
|
153
|
+
### With Variants
|
|
154
|
+
\`\`\`[framework]
|
|
155
|
+
[code example]
|
|
156
|
+
\`\`\`
|
|
157
|
+
|
|
158
|
+
### Complex Implementation
|
|
159
|
+
\`\`\`[framework]
|
|
160
|
+
[code example]
|
|
161
|
+
\`\`\`
|
|
162
|
+
|
|
163
|
+
## Do's and Don'ts
|
|
164
|
+
|
|
165
|
+
| ✅ Do | ❌ Don't |
|
|
166
|
+
|-------|---------|
|
|
167
|
+
| [Good practice] | [Anti-pattern] |
|
|
168
|
+
|
|
169
|
+
## Related Components
|
|
170
|
+
- [Component 1] - [Relationship]
|
|
171
|
+
- [Component 2] - [Relationship]
|
|
172
|
+
|
|
173
|
+
## Changelog
|
|
174
|
+
| Version | Changes |
|
|
175
|
+
|---------|---------|
|
|
176
|
+
| [version] | [description] |
|
|
177
|
+
|
|
178
|
+
### For Design Tokens:
|
|
179
|
+
|
|
180
|
+
# [Token Category] Tokens
|
|
181
|
+
|
|
182
|
+
## Overview
|
|
183
|
+
[Purpose and philosophy of this token set]
|
|
184
|
+
|
|
185
|
+
## Token Structure
|
|
186
|
+
[Naming convention and hierarchy explanation]
|
|
187
|
+
|
|
188
|
+
## Token Reference
|
|
189
|
+
|
|
190
|
+
### [Subcategory]
|
|
191
|
+
| Token | Value | Usage | Preview |
|
|
192
|
+
|-------|-------|-------|---------|
|
|
193
|
+
| [name] | [value] | [when to use] | [visual] |
|
|
194
|
+
|
|
195
|
+
## Implementation
|
|
196
|
+
|
|
197
|
+
### CSS Custom Properties
|
|
198
|
+
\`\`\`css
|
|
199
|
+
[tokens as CSS variables]
|
|
200
|
+
\`\`\`
|
|
201
|
+
|
|
202
|
+
### JavaScript/JSON
|
|
203
|
+
\`\`\`json
|
|
204
|
+
[tokens as JSON]
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
## Usage Guidelines
|
|
208
|
+
[How to apply tokens correctly]
|
|
209
|
+
|
|
210
|
+
## Migration Notes
|
|
211
|
+
[For token updates or deprecations]
|
|
212
|
+
|
|
213
|
+
### For Patterns:
|
|
214
|
+
|
|
215
|
+
# [Pattern Name] Pattern
|
|
216
|
+
|
|
217
|
+
## Overview
|
|
218
|
+
[What problem this pattern solves]
|
|
219
|
+
|
|
220
|
+
## Use Cases
|
|
221
|
+
[Scenarios where this pattern applies]
|
|
222
|
+
|
|
223
|
+
## Structure
|
|
224
|
+
[Layout and component composition]
|
|
225
|
+
|
|
226
|
+
## Behavior
|
|
227
|
+
[Interaction specifications]
|
|
228
|
+
|
|
229
|
+
## Responsive Considerations
|
|
230
|
+
[How pattern adapts across breakpoints]
|
|
231
|
+
|
|
232
|
+
## Implementation Examples
|
|
233
|
+
[Code for common scenarios]
|
|
234
|
+
|
|
235
|
+
## Variations
|
|
236
|
+
[Alternative approaches within the pattern]
|
|
237
|
+
|
|
238
|
+
## Quality Standards
|
|
239
|
+
|
|
240
|
+
- **Completeness:** All sections populated with meaningful content
|
|
241
|
+
- **Accuracy:** Code examples must be syntactically correct and functional
|
|
242
|
+
- **Clarity:** No jargon without explanation; scannable formatting
|
|
243
|
+
- **Consistency:** Uniform terminology and structure throughout
|
|
244
|
+
- **Accessibility:** WCAG 2.1 AA guidance included for all interactive elements
|
|
245
|
+
- **Practicality:** Real-world examples that developers can copy and adapt
|
|
246
|
+
|
|
247
|
+
## Special Instructions
|
|
248
|
+
|
|
249
|
+
1. **Code Examples:** Provide in the most commonly used framework (React by default) unless specified otherwise. Include TypeScript types when applicable.
|
|
250
|
+
|
|
251
|
+
2. **Token Values:** Use semantic naming (e.g., \`color-text-primary\`) over literal values (e.g., \`color-gray-900\`).
|
|
252
|
+
|
|
253
|
+
3. **Accessibility:** Every interactive component must include keyboard navigation, ARIA attributes, and screen reader considerations.
|
|
254
|
+
|
|
255
|
+
4. **Cross-References:** Link related components and patterns to create navigable documentation.
|
|
256
|
+
|
|
257
|
+
5. **Visual Descriptions:** When images aren't possible, provide detailed text descriptions of visual elements.
|
|
258
|
+
`;
|
|
48
259
|
export const DOCUMENT_EXPLAINER_TEMPLATE = `# Document Explainer & Analyzer
|
|
49
260
|
|
|
50
261
|
You are an expert document analyst and technical communicator skilled at breaking down complex materials into clear, actionable insights.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-templates.js","sourceRoot":"","sources":["../../src/core/prompt-templates.ts"],"names":[],"mappings":"AAAA,yFAAyF;AAEzF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CpC,CAAC;AACF,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6N3C,CAAC;AAEF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACrD,cAAc,EAAE,qBAAqB;IACrC,wBAAwB,EAAE,+BAA+B;IACzD,oBAAoB,EAAE,2BAA2B;IACjD,gBAAgB,EAAE,uBAAuB;IACzC,aAAa,EAAE,oBAAoB;IACnC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,qBAAqB,EAAE,4BAA4B;IACnD,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,kBAAkB,EAAE,yBAAyB;IAC7C,eAAe,EAAE,sBAAsB;IACvC,iBAAiB,EAAE,wBAAwB;IAC3C,cAAc,EAAE,qBAAqB;IACrC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,2BAA2B;IACjD,qBAAqB,EAAE,4BAA4B;CACrD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'epic-generator' | 'story-single' | 'story-generator' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'erd-generator' | 'fsd-generator' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator' | 'document-explainer';
|
|
1
|
+
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'epic-generator' | 'story-single' | 'story-generator' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'design-system' | 'erd-generator' | 'fsd-generator' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator' | 'document-explainer';
|
|
2
2
|
export declare const slashCommandBodies: Record<SlashCommandId, string>;
|
|
3
3
|
export declare function getSlashCommandBody(id: SlashCommandId): string;
|
|
4
4
|
export declare class TemplateManager {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,eAAe,GAAG,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,GAAG,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,eAAe,GAAG,cAAc,GAAG,wBAAwB,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,oBAAoB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AA0/B5Y,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAoB7D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED,qBAAa,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;CAGzD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { API_CONTRACT_GENERATOR_TEMPLATE, EPIC_GENERATOR_TEMPLATE, ERD_GENERATOR_TEMPLATE, FSD_GENERATOR_TEMPLATE, STORY_GENERATOR_TEMPLATE, TDD_GENERATOR_TEMPLATE, TDD_LITE_GENERATOR_TEMPLATE, WIREFRAME_GENERATOR_TEMPLATE, DOCUMENT_EXPLAINER_TEMPLATE } from '../prompt-templates.js';
|
|
1
|
+
import { API_CONTRACT_GENERATOR_TEMPLATE, DESIGN_SYSTEM_TEMPLATE, EPIC_GENERATOR_TEMPLATE, ERD_GENERATOR_TEMPLATE, FSD_GENERATOR_TEMPLATE, STORY_GENERATOR_TEMPLATE, TDD_GENERATOR_TEMPLATE, TDD_LITE_GENERATOR_TEMPLATE, WIREFRAME_GENERATOR_TEMPLATE, DOCUMENT_EXPLAINER_TEMPLATE } from '../prompt-templates.js';
|
|
2
2
|
const enhanceWorkflow = `## MUST FOLLOW
|
|
3
3
|
- Response Language: {User Request Language}
|
|
4
4
|
|
|
@@ -1019,6 +1019,7 @@ export const slashCommandBodies = {
|
|
|
1019
1019
|
'skill-creator': skillCreatorWorkflow,
|
|
1020
1020
|
'ai-humanizer': aiHumanizerWorkflow,
|
|
1021
1021
|
'api-contract-generator': API_CONTRACT_GENERATOR_TEMPLATE,
|
|
1022
|
+
'design-system': DESIGN_SYSTEM_TEMPLATE,
|
|
1022
1023
|
'erd-generator': ERD_GENERATOR_TEMPLATE,
|
|
1023
1024
|
'fsd-generator': FSD_GENERATOR_TEMPLATE,
|
|
1024
1025
|
'tdd-generator': TDD_GENERATOR_TEMPLATE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAyC2C,CAAC;AAEpE,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAmC;IAC9D,OAAO,EAAE,eAAe;IACxB,eAAe,EAAE,oBAAoB;IACrC,qBAAqB,EAAE,yBAAyB;IAChD,eAAe,EAAE,oBAAoB;IACrC,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,uBAAuB;IACzC,cAAc,EAAE,mBAAmB;IACnC,iBAAiB,EAAE,wBAAwB;IAC3C,kBAAkB,EAAE,sBAAsB;IAC1C,eAAe,EAAE,oBAAoB;IACrC,cAAc,EAAE,mBAAmB;IACnC,wBAAwB,EAAE,+BAA+B;IACzD,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,2BAA2B;IACjD,qBAAqB,EAAE,4BAA4B;IACnD,oBAAoB,EAAE,2BAA2B;CACpD,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,EAAkB;IAClD,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,OAAO,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAkB;QACzC,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACJ"}
|
|
1
|
+
{"version":3,"file":"slash-command-templates.js","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC9B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAyC2C,CAAC;AAEpE,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEAuIoC,CAAC;AAElE,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEA4CuC,CAAC;AAEpE,MAAM,CAAC,MAAM,kBAAkB,GAAmC;IAC9D,OAAO,EAAE,eAAe;IACxB,eAAe,EAAE,oBAAoB;IACrC,qBAAqB,EAAE,yBAAyB;IAChD,eAAe,EAAE,oBAAoB;IACrC,aAAa,EAAE,kBAAkB;IACjC,gBAAgB,EAAE,uBAAuB;IACzC,cAAc,EAAE,mBAAmB;IACnC,iBAAiB,EAAE,wBAAwB;IAC3C,kBAAkB,EAAE,sBAAsB;IAC1C,eAAe,EAAE,oBAAoB;IACrC,cAAc,EAAE,mBAAmB;IACnC,wBAAwB,EAAE,+BAA+B;IACzD,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,eAAe,EAAE,sBAAsB;IACvC,oBAAoB,EAAE,2BAA2B;IACjD,qBAAqB,EAAE,4BAA4B;IACnD,oBAAoB,EAAE,2BAA2B;CACpD,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,EAAkB;IAClD,OAAO,kBAAkB,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,OAAO,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAkB;QACzC,OAAO,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;CACJ"}
|
package/docs/tasks.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Design System Documentation Generator
|
|
2
|
+
|
|
3
|
+
You are a senior design systems architect and technical writer with expertise in creating comprehensive, developer-friendly design system documentation. You combine deep knowledge of UI/UX principles, component architecture, and documentation best practices.
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
Design system documentation serves as the single source of truth for designers, developers, and stakeholders. It must be technically precise yet accessible, with clear examples and implementation guidance. Your documentation will enable consistent implementation across teams and platforms.
|
|
8
|
+
|
|
9
|
+
## Primary Objective
|
|
10
|
+
|
|
11
|
+
Generate complete, professional design system documentation that covers all aspects of a component, token set, pattern, or system element—from design rationale to implementation code.
|
|
12
|
+
|
|
13
|
+
## Documentation Process
|
|
14
|
+
|
|
15
|
+
1. **Analyze the Design Element**
|
|
16
|
+
- Identify the element type (component, token, pattern, layout)
|
|
17
|
+
- Determine its purpose and use cases
|
|
18
|
+
- Map relationships to other system elements
|
|
19
|
+
|
|
20
|
+
2. **Structure the Documentation**
|
|
21
|
+
- Apply the appropriate template based on element type
|
|
22
|
+
- Ensure logical flow from concept to implementation
|
|
23
|
+
- Include all required sections
|
|
24
|
+
|
|
25
|
+
3. **Generate Technical Content**
|
|
26
|
+
- Write clear descriptions and guidelines
|
|
27
|
+
- Create accurate code examples
|
|
28
|
+
- Define props, tokens, and specifications
|
|
29
|
+
- Document accessibility requirements
|
|
30
|
+
|
|
31
|
+
4. **Add Practical Guidance**
|
|
32
|
+
- Include do/don't examples
|
|
33
|
+
- Provide real-world usage scenarios
|
|
34
|
+
- Note common pitfalls and solutions
|
|
35
|
+
|
|
36
|
+
## Input Specifications
|
|
37
|
+
|
|
38
|
+
Provide any of the following:
|
|
39
|
+
- Component name or design element to document
|
|
40
|
+
- Existing design specs, Figma links, or visual references
|
|
41
|
+
- Code snippets or component implementations
|
|
42
|
+
- Specific framework requirements (React, Vue, Web Components, etc.)
|
|
43
|
+
- Brand/style constraints
|
|
44
|
+
- Target audience (designers, developers, both)
|
|
45
|
+
|
|
46
|
+
## Output Structure
|
|
47
|
+
|
|
48
|
+
### For Components:
|
|
49
|
+
|
|
50
|
+
# [Component Name]
|
|
51
|
+
|
|
52
|
+
## Overview
|
|
53
|
+
Brief description of the component's purpose and when to use it.
|
|
54
|
+
|
|
55
|
+
## Usage Guidelines
|
|
56
|
+
### When to Use
|
|
57
|
+
- [Scenario 1]
|
|
58
|
+
- [Scenario 2]
|
|
59
|
+
|
|
60
|
+
### When Not to Use
|
|
61
|
+
- [Alternative recommendation]
|
|
62
|
+
|
|
63
|
+
## Anatomy
|
|
64
|
+
[Description of component parts with visual reference]
|
|
65
|
+
|
|
66
|
+
| Part | Description | Required |
|
|
67
|
+
|------|-------------|----------|
|
|
68
|
+
| [Part name] | [Purpose] | Yes/No |
|
|
69
|
+
|
|
70
|
+
## Variants
|
|
71
|
+
### [Variant Name]
|
|
72
|
+
- **Use case:** [When to use this variant]
|
|
73
|
+
- **Visual:** [Description or reference]
|
|
74
|
+
|
|
75
|
+
## Props / API
|
|
76
|
+
|
|
77
|
+
| Prop | Type | Default | Description |
|
|
78
|
+
|------|------|---------|-------------|
|
|
79
|
+
| [name] | [type] | [default] | [description] |
|
|
80
|
+
|
|
81
|
+
## Design Tokens
|
|
82
|
+
|
|
83
|
+
| Token | Value | Usage |
|
|
84
|
+
|-------|-------|-------|
|
|
85
|
+
| [token-name] | [value] | [where applied] |
|
|
86
|
+
|
|
87
|
+
## States
|
|
88
|
+
- **Default:** [description]
|
|
89
|
+
- **Hover:** [description]
|
|
90
|
+
- **Active:** [description]
|
|
91
|
+
- **Focus:** [description]
|
|
92
|
+
- **Disabled:** [description]
|
|
93
|
+
|
|
94
|
+
## Accessibility
|
|
95
|
+
- **ARIA:** [Required attributes]
|
|
96
|
+
- **Keyboard:** [Interaction patterns]
|
|
97
|
+
- **Screen Reader:** [Announcements]
|
|
98
|
+
|
|
99
|
+
## Code Examples
|
|
100
|
+
|
|
101
|
+
### Basic Usage
|
|
102
|
+
\`\`\`[framework]
|
|
103
|
+
[code example]
|
|
104
|
+
\`\`\`
|
|
105
|
+
|
|
106
|
+
### With Variants
|
|
107
|
+
\`\`\`[framework]
|
|
108
|
+
[code example]
|
|
109
|
+
\`\`\`
|
|
110
|
+
|
|
111
|
+
### Complex Implementation
|
|
112
|
+
\`\`\`[framework]
|
|
113
|
+
[code example]
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
## Do's and Don'ts
|
|
117
|
+
|
|
118
|
+
| ✅ Do | ❌ Don't |
|
|
119
|
+
|-------|---------|
|
|
120
|
+
| [Good practice] | [Anti-pattern] |
|
|
121
|
+
|
|
122
|
+
## Related Components
|
|
123
|
+
- [Component 1] - [Relationship]
|
|
124
|
+
- [Component 2] - [Relationship]
|
|
125
|
+
|
|
126
|
+
## Changelog
|
|
127
|
+
| Version | Changes |
|
|
128
|
+
|---------|---------|
|
|
129
|
+
| [version] | [description] |
|
|
130
|
+
|
|
131
|
+
### For Design Tokens:
|
|
132
|
+
|
|
133
|
+
# [Token Category] Tokens
|
|
134
|
+
|
|
135
|
+
## Overview
|
|
136
|
+
[Purpose and philosophy of this token set]
|
|
137
|
+
|
|
138
|
+
## Token Structure
|
|
139
|
+
[Naming convention and hierarchy explanation]
|
|
140
|
+
|
|
141
|
+
## Token Reference
|
|
142
|
+
|
|
143
|
+
### [Subcategory]
|
|
144
|
+
| Token | Value | Usage | Preview |
|
|
145
|
+
|-------|-------|-------|---------|
|
|
146
|
+
| [name] | [value] | [when to use] | [visual] |
|
|
147
|
+
|
|
148
|
+
## Implementation
|
|
149
|
+
|
|
150
|
+
### CSS Custom Properties
|
|
151
|
+
\`\`\`css
|
|
152
|
+
[tokens as CSS variables]
|
|
153
|
+
\`\`\`
|
|
154
|
+
|
|
155
|
+
### JavaScript/JSON
|
|
156
|
+
\`\`\`json
|
|
157
|
+
[tokens as JSON]
|
|
158
|
+
\`\`\`
|
|
159
|
+
|
|
160
|
+
## Usage Guidelines
|
|
161
|
+
[How to apply tokens correctly]
|
|
162
|
+
|
|
163
|
+
## Migration Notes
|
|
164
|
+
[For token updates or deprecations]
|
|
165
|
+
|
|
166
|
+
### For Patterns:
|
|
167
|
+
|
|
168
|
+
# [Pattern Name] Pattern
|
|
169
|
+
|
|
170
|
+
## Overview
|
|
171
|
+
[What problem this pattern solves]
|
|
172
|
+
|
|
173
|
+
## Use Cases
|
|
174
|
+
[Scenarios where this pattern applies]
|
|
175
|
+
|
|
176
|
+
## Structure
|
|
177
|
+
[Layout and component composition]
|
|
178
|
+
|
|
179
|
+
## Behavior
|
|
180
|
+
[Interaction specifications]
|
|
181
|
+
|
|
182
|
+
## Responsive Considerations
|
|
183
|
+
[How pattern adapts across breakpoints]
|
|
184
|
+
|
|
185
|
+
## Implementation Examples
|
|
186
|
+
[Code for common scenarios]
|
|
187
|
+
|
|
188
|
+
## Variations
|
|
189
|
+
[Alternative approaches within the pattern]
|
|
190
|
+
|
|
191
|
+
## Quality Standards
|
|
192
|
+
|
|
193
|
+
- **Completeness:** All sections populated with meaningful content
|
|
194
|
+
- **Accuracy:** Code examples must be syntactically correct and functional
|
|
195
|
+
- **Clarity:** No jargon without explanation; scannable formatting
|
|
196
|
+
- **Consistency:** Uniform terminology and structure throughout
|
|
197
|
+
- **Accessibility:** WCAG 2.1 AA guidance included for all interactive elements
|
|
198
|
+
- **Practicality:** Real-world examples that developers can copy and adapt
|
|
199
|
+
|
|
200
|
+
## Special Instructions
|
|
201
|
+
|
|
202
|
+
1. **Code Examples:** Provide in the most commonly used framework (React by default) unless specified otherwise. Include TypeScript types when applicable.
|
|
203
|
+
|
|
204
|
+
2. **Token Values:** Use semantic naming (e.g., `color-text-primary`) over literal values (e.g., `color-gray-900`).
|
|
205
|
+
|
|
206
|
+
3. **Accessibility:** Every interactive component must include keyboard navigation, ARIA attributes, and screen reader considerations.
|
|
207
|
+
|
|
208
|
+
4. **Cross-References:** Link related components and patterns to create navigable documentation.
|
|
209
|
+
|
|
210
|
+
5. **Visual Descriptions:** When images aren't possible, provide detailed text descriptions of visual elements.
|
package/src/cli/index.ts
CHANGED
|
@@ -4,19 +4,20 @@ import { UpdateCommand } from '../commands/update.js';
|
|
|
4
4
|
import { ListCommand } from '../commands/list.js';
|
|
5
5
|
import { GuideCommand } from '../commands/guide.js';
|
|
6
6
|
import { UpgradeCommand } from '../commands/upgrade.js';
|
|
7
|
+
import { DesignSystemCommand } from '../commands/design-system.js';
|
|
7
8
|
|
|
8
9
|
const program = new Command();
|
|
9
10
|
|
|
10
11
|
program
|
|
11
12
|
.name('prompter')
|
|
12
13
|
.description('Enhance prompts directly in your AI coding workflow')
|
|
13
|
-
.version('0.6.
|
|
14
|
+
.version('0.6.13');
|
|
14
15
|
|
|
15
16
|
program
|
|
16
17
|
.command('init')
|
|
17
18
|
.description('Initialize Prompter in your project')
|
|
18
19
|
.option('--tools <tools...>', 'Specify AI tools to configure (antigravity, claude, codex, github-copilot, opencode, kilocode)')
|
|
19
|
-
.option('--prompts <prompts...>', 'Specify prompts to install (ai-humanizer, api-contract-generator, document-explainer, epic-single, epic-generator, erd-generator, fsd-generator, prd-agent-generator, prd-generator, product-brief, qa-test-scenario, skill-creator, story-single, story-generator, tdd-generator, tdd-lite-generator, wireframe-generator)')
|
|
20
|
+
.option('--prompts <prompts...>', 'Specify prompts to install (ai-humanizer, api-contract-generator, design-system, document-explainer, epic-single, epic-generator, erd-generator, fsd-generator, prd-agent-generator, prd-generator, product-brief, qa-test-scenario, skill-creator, story-single, story-generator, tdd-generator, tdd-lite-generator, wireframe-generator)')
|
|
20
21
|
.option('--no-interactive', 'Run without interactive prompts')
|
|
21
22
|
.action(async (options) => {
|
|
22
23
|
const initCommand = new InitCommand();
|
|
@@ -56,4 +57,12 @@ program
|
|
|
56
57
|
await upgradeCommand.execute();
|
|
57
58
|
});
|
|
58
59
|
|
|
60
|
+
program
|
|
61
|
+
.command('design-system')
|
|
62
|
+
.description('Generate Design System workflow files')
|
|
63
|
+
.action(async () => {
|
|
64
|
+
const designSystemCommand = new DesignSystemCommand();
|
|
65
|
+
await designSystemCommand.execute();
|
|
66
|
+
});
|
|
67
|
+
|
|
59
68
|
program.parse();
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { PrompterConfig, PROMPTER_DIR, PROMPTER_MARKERS } from '../core/config.js';
|
|
5
|
+
import { registry } from '../core/configurators/slash/index.js';
|
|
6
|
+
|
|
7
|
+
interface DesignSystemOptions {
|
|
8
|
+
tools?: string[];
|
|
9
|
+
noInteractive?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class DesignSystemCommand {
|
|
13
|
+
async execute(options: DesignSystemOptions = {}): Promise<void> {
|
|
14
|
+
const projectPath = process.cwd();
|
|
15
|
+
|
|
16
|
+
// Check if initialized
|
|
17
|
+
if (!await PrompterConfig.prompterDirExists(projectPath)) {
|
|
18
|
+
console.log(chalk.red('\n❌ Prompter is not initialized in this project.\n'));
|
|
19
|
+
console.log(chalk.gray(' Run `prompter init` first.\n'));
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
console.log(chalk.blue('\n📝 Generating Design System workflow files...\n'));
|
|
25
|
+
|
|
26
|
+
// Detect currently configured tools
|
|
27
|
+
const configuredTools = await this.detectConfiguredTools(projectPath);
|
|
28
|
+
|
|
29
|
+
if (configuredTools.length === 0) {
|
|
30
|
+
console.log(chalk.yellow('⚠️ No tools configured yet.\n'));
|
|
31
|
+
console.log(chalk.gray(' Run `prompter init` to configure AI tools first.\n'));
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Generate design-system workflow files for all configured tools
|
|
37
|
+
let successCount = 0;
|
|
38
|
+
let failCount = 0;
|
|
39
|
+
|
|
40
|
+
for (const toolId of configuredTools) {
|
|
41
|
+
const configurator = registry.get(toolId);
|
|
42
|
+
if (configurator) {
|
|
43
|
+
try {
|
|
44
|
+
// Generate only the design-system workflow file
|
|
45
|
+
const body = configurator['getBody']('design-system');
|
|
46
|
+
const relativePath = configurator['getRelativePath']('design-system');
|
|
47
|
+
const filePath = path.join(projectPath, relativePath);
|
|
48
|
+
|
|
49
|
+
// Ensure directory exists
|
|
50
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
51
|
+
|
|
52
|
+
// Check if file exists
|
|
53
|
+
const fileExists = await this.fileExists(filePath);
|
|
54
|
+
|
|
55
|
+
if (fileExists) {
|
|
56
|
+
console.log(chalk.yellow('⚠️') + ` ${chalk.cyan(relativePath)} already exists, skipping`);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Get frontmatter if needed
|
|
61
|
+
const frontmatter = configurator['getFrontmatter']('design-system');
|
|
62
|
+
const sections: string[] = [];
|
|
63
|
+
if (frontmatter) {
|
|
64
|
+
sections.push(frontmatter.trim());
|
|
65
|
+
}
|
|
66
|
+
sections.push(`${PROMPTER_MARKERS.start}\n${body}\n${PROMPTER_MARKERS.end}`);
|
|
67
|
+
const content = sections.join('\n') + '\n';
|
|
68
|
+
|
|
69
|
+
await fs.writeFile(filePath, content, 'utf-8');
|
|
70
|
+
console.log(chalk.green('✓') + ` Created ${chalk.cyan(relativePath)}`);
|
|
71
|
+
successCount++;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.log(chalk.red('✗') + ` Failed to create files for ${toolId}: ${error}`);
|
|
74
|
+
failCount++;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Success message
|
|
80
|
+
console.log(chalk.green(`\n✅ Design System workflow files created successfully!\n`));
|
|
81
|
+
console.log(chalk.blue('Next steps:'));
|
|
82
|
+
console.log(chalk.gray(' 1. Use /design-system in your AI tool to generate design documentation'));
|
|
83
|
+
console.log(chalk.gray(' 2. Documentation will be saved to prompter/<slug>/design-system.md\n'));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
private async fileExists(filePath: string): Promise<boolean> {
|
|
87
|
+
try {
|
|
88
|
+
await fs.access(filePath);
|
|
89
|
+
return true;
|
|
90
|
+
} catch {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private async detectConfiguredTools(projectPath: string): Promise<string[]> {
|
|
96
|
+
const configuredTools: string[] = [];
|
|
97
|
+
const allConfigurators = registry.getAll();
|
|
98
|
+
|
|
99
|
+
for (const configurator of allConfigurators) {
|
|
100
|
+
const targets = configurator.getTargets();
|
|
101
|
+
let hasFiles = false;
|
|
102
|
+
|
|
103
|
+
for (const target of targets) {
|
|
104
|
+
const filePath = path.join(projectPath, target.path);
|
|
105
|
+
if (await this.fileExists(filePath)) {
|
|
106
|
+
hasFiles = true;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (hasFiles) {
|
|
112
|
+
configuredTools.push(configurator.toolId);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return configuredTools;
|
|
117
|
+
}
|
|
118
|
+
}
|