@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,16 +0,0 @@
1
- # Epic Handoff — What the User Does Next
2
-
3
- Report:
4
-
5
- - epic name
6
- - slice count
7
- - suggested slice order
8
-
9
- Then route the user to a concrete slice:
10
-
11
- ```text
12
- /curdx-flow:start <epic-name>-<slice-id>
13
- ```
14
-
15
- Do not tell the user to use `/curdx-flow:start --resume <slice-id>`; slice
16
- selection is by explicit spec name.
@@ -1,62 +0,0 @@
1
- ---
2
- name: fast
3
- description: Execute a one-shot small task without creating a spec.
4
- when_to_use: Use when the task is small, surgical, low-ambiguity, and not worth a full spec workflow.
5
- argument-hint: "\"<task description>\""
6
- disable-model-invocation: true
7
- allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent]
8
- ---
9
-
10
- # Flow Fast — Ultra-Fast Execution
11
-
12
- @${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
13
- @${CLAUDE_PLUGIN_ROOT}/knowledge/atomic-commits.md
14
-
15
- Fast is a bypass workflow, not a replacement for the main spec pipeline. Keep
16
- this entrypoint focused on scope gating, lightweight clarification, and the
17
- final execution contract. Detailed fast-mode rules live in:
18
-
19
- - `references/applicability.md`
20
- - `references/clarification.md`
21
- - `references/execution-contract.md`
22
-
23
- ## Arguments
24
-
25
- `$ARGUMENTS` must contain the one-shot task description. If it is empty, stop
26
- with the direct usage hint:
27
-
28
- ```text
29
- /curdx-flow:fast "<task description>"
30
- ```
31
-
32
- ## Applicability
33
-
34
- Use `references/applicability.md` to decide whether the task qualifies for the
35
- fast path.
36
-
37
- - If the change is feature-sized, architecture-heavy, or requirement-driven,
38
- route the user back to `/curdx-flow:start` -> `/curdx-flow:spec`
39
- - If the task stays surgical, continue with the fast contract
40
-
41
- ## Clarification
42
-
43
- Run the quick clarification flow from `references/clarification.md` before
44
- editing. This path still requires explicit assumptions; "obvious" tasks do not
45
- skip that step.
46
-
47
- ## Execution Contract
48
-
49
- Use `references/execution-contract.md` for:
50
-
51
- - lightweight context loading
52
- - mandatory code/doc lookup before edits
53
- - surgical execution rules
54
- - verification requirements
55
- - atomic commit and final output shape
56
-
57
- ## Boundary
58
-
59
- - `fast` leaves no `.flow/specs/<name>/` audit trail
60
- - use it only when that traceability tradeoff is acceptable
61
- - if the work starts expanding, stop treating it as `fast` and switch to the
62
- main workflow
@@ -1,25 +0,0 @@
1
- # Fast Applicability — When to Use and When to Abort
2
-
3
- ## Good Fit
4
-
5
- - one-shot scripts
6
- - clear small changes
7
- - single-file or tightly bounded edits
8
- - simple bug fixes with low ambiguity
9
-
10
- ## Not a Fit
11
-
12
- - production feature development
13
- - architecture-level or multi-module changes
14
- - user-story or acceptance-criteria driven work
15
- - anything that clearly needs spec artifacts for future traceability
16
-
17
- ## Decision Rule
18
-
19
- If the task no longer looks surgical after initial exploration, stop calling it
20
- `fast` and route back to:
21
-
22
- ```text
23
- /curdx-flow:start <name> "<goal>"
24
- /curdx-flow:spec
25
- ```
@@ -1,20 +0,0 @@
1
- # Fast Clarification — Five Quick Questions
2
-
3
- Even in fast mode, do not skip explicit understanding.
4
-
5
- ## Ask Before Editing
6
-
7
- ```text
8
- Quick understanding (please confirm or amend):
9
-
10
- 1. Task: <restate in your own words>
11
- 2. Files involved: <preliminary assessment>
12
- 3. Expected effect: <success criteria>
13
- 4. Known constraints: <if any>
14
- 5. Assumptions: <list explicitly>
15
-
16
- Any ambiguity? (yes: amend then continue / no: proceed directly)
17
- ```
18
-
19
- Use `AskUserQuestion`. If the user confirms there is no ambiguity, continue
20
- directly to execution.
@@ -1,56 +0,0 @@
1
- # Fast Execution Contract — Lookup, Verify, Commit
2
-
3
- ## Lightweight Context
4
-
5
- ```bash
6
- [ -f "CLAUDE.md" ] && cat CLAUDE.md | head -50
7
- [ -f ".flow/CONTEXT.md" ] && cat .flow/CONTEXT.md | head -30
8
- ```
9
-
10
- Fast mode may run outside a `.flow/` project. Treat `.flow/CONTEXT.md` as
11
- optional.
12
-
13
- ## Mandatory Tool Use
14
-
15
- 1. If a library or API is involved: use Context7
16
- 2. Use Grep/Glob to find the relevant code
17
- 3. Read current files before editing
18
- 4. Apply Karpathy's surgical principles
19
- 5. Run validation commands before committing
20
-
21
- ## Commit Requirement
22
-
23
- Even in fast mode, do not leave changes scattered:
24
-
25
- ```bash
26
- git add <exact files>
27
- git commit -m "<type>(<scope>): <summary>"
28
- ```
29
-
30
- The commit must conform to `atomic-commits.md`.
31
-
32
- ## Output Shape
33
-
34
- ```text
35
- ✓ Fast execution complete
36
-
37
- Changes:
38
- - src/foo.ts (+3 -1)
39
- - src/foo.test.ts (+15)
40
-
41
- Verification:
42
- npm test ✓
43
- tsc --noEmit ✓
44
-
45
- Commit: abc123f — fix(foo): handle null case
46
-
47
- Consider the full flow next time?
48
- /curdx-flow:start <name> "<goal>"
49
- ```
50
-
51
- ## Forbidden
52
-
53
- - committing without verification
54
- - letting the change sprawl across unrelated modules
55
- - writing library APIs from memory
56
- - skipping the clarification step
@@ -1,55 +0,0 @@
1
- ---
2
- name: help
3
- description: Show command detail, workflow guidance, and troubleshooting.
4
- when_to_use: Use when the user asks how CurdX-Flow works, which command to run, what a workflow does, or how to troubleshoot common issues.
5
- argument-hint: "[<command-name> | workflow | troubleshoot]"
6
- disable-model-invocation: true
7
- allowed-tools: [Read, Bash]
8
- ---
9
-
10
- # CurdX-Flow Help
11
-
12
- Keep this skill focused on menuing and discovery. The canonical quick-overview,
13
- workflow, and troubleshooting payloads live in:
14
-
15
- - `references/dispatch.md`
16
- - `references/overview.md`
17
- - `references/workflow.md`
18
- - `references/troubleshoot.md`
19
-
20
- ## No Argument — Quick Overview
21
-
22
- Render the compact command/skill/MCP summary from `references/overview.md`.
23
-
24
- ## `<command-name>` — Command Detail
25
-
26
- Plugin skills are namespaced. When guiding users toward specialty skills, refer
27
- to them as `/curdx-flow:<name>`, not bare `/name`. E.g., /curdx-flow:security-audit.
28
- Canonical specialty paths: /curdx-flow:epic, /curdx-flow:browser-qa,
29
- /curdx-flow:ui-sketch, /curdx-flow:security-audit, /curdx-flow:brownfield-index.
30
-
31
- Use `references/dispatch.md` for:
32
-
33
- - `<command-name>` lookup against the shipped `skills/` layout
34
- - unknown-command fallback text
35
- - zero-argument usage guidance for detail mode
36
-
37
- The canonical shipped lookup path is:
38
-
39
- ```text
40
- ${CLAUDE_PLUGIN_ROOT}/skills/${CMD}/SKILL.md
41
- ```
42
-
43
- ## `workflow` — Standard Workflow
44
-
45
- Render the standard workflow from `references/workflow.md`.
46
-
47
- ## `troubleshoot` — Common Issues
48
-
49
- Render the troubleshooting guide from `references/troubleshoot.md`.
50
-
51
- ## Output Principles
52
-
53
- - Keep it compact. Use tables and lists, not prose.
54
- - Always point at a concrete next action, not "see the docs".
55
- - Version number should come from `cli/utils.js` dynamic read, not hard-coded.
@@ -1,20 +0,0 @@
1
- # Help Dispatch — Command Detail Routing
2
-
3
- When `$ARGUMENTS` is a command or skill name, resolve it from the shipped
4
- plugin layout:
5
-
6
- ```bash
7
- CMD="$ARGUMENTS"
8
- [ -z "$CMD" ] && { echo "Usage: /curdx-flow:help <name>"; exit 1; }
9
- if [ -f "${CLAUDE_PLUGIN_ROOT}/skills/${CMD}/SKILL.md" ]; then
10
- cat "${CLAUDE_PLUGIN_ROOT}/skills/${CMD}/SKILL.md"
11
- else
12
- echo "Unknown: ${CMD}"
13
- echo "Workflows: init start status spec implement cancel verify review fast debug help"
14
- echo "Skills: epic browser-qa ui-sketch security-audit brownfield-index"
15
- exit 1
16
- fi
17
- ```
18
-
19
- This lookup must stay inside `${CLAUDE_PLUGIN_ROOT}/skills/`. Do not fall back
20
- to any removed `commands/` layout or plugin-cache globbing.
@@ -1,39 +0,0 @@
1
- # Help Overview — Quick Surface Summary
2
-
3
- ```text
4
- 🚀 CurdX-Flow v2 — Claude Code Discipline Layer
5
-
6
- 11 slash commands (explicit control)
7
- ────────────────────────────────────
8
- /curdx-flow:init Initialize the .flow scaffold for the current repository.
9
- /curdx-flow:start Create, resume, list, or switch the active feature spec.
10
- /curdx-flow:status Show active spec health, progress, artifacts, and recovery hints.
11
- /curdx-flow:spec Generate or refresh research, requirements, design, and tasks for the active spec.
12
- /curdx-flow:implement Execute active-spec tasks with strategy routing and atomic progress.
13
- /curdx-flow:cancel Cancel the active execution loop or delete a spec with explicit confirmation.
14
- /curdx-flow:verify Verify the active spec against code, tests, and browser evidence.
15
- /curdx-flow:review Run two-stage review with optional adversarial, edge-case, and DevEx passes.
16
- /curdx-flow:fast Execute a one-shot small task without creating a spec.
17
- /curdx-flow:debug Debug a bug or failing test with the root-cause workflow.
18
- /curdx-flow:help Show command detail, workflow guidance, and troubleshooting.
19
-
20
- 5 skills (auto-invoked by Claude based on context)
21
- ────────────────────────────────────
22
- /curdx-flow:epic Decompose a large feature into vertical-slice sub-specs
23
- /curdx-flow:browser-qa Real-browser test via chrome-devtools MCP
24
- /curdx-flow:ui-sketch Generate UI design variants (via frontend-design skill)
25
- /curdx-flow:security-audit OWASP + STRIDE + CVE scan
26
- /curdx-flow:brownfield-index Map an unfamiliar / inherited codebase
27
-
28
- 3 MCP servers auto-installed
29
- ────────────────────────────────────
30
- context7 Latest library docs
31
- sequential-thinking Structured reasoning
32
- chrome-devtools Browser automation
33
-
34
- Usage:
35
- /curdx-flow:help <command> Detail for one command
36
- /curdx-flow:help workflow Standard workflow walkthrough
37
- /curdx-flow:help troubleshoot Common problems
38
- /curdx-flow:review --devex Add the DevEx lens to review
39
- ```
@@ -1,47 +0,0 @@
1
- # Help Troubleshoot — Common Issues
2
-
3
- ```text
4
- 🛠️ Common issues
5
-
6
- Q: After install, /curdx-flow:* commands are not found.
7
- A: Restart Claude Code. The plugin needs a fresh session to register.
8
-
9
- Q: MCP servers not starting?
10
- A: Check Node >= 18: node --version
11
- Check MCPs: claude mcp list
12
- Health overall: npx @curdx/flow doctor
13
-
14
- Q: GitHub slow / blocked during install?
15
- A: v1.1.5+ defaults to offline install (bundled plugin body).
16
- Force-offline: npx @curdx/flow install --no-deps
17
- Force-online: npx @curdx/flow install --online
18
-
19
- Q: claude-mem MCP keeps failing?
20
- A: It needs bun. Run: npx @curdx/flow doctor
21
- If doctor reports bun/uv is installed but not on PATH, run:
22
- npx @curdx/flow doctor --fix
23
-
24
- Q: /curdx-flow:init says .flow/ already exists?
25
- A: Use --force, or run /curdx-flow:start directly to begin a new spec in the existing .flow/.
26
-
27
- Q: Skills don't auto-invoke reliably?
28
- A: Invoke explicitly — plugin skills are namespaced. E.g., /curdx-flow:security-audit.
29
-
30
- Q: I want the old v1 commands (research, plan-ceo, party…).
31
- A: They're removed in v2. Use /curdx-flow:help workflow for the current paths, or stay on 1.x:
32
- npm i -g @curdx/flow@^1.1
33
-
34
- Q: Too many gates blocking progress?
35
- A: Your spec mode decides gate strictness. Lower via:
36
- /curdx-flow:start <name> "<goal>" --mode=fast
37
-
38
- Q: Where are decisions logged?
39
- A: .flow/STATE.md (D-NN entries). Edit directly — no slash command needed.
40
-
41
- Q: Stop-hook or execution loop seems stuck?
42
- A: Run /curdx-flow:status. If state/tasks disagree, run /curdx-flow:cancel, then resume with:
43
- /curdx-flow:implement --strategy=subagent
44
-
45
- Q: File a bug / request feature
46
- A: https://github.com/curdx/curdx-flow/issues
47
- ```
@@ -1,37 +0,0 @@
1
- # Help Workflow — Canonical Main Loop
2
-
3
- ```text
4
- 📐 CurdX-Flow v2 Standard Workflow
5
-
6
- 1. One-time setup (outside Claude Code)
7
- └─ npx @curdx/flow install --all
8
-
9
- 2. Per project (in Claude Code)
10
- └─ /curdx-flow:init
11
-
12
- 3. Per feature — the main loop
13
- ├─ /curdx-flow:start my-feature "one-line goal"
14
- ├─ /curdx-flow:status ← optional: see active spec + recovery hints
15
- ├─ /curdx-flow:spec ← research → requirements → design → tasks
16
- ├─ (optional) /curdx-flow:spec --review ← add multi-dim planning review
17
- ├─ /curdx-flow:implement ← execute tasks
18
- ├─ /curdx-flow:verify ← goal-backward check
19
- └─ /curdx-flow:review ← code review
20
-
21
- 4. Evidence-backed handoff
22
- └─ verification-report.md + review-report.md + atomic commits → human PR/release work
23
-
24
- 5. Big feature (breaks into multiple specs)
25
- └─ Say "this feature is too big, break it down" → epic skill auto-invokes
26
-
27
- 6. One-off task (skip the spec)
28
- └─ /curdx-flow:fast "rename foo to bar in src/"
29
-
30
- 7. Stuck on a bug
31
- └─ /curdx-flow:debug "tests fail intermittently after 3rd run"
32
-
33
- Modes (set via /curdx-flow:start --mode=...)
34
- fast One-off task paths
35
- standard Default — spec + gates + review
36
- enterprise Standard + adversarial + edge-case + devex + security-audit
37
- ```
@@ -1,96 +0,0 @@
1
- ---
2
- name: implement
3
- description: Execute active-spec tasks with strategy routing and atomic progress.
4
- when_to_use: Use when the active spec already has tasks and the user wants execution, optionally with a chosen strategy or a single task id.
5
- argument-hint: "[spec-name] [--strategy=auto|linear|subagent|stop-hook|wave] [--task=<id>] [--quick]"
6
- disable-model-invocation: true
7
- allowed-tools: [Read, Write, Edit, Bash, Agent, Grep, Glob]
8
- ---
9
-
10
- # Flow Implement — Execute Spec
11
-
12
- @${CLAUDE_PLUGIN_ROOT}/knowledge/execution-strategies.md
13
- @${CLAUDE_PLUGIN_ROOT}/knowledge/atomic-commits.md
14
-
15
- This skill is the execution orchestrator. Keep the entrypoint focused on
16
- preflight, routing, state updates, and stop conditions; load supporting files
17
- for strategy-specific protocols:
18
-
19
- - `references/preflight.md`
20
- - `references/strategy-router.md`
21
- - `references/state-init.md`
22
- - `references/linear-execution.md`
23
- - `references/subagent-execution.md`
24
- - `references/wave-execution.md`
25
- - `references/stop-hook-execution.md`
26
- - `references/progress-contract.md`
27
- - `references/error-recovery.md`
28
-
29
- ## Arguments
30
-
31
- `$ARGUMENTS` may include:
32
-
33
- - `[spec-name]`
34
- - `--strategy=auto|linear|subagent|stop-hook|wave`
35
- - `--task=<id>`
36
- - `--quick`
37
-
38
- ## Preflight and Task Stats
39
-
40
- Use `references/preflight.md` for:
41
-
42
- - `.flow/` and active-spec resolution
43
- - argument parsing
44
- - `tasks.md` presence checks
45
- - `TOTAL`, `DONE`, `REMAINING`, `PARALLEL`, and `SEQUENTIAL` extraction
46
-
47
- ## Strategy Routing
48
-
49
- Use `references/strategy-router.md` for the full decision tree and routing
50
- signals. The runtime selector is:
51
-
52
- ## Execute State Init
53
-
54
- Use `references/state-init.md` before dispatching any execution protocol.
55
-
56
- ## Run the Selected Execution Protocol
57
-
58
- - `linear`: stay inline in the main agent and execute the first unchecked task
59
- to completion. Full task loop: `references/linear-execution.md`
60
- - `subagent`: dispatch one isolated `flow-executor` at a time. Full prompt
61
- contract: `references/subagent-execution.md`
62
- - `wave`: dispatch multiple Agent calls in parallel within a single response;
63
- the serial/parallel boundaries and conflict rules live in
64
- `references/wave-execution.md`
65
- - `stop-hook`: run one task per round and let the stop watcher decide whether
66
- to continue. Full continuation contract:
67
- `references/stop-hook-execution.md`
68
-
69
- If `STRATEGY` is not one of `linear`, `subagent`, `wave`, `stop-hook`, stop
70
- immediately rather than guessing.
71
-
72
- For `subagent` and `wave`, after the agent completes, read the output marker
73
- defined by the supporting file before mutating state or advancing the task
74
- cursor.
75
-
76
- ## Progress and Completion Contract
77
-
78
- Use `references/progress-contract.md` for both in-flight progress output and
79
- the execute-complete summary. Do not claim the feature is shipped from execute
80
- alone. The primary handoff remains:
81
-
82
- - `/curdx-flow:verify` for goal-backward evidence
83
- - `/curdx-flow:review` for code-quality findings after verification
84
-
85
- ## Recovery Rules and Stop Conditions
86
-
87
- All retry, fix-task, and stop thresholds are centralized in
88
- `references/error-recovery.md`.
89
-
90
- The stop invariant is strict:
91
-
92
- - Never skip a failed task implicitly
93
- - Never continue after git-state corruption
94
- - Stop after 3 consecutive `TASK_FAILED`
95
- - If `.state.json` says complete but `tasks.md` still has unchecked tasks, trust
96
- `tasks.md` and continue only the unchecked work
@@ -1,36 +0,0 @@
1
- # Error Recovery — Failure Policy
2
-
3
- All implement strategies use the same recovery ledger and stop thresholds.
4
-
5
- ## Failure Rules
6
-
7
- - `Verify` field is `manual` or malformed -> stop and suggest
8
- `/curdx-flow:spec --phase=tasks --regenerate`
9
- - `TASK_FAILED` with `recovery_mode: manual` -> do not skip the task; root-cause
10
- it, then retry the first unchecked task
11
- - `TASK_FAILED` with `recovery_mode: fix-task` -> insert one targeted
12
- `[FIX <task_id>]` task immediately after the failed task, update
13
- `execute_state.fix_task_map`, execute that fix task, then retry the original
14
- task
15
- - Never exceed `max_fix_tasks_per_original`
16
- - 3 consecutive `TASK_FAILED` -> stop and require user intervention
17
- - Git operation failure -> stop immediately to avoid state corruption
18
- - Missing local test framework -> stop and suggest `npx @curdx/flow doctor`
19
- - State says complete but `tasks.md` still has unchecked tasks -> trust
20
- `tasks.md`
21
-
22
- ## Fix-Task Recovery Format
23
-
24
- Generated repair tasks must stay narrow and traceable:
25
-
26
- ```markdown
27
- - [ ] **<task_id>.<n>** [FIX <task_id>] Fix: <short root cause>
28
- - **Do**: <specific repair steps>
29
- - **Files**: <same declared files or narrower>
30
- - **Done when**: Original failure no longer reproduces
31
- - **Verify**: <original verify command or tighter reproduction>
32
- - **Commit**: `fix(<scope>): address <failure>`
33
- ```
34
-
35
- Do not execute a newly generated fix task until both `tasks.md` and
36
- `fix_task_map` have been updated. The ledger must move ahead of execution.
@@ -1,32 +0,0 @@
1
- # Linear Execution — Inline Task Loop
2
-
3
- Use this mode when the backlog is small, heavily sequential, or the operator
4
- needs maximum visibility in the main session.
5
-
6
- ## Main Loop
7
-
8
- ```text
9
- for task in remaining tasks:
10
- read task fields (Do / Files / Done when / Verify / Commit)
11
- execute the task inline in the current session
12
- run the task's Verify command
13
- make the atomic commit declared by the task
14
- mark the task [x] in tasks.md
15
- append the outcome to .progress.md
16
- print "✓ Task X.Y complete"
17
- ```
18
-
19
- ## Execution Rules
20
-
21
- - Follow the `flow-executor` contract even though you stay inline
22
- - Respect the declared `Files` scope; do not quietly expand task boundaries
23
- - Verification must pass before the task can be marked complete
24
- - One task, one atomic commit
25
- - If the task is too broad or unsafe, stop and surface `TASK_FAILED` semantics
26
- instead of improvising extra subtasks
27
-
28
- ## Stop Conditions
29
-
30
- - Any git operation failure: stop immediately
31
- - Missing or invalid Verify command: stop and ask for a task regeneration
32
- - 3 consecutive `TASK_FAILED`: stop and require intervention
@@ -1,43 +0,0 @@
1
- # Implement Preflight — Resolve Scope and Task Stats
2
-
3
- Before selecting a strategy:
4
-
5
- ```bash
6
- [ ! -d ".flow" ] && { echo "✗ Not a CurdX-Flow project. Run /curdx-flow:init first"; exit 1; }
7
-
8
- ARGS="$ARGUMENTS"
9
- SPEC_NAME=""
10
- STRATEGY="auto"
11
- TASK_ID=""
12
- QUICK=0
13
-
14
- for arg in $ARGS; do
15
- case "$arg" in
16
- --strategy=*) STRATEGY="${arg#--strategy=}" ;;
17
- --task=*) TASK_ID="${arg#--task=}" ;;
18
- --quick) QUICK=1 ;;
19
- --*) ;;
20
- *) SPEC_NAME="$arg" ;;
21
- esac
22
- done
23
-
24
- [ -z "$SPEC_NAME" ] && SPEC_NAME=$(cat .flow/.active-spec 2>/dev/null)
25
- [ -z "$SPEC_NAME" ] && { echo "✗ No active spec. Run /curdx-flow:start first"; exit 1; }
26
-
27
- DIR=".flow/specs/$SPEC_NAME"
28
- [ ! -f "$DIR/tasks.md" ] && { echo "✗ Missing tasks.md. Run /curdx-flow:spec first (or /curdx-flow:spec --phase=tasks to rebuild just the tasks phase)"; exit 1; }
29
-
30
- TOTAL=$(grep -Ec "^- \[[ xX]\] \*\*" "$DIR/tasks.md")
31
- DONE=$(grep -Ec "^- \[[xX]\] \*\*" "$DIR/tasks.md")
32
- REMAINING=$((TOTAL - DONE))
33
- PARALLEL=$(grep -c "^- \[ \] \*\*.*\[P\]" "$DIR/tasks.md")
34
- SEQUENTIAL=$(grep -c "^- \[ \] \*\*.*\[SEQUENTIAL\]" "$DIR/tasks.md")
35
- ```
36
-
37
- These counters are part of the runtime contract:
38
-
39
- - `TOTAL` = all declared task rows
40
- - `DONE` = checked task rows
41
- - `REMAINING` = `TOTAL - DONE`
42
- - `PARALLEL` = unchecked `[P]` tasks
43
- - `SEQUENTIAL` = unchecked `[SEQUENTIAL]` tasks
@@ -1,32 +0,0 @@
1
- # Implement Progress Contract — Mid-Run and Completion Output
2
-
3
- At each wave boundary, retry, or long linear stretch, print:
4
-
5
- ```text
6
- ═════ Progress ═════
7
- Spec: $SPEC_NAME
8
- Strategy: $STRATEGY
9
- Done: X / $TOTAL
10
- Recent commits:
11
- - abc123f feat(auth): ...
12
- - def456g test(auth): ...
13
- ════════════════════
14
- ```
15
-
16
- When all tasks are complete:
17
-
18
- ```text
19
- ✓ execute phase complete: $SPEC_NAME
20
-
21
- Strategy: $STRATEGY
22
- Tasks done: N / N
23
- Commits: M atomic commits
24
- Verify passed: K / K
25
-
26
- Next steps:
27
- - /curdx-flow:verify — goal-driven reverse verification
28
- - /curdx-flow:review — two-stage code review after verification
29
- ```
30
-
31
- Do not claim the feature is shipped from execute alone. Execute completes
32
- tasks; verify proves user-visible goals; review checks implementation quality.
@@ -1,33 +0,0 @@
1
- # Implement State Init — Seed execute_state Before Running
2
-
3
- After strategy selection and before execution begins:
4
-
5
- ```python
6
- import json
7
- p = f'.flow/specs/{SPEC_NAME}/.state.json'
8
- s = json.load(open(p))
9
- try:
10
- cfg = json.load(open('.flow/config.json'))
11
- except Exception:
12
- cfg = {}
13
- execution_cfg = cfg.get('execution', {}) if isinstance(cfg, dict) else {}
14
- recovery_mode = execution_cfg.get('recovery_mode', 'manual')
15
- max_fix_tasks = execution_cfg.get('max_fix_tasks_per_original', 2)
16
- s['phase'] = 'execute'
17
- s['strategy'] = STRATEGY
18
- s.setdefault('phase_status', {})['execute'] = 'in_progress'
19
- s.setdefault('execute_state', {})
20
- s['execute_state'].setdefault('task_index', DONE)
21
- s['execute_state']['total_tasks'] = TOTAL
22
- s['execute_state'].setdefault('failed_attempts', 0)
23
- s['execute_state'].setdefault('global_iteration', 1)
24
- s['execute_state'].setdefault('recovery_mode', recovery_mode)
25
- s['execute_state'].setdefault('max_fix_tasks_per_original', max_fix_tasks)
26
- s['execute_state'].setdefault('fix_task_map', {})
27
- if QUICK:
28
- s['quickMode'] = True
29
- json.dump(s, open(p, 'w'), indent=2, ensure_ascii=False)
30
- ```
31
-
32
- The execute-state ledger must be initialized before any task dispatch so hooks,
33
- recovery, and status views observe the same state transition.