@curdx/flow 2.2.3 → 2.2.5

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 (126) hide show
  1. package/.claude-plugin/marketplace.json +3 -2
  2. package/.claude-plugin/plugin.json +2 -1
  3. package/CHANGELOG.md +4 -566
  4. package/README.md +47 -113
  5. package/agents/flow-adversary.md +1 -0
  6. package/agents/flow-architect.md +9 -36
  7. package/agents/flow-brownfield-analyst.md +7 -18
  8. package/agents/flow-debugger.md +1 -0
  9. package/agents/flow-edge-hunter.md +1 -0
  10. package/agents/flow-executor.md +1 -0
  11. package/agents/flow-planner.md +11 -37
  12. package/agents/flow-product-designer.md +9 -41
  13. package/agents/flow-qa-engineer.md +1 -0
  14. package/agents/flow-researcher.md +9 -45
  15. package/agents/flow-reviewer.md +1 -0
  16. package/agents/flow-security-auditor.md +1 -0
  17. package/agents/flow-triage-analyst.md +1 -0
  18. package/agents/flow-ui-researcher.md +1 -0
  19. package/agents/flow-ux-designer.md +1 -0
  20. package/agents/flow-verifier.md +1 -0
  21. package/cli/doctor-workflow.js +5 -914
  22. package/cli/install-companions.js +8 -8
  23. package/cli/lib/doctor-claude-settings.js +736 -0
  24. package/cli/lib/doctor-runtime-environment.js +196 -0
  25. package/cli/lib/semver.js +14 -0
  26. package/cli/uninstall-actions.js +323 -0
  27. package/cli/uninstall.js +9 -253
  28. package/gates/coverage-audit-gate.md +1 -3
  29. package/gates/tdd-gate.md +0 -6
  30. package/gates/verification-gate.md +1 -5
  31. package/knowledge/artifact-output-discipline.md +24 -0
  32. package/knowledge/artifact-summary-contracts.md +50 -0
  33. package/knowledge/execution-strategies.md +6 -4
  34. package/knowledge/poc-first-workflow.md +2 -6
  35. package/knowledge/spec-driven-development.md +0 -4
  36. package/knowledge/systematic-debugging.md +0 -6
  37. package/knowledge/two-stage-review.md +8 -6
  38. package/knowledge/wave-execution.md +2 -1
  39. package/package.json +2 -2
  40. package/schemas/agent-frontmatter.schema.json +4 -0
  41. package/skills/brownfield-index/SKILL.md +14 -20
  42. package/skills/brownfield-index/references/applicability.md +12 -0
  43. package/skills/brownfield-index/references/handoff.md +8 -0
  44. package/skills/brownfield-index/references/index-contract.md +10 -0
  45. package/skills/browser-qa/SKILL.md +15 -35
  46. package/skills/browser-qa/references/handoff.md +6 -0
  47. package/skills/browser-qa/references/prerequisites.md +10 -0
  48. package/skills/browser-qa/references/qa-contract.md +20 -0
  49. package/skills/cancel/SKILL.md +20 -61
  50. package/skills/cancel/references/destructive-mode.md +17 -0
  51. package/skills/cancel/references/reporting.md +18 -0
  52. package/skills/cancel/references/state-recovery.md +30 -0
  53. package/skills/cancel/references/target-resolution.md +7 -0
  54. package/skills/debug/SKILL.md +23 -87
  55. package/skills/debug/references/context-gathering.md +11 -0
  56. package/skills/debug/references/failure-guard.md +25 -0
  57. package/skills/debug/references/intake.md +12 -0
  58. package/skills/debug/references/phase-workflow.md +34 -0
  59. package/skills/debug/references/reporting.md +20 -0
  60. package/skills/epic/SKILL.md +18 -50
  61. package/skills/epic/references/epic-artifacts.md +20 -0
  62. package/skills/epic/references/epic-intake.md +9 -0
  63. package/skills/epic/references/slice-handoff.md +16 -0
  64. package/skills/fast/SKILL.md +34 -102
  65. package/skills/fast/references/applicability.md +25 -0
  66. package/skills/fast/references/clarification.md +20 -0
  67. package/skills/fast/references/execution-contract.md +56 -0
  68. package/skills/help/SKILL.md +26 -132
  69. package/skills/help/references/dispatch.md +20 -0
  70. package/skills/help/references/overview.md +39 -0
  71. package/skills/help/references/troubleshoot.md +47 -0
  72. package/skills/help/references/workflow.md +37 -0
  73. package/skills/implement/SKILL.md +61 -237
  74. package/skills/implement/references/error-recovery.md +36 -0
  75. package/skills/implement/references/linear-execution.md +32 -0
  76. package/skills/implement/references/preflight.md +43 -0
  77. package/skills/implement/references/progress-contract.md +32 -0
  78. package/skills/implement/references/state-init.md +33 -0
  79. package/skills/implement/references/stop-hook-execution.md +36 -0
  80. package/skills/implement/references/strategy-router.md +38 -0
  81. package/skills/implement/references/subagent-execution.md +43 -0
  82. package/skills/init/SKILL.md +26 -95
  83. package/skills/init/references/gitignore-and-health.md +26 -0
  84. package/skills/init/references/next-steps.md +22 -0
  85. package/skills/init/references/preflight.md +15 -0
  86. package/skills/init/references/scaffold-contract.md +27 -0
  87. package/skills/review/SKILL.md +45 -153
  88. package/skills/review/references/optional-passes.md +48 -0
  89. package/skills/review/references/preflight.md +38 -0
  90. package/skills/review/references/report-contract.md +49 -0
  91. package/skills/review/references/reporting.md +20 -0
  92. package/skills/review/references/stage-execution.md +32 -0
  93. package/skills/security-audit/SKILL.md +16 -34
  94. package/skills/security-audit/references/audit-contract.md +21 -0
  95. package/skills/security-audit/references/gate-handoff.md +8 -0
  96. package/skills/security-audit/references/scope-and-depth.md +9 -0
  97. package/skills/spec/SKILL.md +55 -182
  98. package/skills/spec/references/artifact-landing.md +31 -0
  99. package/skills/spec/references/phase-execution.md +50 -0
  100. package/skills/spec/references/planning-review.md +31 -0
  101. package/skills/spec/references/preflight-and-routing.md +46 -0
  102. package/skills/spec/references/reporting.md +21 -0
  103. package/skills/start/SKILL.md +40 -123
  104. package/skills/start/references/branch-routing.md +51 -0
  105. package/skills/start/references/mode-semantics.md +12 -0
  106. package/skills/start/references/preflight.md +13 -0
  107. package/skills/start/references/reporting.md +20 -0
  108. package/skills/start/references/state-seeding.md +44 -0
  109. package/skills/start/references/workflow-handoff.md +26 -0
  110. package/skills/status/SKILL.md +17 -61
  111. package/skills/status/references/gather-contract.md +27 -0
  112. package/skills/status/references/health-rules.md +27 -0
  113. package/skills/status/references/output-contract.md +24 -0
  114. package/skills/status/references/preflight.md +10 -0
  115. package/skills/status/references/recovery-hints.md +18 -0
  116. package/skills/ui-sketch/SKILL.md +15 -34
  117. package/skills/ui-sketch/references/brief-intake.md +10 -0
  118. package/skills/ui-sketch/references/iteration-handoff.md +5 -0
  119. package/skills/ui-sketch/references/variant-contract.md +15 -0
  120. package/skills/verify/SKILL.md +31 -86
  121. package/skills/verify/references/evidence-workflow.md +39 -0
  122. package/skills/verify/references/output-contract.md +23 -0
  123. package/skills/verify/references/preflight.md +11 -0
  124. package/skills/verify/references/report-handoff.md +35 -0
  125. package/skills/verify/references/strict-mode.md +12 -0
  126. package/README.zh.md +0 -160
package/README.md CHANGED
@@ -1,153 +1,87 @@
1
1
  # CurdX-Flow
2
2
 
3
- > **Stop Claude Code from faking "done".**
4
- > Spec-driven workflow + goal-backward verification + Karpathy discipline.
3
+ > Stop Claude Code from faking "done".
4
+ > Spec-driven workflow, goal-backward verification, and Karpathy discipline for real feature delivery.
5
5
 
6
6
  [![npm version](https://img.shields.io/npm/v/@curdx/flow.svg)](https://www.npmjs.com/package/@curdx/flow)
7
7
  [![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
8
- [![Plugin](https://img.shields.io/badge/claude--code-plugin-purple)](https://code.claude.com)
9
- [![Chinese (中文)](https://img.shields.io/badge/docs-Chinese%20(中文)-red)](./README.zh.md)
8
+ [![Plugin](https://img.shields.io/badge/claude--code-plugin-blue)](https://code.claude.com)
10
9
 
11
- ---
10
+ CurdX-Flow is a skill-first Claude Code plugin. The public surface stays small:
11
+ 11 slash commands, 5 auto-invoked skills, 16 internal agents, and a thin set of
12
+ entry docs. The heavy workflow detail lives in `skills/*/references/` and
13
+ `knowledge/`.
12
14
 
13
- ## Why this exists
14
-
15
- Claude Code drifts. It claims features work without running the tests. It uses stale library APIs from its training data. It takes three questions worth of code and squeezes in six.
16
-
17
- CurdX-Flow is a thin **discipline layer** on top of Claude Code that makes non-trivial feature work actually work:
18
-
19
- 1. **A spec workflow** (research → requirements → design → tasks) for features too big to vibe-code.
20
- 2. **Goal-backward verification** that scans your implementation against your own FR / AC / AD and catches stubs, fake completions, and untested acceptance criteria.
21
- 3. **Karpathy's 4 principles** (think-first, simplicity, surgical changes, goal-driven) enforced via always-on hooks and gates.
22
-
23
- Not a framework. Not a methodology library. A discipline layer.
24
-
25
- ## Install (one command)
26
-
27
- Requires Claude Code v2.1.110+ (latest recommended). The installer checks your local `claude` binary and `curdx-flow doctor` warns if the version is too old for modern plugin dependency handling.
15
+ ## Install
28
16
 
29
17
  ```bash
30
18
  npx @curdx/flow install --all
31
19
  ```
32
20
 
33
- This installs the Claude Code plugin (fully offline from the npm package — no GitHub fetch), the official Context7 plugin, the required sequential-thinking MCP server, and four recommended companion plugins (pua, claude-mem, frontend-design, chrome-devtools-mcp).
34
-
35
- **Note:** If you're running this command inside the `curdx-flow` project directory itself, use `npx --ignore-existing @curdx/flow install --all` to avoid npx trying to use the local package without dependencies installed.
21
+ Requires modern Claude Code and Node 18+. The install flow registers the plugin,
22
+ required reasoning/doc tools, and recommended companion plugins. Run
23
+ `npx @curdx/flow doctor` after install if anything looks off.
36
24
 
37
25
  ## 11 slash commands, that's it
38
26
 
39
- ```
40
- /curdx-flow:init Initialize .flow/ in the current project
41
- /curdx-flow:start Create / resume / switch a feature spec
42
- /curdx-flow:status Show state, artifact, and recovery status
43
- /curdx-flow:spec Write or refresh the spec (--phase, --review flags)
44
- /curdx-flow:implement Execute the tasks
45
- /curdx-flow:cancel Cancel active execution without deleting artifacts
46
- /curdx-flow:verify Goal-backward check the moat
47
- /curdx-flow:review Two-stage code review
48
- /curdx-flow:fast Skip spec for one-off tasks
49
- /curdx-flow:debug Systematic 4-stage debugging
50
- /curdx-flow:help Reference
27
+ ```text
28
+ /curdx-flow:init Initialize the .flow scaffold for the current repository.
29
+ /curdx-flow:start Create, resume, list, or switch the active feature spec.
30
+ /curdx-flow:status Show active spec health, progress, artifacts, and recovery hints.
31
+ /curdx-flow:spec Generate or refresh research, requirements, design, and tasks for the active spec.
32
+ /curdx-flow:implement Execute active-spec tasks with strategy routing and atomic progress.
33
+ /curdx-flow:cancel Cancel the active execution loop or delete a spec with explicit confirmation.
34
+ /curdx-flow:verify Verify the active spec against code, tests, and browser evidence.
35
+ /curdx-flow:review Run two-stage review with optional adversarial, edge-case, and DevEx passes.
36
+ /curdx-flow:fast Execute a one-shot small task without creating a spec.
37
+ /curdx-flow:debug Debug a bug or failing test with the root-cause workflow.
38
+ /curdx-flow:help Show command detail, workflow guidance, and troubleshooting.
51
39
  ```
52
40
 
53
- Plus 5 auto-invoked skills (Claude picks them up from context): `epic`, `browser-qa`, `ui-sketch`, `security-audit`, `brownfield-index`.
41
+ Plus 5 auto-invoked skills: `/curdx-flow:epic`, `/curdx-flow:browser-qa`,
42
+ `/curdx-flow:ui-sketch`, `/curdx-flow:security-audit`,
43
+ `/curdx-flow:brownfield-index`.
54
44
 
55
45
  ## Quick start
56
46
 
57
47
  ```bash
58
- # 1. In your project, initialize
59
48
  cd ~/your-project
60
49
  claude
61
50
  /curdx-flow:init
62
-
63
- # 2. Start a feature
64
51
  /curdx-flow:start jwt-auth "Add JWT authentication to the REST API"
65
-
66
- # 3. Generate the spec (research → requirements → design → tasks)
67
52
  /curdx-flow:spec
68
-
69
- # 4. Execute
70
53
  /curdx-flow:implement
71
-
72
- # 5. Verify + review
73
54
  /curdx-flow:verify
74
55
  /curdx-flow:review
75
56
 
76
- # Artifacts:
57
+ # Main artifacts:
77
58
  # .flow/specs/jwt-auth/verification-report.md
78
59
  # .flow/specs/jwt-auth/review-report.md
79
60
  ```
80
61
 
81
- See [`docs/getting-started.md`](./docs/getting-started.md) for a five-minute walkthrough, or [`docs/workflows.md`](./docs/workflows.md) for typical scenarios (greenfield / brownfield / epic / fast / enterprise).
82
-
83
- ## The three modes
84
-
85
- Set when you run `/curdx-flow:start --mode=<mode>`. Each mode decides which gates are enforced.
86
-
87
- | Mode | Workflow | Gates |
88
- |------|----------|-------|
89
- | `fast` | Skip the spec — just execute | karpathy + verification |
90
- | `standard` (default) | Full 4-phase spec | + tdd + coverage-audit |
91
- | `enterprise` | Full spec + planning review + adversarial + edge-case + security audit | All gates |
92
-
93
- ## Upgrading from v1.x
94
-
95
- v2 is a major rewrite. Thirty slash commands became eleven. If you're coming from v1, see [`MIGRATION.md`](./MIGRATION.md) for the mapping table. If you'd rather stay on v1:
96
-
97
- ```bash
98
- npm i -g @curdx/flow@^1.1
99
- ```
100
-
101
- ## What's in the box
102
-
103
- - **11 slash commands** + **5 auto-invoked skills** (the complete public surface)
104
- - **16 internal agents** that the commands dispatch (no user-visible personas — that was v1)
105
- - **8 composable gates** — Karpathy / Verification / TDD / Coverage / Adversarial / Edge-Case / Security / DevEx
106
- - **4 execution strategies** for `/curdx-flow:implement` (linear / subagent / stop-hook / wave, auto-routed)
107
- - **4 lifecycle hook events** plus a plugin-level subagent status line that enforce the discipline without user action
108
- - **Required docs/reasoning tools** — Context7 official plugin (MCP + skill + docs agent) and sequential-thinking MCP
109
- - **4 recommended companion plugins** — pua, claude-mem, frontend-design, chrome-devtools-mcp
110
- - **1 optional output style** — `CurdX Evidence-First` for concise, evidence-backed replies via `/config`
111
- - **1 default subagent status line** — CurDX-Flow agents show compact live rows in the Claude Code agent panel on modern Claude Code
112
- - **Plugin PATH helper** — `curdx-flow` is available inside Claude Code Bash sessions via the plugin `bin/` directory on modern Claude Code
113
- - **Offline-capable install** — the npm package ships the full plugin body; zero GitHub round-trips during install
114
-
115
- ## Documentation
116
-
117
- | Doc | When to read |
118
- |-----|--------------|
119
- | [`docs/getting-started.md`](./docs/getting-started.md) | First time — five-minute walkthrough |
120
- | [`docs/headless-ci.md`](./docs/headless-ci.md) | `claude -p`, CI, cron, and scripted automation |
121
- | [`docs/command-reference.md`](./docs/command-reference.md) | All 11 commands + 5 skills with flags |
122
- | [`docs/agent-reference.md`](./docs/agent-reference.md) | The 16 internal agents |
123
- | [`docs/workflows.md`](./docs/workflows.md) | Typical scenarios with exact command sequences |
124
- | [`docs/architecture.md`](./docs/architecture.md) | Internal design for contributors and extenders |
125
- | [`docs/ethos.md`](./docs/ethos.md) | Why we built it this way |
126
- | [`docs/troubleshoot.md`](./docs/troubleshoot.md) | Symptom-indexed fixes |
127
- | [`docs/releasing.md`](./docs/releasing.md) | Maintainer: how to cut a new version |
128
- | [`MIGRATION.md`](./MIGRATION.md) | v1 → v2 command mapping |
129
-
130
- ## Credits
131
-
132
- CurdX-Flow v2 is a distillation, not an invention. Ideas we depend on:
133
-
134
- - [**Andrej Karpathy's 4 principles**](https://github.com/forrestchang/andrej-karpathy-skills) — the discipline foundation
135
- - [**GitHub Spec Kit**](https://github.com/github/spec-kit) — spec-driven development boiled down
136
- - [**superpowers**](https://github.com/obra/superpowers) — subagent discipline + TDD + two-stage review
137
- - [**pua**](https://github.com/tanweai/pua) — the three red lines
138
- - [**claude-mem**](https://github.com/thedotmack/claude-mem) — cross-session memory
139
- - **MCP / plugin ecosystem** — context7 (Upstash), sequential-thinking, chrome-devtools-mcp (Chrome DevTools team), frontend-design skill
62
+ This produces a durable audit trail instead of a chat-only claim of completion.
140
63
 
141
- ## License
64
+ ## What ships
142
65
 
143
- MIT. See [`LICENSE`](./LICENSE).
66
+ - 11 slash commands and 5 auto-invoked skills
67
+ - 16 internal agents
68
+ - 8 composable gates
69
+ - 4 execution strategies for `/curdx-flow:implement`
70
+ - thin public docs, thick supporting references
144
71
 
145
- ## Contributing
72
+ ## Docs
146
73
 
147
- - Issues: https://github.com/curdx/curdx-flow/issues
148
- - PRs: please eat your own dogfood run `/curdx-flow:spec` on your own PR first
149
- - Be specific. No rage-at-the-LLM. The point is to make Claude reliable, not to whine about when it isn't.
74
+ - [docs/getting-started.md](./docs/getting-started.md) for the first end-to-end walkthrough
75
+ - [docs/command-reference.md](./docs/command-reference.md) for flags, strategy semantics, and specialty skill contracts
76
+ - [docs/workflows.md](./docs/workflows.md) for greenfield, brownfield, epic, fast, and enterprise flows
77
+ - [docs/headless-ci.md](./docs/headless-ci.md) for `claude --bare -p`, `system/init`, `system/plugin_install`, and CI patterns
78
+ - [docs/troubleshoot.md](./docs/troubleshoot.md) for operator fixes
79
+ - [docs/architecture.md](./docs/architecture.md) for the skill-first layout
80
+ - [docs/agent-reference.md](./docs/agent-reference.md) for the 16 internal agents and their artifacts
150
81
 
151
- ---
82
+ ## Notes
152
83
 
153
- _CurDX = "Current Developer eXperience" in the AI-coding era._
84
+ - `enterprise` mode turns on adversarial, edge-case, security, and DevEx gates.
85
+ - `subagent` is serial; `wave` is the parallel strategy.
86
+ - Headless usage should favor `claude --bare -p` and explicit `--plugin-dir`,
87
+ `--settings`, and `--mcp-config` wiring.
@@ -4,6 +4,7 @@ description: Use proactively when reviewing a spec or diff from an attacker or s
4
4
  model: opus
5
5
  effort: high
6
6
  maxTurns: 30
7
+ color: red
7
8
  tools: [Read, Grep, Glob, Bash]
8
9
  ---
9
10
 
@@ -5,29 +5,15 @@ memory: project
5
5
  model: opus
6
6
  effort: high
7
7
  maxTurns: 40
8
+ color: cyan
8
9
  tools: [Read, Write, Grep, Glob, Bash, WebSearch]
9
10
  ---
10
11
 
11
- <output-discipline>
12
- **CRITICAL: Extreme concision required to prevent context overflow.**
13
-
14
- Your output must follow these rules:
15
- 1. **Write first, explain never**: Your FIRST action must be calling the Write tool with the full design.md content. Do NOT paste content as assistant text.
16
- 2. **No previews**: Do NOT preview the architecture decisions in your response. The file itself is the deliverable.
17
- 3. **Minimal status updates**: Use bullets, not prose. One-line updates only.
18
- 4. **Final output**: After Write succeeds, output EXACTLY 4 lines:
19
- - Line 1: "✓ design.md generated"
20
- - Line 2: "Architecture decisions: N"
21
- - Line 3: "Components: N"
22
- - Line 4: "Next: /curdx-flow:spec --phase=tasks"
23
- 5. **No explanations**: Do NOT explain what you decided, why you decided it, or what the design contains. The file speaks for itself.
24
-
25
- **Violation of these rules = task failure.**
26
- </output-discipline>
27
-
28
12
  # Flow Architect — Architecture Design Agent
29
13
 
30
14
  @${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
15
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md
16
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md
31
17
 
32
18
  ## Your Responsibility
33
19
 
@@ -185,14 +171,10 @@ Required sections:
185
171
 
186
172
  ## Output to User
187
173
 
188
- **CRITICAL: Follow <output-discipline> rules exactly. Output template:**
189
-
190
- ```
191
- ✓ design.md generated
192
- Architecture decisions: N
193
- Components: N
194
- Next: /curdx-flow:spec --phase=tasks
195
- ```
174
+ Follow `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md`.
175
+ After `Write` succeeds, emit the `design.md` contract from
176
+ `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md` and nothing
177
+ else.
196
178
 
197
179
  **Forbidden output**: Core decisions summary, tech stack list, error path counts, warnings, review suggestions. The file speaks for itself.
198
180
 
@@ -211,14 +193,5 @@ Well-known stack assemblies honestly compress to: stack list with one-line justi
211
193
 
212
194
  ---
213
195
 
214
- <bookend>
215
- **Restated critical rules (output discipline):**
216
-
217
- 1. Write first, explain never. Your FIRST action = Write tool call with full design.md.
218
- 2. No previews. Do NOT paste architecture decisions in your response.
219
- 3. Minimal status. Bullets only, one line each.
220
- 4. Fixed output. Exactly 4 lines (see Output to User section).
221
- 5. No explanations. Do NOT explain decisions, tech stack, or design content.
222
-
223
- **Violation of these rules = task failure. The file is the deliverable, not your explanation.**
224
- </bookend>
196
+ The file is the deliverable. Keep the chat output to the shared compact summary
197
+ only.
@@ -5,29 +5,15 @@ memory: project
5
5
  model: sonnet
6
6
  effort: high
7
7
  maxTurns: 30
8
+ color: blue
8
9
  tools: [Read, Write, Grep, Glob, Bash]
9
10
  ---
10
11
 
11
- <output-discipline>
12
- **CRITICAL: Extreme concision required to prevent context overflow.**
13
-
14
- Your output must follow these rules:
15
- 1. **Write first, explain never**: Your FIRST action must be calling the Write tool with the full codebase-index.md content. Do NOT paste content as assistant text.
16
- 2. **No previews**: Do NOT preview the codebase map in your response. The file itself is the deliverable.
17
- 3. **Minimal status updates**: Use bullets, not prose. One-line updates only.
18
- 4. **Final output**: After Write succeeds, output EXACTLY 4 lines:
19
- - Line 1: "✓ codebase-index.md generated"
20
- - Line 2: "Modules: N"
21
- - Line 3: "Entry points: N"
22
- - Line 4: "Next: /curdx-flow:start <feature-name>"
23
- 5. **No explanations**: Do NOT explain the findings inline. The file speaks for itself.
24
-
25
- **Violation of these rules = task failure.**
26
- </output-discipline>
27
-
28
12
  # Flow Brownfield Analyst — Codebase Mapping Agent
29
13
 
30
14
  @${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
15
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md
16
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md
31
17
 
32
18
  ## Your Responsibilities
33
19
 
@@ -150,4 +136,7 @@ Keep it short and reusable.
150
136
 
151
137
  ## Output to User
152
138
 
153
- **CRITICAL: Follow <output-discipline> exactly.**
139
+ Follow `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md`.
140
+ After `Write` succeeds, emit the `codebase-index.md` contract from
141
+ `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md` and nothing
142
+ else.
@@ -5,6 +5,7 @@ memory: project
5
5
  model: opus
6
6
  effort: high
7
7
  maxTurns: 40
8
+ color: orange
8
9
  tools: [Read, Edit, Write, Bash, Monitor, Grep, Glob]
9
10
  ---
10
11
 
@@ -4,6 +4,7 @@ description: Use proactively when a feature, spec, or diff needs a non-happy-pat
4
4
  model: sonnet
5
5
  effort: high
6
6
  maxTurns: 30
7
+ color: purple
7
8
  tools: [Read, Grep, Glob, Bash]
8
9
  ---
9
10
 
@@ -4,6 +4,7 @@ description: Use proactively when executing exactly one concrete task from tasks
4
4
  model: sonnet
5
5
  effort: medium
6
6
  maxTurns: 30
7
+ color: green
7
8
  tools: [Read, Write, Edit, Bash, Grep, Glob]
8
9
  ---
9
10
 
@@ -5,31 +5,16 @@ memory: project
5
5
  model: sonnet
6
6
  effort: high
7
7
  maxTurns: 30
8
+ color: cyan
8
9
  tools: [Read, Write, Grep, Glob, Bash]
9
10
  ---
10
11
 
11
- <output-discipline>
12
- **CRITICAL: Extreme concision required to prevent context overflow.**
13
-
14
- Your output must follow these rules:
15
- 1. **Write first, explain never**: Your FIRST action must be calling the Write tool with the full tasks.md content. Do NOT paste content as assistant text.
16
- 2. **No previews**: Do NOT preview the task list in your response. The file itself is the deliverable.
17
- 3. **Minimal status updates**: Use bullets, not prose. One-line updates only.
18
- 4. **Final output**: After Write succeeds, output EXACTLY 5 lines:
19
- - Line 1: "✓ tasks.md generated"
20
- - Line 2: "Total tasks: N"
21
- - Line 3: "Coverage audit: [PASS/FAIL]"
22
- - Line 4: "Phases: 1-5"
23
- - Line 5: "Next: /curdx-flow:implement"
24
- 5. **No explanations**: Do NOT explain what you did, why you did it, or what the tasks contain. The file speaks for itself.
25
-
26
- **Violation of these rules = task failure.**
27
- </output-discipline>
28
-
29
12
  # Flow Planner — Task Breakdown Agent
30
13
 
31
14
  @${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
32
15
  @${CLAUDE_PLUGIN_ROOT}/knowledge/poc-first-workflow.md
16
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md
17
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md
33
18
 
34
19
  ## Your Responsibility
35
20
 
@@ -224,7 +209,7 @@ Then emit the 5-line summary (see "Output to User" below). No inline task listin
224
209
  3. No two tasks are inseparable. If task A and task B always have to be done together and always in the same commit, they are **one** task — merge them.
225
210
  4. Every task's `Verify` command is executable today (or after an explicit earlier task that sets it up).
226
211
 
227
- **Granularity guardrail** (adapted from smart-ralph):
212
+ **Granularity guardrail**:
228
213
 
229
214
  - Split if a task touches unrelated logical concerns, crosses phase boundaries, requires multiple unrelated verify commands, or spans more than a tight cluster of files.
230
215
  - Merge if adjacent tasks touch the same file/component for the same concern and neither is meaningful as an independent commit.
@@ -248,25 +233,14 @@ Then emit the 5-line summary (see "Output to User" below). No inline task listin
248
233
 
249
234
  ## Output to User (5 lines max, after Write succeeds)
250
235
 
251
- ```
252
- Wrote .flow/specs/<name>/tasks.md
253
- N tasks across 5 Phases (X/Y/Z/W/V)
254
- Coverage: FR A/B | AC C/D | AD E/F
255
- Next: /curdx-flow:implement
256
- ```
236
+ Follow `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md`.
237
+ After `Write` succeeds, emit the `tasks.md` contract from
238
+ `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md` and nothing
239
+ else.
257
240
 
258
- **Do not re-paste the tasks.md content inline. Do not list every task. Just the summary.**
241
+ **Do not re-paste the tasks.md content inline. Do not list every task.**
259
242
 
260
243
  ---
261
244
 
262
- <bookend>
263
- **Restated critical rules (output discipline):**
264
-
265
- 1. Write first, explain never. Your FIRST action = Write tool call with full file content.
266
- 2. No previews. Do NOT paste content in your response.
267
- 3. Minimal status. Bullets only, one line each.
268
- 4. Fixed output. Exactly 3-5 lines (see output template in frontmatter).
269
- 5. No explanations. Do NOT explain what you produced. The file is the deliverable.
270
-
271
- **Violation of these rules = task failure.**
272
- </bookend>
245
+ Follow `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md`.
246
+ Keep the final response to the shared compact summary only.
@@ -5,29 +5,15 @@ memory: project
5
5
  model: sonnet
6
6
  effort: medium
7
7
  maxTurns: 25
8
+ color: pink
8
9
  tools: [Read, Write, AskUserQuestion, Grep, Bash]
9
10
  ---
10
11
 
11
- <output-discipline>
12
- **CRITICAL: Extreme concision required to prevent context overflow.**
13
-
14
- Your output must follow these rules:
15
- 1. **Write first, explain never**: Your FIRST action must be calling the Write tool with the full requirements.md content. Do NOT paste content as assistant text.
16
- 2. **No previews**: Do NOT preview the user stories or acceptance criteria in your response. The file itself is the deliverable.
17
- 3. **Minimal status updates**: Use bullets, not prose. One-line updates only.
18
- 4. **Final output**: After Write succeeds, output EXACTLY 4 lines:
19
- - Line 1: "✓ requirements.md generated"
20
- - Line 2: "User stories: N"
21
- - Line 3: "Functional requirements: N"
22
- - Line 4: "Next: /curdx-flow:spec --phase=design"
23
- 5. **No explanations**: Do NOT explain what you defined, why you defined it, or what the requirements contain. The file speaks for itself.
24
-
25
- **Violation of these rules = task failure.**
26
- </output-discipline>
27
-
28
12
  # Flow Product Designer — Product Design Agent
29
13
 
30
14
  @${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
15
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md
16
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md
31
17
 
32
18
  ## Your Responsibilities
33
19
 
@@ -149,19 +135,10 @@ AskUserQuestion:
149
135
 
150
136
  ## Output to User
151
137
 
152
- ```
153
- Requirements done: .flow/specs/<name>/requirements.md
154
-
155
- Key user stories (N):
156
- US-01: User X can Y, so that Z
157
- US-02: ...
158
-
159
- Acceptance criteria: M total, covering X happy paths + Y edge cases
160
-
161
- Out of Scope: K items explicitly excluded
162
-
163
- Next step: /curdx-flow:spec --phase=design
164
- ```
138
+ Follow `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md`.
139
+ After `Write` succeeds, emit the `requirements.md` contract from
140
+ `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md` and nothing
141
+ else.
165
142
 
166
143
  ## Requirements discipline (stop-condition, not length-target)
167
144
 
@@ -178,14 +155,5 @@ Forbidden padding: restating the goal, describing sections you are about to fill
178
155
 
179
156
  ---
180
157
 
181
- <bookend>
182
- **Restated critical rules (output discipline):**
183
-
184
- 1. Write first, explain never. Your FIRST action = Write tool call with full file content.
185
- 2. No previews. Do NOT paste content in your response.
186
- 3. Minimal status. Bullets only, one line each.
187
- 4. Fixed output. Exactly 3-5 lines (see output template in frontmatter).
188
- 5. No explanations. Do NOT explain what you produced. The file is the deliverable.
189
-
190
- **Violation of these rules = task failure.**
191
- </bookend>
158
+ The file is the deliverable. Keep chat output to the shared compact summary
159
+ only.
@@ -5,6 +5,7 @@ memory: project
5
5
  model: sonnet
6
6
  effort: medium
7
7
  maxTurns: 30
8
+ color: yellow
8
9
  tools: [Read, Write, AskUserQuestion, Bash, Monitor, WebFetch, Grep, Glob]
9
10
  ---
10
11
 
@@ -5,28 +5,15 @@ memory: project
5
5
  model: sonnet
6
6
  effort: high
7
7
  maxTurns: 40
8
+ color: blue
8
9
  tools: [Read, Write, WebSearch, WebFetch, Grep, Glob, Bash]
9
10
  ---
10
11
 
11
- <output-discipline>
12
- **CRITICAL: Extreme concision required to prevent context overflow.**
13
-
14
- Your output must follow these rules:
15
- 1. **Write first, explain never**: Your FIRST action must be calling the Write tool with the full research.md content. Do NOT paste content as assistant text.
16
- 2. **No previews**: Do NOT preview the research findings in your response. The file itself is the deliverable.
17
- 3. **Minimal status updates**: Use bullets, not prose. One-line updates only.
18
- 4. **Final output**: After Write succeeds, output EXACTLY 3 lines:
19
- - Line 1: "✓ research.md generated"
20
- - Line 2: "Recommendations: N"
21
- - Line 3: "Next: /curdx-flow:spec --phase=requirements"
22
- 5. **No explanations**: Do NOT explain what you found, why you recommend it, or what the research contains. The file speaks for itself.
23
-
24
- **Violation of these rules = task failure.**
25
- </output-discipline>
26
-
27
12
  # Flow Researcher — Research Analysis Agent
28
13
 
29
14
  @${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
15
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md
16
+ @${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md
30
17
 
31
18
  ## Your Responsibilities
32
19
 
@@ -152,24 +139,10 @@ If any answer is "no", redo it before writing.
152
139
 
153
140
  ## Output to User
154
141
 
155
- When done, give the user a brief:
156
-
157
- ```
158
- ✓ Research complete: .flow/specs/<name>/research.md
159
-
160
- Key findings:
161
- - Finding 1
162
- - Finding 2
163
- - Finding 3
164
-
165
- Recommended direction: Solution X (rationale)
166
-
167
- Open questions (please answer before entering requirements phase):
168
- 1. Q1
169
- 2. Q2
170
-
171
- Next step: /curdx-flow:spec --phase=requirements
172
- ```
142
+ Follow `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-output-discipline.md`.
143
+ After `Write` succeeds, emit the `research.md` contract from
144
+ `${CLAUDE_PLUGIN_ROOT}/knowledge/artifact-summary-contracts.md` and nothing
145
+ else.
173
146
 
174
147
  ## Research discipline (stop-condition, not length-target)
175
148
 
@@ -188,14 +161,5 @@ Self-check before `Write`: for every paragraph, ask "does this change a reader's
188
161
 
189
162
  ---
190
163
 
191
- <bookend>
192
- **Restated critical rules (output discipline):**
193
-
194
- 1. Write first, explain never. Your FIRST action = Write tool call with full file content.
195
- 2. No previews. Do NOT paste content in your response.
196
- 3. Minimal status. Bullets only, one line each.
197
- 4. Fixed output. Exactly 3-5 lines (see output template in frontmatter).
198
- 5. No explanations. Do NOT explain what you produced. The file is the deliverable.
199
-
200
- **Violation of these rules = task failure.**
201
- </bookend>
164
+ The file is the deliverable. Do not add previews, rationale summaries, or open
165
+ question lists to chat output.
@@ -5,6 +5,7 @@ memory: project
5
5
  model: sonnet
6
6
  effort: high
7
7
  maxTurns: 40
8
+ color: purple
8
9
  tools: [Read, Grep, Glob, Bash]
9
10
  ---
10
11
 
@@ -5,6 +5,7 @@ memory: project
5
5
  model: opus
6
6
  effort: high
7
7
  maxTurns: 40
8
+ color: red
8
9
  tools: [Read, AskUserQuestion, Grep, Glob, Bash, WebSearch]
9
10
  ---
10
11
 
@@ -5,6 +5,7 @@ memory: project
5
5
  model: opus
6
6
  effort: high
7
7
  maxTurns: 40
8
+ color: orange
8
9
  tools: [Read, Write, AskUserQuestion, WebSearch, Grep, Glob, Bash]
9
10
  ---
10
11
 
@@ -5,6 +5,7 @@ memory: project
5
5
  model: sonnet
6
6
  effort: medium
7
7
  maxTurns: 25
8
+ color: blue
8
9
  tools: [Read, Write, WebSearch, WebFetch, Grep, Glob, Bash]
9
10
  ---
10
11
 
@@ -6,6 +6,7 @@ memory: project
6
6
  model: sonnet
7
7
  effort: medium
8
8
  maxTurns: 25
9
+ color: pink
9
10
  tools: [Read, Write, AskUserQuestion, Bash, WebSearch, Skill]
10
11
  ---
11
12
 
@@ -5,6 +5,7 @@ memory: project
5
5
  model: sonnet
6
6
  effort: high
7
7
  maxTurns: 30
8
+ color: yellow
8
9
  tools: [Read, Grep, Glob, Bash, Monitor]
9
10
  ---
10
11