@curdx/flow 2.3.11 → 3.1.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.
Files changed (210) hide show
  1. package/CHANGELOG.md +21 -34
  2. package/LICENSE +1 -1
  3. package/README.md +28 -79
  4. package/dist/index.mjs +995 -0
  5. package/package.json +33 -42
  6. package/.claude-plugin/marketplace.json +0 -48
  7. package/.claude-plugin/plugin.json +0 -70
  8. package/agent-preamble/preamble.md +0 -314
  9. package/agents/flow-adversary.md +0 -202
  10. package/agents/flow-architect.md +0 -197
  11. package/agents/flow-brownfield-analyst.md +0 -142
  12. package/agents/flow-debugger.md +0 -321
  13. package/agents/flow-edge-hunter.md +0 -288
  14. package/agents/flow-executor.md +0 -269
  15. package/agents/flow-orchestrator.md +0 -145
  16. package/agents/flow-planner.md +0 -246
  17. package/agents/flow-product-designer.md +0 -159
  18. package/agents/flow-qa-engineer.md +0 -282
  19. package/agents/flow-researcher.md +0 -165
  20. package/agents/flow-reviewer.md +0 -303
  21. package/agents/flow-security-auditor.md +0 -401
  22. package/agents/flow-triage-analyst.md +0 -272
  23. package/agents/flow-ui-researcher.md +0 -229
  24. package/agents/flow-ux-designer.md +0 -221
  25. package/agents/flow-verifier.md +0 -349
  26. package/bin/curdx-flow +0 -5
  27. package/bin/curdx-flow.js +0 -54
  28. package/cli/README.md +0 -104
  29. package/cli/doctor-workflow.js +0 -483
  30. package/cli/doctor.js +0 -73
  31. package/cli/help.js +0 -59
  32. package/cli/install-bundled-mcps.js +0 -37
  33. package/cli/install-companions.js +0 -19
  34. package/cli/install-context7-config.js +0 -80
  35. package/cli/install-curdx-plugin.js +0 -96
  36. package/cli/install-language.js +0 -35
  37. package/cli/install-next-steps.js +0 -29
  38. package/cli/install-options.js +0 -9
  39. package/cli/install-paths.js +0 -52
  40. package/cli/install-recommended-plugins.js +0 -104
  41. package/cli/install-required-plugins.js +0 -57
  42. package/cli/install-self-update.js +0 -62
  43. package/cli/install-workflow.js +0 -209
  44. package/cli/install.js +0 -101
  45. package/cli/lib/claude-commands.js +0 -41
  46. package/cli/lib/claude-ops.js +0 -47
  47. package/cli/lib/claude.js +0 -183
  48. package/cli/lib/config.js +0 -24
  49. package/cli/lib/doctor-claude-settings.js +0 -1186
  50. package/cli/lib/doctor-report.js +0 -978
  51. package/cli/lib/doctor-runtime-environment.js +0 -196
  52. package/cli/lib/frontmatter.js +0 -44
  53. package/cli/lib/json-schema.js +0 -57
  54. package/cli/lib/logging.js +0 -25
  55. package/cli/lib/process.js +0 -60
  56. package/cli/lib/prompts.js +0 -135
  57. package/cli/lib/runtime.js +0 -107
  58. package/cli/lib/semver.js +0 -109
  59. package/cli/lib/version.js +0 -12
  60. package/cli/protocols-body.md +0 -22
  61. package/cli/protocols.js +0 -162
  62. package/cli/registry.js +0 -123
  63. package/cli/router.js +0 -49
  64. package/cli/uninstall-actions.js +0 -360
  65. package/cli/uninstall-workflow.js +0 -146
  66. package/cli/uninstall.js +0 -42
  67. package/cli/upgrade-workflow.js +0 -80
  68. package/cli/upgrade.js +0 -91
  69. package/cli/utils.js +0 -40
  70. package/gates/adversarial-review-gate.md +0 -219
  71. package/gates/coverage-audit-gate.md +0 -182
  72. package/gates/devex-gate.md +0 -254
  73. package/gates/edge-case-gate.md +0 -194
  74. package/gates/karpathy-gate.md +0 -130
  75. package/gates/security-gate.md +0 -218
  76. package/gates/tdd-gate.md +0 -182
  77. package/gates/test-quality-gate.md +0 -59
  78. package/gates/verification-gate.md +0 -179
  79. package/hooks/hooks.json +0 -58
  80. package/hooks/scripts/common.sh +0 -46
  81. package/hooks/scripts/inject-karpathy.sh +0 -53
  82. package/hooks/scripts/quick-mode-guard.sh +0 -68
  83. package/hooks/scripts/session-start.sh +0 -90
  84. package/hooks/scripts/stop-watcher.sh +0 -230
  85. package/hooks/scripts/subagent-artifact-guard.sh +0 -159
  86. package/hooks/scripts/subagent-statusline.sh +0 -105
  87. package/knowledge/artifact-output-discipline.md +0 -24
  88. package/knowledge/artifact-summary-contracts.md +0 -50
  89. package/knowledge/atomic-commits.md +0 -262
  90. package/knowledge/claude-code-runtime-contracts.md +0 -219
  91. package/knowledge/epic-decomposition.md +0 -307
  92. package/knowledge/execution-strategies.md +0 -303
  93. package/knowledge/karpathy-guidelines.md +0 -219
  94. package/knowledge/planning-reviews.md +0 -211
  95. package/knowledge/poc-first-workflow.md +0 -223
  96. package/knowledge/review-feedback-intake.md +0 -57
  97. package/knowledge/spec-driven-development.md +0 -180
  98. package/knowledge/systematic-debugging.md +0 -378
  99. package/knowledge/two-stage-review.md +0 -249
  100. package/knowledge/wave-execution.md +0 -403
  101. package/monitors/monitors.json +0 -8
  102. package/monitors/scripts/flow-state-monitor.sh +0 -99
  103. package/output-styles/curdx-evidence-first.md +0 -34
  104. package/schemas/agent-frontmatter.schema.json +0 -63
  105. package/schemas/config.schema.json +0 -134
  106. package/schemas/gate-frontmatter.schema.json +0 -30
  107. package/schemas/hooks.schema.json +0 -115
  108. package/schemas/output-style-frontmatter.schema.json +0 -22
  109. package/schemas/plugin-manifest.schema.json +0 -436
  110. package/schemas/plugin-settings.schema.json +0 -29
  111. package/schemas/skill-frontmatter.schema.json +0 -177
  112. package/schemas/spec-frontmatter.schema.json +0 -42
  113. package/schemas/spec-state.schema.json +0 -147
  114. package/settings.json +0 -7
  115. package/skills/brownfield-index/SKILL.md +0 -53
  116. package/skills/brownfield-index/references/applicability.md +0 -12
  117. package/skills/brownfield-index/references/handoff.md +0 -8
  118. package/skills/brownfield-index/references/index-contract.md +0 -10
  119. package/skills/browser-qa/SKILL.md +0 -39
  120. package/skills/browser-qa/references/handoff.md +0 -6
  121. package/skills/browser-qa/references/prerequisites.md +0 -10
  122. package/skills/browser-qa/references/qa-contract.md +0 -20
  123. package/skills/cancel/SKILL.md +0 -41
  124. package/skills/cancel/references/destructive-mode.md +0 -17
  125. package/skills/cancel/references/reporting.md +0 -18
  126. package/skills/cancel/references/state-recovery.md +0 -30
  127. package/skills/cancel/references/target-resolution.md +0 -7
  128. package/skills/debug/SKILL.md +0 -45
  129. package/skills/debug/references/context-gathering.md +0 -11
  130. package/skills/debug/references/failure-guard.md +0 -25
  131. package/skills/debug/references/intake.md +0 -12
  132. package/skills/debug/references/phase-workflow.md +0 -34
  133. package/skills/debug/references/reporting.md +0 -20
  134. package/skills/epic/SKILL.md +0 -39
  135. package/skills/epic/references/epic-artifacts.md +0 -20
  136. package/skills/epic/references/epic-intake.md +0 -9
  137. package/skills/epic/references/slice-handoff.md +0 -16
  138. package/skills/fast/SKILL.md +0 -62
  139. package/skills/fast/references/applicability.md +0 -25
  140. package/skills/fast/references/clarification.md +0 -20
  141. package/skills/fast/references/execution-contract.md +0 -56
  142. package/skills/help/SKILL.md +0 -55
  143. package/skills/help/references/dispatch.md +0 -20
  144. package/skills/help/references/overview.md +0 -39
  145. package/skills/help/references/troubleshoot.md +0 -47
  146. package/skills/help/references/workflow.md +0 -37
  147. package/skills/implement/SKILL.md +0 -96
  148. package/skills/implement/references/error-recovery.md +0 -36
  149. package/skills/implement/references/linear-execution.md +0 -32
  150. package/skills/implement/references/preflight.md +0 -43
  151. package/skills/implement/references/progress-contract.md +0 -32
  152. package/skills/implement/references/state-init.md +0 -33
  153. package/skills/implement/references/stop-hook-execution.md +0 -36
  154. package/skills/implement/references/strategy-router.md +0 -38
  155. package/skills/implement/references/subagent-execution.md +0 -43
  156. package/skills/implement/references/wave-execution.md +0 -162
  157. package/skills/init/SKILL.md +0 -49
  158. package/skills/init/references/gitignore-and-health.md +0 -26
  159. package/skills/init/references/next-steps.md +0 -22
  160. package/skills/init/references/preflight.md +0 -15
  161. package/skills/init/references/scaffold-contract.md +0 -27
  162. package/skills/review/SKILL.md +0 -82
  163. package/skills/review/references/optional-passes.md +0 -48
  164. package/skills/review/references/preflight.md +0 -38
  165. package/skills/review/references/report-contract.md +0 -49
  166. package/skills/review/references/reporting.md +0 -20
  167. package/skills/review/references/stage-execution.md +0 -32
  168. package/skills/security-audit/SKILL.md +0 -47
  169. package/skills/security-audit/references/audit-contract.md +0 -21
  170. package/skills/security-audit/references/gate-handoff.md +0 -8
  171. package/skills/security-audit/references/scope-and-depth.md +0 -9
  172. package/skills/spec/SKILL.md +0 -100
  173. package/skills/spec/references/artifact-landing.md +0 -31
  174. package/skills/spec/references/phase-execution.md +0 -50
  175. package/skills/spec/references/planning-review.md +0 -31
  176. package/skills/spec/references/preflight-and-routing.md +0 -46
  177. package/skills/spec/references/reporting.md +0 -21
  178. package/skills/start/SKILL.md +0 -84
  179. package/skills/start/references/branch-routing.md +0 -51
  180. package/skills/start/references/mode-semantics.md +0 -12
  181. package/skills/start/references/preflight.md +0 -13
  182. package/skills/start/references/reporting.md +0 -20
  183. package/skills/start/references/state-seeding.md +0 -44
  184. package/skills/start/references/workflow-handoff.md +0 -26
  185. package/skills/status/SKILL.md +0 -41
  186. package/skills/status/references/gather-contract.md +0 -27
  187. package/skills/status/references/health-rules.md +0 -27
  188. package/skills/status/references/output-contract.md +0 -24
  189. package/skills/status/references/preflight.md +0 -10
  190. package/skills/status/references/recovery-hints.md +0 -18
  191. package/skills/ui-sketch/SKILL.md +0 -39
  192. package/skills/ui-sketch/references/brief-intake.md +0 -10
  193. package/skills/ui-sketch/references/iteration-handoff.md +0 -5
  194. package/skills/ui-sketch/references/variant-contract.md +0 -15
  195. package/skills/verify/SKILL.md +0 -56
  196. package/skills/verify/references/evidence-workflow.md +0 -39
  197. package/skills/verify/references/output-contract.md +0 -23
  198. package/skills/verify/references/preflight.md +0 -11
  199. package/skills/verify/references/report-handoff.md +0 -35
  200. package/skills/verify/references/strict-mode.md +0 -12
  201. package/templates/CONTEXT.md.tmpl +0 -53
  202. package/templates/PROJECT.md.tmpl +0 -59
  203. package/templates/ROADMAP.md.tmpl +0 -50
  204. package/templates/STATE.md.tmpl +0 -49
  205. package/templates/config.json.tmpl +0 -51
  206. package/templates/design.md.tmpl +0 -83
  207. package/templates/progress.md.tmpl +0 -77
  208. package/templates/requirements.md.tmpl +0 -76
  209. package/templates/research.md.tmpl +0 -83
  210. package/templates/tasks.md.tmpl +0 -107
@@ -1,36 +0,0 @@
1
- # Stop-Hook Execution — Hook-Driven Continuation
2
-
3
- Use this mode for long unattended runs where each execution round should end
4
- naturally and the hook layer decides whether Claude continues.
5
-
6
- ## Protocol
7
-
8
- ```text
9
- 1. Execute 1 task (inline or via flow-executor, then wait for completion)
10
- 2. End the response naturally
11
- 3. stop-watcher.sh evaluates transcript markers, .state.json, and tasks.md
12
- 4. If unchecked tasks remain, the hook blocks stop and injects continuation
13
- 5. Repeat until ALL_TASKS_COMPLETE or recovery forces a halt
14
- ```
15
-
16
- ## Completion Invariant
17
-
18
- Stop-hook completion is double-checked:
19
-
20
- - `.state.json` must say execute is complete
21
- - `tasks.md` must have zero unchecked tasks
22
-
23
- If either side disagrees, the hook resumes the first unchecked task instead of
24
- allowing the session to stop cleanly.
25
-
26
- ## Prerequisites
27
-
28
- - `--quick` should be set; otherwise `AskUserQuestion` can stall the loop
29
- - `.flow/config.json` or `.state.json` should pin `strategy=stop-hook`
30
- - The hook layer must remain the final authority for continuation
31
-
32
- ## Context Signal
33
-
34
- During a stop-hook continuation, `stop_hook_active=true` is only a hint. The
35
- hook still checks transcript signals, `.state.json`, and `tasks.md` parity
36
- before deciding whether to continue or stop.
@@ -1,38 +0,0 @@
1
- # Strategy Router — Selection Rules
2
-
3
- `/curdx-flow:implement` defaults to `--strategy=auto`. The router converts task
4
- shape into one of four concrete execution modes.
5
-
6
- ## Runtime Decision Tree
7
-
8
- ```bash
9
- if [ "$STRATEGY" != "auto" ]; then
10
- use the explicit value
11
- elif [ $REMAINING -lt 5 ] || [ $SEQUENTIAL -gt $((REMAINING / 2)) ]; then
12
- STRATEGY="linear"
13
- elif [ $PARALLEL -ge $((REMAINING * 4 / 10)) ]; then
14
- STRATEGY="wave"
15
- elif [ $REMAINING -ge 20 ] && [ $QUICK -eq 1 ]; then
16
- STRATEGY="stop-hook"
17
- elif [ $REMAINING -ge 8 ]; then
18
- STRATEGY="subagent"
19
- else
20
- STRATEGY="linear"
21
- fi
22
- ```
23
-
24
- ## Routing Signals
25
-
26
- - Few tasks or dependency-heavy work: `linear`
27
- - Meaningful `[P]` coverage and disjoint file sets: `wave`
28
- - Long unattended run with `--quick`: `stop-hook`
29
- - Mid-sized backlog without safe parallelism: `subagent`
30
-
31
- ## Guardrails
32
-
33
- - `--strategy=<mode>` always wins over auto-routing
34
- - Unknown strategy values are fatal; do not silently fall back
35
- - `--task=<id>` narrows execution scope, but does not change the selected
36
- strategy by itself
37
- - `--quick` is a routing hint only; it does not relax verification or commit
38
- rules
@@ -1,43 +0,0 @@
1
- # Subagent Execution — Serial Isolated Executors
2
-
3
- Use this mode when tasks are moderately sized and benefit from fresh context per
4
- task, but the backlog is not parallel-safe enough for waves.
5
-
6
- ## Dispatch Contract
7
-
8
- Dispatch one `flow-executor` at a time with a uniform prompt:
9
-
10
- ```text
11
- You are the flow-executor agent. Full definition at:
12
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-executor.md
13
-
14
- Execute task:
15
- spec_name: $SPEC_NAME
16
- task_id: next (or a specific ID)
17
- quick_mode: $QUICK
18
-
19
- Required reading:
20
- - .flow/specs/$SPEC_NAME/tasks.md
21
- - .flow/specs/$SPEC_NAME/.state.json
22
- - .flow/specs/$SPEC_NAME/.progress.md
23
- - .flow/specs/$SPEC_NAME/design.md (if task references AD-NN)
24
- - .flow/specs/$SPEC_NAME/requirements.md (if task references FR/AC)
25
-
26
- On success output: TASK_COMPLETE: <task_id>
27
- On failure output: TASK_FAILED: <task_id> + Reason
28
- When all tasks are done output: ALL_TASKS_COMPLETE
29
- ```
30
-
31
- ## Aggregation Rules
32
-
33
- After the agent completes, read the output marker:
34
-
35
- - `TASK_COMPLETE` -> mark progress and dispatch the next task
36
- - `TASK_FAILED` -> increment failure tracking and enter recovery
37
- - `ALL_TASKS_COMPLETE` -> mark execute complete and move to verify
38
-
39
- ## Guardrails
40
-
41
- - This strategy is serial; a single Agent dispatch is not parallel execution
42
- - Do not batch multiple independent tasks into one `flow-executor` prompt
43
- - Do not trust narrative summaries over the end marker
@@ -1,162 +0,0 @@
1
- # Wave Execution Strategy — Detailed Walkthrough
2
-
3
- Skill-scoped reference for `skills/implement/SKILL.md`. Loaded only when the
4
- implement skill routes to the `wave` strategy. The knowledge-layer canonical
5
- algorithm lives in `@${CLAUDE_PLUGIN_ROOT}/knowledge/wave-execution.md`;
6
- this file is the walkthrough the skill itself embeds for implementers.
7
-
8
- **Core**: consecutive `[P]` tasks form a wave, dispatch multiple Agent calls in
9
- parallel within a single message, serial across waves.
10
-
11
- ## Step 1: DAG Analysis
12
-
13
- Read remaining `[ ]` tasks from tasks.md and group per the rules:
14
-
15
- ```
16
- for task in remaining tasks:
17
- if task has [SEQUENTIAL] or [VERIFY]:
18
- → own wave (breaks parallelism)
19
- elif task has [P]:
20
- → check whether Files conflict with current_wave
21
- conflict → start a new wave
22
- no conflict → add to current_wave
23
- else:
24
- → own wave (no [P] = serial)
25
- ```
26
-
27
- Output wave list:
28
- ```
29
- Wave 1 [P×3]: 1.1 1.2 1.3
30
- Wave 2 [VERIFY]: 1.4
31
- Wave 3: 1.5
32
- Wave 4 [P×2]: 1.6 1.7
33
- ```
34
-
35
- ## Step 2: Pre-Conflict Detection
36
-
37
- For each wave, verify that Files across all tasks are **disjoint**:
38
-
39
- ```python
40
- for wave in waves:
41
- all_files = []
42
- for task in wave:
43
- if set(task.files) & set(all_files):
44
- warn(f"Within wave, {task.id} modifies the same file as a prior task")
45
- # split into the next wave
46
- all_files.extend(task.files)
47
- ```
48
-
49
- If the planner mis-tagged `[P]` (modifies the same file), split the wave automatically at execution time rather than failing outright.
50
-
51
- ## Step 3: Dispatch a Single Wave (key: within a single response)
52
-
53
- ```
54
- # List multiple Agent tool calls in one response of the main agent:
55
- Agent(description="Execute 1.1", prompt=<...flow-executor + task_id=1.1...>)
56
- Agent(description="Execute 1.2", prompt=<...flow-executor + task_id=1.2...>)
57
- Agent(description="Execute 1.3", prompt=<...flow-executor + task_id=1.3...>)
58
- ```
59
-
60
- Each Agent prompt follows a uniform format (similar to subagent strategy):
61
-
62
- ```
63
- You are the flow-executor agent. Full definition:
64
- ${CLAUDE_PLUGIN_ROOT}/agents/flow-executor.md
65
-
66
- Execute a single task:
67
- spec_name: $SPEC_NAME
68
- task_id: <specific ID, e.g., 1.2>
69
- quick_mode: $QUICK
70
-
71
- **You may only modify the following files** (touching anything else is disallowed):
72
- <task.files>
73
-
74
- Required reading:
75
- - .flow/specs/$SPEC_NAME/tasks.md
76
- - .flow/specs/$SPEC_NAME/.state.json
77
- - .flow/specs/$SPEC_NAME/design.md (if referencing AD-NN)
78
-
79
- Output:
80
- - TASK_COMPLETE: <task_id> or
81
- - TASK_FAILED: <task_id> + reason
82
- ```
83
-
84
- **Not allowed**:
85
- - Splitting multiple Agent calls across multiple responses (that is serial degradation)
86
- - Nesting another Agent dispatch inside an Agent
87
-
88
- ## Step 4: Aggregate Wave Results
89
-
90
- Wait for all Agent calls to return:
91
-
92
- ```python
93
- completed = []; failed = []
94
- for task, result in zip(wave, results):
95
- if "TASK_COMPLETE" in result:
96
- completed.append(task)
97
- elif "TASK_FAILED" in result:
98
- failed.append(task)
99
-
100
- # Post-hoc conflict detection (verify executors did not touch out-of-scope files)
101
- for task in completed:
102
- actual_files = git_diff_files_touched_by(task)
103
- declared = set(task.files)
104
- unexpected = actual_files - declared
105
- if unexpected:
106
- warn(f"Task {task.id} modified undeclared files: {unexpected}")
107
- ```
108
-
109
- ## Step 5: Wave Failure Handling
110
-
111
- ```
112
- len(failed) == 0:
113
- → continue to the next wave
114
-
115
- len(failed) == 1:
116
- → failed_attempts += 1
117
- → based on config.wave_fail_policy:
118
- "continue-on-single": continue to the next wave, report failure at the end
119
- "stop-on-any": stop immediately
120
-
121
- len(failed) >= 2:
122
- → likely environment issue (missing deps/tsc error/permissions)
123
- → stop immediately, suggest npx @curdx/flow doctor
124
-
125
- failed_attempts >= 3 (cumulative):
126
- → stop, user intervention required
127
- ```
128
-
129
- ## Step 6: Progress Feedback
130
-
131
- ```
132
- ▶ Wave 2/5 complete
133
- ✓ 1.1 feat(auth): create module skeleton (abc123)
134
- ✓ 1.2 feat(user): create user types (def456)
135
- ✓ 1.3 feat(session): init token module (ghi789)
136
-
137
- ▶ Wave 3/5 starting (VERIFY)...
138
- ```
139
-
140
- ## Configuration
141
-
142
- `.flow/config.json`:
143
- ```json
144
- {
145
- "execution": {
146
- "strategy": "wave",
147
- "max_parallel": 5,
148
- "wave_fail_policy": "continue-on-single"
149
- }
150
- }
151
- ```
152
-
153
- - `max_parallel`: max N parallel within a wave (to avoid API rate limits, default 5)
154
- - `wave_fail_policy`: single-task failure behavior
155
-
156
- ## Pitfalls
157
-
158
- See `@${CLAUDE_PLUGIN_ROOT}/knowledge/wave-execution.md` for the detailed version.
159
-
160
- - Stray `[P]` → conflict detection as a safety net
161
- - Wave too large → max_parallel auto-splits
162
- - Implicit read-write dependencies → planner should avoid this kind of `[P]`
@@ -1,49 +0,0 @@
1
- ---
2
- name: init
3
- description: Initialize the .flow scaffold for the current repository.
4
- when_to_use: Use when the current repository is not yet a CurdX-Flow project and needs the initial .flow scaffold.
5
- argument-hint: "[--force]"
6
- disable-model-invocation: true
7
- allowed-tools: [Read, Write, Bash, AskUserQuestion]
8
- ---
9
-
10
- # Initialize CurdX-Flow Project
11
-
12
- Bootstrap `.flow/` for the current repository. Keep the entrypoint focused on
13
- safe preflight checks, scaffold contracts, and next-step routing. Detailed init
14
- rules live in:
15
-
16
- - `references/preflight.md`
17
- - `references/scaffold-contract.md`
18
- - `references/gitignore-and-health.md`
19
- - `references/next-steps.md`
20
-
21
- ## Arguments
22
-
23
- `$ARGUMENTS` may include `--force`.
24
-
25
- Use `references/preflight.md` for:
26
-
27
- - dangerous-root rejection
28
- - existing `.flow/` handling
29
- - `--force` repair semantics
30
-
31
- `--force` is for scaffold repair, not blind overwrites.
32
-
33
- ## Scaffold Contract
34
-
35
- Use `references/scaffold-contract.md` for the required directory skeleton,
36
- template rendering, and placeholder substitution contract.
37
-
38
- ## Gitignore and Health
39
-
40
- Use `references/gitignore-and-health.md` for:
41
-
42
- - runtime ignore entries
43
- - committed-vs-runtime file boundaries
44
- - doctor / dependency health guidance
45
-
46
- ## Output and Handoff
47
-
48
- The user-facing success output and route to `/curdx-flow:start` live in
49
- `references/next-steps.md`.
@@ -1,26 +0,0 @@
1
- # Init Gitignore and Health — Runtime Hygiene
2
-
3
- Append these runtime-only entries to `.gitignore` if they are missing:
4
-
5
- ```gitignore
6
- # CurdX-Flow runtime files
7
- .flow/checkpoints/
8
- .flow/threads/
9
- .flow/seeds/
10
- .flow/.active-spec
11
- .flow/specs/*/.state.json
12
- .flow/specs/*/.progress.md
13
- .flow/_epics/*/.epic-state.json
14
- ```
15
-
16
- The canonical shared files should stay committed:
17
-
18
- - `.flow/PROJECT.md`
19
- - `.flow/CONTEXT.md`
20
- - `.flow/STATE.md`
21
- - `.flow/ROADMAP.md`
22
- - `.flow/config.json`
23
-
24
- Do not spawn a separate CLI subprocess from inside the skill just to show the
25
- doctor output. If the user wants the full environment report, route them to
26
- run `npx @curdx/flow doctor` in a terminal.
@@ -1,22 +0,0 @@
1
- # Init Handoff — What to Tell the User Next
2
-
3
- Success output should confirm the scaffold exists and route the user into the
4
- main workflow:
5
-
6
- ```text
7
- ✓ CurdX-Flow project initialized
8
- .flow/
9
- ├── PROJECT.md
10
- ├── CONTEXT.md
11
- ├── STATE.md
12
- ├── ROADMAP.md
13
- └── config.json
14
-
15
- Next:
16
- 1. Fill in .flow/PROJECT.md with the project goal
17
- 2. Run npx @curdx/flow doctor if environment health needs verification
18
- 3. Start the first spec with /curdx-flow:start <name> "<goal>"
19
- ```
20
-
21
- If `--force` repaired a partial scaffold, say that the existing project context
22
- was preserved and only missing runtime pieces were backfilled.
@@ -1,15 +0,0 @@
1
- # Init Preflight — Safe Bootstrap Rules
2
-
3
- Before writing `.flow/`:
4
-
5
- - confirm the current directory is the intended repository root
6
- - reject dangerous locations such as `/`, the home directory, or other obvious
7
- non-project folders
8
- - if `.flow/` already exists and `--force` is absent, stop and route the user
9
- to inspect it or run `/curdx-flow:start --list`
10
-
11
- `--force` means "repair or complete the scaffold" rather than "overwrite user
12
- content". Existing committed files such as `.flow/PROJECT.md`,
13
- `.flow/CONTEXT.md`, `.flow/STATE.md`, `.flow/ROADMAP.md`, and
14
- `.flow/config.json` should be preserved unless the user explicitly asks to
15
- replace them.
@@ -1,27 +0,0 @@
1
- # Init Scaffold Contract — What Must Be Created
2
-
3
- Create the runtime skeleton:
4
-
5
- - `.flow/specs/`
6
- - `.flow/_epics/`
7
- - `.flow/checkpoints/`
8
- - `.flow/threads/`
9
- - `.flow/seeds/`
10
-
11
- Render the canonical scaffold files from `${CLAUDE_PLUGIN_ROOT}/templates/`:
12
-
13
- - `templates/PROJECT.md.tmpl` -> `.flow/PROJECT.md`
14
- - `templates/CONTEXT.md.tmpl` -> `.flow/CONTEXT.md`
15
- - `templates/STATE.md.tmpl` -> `.flow/STATE.md`
16
- - `templates/ROADMAP.md.tmpl` -> `.flow/ROADMAP.md`
17
- - `templates/config.json.tmpl` -> `.flow/config.json`
18
-
19
- Populate placeholders with:
20
-
21
- - `{{PROJECT_NAME}}` from the current directory name unless the user gave a
22
- better project label
23
- - `{{CREATED_DATE}}` from the current date
24
- - `{{USER_NAME}}` from git config when available
25
-
26
- Create missing scaffold files. Do not overwrite user-edited canonical files
27
- unless the user explicitly asks for a reset.
@@ -1,82 +0,0 @@
1
- ---
2
- name: review
3
- description: Run two-stage review with optional adversarial, edge-case, and DevEx passes.
4
- when_to_use: Use when implementation exists and the user wants review findings, spec-compliance checks, adversarial review, edge-case hunting, or a DevEx audit.
5
- argument-hint: "[--stage=<1|2|both>] [--adversarial] [--edge-case] [--devex]"
6
- disable-model-invocation: true
7
- allowed-tools: [Read, Bash, Agent, Grep, Glob]
8
- ---
9
-
10
- # Two-Stage Code Review
11
-
12
- Distinct from `/curdx-flow:verify`:
13
-
14
- - `verify` checks whether the spec's user-visible goals work
15
- - `review` checks whether the implementation is correct, aligned, and maintainable
16
-
17
- Keep this entrypoint focused on review routing, pass selection, and final
18
- report handoff.
19
-
20
- When this skill is used for follow-up work after prior review comments, apply
21
- `@${CLAUDE_PLUGIN_ROOT}/knowledge/review-feedback-intake.md` first so accepted
22
- fixes and technical pushback are recorded in `.progress.md`.
23
-
24
- Detailed review protocols live in:
25
-
26
- - `references/preflight.md`
27
- - `references/stage-execution.md`
28
- - `references/optional-passes.md`
29
- - `references/report-contract.md`
30
- - `references/reporting.md`
31
-
32
- ## Flags
33
-
34
- | Flag | Default | Purpose |
35
- |------|---------|---------|
36
- | `--stage=<1\|2\|both>` | `both` | Stage 1 = spec compliance only. Stage 2 = code quality only. `both` = sequential. |
37
- | `--adversarial` | off (`enterprise` -> on) | Add an adversarial review pass across applicable categories. |
38
- | `--edge-case` | off (`enterprise` -> on) | Add edge-case hunting across applicable categories. Produces a test-gap checklist. |
39
- | `--devex` | off (`enterprise` -> on) | Add the DevEx audit for naming, comments, structure, error handling, setup, types, tests, and developer loop. |
40
-
41
- ## Preflight
42
-
43
- Use `references/preflight.md` for:
44
-
45
- - `.flow/` and active-spec checks
46
- - required artifact checks
47
- - mode-aware `--stage`, `--adversarial`, `--edge-case`, and `--devex`
48
- normalization
49
-
50
- ## Stage Execution
51
-
52
- Stage responsibilities, reviewer prompts, and pass/fail expectations live in
53
- `references/stage-execution.md`.
54
-
55
- - Stage 1 -> `flow-reviewer` in spec-compliance mode
56
- - Stage 2 -> `flow-reviewer` in code-quality mode
57
-
58
- Optional adversarial, edge-case, and DevEx extensions live in
59
- `references/optional-passes.md`.
60
-
61
- ## Report Contract
62
-
63
- Landing checks, report shape, and final status output live in
64
- `references/report-contract.md`.
65
-
66
- The report lands at:
67
-
68
- - `.flow/specs/$SPEC_NAME/review-report.md`
69
-
70
- ## Reporting
71
-
72
- Use `references/reporting.md` for the final summary and rerun handoff.
73
-
74
- ## References
75
-
76
- - `flow-reviewer` agent: `@${CLAUDE_PLUGIN_ROOT}/agents/flow-reviewer.md`
77
- - `flow-adversary` agent: `@${CLAUDE_PLUGIN_ROOT}/agents/flow-adversary.md`
78
- - `flow-edge-hunter` agent: `@${CLAUDE_PLUGIN_ROOT}/agents/flow-edge-hunter.md`
79
- - `adversarial-review-gate`: `@${CLAUDE_PLUGIN_ROOT}/gates/adversarial-review-gate.md`
80
- - `edge-case-gate`: `@${CLAUDE_PLUGIN_ROOT}/gates/edge-case-gate.md`
81
- - `devex-gate`: `@${CLAUDE_PLUGIN_ROOT}/gates/devex-gate.md`
82
- - Knowledge: `@${CLAUDE_PLUGIN_ROOT}/knowledge/two-stage-review.md`
@@ -1,48 +0,0 @@
1
- # Optional Passes — Adversarial, Edge Cases, DevEx
2
-
3
- ## Adversarial Review
4
-
5
- If `FLAG_ADV=1` after preflight normalization, dispatch `flow-adversary`
6
- across applicable categories:
7
-
8
- 1. What's missing?
9
- 2. What's overengineered?
10
- 3. What breaks first in production?
11
- 4. What would a new maintainer misunderstand?
12
- 5. What choice locks out a future option?
13
- 6. What would a skeptical reviewer reject?
14
-
15
- Zero findings still requires proof-of-checking.
16
-
17
- ## Edge-Case Hunting
18
-
19
- If `FLAG_EDGE=1` after preflight normalization, dispatch `flow-edge-hunter`
20
- across:
21
-
22
- 1. boundary values
23
- 2. concurrency and races
24
- 3. network or partial failure
25
- 4. malformed input
26
- 5. auth and permission failure
27
- 6. resource exhaustion
28
- 7. time, locale, and timezone
29
-
30
- Output: a test-gap checklist.
31
-
32
- ## DevEx Audit
33
-
34
- If `FLAG_DEVEX=1` after preflight normalization, inject
35
- `@${CLAUDE_PLUGIN_ROOT}/gates/devex-gate.md` into `flow-reviewer` so Stage 2
36
- also evaluates:
37
-
38
- 1. naming
39
- 2. comments
40
- 3. structure
41
- 4. error handling
42
- 5. setup
43
- 6. types
44
- 7. tests
45
- 8. developer loop
46
-
47
- Do not fork a separate custom reviewer for DevEx; keep `flow-reviewer` generic
48
- and extend it with the gate file.
@@ -1,38 +0,0 @@
1
- # Review Preflight — Resolve Scope and Flags
2
-
3
- Before dispatching any reviewer:
4
-
5
- ```bash
6
- [ ! -d ".flow" ] && { echo "✗ Not a CurdX-Flow project."; exit 1; }
7
-
8
- SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
9
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec."; exit 1; }
10
-
11
- SPEC_STATE=".flow/specs/$SPEC_NAME/.state.json"
12
- SPEC_MODE=$(grep -oP '"mode"\\s*:\\s*"\\K[^"]+' "$SPEC_STATE" 2>/dev/null || echo "standard")
13
-
14
- for f in design.md; do
15
- [ ! -f ".flow/specs/$SPEC_NAME/$f" ] && {
16
- echo "✗ Missing $f. Run /curdx-flow:spec first.";
17
- exit 1;
18
- }
19
- done
20
-
21
- FLAG_STAGE=$(echo "$ARGUMENTS" | grep -oP -- '--stage=\K[^\s]+' || echo "both")
22
- FLAG_ADV=$(echo "$ARGUMENTS" | grep -q -- '--adversarial' && echo 1 || echo 0)
23
- FLAG_EDGE=$(echo "$ARGUMENTS" | grep -q -- '--edge-case' && echo 1 || echo 0)
24
- FLAG_DEVEX=$(echo "$ARGUMENTS" | grep -q -- '--devex' && echo 1 || echo 0)
25
-
26
- if [ "$SPEC_MODE" = "enterprise" ]; then
27
- FLAG_ADV=1
28
- FLAG_EDGE=1
29
- FLAG_DEVEX=1
30
- fi
31
- ```
32
-
33
- The entrypoint should resolve flags once, then route all review passes from
34
- that normalized configuration rather than reparsing later.
35
-
36
- `enterprise` mode auto-enables adversarial, edge-case, and DevEx review even
37
- when the user does not pass those flags explicitly. Manual flags still force
38
- the same behavior in non-enterprise modes.
@@ -1,49 +0,0 @@
1
- # Report Contract — Landing, Shape, Verdict
2
-
3
- ## Landing Check
4
-
5
- Sub-agent responses can truncate before the report is written. After dispatching
6
- review agents, verify the report actually landed:
7
-
8
- ```bash
9
- REPORT=".flow/specs/$SPEC_NAME/review-report.md"
10
- if [ ! -f "$REPORT" ] || [ "$(wc -c < "$REPORT" 2>/dev/null | tr -d ' ')" -lt 300 ]; then
11
- echo "⚠ Report missing or truncated. Re-dispatching flow-reviewer with a terse 'Write the report now, no narration' prompt."
12
- fi
13
- ```
14
-
15
- ## Report Shape
16
-
17
- ```markdown
18
- # Review Report — <spec-name>
19
-
20
- ## Stage 1 — Spec Compliance
21
- ...
22
-
23
- ## Stage 2 — Code Quality
24
- ...
25
-
26
- ## Adversarial (if run)
27
- ...
28
-
29
- ## Edge Cases (if run)
30
- ...
31
-
32
- ## DevEx (if run)
33
- ...
34
-
35
- ## Verdict
36
- - [ ] APPROVED
37
- - [X] CHANGES REQUIRED — <n> blockers
38
- - [ ] REJECTED
39
- ```
40
-
41
- ## Final Output
42
-
43
- Summarize:
44
-
45
- - Stage 1 finding count
46
- - Stage 2 finding count
47
- - optional pass finding counts
48
- - final verdict
49
- - report path
@@ -1,20 +0,0 @@
1
- # Review Reporting — Final Summary and Rerun Handoff
2
-
3
- End with a compact review summary:
4
-
5
- ```text
6
- ✓ Review complete
7
- Stage 1 findings: <n>
8
- Stage 2 findings: <n>
9
- Adversarial findings: <n> (if adversarial pass ran)
10
- Edge-case gaps: <n> (if edge-case pass ran)
11
- DevEx findings: <n> (if DevEx audit ran)
12
- Verdict: CHANGES REQUIRED
13
-
14
- Report: .flow/specs/<name>/review-report.md
15
-
16
- Next: address blockers, then re-run /curdx-flow:review.
17
- ```
18
-
19
- Keep the response outcome-focused. The report file is the artifact; the closing
20
- message only confirms counts, verdict, path, and next action.