@curdx/flow 1.1.11 → 2.0.0-beta.10
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 +4 -11
- package/CHANGELOG.md +99 -0
- package/README.md +74 -102
- package/README.zh.md +2 -2
- package/agent-preamble/preamble.md +81 -11
- package/agents/flow-adversary.md +41 -56
- package/agents/flow-architect.md +24 -11
- package/agents/flow-debugger.md +2 -2
- package/agents/flow-edge-hunter.md +20 -6
- package/agents/flow-executor.md +3 -3
- package/agents/flow-planner.md +51 -48
- package/agents/flow-product-designer.md +15 -2
- package/agents/flow-qa-engineer.md +4 -4
- package/agents/flow-researcher.md +18 -3
- package/agents/flow-reviewer.md +5 -1
- package/agents/flow-security-auditor.md +2 -2
- package/agents/flow-triage-analyst.md +4 -4
- package/agents/flow-ui-researcher.md +7 -7
- package/agents/flow-ux-designer.md +3 -3
- package/agents/flow-verifier.md +47 -14
- package/bin/curdx-flow.js +13 -1
- package/cli/doctor.js +28 -13
- package/cli/install.js +62 -36
- package/cli/protocols.js +63 -10
- package/cli/registry.js +73 -0
- package/cli/uninstall.js +9 -11
- package/cli/upgrade.js +6 -10
- package/cli/utils.js +104 -56
- package/commands/debug.md +10 -10
- package/commands/fast.md +1 -1
- package/commands/help.md +109 -87
- package/commands/implement.md +7 -7
- package/commands/init.md +18 -7
- package/commands/review.md +114 -130
- package/commands/spec.md +131 -89
- package/commands/start.md +130 -153
- package/commands/verify.md +110 -92
- package/gates/adversarial-review-gate.md +20 -20
- package/gates/coverage-audit-gate.md +1 -1
- package/gates/devex-gate.md +5 -6
- package/gates/edge-case-gate.md +2 -2
- package/gates/security-gate.md +3 -3
- package/hooks/hooks.json +0 -11
- package/hooks/scripts/quick-mode-guard.sh +12 -9
- package/hooks/scripts/session-start.sh +2 -2
- package/hooks/scripts/stop-watcher.sh +25 -15
- package/knowledge/epic-decomposition.md +2 -2
- package/knowledge/execution-strategies.md +10 -9
- package/knowledge/planning-reviews.md +6 -6
- package/knowledge/spec-driven-development.md +11 -10
- package/knowledge/two-stage-review.md +6 -5
- package/knowledge/wave-execution.md +5 -5
- package/package.json +4 -2
- package/skills/brownfield-index/SKILL.md +62 -0
- package/skills/browser-qa/SKILL.md +50 -0
- package/skills/epic/SKILL.md +68 -0
- package/skills/security-audit/SKILL.md +50 -0
- package/skills/ui-sketch/SKILL.md +49 -0
- package/templates/config.json.tmpl +1 -1
- package/templates/design.md.tmpl +32 -112
- package/templates/requirements.md.tmpl +25 -43
- package/templates/research.md.tmpl +37 -68
- package/templates/tasks.md.tmpl +27 -84
- 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/hooks/scripts/fail-tracker.sh +0 -31
package/commands/triage.md
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: triage
|
|
3
|
-
description: Epic decomposition — slice a big goal vertically by user value, generate dependency graph + multiple sub-specs. Dispatches flow-triage-analyst.
|
|
4
|
-
argument-hint: "\"<epic goal>\" [--specs=<N>]"
|
|
5
|
-
allowed-tools: [Read, Write, Bash, Task, WebSearch]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Flow Triage — Epic Decomposition
|
|
9
|
-
|
|
10
|
-
@${CLAUDE_PLUGIN_ROOT}/knowledge/epic-decomposition.md
|
|
11
|
-
|
|
12
|
-
Break down a big goal (needs 4+ sub-specs to complete) into an Epic of vertical slices.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
- Goal is clearly more than 2 weeks of work
|
|
17
|
-
- Involves multiple "independently usable" features
|
|
18
|
-
- At `/curdx-flow:start`, you realize the goal is too big — switch to `/curdx-flow:triage`
|
|
19
|
-
|
|
20
|
-
## When Not to Use
|
|
21
|
-
|
|
22
|
-
- Goal fits in 1-2 weeks → use `/curdx-flow:start`
|
|
23
|
-
- Emergency fix → use `/curdx-flow:fast`
|
|
24
|
-
- Exploratory validation → use `/curdx-flow:spike`
|
|
25
|
-
|
|
26
|
-
## Step 1: Preflight Check
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
[ ! -d ".flow" ] && { echo "❌ Not a CurDX-Flow project"; exit 1; }
|
|
30
|
-
|
|
31
|
-
GOAL="$ARGUMENTS"
|
|
32
|
-
# Extract --specs argument
|
|
33
|
-
TARGET_SPECS=""
|
|
34
|
-
case "$GOAL" in
|
|
35
|
-
*--specs=*)
|
|
36
|
-
TARGET_SPECS=$(echo "$GOAL" | grep -oE -- '--specs=[0-9]+' | cut -d= -f2)
|
|
37
|
-
GOAL=$(echo "$GOAL" | sed 's/--specs=[0-9]*//g' | xargs)
|
|
38
|
-
;;
|
|
39
|
-
esac
|
|
40
|
-
|
|
41
|
-
[ -z "$GOAL" ] && { echo "Usage: /curdx-flow:triage \"<epic goal>\""; exit 1; }
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Step 2: Generate Epic Name
|
|
45
|
-
|
|
46
|
-
Derive a kebab-case name from the goal, or ask the user:
|
|
47
|
-
|
|
48
|
-
```python
|
|
49
|
-
# Rough inference
|
|
50
|
-
slug = re.sub(r'\s+', '-', goal.lower())
|
|
51
|
-
slug = re.sub(r'[^a-z0-9-]', '', slug)[:40]
|
|
52
|
-
# e.g.: "add payment system" → "payment-system"
|
|
53
|
-
# May need AskUserQuestion to confirm
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Step 3: Create Epic Directory
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
EPIC_DIR=".flow/_epics/$EPIC_NAME"
|
|
60
|
-
mkdir -p "$EPIC_DIR"
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Step 4: Dispatch flow-triage-analyst
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
Task:
|
|
67
|
-
subagent_type: general-purpose
|
|
68
|
-
description: "Epic decomposition: $EPIC_NAME"
|
|
69
|
-
prompt: |
|
|
70
|
-
You are the flow-triage-analyst agent. Full definition:
|
|
71
|
-
${CLAUDE_PLUGIN_ROOT}/agents/flow-triage-analyst.md
|
|
72
|
-
|
|
73
|
-
Knowledge base (must read):
|
|
74
|
-
${CLAUDE_PLUGIN_ROOT}/knowledge/epic-decomposition.md
|
|
75
|
-
|
|
76
|
-
Input:
|
|
77
|
-
- Epic goal: "$GOAL"
|
|
78
|
-
- Epic name: $EPIC_NAME
|
|
79
|
-
- Suggested sub-spec count: ${TARGET_SPECS:-auto (4-8)}
|
|
80
|
-
- Project context: .flow/PROJECT.md + .flow/CONTEXT.md + .flow/STATE.md
|
|
81
|
-
|
|
82
|
-
Mandatory workflow:
|
|
83
|
-
1. sequential-thinking >= 5 rounds to understand the goal
|
|
84
|
-
2. context7 to validate the key technologies involved
|
|
85
|
-
3. claude-mem to retrieve history
|
|
86
|
-
4. sequential-thinking 5+ rounds to brainstorm decomposition
|
|
87
|
-
5. Vertical slice by user value (not by technical layer)
|
|
88
|
-
6. Define shared interfaces (freeze)
|
|
89
|
-
7. Identify dependencies (hard/soft/parallel)
|
|
90
|
-
8. Generate epic.md + sub-spec skeletons
|
|
91
|
-
|
|
92
|
-
Output files:
|
|
93
|
-
- .flow/_epics/$EPIC_NAME/epic.md (Epic master document)
|
|
94
|
-
- .flow/_epics/$EPIC_NAME/.epic-state.json
|
|
95
|
-
- .flow/specs/<sub-1>/.state.json
|
|
96
|
-
- .flow/specs/<sub-2>/.state.json
|
|
97
|
-
- ...(skeleton for each sub-spec)
|
|
98
|
-
|
|
99
|
-
Success criteria:
|
|
100
|
-
- Sub-spec count: 4-8
|
|
101
|
-
- Each sub-spec has independent user value
|
|
102
|
-
- Dependency graph is clear (mermaid)
|
|
103
|
-
- Shared interfaces frozen (TypeScript types)
|
|
104
|
-
- Out of Scope is explicit
|
|
105
|
-
|
|
106
|
-
When done, return a brief:
|
|
107
|
-
- Sub-spec list (name + one-sentence description)
|
|
108
|
-
- Dependency graph
|
|
109
|
-
- Recommended execution order
|
|
110
|
-
- Estimated total duration
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Step 5: Validate Output
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
EPIC_FILE="$EPIC_DIR/epic.md"
|
|
117
|
-
[ ! -f "$EPIC_FILE" ] && { echo "❌ Epic document not generated"; exit 1; }
|
|
118
|
-
|
|
119
|
-
# Count sub-specs
|
|
120
|
-
SUB_COUNT=$(grep -c "^### Spec [0-9]" "$EPIC_FILE" || echo 0)
|
|
121
|
-
[ $SUB_COUNT -lt 3 ] && echo "⚠ Fewer than 3 sub-specs; may not be decomposed enough"
|
|
122
|
-
[ $SUB_COUNT -gt 10 ] && echo "⚠ More than 10 sub-specs; granularity may be too fine"
|
|
123
|
-
|
|
124
|
-
# Check mermaid graph
|
|
125
|
-
grep -q "mermaid" "$EPIC_FILE" || echo "✗ No mermaid dependency graph found"
|
|
126
|
-
|
|
127
|
-
# Check shared interfaces
|
|
128
|
-
grep -q "shared interface" "$EPIC_FILE" || echo "✗ Shared interfaces not defined"
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
## Step 6: Show Results to User
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
✓ Epic decomposition complete: $EPIC_NAME
|
|
135
|
-
|
|
136
|
-
Files:
|
|
137
|
-
.flow/_epics/$EPIC_NAME/epic.md
|
|
138
|
-
.flow/_epics/$EPIC_NAME/.epic-state.json
|
|
139
|
-
|
|
140
|
-
Sub-specs: $SUB_COUNT (skeletons created)
|
|
141
|
-
|
|
142
|
-
Dependency graph: see epic.md
|
|
143
|
-
|
|
144
|
-
Recommended execution order:
|
|
145
|
-
Week 1: /curdx-flow:switch <sub-1> → /curdx-flow:spec → /curdx-flow:implement
|
|
146
|
-
Week 2: /curdx-flow:switch <sub-2> (parallel with sub-3 if independent)
|
|
147
|
-
Week 3: /curdx-flow:switch <sub-4> (depends on sub-1 being done)
|
|
148
|
-
...
|
|
149
|
-
|
|
150
|
-
Next steps:
|
|
151
|
-
1. Review .flow/_epics/$EPIC_NAME/epic.md to confirm the decomposition is reasonable
|
|
152
|
-
2. First sub-spec: /curdx-flow:switch <sub-1-name>
|
|
153
|
-
3. Then proceed with the normal /curdx-flow:spec → /curdx-flow:implement flow
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## Error Recovery
|
|
157
|
-
|
|
158
|
-
- triage-analyst fails → the goal may be too abstract; refine the description manually and rerun
|
|
159
|
-
- Too many/too few sub-specs → use `--specs=N` to force a count
|
|
160
|
-
- Incomplete interface definitions → go back to epic.md and add interfaces manually, or rerun the agent to fill them in
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# CurDX-Flow PostToolUseFailure Hook
|
|
3
|
-
# Tracks consecutive tool failures to enable pua integration (Phase 4+).
|
|
4
|
-
# For now, just maintains a counter in plugin data directory.
|
|
5
|
-
#
|
|
6
|
-
# Future: when pua is installed and fail_count >= threshold, auto-invoke /pua:pua.
|
|
7
|
-
|
|
8
|
-
set -u
|
|
9
|
-
|
|
10
|
-
DATA_DIR="${CLAUDE_PLUGIN_DATA:-$HOME/.claude/plugins/data/curdx-flow}"
|
|
11
|
-
COUNTER="$DATA_DIR/fail-count"
|
|
12
|
-
|
|
13
|
-
mkdir -p "$DATA_DIR" 2>/dev/null || true
|
|
14
|
-
|
|
15
|
-
# Read current count
|
|
16
|
-
CURRENT=0
|
|
17
|
-
[ -f "$COUNTER" ] && CURRENT="$(cat "$COUNTER" 2>/dev/null || echo 0)"
|
|
18
|
-
|
|
19
|
-
# Increment
|
|
20
|
-
NEXT=$((CURRENT + 1))
|
|
21
|
-
echo "$NEXT" > "$COUNTER" 2>/dev/null || true
|
|
22
|
-
|
|
23
|
-
# Placeholder for future pua escalation (Phase 4+):
|
|
24
|
-
# if [ "$NEXT" -ge 2 ] && command -v claude >/dev/null 2>&1; then
|
|
25
|
-
# if claude plugin list 2>/dev/null | grep -q 'pua'; then
|
|
26
|
-
# # Inject escalation suggestion via hook output
|
|
27
|
-
# ...
|
|
28
|
-
# fi
|
|
29
|
-
# fi
|
|
30
|
-
|
|
31
|
-
exit 0
|