cc-devflow 4.1.5 → 4.2.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.
- package/.claude/CLAUDE.md +87 -1091
- package/.claude/commands/core/architecture.md +32 -2
- package/.claude/commands/core/guidelines.md +27 -2
- package/.claude/commands/core/roadmap.md +33 -4
- package/.claude/commands/core/style.md +53 -263
- package/.claude/commands/flow/CLAUDE.md +28 -0
- package/.claude/commands/flow/archive.md +2 -2
- package/.claude/commands/flow/checklist.md +9 -251
- package/.claude/commands/flow/clarify.md +9 -127
- package/.claude/commands/flow/constitution.md +1 -1
- package/.claude/commands/flow/context.md +1 -1
- package/.claude/commands/flow/dev.md +19 -395
- package/.claude/commands/flow/ideate.md +13 -13
- package/.claude/commands/flow/init.md +19 -30
- package/.claude/commands/flow/new.md +12 -268
- package/.claude/commands/flow/quality.md +10 -153
- package/.claude/commands/flow/release.md +18 -81
- package/.claude/commands/flow/restart.md +15 -16
- package/.claude/commands/flow/spec.md +14 -164
- package/.claude/commands/flow/status.md +12 -12
- package/.claude/commands/flow/update.md +4 -4
- package/.claude/commands/flow/upgrade.md +6 -6
- package/.claude/commands/flow/verify.md +19 -78
- package/.claude/commands/flow/workspace.md +1 -1
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +7 -7
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +44 -96
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +1 -1
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +5 -5
- package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +1 -1
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +3 -3
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +5 -5
- package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +2 -2
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +3 -3
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +33 -64
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +3 -3
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +2 -2
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +2 -2
- package/.claude/docs/templates/STYLE_TEMPLATE.md +3 -3
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +8 -9
- package/.claude/guides/workflow-guides/flow-orchestrator.md +31 -265
- package/.claude/hooks/CLAUDE.md +1 -1
- package/.claude/hooks/checklist-gate.js +4 -4
- package/.claude/hooks/inject-agent-context.ts +2 -2
- package/.claude/scripts/calculate-checklist-completion.sh +2 -2
- package/.claude/scripts/check-prerequisites.sh +2 -2
- package/.claude/scripts/checklist-errors.sh +4 -4
- package/.claude/scripts/flow-quality-full.sh +5 -5
- package/.claude/scripts/flow-quality-quick.sh +4 -4
- package/.claude/scripts/flow-workspace-init.sh +2 -2
- package/.claude/scripts/generate-clarification-report.sh +4 -4
- package/.claude/scripts/recover-workflow.sh +70 -73
- package/.claude/scripts/run-quality-gates.sh +1 -1
- package/.claude/scripts/setup-epic.sh +2 -2
- package/.claude/scripts/setup-ralph-loop.sh +2 -2
- package/.claude/scripts/validate-research.sh +1 -1
- package/.claude/scripts/verify-setup.sh +1 -1
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +113 -108
- package/.claude/skills/workflow/CLAUDE.md +24 -0
- package/.claude/skills/workflow/flow-dev/CLAUDE.md +14 -76
- package/.claude/skills/workflow/flow-dev/SKILL.md +58 -60
- package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
- package/.claude/skills/workflow/flow-init/SKILL.md +46 -144
- package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +1 -1
- package/.claude/skills/workflow/flow-init/context.jsonl +3 -3
- package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +1 -1
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
- package/.claude/skills/workflow/flow-release/SKILL.md +23 -56
- package/.claude/skills/workflow/flow-release/context.jsonl +5 -7
- package/.claude/skills/workflow/flow-spec/CLAUDE.md +15 -101
- package/.claude/skills/workflow/flow-spec/SKILL.md +40 -511
- package/.claude/skills/workflow/flow-spec/context.jsonl +5 -7
- package/.claude/skills/workflow/flow-verify/CLAUDE.md +10 -0
- package/.claude/skills/workflow/flow-verify/SKILL.md +53 -0
- package/.claude/skills/workflow/flow-verify/context.jsonl +5 -0
- package/.claude/skills/workflow.yaml +72 -267
- package/CHANGELOG.md +72 -0
- package/README.md +96 -69
- package/README.zh-CN.md +95 -67
- package/bin/cc-devflow-cli.js +154 -0
- package/bin/harness.js +22 -0
- package/docs/commands/README.md +34 -38
- package/docs/commands/README.zh-CN.md +34 -36
- package/docs/commands/core-roadmap.md +2 -2
- package/docs/commands/core-roadmap.zh-CN.md +2 -2
- package/docs/commands/core-style.md +29 -381
- package/docs/commands/core-style.zh-CN.md +29 -381
- package/docs/commands/flow-init.md +10 -10
- package/docs/commands/flow-init.zh-CN.md +11 -11
- package/docs/commands/flow-new.md +25 -260
- package/docs/commands/flow-new.zh-CN.md +26 -257
- package/docs/guides/getting-started.md +16 -15
- package/docs/guides/getting-started.zh-CN.md +10 -12
- package/lib/compiler/__tests__/manifest.test.js +156 -0
- package/lib/compiler/__tests__/parser.test.js +21 -0
- package/lib/compiler/index.js +17 -1
- package/lib/compiler/manifest.js +68 -6
- package/lib/compiler/parser.js +5 -0
- package/lib/harness/CLAUDE.md +21 -0
- package/lib/harness/cli.js +208 -0
- package/lib/harness/index.js +16 -0
- package/lib/harness/operations/dispatch.js +285 -0
- package/lib/harness/operations/init.js +48 -0
- package/lib/harness/operations/janitor.js +74 -0
- package/lib/harness/operations/pack.js +100 -0
- package/lib/harness/operations/plan.js +29 -0
- package/lib/harness/operations/release.js +83 -0
- package/lib/harness/operations/resume.js +44 -0
- package/lib/harness/operations/verify.js +163 -0
- package/lib/harness/planner.js +141 -0
- package/lib/harness/schemas.js +108 -0
- package/lib/harness/store.js +240 -0
- package/package.json +9 -1
|
@@ -2,404 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
[中文文档](./core-style.zh-CN.md) | [English](./core-style.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Generate or update `devflow/STYLE.md` as project-level design SSOT.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
Generate project-level design style guide (STYLE.md) from reference designs or existing code analysis, ensuring visual consistency across the entire project.
|
|
10
|
-
|
|
11
|
-
## 🎯 Syntax
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
/core-style # Generate new design style guide
|
|
15
|
-
/core-style --update # Update existing design style guide
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## 🎬 Use Cases
|
|
19
|
-
|
|
20
|
-
### ✅ Recommended Scenarios
|
|
21
|
-
- Establish design standards during project initialization
|
|
22
|
-
- Unify project visual style
|
|
23
|
-
- Extract design system from reference designs
|
|
24
|
-
- Organize design specifications from existing code
|
|
25
|
-
- Update guide when design style changes
|
|
26
|
-
|
|
27
|
-
### ❌ Not Recommended Scenarios
|
|
28
|
-
- UI design for a single requirement → Use `/flow-ui`
|
|
29
|
-
- Temporary style adjustments → Directly modify component code
|
|
30
|
-
|
|
31
|
-
## 🧭 Positioning
|
|
32
|
-
|
|
33
|
-
**Project-level command** (similar to `/core-roadmap`)
|
|
34
|
-
|
|
35
|
-
- `/core-roadmap` defines product roadmap (feature planning)
|
|
36
|
-
- `/core-style` defines design style guide (visual specification)
|
|
37
|
-
- Both are **SSOT (Single Source of Truth)** for the project
|
|
38
|
-
|
|
39
|
-
## 💡 Core Philosophy
|
|
40
|
-
|
|
41
|
-
> "Design systems are the grammar of visual language, code is the implementation of grammar. Without grammar, there is no consistency."
|
|
42
|
-
|
|
43
|
-
**Role of STYLE.md**:
|
|
44
|
-
- ✅ Single Source of Truth (SSOT) for project design
|
|
45
|
-
- ✅ Primary reference for `/flow-ui` when generating UI prototypes
|
|
46
|
-
- ✅ Mandatory specification for `/flow-dev` during frontend development
|
|
47
|
-
- ✅ Ensures visual consistency across all requirement UIs
|
|
48
|
-
|
|
49
|
-
## 🔄 Execution Flow (3 Phases)
|
|
50
|
-
|
|
51
|
-
```text
|
|
52
|
-
Phase 1: Entry Gate & Project Type Detection
|
|
53
|
-
├─ Detect existing style guide (does STYLE.md exist?)
|
|
54
|
-
├─ Detect project type (new project vs existing project)
|
|
55
|
-
└─ Route selection (new → reference design collection / existing → code analysis)
|
|
56
|
-
|
|
57
|
-
Phase 2: Reference Design Collection & Replication (New Projects Only)
|
|
58
|
-
├─ Guide user to provide reference design (URL / screenshot / HTML+CSS)
|
|
59
|
-
├─ Generate single HTML file replica (reference-001.html)
|
|
60
|
-
├─ User refinement loop (reference-002.html, reference-003.html...)
|
|
61
|
-
└─ Confirm final version (reference-final.html)
|
|
62
|
-
|
|
63
|
-
Phase 3: Style Analysis & STYLE.md Generation
|
|
64
|
-
├─ Analyze input source (reference-final.html or project code)
|
|
65
|
-
├─ Generate style analysis document (research/style_analysis.md)
|
|
66
|
-
├─ Invoke style-guide-generator Agent
|
|
67
|
-
└─ Output STYLE.md
|
|
68
|
-
|
|
69
|
-
Exit Gate: File check + Constitution validation + Status update
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## 📂 Output Files
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
devflow/
|
|
76
|
-
├── STYLE.md # Project design style guide (SSOT)
|
|
77
|
-
├── research/
|
|
78
|
-
│ ├── style_analysis.md # Style analysis document
|
|
79
|
-
│ └── style_reference_designs/ # Reference designs (new projects)
|
|
80
|
-
│ ├── reference-001.html # Version 1 replica
|
|
81
|
-
│ ├── reference-002.html # Version 2 (refined)
|
|
82
|
-
│ └── reference-final.html # Final confirmed version
|
|
83
|
-
├── project_status.json # Project status (updated)
|
|
84
|
-
└── EXECUTION_LOG.md # Execution log (updated)
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## 📋 STYLE.md Contents
|
|
88
|
-
|
|
89
|
-
STYLE.md is a comprehensive design style guide containing these 15 core sections:
|
|
90
|
-
|
|
91
|
-
1. **Overview** - Design system overview (name, version, philosophy, update history)
|
|
92
|
-
2. **Color Palette** - Color system (primary, secondary, semantic, neutrals with Hex/RGB/HSL)
|
|
93
|
-
3. **Typography** - Font system (font families, type scale, responsive fonts, combination rules)
|
|
94
|
-
4. **Spacing System** - Spacing system (base unit, spacing scale, use cases)
|
|
95
|
-
5. **Component Styles** - Component library (Button, Input, Card, Modal, etc. with variants, sizes, states)
|
|
96
|
-
6. **Shadows & Elevation** - Shadow and elevation system (shadow levels, use cases)
|
|
97
|
-
7. **Animations & Transitions** - Animations and transitions (duration, easing, common animations)
|
|
98
|
-
8. **Border Radius** - Border radius system (radius levels, use cases)
|
|
99
|
-
9. **Opacity & Transparency** - Opacity system (opacity levels, use cases)
|
|
100
|
-
10. **Common Tailwind CSS Usage** - Tailwind usage specifications (if applicable)
|
|
101
|
-
11. **Example Component Reference Design Code** - Example component code (at least 3 complete implementations)
|
|
102
|
-
12. **Design Principles** - Design principles (simplicity, consistency, accessibility, etc.)
|
|
103
|
-
13. **Responsive Design** - Responsive design (breakpoints, strategy, examples)
|
|
104
|
-
14. **Accessibility** - Accessibility (color contrast, keyboard navigation, ARIA attributes)
|
|
105
|
-
15. **Assets** - Asset specifications (Icon, Image, Logo, etc., if applicable)
|
|
106
|
-
|
|
107
|
-
**All definitions include**:
|
|
108
|
-
- Concrete values (not "TBD" or placeholders)
|
|
109
|
-
- Semantic naming (e.g., `--color-primary`, `--spacing-md`)
|
|
110
|
-
- Use case descriptions
|
|
111
|
-
- Example code (CSS Variables / Tailwind Config)
|
|
112
|
-
|
|
113
|
-
**Example code characteristics**:
|
|
114
|
-
- ✅ Copy-paste ready
|
|
115
|
-
- ✅ Complete HTML structure and CSS/Tailwind classes
|
|
116
|
-
- ✅ Clear comments explaining design decisions
|
|
117
|
-
- ❌ Not pseudocode or placeholders
|
|
118
|
-
|
|
119
|
-
## 🆕 New Project Workflow Example
|
|
120
|
-
|
|
121
|
-
### Scenario: You have a favorite design you want to use as the project's design foundation
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# Step 1: Run command
|
|
125
|
-
/core-style
|
|
126
|
-
|
|
127
|
-
# Step 2: Agent guidance
|
|
128
|
-
Agent: Detected a new project (no frontend code).
|
|
129
|
-
|
|
130
|
-
Please provide the design you want to reference:
|
|
131
|
-
- Website URL (I'll fetch and analyze it)
|
|
132
|
-
- Design screenshot (PNG/JPG)
|
|
133
|
-
- Extracted HTML + CSS code
|
|
134
|
-
|
|
135
|
-
I'll help you replicate this design into a single HTML file.
|
|
136
|
-
|
|
137
|
-
# Step 3: User provides reference
|
|
138
|
-
User: I want to reference https://example.com/design, here's the screenshot and extracted CSS...
|
|
139
|
-
|
|
140
|
-
# Step 4: Agent generates replica
|
|
141
|
-
Agent: Generated devflow/research/style_reference_designs/reference-001.html
|
|
142
|
-
|
|
143
|
-
Please open the file to review. Are you satisfied? If not, tell me what needs adjustment:
|
|
144
|
-
- Colors (e.g., primary color too bright, change to softer blue)
|
|
145
|
-
- Fonts (e.g., heading font too bold, change to medium weight)
|
|
146
|
-
- Spacing (e.g., card spacing too small, increase to 24px)
|
|
147
|
-
- Component styles (e.g., button radius too large, change to 4px)
|
|
148
|
-
|
|
149
|
-
# Step 5: User refinement
|
|
150
|
-
User: Change primary color to #3B82F6, button radius to 6px.
|
|
151
|
-
|
|
152
|
-
# Step 6: Agent adjusts and confirms again
|
|
153
|
-
Agent: Adjusted, generated reference-002.html. Please review. Satisfied?
|
|
154
|
-
|
|
155
|
-
User: Yes!
|
|
156
|
-
|
|
157
|
-
# Step 7: Agent generates STYLE.md
|
|
158
|
-
Agent: Analyzing reference-final.html, generating STYLE.md...
|
|
159
|
-
|
|
160
|
-
✅ STYLE.md generated!
|
|
161
|
-
|
|
162
|
-
Content statistics:
|
|
163
|
-
- Color definitions: 15
|
|
164
|
-
- Font definitions: 8
|
|
165
|
-
- Spacing levels: 10
|
|
166
|
-
- Component styles: 12
|
|
167
|
-
- Example code: 3
|
|
168
|
-
|
|
169
|
-
Next steps:
|
|
170
|
-
1. Review devflow/STYLE.md for completeness
|
|
171
|
-
2. Run /flow-prd to start requirement development
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## 🏢 Existing Project Workflow Example
|
|
175
|
-
|
|
176
|
-
### Scenario: You have a project with existing frontend code and want to organize design specifications
|
|
7
|
+
## Syntax
|
|
177
8
|
|
|
178
9
|
```bash
|
|
179
|
-
# Step 1: Run command
|
|
180
10
|
/core-style
|
|
181
|
-
|
|
182
|
-
# Step 2: Agent auto-analyzes
|
|
183
|
-
Agent: Detected an existing project (found src/components/, styles/, etc.).
|
|
184
|
-
|
|
185
|
-
Analyzing project code, extracting design styles...
|
|
186
|
-
- Analyzing files: src/components/**/*.tsx, styles/**/*.css
|
|
187
|
-
- Extracting colors: Primary #3B82F6, Secondary #8B5CF6, ...
|
|
188
|
-
- Extracting fonts: Inter, Roboto Mono
|
|
189
|
-
- Extracting spacing: 4px, 8px, 16px, 24px, 32px...
|
|
190
|
-
|
|
191
|
-
Generated devflow/research/style_analysis.md, generating STYLE.md...
|
|
192
|
-
|
|
193
|
-
✅ STYLE.md generated!
|
|
194
|
-
|
|
195
|
-
Content statistics:
|
|
196
|
-
- Color definitions: 18
|
|
197
|
-
- Font definitions: 6
|
|
198
|
-
- Spacing levels: 8
|
|
199
|
-
- Component styles: 15
|
|
200
|
-
- Example code: 3
|
|
201
|
-
|
|
202
|
-
Tech stack:
|
|
203
|
-
- Framework: React
|
|
204
|
-
- CSS: Tailwind CSS
|
|
205
|
-
|
|
206
|
-
Next steps:
|
|
207
|
-
1. Review devflow/STYLE.md for completeness
|
|
208
|
-
2. Adjust inconsistent components based on STYLE.md (if any)
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## 🔄 Update Mode Example
|
|
212
|
-
|
|
213
|
-
### Scenario: Design style changes, need to update STYLE.md
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Step 1: Run command
|
|
217
11
|
/core-style --update
|
|
218
|
-
|
|
219
|
-
# Step 2: Agent analyzes and updates
|
|
220
|
-
Agent: Detected existing STYLE.md (v1.0.0), entering update mode.
|
|
221
|
-
|
|
222
|
-
Analyzing latest code, detecting new design patterns...
|
|
223
|
-
- Found new color: Warning #F59E0B
|
|
224
|
-
- Found new components: Tooltip, Pagination
|
|
225
|
-
- Found new spacing: 96px
|
|
226
|
-
|
|
227
|
-
Merged into STYLE.md (v1.1.0).
|
|
228
|
-
|
|
229
|
-
Update content:
|
|
230
|
-
- New colors: 1
|
|
231
|
-
- New components: 2
|
|
232
|
-
- New spacing: 1
|
|
233
|
-
|
|
234
|
-
✅ STYLE.md update complete!
|
|
235
|
-
|
|
236
|
-
Next steps:
|
|
237
|
-
1. Review changes
|
|
238
|
-
2. Update existing UI prototypes (if any)
|
|
239
12
|
```
|
|
240
13
|
|
|
241
|
-
##
|
|
242
|
-
|
|
243
|
-
### `/flow-ui` Integration
|
|
14
|
+
## Positioning
|
|
244
15
|
|
|
245
|
-
|
|
246
|
-
- `/flow-ui` uses default sampling strategy (80+ design masters)
|
|
247
|
-
- Each requirement's UI may have inconsistent styles
|
|
16
|
+
`/core-style` is a project command (same level as `/core-roadmap`) and feeds the delivery mainline:
|
|
248
17
|
|
|
249
|
-
|
|
250
|
-
- `/flow
|
|
251
|
-
-
|
|
252
|
-
- Default sampling strategy only used for parts not covered by STYLE.md
|
|
18
|
+
- `/flow:spec`: reads STYLE guidance for UI/UX acceptance criteria.
|
|
19
|
+
- `/flow:dev`: enforces STYLE tokens and component conventions in implementation.
|
|
20
|
+
- `/flow:verify`: checks style consistency as part of quality gates.
|
|
253
21
|
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
# Run /flow-ui
|
|
257
|
-
/flow-ui "REQ-001"
|
|
22
|
+
## Execution Flow
|
|
258
23
|
|
|
259
|
-
|
|
260
|
-
|
|
24
|
+
1. Detect mode (`create` or `update`).
|
|
25
|
+
2. Collect style inputs:
|
|
26
|
+
- new project: use reference design URL/screenshot/HTML+CSS.
|
|
27
|
+
- existing project: mine tokens/components from current code.
|
|
28
|
+
3. Produce `devflow/research/style_analysis.md`.
|
|
29
|
+
4. Generate `devflow/STYLE.md` from `STYLE_TEMPLATE.md`.
|
|
30
|
+
5. Validate structure + constitution constraints.
|
|
261
31
|
|
|
262
|
-
|
|
263
|
-
- Primary color: #3B82F6 (from STYLE.md)
|
|
264
|
-
- Font: Inter (from STYLE.md)
|
|
265
|
-
- Button radius: 6px (from STYLE.md)
|
|
32
|
+
## Outputs
|
|
266
33
|
|
|
267
|
-
|
|
34
|
+
```text
|
|
35
|
+
devflow/STYLE.md
|
|
36
|
+
devflow/research/style_analysis.md
|
|
37
|
+
devflow/project_status.json (updated)
|
|
38
|
+
EXECUTION_LOG.md (updated)
|
|
268
39
|
```
|
|
269
40
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
**After** (with STYLE.md):
|
|
273
|
-
- `/flow-dev` auto-loads `devflow/STYLE.md` when generating frontend code
|
|
274
|
-
- All component implementations must follow STYLE.md style definitions
|
|
275
|
-
- Pay special attention to: color usage, font usage, spacing usage, component structure
|
|
41
|
+
## Minimal Post-Style Workflow
|
|
276
42
|
|
|
277
|
-
**Example**:
|
|
278
43
|
```bash
|
|
279
|
-
|
|
280
|
-
/flow
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
Agent: Detected devflow/STYLE.md (v1.0.0), all frontend code will follow design style guide.
|
|
284
|
-
|
|
285
|
-
Implementing Task T003: Implement login button...
|
|
286
|
-
- Using STYLE.md Button Primary style
|
|
287
|
-
- Color: var(--color-primary)
|
|
288
|
-
- Radius: var(--radius-md)
|
|
289
|
-
- Spacing: var(--spacing-2) var(--spacing-4)
|
|
290
|
-
|
|
291
|
-
✅ Login button implementation complete, style complies with STYLE.md.
|
|
44
|
+
/flow:init "REQ-123|Feature"
|
|
45
|
+
/flow:spec "REQ-123"
|
|
46
|
+
/flow:dev "REQ-123"
|
|
47
|
+
/flow:verify "REQ-123" --strict
|
|
292
48
|
```
|
|
293
49
|
|
|
294
|
-
##
|
|
295
|
-
|
|
296
|
-
### 1. SSOT Principle (Single Source of Truth)
|
|
297
|
-
- STYLE.md is the sole source of truth for project design
|
|
298
|
-
- All UI-related work must reference STYLE.md
|
|
299
|
-
- Avoid design style fragmentation and inconsistency
|
|
300
|
-
|
|
301
|
-
### 2. Consistency First
|
|
302
|
-
- Unified visual language enhances product professionalism
|
|
303
|
-
- Consistent component styles reduce development and maintenance costs
|
|
304
|
-
- Smoother, more predictable user experience
|
|
305
|
-
|
|
306
|
-
### 3. Reusability
|
|
307
|
-
- All definitions are concrete and executable
|
|
308
|
-
- Example code is copy-paste ready, not pseudocode
|
|
309
|
-
- Reduce repetitive work, improve development efficiency
|
|
310
|
-
|
|
311
|
-
### 4. Evolvability
|
|
312
|
-
- Support iteration through `--update` parameter
|
|
313
|
-
- Version control (v1.0.0, v1.1.0...)
|
|
314
|
-
- Record reasons and changes for each update
|
|
315
|
-
|
|
316
|
-
### 5. User-Centered
|
|
317
|
-
- New projects through reference design collection + refinement loop
|
|
318
|
-
- Ensure user satisfaction
|
|
319
|
-
- Avoid large-scale refactoring later
|
|
320
|
-
|
|
321
|
-
## 📊 Workflow Position
|
|
322
|
-
|
|
323
|
-
```
|
|
324
|
-
/flow-init → research.md + tasks.json
|
|
325
|
-
↓
|
|
326
|
-
/core-roadmap → ROADMAP.md + BACKLOG.md (optional, project-level)
|
|
327
|
-
↓
|
|
328
|
-
/core-style → STYLE.md (optional, project-level design style guide) ⭐ NEW
|
|
329
|
-
↓
|
|
330
|
-
/flow-prd → PRD.md
|
|
331
|
-
↓
|
|
332
|
-
/flow-tech → TECH_DESIGN.md + data-model + contracts
|
|
333
|
-
↓
|
|
334
|
-
/flow-ui → UI_PROTOTYPE.html (must reference STYLE.md) ⭐ CHANGED
|
|
335
|
-
↓
|
|
336
|
-
/flow-epic → EPIC.md + TASKS.md
|
|
337
|
-
↓
|
|
338
|
-
/flow-dev → TASKS.md execution (frontend code must reference STYLE.md) ⭐ CHANGED
|
|
339
|
-
↓
|
|
340
|
-
/flow-qa → QA reports
|
|
341
|
-
↓
|
|
342
|
-
/flow-release → PR creation
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
## ⚠️ Error Handling
|
|
346
|
-
|
|
347
|
-
| Error Scenario | Handling |
|
|
348
|
-
|----------------|----------|
|
|
349
|
-
| **STYLE.md exists without --update** | Ask for confirmation to overwrite, exit if user declines |
|
|
350
|
-
| **No frontend features and no reference design** | Prompt user to provide reference design or confirm pure backend project |
|
|
351
|
-
| **Reference design replication fails** | Request more detailed design info (HTML/CSS/screenshot) |
|
|
352
|
-
| **Agent generation fails** | Keep style_analysis.md, prompt user to check and retry |
|
|
353
|
-
| **Constitution validation fails** | Block based on severity (warning level only prompts) |
|
|
354
|
-
|
|
355
|
-
## 🎯 Next Steps
|
|
356
|
-
|
|
357
|
-
1. **Review STYLE.md** - Ensure design style guide is complete and meets project needs
|
|
358
|
-
2. **Update existing components** (existing projects) - Adjust inconsistent components based on STYLE.md
|
|
359
|
-
3. **Run /flow-prd** - Start requirement development (if applicable)
|
|
360
|
-
4. **Run /core-roadmap** - Generate product roadmap (if applicable)
|
|
361
|
-
|
|
362
|
-
## 🔗 Related Commands
|
|
363
|
-
|
|
364
|
-
- [`/core-roadmap`](./core-roadmap.md) - Generate product roadmap
|
|
365
|
-
- [`/flow-ui`](./flow-ui.md) - Generate UI prototype (will reference STYLE.md)
|
|
366
|
-
- [`/flow-dev`](./flow-dev.md) - Execute development tasks (will reference STYLE.md)
|
|
367
|
-
- [`/flow-verify`](./flow-verify.md) - Consistency check (can check if code complies with STYLE.md)
|
|
368
|
-
|
|
369
|
-
## 📚 Deep Reading
|
|
370
|
-
|
|
371
|
-
- [Design System Guide](../guides/design-system-guide.md) (TBD)
|
|
372
|
-
- [Visual Consistency Management](../guides/visual-consistency.md) (TBD)
|
|
373
|
-
- [STYLE_TEMPLATE](../../.claude/docs/templates/STYLE_TEMPLATE.md)
|
|
374
|
-
|
|
375
|
-
## ❓ FAQ
|
|
376
|
-
|
|
377
|
-
### Q: When should I run `/core-style`?
|
|
378
|
-
A:
|
|
379
|
-
- ✅ During project initialization (establish design standards)
|
|
380
|
-
- ✅ When you have a reference design to replicate
|
|
381
|
-
- ✅ When existing project needs design specification organization
|
|
382
|
-
- ✅ When design style changes (use `--update`)
|
|
383
|
-
|
|
384
|
-
### Q: What's the difference between `/core-style` and `/flow-ui`?
|
|
385
|
-
A:
|
|
386
|
-
- **core-style**: Generates **project-level** design style guide (STYLE.md), one-time or as-needed updates
|
|
387
|
-
- **flow-ui**: Generates UI prototype (UI_PROTOTYPE.html) for **specific requirements**, runs per requirement
|
|
388
|
-
|
|
389
|
-
### Q: Do I need to run `/core-style` for a pure backend project?
|
|
390
|
-
A: No. `/core-style` is designed for frontend or full-stack projects. Pure backend projects don't need a design style guide.
|
|
391
|
-
|
|
392
|
-
### Q: Can I manually edit STYLE.md after it's generated?
|
|
393
|
-
A: Yes. STYLE.md is a Markdown file, you can edit it manually. However, it's recommended to use `/core-style --update` for consistency and version control.
|
|
394
|
-
|
|
395
|
-
### Q: What if I'm not satisfied with the reference design replica?
|
|
396
|
-
A: The agent provides a refinement loop where you can adjust multiple times until satisfied. Each adjustment generates a new version (reference-002.html, reference-003.html...), and you can revert anytime.
|
|
397
|
-
|
|
398
|
-
### Q: Will STYLE.md automatically apply to code?
|
|
399
|
-
A: No automatic code modification. However, `/flow-ui` and `/flow-dev` will auto-reference STYLE.md to ensure newly generated code complies with the style guide. Existing code needs manual adjustment (or use `/flow-verify` to check inconsistencies).
|
|
400
|
-
|
|
401
|
-
### Q: If my project uses Tailwind CSS, will STYLE.md include Tailwind configuration?
|
|
402
|
-
A: Yes. The agent auto-detects the tech stack. If using Tailwind CSS, STYLE.md will include Tailwind Config example code.
|
|
50
|
+
## Notes
|
|
403
51
|
|
|
404
|
-
|
|
405
|
-
|
|
52
|
+
- STYLE is a living SSOT; prefer `--update` instead of ad-hoc per-task overrides.
|
|
53
|
+
- Keep style decisions semantic (tokens/components), not page-specific patches.
|