@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
package/src/commands/guide.ts
CHANGED
|
@@ -7,5 +7,35 @@ export class GuideCommand {
|
|
|
7
7
|
console.log(chalk.gray(' document based on the project\'s specifics, including a clear description'));
|
|
8
8
|
console.log(chalk.gray(' of the project, its purpose, the technologies used (tech stack), and any'));
|
|
9
9
|
console.log(chalk.gray(' conventions or standards being followed.'));
|
|
10
|
+
|
|
11
|
+
console.log(chalk.blue('\nDocument Workflow & Dependencies:'));
|
|
12
|
+
console.log(chalk.gray(' This table shows the recommended order for document generation:\n'));
|
|
13
|
+
|
|
14
|
+
// Print table header
|
|
15
|
+
console.log(chalk.cyan(' Document │ Strictly Required Inputs │ Recommended Extra Inputs'));
|
|
16
|
+
console.log(chalk.cyan(' ─────────────────┼───────────────────────────────────────┼──────────────────────────────────'));
|
|
17
|
+
|
|
18
|
+
// Table rows
|
|
19
|
+
const rows = [
|
|
20
|
+
['Product Brief ', '— ', '—'],
|
|
21
|
+
['PRD ', 'Product Brief ', '—'],
|
|
22
|
+
['FSD ', 'PRD ', 'Product Brief'],
|
|
23
|
+
['ERD ', 'FSD ', '—'],
|
|
24
|
+
['API Contract ', 'FSD + ERD ', '—'],
|
|
25
|
+
['UI Wireframes ', 'FSD + ERD + API Contract ', '—'],
|
|
26
|
+
['Design System ', 'UI Wireframes (new) / FSD (existing) ', 'Brand guide / existing UI'],
|
|
27
|
+
['TDD ', 'FSD ', 'ERD + API Contract + UI Wireframes + Design System'],
|
|
28
|
+
['Epics ', 'FSD + TDD-Lite ', 'UI Wireframes + Design System'],
|
|
29
|
+
['Stories ', 'Epics ', 'FSD + UI Wireframes + API Contract']
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
rows.forEach(row => {
|
|
33
|
+
console.log(chalk.gray(` ${row[0]} │ ${row[1]} │ ${row[2]}`));
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
console.log(chalk.gray('\n Legend:'));
|
|
37
|
+
console.log(chalk.gray(' • Strictly Required: Must-have inputs for high-quality output'));
|
|
38
|
+
console.log(chalk.gray(' • Recommended Extra: Optional inputs that improve document quality'));
|
|
39
|
+
console.log(chalk.gray(' • (new) = For new projects | (existing) = For existing projects\n'));
|
|
10
40
|
}
|
|
11
41
|
}
|
package/src/core/config.ts
CHANGED
|
@@ -44,6 +44,12 @@ export const AVAILABLE_PROMPTS: PromptChoice[] = [
|
|
|
44
44
|
description: 'Generate OpenAPI specification from FSD and ERD',
|
|
45
45
|
sourceFile: 'api-contract-generator.md'
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Design System',
|
|
49
|
+
value: 'design-system',
|
|
50
|
+
description: 'Generate comprehensive design system documentation for components and tokens',
|
|
51
|
+
sourceFile: 'design-system.md'
|
|
52
|
+
},
|
|
47
53
|
{
|
|
48
54
|
name: 'Document Explainer',
|
|
49
55
|
value: 'document-explainer',
|
|
@@ -14,6 +14,7 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
14
14
|
'skill-creator': '.agent/workflows/skill-creator.md',
|
|
15
15
|
'ai-humanizer': '.agent/workflows/ai-humanizer.md',
|
|
16
16
|
'api-contract-generator': '.agent/workflows/api-contract-generator.md',
|
|
17
|
+
'design-system': '.agent/workflows/design-system.md',
|
|
17
18
|
'erd-generator': '.agent/workflows/erd-generator.md',
|
|
18
19
|
'fsd-generator': '.agent/workflows/fsd-generator.md',
|
|
19
20
|
'tdd-generator': '.agent/workflows/tdd-generator.md',
|
|
@@ -35,6 +36,7 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
35
36
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
36
37
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
37
38
|
'api-contract-generator': 'Generate OpenAPI specification from FSD and ERD',
|
|
39
|
+
'design-system': 'Generate comprehensive design system documentation for components and tokens',
|
|
38
40
|
'erd-generator': 'Generate Entity Relationship Diagram from FSD',
|
|
39
41
|
'fsd-generator': 'Generate Functional Specification Document from PRD',
|
|
40
42
|
'tdd-generator': 'Generate comprehensive Technical Design Document',
|
|
@@ -14,6 +14,7 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
14
14
|
'skill-creator': '.claude/commands/prompter/skill-creator.md',
|
|
15
15
|
'ai-humanizer': '.claude/commands/prompter/ai-humanizer.md',
|
|
16
16
|
'api-contract-generator': '.claude/commands/prompter/api-contract-generator.md',
|
|
17
|
+
'design-system': '.claude/commands/prompter/design-system.md',
|
|
17
18
|
'erd-generator': '.claude/commands/prompter/erd-generator.md',
|
|
18
19
|
'fsd-generator': '.claude/commands/prompter/fsd-generator.md',
|
|
19
20
|
'tdd-generator': '.claude/commands/prompter/tdd-generator.md',
|
|
@@ -35,6 +36,7 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
35
36
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
36
37
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
37
38
|
'api-contract-generator': 'Generate OpenAPI specification from FSD and ERD',
|
|
39
|
+
'design-system': 'Generate comprehensive design system documentation for components and tokens',
|
|
38
40
|
'erd-generator': 'Generate Entity Relationship Diagram from FSD',
|
|
39
41
|
'fsd-generator': 'Generate Functional Specification Document from PRD',
|
|
40
42
|
'tdd-generator': 'Generate comprehensive Technical Design Document',
|
|
@@ -14,6 +14,7 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
14
14
|
'skill-creator': '.codex/prompts/skill-creator.md',
|
|
15
15
|
'ai-humanizer': '.codex/prompts/ai-humanizer.md',
|
|
16
16
|
'api-contract-generator': '.codex/prompts/api-contract-generator.md',
|
|
17
|
+
'design-system': '.codex/prompts/design-system.md',
|
|
17
18
|
'erd-generator': '.codex/prompts/erd-generator.md',
|
|
18
19
|
'fsd-generator': '.codex/prompts/fsd-generator.md',
|
|
19
20
|
'tdd-generator': '.codex/prompts/tdd-generator.md',
|
|
@@ -35,6 +36,7 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
35
36
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
36
37
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
37
38
|
'api-contract-generator': 'Generate OpenAPI specification from FSD and ERD',
|
|
39
|
+
'design-system': 'Generate comprehensive design system documentation for components and tokens',
|
|
38
40
|
'erd-generator': 'Generate Entity Relationship Diagram from FSD',
|
|
39
41
|
'fsd-generator': 'Generate Functional Specification Document from PRD',
|
|
40
42
|
'tdd-generator': 'Generate comprehensive Technical Design Document',
|
|
@@ -17,6 +17,7 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
17
17
|
'skill-creator': '.github/prompts/skill-creator.prompt.md',
|
|
18
18
|
'ai-humanizer': '.github/prompts/ai-humanizer.prompt.md',
|
|
19
19
|
'api-contract-generator': '.github/prompts/api-contract-generator.prompt.md',
|
|
20
|
+
'design-system': '.github/prompts/design-system.prompt.md',
|
|
20
21
|
'erd-generator': '.github/prompts/erd-generator.prompt.md',
|
|
21
22
|
'fsd-generator': '.github/prompts/fsd-generator.prompt.md',
|
|
22
23
|
'tdd-generator': '.github/prompts/tdd-generator.prompt.md',
|
|
@@ -38,6 +39,7 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
38
39
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
39
40
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
40
41
|
'api-contract-generator': 'Generate OpenAPI specification from FSD and ERD',
|
|
42
|
+
'design-system': 'Generate comprehensive design system documentation for components and tokens',
|
|
41
43
|
'erd-generator': 'Generate Entity Relationship Diagram from FSD',
|
|
42
44
|
'fsd-generator': 'Generate Functional Specification Document from PRD',
|
|
43
45
|
'tdd-generator': 'Generate comprehensive Technical Design Document',
|
|
@@ -14,6 +14,7 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
14
14
|
'skill-creator': '.kilocode/workflows/skill-creator.md',
|
|
15
15
|
'ai-humanizer': '.kilocode/workflows/ai-humanizer.md',
|
|
16
16
|
'api-contract-generator': '.kilocode/workflows/api-contract-generator.md',
|
|
17
|
+
'design-system': '.kilocode/workflows/design-system.md',
|
|
17
18
|
'erd-generator': '.kilocode/workflows/erd-generator.md',
|
|
18
19
|
'fsd-generator': '.kilocode/workflows/fsd-generator.md',
|
|
19
20
|
'tdd-generator': '.kilocode/workflows/tdd-generator.md',
|
|
@@ -35,6 +36,7 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
35
36
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
36
37
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
37
38
|
'api-contract-generator': 'Generate OpenAPI specification from FSD and ERD',
|
|
39
|
+
'design-system': 'Generate comprehensive design system documentation for components and tokens',
|
|
38
40
|
'erd-generator': 'Generate Entity Relationship Diagram from FSD',
|
|
39
41
|
'fsd-generator': 'Generate Functional Specification Document from PRD',
|
|
40
42
|
'tdd-generator': 'Generate comprehensive Technical Design Document',
|
|
@@ -14,6 +14,7 @@ const FILE_PATHS: Record<SlashCommandId, string> = {
|
|
|
14
14
|
'skill-creator': '.opencode/command/skill-creator.md',
|
|
15
15
|
'ai-humanizer': '.opencode/command/ai-humanizer.md',
|
|
16
16
|
'api-contract-generator': '.opencode/command/api-contract-generator.md',
|
|
17
|
+
'design-system': '.opencode/command/design-system.md',
|
|
17
18
|
'erd-generator': '.opencode/command/erd-generator.md',
|
|
18
19
|
'fsd-generator': '.opencode/command/fsd-generator.md',
|
|
19
20
|
'tdd-generator': '.opencode/command/tdd-generator.md',
|
|
@@ -35,6 +36,7 @@ const DESCRIPTIONS: Record<SlashCommandId, string> = {
|
|
|
35
36
|
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
36
37
|
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
37
38
|
'api-contract-generator': 'Generate OpenAPI specification from FSD and ERD',
|
|
39
|
+
'design-system': 'Generate comprehensive design system documentation for components and tokens',
|
|
38
40
|
'erd-generator': 'Generate Entity Relationship Diagram from FSD',
|
|
39
41
|
'fsd-generator': 'Generate Functional Specification Document from PRD',
|
|
40
42
|
'tdd-generator': 'Generate comprehensive Technical Design Document',
|
|
@@ -46,6 +46,217 @@ You are an expert copywriter and proofreader. Your mission is to meticulously re
|
|
|
46
46
|
- Be vigilant about proper punctuation in every sentence.
|
|
47
47
|
- Ensure the final output is indistinguishable from human writing.
|
|
48
48
|
`;
|
|
49
|
+
export const DESIGN_SYSTEM_TEMPLATE = `# Design System Documentation Generator
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
## Context
|
|
54
|
+
|
|
55
|
+
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.
|
|
56
|
+
|
|
57
|
+
## Primary Objective
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
## Documentation Process
|
|
62
|
+
|
|
63
|
+
1. **Analyze the Design Element**
|
|
64
|
+
- Identify the element type (component, token, pattern, layout)
|
|
65
|
+
- Determine its purpose and use cases
|
|
66
|
+
- Map relationships to other system elements
|
|
67
|
+
|
|
68
|
+
2. **Structure the Documentation**
|
|
69
|
+
- Apply the appropriate template based on element type
|
|
70
|
+
- Ensure logical flow from concept to implementation
|
|
71
|
+
- Include all required sections
|
|
72
|
+
|
|
73
|
+
3. **Generate Technical Content**
|
|
74
|
+
- Write clear descriptions and guidelines
|
|
75
|
+
- Create accurate code examples
|
|
76
|
+
- Define props, tokens, and specifications
|
|
77
|
+
- Document accessibility requirements
|
|
78
|
+
|
|
79
|
+
4. **Add Practical Guidance**
|
|
80
|
+
- Include do/don't examples
|
|
81
|
+
- Provide real-world usage scenarios
|
|
82
|
+
- Note common pitfalls and solutions
|
|
83
|
+
|
|
84
|
+
## Input Specifications
|
|
85
|
+
|
|
86
|
+
Provide any of the following:
|
|
87
|
+
- Component name or design element to document
|
|
88
|
+
- Existing design specs, Figma links, or visual references
|
|
89
|
+
- Code snippets or component implementations
|
|
90
|
+
- Specific framework requirements (React, Vue, Web Components, etc.)
|
|
91
|
+
- Brand/style constraints
|
|
92
|
+
- Target audience (designers, developers, both)
|
|
93
|
+
|
|
94
|
+
## Output Structure
|
|
95
|
+
|
|
96
|
+
### For Components:
|
|
97
|
+
|
|
98
|
+
# [Component Name]
|
|
99
|
+
|
|
100
|
+
## Overview
|
|
101
|
+
Brief description of the component's purpose and when to use it.
|
|
102
|
+
|
|
103
|
+
## Usage Guidelines
|
|
104
|
+
### When to Use
|
|
105
|
+
- [Scenario 1]
|
|
106
|
+
- [Scenario 2]
|
|
107
|
+
|
|
108
|
+
### When Not to Use
|
|
109
|
+
- [Alternative recommendation]
|
|
110
|
+
|
|
111
|
+
## Anatomy
|
|
112
|
+
[Description of component parts with visual reference]
|
|
113
|
+
|
|
114
|
+
| Part | Description | Required |
|
|
115
|
+
|------|-------------|----------|
|
|
116
|
+
| [Part name] | [Purpose] | Yes/No |
|
|
117
|
+
|
|
118
|
+
## Variants
|
|
119
|
+
### [Variant Name]
|
|
120
|
+
- **Use case:** [When to use this variant]
|
|
121
|
+
- **Visual:** [Description or reference]
|
|
122
|
+
|
|
123
|
+
## Props / API
|
|
124
|
+
|
|
125
|
+
| Prop | Type | Default | Description |
|
|
126
|
+
|------|------|---------|-------------|
|
|
127
|
+
| [name] | [type] | [default] | [description] |
|
|
128
|
+
|
|
129
|
+
## Design Tokens
|
|
130
|
+
|
|
131
|
+
| Token | Value | Usage |
|
|
132
|
+
|-------|-------|-------|
|
|
133
|
+
| [token-name] | [value] | [where applied] |
|
|
134
|
+
|
|
135
|
+
## States
|
|
136
|
+
- **Default:** [description]
|
|
137
|
+
- **Hover:** [description]
|
|
138
|
+
- **Active:** [description]
|
|
139
|
+
- **Focus:** [description]
|
|
140
|
+
- **Disabled:** [description]
|
|
141
|
+
|
|
142
|
+
## Accessibility
|
|
143
|
+
- **ARIA:** [Required attributes]
|
|
144
|
+
- **Keyboard:** [Interaction patterns]
|
|
145
|
+
- **Screen Reader:** [Announcements]
|
|
146
|
+
|
|
147
|
+
## Code Examples
|
|
148
|
+
|
|
149
|
+
### Basic Usage
|
|
150
|
+
\`\`\`[framework]
|
|
151
|
+
[code example]
|
|
152
|
+
\`\`\`
|
|
153
|
+
|
|
154
|
+
### With Variants
|
|
155
|
+
\`\`\`[framework]
|
|
156
|
+
[code example]
|
|
157
|
+
\`\`\`
|
|
158
|
+
|
|
159
|
+
### Complex Implementation
|
|
160
|
+
\`\`\`[framework]
|
|
161
|
+
[code example]
|
|
162
|
+
\`\`\`
|
|
163
|
+
|
|
164
|
+
## Do's and Don'ts
|
|
165
|
+
|
|
166
|
+
| ✅ Do | ❌ Don't |
|
|
167
|
+
|-------|---------|
|
|
168
|
+
| [Good practice] | [Anti-pattern] |
|
|
169
|
+
|
|
170
|
+
## Related Components
|
|
171
|
+
- [Component 1] - [Relationship]
|
|
172
|
+
- [Component 2] - [Relationship]
|
|
173
|
+
|
|
174
|
+
## Changelog
|
|
175
|
+
| Version | Changes |
|
|
176
|
+
|---------|---------|
|
|
177
|
+
| [version] | [description] |
|
|
178
|
+
|
|
179
|
+
### For Design Tokens:
|
|
180
|
+
|
|
181
|
+
# [Token Category] Tokens
|
|
182
|
+
|
|
183
|
+
## Overview
|
|
184
|
+
[Purpose and philosophy of this token set]
|
|
185
|
+
|
|
186
|
+
## Token Structure
|
|
187
|
+
[Naming convention and hierarchy explanation]
|
|
188
|
+
|
|
189
|
+
## Token Reference
|
|
190
|
+
|
|
191
|
+
### [Subcategory]
|
|
192
|
+
| Token | Value | Usage | Preview |
|
|
193
|
+
|-------|-------|-------|---------|
|
|
194
|
+
| [name] | [value] | [when to use] | [visual] |
|
|
195
|
+
|
|
196
|
+
## Implementation
|
|
197
|
+
|
|
198
|
+
### CSS Custom Properties
|
|
199
|
+
\`\`\`css
|
|
200
|
+
[tokens as CSS variables]
|
|
201
|
+
\`\`\`
|
|
202
|
+
|
|
203
|
+
### JavaScript/JSON
|
|
204
|
+
\`\`\`json
|
|
205
|
+
[tokens as JSON]
|
|
206
|
+
\`\`\`
|
|
207
|
+
|
|
208
|
+
## Usage Guidelines
|
|
209
|
+
[How to apply tokens correctly]
|
|
210
|
+
|
|
211
|
+
## Migration Notes
|
|
212
|
+
[For token updates or deprecations]
|
|
213
|
+
|
|
214
|
+
### For Patterns:
|
|
215
|
+
|
|
216
|
+
# [Pattern Name] Pattern
|
|
217
|
+
|
|
218
|
+
## Overview
|
|
219
|
+
[What problem this pattern solves]
|
|
220
|
+
|
|
221
|
+
## Use Cases
|
|
222
|
+
[Scenarios where this pattern applies]
|
|
223
|
+
|
|
224
|
+
## Structure
|
|
225
|
+
[Layout and component composition]
|
|
226
|
+
|
|
227
|
+
## Behavior
|
|
228
|
+
[Interaction specifications]
|
|
229
|
+
|
|
230
|
+
## Responsive Considerations
|
|
231
|
+
[How pattern adapts across breakpoints]
|
|
232
|
+
|
|
233
|
+
## Implementation Examples
|
|
234
|
+
[Code for common scenarios]
|
|
235
|
+
|
|
236
|
+
## Variations
|
|
237
|
+
[Alternative approaches within the pattern]
|
|
238
|
+
|
|
239
|
+
## Quality Standards
|
|
240
|
+
|
|
241
|
+
- **Completeness:** All sections populated with meaningful content
|
|
242
|
+
- **Accuracy:** Code examples must be syntactically correct and functional
|
|
243
|
+
- **Clarity:** No jargon without explanation; scannable formatting
|
|
244
|
+
- **Consistency:** Uniform terminology and structure throughout
|
|
245
|
+
- **Accessibility:** WCAG 2.1 AA guidance included for all interactive elements
|
|
246
|
+
- **Practicality:** Real-world examples that developers can copy and adapt
|
|
247
|
+
|
|
248
|
+
## Special Instructions
|
|
249
|
+
|
|
250
|
+
1. **Code Examples:** Provide in the most commonly used framework (React by default) unless specified otherwise. Include TypeScript types when applicable.
|
|
251
|
+
|
|
252
|
+
2. **Token Values:** Use semantic naming (e.g., \`color-text-primary\`) over literal values (e.g., \`color-gray-900\`).
|
|
253
|
+
|
|
254
|
+
3. **Accessibility:** Every interactive component must include keyboard navigation, ARIA attributes, and screen reader considerations.
|
|
255
|
+
|
|
256
|
+
4. **Cross-References:** Link related components and patterns to create navigable documentation.
|
|
257
|
+
|
|
258
|
+
5. **Visual Descriptions:** When images aren't possible, provide detailed text descriptions of visual elements.
|
|
259
|
+
`;
|
|
49
260
|
export const DOCUMENT_EXPLAINER_TEMPLATE = `# Document Explainer & Analyzer
|
|
50
261
|
|
|
51
262
|
You are an expert document analyst and technical communicator skilled at breaking down complex materials into clear, actionable insights.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
API_CONTRACT_GENERATOR_TEMPLATE,
|
|
3
|
+
DESIGN_SYSTEM_TEMPLATE,
|
|
3
4
|
EPIC_GENERATOR_TEMPLATE,
|
|
4
5
|
ERD_GENERATOR_TEMPLATE,
|
|
5
6
|
FSD_GENERATOR_TEMPLATE,
|
|
@@ -10,7 +11,7 @@ import {
|
|
|
10
11
|
DOCUMENT_EXPLAINER_TEMPLATE
|
|
11
12
|
} from '../prompt-templates.js';
|
|
12
13
|
|
|
13
|
-
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';
|
|
14
|
+
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';
|
|
14
15
|
|
|
15
16
|
const enhanceWorkflow = `## MUST FOLLOW
|
|
16
17
|
- Response Language: {User Request Language}
|
|
@@ -1041,6 +1042,7 @@ export const slashCommandBodies: Record<SlashCommandId, string> = {
|
|
|
1041
1042
|
'skill-creator': skillCreatorWorkflow,
|
|
1042
1043
|
'ai-humanizer': aiHumanizerWorkflow,
|
|
1043
1044
|
'api-contract-generator': API_CONTRACT_GENERATOR_TEMPLATE,
|
|
1045
|
+
'design-system': DESIGN_SYSTEM_TEMPLATE,
|
|
1044
1046
|
'erd-generator': ERD_GENERATOR_TEMPLATE,
|
|
1045
1047
|
'fsd-generator': FSD_GENERATOR_TEMPLATE,
|
|
1046
1048
|
'tdd-generator': TDD_GENERATOR_TEMPLATE,
|