@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.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +79 -0
- package/README.md +74 -102
- package/agents/flow-adversary.md +1 -1
- package/agents/flow-architect.md +1 -1
- package/agents/flow-product-designer.md +1 -1
- package/agents/flow-qa-engineer.md +3 -3
- package/agents/flow-researcher.md +1 -1
- package/agents/flow-security-auditor.md +1 -1
- package/agents/flow-triage-analyst.md +3 -3
- package/agents/flow-ui-researcher.md +5 -5
- package/agents/flow-ux-designer.md +2 -2
- package/cli/install.js +16 -5
- package/commands/debug.md +10 -10
- package/commands/help.md +109 -87
- package/commands/implement.md +4 -4
- package/commands/init.md +5 -5
- package/commands/review.md +114 -130
- package/commands/spec.md +131 -89
- package/commands/start.md +100 -153
- package/commands/verify.md +110 -92
- package/gates/adversarial-review-gate.md +1 -1
- package/gates/coverage-audit-gate.md +1 -1
- package/gates/devex-gate.md +1 -1
- package/gates/edge-case-gate.md +1 -1
- package/gates/security-gate.md +3 -3
- package/hooks/scripts/session-start.sh +1 -1
- package/knowledge/epic-decomposition.md +2 -2
- package/knowledge/execution-strategies.md +4 -4
- package/knowledge/planning-reviews.md +6 -6
- package/knowledge/spec-driven-development.md +3 -3
- package/knowledge/two-stage-review.md +2 -2
- package/knowledge/wave-execution.md +5 -5
- package/package.json +1 -1
- package/agents/persona-amelia.md +0 -128
- package/agents/persona-david.md +0 -141
- package/agents/persona-emma.md +0 -179
- package/agents/persona-john.md +0 -105
- package/agents/persona-mary.md +0 -95
- package/agents/persona-oliver.md +0 -136
- package/agents/persona-rachel.md +0 -126
- package/agents/persona-serena.md +0 -175
- package/agents/persona-winston.md +0 -117
- package/commands/audit.md +0 -170
- package/commands/autoplan.md +0 -184
- package/commands/design.md +0 -155
- package/commands/discuss.md +0 -162
- package/commands/doctor.md +0 -124
- package/commands/index.md +0 -261
- package/commands/install-deps.md +0 -128
- package/commands/party.md +0 -241
- package/commands/plan-ceo.md +0 -117
- package/commands/plan-design.md +0 -107
- package/commands/plan-dx.md +0 -104
- package/commands/plan-eng.md +0 -108
- package/commands/qa.md +0 -118
- package/commands/requirements.md +0 -146
- package/commands/research.md +0 -141
- package/commands/security.md +0 -109
- package/commands/sketch.md +0 -118
- package/commands/spike.md +0 -181
- package/commands/status.md +0 -139
- package/commands/switch.md +0 -95
- package/commands/tasks.md +0 -189
- package/commands/triage.md +0 -160
package/commands/research.md
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: research
|
|
3
|
-
description: Run the research stage — dispatch the flow-researcher agent to deeply explore the problem, producing research.md
|
|
4
|
-
argument-hint: "[spec-name]"
|
|
5
|
-
allowed-tools: [Read, Write, Bash, Task]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Research Stage
|
|
9
|
-
|
|
10
|
-
Dispatch the `flow-researcher` agent to complete the research stage of a spec.
|
|
11
|
-
|
|
12
|
-
## Step 1: Resolve target spec
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# Use the argument if provided; otherwise use the active spec
|
|
16
|
-
if [ -n "$ARGUMENTS" ]; then
|
|
17
|
-
SPEC_NAME="$ARGUMENTS"
|
|
18
|
-
else
|
|
19
|
-
SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
if [ -z "$SPEC_NAME" ] || [ ! -d ".flow/specs/$SPEC_NAME" ]; then
|
|
23
|
-
echo "❌ Spec does not exist. Use /curdx-flow:start <name> \"<goal>\" to create a new spec"
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Step 2: Preflight checks
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# The research stage has no prerequisites; just verify the spec directory is ready
|
|
32
|
-
if [ ! -f ".flow/specs/$SPEC_NAME/.state.json" ]; then
|
|
33
|
-
echo "❌ Spec state file missing. Run /curdx-flow:start to re-initialize"
|
|
34
|
-
exit 1
|
|
35
|
-
fi
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
If research.md already exists with status=completed:
|
|
39
|
-
- Ask the user whether to overwrite (AskUserQuestion)
|
|
40
|
-
- Default: do not overwrite; suggest `/curdx-flow:requirements` to move to the next step
|
|
41
|
-
|
|
42
|
-
## Step 3: Update state
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
# Mark the research stage as in_progress
|
|
46
|
-
python3 <<'EOF'
|
|
47
|
-
import json
|
|
48
|
-
from pathlib import Path
|
|
49
|
-
state_file = Path(f".flow/specs/$SPEC_NAME/.state.json")
|
|
50
|
-
state = json.loads(state_file.read_text())
|
|
51
|
-
state.setdefault("phase_status", {})["research"] = "in_progress"
|
|
52
|
-
state["phase"] = "research"
|
|
53
|
-
state_file.write_text(json.dumps(state, indent=2, ensure_ascii=False))
|
|
54
|
-
EOF
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Step 4: Dispatch the flow-researcher agent
|
|
58
|
-
|
|
59
|
-
Using the Task tool:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Task:
|
|
63
|
-
subagent_type: general-purpose
|
|
64
|
-
description: "Research $SPEC_NAME"
|
|
65
|
-
prompt: |
|
|
66
|
-
You are the flow-researcher agent. Your full responsibilities and workflow are at:
|
|
67
|
-
${CLAUDE_PLUGIN_ROOT}/agents/flow-researcher.md
|
|
68
|
-
|
|
69
|
-
Spec prerequisites to read:
|
|
70
|
-
- .flow/specs/$SPEC_NAME/.state.json (goal + state)
|
|
71
|
-
- .flow/PROJECT.md
|
|
72
|
-
- .flow/CONTEXT.md
|
|
73
|
-
- .flow/STATE.md
|
|
74
|
-
|
|
75
|
-
Template (you must populate and write to research.md):
|
|
76
|
-
${CLAUDE_PLUGIN_ROOT}/templates/research.md.tmpl
|
|
77
|
-
|
|
78
|
-
Output file:
|
|
79
|
-
.flow/specs/$SPEC_NAME/research.md
|
|
80
|
-
|
|
81
|
-
Workflow requirements:
|
|
82
|
-
1. Load context (Step 1)
|
|
83
|
-
2. Call mcp__claude_mem__search to retrieve history (Step 2)
|
|
84
|
-
3. sequential-thinking 5+ rounds for problem understanding (Step 3)
|
|
85
|
-
4. Glob/Grep to scan existing code (Step 4)
|
|
86
|
-
5. context7 to look up the latest docs for 2-3 technical options (Step 5)
|
|
87
|
-
6. WebSearch to supplement (Step 6, if needed)
|
|
88
|
-
7. Write research.md (based on the template, replacing placeholders)
|
|
89
|
-
8. Update .state.json and .progress.md (Step 8)
|
|
90
|
-
|
|
91
|
-
Success criteria:
|
|
92
|
-
- research.md exists and matches the template structure
|
|
93
|
-
- Problem understanding section has 3+ explicit assumptions
|
|
94
|
-
- 2-3 technical options, each referencing context7 results
|
|
95
|
-
- Code analysis includes actual file paths found
|
|
96
|
-
- Recommended direction + rationale is clear
|
|
97
|
-
- At least 1 open question (unless the research is fully unambiguous)
|
|
98
|
-
|
|
99
|
-
Forbidden:
|
|
100
|
-
- Writing library APIs from memory
|
|
101
|
-
- Skipping context7 queries
|
|
102
|
-
- sequentialthinking < 5 rounds
|
|
103
|
-
- Creating any new files outside research.md
|
|
104
|
-
|
|
105
|
-
When done, return a brief (findings, recommendations, open questions).
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Step 5: After the agent completes
|
|
109
|
-
|
|
110
|
-
Read the agent-generated research.md and verify that key sections exist:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
for section in "Problem Understanding" "Technical Options" "Existing Code Analysis" "Feasibility" "Recommended Direction"; do
|
|
114
|
-
if ! grep -q "$section" ".flow/specs/$SPEC_NAME/research.md" 2>/dev/null; then
|
|
115
|
-
echo "⚠ research.md missing section: $section"
|
|
116
|
-
fi
|
|
117
|
-
done
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
If any section is missing, emit a warning but do not block (the user decides whether to re-run).
|
|
121
|
-
|
|
122
|
-
## Step 6: Output suggestions
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
✓ research stage complete
|
|
126
|
-
|
|
127
|
-
File: .flow/specs/$SPEC_NAME/research.md
|
|
128
|
-
|
|
129
|
-
Next steps:
|
|
130
|
-
- Read research.md and confirm the recommended direction is reasonable
|
|
131
|
-
- Answer the open questions listed by the agent (if any)
|
|
132
|
-
- /curdx-flow:requirements — enter the requirements stage
|
|
133
|
-
|
|
134
|
-
To re-research, just run /curdx-flow:research again
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Error recovery
|
|
138
|
-
|
|
139
|
-
- research.md generation fails → check MCP status (/curdx-flow:doctor), retry
|
|
140
|
-
- Agent exceeds 40 turns → the research is too complex, narrow the target scope
|
|
141
|
-
- context7 unavailable → the agent falls back to WebSearch, but must explicitly inform the user
|
package/commands/security.md
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: security
|
|
3
|
-
description: Security audit — OWASP Top 10 + STRIDE + dependency CVEs. Dispatches flow-security-auditor (Serena).
|
|
4
|
-
argument-hint: "[spec-name]"
|
|
5
|
-
allowed-tools: [Read, Write, Bash, Task, Grep, Glob, WebSearch]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Flow Security — Security Audit
|
|
9
|
-
|
|
10
|
-
@${CLAUDE_PLUGIN_ROOT}/gates/security-gate.md
|
|
11
|
-
|
|
12
|
-
Dispatches `flow-security-auditor` (Serena) to perform a full security audit.
|
|
13
|
-
|
|
14
|
-
## When to use
|
|
15
|
-
|
|
16
|
-
- Specs touching authentication / authorization / payments / PII
|
|
17
|
-
- Pre-release gate
|
|
18
|
-
- After adding new API endpoints
|
|
19
|
-
- After dependency upgrades
|
|
20
|
-
|
|
21
|
-
## Step 1: Preflight
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
SPEC_NAME="${ARGUMENTS:-$(cat .flow/.active-spec 2>/dev/null)}"
|
|
25
|
-
|
|
26
|
-
# Can still run without an active spec (global security scan)
|
|
27
|
-
if [ -z "$SPEC_NAME" ]; then
|
|
28
|
-
echo "ℹ No active spec; running a security scan across the entire codebase"
|
|
29
|
-
SPEC_NAME="_global"
|
|
30
|
-
fi
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Step 2: Dispatch Serena
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Task:
|
|
37
|
-
subagent_type: general-purpose
|
|
38
|
-
description: "Security Audit: $SPEC_NAME"
|
|
39
|
-
prompt: |
|
|
40
|
-
You are the flow-security-auditor agent (Serena). Full definition:
|
|
41
|
-
${CLAUDE_PLUGIN_ROOT}/agents/flow-security-auditor.md
|
|
42
|
-
|
|
43
|
-
Audit scope:
|
|
44
|
-
$([ "$SPEC_NAME" = "_global" ] && echo "Entire codebase" || echo ".flow/specs/$SPEC_NAME/ + related code")
|
|
45
|
-
|
|
46
|
-
Prerequisites:
|
|
47
|
-
- OWASP Top 10 (2021) checklist
|
|
48
|
-
- STRIDE threat modeling
|
|
49
|
-
- package.json (npm audit)
|
|
50
|
-
- Project auth / data-layer code
|
|
51
|
-
|
|
52
|
-
Workflow:
|
|
53
|
-
1. Scan OWASP 10 categories in parallel
|
|
54
|
-
- A01: Broken access control
|
|
55
|
-
- A02: Cryptography
|
|
56
|
-
- A03: Injection
|
|
57
|
-
- A04: Insecure Design
|
|
58
|
-
- A05: Misconfiguration
|
|
59
|
-
- A06: CVE (npm audit)
|
|
60
|
-
- A07: Auth failures
|
|
61
|
-
- A08: Integrity
|
|
62
|
-
- A09: Logging
|
|
63
|
-
- A10: SSRF
|
|
64
|
-
2. STRIDE threat modeling (≥6 rounds of sequential-thinking)
|
|
65
|
-
3. context7 to check CVEs for critical dependencies
|
|
66
|
-
4. Manual review of suspicious areas
|
|
67
|
-
5. Generate security-audit.md
|
|
68
|
-
|
|
69
|
-
Output:
|
|
70
|
-
- .flow/specs/$SPEC_NAME/security-audit.md (or .flow/security-audit-global.md)
|
|
71
|
-
|
|
72
|
-
Return to me:
|
|
73
|
-
- Findings classified by risk (high/medium/low)
|
|
74
|
-
- Number of must-fix items
|
|
75
|
-
- Recommended order
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Step 3: Output
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
REPORT=".flow/specs/$SPEC_NAME/security-audit.md"
|
|
82
|
-
[ "$SPEC_NAME" = "_global" ] && REPORT=".flow/security-audit-global.md"
|
|
83
|
-
|
|
84
|
-
HIGH=$(grep -c "\[High\]" "$REPORT" || echo 0)
|
|
85
|
-
MED=$(grep -c "\[Medium\]" "$REPORT" || echo 0)
|
|
86
|
-
LOW=$(grep -c "\[Low\]" "$REPORT" || echo 0)
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
🔒 Security Audit complete
|
|
91
|
-
|
|
92
|
-
Risk distribution:
|
|
93
|
-
High: $HIGH (must fix, blocks release)
|
|
94
|
-
Medium: $MED (recommended to fix)
|
|
95
|
-
Low: $LOW (as needed)
|
|
96
|
-
|
|
97
|
-
Report: $REPORT
|
|
98
|
-
|
|
99
|
-
Next steps:
|
|
100
|
-
- High risk → /curdx-flow:implement adds fix tasks
|
|
101
|
-
- Or STATE.md explicitly waives + commits to a fix timeline
|
|
102
|
-
- After fixing → /curdx-flow:security to re-audit
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Error recovery
|
|
106
|
-
|
|
107
|
-
- npm audit requires package.json → non-Node projects skip this class
|
|
108
|
-
- context7 unavailable → use WebSearch to supplement CVE queries
|
|
109
|
-
- No active spec → global scan mode
|
package/commands/sketch.md
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sketch
|
|
3
|
-
description: UI design sketch — invokes the frontend-design skill to generate multiple HTML variants. Dispatches flow-ux-designer (Emma).
|
|
4
|
-
argument-hint: "[spec-name] [\"<description>\"]"
|
|
5
|
-
allowed-tools: [Read, Write, Bash, Task, WebSearch, AskUserQuestion]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Flow Sketch — UI Sketch
|
|
9
|
-
|
|
10
|
-
Dispatches `flow-ux-designer` (Emma) to use the **frontend-design skill** to generate tasteful UI variants.
|
|
11
|
-
|
|
12
|
-
## Step 1: Parse arguments
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
ARGS="$ARGUMENTS"
|
|
16
|
-
# The first word may be spec-name (if such a spec exists); otherwise it is the description
|
|
17
|
-
|
|
18
|
-
SPEC_NAME=""
|
|
19
|
-
DESCRIPTION=""
|
|
20
|
-
|
|
21
|
-
FIRST_WORD=$(echo "$ARGS" | awk '{print $1}')
|
|
22
|
-
if [ -d ".flow/specs/$FIRST_WORD" ]; then
|
|
23
|
-
SPEC_NAME="$FIRST_WORD"
|
|
24
|
-
DESCRIPTION=$(echo "$ARGS" | sed "s/^$FIRST_WORD//" | sed 's/^["\x27]//;s/["\x27]$//' | xargs)
|
|
25
|
-
else
|
|
26
|
-
DESCRIPTION=$(echo "$ARGS" | sed 's/^["\x27]//;s/["\x27]$//')
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
[ -z "$SPEC_NAME" ] && SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Step 2: Preflight checks
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Requires at least an active spec (to read CONTEXT.md)
|
|
36
|
-
if [ -z "$SPEC_NAME" ] && [ -z "$DESCRIPTION" ]; then
|
|
37
|
-
echo "Usage: /curdx-flow:sketch [spec] \"<description of what to sketch>\""
|
|
38
|
-
echo "Example: /curdx-flow:sketch \"login form\""
|
|
39
|
-
exit 1
|
|
40
|
-
fi
|
|
41
|
-
|
|
42
|
-
# Check frontend-design skill (if unavailable, fall back)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Step 3: Ask for the variant count
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
AskUserQuestion:
|
|
49
|
-
Question: "How many variants to generate?"
|
|
50
|
-
Options:
|
|
51
|
-
- 2 (compare minimalist vs distinctive)
|
|
52
|
-
- 3 (recommended — adds a dense variant)
|
|
53
|
-
- Custom
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Step 4: Dispatch Emma
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
Task:
|
|
60
|
-
subagent_type: general-purpose
|
|
61
|
-
description: "UI Sketch: $DESCRIPTION"
|
|
62
|
-
prompt: |
|
|
63
|
-
You are the flow-ux-designer agent (Emma). Full definition:
|
|
64
|
-
${CLAUDE_PLUGIN_ROOT}/agents/flow-ux-designer.md
|
|
65
|
-
|
|
66
|
-
Task:
|
|
67
|
-
- Description: $DESCRIPTION
|
|
68
|
-
- Spec: $SPEC_NAME (optional)
|
|
69
|
-
- Variant count: $VARIANT_COUNT
|
|
70
|
-
|
|
71
|
-
Prerequisites:
|
|
72
|
-
- .flow/CONTEXT.md (user UI preferences)
|
|
73
|
-
- .flow/specs/$SPEC_NAME/requirements.md (if present)
|
|
74
|
-
- .flow/specs/$SPEC_NAME/design.md (if present)
|
|
75
|
-
- .flow/specs/$SPEC_NAME/ui-research.md (if /curdx-flow:ui-research has been run)
|
|
76
|
-
|
|
77
|
-
Workflow:
|
|
78
|
-
1. Detect the frontend-design skill
|
|
79
|
-
- Available: activate it to guide design choices
|
|
80
|
-
- Unavailable: use Tailwind + shadcn defaults and explicitly announce the fallback
|
|
81
|
-
2. Read user preferences (CONTEXT.md)
|
|
82
|
-
3. Generate N variant HTMLs (each a single file, zero dependencies, CDN Tailwind)
|
|
83
|
-
4. Generate an index.html comparison page (iframes side by side)
|
|
84
|
-
5. Generate decisions.md explaining the rationale for each variant
|
|
85
|
-
|
|
86
|
-
Output directory:
|
|
87
|
-
.flow/specs/$SPEC_NAME/ui-sketch/ (or .flow/sketches/<slug>/)
|
|
88
|
-
|
|
89
|
-
Return to me:
|
|
90
|
-
- The list of generated variants + what distinguishes each
|
|
91
|
-
- Recommended direction (based on CONTEXT.md)
|
|
92
|
-
- Preview command (how to open index.html)
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Step 5: Output
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
🎨 Sketch complete
|
|
99
|
-
|
|
100
|
-
Variants:
|
|
101
|
-
variant-a-minimalist.html (system font + whitespace)
|
|
102
|
-
variant-b-distinctive.html (custom font + micro animations)
|
|
103
|
-
variant-c-dense.html (information-dense — suited for admin)
|
|
104
|
-
|
|
105
|
-
Decisions: .flow/specs/<name>/ui-sketch/decisions.md
|
|
106
|
-
Comparison page: open .flow/specs/<name>/ui-sketch/index.html
|
|
107
|
-
|
|
108
|
-
Next steps:
|
|
109
|
-
- Pick a variant → tell me → I'll convert the HTML into production components
|
|
110
|
-
- Or /curdx-flow:qa to verify interactions in the browser
|
|
111
|
-
- Clone another reference → /curdx-flow:ui-research <feature>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Error recovery
|
|
115
|
-
|
|
116
|
-
- frontend-design skill not installed → Emma falls back and announces it
|
|
117
|
-
- Variants are too similar → ask the user to re-run with more specific guidance
|
|
118
|
-
- No spec and no description → at least one must be supplied
|
package/commands/spike.md
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spike
|
|
3
|
-
description: feasibility experiment — validate an idea with 2-5 small tests, no production code. Output conclusions to STATE.md
|
|
4
|
-
argument-hint: "\"<hypothesis to validate>\""
|
|
5
|
-
allowed-tools: [Read, Write, Edit, Bash, WebSearch, Grep, Glob]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Flow Spike — Feasibility Experiment
|
|
9
|
-
|
|
10
|
-
@${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
|
|
11
|
-
|
|
12
|
-
**A spike is a short-duration experiment**, aimed at answering one technical question: "Can this approach work?" It is not about delivering a feature.
|
|
13
|
-
|
|
14
|
-
## Typical Scenarios
|
|
15
|
-
|
|
16
|
-
- "Can Redis Streams replace Kafka?"
|
|
17
|
-
- "How much faster is Bun than Node? Is our scenario a good fit?"
|
|
18
|
-
- "Is this API's rate limit 10 qps?"
|
|
19
|
-
- "Can the new TypeScript const generic solve problem X?"
|
|
20
|
-
|
|
21
|
-
## Step 1: Clarify the Hypothesis
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
HYPOTHESIS="$ARGUMENTS"
|
|
25
|
-
[ -z "$HYPOTHESIS" ] && { echo "Usage: /curdx-flow:spike \"<hypothesis>\""; exit 1; }
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Confirm with the user:
|
|
29
|
-
```
|
|
30
|
-
Hypothesis to validate: <HYPOTHESIS>
|
|
31
|
-
|
|
32
|
-
My understanding:
|
|
33
|
-
- What to validate: <...>
|
|
34
|
-
- Pass criteria: <...>
|
|
35
|
-
- What if it fails: <...>
|
|
36
|
-
- Time budget: recommend 30-60 minutes
|
|
37
|
-
|
|
38
|
-
Continue? (yes / correct me)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Use AskUserQuestion (unless quickMode).
|
|
42
|
-
|
|
43
|
-
## Step 2: Design 2-5 Small Tests
|
|
44
|
-
|
|
45
|
-
**Rules**:
|
|
46
|
-
- Each test is independent
|
|
47
|
-
- Minimal code (50 lines max)
|
|
48
|
-
- Explicit pass/fail criteria
|
|
49
|
-
- Do not touch production code
|
|
50
|
-
|
|
51
|
-
Example (validating Redis Streams performance):
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
Test 1: Throughput of writing 1000 messages
|
|
55
|
-
Code: spike/redis-streams-write.ts
|
|
56
|
-
Expected: >= 10K msg/sec
|
|
57
|
-
|
|
58
|
-
Test 2: Consumer group latency
|
|
59
|
-
Code: spike/redis-streams-consume.ts
|
|
60
|
-
Expected: P99 < 10ms
|
|
61
|
-
|
|
62
|
-
Test 3: Persistence overhead
|
|
63
|
-
Code: compare AOF vs RDB
|
|
64
|
-
Expected: AOF write latency increase < 20%
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Step 3: Create the spike directory
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
mkdir -p spike/$(date +%Y-%m-%d)-${HYPOTHESIS_SLUG}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
All experimental code lives here. **Absolutely do not touch production code**.
|
|
74
|
-
|
|
75
|
-
## Step 4: Run the Tests
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
for test in Test 1 2 3:
|
|
79
|
-
write code
|
|
80
|
-
run
|
|
81
|
-
record results
|
|
82
|
-
if blocked:
|
|
83
|
-
not "fix bug and continue", but record "blocker X, cannot test"
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
**context7 is mandatory**: look up all library APIs via context7, do not rely on memory.
|
|
87
|
-
|
|
88
|
-
## Step 5: Record Results
|
|
89
|
-
|
|
90
|
-
Create `spike/<date>-<slug>/RESULTS.md`:
|
|
91
|
-
|
|
92
|
-
```markdown
|
|
93
|
-
# Spike Results: <hypothesis>
|
|
94
|
-
|
|
95
|
-
Date: YYYY-MM-DD
|
|
96
|
-
Time: actually took N minutes
|
|
97
|
-
|
|
98
|
-
## Test Matrix
|
|
99
|
-
|
|
100
|
-
| Test | Expected | Actual | Conclusion |
|
|
101
|
-
|------|-----|------|------|
|
|
102
|
-
| 1 | >=10K msg/sec | 12K msg/sec | ✓ |
|
|
103
|
-
| 2 | P99 < 10ms | P99 = 15ms | ✗ |
|
|
104
|
-
| 3 | < 20% | 8% | ✓ |
|
|
105
|
-
|
|
106
|
-
## Conclusion
|
|
107
|
-
|
|
108
|
-
Hypothesis <HYPOTHESIS> is:
|
|
109
|
-
☐ Fully correct — recommended for adoption
|
|
110
|
-
☑ Partially correct — P99 latency exceeds expectations, needs deeper optimization
|
|
111
|
-
☐ Fully incorrect — not recommended
|
|
112
|
-
|
|
113
|
-
## Key Findings
|
|
114
|
-
|
|
115
|
-
- <finding 1>
|
|
116
|
-
- <finding 2>
|
|
117
|
-
|
|
118
|
-
## Recommendation
|
|
119
|
-
|
|
120
|
-
<how to handle this hypothesis if used in a real spec>
|
|
121
|
-
|
|
122
|
-
## Open Questions
|
|
123
|
-
|
|
124
|
-
<edges not yet tested>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Step 6: Sync to STATE.md (if in a flow project)
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
if [ -f ".flow/STATE.md" ]; then
|
|
131
|
-
append to STATE.md:
|
|
132
|
-
## Spike: <hypothesis> (YYYY-MM-DD)
|
|
133
|
-
Conclusion: partially correct
|
|
134
|
-
Details: spike/<date>-<slug>/RESULTS.md
|
|
135
|
-
fi
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
This way, subsequent spec discussions can reference it.
|
|
139
|
-
|
|
140
|
-
## Step 7: Cleanup Decision
|
|
141
|
-
|
|
142
|
-
Ask the user:
|
|
143
|
-
```
|
|
144
|
-
Spike complete. Code is in spike/<date>-<slug>/
|
|
145
|
-
Keep it?
|
|
146
|
-
[keep] may reference later
|
|
147
|
-
[delete] conclusion recorded, code no longer valuable
|
|
148
|
-
[commit] commit into git as a historical reference
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Output
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
✓ Spike complete: <hypothesis>
|
|
155
|
-
|
|
156
|
-
Conclusion: partially correct (see RESULTS.md)
|
|
157
|
-
Tests: 3 / 3 executed
|
|
158
|
-
Actual time: 47 minutes
|
|
159
|
-
|
|
160
|
-
Next step suggestions:
|
|
161
|
-
- Go deeper: /curdx-flow:start <name> "do <specific feature> based on spike results"
|
|
162
|
-
- Abandon: recorded to STATE.md, do not adopt this direction
|
|
163
|
-
|
|
164
|
-
Artifacts:
|
|
165
|
-
spike/<date>-<slug>/RESULTS.md
|
|
166
|
-
spike/<date>-<slug>/*.ts (test code)
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Forbidden
|
|
170
|
-
|
|
171
|
-
- ✗ Mixing spike code into production code (src/)
|
|
172
|
-
- ✗ Spikes exceeding 2 hours (that's not a spike, that's a mini project)
|
|
173
|
-
- ✗ Claiming validation complete without recording results
|
|
174
|
-
- ✗ Using a spike to replace the real spec workflow
|
|
175
|
-
|
|
176
|
-
## spike vs research phase
|
|
177
|
-
|
|
178
|
-
- **spike** is **actually running code** to validate a hypothesis
|
|
179
|
-
- **research phase** is **reading docs / thinking** to determine direction
|
|
180
|
-
|
|
181
|
-
Research thinks approach A is feasible but has concerns → use a spike to verify → write the conclusion back into the "feasibility" section of research.md.
|
package/commands/status.md
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: status
|
|
3
|
-
description: view the current state of the CurDX-Flow project (specs, phases, progress)
|
|
4
|
-
argument-hint: "[--all | <spec-name>]"
|
|
5
|
-
allowed-tools: [Read, Bash, Glob]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Project Status
|
|
9
|
-
|
|
10
|
-
Shows an overview of the current state of the CurDX-Flow project.
|
|
11
|
-
|
|
12
|
-
## Execution Steps
|
|
13
|
-
|
|
14
|
-
### Step 1: Confirm the Project
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
if [ ! -d ".flow" ]; then
|
|
18
|
-
echo "✗ Current directory is not a CurDX-Flow project. Run /curdx-flow:init to initialize."
|
|
19
|
-
exit 0
|
|
20
|
-
fi
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Step 2: Load Global State
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
# Active spec
|
|
27
|
-
ACTIVE=$(cat .flow/.active-spec 2>/dev/null || echo "(none)")
|
|
28
|
-
|
|
29
|
-
# Project config
|
|
30
|
-
if [ -f ".flow/config.json" ]; then
|
|
31
|
-
MODE=$(python3 -c "import json; print(json.load(open('.flow/config.json')).get('mode','standard'))")
|
|
32
|
-
fi
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Step 3: Scan Specs
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
# List all specs
|
|
39
|
-
SPECS=$(ls -1 .flow/specs/ 2>/dev/null)
|
|
40
|
-
|
|
41
|
-
# List all Epics
|
|
42
|
-
EPICS=$(ls -1 .flow/_epics/ 2>/dev/null)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
For each spec, read `.state.json` to get phase and progress:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
for spec in $SPECS; do
|
|
49
|
-
STATE_FILE=".flow/specs/$spec/.state.json"
|
|
50
|
-
if [ -f "$STATE_FILE" ]; then
|
|
51
|
-
PHASE=$(python3 -c "import json; print(json.load(open('$STATE_FILE')).get('phase','unknown'))")
|
|
52
|
-
# Can also fetch task_index, total_tasks, etc.
|
|
53
|
-
fi
|
|
54
|
-
done
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Step 4: Output Format
|
|
58
|
-
|
|
59
|
-
**Default (no arguments)** — global overview:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
📋 CurDX-Flow Project Status
|
|
63
|
-
═══════════════════════════════════════
|
|
64
|
-
|
|
65
|
-
Project: my-awesome-app
|
|
66
|
-
Mode: standard
|
|
67
|
-
Active spec: auth-system
|
|
68
|
-
|
|
69
|
-
Spec list:
|
|
70
|
-
● auth-system design (45% — tasks pending)
|
|
71
|
-
○ user-profile execute (60% — 12/20 tasks)
|
|
72
|
-
✓ onboarding-flow completed (archived)
|
|
73
|
-
|
|
74
|
-
Epic list:
|
|
75
|
-
● payment-system 3/5 sub-specs (in progress)
|
|
76
|
-
|
|
77
|
-
Recent decisions (STATE.md):
|
|
78
|
-
D-05: use JWT instead of session cookie (2026-04-15)
|
|
79
|
-
D-06: bcrypt cost factor = 12 (2026-04-15)
|
|
80
|
-
|
|
81
|
-
═══════════════════════════════════════
|
|
82
|
-
Next step suggestion: /curdx-flow:tasks — generate task list for auth-system
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**`<spec-name>`** — detail for a specific spec:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
📋 Spec: auth-system
|
|
89
|
-
═══════════════════════════════════════
|
|
90
|
-
|
|
91
|
-
Phase: design
|
|
92
|
-
Progress: 45%
|
|
93
|
-
Created: 2026-04-12
|
|
94
|
-
|
|
95
|
-
Completed phases:
|
|
96
|
-
✓ research (research.md, 320 lines)
|
|
97
|
-
✓ requirements (requirements.md, 8 stories)
|
|
98
|
-
● design (design.md, in progress)
|
|
99
|
-
○ tasks
|
|
100
|
-
○ execute
|
|
101
|
-
|
|
102
|
-
Related decisions:
|
|
103
|
-
D-05: use JWT instead of session cookie
|
|
104
|
-
|
|
105
|
-
.progress.md summary:
|
|
106
|
-
- Confirmed JWT + refresh token architecture
|
|
107
|
-
- Researched bcrypt vs argon2, chose bcrypt (team familiarity)
|
|
108
|
-
- TODO: design token refresh flow
|
|
109
|
-
|
|
110
|
-
Next step: /curdx-flow:tasks — generate task list
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**`--all`** — detailed mode, every spec expanded.
|
|
114
|
-
|
|
115
|
-
### Step 5: Empty-State Handling
|
|
116
|
-
|
|
117
|
-
If `.flow/` exists but no specs:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
📋 CurDX-Flow Project
|
|
121
|
-
═══════════════════════════════════════
|
|
122
|
-
|
|
123
|
-
Project: my-awesome-app (just initialized)
|
|
124
|
-
Mode: standard
|
|
125
|
-
Active spec: (none)
|
|
126
|
-
|
|
127
|
-
No specs yet.
|
|
128
|
-
|
|
129
|
-
Start your first feature:
|
|
130
|
-
/curdx-flow:start <name> "<describe what you want to do>"
|
|
131
|
-
|
|
132
|
-
Example:
|
|
133
|
-
/curdx-flow:start auth-system "Add JWT authentication to API"
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Notes
|
|
137
|
-
|
|
138
|
-
- State data is read-only; this command does not modify any files
|
|
139
|
-
- If `.state.json` is corrupted or missing, degrade gracefully (show "state unknown" instead of failing)
|