@curdx/flow 1.1.4 → 1.1.6

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 (89) hide show
  1. package/.claude-plugin/marketplace.json +25 -0
  2. package/.claude-plugin/plugin.json +43 -0
  3. package/CHANGELOG.md +279 -0
  4. package/agent-preamble/preamble.md +214 -0
  5. package/agents/flow-adversary.md +216 -0
  6. package/agents/flow-architect.md +190 -0
  7. package/agents/flow-debugger.md +325 -0
  8. package/agents/flow-edge-hunter.md +273 -0
  9. package/agents/flow-executor.md +246 -0
  10. package/agents/flow-planner.md +204 -0
  11. package/agents/flow-product-designer.md +146 -0
  12. package/agents/flow-qa-engineer.md +276 -0
  13. package/agents/flow-researcher.md +155 -0
  14. package/agents/flow-reviewer.md +280 -0
  15. package/agents/flow-security-auditor.md +398 -0
  16. package/agents/flow-triage-analyst.md +290 -0
  17. package/agents/flow-ui-researcher.md +227 -0
  18. package/agents/flow-ux-designer.md +247 -0
  19. package/agents/flow-verifier.md +283 -0
  20. package/agents/persona-amelia.md +128 -0
  21. package/agents/persona-david.md +141 -0
  22. package/agents/persona-emma.md +179 -0
  23. package/agents/persona-john.md +105 -0
  24. package/agents/persona-mary.md +95 -0
  25. package/agents/persona-oliver.md +136 -0
  26. package/agents/persona-rachel.md +126 -0
  27. package/agents/persona-serena.md +175 -0
  28. package/agents/persona-winston.md +117 -0
  29. package/bin/curdx-flow.js +5 -2
  30. package/cli/install.js +44 -5
  31. package/commands/audit.md +170 -0
  32. package/commands/autoplan.md +184 -0
  33. package/commands/debug.md +199 -0
  34. package/commands/design.md +155 -0
  35. package/commands/discuss.md +162 -0
  36. package/commands/doctor.md +124 -0
  37. package/commands/fast.md +128 -0
  38. package/commands/help.md +119 -0
  39. package/commands/implement.md +381 -0
  40. package/commands/index.md +261 -0
  41. package/commands/init.md +105 -0
  42. package/commands/install-deps.md +128 -0
  43. package/commands/party.md +241 -0
  44. package/commands/plan-ceo.md +117 -0
  45. package/commands/plan-design.md +107 -0
  46. package/commands/plan-dx.md +104 -0
  47. package/commands/plan-eng.md +108 -0
  48. package/commands/qa.md +118 -0
  49. package/commands/requirements.md +146 -0
  50. package/commands/research.md +141 -0
  51. package/commands/review.md +168 -0
  52. package/commands/security.md +109 -0
  53. package/commands/sketch.md +118 -0
  54. package/commands/spec.md +135 -0
  55. package/commands/spike.md +181 -0
  56. package/commands/start.md +189 -0
  57. package/commands/status.md +139 -0
  58. package/commands/switch.md +95 -0
  59. package/commands/tasks.md +189 -0
  60. package/commands/triage.md +160 -0
  61. package/commands/verify.md +124 -0
  62. package/gates/adversarial-review-gate.md +219 -0
  63. package/gates/coverage-audit-gate.md +184 -0
  64. package/gates/devex-gate.md +255 -0
  65. package/gates/edge-case-gate.md +194 -0
  66. package/gates/karpathy-gate.md +130 -0
  67. package/gates/security-gate.md +218 -0
  68. package/gates/tdd-gate.md +188 -0
  69. package/gates/verification-gate.md +183 -0
  70. package/hooks/hooks.json +56 -0
  71. package/hooks/scripts/fail-tracker.sh +31 -0
  72. package/hooks/scripts/inject-karpathy.sh +52 -0
  73. package/hooks/scripts/quick-mode-guard.sh +64 -0
  74. package/hooks/scripts/session-start.sh +76 -0
  75. package/hooks/scripts/stop-watcher.sh +166 -0
  76. package/knowledge/atomic-commits.md +262 -0
  77. package/knowledge/epic-decomposition.md +307 -0
  78. package/knowledge/execution-strategies.md +278 -0
  79. package/knowledge/karpathy-guidelines.md +219 -0
  80. package/knowledge/planning-reviews.md +211 -0
  81. package/knowledge/poc-first-workflow.md +227 -0
  82. package/knowledge/spec-driven-development.md +183 -0
  83. package/knowledge/systematic-debugging.md +384 -0
  84. package/knowledge/two-stage-review.md +233 -0
  85. package/knowledge/wave-execution.md +387 -0
  86. package/package.json +14 -3
  87. package/schemas/config.schema.json +100 -0
  88. package/schemas/spec-frontmatter.schema.json +42 -0
  89. package/schemas/spec-state.schema.json +117 -0
@@ -0,0 +1,233 @@
1
+ # Two-Stage Review — Two-Stage Code Review
2
+
3
+ > CurDX-Flow version of Superpowers' code review skill.
4
+ >
5
+ > Agents reference this via `@${CLAUDE_PLUGIN_ROOT}/knowledge/two-stage-review.md`.
6
+
7
+ ---
8
+
9
+ ## Why Two Stages
10
+
11
+ One stage can't do it all. Separate "is it the right thing" from "is it done well":
12
+
13
+ ```
14
+ Stage 1: Spec Compliance
15
+ Question: "Does the code actually implement what the spec asked for?"
16
+ Focus: landing of FR / AC / AD
17
+
18
+ Stage 2: Code Quality
19
+ Question: "Is the implementation done well?"
20
+ Focus: style / tests / maintainability / performance
21
+ ```
22
+
23
+ Downsides of reviewing them together:
24
+ - Find quality issues → but the code doesn't implement the requirements → quality polish is wasted
25
+ - Find missing requirements → quality advice drowns
26
+ - Findings are numerous and unsorted → user doesn't know what to fix first
27
+
28
+ Benefits of separation:
29
+ - Stage 1 passing gates Stage 2 → saves time
30
+ - Report is layered → user first fixes "not done right" then "not done well enough"
31
+
32
+ ---
33
+
34
+ ## Stage 1: Spec Compliance
35
+
36
+ ### Core question
37
+
38
+ **Is this doing what the spec asked for?**
39
+
40
+ ### Checklist
41
+
42
+ #### 1.1 FR coverage
43
+
44
+ For each FR-NN (from requirements.md):
45
+ - Can you find a corresponding implementation in the code?
46
+ - Is it real or a stub (`throw new Error('not implemented')`)?
47
+ - Does a commit reference this FR (footer `Requirements: FR-NN`)?
48
+
49
+ #### 1.2 AC verifiable
50
+
51
+ For each AC-X.Y:
52
+ - Is there a corresponding test case?
53
+ - Does the test actually run (not skipped)?
54
+ - Does the test actually exercise the AC behavior, not just a placeholder?
55
+
56
+ #### 1.3 AD landing
57
+
58
+ For each AD-NN (from design.md):
59
+ - Does the code reflect this decision?
60
+ - Is the decision not violated?
61
+ - If violated, was design.md bumped in version + new AD recorded?
62
+
63
+ #### 1.4 Out-of-scope respected
64
+
65
+ Against the "out of scope" list in requirements.md:
66
+ - Does the code actually **not do** these?
67
+ - If it does, was it an intentional extension (with an explanatory commit), or scope creep?
68
+
69
+ #### 1.5 Error paths
70
+
71
+ Against the "error paths" table in design.md:
72
+ - Is each scenario handled?
73
+ - Is there a corresponding test?
74
+
75
+ ### Stage 1 verdict
76
+
77
+ - **PASS**: all FR / AD fully implemented, all AC have corresponding tests
78
+ - **PARTIAL**: implemented, but some FR / AC lack tests
79
+ - **FAIL**: some FR / AD not implemented, or out-of-scope leakage
80
+
81
+ ---
82
+
83
+ ## Stage 2: Code Quality
84
+
85
+ ### Core question
86
+
87
+ **Is the implementation done well? Can a future maintainer pick it up?**
88
+
89
+ ### Dimensions
90
+
91
+ Stage 2 applies all enabled Gates (from `.flow/config.json`):
92
+
93
+ #### 2.1 Karpathy 4 principles (karpathy-gate)
94
+
95
+ - Assumptions explicit?
96
+ - Over-engineered?
97
+ - Surgical?
98
+ - Claims without evidence?
99
+
100
+ #### 2.2 Verification baseline (verification-gate)
101
+
102
+ - Do commit messages / `.progress.md` contain forbidden words?
103
+ - Do claims have fresh evidence?
104
+
105
+ #### 2.3 TDD discipline (tdd-gate)
106
+
107
+ - Is there a `test(xxx): red -` before a `feat(xxx):` commit?
108
+ - Are exemptions recorded in STATE.md?
109
+
110
+ #### 2.4 Coverage completeness (coverage-audit-gate)
111
+
112
+ - All 4 sources (FR / AD / Research / Decisions) covered?
113
+
114
+ #### 2.5 (enterprise) Adversarial review (adversarial-review-gate)
115
+
116
+ - ≥ 3 categories of issues found?
117
+ - Each finding has evidence + recommendation?
118
+
119
+ #### 2.6 (enterprise) Edge cases (edge-case-gate)
120
+
121
+ - Did all 7 major categories pass?
122
+ - Gap list has priorities?
123
+
124
+ ### Stage 2 verdict
125
+
126
+ - **EXCELLENT**: all enabled Gates pass, adversarial findings < 3 (high-quality code)
127
+ - **GOOD**: all enabled Gates pass, but some warnings
128
+ - **NEEDS_IMPROVEMENT**: Gate violations (blocking)
129
+
130
+ ---
131
+
132
+ ## Combined Verdict
133
+
134
+ ```python
135
+ def verdict(stage1, stage2):
136
+ # Stage 1 must pass to proceed to Stage 2
137
+ if stage1 == "FAIL":
138
+ return "BLOCKED_BY_SPEC" # must go back to /curdx-flow:implement
139
+
140
+ if stage1 == "PARTIAL" and stage2 == "EXCELLENT":
141
+ return "APPROVED_WITH_WARNINGS" # few tests but code is good
142
+
143
+ if stage2 == "NEEDS_IMPROVEMENT":
144
+ return "BLOCKED_BY_QUALITY" # Gate violations must be fixed
145
+
146
+ if stage1 == "PASS" and stage2 == "EXCELLENT":
147
+ return "APPROVED"
148
+
149
+ return "APPROVED_WITH_WARNINGS"
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Fix Loop
155
+
156
+ When the review turns up issues, the typical flow:
157
+
158
+ ```
159
+ 1. Review returns NEEDS_FIXES
160
+
161
+ 2. User decides what must be fixed vs tolerated
162
+
163
+ 3. Fix:
164
+ - Spec class: /curdx-flow:implement --task=add a new task
165
+ - Quality class: /curdx-flow:implement rerun a task
166
+ - Miscellaneous: /curdx-flow:fast "fix X raised by review"
167
+
168
+ 4. /curdx-flow:review re-review
169
+
170
+ 5. Until APPROVED → /curdx-flow:ship
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Failure Modes of Two Stages
176
+
177
+ ### Anti-pattern 1: "I'll just read the code"
178
+
179
+ Some reviewers skip the spec comparison and read the code directly. Result:
180
+ - "Code looks quality" → but doesn't implement the requirements
181
+ - Missed key FRs
182
+ - Over-focus on details, miss architectural decisions
183
+
184
+ **Correction**: Stage 1 must walk through the FR/AC/AD checklist item by item.
185
+
186
+ ### Anti-pattern 2: "Close enough"
187
+
188
+ Some reviewers find a missing FR but give APPROVED because the code quality is high.
189
+
190
+ **Correction**: Stage 1 FAIL is BLOCKED. "Trading quality for compliance" is not allowed.
191
+
192
+ ### Anti-pattern 3: "Too many findings"
193
+
194
+ Some reviewers list 50 minor improvements — the user can't process.
195
+
196
+ **Correction**: tier them — blocker / warning / suggestion. User only needs to look at blockers.
197
+
198
+ ### Anti-pattern 4: "No evidence"
199
+
200
+ "This could be improved" / "feels the code quality isn't high enough".
201
+
202
+ **Correction**: every finding has **file:line + evidence + recommendation**.
203
+
204
+ ---
205
+
206
+ ## Relationship to Other Phases
207
+
208
+ ```
209
+ /curdx-flow:tasks → tasks.md contains task list
210
+
211
+ /curdx-flow:implement → code + tests + commits
212
+
213
+ /curdx-flow:verify → Goal-backward verification (flow-verifier)
214
+ ↓ ↓
215
+ ↓ verification-report.md
216
+
217
+ /curdx-flow:review → Two-Stage Review (flow-reviewer)
218
+ ↓ ↓
219
+ ↓ review-report.md
220
+
221
+ (optional) /curdx-flow:audit → adversarial review + edge cases
222
+
223
+ adversarial-review.md
224
+ edge-cases.md
225
+
226
+ /curdx-flow:ship → PR (Phase 6+)
227
+ ```
228
+
229
+ Verify is "did we implement the right thing", Review is "is the implementation good", Audit is "what else could be better".
230
+
231
+ ---
232
+
233
+ _Source: superpowers' code-review two-stage design, extended with CurDX-Flow's Gate system._
@@ -0,0 +1,387 @@
1
+ # Wave Execution — DAG Parallel Execution Strategy
2
+
3
+ > One of Phase 2's 4 execution strategies. Identify parallel-safe task groups via `[P]` markers, dispatch multiple Task tool calls **in a single message**, run in parallel within a wave and serially across waves.
4
+ >
5
+ > Agents reference this via `@${CLAUDE_PLUGIN_ROOT}/knowledge/wave-execution.md`.
6
+
7
+ ---
8
+
9
+ ## Core Concepts
10
+
11
+ ### Wave = a group of parallel-safe tasks
12
+
13
+ A wave is **a consecutive run of `[P]`-marked tasks**. Within a wave, run in parallel; across waves, run serially.
14
+
15
+ ```
16
+ tasks.md:
17
+ 1.1 [P] create auth directory
18
+ 1.2 [P] create user directory
19
+ 1.3 [P] create session directory
20
+ 1.4 [VERIFY] verify directory structure
21
+ 1.5 init index.ts (depends on 1.1-1.3)
22
+ 1.6 [P] add README to auth
23
+ 1.7 [P] add README to user
24
+
25
+ Analysis:
26
+ Wave 1: { 1.1, 1.2, 1.3 } — parallel (3 Tasks)
27
+ Wave 2: { 1.4 } — serial (VERIFY breaks)
28
+ Wave 3: { 1.5 } — serial (no [P])
29
+ Wave 4: { 1.6, 1.7 } — parallel (2 Tasks)
30
+ ```
31
+
32
+ ---
33
+
34
+ ## DAG Analysis Algorithm
35
+
36
+ ```python
37
+ def analyze_waves(tasks):
38
+ waves = []
39
+ current_wave = []
40
+
41
+ for task in tasks:
42
+ if task.status == 'completed':
43
+ continue
44
+
45
+ # markers that break parallelism
46
+ if task.has_flag('SEQUENTIAL') or task.has_flag('VERIFY'):
47
+ # end current wave
48
+ if current_wave:
49
+ waves.append(current_wave)
50
+ current_wave = []
51
+ # this task becomes its own wave
52
+ waves.append([task])
53
+ continue
54
+
55
+ # has [P] → candidate for current wave
56
+ if task.has_flag('P'):
57
+ # conflict detection: do Files intersect the current wave's files?
58
+ if has_file_conflict(task, current_wave):
59
+ # conflict → start a new wave
60
+ waves.append(current_wave)
61
+ current_wave = [task]
62
+ else:
63
+ current_wave.append(task)
64
+
65
+ # no [P] → own wave
66
+ else:
67
+ if current_wave:
68
+ waves.append(current_wave)
69
+ current_wave = []
70
+ waves.append([task])
71
+
72
+ # cleanup
73
+ if current_wave:
74
+ waves.append(current_wave)
75
+
76
+ return waves
77
+ ```
78
+
79
+ ### Conflict detection
80
+
81
+ ```python
82
+ def has_file_conflict(task, wave):
83
+ """Do task's Files intersect any wave task's Files?"""
84
+ task_files = set(task.files)
85
+ for other in wave:
86
+ if task_files & set(other.files):
87
+ return True
88
+ return False
89
+ ```
90
+
91
+ Rules:
92
+ - Two `[P]` tasks editing the same file → conflict, must split into different waves
93
+ - Two `[P]` tasks creating different files → OK
94
+ - One reads what another writes → **conflict** (reads aren't guaranteed to see latest)
95
+
96
+ ---
97
+
98
+ ## How Parallel Task Dispatch Actually Works
99
+
100
+ ### Key: multiple Task tool calls in a single message
101
+
102
+ Claude Code's Task tool runs in parallel **when multiple calls appear in the same message**.
103
+ Across **separate messages** → runs sequentially.
104
+
105
+ ### Correct form (Wave strategy)
106
+
107
+ ```
108
+ # In a single main-agent response:
109
+
110
+ Task(description="Task 1.1", prompt="...execute 1.1...")
111
+ Task(description="Task 1.2", prompt="...execute 1.2...")
112
+ Task(description="Task 1.3", prompt="...execute 1.3...")
113
+
114
+ # Wait for all to return before continuing to the next wave
115
+ ```
116
+
117
+ ### Incorrect form (degenerates to serial subagent)
118
+
119
+ ```
120
+ # One response:
121
+ Task(description="Task 1.1", ...)
122
+ # wait for return
123
+ # Next response:
124
+ Task(description="Task 1.2", ...)
125
+ # wait for return
126
+ # Next response:
127
+ Task(description="Task 1.3", ...)
128
+ ```
129
+
130
+ This is not parallel — it's serial subagent. The Wave strategy loses its meaning.
131
+
132
+ ---
133
+
134
+ ## Full Wave Dispatch Flow
135
+
136
+ ```
137
+ for wave_index, wave in enumerate(waves):
138
+
139
+ # === Step 1: show wave info ===
140
+ echo "▶ Wave $wave_index: parallel ${#wave} tasks"
141
+ for task in wave:
142
+ echo " • $task.id $task.title"
143
+
144
+ # === Step 2: dispatch (key: within a single message) ===
145
+ # This is the main agent's response body. Call N Task tools at once.
146
+ results = await asyncio.gather([
147
+ Task(
148
+ description=f"execute {task.id}",
149
+ prompt=f"""
150
+ You are the flow-executor agent.
151
+ Full definition: ${CLAUDE_PLUGIN_ROOT}/agents/flow-executor.md
152
+
153
+ Execute single task:
154
+ spec_name: {spec_name}
155
+ task_id: {task.id}
156
+ quick_mode: {quick_mode}
157
+
158
+ You may only edit the following files:
159
+ {task.files}
160
+
161
+ Output TASK_COMPLETE / TASK_FAILED
162
+ """,
163
+ )
164
+ for task in wave
165
+ ])
166
+
167
+ # === Step 3: aggregate results ===
168
+ completed = [t for t, r in zip(wave, results) if "TASK_COMPLETE" in r]
169
+ failed = [t for t, r in zip(wave, results) if "TASK_FAILED" in r]
170
+
171
+ # === Step 4: post-hoc conflict check ===
172
+ # After wave tasks complete, check for unexpected edits
173
+ git_status = run("git status --short")
174
+ # For each task, confirm it only edited its declared Files
175
+ for task in completed:
176
+ declared_files = set(task.files)
177
+ actual_changed = get_changed_files_since_wave_start(task)
178
+ if actual_changed - declared_files:
179
+ # Unexpected edits
180
+ warn(f"Wave {wave_index} task {task.id} edited undeclared files: {actual_changed - declared_files}")
181
+ # Don't fail immediately, but record
182
+
183
+ # === Step 5: failure handling ===
184
+ if failed:
185
+ # Policy:
186
+ # - 1 failure: continue other waves, report after completion
187
+ # - ≥ 2 failures: stop execution, user intervenes
188
+ if len(failed) == 1:
189
+ record_failure(failed[0])
190
+ continue_to_next_wave()
191
+ else:
192
+ stop_and_report(failed)
193
+ return
194
+
195
+ # === Step 6: inter-wave synchronization point ===
196
+ # All Tasks complete = wave ends
197
+ # Before next wave starts, confirm git state is consistent
198
+
199
+ # All waves done
200
+ echo "ALL_TASKS_COMPLETE"
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Three Kinds of File Conflicts
206
+
207
+ ### Case 1: no conflict (ideal)
208
+
209
+ ```
210
+ Task 1.1 [P]: create src/auth/login.ts (Files: auth/login.ts)
211
+ Task 1.2 [P]: create src/user/profile.ts (Files: user/profile.ts)
212
+ Task 1.3 [P]: create src/session/token.ts (Files: session/token.ts)
213
+ ```
214
+
215
+ → Same wave, parallel, no problem.
216
+
217
+ ### Case 2: same-file conflict (must split waves)
218
+
219
+ ```
220
+ Task 2.1 [P]: modify src/index.ts to add auth export (Files: index.ts)
221
+ Task 2.2 [P]: modify src/index.ts to add user export (Files: index.ts)
222
+ ```
223
+
224
+ → Both edit `index.ts`, editing concurrently **conflicts**.
225
+
226
+ flow-planner should catch this and remove `[P]` from one of them.
227
+ If the planner misses it, flow-implement's conflict detection should split the wave.
228
+
229
+ ### Case 3: read-write conflict (implicit)
230
+
231
+ ```
232
+ Task 3.1 [P]: modify Order type definition (Files: types/order.ts)
233
+ Task 3.2 [P]: use Order to implement payment (Files: payment/process.ts, imports types/order.ts)
234
+ ```
235
+
236
+ → 3.2 imports 3.1's change. Parallel → 3.2 may see the old Order.
237
+
238
+ Such **implicit dependencies** are harder to detect. Best is for flow-planner to avoid `[P]` across such dependencies when generating tasks.
239
+
240
+ ---
241
+
242
+ ## Failure Handling Policies
243
+
244
+ ### Single task failure
245
+
246
+ ```
247
+ Wave 1 contains { 1.1, 1.2, 1.3 }
248
+ 1.1 → TASK_COMPLETE
249
+ 1.2 → TASK_FAILED
250
+ 1.3 → TASK_COMPLETE
251
+
252
+ Decision:
253
+ - 1.2 marked failed, recorded to .state.json
254
+ - 1.1 and 1.3 commits retained
255
+ - Main agent decides:
256
+ A: continue to Wave 2 (skip 1.2, possible cascading failure)
257
+ B: dispatch David (flow-debugger) to fix 1.2, then continue
258
+ C: stop and report, let the user intervene
259
+
260
+ Default: A, but failed_attempts += 1; after threshold switch to C
261
+ ```
262
+
263
+ ### Entire wave failed
264
+
265
+ ```
266
+ Wave 1 all TASK_FAILED
267
+
268
+ Decision:
269
+ - Usually indicates an upstream environment problem (missing deps, tsc config wrong)
270
+ - Stop immediately
271
+ - Suggest user run /curdx-flow:doctor to diagnose
272
+ ```
273
+
274
+ ### Inter-wave dependency broken
275
+
276
+ ```
277
+ Wave 1 output is depended on by Wave 2
278
+ Wave 1 has failures → Wave 2 may also fail
279
+
280
+ Decision:
281
+ - After Wave 1 fails, evaluate whether Wave 2 can still run
282
+ - If each Wave 2 task's Files are unrelated to failed Wave 1 task Files → continue
283
+ - Otherwise → stop
284
+ ```
285
+
286
+ ---
287
+
288
+ ## When to Choose the Wave Strategy
289
+
290
+ ### Suitable
291
+
292
+ - ✓ `[P]` markers make up ≥ 40% of tasks.md
293
+ - ✓ Task groups are independent (different modules, different components)
294
+ - ✓ Shortest wall-clock time desired
295
+ - ✓ You trust that planner-marked `[P]` is accurate
296
+
297
+ ### Not suitable
298
+
299
+ - ✗ Many `[SEQUENTIAL]` in tasks (wave degenerates to linear)
300
+ - ✗ Tasks depend on each other (use serial subagent)
301
+ - ✗ Debugging (need to see the full process — use linear)
302
+ - ✗ Parallel overhead > task duration (e.g., 1-second tasks with 10-second dispatch)
303
+
304
+ ---
305
+
306
+ ## Monitoring and Interruption
307
+
308
+ ### In-progress view
309
+
310
+ `/curdx-flow:status` shows:
311
+ ```
312
+ Spec: auth-system
313
+ Strategy: wave
314
+ Progress: Wave 2/5 (60%)
315
+ Wave 1 [P×3]: ✓✓✓
316
+ Wave 2 [P×2]: ●● (in progress)
317
+ Wave 3 [VERIFY]: ○
318
+ ...
319
+ ```
320
+
321
+ ### Ctrl+C interruption
322
+
323
+ - Running Task calls in the current wave keep going (Claude Code's Task is an independent process)
324
+ - Next `/curdx-flow:switch` shows some tasks already committed
325
+ - Resume from the failing task
326
+
327
+ ---
328
+
329
+ ## Configuration
330
+
331
+ `.flow/config.json`:
332
+
333
+ ```json
334
+ {
335
+ "execution": {
336
+ "strategy": "wave",
337
+ "max_parallel": 5,
338
+ "wave_fail_policy": "continue-on-single | stop-on-any"
339
+ }
340
+ }
341
+ ```
342
+
343
+ - `max_parallel`: maximum parallel tasks per wave (default 5, to avoid API rate limits)
344
+ - `wave_fail_policy`: default behavior on single task failure
345
+
346
+ ---
347
+
348
+ ## Mixing with Other Strategies
349
+
350
+ Sometimes a single tasks.md doesn't fit one strategy. **Mixed strategies** are supported:
351
+
352
+ ```bash
353
+ # Run fast waves first, fall back to linear single-task debugging on failure
354
+ /curdx-flow:implement --strategy=wave
355
+ # Wave strategy runs until a task fails repeatedly → stop
356
+ /curdx-flow:implement --task=2.3 --strategy=linear
357
+ # After fixing, continue with waves
358
+ /curdx-flow:implement --strategy=wave
359
+ ```
360
+
361
+ Phase 6+ will consider automatic fallback.
362
+
363
+ ---
364
+
365
+ ## Common Pitfalls
366
+
367
+ ### 1. `[P]` markers incorrect
368
+
369
+ If the planner missed a dependency, `[P]` may be wrong. Solutions:
370
+ - Before execution, confirm tasks coverage via `/curdx-flow:audit`
371
+ - Conflict detection as a safety net (validate Files before dispatch)
372
+
373
+ ### 2. A wave too large
374
+
375
+ 10+ parallel Tasks may trigger API rate limits or context pressure. Solutions:
376
+ - `max_parallel: 5` splits a big wave into several
377
+ - flow-planner avoids making waves too large when generating
378
+
379
+ ### 3. Implicit cross-wave dependencies
380
+
381
+ As in "Case 3" above. Solutions:
382
+ - flow-planner should not mark cross-file import relationships as `[P]`
383
+ - flow-implement does static analysis before execution (Phase 6+)
384
+
385
+ ---
386
+
387
+ _Source: get-shit-done's wave execution. CurDX-Flow turns it from a concept into executable logic._
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@curdx/flow",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "CLI installer for CurDX-Flow — AI engineering workflow meta-framework for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
7
- "curdx-flow": "bin/curdx-flow.js"
7
+ "curdx-flow": "bin/curdx-flow.js",
8
+ "flow": "bin/curdx-flow.js"
8
9
  },
9
10
  "scripts": {
10
11
  "prepublishOnly": "node bin/curdx-flow.js --version"
@@ -12,8 +13,18 @@
12
13
  "files": [
13
14
  "bin/",
14
15
  "cli/",
16
+ ".claude-plugin/",
17
+ "agents/",
18
+ "gates/",
19
+ "commands/",
20
+ "hooks/",
21
+ "knowledge/",
22
+ "agent-preamble/",
15
23
  "templates/",
16
- "README.md"
24
+ "schemas/",
25
+ "README.md",
26
+ "CHANGELOG.md",
27
+ "LICENSE"
17
28
  ],
18
29
  "engines": {
19
30
  "node": ">=18"