@torka/claude-workflows 0.12.0 → 0.13.1
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/.claude-plugin/plugin.json +8 -0
- package/README.md +22 -5
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-01b-continue.md +9 -2
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-02-orchestrate.md +108 -2
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-03-complete.md +35 -1
- package/commands/deep-audit.md +389 -0
- package/commands/dev-story-backend.md +12 -11
- package/commands/dev-story-fullstack.md +6 -2
- package/commands/dev-story-ui.md +4 -4
- package/commands/github-pr-resolve.md +132 -24
- package/install.js +2 -3
- package/package.json +1 -1
- package/skills/deep-audit/INSPIRATIONS.md +26 -0
- package/skills/deep-audit/SKILL.md +253 -0
- package/skills/deep-audit/agents/api-contract-reviewer.md +38 -0
- package/skills/deep-audit/agents/architecture-and-complexity.md +48 -0
- package/skills/deep-audit/agents/code-health.md +51 -0
- package/skills/deep-audit/agents/data-layer-reviewer.md +39 -0
- package/skills/deep-audit/agents/performance-profiler.md +38 -0
- package/skills/deep-audit/agents/security-and-error-handling.md +52 -0
- package/skills/deep-audit/agents/seo-accessibility-auditor.md +49 -0
- package/skills/deep-audit/agents/test-coverage-analyst.md +37 -0
- package/skills/deep-audit/agents/type-design-analyzer.md +38 -0
- package/skills/deep-audit/templates/report-template.md +87 -0
- package/skills/designer-founder/SKILL.md +8 -7
- package/skills/designer-founder/steps/step-01-context.md +94 -45
- package/skills/designer-founder/steps/step-02-scope.md +6 -23
- package/skills/designer-founder/steps/step-03-design.md +29 -58
- package/skills/designer-founder/steps/step-04-artifacts.md +137 -113
- package/skills/designer-founder/steps/step-05-epic-linking.md +81 -53
- package/skills/designer-founder/steps/step-06-validate.md +181 -0
- package/skills/designer-founder/templates/component-strategy.md +4 -0
- package/skills/designer-founder/tools/magicpatterns.md +52 -19
- package/skills/designer-founder/tools/stitch.md +97 -67
- package/uninstall.js +22 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Step 6: Validate & Finalize
|
|
2
|
+
|
|
3
|
+
## MANDATORY EXECUTION RULES (READ FIRST)
|
|
4
|
+
|
|
5
|
+
- NEVER skip the consistency checklist
|
|
6
|
+
- CRITICAL: Auto-fix issues when possible, flag the rest
|
|
7
|
+
- ALWAYS save designer state for session continuity
|
|
8
|
+
- Goal: Quality gate before workflow completion
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## CONTEXT FROM PREVIOUS STEPS
|
|
13
|
+
|
|
14
|
+
You should have:
|
|
15
|
+
- All artifacts created in `{planning_artifacts}/ux-design/`
|
|
16
|
+
- Epic linking completed (or skipped) in Step 5
|
|
17
|
+
- `theme`: Theme info (if used)
|
|
18
|
+
- `design`: Full design state from Step 3
|
|
19
|
+
- `scope`: What was designed
|
|
20
|
+
- `linking_result`: Epic linking results from Step 5
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## YOUR TASK
|
|
25
|
+
|
|
26
|
+
Run a consistency check across all artifacts and product docs, fix issues, and finalize the workflow.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## TASK SEQUENCE
|
|
31
|
+
|
|
32
|
+
### 1. Design Consistency Check
|
|
33
|
+
|
|
34
|
+
Validate all artifacts and product docs:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
DESIGN CONSISTENCY CHECK
|
|
38
|
+
|
|
39
|
+
1. [ ] No hardcoded hex/color values - all colors reference theme tokens
|
|
40
|
+
2. [ ] shadcn install command is complete - every component in any artifact appears in the command
|
|
41
|
+
3. [ ] All tokens referenced in component strategies exist in tokens.json (if theme provided)
|
|
42
|
+
4. [ ] File paths use project naming conventions
|
|
43
|
+
5. [ ] Artifact file names follow epic-{N}-{feature}- prefix pattern
|
|
44
|
+
6. [ ] Epic links are valid (relative paths correct)
|
|
45
|
+
7. [ ] All designed screens have corresponding epic references
|
|
46
|
+
8. [ ] Design decisions and PRD/epics are consistent (no contradictions between specs)
|
|
47
|
+
9. [ ] All referenced UI patterns have component definitions (toasts, loading states, error states)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Run each check against the actual files:
|
|
51
|
+
|
|
52
|
+
**Check 1 (Theme tokens):** If theme was provided, scan artifact files for hex values like `#FF0000` or `rgb()`. All colors should reference CSS custom properties (`var(--primary)`) or Tailwind theme classes.
|
|
53
|
+
|
|
54
|
+
**Check 2 (shadcn completeness):** Extract all shadcn component references from all artifacts. Compare against the install command in the component strategy. Flag any missing.
|
|
55
|
+
|
|
56
|
+
**Check 3 (Token existence):** If `tokens.json` was provided, verify all token references in component strategies match actual keys in the tokens file.
|
|
57
|
+
|
|
58
|
+
**Check 4 (Naming conventions):** Check if file names follow the project's established patterns.
|
|
59
|
+
|
|
60
|
+
**Check 5 (Epic prefix):** Verify all UX artifact files start with `epic-{N}-{feature}-`.
|
|
61
|
+
|
|
62
|
+
**Check 6 (Link validity):** Check all relative paths in epic files point to files that exist.
|
|
63
|
+
|
|
64
|
+
**Check 7 (Screen coverage):** Compare designed screens against epic references. Flag any designed screens without epic references.
|
|
65
|
+
|
|
66
|
+
**Check 8 (Spec consistency):** Check that design decisions documented in artifacts don't contradict PRD or epic requirements.
|
|
67
|
+
|
|
68
|
+
**Check 9 (UI patterns):** If designs reference toasts, loading states, error states, or empty states, verify these are defined in the component strategy's interaction patterns section.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### 2. Report Results
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
CONSISTENCY CHECK RESULTS
|
|
76
|
+
|
|
77
|
+
[pass/fail] No hardcoded colors: {details}
|
|
78
|
+
[pass/fail] shadcn install complete: {details}
|
|
79
|
+
[pass/fail] Token references valid: {details}
|
|
80
|
+
[pass/fail] File naming conventions: {details}
|
|
81
|
+
[pass/fail] Epic prefix pattern: {details}
|
|
82
|
+
[pass/fail] Epic link validity: {details}
|
|
83
|
+
[pass/fail] Screen-epic coverage: {details}
|
|
84
|
+
[pass/fail] Spec consistency: {details}
|
|
85
|
+
[pass/fail] UI pattern definitions: {details}
|
|
86
|
+
|
|
87
|
+
Issues found: {count}
|
|
88
|
+
|
|
89
|
+
[F] Fix all - Auto-correct issues
|
|
90
|
+
[R] Review - Show details for each issue
|
|
91
|
+
[S] Skip - Continue with known issues
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**If F (Fix all):**
|
|
95
|
+
- Auto-correct each issue (add missing components to install command, fix file paths, add missing epic references, etc.)
|
|
96
|
+
- Report what was fixed
|
|
97
|
+
- Re-run check to confirm
|
|
98
|
+
|
|
99
|
+
**If R (Review):**
|
|
100
|
+
- Show each issue with context
|
|
101
|
+
- Allow user to fix, skip, or note each one
|
|
102
|
+
- Proceed after review
|
|
103
|
+
|
|
104
|
+
**If S (Skip):**
|
|
105
|
+
- Note known issues in workflow output
|
|
106
|
+
- Proceed to finalization
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### 3. Save Designer State
|
|
111
|
+
|
|
112
|
+
Write session state to `{planning_artifacts}/ux-design/.designer-state.yaml` for future workflow runs:
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
last_run: "{timestamp}"
|
|
116
|
+
tool_used: "{design.tool_used}"
|
|
117
|
+
theme: "{theme.prompt_file or none}"
|
|
118
|
+
mode: "{mode}"
|
|
119
|
+
project_state: "{greenfield | existing}"
|
|
120
|
+
tools_available:
|
|
121
|
+
superdesign: {true/false}
|
|
122
|
+
magicpatterns: {true/false}
|
|
123
|
+
stitch: {true/false}
|
|
124
|
+
shadcn_mcp: {true/false}
|
|
125
|
+
scope_summary: "{brief description of what was designed}"
|
|
126
|
+
artifacts_created:
|
|
127
|
+
- "{file1}"
|
|
128
|
+
- "{file2}"
|
|
129
|
+
epic_linked: "{epic file path or none}"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### 4. Workflow Complete
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
DESIGN WORKFLOW COMPLETE
|
|
138
|
+
|
|
139
|
+
Summary:
|
|
140
|
+
─────────────────────────────────────
|
|
141
|
+
Mode: {mode}
|
|
142
|
+
Tool: {design.tool_used}
|
|
143
|
+
Theme: {theme.name or "None"}
|
|
144
|
+
Prototype: {design.output_location}
|
|
145
|
+
|
|
146
|
+
Artifacts:
|
|
147
|
+
{list of created files with paths}
|
|
148
|
+
|
|
149
|
+
Epic: {linked epic or "Not linked"}
|
|
150
|
+
Consistency: {pass_count}/{total_count} checks passed
|
|
151
|
+
─────────────────────────────────────
|
|
152
|
+
|
|
153
|
+
Next Steps for Development:
|
|
154
|
+
1. Install components:
|
|
155
|
+
{install_command}
|
|
156
|
+
|
|
157
|
+
2. Review component strategy for custom builds
|
|
158
|
+
|
|
159
|
+
3. Reference layouts during implementation
|
|
160
|
+
|
|
161
|
+
{If related story exists:}
|
|
162
|
+
This design supports: {story_reference}
|
|
163
|
+
Ready for implementation via /dev-story workflow.
|
|
164
|
+
─────────────────────────────────────
|
|
165
|
+
|
|
166
|
+
[N] New Design - Start another design session
|
|
167
|
+
[D] Done - Exit workflow
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Menu Handlers:**
|
|
171
|
+
- **N**: Load `./step-01-context.md` (returning session detection will kick in)
|
|
172
|
+
- **D**: Exit workflow
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## SUCCESS CRITERIA
|
|
177
|
+
|
|
178
|
+
- All 9 consistency checks executed
|
|
179
|
+
- Issues identified and addressed (fixed, reviewed, or acknowledged)
|
|
180
|
+
- Designer state saved for session continuity
|
|
181
|
+
- Completion summary presented to user
|
|
@@ -14,6 +14,8 @@ npx shadcn@latest add {shadcn_components}
|
|
|
14
14
|
|
|
15
15
|
{extraction_table}
|
|
16
16
|
|
|
17
|
+
{theme_integration_section}
|
|
18
|
+
|
|
17
19
|
## Component Mapping
|
|
18
20
|
|
|
19
21
|
| UI Element | Source | Component | Variant/Props | Notes |
|
|
@@ -34,6 +36,8 @@ npx shadcn@latest add {shadcn_components}
|
|
|
34
36
|
|
|
35
37
|
{what_not_to_do_section}
|
|
36
38
|
|
|
39
|
+
{interaction_patterns_section}
|
|
40
|
+
|
|
37
41
|
## Implementation Notes
|
|
38
42
|
|
|
39
43
|
{implementation_notes}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
MagicPatterns is an AI design tool that generates React components directly. Requires MagicPatterns MCP to be configured.
|
|
6
6
|
|
|
7
7
|
**Output:** React component code + hosted design URL
|
|
8
|
-
**MCP Tools
|
|
8
|
+
**MCP Tools Available:** `create_design`, `get_design`, `read_files`, `update_design`
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -30,11 +30,32 @@ Alternative options:
|
|
|
30
30
|
[D] Direct - Map to components directly
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
### MCP Connection Recovery
|
|
34
|
+
|
|
35
|
+
If MCP tools are available but a call fails with a connection error:
|
|
36
|
+
1. Wait 10 seconds
|
|
37
|
+
2. Retry the failed call once
|
|
38
|
+
3. If still failing, ask user to run `/mcp` to reconnect
|
|
39
|
+
|
|
40
|
+
**CRITICAL:** Do NOT proceed to artifact generation if `read_files` fails. The extracted React code is what makes component-strategy artifacts accurate. Wait for MCP reconnection rather than generating artifacts without extracted code.
|
|
41
|
+
|
|
33
42
|
---
|
|
34
43
|
|
|
35
44
|
## Execution Flow
|
|
36
45
|
|
|
37
|
-
### 1.
|
|
46
|
+
### 1. Check Existing Designs
|
|
47
|
+
|
|
48
|
+
Before creating new designs, check if the user already has relevant designs on MagicPatterns:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Tool: get_design
|
|
52
|
+
Parameters:
|
|
53
|
+
url: "{any_known_project_url}"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If user has been working in MagicPatterns directly, they may have created variations. List available files/versions and let user choose before creating new designs.
|
|
57
|
+
|
|
58
|
+
### 2. Frame Design Prompt
|
|
38
59
|
|
|
39
60
|
Construct prompt from context:
|
|
40
61
|
|
|
@@ -47,13 +68,20 @@ Requirements:
|
|
|
47
68
|
- Responsive design (mobile-first)
|
|
48
69
|
- {additional_context_from_scope}
|
|
49
70
|
|
|
71
|
+
{if theme provided}
|
|
72
|
+
Theme:
|
|
73
|
+
- Reference: {theme.prompt_file}
|
|
74
|
+
- Tokens: {theme.tokens_file}
|
|
75
|
+
- Follow theme design rules for colors, typography, spacing
|
|
76
|
+
{/if}
|
|
77
|
+
|
|
50
78
|
Style:
|
|
51
79
|
- {inspiration_notes}
|
|
52
80
|
- Clean, modern aesthetic
|
|
53
81
|
- Consistent with shadcn/ui patterns
|
|
54
82
|
```
|
|
55
83
|
|
|
56
|
-
###
|
|
84
|
+
### 3. Create Design
|
|
57
85
|
|
|
58
86
|
Use MCP tool:
|
|
59
87
|
```
|
|
@@ -63,7 +91,7 @@ Parameters:
|
|
|
63
91
|
imageUrls: [{inspiration_image_urls}] // optional
|
|
64
92
|
```
|
|
65
93
|
|
|
66
|
-
###
|
|
94
|
+
### 3.5 Handle Empty Response
|
|
67
95
|
|
|
68
96
|
If `create_design` returns no URL or empty response:
|
|
69
97
|
|
|
@@ -82,35 +110,38 @@ Options:
|
|
|
82
110
|
- Accept URL from user
|
|
83
111
|
- Validate format (must contain `magicpatterns.com/c/` or `magicpatterns.app`)
|
|
84
112
|
- Call `get_design` to verify design exists
|
|
85
|
-
- If valid, continue to step
|
|
113
|
+
- If valid, continue to step 4
|
|
86
114
|
- If invalid, show error and return to options
|
|
87
115
|
|
|
88
116
|
**If R (Retry):**
|
|
89
|
-
- Re-execute step
|
|
117
|
+
- Re-execute step 3 with same parameters
|
|
90
118
|
- If fails again, suggest P or S options
|
|
91
119
|
|
|
92
120
|
**If S (Switch):**
|
|
93
121
|
- Return to tool selection in step-03-design.md
|
|
94
122
|
- Mark current design attempt as abandoned
|
|
95
123
|
|
|
96
|
-
###
|
|
124
|
+
### 4. Present Result
|
|
125
|
+
|
|
126
|
+
After design is created, show the URL and let user validate directly on MagicPatterns:
|
|
97
127
|
|
|
98
128
|
```
|
|
99
129
|
DESIGN CREATED
|
|
100
130
|
|
|
101
|
-
|
|
102
|
-
Editor URL: {editor_url}
|
|
131
|
+
URL: {design_url}
|
|
103
132
|
|
|
104
|
-
Please review the design
|
|
133
|
+
Please review the design on MagicPatterns.
|
|
105
134
|
|
|
106
135
|
Options:
|
|
107
|
-
[U] Update - Request changes
|
|
136
|
+
[U] Update - Request changes (uses update_design MCP tool)
|
|
108
137
|
[R] Read Code - Extract React component code
|
|
109
138
|
[V] View Files - List available files
|
|
110
139
|
[C] Continue - Design is approved
|
|
111
140
|
```
|
|
112
141
|
|
|
113
|
-
|
|
142
|
+
**IMPORTANT:** Do NOT take Playwright screenshots of MagicPatterns designs. MagicPatterns renders in a cross-origin iframe that produces unusable screenshots. Direct the user to review on the MagicPatterns platform instead.
|
|
143
|
+
|
|
144
|
+
### 5. Handle User Selection
|
|
114
145
|
|
|
115
146
|
**If U (Update):**
|
|
116
147
|
|
|
@@ -119,7 +150,7 @@ Ask what changes are needed:
|
|
|
119
150
|
What changes would you like to make?
|
|
120
151
|
```
|
|
121
152
|
|
|
122
|
-
Use
|
|
153
|
+
Use `update_design` for iteration instead of creating new designs:
|
|
123
154
|
```
|
|
124
155
|
Tool: update_design
|
|
125
156
|
Parameters:
|
|
@@ -127,7 +158,7 @@ Parameters:
|
|
|
127
158
|
prompt: "{user_change_request}"
|
|
128
159
|
```
|
|
129
160
|
|
|
130
|
-
Return to step
|
|
161
|
+
Return to step 4 after update completes.
|
|
131
162
|
|
|
132
163
|
**If V (View Files):**
|
|
133
164
|
|
|
@@ -165,6 +196,8 @@ Parameters:
|
|
|
165
196
|
fileNames: [{selected_files}]
|
|
166
197
|
```
|
|
167
198
|
|
|
199
|
+
**CRITICAL:** If `read_files` fails, do NOT proceed to artifact generation. Wait for MCP reconnection (see "MCP Connection Recovery" above). The extracted code is essential for accurate component-strategy artifacts.
|
|
200
|
+
|
|
168
201
|
Present code:
|
|
169
202
|
```
|
|
170
203
|
REACT CODE EXTRACTED
|
|
@@ -220,7 +253,7 @@ Parameters:
|
|
|
220
253
|
imageUrls: [{screenshot_of_html_design}] // if available
|
|
221
254
|
```
|
|
222
255
|
|
|
223
|
-
This is useful in the conversion step when the user chooses MagicPatterns for HTML
|
|
256
|
+
This is useful in the conversion step when the user chooses MagicPatterns for HTML->React conversion.
|
|
224
257
|
|
|
225
258
|
---
|
|
226
259
|
|
|
@@ -246,7 +279,7 @@ After each design is created or approved, show progress:
|
|
|
246
279
|
DESIGN PROGRESS: {completed} of {total} complete
|
|
247
280
|
|
|
248
281
|
{foreach design in designs}
|
|
249
|
-
{if status = approved}
|
|
282
|
+
{if status = approved}[done]{/if}{if status = created}[review]{/if}{if status = pending}[pending]{/if} {name} - {status}{if url} ({url}){/if}
|
|
250
283
|
{/foreach}
|
|
251
284
|
|
|
252
285
|
Options:
|
|
@@ -264,7 +297,7 @@ When scope has multiple items:
|
|
|
264
297
|
DESIGNS TO CREATE ({count} items)
|
|
265
298
|
|
|
266
299
|
{foreach scope_item}
|
|
267
|
-
|
|
300
|
+
[ ] {item_name}
|
|
268
301
|
{/foreach}
|
|
269
302
|
|
|
270
303
|
Options:
|
|
@@ -272,10 +305,10 @@ When scope has multiple items:
|
|
|
272
305
|
[B] Batch - Create all designs, then review together
|
|
273
306
|
```
|
|
274
307
|
|
|
275
|
-
2. **If One-by-one:** Execute steps 1-
|
|
308
|
+
2. **If One-by-one:** Execute steps 1-5 for each item, updating registry after each
|
|
276
309
|
|
|
277
310
|
3. **If Batch:**
|
|
278
|
-
- Create all designs (steps 1-
|
|
311
|
+
- Create all designs (steps 1-4) without waiting for approval
|
|
279
312
|
- Present all designs for bulk review
|
|
280
313
|
- Allow individual updates before final approval
|
|
281
314
|
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
5
|
Stitch is Google's AI design tool that generates web UI screens from text prompts.
|
|
6
|
-
This tool requires
|
|
6
|
+
This tool requires Stitch MCP to be configured.
|
|
7
7
|
|
|
8
8
|
**Output Location:** `.stitch/screens/`
|
|
9
9
|
**Output Format:** HTML + CSS files + screenshots
|
|
10
|
-
**MCP Tools
|
|
11
|
-
**Dependencies:** Google's stitch-skills (design-md skill at minimum)
|
|
10
|
+
**MCP Tools Available:** `generate_screen_from_text`, `get_screen`, `list_screens`, `list_projects`, `get_project`, `create_project`, `edit_screens`, `generate_variants`
|
|
12
11
|
|
|
13
12
|
---
|
|
14
13
|
|
|
@@ -18,7 +17,7 @@ Check availability before proceeding:
|
|
|
18
17
|
|
|
19
18
|
```
|
|
20
19
|
Stitch MCP: [check if mcp__stitch* or stitch* tools available]
|
|
21
|
-
|
|
20
|
+
react-components skill: [check if installed via `npx skills list`]
|
|
22
21
|
```
|
|
23
22
|
|
|
24
23
|
### If Stitch MCP not available:
|
|
@@ -38,66 +37,40 @@ Alternative options:
|
|
|
38
37
|
[B] Back to tool selection
|
|
39
38
|
```
|
|
40
39
|
|
|
41
|
-
### If
|
|
40
|
+
### If react-components skill not installed:
|
|
42
41
|
|
|
43
42
|
```
|
|
44
|
-
STITCH
|
|
43
|
+
STITCH SKILL RECOMMENDED
|
|
45
44
|
|
|
46
|
-
Google's
|
|
45
|
+
Google's react-components skill enhances HTML->React conversion.
|
|
47
46
|
|
|
48
47
|
Install with:
|
|
49
|
-
npx skills add google-labs-code/stitch-skills --skill design-md -g -a claude-code -y
|
|
50
48
|
npx skills add google-labs-code/stitch-skills --skill react-components -g -a claude-code -y
|
|
51
49
|
|
|
52
50
|
Then restart Claude Code and try again.
|
|
53
51
|
|
|
52
|
+
[C] Continue without skill - Use standard conversion
|
|
54
53
|
[B] Back to tool selection
|
|
55
54
|
```
|
|
56
55
|
|
|
57
56
|
---
|
|
58
57
|
|
|
59
|
-
##
|
|
60
|
-
|
|
61
|
-
### 1. Check for DESIGN.md
|
|
58
|
+
## Content Limitations
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
STITCH PROJECT SETUP
|
|
60
|
+
Stitch works best for **full-page layouts** (landing pages, dashboards, settings screens, forms).
|
|
65
61
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
Found: DESIGN.md
|
|
73
|
-
Design system will be used for prompt consistency.
|
|
62
|
+
Stitch is NOT suitable for:
|
|
63
|
+
- Component showcases or design system pages
|
|
64
|
+
- Individual component generation (use MagicPatterns instead)
|
|
65
|
+
- Design token documentation
|
|
74
66
|
|
|
75
|
-
|
|
76
|
-
[U] Update design system first (uses design-md skill)
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**If DESIGN.md doesn't exist:**
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
No DESIGN.md found.
|
|
83
|
-
|
|
84
|
-
DESIGN.md helps Stitch generate consistent designs by documenting
|
|
85
|
-
your color palette, typography, and component styles.
|
|
67
|
+
---
|
|
86
68
|
|
|
87
|
-
|
|
88
|
-
[G] Generate DESIGN.md (Recommended)
|
|
89
|
-
→ Uses design-md skill to create semantic design documentation
|
|
90
|
-
→ Best for: New projects, establishing design consistency
|
|
69
|
+
## Execution Flow
|
|
91
70
|
|
|
92
|
-
|
|
93
|
-
→ Stitch will use default styling
|
|
94
|
-
→ Fine for: Quick prototypes, one-off designs
|
|
95
|
-
```
|
|
71
|
+
### 1. Theme Reference
|
|
96
72
|
|
|
97
|
-
|
|
98
|
-
- Invoke the design-md skill: `/design-md`
|
|
99
|
-
- Wait for user to complete the skill workflow
|
|
100
|
-
- Continue to design generation after DESIGN.md is created
|
|
73
|
+
Theme tokens should be established before design. If a theme was provided in Step 1, reference it in the design prompt. If no theme was provided, proceed with tool defaults.
|
|
101
74
|
|
|
102
75
|
---
|
|
103
76
|
|
|
@@ -119,9 +92,10 @@ Requirements:
|
|
|
119
92
|
- Tailwind CSS classes
|
|
120
93
|
- {additional_context_from_scope}
|
|
121
94
|
|
|
122
|
-
{if
|
|
123
|
-
|
|
124
|
-
[Include relevant sections from
|
|
95
|
+
{if theme provided}
|
|
96
|
+
THEME:
|
|
97
|
+
[Include relevant sections from theme.prompt.md - colors, typography, component styles]
|
|
98
|
+
[Reference token values from theme.tokens.json for precise color matching]
|
|
125
99
|
{/if}
|
|
126
100
|
|
|
127
101
|
Style Direction:
|
|
@@ -178,7 +152,7 @@ GENERATING DESIGN
|
|
|
178
152
|
Feature: {user_intent}
|
|
179
153
|
Project: {project_name}
|
|
180
154
|
|
|
181
|
-
|
|
155
|
+
Generating screen (this takes 1-3 minutes)...
|
|
182
156
|
```
|
|
183
157
|
|
|
184
158
|
```
|
|
@@ -187,7 +161,25 @@ Parameters:
|
|
|
187
161
|
projectId: "{projectId}"
|
|
188
162
|
prompt: "{constructed_prompt}"
|
|
189
163
|
deviceType: "DESKTOP"
|
|
164
|
+
modelId: "GEMINI_3_PRO"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**IMPORTANT:** Always use `modelId: "GEMINI_3_PRO"` for higher quality output (not Flash).
|
|
168
|
+
|
|
169
|
+
### Generation Timing
|
|
170
|
+
|
|
171
|
+
Screens take **1-3 minutes** to generate (per Stitch MCP documentation).
|
|
172
|
+
|
|
173
|
+
**DO NOT RETRY** if the tool call appears slow. The built-in Stitch MCP docs explicitly state: "This action can take a few minutes. DO NOT RETRY."
|
|
174
|
+
|
|
175
|
+
After firing the generation request:
|
|
190
176
|
```
|
|
177
|
+
Screen is generating (1-3 min). I'll check the result shortly.
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- `list_screens` will NOT show the screen until generation completes
|
|
181
|
+
- Wait at least 90 seconds before assuming failure
|
|
182
|
+
- If the tool call fails with a connection error, the generation may still succeed server-side -- try `get_screen` or `list_screens` later to check
|
|
191
183
|
|
|
192
184
|
---
|
|
193
185
|
|
|
@@ -208,8 +200,10 @@ mkdir -p .stitch/screens/
|
|
|
208
200
|
```
|
|
209
201
|
|
|
210
202
|
Download and save assets:
|
|
211
|
-
- **HTML:** `htmlCode.downloadUrl`
|
|
212
|
-
- **Screenshot:** `screenshot.downloadUrl`
|
|
203
|
+
- **HTML:** `htmlCode.downloadUrl` -> save to `.stitch/screens/{page}.html`
|
|
204
|
+
- **Screenshot:** `screenshot.downloadUrl` -> save to `.stitch/screens/{page}.png`
|
|
205
|
+
|
|
206
|
+
**IMPORTANT:** Do NOT download/export HTML until the user has reviewed and approved the design on the Stitch platform.
|
|
213
207
|
|
|
214
208
|
---
|
|
215
209
|
|
|
@@ -225,10 +219,12 @@ Files saved:
|
|
|
225
219
|
- HTML: .stitch/screens/{page}.html
|
|
226
220
|
- Preview: .stitch/screens/{page}.png
|
|
227
221
|
|
|
222
|
+
Please review the design on the Stitch platform.
|
|
223
|
+
|
|
228
224
|
Options:
|
|
229
225
|
[V] View - Display screenshot
|
|
230
|
-
[
|
|
231
|
-
[
|
|
226
|
+
[E] Edit - Request changes via edit_screens
|
|
227
|
+
[A] Alternatives - Generate design variants
|
|
232
228
|
[C] Continue - Design approved, proceed to next step
|
|
233
229
|
```
|
|
234
230
|
|
|
@@ -238,22 +234,55 @@ Options:
|
|
|
238
234
|
- Display the screenshot image from `.stitch/screens/{page}.png`
|
|
239
235
|
- Return to options
|
|
240
236
|
|
|
241
|
-
**If
|
|
242
|
-
|
|
243
|
-
- Capture desktop screenshot (1280px width)
|
|
244
|
-
- Resize viewport (375px width) and capture mobile screenshot
|
|
245
|
-
- Present both screenshots for comparison
|
|
246
|
-
- Return to options
|
|
247
|
-
|
|
248
|
-
**If U (Update):**
|
|
237
|
+
**If E (Edit):**
|
|
238
|
+
Use `edit_screens` for iteration instead of regenerating from scratch:
|
|
249
239
|
```
|
|
250
240
|
What changes would you like to make?
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
Tool: edit_screens
|
|
245
|
+
Parameters:
|
|
246
|
+
projectId: "{projectId}"
|
|
247
|
+
screenId: "{screenId}"
|
|
248
|
+
prompt: "{user_change_request}"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Wait for edit to complete (same timing rules as generation), then retrieve updated assets.
|
|
252
|
+
Return to step 6.
|
|
253
|
+
|
|
254
|
+
**If A (Alternatives):**
|
|
255
|
+
Offer variant generation when user wants to explore alternatives:
|
|
251
256
|
|
|
252
|
-
Describe the changes and I'll generate an updated design.
|
|
253
257
|
```
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
258
|
+
GENERATE VARIANTS
|
|
259
|
+
|
|
260
|
+
How different should the variants be?
|
|
261
|
+
|
|
262
|
+
[R] Refine - Subtle variations (same structure, minor tweaks)
|
|
263
|
+
[E] Explore - Moderate changes (layout shifts, style changes)
|
|
264
|
+
[I] Reimagine - Significantly different approaches
|
|
265
|
+
|
|
266
|
+
How many variants? [1-5, default: 3]
|
|
267
|
+
|
|
268
|
+
What aspects to vary?
|
|
269
|
+
[L] Layout
|
|
270
|
+
[C] Color scheme
|
|
271
|
+
[T] Typography
|
|
272
|
+
[A] All aspects
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
Tool: generate_variants
|
|
277
|
+
Parameters:
|
|
278
|
+
projectId: "{projectId}"
|
|
279
|
+
screenId: "{screenId}"
|
|
280
|
+
creativeRange: "[REFINE | EXPLORE | REIMAGINE]"
|
|
281
|
+
aspects: ["LAYOUT", "COLOR_SCHEME", ...]
|
|
282
|
+
variantCount: {count}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Present variants for comparison and selection. Selected variant becomes the active design.
|
|
257
286
|
|
|
258
287
|
**If C (Continue):**
|
|
259
288
|
- Store design state
|
|
@@ -274,7 +303,6 @@ design:
|
|
|
274
303
|
screenshot: ".stitch/screens/{page}.png"
|
|
275
304
|
stitch_project_id: "{projectId}"
|
|
276
305
|
stitch_screen_id: "{screenId}"
|
|
277
|
-
design_md_used: true/false
|
|
278
306
|
```
|
|
279
307
|
|
|
280
308
|
---
|
|
@@ -312,7 +340,7 @@ Which approach? [A/O]
|
|
|
312
340
|
```
|
|
313
341
|
|
|
314
342
|
**If A (All at once):**
|
|
315
|
-
- Generate each design in sequence
|
|
343
|
+
- Generate each design in sequence (DO NOT fire multiple generations simultaneously)
|
|
316
344
|
- Track status in design registry
|
|
317
345
|
- Present all for review at end
|
|
318
346
|
|
|
@@ -344,4 +372,6 @@ Both are presented in Step 4 when `design.tool_used` = `stitch`.
|
|
|
344
372
|
| `create_project` | Create new project |
|
|
345
373
|
| `list_screens` | Get all screens in project |
|
|
346
374
|
| `get_screen` | Get screen details + download URLs |
|
|
347
|
-
| `generate_screen_from_text` | Generate new screen from prompt |
|
|
375
|
+
| `generate_screen_from_text` | Generate new screen from prompt (use `modelId: "GEMINI_3_PRO"`) |
|
|
376
|
+
| `edit_screens` | Edit existing screens via prompt (use for iteration) |
|
|
377
|
+
| `generate_variants` | Create design variations with creative range control |
|
package/uninstall.js
CHANGED
|
@@ -43,6 +43,7 @@ const INSTALLED_FILES = {
|
|
|
43
43
|
'dev-story-backend.md',
|
|
44
44
|
'dev-story-fullstack.md',
|
|
45
45
|
'dev-story-ui.md',
|
|
46
|
+
'deep-audit.md',
|
|
46
47
|
],
|
|
47
48
|
agents: [
|
|
48
49
|
'principal-code-reviewer.md',
|
|
@@ -103,6 +104,24 @@ const INSTALLED_FILES = {
|
|
|
103
104
|
'generate-theme.ts',
|
|
104
105
|
'superdesign-agent-instructions.md',
|
|
105
106
|
],
|
|
107
|
+
'skills/deep-audit': [
|
|
108
|
+
'SKILL.md',
|
|
109
|
+
'INSPIRATIONS.md',
|
|
110
|
+
],
|
|
111
|
+
'skills/deep-audit/agents': [
|
|
112
|
+
'security-and-error-handling.md',
|
|
113
|
+
'architecture-and-complexity.md',
|
|
114
|
+
'code-health.md',
|
|
115
|
+
'performance-profiler.md',
|
|
116
|
+
'test-coverage-analyst.md',
|
|
117
|
+
'type-design-analyzer.md',
|
|
118
|
+
'data-layer-reviewer.md',
|
|
119
|
+
'api-contract-reviewer.md',
|
|
120
|
+
'seo-accessibility-auditor.md',
|
|
121
|
+
],
|
|
122
|
+
'skills/deep-audit/templates': [
|
|
123
|
+
'report-template.md',
|
|
124
|
+
],
|
|
106
125
|
};
|
|
107
126
|
|
|
108
127
|
/**
|
|
@@ -279,6 +298,9 @@ function uninstall() {
|
|
|
279
298
|
'skills/product-architect',
|
|
280
299
|
'skills/agent-creator/expertise',
|
|
281
300
|
'skills/agent-creator',
|
|
301
|
+
'skills/deep-audit/templates',
|
|
302
|
+
'skills/deep-audit/agents',
|
|
303
|
+
'skills/deep-audit',
|
|
282
304
|
];
|
|
283
305
|
for (const skillSubDir of skillDirs) {
|
|
284
306
|
const dirPath = path.join(targetBase, skillSubDir);
|