@curdx/flow 1.1.11 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +79 -0
  4. package/README.md +74 -102
  5. package/agents/flow-adversary.md +1 -1
  6. package/agents/flow-architect.md +1 -1
  7. package/agents/flow-product-designer.md +1 -1
  8. package/agents/flow-qa-engineer.md +3 -3
  9. package/agents/flow-researcher.md +1 -1
  10. package/agents/flow-security-auditor.md +1 -1
  11. package/agents/flow-triage-analyst.md +3 -3
  12. package/agents/flow-ui-researcher.md +5 -5
  13. package/agents/flow-ux-designer.md +2 -2
  14. package/cli/install.js +16 -5
  15. package/commands/debug.md +10 -10
  16. package/commands/help.md +109 -87
  17. package/commands/implement.md +4 -4
  18. package/commands/init.md +5 -5
  19. package/commands/review.md +114 -130
  20. package/commands/spec.md +131 -89
  21. package/commands/start.md +100 -153
  22. package/commands/verify.md +110 -92
  23. package/gates/adversarial-review-gate.md +1 -1
  24. package/gates/coverage-audit-gate.md +1 -1
  25. package/gates/devex-gate.md +1 -1
  26. package/gates/edge-case-gate.md +1 -1
  27. package/gates/security-gate.md +3 -3
  28. package/hooks/scripts/session-start.sh +1 -1
  29. package/knowledge/epic-decomposition.md +2 -2
  30. package/knowledge/execution-strategies.md +4 -4
  31. package/knowledge/planning-reviews.md +6 -6
  32. package/knowledge/spec-driven-development.md +3 -3
  33. package/knowledge/two-stage-review.md +2 -2
  34. package/knowledge/wave-execution.md +5 -5
  35. package/package.json +1 -1
  36. package/agents/persona-amelia.md +0 -128
  37. package/agents/persona-david.md +0 -141
  38. package/agents/persona-emma.md +0 -179
  39. package/agents/persona-john.md +0 -105
  40. package/agents/persona-mary.md +0 -95
  41. package/agents/persona-oliver.md +0 -136
  42. package/agents/persona-rachel.md +0 -126
  43. package/agents/persona-serena.md +0 -175
  44. package/agents/persona-winston.md +0 -117
  45. package/commands/audit.md +0 -170
  46. package/commands/autoplan.md +0 -184
  47. package/commands/design.md +0 -155
  48. package/commands/discuss.md +0 -162
  49. package/commands/doctor.md +0 -124
  50. package/commands/index.md +0 -261
  51. package/commands/install-deps.md +0 -128
  52. package/commands/party.md +0 -241
  53. package/commands/plan-ceo.md +0 -117
  54. package/commands/plan-design.md +0 -107
  55. package/commands/plan-dx.md +0 -104
  56. package/commands/plan-eng.md +0 -108
  57. package/commands/qa.md +0 -118
  58. package/commands/requirements.md +0 -146
  59. package/commands/research.md +0 -141
  60. package/commands/security.md +0 -109
  61. package/commands/sketch.md +0 -118
  62. package/commands/spike.md +0 -181
  63. package/commands/status.md +0 -139
  64. package/commands/switch.md +0 -95
  65. package/commands/tasks.md +0 -189
  66. package/commands/triage.md +0 -160
@@ -1,117 +0,0 @@
1
- ---
2
- name: plan-ceo
3
- description: CEO-level planning review — strategic / scope / ROI / opportunity cost. A business-layer review of design.md.
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task]
6
- ---
7
-
8
- # Flow Plan CEO — Strategic-Layer Review
9
-
10
- @${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md
11
-
12
- Review design.md from the **CEO perspective**: is this worth doing? Is the scope right?
13
-
14
- ## Step 1: Preflight
15
-
16
- ```bash
17
- SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
18
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec"; exit 1; }
19
-
20
- DIR=".flow/specs/$SPEC_NAME"
21
- [ ! -f "$DIR/design.md" ] && { echo "✗ Missing design.md. Run /curdx-flow:design first"; exit 1; }
22
- ```
23
-
24
- ## Step 2: Dispatch CEO-perspective review
25
-
26
- Reuse the `flow-architect` agent but switch the perspective:
27
-
28
- ```
29
- Task:
30
- subagent_type: general-purpose
31
- description: "CEO Review: $SPEC_NAME"
32
- prompt: |
33
- **CEO Review Mode**
34
-
35
- You are not an architect, not a developer. You are a reviewer from the CEO / PM perspective.
36
-
37
- Full methodology: ${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md (Review 1)
38
-
39
- Review targets:
40
- - .flow/specs/$SPEC_NAME/requirements.md (business goals)
41
- - .flow/specs/$SPEC_NAME/design.md (technical solution)
42
- - .flow/PROJECT.md (project vision)
43
- - .flow/ROADMAP.md (roadmap)
44
-
45
- Review checklist (answer each):
46
-
47
- 1. Scope appropriateness
48
- - Solution scope vs. business value vs. timeline
49
- - Over-engineered? (doing more than currently necessary)
50
- - Insufficient? (users still unsatisfied after completion)
51
-
52
- 2. Timeline reasonableness
53
- - Refer to the priorities in ROADMAP.md
54
- - Is the urgency reasonable relative to other work in progress / pending?
55
-
56
- 3. Quantifiable ROI
57
- - User value: N users benefit / N scenarios unlocked
58
- - Business value: revenue / retention / brand
59
- - Engineering cost: estimated person-days
60
-
61
- 4. Opportunity cost
62
- - What does doing this mean we won't do?
63
- - Is what's being deferred more important?
64
-
65
- 5. Strategic alignment
66
- - Does it support company OKRs / quarterly goals
67
- - Does it lock in future choices (is this risky)
68
-
69
- 6. Stakeholders
70
- - Who benefits? How many?
71
- - Who is affected (possibly negatively)?
72
-
73
- Use sequential-thinking ≥ 5 rounds for derivation.
74
-
75
- Output:
76
- .flow/specs/$SPEC_NAME/plan-review-ceo.md
77
-
78
- Format:
79
- # CEO Plan Review: $SPEC_NAME
80
-
81
- ## Verdict
82
- - APPROVED / APPROVED_WITH_CONCERNS / NEEDS_REVISION / REJECTED
83
-
84
- ## Findings
85
-
86
- ### [Scope] Scope analysis
87
- ...
88
-
89
- ### [Timeline] Timeline analysis
90
- ...
91
-
92
- ### [ROI] Business value
93
- ...
94
-
95
- ## Recommendations
96
- - Concrete change recommendations (not abstract "increase value")
97
-
98
- Return a briefing to me.
99
- ```
100
-
101
- ## Step 3: Output
102
-
103
- ```
104
- ✓ CEO Review complete
105
-
106
- Verdict: <APPROVED / APPROVED_WITH_CONCERNS / NEEDS_REVISION>
107
-
108
- Key concerns:
109
- - <concern 1>
110
- - <concern 2>
111
-
112
- Report: .flow/specs/$SPEC_NAME/plan-review-ceo.md
113
-
114
- Next steps:
115
- - If NEEDS_REVISION → /curdx-flow:design to fix + rerun
116
- - If APPROVED → /curdx-flow:plan-eng (engineering layer) or /curdx-flow:tasks
117
- ```
@@ -1,107 +0,0 @@
1
- ---
2
- name: plan-design
3
- description: Design planning review — UI/UX, design system, accessibility review. Dispatches flow-ux-designer (Emma).
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task]
6
- ---
7
-
8
- # Flow Plan Design — Design-Layer Review
9
-
10
- @${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md
11
-
12
- Review design.md and existing sketches (if any) from the **UX perspective**: can users use it? Is the visuals consistent?
13
-
14
- ## Step 1: Preflight
15
-
16
- ```bash
17
- SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
18
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec"; exit 1; }
19
-
20
- # If no UI-related content (pure backend spec) → skip
21
- DIR=".flow/specs/$SPEC_NAME"
22
- if ! grep -qE "(UI|UX|interface|user interface|frontend)" "$DIR"/*.md 2>/dev/null; then
23
- echo "ℹ This spec does not involve UI; skipping Design Review"
24
- exit 0
25
- fi
26
- ```
27
-
28
- ## Step 2: Dispatch Emma (Design Review mode)
29
-
30
- ```
31
- Task:
32
- subagent_type: general-purpose
33
- description: "Design Review: $SPEC_NAME"
34
- prompt: |
35
- **Design Review Mode** (you are Emma, flow-ux-designer)
36
-
37
- Your full definition: ${CLAUDE_PLUGIN_ROOT}/agents/flow-ux-designer.md
38
- Review methodology: ${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md (Review 3)
39
-
40
- Review targets:
41
- - .flow/specs/$SPEC_NAME/design.md (UI-related sections)
42
- - .flow/specs/$SPEC_NAME/ui-sketch/ (if /curdx-flow:sketch has been run)
43
- - .flow/CONTEXT.md (user preferences)
44
- - Existing UI patterns in the project (.flow/codebase-index.md, if present)
45
-
46
- Review checklist:
47
-
48
- 1. User flow
49
- - Main scenario ≤ 3 steps?
50
- - Multiple entry points?
51
- - Keyboard flow?
52
-
53
- 2. Error states
54
- - Are failure messages user-friendly?
55
- - Does the user know how to recover?
56
-
57
- 3. Loading states
58
- - Visual feedback for long-running operations?
59
- - Skeleton / spinner?
60
-
61
- 4. Empty states
62
- - Guidance when no data (CTA / illustration)?
63
- - Not a blank page
64
-
65
- 5. Accessibility
66
- - Color contrast WCAG AA+?
67
- - Fully keyboard operable?
68
- - Semantic HTML + ARIA?
69
- - Screen-reader friendly?
70
-
71
- 6. Design system consistency
72
- - Using project tokens (colors / fonts / spacing)?
73
- - Using existing components, not reinventing?
74
- - New components within the theme?
75
-
76
- 7. Mobile adaptation
77
- - Usable at narrowest viewport (375px)?
78
- - Touch targets ≥ 44pt?
79
- - Both portrait and landscape unbroken?
80
-
81
- 8. Internationalization
82
- - Copy replaceable?
83
- - RTL compatible?
84
- - Space adapts to different lengths (e.g., German is ~30% longer than English)?
85
-
86
- Output: .flow/specs/$SPEC_NAME/plan-review-design.md
87
-
88
- Return a briefing.
89
- ```
90
-
91
- ## Step 3: Output
92
-
93
- ```
94
- 🎨 Design Review complete
95
-
96
- Verdict: <APPROVED / NEEDS_REVISION>
97
-
98
- Key findings:
99
- - <top 3>
100
-
101
- Report: .flow/specs/$SPEC_NAME/plan-review-design.md
102
-
103
- Next steps:
104
- - UI/UX issues → /curdx-flow:sketch to iterate again
105
- - Or /curdx-flow:design to update UI-related sections
106
- - Pass → /curdx-flow:plan-dx or /curdx-flow:tasks
107
- ```
@@ -1,104 +0,0 @@
1
- ---
2
- name: plan-dx
3
- description: DevEx planning review — next maintainer's perspective, 8-dimension evaluation (naming/comments/structure/errors/setup/types/tests/dev loop)
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task]
6
- ---
7
-
8
- # Flow Plan DX — Developer Experience Review
9
-
10
- @${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md
11
- @${CLAUDE_PLUGIN_ROOT}/gates/devex-gate.md
12
-
13
- Review from the **next maintainer's** perspective: in 6 months, can I or a colleague quickly pick this up?
14
-
15
- ## Step 1: Preflight
16
-
17
- ```bash
18
- SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
19
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec"; exit 1; }
20
- [ ! -f ".flow/specs/$SPEC_NAME/design.md" ] && { echo "✗ Missing design.md"; exit 1; }
21
- ```
22
-
23
- ## Step 2: Dispatch DX Review
24
-
25
- ```
26
- Task:
27
- subagent_type: general-purpose
28
- description: "DX Review: $SPEC_NAME"
29
- prompt: |
30
- **DevEx Review Mode**
31
-
32
- You review design.md on DevEx dimensions. Reuse the flow-reviewer agent:
33
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-reviewer.md
34
-
35
- Gate definition:
36
- ${CLAUDE_PLUGIN_ROOT}/gates/devex-gate.md
37
-
38
- Methodology:
39
- ${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md (Review 4)
40
-
41
- Review targets:
42
- - .flow/specs/$SPEC_NAME/design.md
43
- - Related source code (if design references existing code)
44
- - .flow/codebase-index.md (if present)
45
-
46
- 8-dimension scoring (0-10 per dimension):
47
-
48
- DX-01 Naming clarity
49
- DX-02 Intent comments
50
- DX-03 File structure
51
- DX-04 Error messages
52
- DX-05 Easy setup
53
- DX-06 Clear types
54
- DX-07 Tests as docs
55
- DX-08 Fast dev loop
56
-
57
- For each dimension:
58
- - Observe relevant decisions in the design
59
- - If the design specifically mentions a dimension (e.g., "we use strict TypeScript") → basis for scoring
60
- - If the design does not mention it (e.g., no word about error-message design) → mark as "missing", score 5
61
-
62
- Use sequential-thinking ≥ 4 rounds.
63
-
64
- Output: .flow/specs/$SPEC_NAME/plan-review-dx.md
65
-
66
- Format:
67
- # DX Plan Review: $SPEC_NAME
68
-
69
- ## Scores
70
- DX-01 Naming: 7/10
71
- DX-02 Comments: 5/10 (not mentioned)
72
- DX-03 Structure: 8/10
73
- ...
74
-
75
- Total: N/80
76
-
77
- ## Findings
78
-
79
- ### DX-02 Intent comments
80
- Observation: the design does not explicitly state a comment strategy
81
- Risk: the implementer may under-comment
82
- Recommendation: add a paragraph in the design "key decision points should have why comments"
83
-
84
- ...
85
- ```
86
-
87
- ## Step 3: Output
88
-
89
- ```
90
- 📐 DX Review complete
91
-
92
- Total: N/80 ($([ $N -ge 40 ] && echo "pass" || echo "needs improvement"))
93
-
94
- Weakest dimensions:
95
- - <dimension 1> N/10
96
- - <dimension 2> N/10
97
-
98
- Report: .flow/specs/$SPEC_NAME/plan-review-dx.md
99
-
100
- Next steps:
101
- - Add strategies in design.md for low-scoring dimensions
102
- - Or add "DX checkpoint" tasks in tasks.md
103
- - Pass → /curdx-flow:tasks (execution breakdown)
104
- ```
@@ -1,108 +0,0 @@
1
- ---
2
- name: plan-eng
3
- description: Engineering planning review — architecture lock-in, risk identification, technical debt assessment. Dispatches flow-architect in review mode.
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task]
6
- ---
7
-
8
- # Flow Plan Engineering — Engineering-Layer Review
9
-
10
- @${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md
11
-
12
- Review design.md once more from the **engineer's perspective**: will the architecture work? Is it maintainable long-term?
13
-
14
- ## Step 1: Preflight
15
-
16
- ```bash
17
- SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
18
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec"; exit 1; }
19
- [ ! -f ".flow/specs/$SPEC_NAME/design.md" ] && { echo "✗ Missing design.md"; exit 1; }
20
- ```
21
-
22
- ## Step 2: Dispatch Eng Review
23
-
24
- ```
25
- Task:
26
- subagent_type: general-purpose
27
- description: "Eng Review: $SPEC_NAME"
28
- prompt: |
29
- **Engineering Review Mode**
30
-
31
- You are an independent engineering reviewer. You read design.md to find risks, holes, and unclarities.
32
-
33
- Full methodology: ${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md (Review 2)
34
-
35
- Review targets:
36
- - .flow/specs/$SPEC_NAME/design.md (main body)
37
- - .flow/specs/$SPEC_NAME/requirements.md (NFR requirements)
38
- - .flow/STATE.md (existing decisions)
39
-
40
- Review checklist:
41
-
42
- 1. Architecture lock-in
43
- - Does each AD-NN have a tradeoff explanation?
44
- - Does the rationale reference sequential-thinking rounds?
45
- - Is there an explicit cost ("we accepted X")?
46
-
47
- 2. Scalability
48
- - What happens at 10x users / 10x data?
49
- - Are bottlenecks identified?
50
-
51
- 3. Reasonable dependencies
52
- - Is the library / service choice justified?
53
- - Risk of deprecation?
54
- - Known CVEs / issues?
55
-
56
- 4. Clear data flow
57
- - Does the mermaid diagram reflect the real flow?
58
- - Are all component boundaries explicit?
59
-
60
- 5. Error paths
61
- - Handling of upstream failures?
62
- - Handling of downstream failures?
63
- - User input anomalies?
64
- - Concurrency / retries?
65
-
66
- 6. Test strategy
67
- - Reasonable unit / integration / E2E ratio?
68
- - Core scenarios covered?
69
-
70
- 7. Deployment feasibility
71
- - CI/CD pipeline?
72
- - Monitoring / alerting?
73
- - Rollback strategy?
74
-
75
- Use sequential-thinking ≥ 6 rounds (adversarial-style review; "looks fine" is not accepted).
76
- Must find ≥ 3 findings.
77
-
78
- Output: .flow/specs/$SPEC_NAME/plan-review-eng.md
79
-
80
- Format for each finding:
81
- ### [Category] Issue
82
- Location: design.md section N / AD-NN
83
- Observation: what was specifically seen
84
- Risk: high / medium / low + consequences
85
- Recommendation: concrete change (command or code snippet)
86
- ```
87
-
88
- ## Step 3: Output
89
-
90
- ```
91
- ⚙ Engineering Review complete
92
-
93
- Findings:
94
- High: $HIGH
95
- Medium: $MED
96
- Low: $LOW
97
-
98
- Verdict: <APPROVED / NEEDS_REVISION>
99
-
100
- Key risks:
101
- - <top 3>
102
-
103
- Report: .flow/specs/$SPEC_NAME/plan-review-eng.md
104
-
105
- Next steps:
106
- - Fix high/medium → /curdx-flow:design to update (bump version)
107
- - After pass → /curdx-flow:plan-design or /curdx-flow:tasks
108
- ```
package/commands/qa.md DELETED
@@ -1,118 +0,0 @@
1
- ---
2
- name: qa
3
- description: Real-browser QA — run user flows with chrome-devtools MCP, capturing bugs / performance / accessibility. Dispatches flow-qa-engineer (Oliver).
4
- argument-hint: "[spec-name] [--url=<dev-url>]"
5
- allowed-tools: [Read, Write, Bash, Task, WebFetch]
6
- ---
7
-
8
- # Flow QA — Real-Browser Testing
9
-
10
- Dispatches `flow-qa-engineer` (Oliver) to run user flows in real Chrome using **chrome-devtools MCP**.
11
-
12
- ## Step 1: Preflight check
13
-
14
- ```bash
15
- [ ! -d ".flow" ] && { echo "✗ Not a CurDX-Flow project"; exit 1; }
16
-
17
- ARGS="$ARGUMENTS"
18
- URL=""
19
- case "$ARGS" in
20
- *--url=*)
21
- URL=$(echo "$ARGS" | grep -oE -- '--url=[^[:space:]]+' | cut -d= -f2)
22
- ;;
23
- esac
24
- SPEC_NAME=$(echo "$ARGS" | sed 's/--url=[^ ]*//g' | xargs)
25
- [ -z "$SPEC_NAME" ] && SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
26
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec"; exit 1; }
27
- ```
28
-
29
- ## Step 2: Detect chrome-devtools MCP
30
-
31
- ```bash
32
- # If MCP is not up, flow-qa-engineer will fall back to static QA
33
- # Do not block here; the agent will handle it
34
- ```
35
-
36
- ## Step 3: Confirm dev server URL
37
-
38
- If `--url` is not given, ask:
39
- ```
40
- AskUserQuestion:
41
- question: "What is your dev server URL?"
42
- options:
43
- - http://localhost:3000 (common)
44
- - http://localhost:5173 (Vite)
45
- - Other (custom)
46
- ```
47
-
48
- ## Step 4: Dispatch Oliver
49
-
50
- ```
51
- Task:
52
- subagent_type: general-purpose
53
- description: "QA: $SPEC_NAME"
54
- prompt: |
55
- You are the flow-qa-engineer agent (Oliver). Full definition:
56
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-qa-engineer.md
57
-
58
- Target:
59
- spec_name: $SPEC_NAME
60
- URL: $URL
61
-
62
- Prerequisites:
63
- - .flow/specs/$SPEC_NAME/requirements.md (AC list)
64
- - .flow/specs/$SPEC_NAME/design.md (error paths + NFR)
65
-
66
- Workflow:
67
- 1. Detect chrome-devtools MCP (mcp__chrome-devtools__*)
68
- - Available → real-browser QA
69
- - Unavailable → static QA, clearly inform the user
70
- 2. Run the happy path (once per AC)
71
- 3. Run edge cases (at least 4 of the 7 categories in edge-case-gate)
72
- 4. Performance trace (LCP / INP / CLS)
73
- 5. Accessibility scan
74
- 6. Save screenshots to .flow/specs/$SPEC_NAME/qa-screenshots/
75
- 7. Generate .flow/specs/$SPEC_NAME/qa-report.md
76
-
77
- Return to me:
78
- - Bug count (categorized by severity)
79
- - Performance data (measured, not estimated)
80
- - Accessibility warnings
81
- - Recommended next steps
82
- ```
83
-
84
- ## Step 5: Read + report
85
-
86
- ```bash
87
- REPORT=".flow/specs/$SPEC_NAME/qa-report.md"
88
- [ ! -f "$REPORT" ] && { echo "⚠ QA report was not generated"; exit 1; }
89
-
90
- HIGH_BUGS=$(grep -c "\[high\]" "$REPORT" || echo 0)
91
- MED_BUGS=$(grep -c "\[medium\]" "$REPORT" || echo 0)
92
- LOW_BUGS=$(grep -c "\[low\]" "$REPORT" || echo 0)
93
- ```
94
-
95
- ## Step 6: Output to user
96
-
97
- ```
98
- 🔬 QA complete: $SPEC_NAME
99
-
100
- Findings:
101
- [high]: $HIGH_BUGS
102
- [medium]: $MED_BUGS
103
- [low]: $LOW_BUGS
104
-
105
- Report: .flow/specs/$SPEC_NAME/qa-report.md
106
- Screenshots: .flow/specs/$SPEC_NAME/qa-screenshots/
107
-
108
- Next steps:
109
- - Fix high-severity bugs → /curdx-flow:implement --task=QA-fix
110
- - Or add tasks to Phase 3.X in tasks.md
111
- - Retest: /curdx-flow:qa
112
- ```
113
-
114
- ## Error recovery
115
-
116
- - chrome-devtools MCP not installed → recommend `/curdx-flow:install-deps` or `claude mcp add chrome-devtools`
117
- - Dev server not running → prompt the user to start it and rerun
118
- - URL not accessible → prompt to check (`curl -I $URL`)
@@ -1,146 +0,0 @@
1
- ---
2
- name: requirements
3
- description: Run the requirements stage — dispatch the flow-product-designer agent to generate user stories + FR/NFR, producing requirements.md
4
- argument-hint: "[spec-name]"
5
- allowed-tools: [Read, Write, Bash, Task, AskUserQuestion]
6
- ---
7
-
8
- # Requirements Stage
9
-
10
- Dispatch the `flow-product-designer` agent to translate research directions into user stories.
11
-
12
- ## Step 1: Resolve spec + preflight checks
13
-
14
- ```bash
15
- SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
16
-
17
- [ -z "$SPEC_NAME" ] && { echo "❌ Run /curdx-flow:start first"; exit 1; }
18
- [ ! -f ".flow/specs/$SPEC_NAME/research.md" ] && {
19
- echo "❌ research.md missing. Run /curdx-flow:research first"
20
- exit 1
21
- }
22
- ```
23
-
24
- Verify the status of research:
25
-
26
- ```bash
27
- python3 -c "
28
- import re
29
- fm = open('.flow/specs/$SPEC_NAME/research.md').read()[:500]
30
- m = re.search(r'status:\s*(\w+)', fm)
31
- status = m.group(1) if m else 'unknown'
32
- if status not in ('completed', 'approved'):
33
- print(f'⚠ research status: {status}')
34
- print('Recommend completing the research stage before continuing')
35
- "
36
- ```
37
-
38
- ## Step 2: Open question check
39
-
40
- If research.md lists open questions but no user answers are visible, prompt:
41
-
42
- ```
43
- ⚠ research.md has unanswered open questions:
44
- Q1: ...
45
- Q2: ...
46
-
47
- You can:
48
- 1. Answer the questions first (write them to STATE.md or state them), then run /curdx-flow:requirements
49
- 2. Let the agent continue based on reasonable assumptions (assumptions will be listed explicitly in requirements.md)
50
-
51
- Continue? (continue / answer / skip)
52
- ```
53
-
54
- Use AskUserQuestion.
55
-
56
- ## Step 3: Update state + dispatch agent
57
-
58
- ```python
59
- # Mark in_progress
60
- import json
61
- s = json.load(open(f'.flow/specs/{SPEC_NAME}/.state.json'))
62
- s.setdefault('phase_status',{})['requirements']='in_progress'
63
- s['phase']='requirements'
64
- json.dump(s, open(f'.flow/specs/{SPEC_NAME}/.state.json','w'), indent=2, ensure_ascii=False)
65
- ```
66
-
67
- Task dispatch:
68
-
69
- ```
70
- Task:
71
- subagent_type: general-purpose
72
- description: "Requirements design $SPEC_NAME"
73
- prompt: |
74
- You are the flow-product-designer agent. Full definition at:
75
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-product-designer.md
76
-
77
- Prerequisite files:
78
- - .flow/specs/$SPEC_NAME/research.md (must read)
79
- - .flow/PROJECT.md
80
- - .flow/CONTEXT.md
81
-
82
- Template:
83
- ${CLAUDE_PLUGIN_ROOT}/templates/requirements.md.tmpl
84
-
85
- Output:
86
- .flow/specs/$SPEC_NAME/requirements.md
87
-
88
- Workflow:
89
- 1. Read research.md to understand recommended directions
90
- 2. Generate user stories (US-NN) — at least 2
91
- 3. At least 3 acceptance criteria per US (AC-X.Y), must cover happy path + edges + errors
92
- 4. Extract FR (functional requirements) + NFR (at least performance and security)
93
- 5. Explicit Out of Scope (at least 3 items)
94
- 6. List open questions (if user decisions are needed)
95
- 7. Update .state.json and .progress.md
96
-
97
- If multiple reasonable interpretations exist, you MUST AskUserQuestion — do not silently pick a direction.
98
-
99
- Success criteria:
100
- - At least 2 US, all from the user's perspective (non-technical language)
101
- - Each AC testable (can be written as curl / assert)
102
- - At least 3 FR, NFR covers at least P and S
103
- - Out of Scope lists at least 3 items
104
-
105
- Return a brief when finished.
106
- ```
107
-
108
- ## Step 4: Output verification
109
-
110
- ```bash
111
- REQ_FILE=".flow/specs/$SPEC_NAME/requirements.md"
112
-
113
- # Count US / FR / AC
114
- US_COUNT=$(grep -c "^### US-" "$REQ_FILE" || echo 0)
115
- FR_COUNT=$(grep -c "^- \*\*FR-" "$REQ_FILE" || echo 0)
116
- AC_COUNT=$(grep -c "^- AC-" "$REQ_FILE" || echo 0)
117
-
118
- echo " US: $US_COUNT, FR: $FR_COUNT, AC: $AC_COUNT"
119
-
120
- # Minimum requirements
121
- [ "$US_COUNT" -lt 2 ] && echo "⚠ Fewer than 2 user stories"
122
- [ "$FR_COUNT" -lt 3 ] && echo "⚠ Fewer than 3 functional requirements"
123
- [ "$AC_COUNT" -lt 6 ] && echo "⚠ Fewer than 6 acceptance criteria (average < 3 per US)"
124
- ```
125
-
126
- ## Step 5: Output
127
-
128
- ```
129
- ✓ requirements stage complete
130
-
131
- File: .flow/specs/$SPEC_NAME/requirements.md
132
- User stories: N
133
- Functional reqs: M
134
- Acceptance criteria: K
135
-
136
- Next steps:
137
- - Review requirements.md
138
- - If the agent listed open questions, answer them before entering design
139
- - /curdx-flow:design — enter design stage
140
- ```
141
-
142
- ## Error recovery
143
-
144
- - research.md missing → prompt to run /curdx-flow:research first
145
- - Agent times out → requirements may be too complex, consider splitting into an Epic (/curdx-flow:triage, see Phase 4)
146
- - Agent made a major interpretation without asking the user → the user can annotate requirements.md and request a correction