@curdx/flow 2.2.4 → 2.3.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.
- package/.claude-plugin/marketplace.json +3 -2
- package/.claude-plugin/plugin.json +27 -1
- package/CHANGELOG.md +9 -564
- package/README.md +49 -113
- package/agents/flow-adversary.md +1 -0
- package/agents/flow-architect.md +9 -36
- package/agents/flow-brownfield-analyst.md +7 -18
- package/agents/flow-debugger.md +1 -0
- package/agents/flow-edge-hunter.md +1 -0
- package/agents/flow-executor.md +1 -0
- package/agents/flow-orchestrator.md +145 -0
- package/agents/flow-planner.md +11 -37
- package/agents/flow-product-designer.md +9 -41
- package/agents/flow-qa-engineer.md +1 -0
- package/agents/flow-researcher.md +9 -45
- package/agents/flow-reviewer.md +1 -0
- package/agents/flow-security-auditor.md +1 -0
- package/agents/flow-triage-analyst.md +1 -0
- package/agents/flow-ui-researcher.md +1 -0
- package/agents/flow-ux-designer.md +1 -0
- package/agents/flow-verifier.md +1 -0
- package/cli/install-companions.js +8 -8
- package/cli/install-next-steps.js +3 -1
- package/cli/lib/doctor-claude-settings.js +1 -0
- package/cli/lib/doctor-report.js +1 -1
- package/gates/coverage-audit-gate.md +1 -3
- package/gates/tdd-gate.md +0 -6
- package/gates/verification-gate.md +1 -5
- package/hooks/scripts/common.sh +7 -0
- package/hooks/scripts/session-start.sh +1 -1
- package/hooks/scripts/stop-watcher.sh +8 -0
- package/knowledge/artifact-output-discipline.md +24 -0
- package/knowledge/artifact-summary-contracts.md +50 -0
- package/knowledge/claude-code-runtime-contracts.md +13 -1
- package/knowledge/execution-strategies.md +6 -4
- package/knowledge/poc-first-workflow.md +2 -6
- package/knowledge/spec-driven-development.md +0 -4
- package/knowledge/systematic-debugging.md +0 -6
- package/knowledge/two-stage-review.md +8 -6
- package/knowledge/wave-execution.md +2 -1
- package/monitors/monitors.json +8 -0
- package/monitors/scripts/flow-state-monitor.sh +99 -0
- package/package.json +3 -2
- package/schemas/agent-frontmatter.schema.json +4 -0
- package/settings.json +1 -0
- package/skills/brownfield-index/SKILL.md +14 -20
- package/skills/brownfield-index/references/applicability.md +12 -0
- package/skills/brownfield-index/references/handoff.md +8 -0
- package/skills/brownfield-index/references/index-contract.md +10 -0
- package/skills/browser-qa/SKILL.md +15 -35
- package/skills/browser-qa/references/handoff.md +6 -0
- package/skills/browser-qa/references/prerequisites.md +10 -0
- package/skills/browser-qa/references/qa-contract.md +20 -0
- package/skills/cancel/SKILL.md +20 -61
- package/skills/cancel/references/destructive-mode.md +17 -0
- package/skills/cancel/references/reporting.md +18 -0
- package/skills/cancel/references/state-recovery.md +30 -0
- package/skills/cancel/references/target-resolution.md +7 -0
- package/skills/debug/SKILL.md +23 -87
- package/skills/debug/references/context-gathering.md +11 -0
- package/skills/debug/references/failure-guard.md +25 -0
- package/skills/debug/references/intake.md +12 -0
- package/skills/debug/references/phase-workflow.md +34 -0
- package/skills/debug/references/reporting.md +20 -0
- package/skills/epic/SKILL.md +18 -50
- package/skills/epic/references/epic-artifacts.md +20 -0
- package/skills/epic/references/epic-intake.md +9 -0
- package/skills/epic/references/slice-handoff.md +16 -0
- package/skills/fast/SKILL.md +34 -102
- package/skills/fast/references/applicability.md +25 -0
- package/skills/fast/references/clarification.md +20 -0
- package/skills/fast/references/execution-contract.md +56 -0
- package/skills/help/SKILL.md +26 -132
- package/skills/help/references/dispatch.md +20 -0
- package/skills/help/references/overview.md +39 -0
- package/skills/help/references/troubleshoot.md +47 -0
- package/skills/help/references/workflow.md +37 -0
- package/skills/implement/SKILL.md +61 -237
- package/skills/implement/references/error-recovery.md +36 -0
- package/skills/implement/references/linear-execution.md +32 -0
- package/skills/implement/references/preflight.md +43 -0
- package/skills/implement/references/progress-contract.md +32 -0
- package/skills/implement/references/state-init.md +33 -0
- package/skills/implement/references/stop-hook-execution.md +36 -0
- package/skills/implement/references/strategy-router.md +38 -0
- package/skills/implement/references/subagent-execution.md +43 -0
- package/skills/init/SKILL.md +26 -95
- package/skills/init/references/gitignore-and-health.md +26 -0
- package/skills/init/references/next-steps.md +22 -0
- package/skills/init/references/preflight.md +15 -0
- package/skills/init/references/scaffold-contract.md +27 -0
- package/skills/review/SKILL.md +45 -153
- package/skills/review/references/optional-passes.md +48 -0
- package/skills/review/references/preflight.md +38 -0
- package/skills/review/references/report-contract.md +49 -0
- package/skills/review/references/reporting.md +20 -0
- package/skills/review/references/stage-execution.md +32 -0
- package/skills/security-audit/SKILL.md +16 -34
- package/skills/security-audit/references/audit-contract.md +21 -0
- package/skills/security-audit/references/gate-handoff.md +8 -0
- package/skills/security-audit/references/scope-and-depth.md +9 -0
- package/skills/spec/SKILL.md +55 -182
- package/skills/spec/references/artifact-landing.md +31 -0
- package/skills/spec/references/phase-execution.md +50 -0
- package/skills/spec/references/planning-review.md +31 -0
- package/skills/spec/references/preflight-and-routing.md +46 -0
- package/skills/spec/references/reporting.md +21 -0
- package/skills/start/SKILL.md +40 -123
- package/skills/start/references/branch-routing.md +51 -0
- package/skills/start/references/mode-semantics.md +12 -0
- package/skills/start/references/preflight.md +13 -0
- package/skills/start/references/reporting.md +20 -0
- package/skills/start/references/state-seeding.md +44 -0
- package/skills/start/references/workflow-handoff.md +26 -0
- package/skills/status/SKILL.md +17 -61
- package/skills/status/references/gather-contract.md +27 -0
- package/skills/status/references/health-rules.md +27 -0
- package/skills/status/references/output-contract.md +24 -0
- package/skills/status/references/preflight.md +10 -0
- package/skills/status/references/recovery-hints.md +18 -0
- package/skills/ui-sketch/SKILL.md +15 -34
- package/skills/ui-sketch/references/brief-intake.md +10 -0
- package/skills/ui-sketch/references/iteration-handoff.md +5 -0
- package/skills/ui-sketch/references/variant-contract.md +15 -0
- package/skills/verify/SKILL.md +31 -86
- package/skills/verify/references/evidence-workflow.md +39 -0
- package/skills/verify/references/output-contract.md +23 -0
- package/skills/verify/references/preflight.md +11 -0
- package/skills/verify/references/report-handoff.md +35 -0
- package/skills/verify/references/strict-mode.md +12 -0
- package/README.zh.md +0 -160
package/README.md
CHANGED
|
@@ -1,153 +1,89 @@
|
|
|
1
1
|
# CurdX-Flow
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> Spec-driven workflow
|
|
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
|
[](https://www.npmjs.com/package/@curdx/flow)
|
|
7
7
|
[](./LICENSE)
|
|
8
|
-
[](https://img.shields.io/badge/docs-Chinese%20(中文)-red)](./README.zh.md)
|
|
8
|
+
[](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, 17 internal agents, and a thin set of
|
|
12
|
+
entry docs. The heavy workflow detail lives in `skills/*/references/` and
|
|
13
|
+
`knowledge/`.
|
|
12
14
|
|
|
13
|
-
##
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
41
|
-
/curdx-flow:start Create
|
|
42
|
-
/curdx-flow:status Show
|
|
43
|
-
/curdx-flow:spec
|
|
44
|
-
/curdx-flow:implement Execute
|
|
45
|
-
/curdx-flow:cancel Cancel active execution
|
|
46
|
-
/curdx-flow:verify
|
|
47
|
-
/curdx-flow:review
|
|
48
|
-
/curdx-flow:fast
|
|
49
|
-
/curdx-flow:debug
|
|
50
|
-
/curdx-flow:help
|
|
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
|
|
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
|
-
#
|
|
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
|
-
|
|
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
|
-
##
|
|
64
|
+
## What ships
|
|
142
65
|
|
|
143
|
-
|
|
66
|
+
- 11 slash commands and 5 auto-invoked skills
|
|
67
|
+
- 17 internal agents
|
|
68
|
+
- a default main-thread `flow-orchestrator` agent
|
|
69
|
+
- a `.flow` state monitor that streams spec progress changes back into Claude
|
|
70
|
+
- 8 composable gates
|
|
71
|
+
- 4 execution strategies for `/curdx-flow:implement`
|
|
72
|
+
- thin public docs, thick supporting references
|
|
144
73
|
|
|
145
|
-
##
|
|
74
|
+
## Docs
|
|
146
75
|
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
76
|
+
- [docs/getting-started.md](./docs/getting-started.md) for the first end-to-end walkthrough
|
|
77
|
+
- [docs/command-reference.md](./docs/command-reference.md) for flags, strategy semantics, and specialty skill contracts
|
|
78
|
+
- [docs/workflows.md](./docs/workflows.md) for greenfield, brownfield, epic, fast, and enterprise flows
|
|
79
|
+
- [docs/headless-ci.md](./docs/headless-ci.md) for `claude --bare -p`, `system/init`, `system/plugin_install`, and CI patterns
|
|
80
|
+
- [docs/troubleshoot.md](./docs/troubleshoot.md) for operator fixes
|
|
81
|
+
- [docs/architecture.md](./docs/architecture.md) for the skill-first layout
|
|
82
|
+
- [docs/agent-reference.md](./docs/agent-reference.md) for the 17 internal agents and their artifacts
|
|
150
83
|
|
|
151
|
-
|
|
84
|
+
## Notes
|
|
152
85
|
|
|
153
|
-
|
|
86
|
+
- `enterprise` mode turns on adversarial, edge-case, security, and DevEx gates.
|
|
87
|
+
- `subagent` is serial; `wave` is the parallel strategy.
|
|
88
|
+
- Headless usage should favor `claude --bare -p` and explicit `--plugin-dir`,
|
|
89
|
+
`--settings`, and `--mcp-config` wiring.
|
package/agents/flow-adversary.md
CHANGED
package/agents/flow-architect.md
CHANGED
|
@@ -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
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
|
|
215
|
-
|
|
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
|
-
|
|
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.
|
package/agents/flow-debugger.md
CHANGED
package/agents/flow-executor.md
CHANGED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-orchestrator
|
|
3
|
+
description: "Use proactively when CurDX-Flow should own the main-thread workflow: gather context, choose fast-vs-spec path, coordinate specialist work, and enforce evidence before completion."
|
|
4
|
+
memory: project
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: high
|
|
7
|
+
maxTurns: 40
|
|
8
|
+
color: cyan
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Flow Orchestrator — Main Thread Coordination Agent
|
|
12
|
+
|
|
13
|
+
@${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md
|
|
14
|
+
@${CLAUDE_PLUGIN_ROOT}/knowledge/execution-strategies.md
|
|
15
|
+
@${CLAUDE_PLUGIN_ROOT}/knowledge/planning-reviews.md
|
|
16
|
+
@${CLAUDE_PLUGIN_ROOT}/knowledge/claude-code-runtime-contracts.md
|
|
17
|
+
|
|
18
|
+
## Your Role
|
|
19
|
+
|
|
20
|
+
You are the default CurDX-Flow main-thread agent. Keep the top-level Claude
|
|
21
|
+
session in a rigorous engineering mode:
|
|
22
|
+
|
|
23
|
+
- gather context before editing
|
|
24
|
+
- choose the smallest correct workflow
|
|
25
|
+
- delegate specialist work to `flow-*` agents
|
|
26
|
+
- keep artifacts on disk and summaries short
|
|
27
|
+
- refuse completion claims without evidence
|
|
28
|
+
|
|
29
|
+
You are not the primary artifact writer for research, requirements, design,
|
|
30
|
+
tasks, review, or verification. Those outputs belong to the specialist agents.
|
|
31
|
+
|
|
32
|
+
## Operating Modes
|
|
33
|
+
|
|
34
|
+
Choose exactly one operating mode after the first context pass:
|
|
35
|
+
|
|
36
|
+
1. **Fast path**
|
|
37
|
+
Use for small, well-bounded work that can be finished safely in one pass.
|
|
38
|
+
Preferred surfaces:
|
|
39
|
+
- direct execution in the main thread
|
|
40
|
+
- `/curdx-flow:fast`
|
|
41
|
+
- `flow-debugger` for surgical bug work
|
|
42
|
+
|
|
43
|
+
2. **Spec path**
|
|
44
|
+
Use for multi-file features, ambiguous requests, risky refactors, new
|
|
45
|
+
architecture, or anything that needs durable review/verification evidence.
|
|
46
|
+
Preferred surfaces:
|
|
47
|
+
- `/curdx-flow:init` if `.flow/` does not exist yet
|
|
48
|
+
- `/curdx-flow:start` or existing active spec
|
|
49
|
+
- specialist agents for research, requirements, design, tasks, execution,
|
|
50
|
+
verification, and review
|
|
51
|
+
|
|
52
|
+
3. **Advisory path**
|
|
53
|
+
Use for status checks, explanations, health checks, and runtime diagnostics.
|
|
54
|
+
Preferred surfaces:
|
|
55
|
+
- `/curdx-flow:status`
|
|
56
|
+
- `npx @curdx/flow doctor`
|
|
57
|
+
- `flow-brownfield-analyst` for unfamiliar codebases
|
|
58
|
+
|
|
59
|
+
State which path you chose before doing substantial work.
|
|
60
|
+
|
|
61
|
+
## Delegation Map
|
|
62
|
+
|
|
63
|
+
- Unfamiliar or inherited repo → `flow-brownfield-analyst`
|
|
64
|
+
- Research or version-sensitive external docs → `flow-researcher`
|
|
65
|
+
- Requirements / user stories / acceptance criteria → `flow-product-designer`
|
|
66
|
+
- Architecture / tradeoffs / component boundaries → `flow-architect`
|
|
67
|
+
- Task decomposition / coverage audit → `flow-planner`
|
|
68
|
+
- Single task execution → `flow-executor`
|
|
69
|
+
- Bug root-cause work → `flow-debugger`
|
|
70
|
+
- Final verification → `flow-verifier`
|
|
71
|
+
- Review / adversarial / edge-case passes → `flow-reviewer`, `flow-adversary`, `flow-edge-hunter`
|
|
72
|
+
- UI QA or UI references → `flow-qa-engineer`, `flow-ui-researcher`, `flow-ux-designer`
|
|
73
|
+
- Security review → `flow-security-auditor`
|
|
74
|
+
- Epic decomposition → `flow-triage-analyst`
|
|
75
|
+
|
|
76
|
+
Delegate when the subtask will create large context, produce a durable artifact,
|
|
77
|
+
or benefit from a specialized prompt. Keep the main thread focused on orchestration.
|
|
78
|
+
|
|
79
|
+
## Main-Thread Rules
|
|
80
|
+
|
|
81
|
+
### 1. Context before edits
|
|
82
|
+
|
|
83
|
+
Before changing files:
|
|
84
|
+
- inspect the relevant code and runtime surface
|
|
85
|
+
- identify existing patterns to preserve
|
|
86
|
+
- decide whether the task is fast-path or spec-path
|
|
87
|
+
|
|
88
|
+
Do not jump straight from user request to writes unless the task is obviously
|
|
89
|
+
tiny and local.
|
|
90
|
+
|
|
91
|
+
### 2. Use the plugin surfaces intentionally
|
|
92
|
+
|
|
93
|
+
- If the user asks for a workflow action that already exists as a CurDX-Flow
|
|
94
|
+
command or skill, prefer that surface instead of reinventing a parallel flow.
|
|
95
|
+
- If `.flow/` exists, keep work aligned with the active spec unless the user
|
|
96
|
+
explicitly asks to bypass it.
|
|
97
|
+
- If `.flow/` does not exist and the task is non-trivial, initialize or ask for
|
|
98
|
+
confirmation only when the distinction changes the execution model.
|
|
99
|
+
|
|
100
|
+
### 3. Evidence-first completion
|
|
101
|
+
|
|
102
|
+
Never say complete merely because code changed.
|
|
103
|
+
|
|
104
|
+
Completion requires evidence proportional to the task:
|
|
105
|
+
- code read or diff for structural claims
|
|
106
|
+
- tests / build / lint / verify commands for behavioral claims
|
|
107
|
+
- browser evidence for UI claims
|
|
108
|
+
- written artifacts for spec/review/verification phases
|
|
109
|
+
|
|
110
|
+
### 4. Keep summaries compact
|
|
111
|
+
|
|
112
|
+
When a specialist agent writes an artifact, your summary should point to the
|
|
113
|
+
artifact path, call out the decision taken, and state the next action. Do not
|
|
114
|
+
restate the full file content in chat.
|
|
115
|
+
|
|
116
|
+
### 5. Prefer directness over ceremony
|
|
117
|
+
|
|
118
|
+
CurDX-Flow is disciplined, but not bureaucratic.
|
|
119
|
+
|
|
120
|
+
- Small clear task: execute directly.
|
|
121
|
+
- Medium ambiguous task: inspect, plan briefly, then execute.
|
|
122
|
+
- Large risky task: switch to the full spec path.
|
|
123
|
+
|
|
124
|
+
Do not force the user through every phase when the task does not need it.
|
|
125
|
+
|
|
126
|
+
## Runtime Awareness
|
|
127
|
+
|
|
128
|
+
When the task depends on Claude Code runtime behavior itself
|
|
129
|
+
(plugins, hooks, agents, monitors, settings, output styles, commands):
|
|
130
|
+
|
|
131
|
+
- re-check the official Claude Code docs
|
|
132
|
+
- follow `${CLAUDE_PLUGIN_ROOT}/knowledge/claude-code-runtime-contracts.md`
|
|
133
|
+
- prefer `claude plugin validate .` over assumptions
|
|
134
|
+
|
|
135
|
+
## Output Contract
|
|
136
|
+
|
|
137
|
+
Your top-level replies should be:
|
|
138
|
+
|
|
139
|
+
1. short statement of chosen path
|
|
140
|
+
2. what context you gathered or what artifact was produced
|
|
141
|
+
3. what you changed or delegated
|
|
142
|
+
4. concrete evidence and next action
|
|
143
|
+
|
|
144
|
+
Do not produce long architectural essays in the main thread when a specialist
|
|
145
|
+
artifact is the correct output.
|
package/agents/flow-planner.md
CHANGED
|
@@ -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
|
|
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
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
|
241
|
+
**Do not re-paste the tasks.md content inline. Do not list every task.**
|
|
259
242
|
|
|
260
243
|
---
|
|
261
244
|
|
|
262
|
-
|
|
263
|
-
|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
182
|
-
|
|
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.
|