@curdx/flow 1.1.11 → 2.0.0-beta.10
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 -3
- package/.claude-plugin/plugin.json +4 -11
- package/CHANGELOG.md +99 -0
- package/README.md +74 -102
- package/README.zh.md +2 -2
- package/agent-preamble/preamble.md +81 -11
- package/agents/flow-adversary.md +41 -56
- package/agents/flow-architect.md +24 -11
- package/agents/flow-debugger.md +2 -2
- package/agents/flow-edge-hunter.md +20 -6
- package/agents/flow-executor.md +3 -3
- package/agents/flow-planner.md +51 -48
- package/agents/flow-product-designer.md +15 -2
- package/agents/flow-qa-engineer.md +4 -4
- package/agents/flow-researcher.md +18 -3
- package/agents/flow-reviewer.md +5 -1
- package/agents/flow-security-auditor.md +2 -2
- package/agents/flow-triage-analyst.md +4 -4
- package/agents/flow-ui-researcher.md +7 -7
- package/agents/flow-ux-designer.md +3 -3
- package/agents/flow-verifier.md +47 -14
- package/bin/curdx-flow.js +13 -1
- package/cli/doctor.js +28 -13
- package/cli/install.js +62 -36
- package/cli/protocols.js +63 -10
- package/cli/registry.js +73 -0
- package/cli/uninstall.js +9 -11
- package/cli/upgrade.js +6 -10
- package/cli/utils.js +104 -56
- package/commands/debug.md +10 -10
- package/commands/fast.md +1 -1
- package/commands/help.md +109 -87
- package/commands/implement.md +7 -7
- package/commands/init.md +18 -7
- package/commands/review.md +114 -130
- package/commands/spec.md +131 -89
- package/commands/start.md +130 -153
- package/commands/verify.md +110 -92
- package/gates/adversarial-review-gate.md +20 -20
- package/gates/coverage-audit-gate.md +1 -1
- package/gates/devex-gate.md +5 -6
- package/gates/edge-case-gate.md +2 -2
- package/gates/security-gate.md +3 -3
- package/hooks/hooks.json +0 -11
- package/hooks/scripts/quick-mode-guard.sh +12 -9
- package/hooks/scripts/session-start.sh +2 -2
- package/hooks/scripts/stop-watcher.sh +25 -15
- package/knowledge/epic-decomposition.md +2 -2
- package/knowledge/execution-strategies.md +10 -9
- package/knowledge/planning-reviews.md +6 -6
- package/knowledge/spec-driven-development.md +11 -10
- package/knowledge/two-stage-review.md +6 -5
- package/knowledge/wave-execution.md +5 -5
- package/package.json +4 -2
- package/skills/brownfield-index/SKILL.md +62 -0
- package/skills/browser-qa/SKILL.md +50 -0
- package/skills/epic/SKILL.md +68 -0
- package/skills/security-audit/SKILL.md +50 -0
- package/skills/ui-sketch/SKILL.md +49 -0
- package/templates/config.json.tmpl +1 -1
- package/templates/design.md.tmpl +32 -112
- package/templates/requirements.md.tmpl +25 -43
- package/templates/research.md.tmpl +37 -68
- package/templates/tasks.md.tmpl +27 -84
- package/agents/persona-amelia.md +0 -128
- package/agents/persona-david.md +0 -141
- package/agents/persona-emma.md +0 -179
- package/agents/persona-john.md +0 -105
- package/agents/persona-mary.md +0 -95
- package/agents/persona-oliver.md +0 -136
- package/agents/persona-rachel.md +0 -126
- package/agents/persona-serena.md +0 -175
- package/agents/persona-winston.md +0 -117
- package/commands/audit.md +0 -170
- package/commands/autoplan.md +0 -184
- package/commands/design.md +0 -155
- package/commands/discuss.md +0 -162
- package/commands/doctor.md +0 -124
- package/commands/index.md +0 -261
- package/commands/install-deps.md +0 -128
- package/commands/party.md +0 -241
- package/commands/plan-ceo.md +0 -117
- package/commands/plan-design.md +0 -107
- package/commands/plan-dx.md +0 -104
- package/commands/plan-eng.md +0 -108
- package/commands/qa.md +0 -118
- package/commands/requirements.md +0 -146
- package/commands/research.md +0 -141
- package/commands/security.md +0 -109
- package/commands/sketch.md +0 -118
- package/commands/spike.md +0 -181
- package/commands/status.md +0 -139
- package/commands/switch.md +0 -95
- package/commands/tasks.md +0 -189
- package/commands/triage.md +0 -160
- package/hooks/scripts/fail-tracker.sh +0 -31
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"email": "bydongxin@gmail.com"
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
|
-
"description": "
|
|
9
|
-
"version": "
|
|
8
|
+
"description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
|
|
9
|
+
"version": "2.0.0-beta.10"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "curdx-flow",
|
|
14
14
|
"source": "./",
|
|
15
|
-
"description": "
|
|
15
|
+
"description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"workflow",
|
|
18
18
|
"spec-driven",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "curdx-flow",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0-beta.10",
|
|
4
|
+
"description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wdx",
|
|
7
7
|
"email": "bydongxin@gmail.com"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://github.com/
|
|
10
|
-
"repository": "https://github.com/
|
|
9
|
+
"homepage": "https://github.com/curdx/curdx-flow",
|
|
10
|
+
"repository": "https://github.com/curdx/curdx-flow",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"workflow",
|
|
@@ -31,13 +31,6 @@
|
|
|
31
31
|
"-y",
|
|
32
32
|
"@modelcontextprotocol/server-sequential-thinking"
|
|
33
33
|
]
|
|
34
|
-
},
|
|
35
|
-
"chrome-devtools": {
|
|
36
|
-
"command": "npx",
|
|
37
|
-
"args": [
|
|
38
|
-
"-y",
|
|
39
|
-
"chrome-devtools-mcp@latest"
|
|
40
|
-
]
|
|
41
34
|
}
|
|
42
35
|
}
|
|
43
36
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,105 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to CurDX-Flow will be documented here.
|
|
4
4
|
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
### Fixed (P0)
|
|
8
|
+
|
|
9
|
+
- `cli/utils.js` — `findRuntime()` referenced `existsSync` without importing it; any user whose `bun`/`uv` was not on PATH hit `ReferenceError` during install or doctor.
|
|
10
|
+
- `hooks/scripts/stop-watcher.sh` — `export STATE_FILE` was placed after the python heredoc, so the stop-hook execution strategy never activated. Moved the export before the heredoc.
|
|
11
|
+
- `package.json` — `skills/` directory was missing from `files[]`; the 5 bundled skills were stripped from the published tarball.
|
|
12
|
+
- `cli/uninstall.js` + `cli/upgrade.js` — `chrome-devtools-mcp` (added as a recommended plugin in beta.8) was missing from uninstall/upgrade lists, making it installable but uninstallable.
|
|
13
|
+
- `cli/protocols.js` — `injectGlobalProtocols()` returned action `"created"` on both ternary branches, silently collapsing the append-to-existing-file case. Atomic write + corrupted-block detection added.
|
|
14
|
+
|
|
15
|
+
### Changed (structural)
|
|
16
|
+
|
|
17
|
+
- New `cli/registry.js` is the single source of truth for recommended plugins. `install.js`, `uninstall.js`, `upgrade.js`, and `doctor.js` all import from it.
|
|
18
|
+
- `commands/start.md` and `commands/spec.md` now produce `.state.json` files that match `schemas/spec-state.schema.json` (field names: `spec_name` / `created` / `updated` / `version`; initial phase is `research`, not the undefined `created`).
|
|
19
|
+
- All python heredocs inside hook scripts use quoted delimiters (`<<'PY'`) and read `STATE_FILE` via `os.environ`, closing a shell→python code-injection surface triggered by unusual spec names.
|
|
20
|
+
|
|
21
|
+
### Removed
|
|
22
|
+
|
|
23
|
+
- `hooks/scripts/fail-tracker.sh` and its `PostToolUseFailure` registration — the counter was written but never read by any consumer (the intended pua escalation was never implemented). Can be reintroduced when the consumer exists.
|
|
24
|
+
|
|
25
|
+
## [2.0.0-beta.1] - 2026-04-20
|
|
26
|
+
|
|
27
|
+
### BREAKING — Major redesign: Discipline Layer, not meta-framework
|
|
28
|
+
|
|
29
|
+
v2 reframes the project from "AI engineering workflow meta-framework distilling 6 methodologies" into a focused **Claude Code Discipline Layer** — spec-driven workflow + goal-backward verification + Karpathy discipline. 30 slash commands became 9. 24 agents became 15.
|
|
30
|
+
|
|
31
|
+
See [MIGRATION.md](./MIGRATION.md) for the full v1 → v2 command mapping.
|
|
32
|
+
|
|
33
|
+
### Removed — 21 slash commands
|
|
34
|
+
|
|
35
|
+
Folded into `/curdx-flow:spec` via flags:
|
|
36
|
+
- `/research`, `/requirements`, `/design`, `/tasks` → `/spec --phase=<name>`
|
|
37
|
+
- `/plan-ceo`, `/plan-eng`, `/plan-design`, `/plan-dx`, `/autoplan` → `/spec --review[=<dim>]`
|
|
38
|
+
- `/audit` → `/verify --strict`
|
|
39
|
+
|
|
40
|
+
Moved to auto-invoked skills (also slash-callable by their skill name):
|
|
41
|
+
- `/triage` → `epic` skill
|
|
42
|
+
- `/qa` → `browser-qa` skill
|
|
43
|
+
- `/sketch` → `ui-sketch` skill
|
|
44
|
+
- `/security` → `security-audit` skill
|
|
45
|
+
- `/index` → `brownfield-index` skill
|
|
46
|
+
|
|
47
|
+
Moved to CLI-only (outside Claude Code):
|
|
48
|
+
- `/doctor` → `npx @curdx/flow doctor`
|
|
49
|
+
- `/install-deps` → `npx @curdx/flow install --all`
|
|
50
|
+
|
|
51
|
+
Removed outright:
|
|
52
|
+
- `/party` — gimmick, no measured value. Ask Claude directly for multi-perspective discussion.
|
|
53
|
+
- `/discuss` — edit `.flow/STATE.md` directly to log decisions.
|
|
54
|
+
- `/status` — use `/curdx-flow:start --list`, or read `.flow/specs/<name>/.state.json` directly.
|
|
55
|
+
- `/switch` — folded into `/curdx-flow:start <spec-name>`.
|
|
56
|
+
- `/spike` — folded into `/curdx-flow:fast "spike: <hypothesis>"`.
|
|
57
|
+
|
|
58
|
+
### Removed — 9 persona agents
|
|
59
|
+
|
|
60
|
+
Mary, John, Winston, Amelia, Rachel, David, Oliver, Serena, Emma. Their voices merged into the corresponding `flow-*` functional agents. `/party` is gone too.
|
|
61
|
+
|
|
62
|
+
### Added — 5 auto-invoked skills
|
|
63
|
+
|
|
64
|
+
Each skill has extensive trigger keywords in English and Chinese so Claude auto-invokes based on context. All are also slash-callable (`/curdx-flow:<skill-name>`).
|
|
65
|
+
|
|
66
|
+
- `skills/epic/` — vertical-slice decomposition of large features
|
|
67
|
+
- `skills/browser-qa/` — real-browser testing via chrome-devtools MCP
|
|
68
|
+
- `skills/ui-sketch/` — UI design variant generation (uses `frontend-design` skill)
|
|
69
|
+
- `skills/security-audit/` — OWASP + STRIDE + CVE scan
|
|
70
|
+
- `skills/brownfield-index/` — map unfamiliar / legacy codebases
|
|
71
|
+
|
|
72
|
+
### Changed — expanded flag surface on core commands
|
|
73
|
+
|
|
74
|
+
- `/curdx-flow:spec` gains `--phase=<X[,Y,...]>`, `--until=<phase>`, `--review[=<dim>]`, `--regenerate`, `--resume`
|
|
75
|
+
- `/curdx-flow:start` gains `--resume`, `--list`, `--mode=<fast|standard|enterprise>` and now handles spec switching (absorbing v1 `/switch`)
|
|
76
|
+
- `/curdx-flow:verify` gains `--strict` (multi-source coverage audit, absorbing v1 `/audit`)
|
|
77
|
+
- `/curdx-flow:review` normalizes flags to `--stage=<1|2|both>`, `--adversarial`, `--edge-case`
|
|
78
|
+
|
|
79
|
+
### Changed — mode semantics
|
|
80
|
+
|
|
81
|
+
Modes reduced from 4 (`sketch / fast / standard / enterprise`) to 3 (`fast / standard / enterprise`). `sketch` folded into the `ui-sketch` skill which runs regardless of mode.
|
|
82
|
+
|
|
83
|
+
### Unchanged (intentionally)
|
|
84
|
+
|
|
85
|
+
- `.flow/` directory structure — fully backwards-compatible with v1 specs
|
|
86
|
+
- 3 auto-installed MCPs (context7, sequential-thinking, chrome-devtools)
|
|
87
|
+
- 5 hook events (SessionStart, InstructionsLoaded, Stop, PreToolUse, PostToolUseFailure)
|
|
88
|
+
- 8 composable gates (karpathy, verification, tdd, coverage-audit, adversarial-review, edge-case, security, devex)
|
|
89
|
+
- Templates (`templates/*.tmpl`) and their rendering pipeline
|
|
90
|
+
- The CLI (install, doctor, upgrade, uninstall)
|
|
91
|
+
- Global `~/.claude/CLAUDE.md` protocol injection
|
|
92
|
+
|
|
93
|
+
### Why
|
|
94
|
+
|
|
95
|
+
Field feedback on v1:
|
|
96
|
+
- Users couldn't discover commands — 30 options in the slash menu exceeds working memory
|
|
97
|
+
- Claude Code auto-truncates slash descriptions once they exceed ~8 KB, hitting us at 30 commands
|
|
98
|
+
- Peer tools (Spec Kit ~7, BMAD ~15, Aider ~15) ship with far fewer commands
|
|
99
|
+
- "Meta-framework distilling 6 methodologies" is a maintainer concept, not a user value prop
|
|
100
|
+
- The real value is **Karpathy discipline + goal-backward verification** — everything else is scaffolding
|
|
101
|
+
|
|
102
|
+
v2 keeps the scaffolding (agents, gates, hooks, knowledge docs) but hides it behind the 9 commands that real users use.
|
|
103
|
+
|
|
5
104
|
## [1.1.1] - 2026-04-20
|
|
6
105
|
|
|
7
106
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# CurDX-Flow
|
|
2
2
|
|
|
3
|
-
> **
|
|
4
|
-
>
|
|
3
|
+
> **Stop Claude Code from faking "done".**
|
|
4
|
+
> Spec-driven workflow + goal-backward verification + Karpathy discipline.
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@curdx/flow)
|
|
7
7
|
[](./LICENSE)
|
|
@@ -10,148 +10,120 @@
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Why this exists
|
|
14
14
|
|
|
15
|
-
|
|
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
16
|
|
|
17
|
-
**
|
|
17
|
+
CurDX-Flow is a thin **discipline layer** on top of Claude Code that makes non-trivial feature work actually work:
|
|
18
18
|
|
|
19
|
-
|
|
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.
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
- **24 agents** — 15 functional + 9 personas (Mary, John, Winston, Amelia, Rachel, David, Oliver, Serena, Emma)
|
|
23
|
-
- **8 composable gates** — Karpathy / Verification / TDD / Coverage / Adversarial / Edge-Case / Security / DevEx
|
|
24
|
-
- **4 execution strategies** — linear / subagent / stop-hook / wave (auto-routed)
|
|
25
|
-
- **10 knowledge docs** — spec-driven dev, POC-first, atomic commits, execution strategies, ...
|
|
26
|
-
- **5 hook events** — SessionStart / InstructionsLoaded / Stop / PreToolUse / PostToolUseFailure
|
|
27
|
-
- **3 auto-installed MCPs** — context7, sequential-thinking, chrome-devtools
|
|
28
|
-
- **Graceful degradation** — missing deps → fallback modes with clear notices
|
|
29
|
-
|
|
30
|
-
## Why Use It
|
|
31
|
-
|
|
32
|
-
Existing AI-coding workflows suffer from:
|
|
23
|
+
Not a framework. Not a methodology library. A discipline layer.
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
|---------|---------------------|
|
|
36
|
-
| Context rot (long sessions degrade) | Subagent isolation + stop-hook loops + claude-mem |
|
|
37
|
-
| No discipline (AI skips, hallucinates) | Karpathy L1 + verification-gate + TDD-gate enforcement |
|
|
38
|
-
| Scattered best practices | Six workflows distilled into one meta-framework |
|
|
39
|
-
| Weak verification (claim "done" without proof) | Goal-backward verification + forbidden-word detection |
|
|
40
|
-
| Single-viewpoint decisions | Party Mode (real multi-agent, not role-play) + adversarial review |
|
|
25
|
+
## Install (one command)
|
|
41
26
|
|
|
42
|
-
## Install
|
|
43
|
-
|
|
44
|
-
### Recommended: one-shot via npm (works in any project, fast on Chinese npm mirrors)
|
|
45
27
|
```bash
|
|
46
|
-
# Interactive install (picks recommended plugins)
|
|
47
|
-
npx @curdx/flow install
|
|
48
|
-
|
|
49
|
-
# Or install everything automatically
|
|
50
28
|
npx @curdx/flow install --all
|
|
51
|
-
|
|
52
|
-
# After the one-time install, initialize your project INSIDE Claude Code:
|
|
53
|
-
# $ claude
|
|
54
|
-
# /curdx-flow:init
|
|
55
|
-
# /curdx-flow:start my-feature "<description>"
|
|
56
|
-
|
|
57
|
-
# Other CLI lifecycle operations
|
|
58
|
-
npx @curdx/flow doctor # Health check
|
|
59
|
-
npx @curdx/flow upgrade # Update all plugins
|
|
60
|
-
npx @curdx/flow uninstall # Remove curdx-flow
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### From the Claude Code marketplace
|
|
64
|
-
```
|
|
65
|
-
/plugin marketplace add curdx/curdx-flow
|
|
66
|
-
/plugin install curdx-flow
|
|
67
29
|
```
|
|
68
30
|
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
git clone https://github.com/curdx/curdx-flow
|
|
72
|
-
claude --plugin-dir ./curdx-flow
|
|
73
|
-
```
|
|
31
|
+
This installs the Claude Code plugin (fully offline from the npm package — no GitHub fetch), the 3 auto-registered MCP servers, and three recommended companion plugins (pua, claude-mem, frontend-design).
|
|
74
32
|
|
|
75
|
-
|
|
33
|
+
## 9 slash commands, that's it
|
|
76
34
|
|
|
77
35
|
```
|
|
78
|
-
/curdx-flow:
|
|
79
|
-
/curdx-flow:
|
|
80
|
-
/curdx-flow:
|
|
36
|
+
/curdx-flow:init Initialize .flow/ in the current project
|
|
37
|
+
/curdx-flow:start Create / resume / switch a feature spec
|
|
38
|
+
/curdx-flow:spec Write or refresh the spec (--phase, --review flags)
|
|
39
|
+
/curdx-flow:implement Execute the tasks
|
|
40
|
+
/curdx-flow:verify Goal-backward check ← the moat
|
|
41
|
+
/curdx-flow:review Two-stage code review
|
|
42
|
+
/curdx-flow:fast Skip spec for one-off tasks
|
|
43
|
+
/curdx-flow:debug Systematic 4-stage debugging
|
|
44
|
+
/curdx-flow:help Reference
|
|
81
45
|
```
|
|
82
46
|
|
|
83
|
-
|
|
47
|
+
Plus 5 auto-invoked skills (Claude picks them up from context): `epic`, `browser-qa`, `ui-sketch`, `security-audit`, `brownfield-index`.
|
|
84
48
|
|
|
85
|
-
## Quick
|
|
49
|
+
## Quick start
|
|
86
50
|
|
|
87
51
|
```bash
|
|
88
|
-
# 1. In your project
|
|
52
|
+
# 1. In your project, initialize
|
|
53
|
+
cd ~/your-project
|
|
54
|
+
claude
|
|
89
55
|
/curdx-flow:init
|
|
90
56
|
|
|
91
57
|
# 2. Start a feature
|
|
92
|
-
/curdx-flow:start jwt-auth "Add JWT authentication to REST API"
|
|
58
|
+
/curdx-flow:start jwt-auth "Add JWT authentication to the REST API"
|
|
93
59
|
|
|
94
|
-
# 3. Generate
|
|
60
|
+
# 3. Generate the spec (research → requirements → design → tasks)
|
|
95
61
|
/curdx-flow:spec
|
|
96
62
|
|
|
97
|
-
# 4. Execute
|
|
63
|
+
# 4. Execute
|
|
98
64
|
/curdx-flow:implement
|
|
99
65
|
|
|
100
66
|
# 5. Verify + review
|
|
101
67
|
/curdx-flow:verify
|
|
102
68
|
/curdx-flow:review
|
|
103
69
|
|
|
104
|
-
# Done.
|
|
70
|
+
# Done.
|
|
105
71
|
```
|
|
106
72
|
|
|
107
|
-
|
|
73
|
+
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).
|
|
108
74
|
|
|
109
|
-
##
|
|
75
|
+
## The three modes
|
|
110
76
|
|
|
111
|
-
|
|
112
|
-
2. **Spec** — Research → Requirements → Design → Tasks (scalable, 4-file lite to 12-file enterprise)
|
|
113
|
-
3. **Agents** — 15 functional + 9 persona (Mary / John / Winston / ...)
|
|
114
|
-
4. **Flow** — 4 execution strategies, auto-routed
|
|
115
|
-
5. **Memory** — claude-mem (implicit) + `.flow/STATE.md` (explicit decisions as D-NN)
|
|
77
|
+
Set when you run `/curdx-flow:start --mode=<mode>`. Each mode decides which gates are enforced.
|
|
116
78
|
|
|
117
|
-
|
|
79
|
+
| Mode | Workflow | Gates |
|
|
80
|
+
|------|----------|-------|
|
|
81
|
+
| `fast` | Skip the spec — just execute | karpathy + verification |
|
|
82
|
+
| `standard` (default) | Full 4-phase spec | + tdd + coverage-audit |
|
|
83
|
+
| `enterprise` | Full spec + planning review + adversarial + edge-case + security audit | All gates |
|
|
118
84
|
|
|
119
|
-
##
|
|
85
|
+
## Upgrading from v1.x
|
|
120
86
|
|
|
121
|
-
|
|
122
|
-
|-----|--------------|
|
|
123
|
-
| [`docs/getting-started.md`](./docs/getting-started.md) | First time, 5-minute walkthrough |
|
|
124
|
-
| [`docs/command-reference.md`](./docs/command-reference.md) | All 31 commands with usage |
|
|
125
|
-
| [`docs/agent-reference.md`](./docs/agent-reference.md) | All 24 agents + personas |
|
|
126
|
-
| [`docs/workflows.md`](./docs/workflows.md) | 5 typical scenarios (greenfield/brownfield/epic/fast/UI) |
|
|
127
|
-
| [`docs/architecture.md`](./docs/architecture.md) | Internal design for extenders |
|
|
128
|
-
| [`docs/ethos.md`](./docs/ethos.md) | Why it's built this way |
|
|
129
|
-
| [`docs/troubleshoot.md`](./docs/troubleshoot.md) | Fix common problems |
|
|
87
|
+
v2 is a major rewrite. Thirty slash commands became nine. If you're coming from v1, see [`MIGRATION.md`](./MIGRATION.md) for the mapping table. If you'd rather stay on v1:
|
|
130
88
|
|
|
131
|
-
|
|
89
|
+
```bash
|
|
90
|
+
npm i -g @curdx/flow@^1.1
|
|
91
|
+
```
|
|
132
92
|
|
|
133
|
-
|
|
134
|
-
- **Phase 6** (ship / land / canary / retro) — Low ROI for private-repo use cases. Future release if community asks.
|
|
135
|
-
- **Integration checker** — For Epic cross-spec validation. Manual for now.
|
|
136
|
-
- **Checkpoint save/restore** — Current `.flow/STATE.md` covers most needs.
|
|
137
|
-
- **Multi-runtime support** — Claude Code only. Other tools later if their plugin API matures.
|
|
93
|
+
## What's in the box
|
|
138
94
|
|
|
139
|
-
|
|
95
|
+
- **9 slash commands** + **5 auto-invoked skills** (the complete public surface)
|
|
96
|
+
- **15 internal agents** that the commands dispatch (no user-visible personas — that was v1)
|
|
97
|
+
- **8 composable gates** — Karpathy / Verification / TDD / Coverage / Adversarial / Edge-Case / Security / DevEx
|
|
98
|
+
- **4 execution strategies** for `/curdx-flow:implement` (linear / subagent / stop-hook / wave, auto-routed)
|
|
99
|
+
- **5 hook events** that enforce the discipline without user action
|
|
100
|
+
- **3 auto-installed MCPs** — context7 (latest docs), sequential-thinking (structured reasoning), chrome-devtools (browser automation)
|
|
101
|
+
- **Offline-capable install** — the npm package ships the full plugin body; zero GitHub round-trips during install
|
|
102
|
+
|
|
103
|
+
## Documentation
|
|
104
|
+
|
|
105
|
+
| Doc | When to read |
|
|
106
|
+
|-----|--------------|
|
|
107
|
+
| [`docs/getting-started.md`](./docs/getting-started.md) | First time — five-minute walkthrough |
|
|
108
|
+
| [`docs/command-reference.md`](./docs/command-reference.md) | All 9 commands + 5 skills with flags |
|
|
109
|
+
| [`docs/agent-reference.md`](./docs/agent-reference.md) | The 15 internal agents |
|
|
110
|
+
| [`docs/workflows.md`](./docs/workflows.md) | Typical scenarios with exact command sequences |
|
|
111
|
+
| [`docs/architecture.md`](./docs/architecture.md) | Internal design for contributors and extenders |
|
|
112
|
+
| [`docs/ethos.md`](./docs/ethos.md) | Why we built it this way |
|
|
113
|
+
| [`docs/troubleshoot.md`](./docs/troubleshoot.md) | Symptom-indexed fixes |
|
|
114
|
+
| [`docs/releasing.md`](./docs/releasing.md) | Maintainer: how to cut a new version |
|
|
115
|
+
| [`MIGRATION.md`](./MIGRATION.md) | v1 → v2 command mapping |
|
|
140
116
|
|
|
141
117
|
## Credits
|
|
142
118
|
|
|
143
|
-
CurDX-Flow is a distillation, not an invention.
|
|
119
|
+
CurDX-Flow v2 is a distillation, not an invention. Ideas we depend on:
|
|
144
120
|
|
|
145
|
-
- [**
|
|
146
|
-
- [**
|
|
121
|
+
- [**Andrej Karpathy's 4 principles**](https://github.com/forrestchang/andrej-karpathy-skills) — the discipline foundation
|
|
122
|
+
- [**GitHub Spec Kit**](https://github.com/github/spec-kit) — spec-driven development boiled down
|
|
147
123
|
- [**superpowers**](https://github.com/obra/superpowers) — subagent discipline + TDD + two-stage review
|
|
148
|
-
- [**
|
|
149
|
-
- [**
|
|
150
|
-
-
|
|
151
|
-
- [**pua**](https://github.com/tanweai/pua) — persistence + 3 red lines
|
|
152
|
-
- [**claude-mem**](https://github.com/thedotmack/claude-mem) — automatic cross-session memory
|
|
153
|
-
- [**frontend-design skill**](https://claude.ai/skills/frontend-design) — distinctive UI (Anthropic official)
|
|
154
|
-
- **context7** (Upstash) + **sequential-thinking** (Anthropic) + **chrome-devtools-mcp** (Chrome team)
|
|
124
|
+
- [**pua**](https://github.com/tanweai/pua) — the three red lines
|
|
125
|
+
- [**claude-mem**](https://github.com/thedotmack/claude-mem) — cross-session memory
|
|
126
|
+
- **Anthropic official** — context7 (Upstash), sequential-thinking, chrome-devtools-mcp, frontend-design skill
|
|
155
127
|
|
|
156
128
|
## License
|
|
157
129
|
|
|
@@ -159,9 +131,9 @@ MIT. See [`LICENSE`](./LICENSE).
|
|
|
159
131
|
|
|
160
132
|
## Contributing
|
|
161
133
|
|
|
162
|
-
- Issues: https://github.com/
|
|
163
|
-
- PRs
|
|
164
|
-
-
|
|
134
|
+
- Issues: https://github.com/curdx/curdx-flow/issues
|
|
135
|
+
- PRs: please eat your own dogfood — run `/curdx-flow:spec` on your own PR first
|
|
136
|
+
- Be specific. No rage-at-the-LLM. The point is to make Claude reliable, not to whine about when it isn't.
|
|
165
137
|
|
|
166
138
|
---
|
|
167
139
|
|
package/README.zh.md
CHANGED
|
@@ -23,8 +23,8 @@ CurDX-Flow 是一个 Claude Code 插件,把 6 个验证过的 AI 工程工作
|
|
|
23
23
|
- **8 个可组合 Gate** — Karpathy / Verification / TDD / Coverage / Adversarial / Edge-Case / Security / DevEx
|
|
24
24
|
- **4 种执行策略** — linear / subagent / stop-hook / wave(自动路由)
|
|
25
25
|
- **10 个知识文档** — 规格驱动 / POC-First / 原子提交 / 执行策略 / ...
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
26
|
+
- **4 个 hook 事件** — SessionStart / InstructionsLoaded / Stop / PreToolUse
|
|
27
|
+
- **2 个自动安装的 MCP + 1 个推荐插件** — context7 / sequential-thinking(plugin.json 内置)+ chrome-devtools-mcp(recommended,beta.8 解耦)
|
|
28
28
|
- **优雅降级** — 依赖缺失时进入 fallback 模式并清晰告知
|
|
29
29
|
|
|
30
30
|
## 为什么用
|
|
@@ -30,35 +30,58 @@
|
|
|
30
30
|
- Do not say done/fixed/working without evidence
|
|
31
31
|
- Tests first, goals first
|
|
32
32
|
|
|
33
|
+
### 5. Proportionate Output (stop-condition, not length-quota)
|
|
34
|
+
|
|
35
|
+
**Write until the reader's questions are answered. Then stop.** There is no minimum length, no maximum length, no target range. Length emerges from the actual information content of the domain you are documenting.
|
|
36
|
+
|
|
37
|
+
Stop conditions (all must hold before you `Write`):
|
|
38
|
+
- Every question a reader will ask about this artifact is answered with a concrete fact, decision, or "N/A: <reason>".
|
|
39
|
+
- No paragraph restates the template's structure or what you are about to produce.
|
|
40
|
+
- No paragraph repeats upstream content (the goal from `.state.json`, a section of requirements.md in your design.md) — reference it instead.
|
|
41
|
+
- No section has padding to look "thorough" when the honest answer is "standard for this domain, no novelty".
|
|
42
|
+
|
|
43
|
+
Research reference: Anthropic's own prompt guidance — ["arbitrary iteration caps" are an anti-pattern](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices); use a stop condition instead. Claude Opus 4.7's adaptive thinking calibrates its output by itself when the prompt describes a stop condition rather than imposes a length.
|
|
44
|
+
|
|
45
|
+
Self-check before `Write`: re-read every paragraph and ask "does this paragraph change a reader's decision or understanding?" If no, delete it. Iterate.
|
|
46
|
+
|
|
33
47
|
---
|
|
34
48
|
|
|
35
49
|
## L2: Mandatory Tool Rules (enforced)
|
|
36
50
|
|
|
37
51
|
### Documentation lookup → context7 MCP
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
Query `context7` when EITHER is true:
|
|
54
|
+
- The library API is version-sensitive (recent breaking change, typed API in a new version, deprecated method you're considering).
|
|
55
|
+
- You are genuinely uncertain (can't recall the method signature, can't recall whether a feature exists in the installed version).
|
|
40
56
|
|
|
41
57
|
```
|
|
42
58
|
1. mcp__context7__resolve-library-id("react") → resolve library ID
|
|
43
59
|
2. mcp__context7__query-docs(libraryId, query) → query latest docs
|
|
44
60
|
```
|
|
45
61
|
|
|
46
|
-
|
|
62
|
+
Do NOT query context7 for:
|
|
63
|
+
- Universally stable APIs you can write from memory (Vue 3 `ref`, React `useState`, Express `app.get`, SQL `SELECT`).
|
|
64
|
+
- Syntax you would paste into a test file without thinking.
|
|
65
|
+
- Every single library mention in a spec (the spec is planning, not implementation — defer the lookup to the executor when it actually calls the API).
|
|
66
|
+
|
|
67
|
+
**Rule of thumb**: if you would paste the code into production without double-checking, don't waste a context7 call checking it. If you would hesitate, query. Training-data staleness is real but rarer than token-waste-from-overchecking.
|
|
47
68
|
|
|
48
|
-
**
|
|
49
|
-
|
|
69
|
+
**Forbidden**: writing calls to a specific minor version of a library from memory when the code needs to run against that exact version and the API surface is known to have changed. Then you MUST query context7.
|
|
70
|
+
|
|
71
|
+
**Fallback**: when context7 MCP is unavailable, use WebSearch with a version number, and annotate the output with "⚠️ context7 unavailable — documentation may not be current".
|
|
50
72
|
|
|
51
73
|
---
|
|
52
74
|
|
|
53
75
|
### Structured thinking → sequential-thinking MCP
|
|
54
76
|
|
|
55
|
-
|
|
77
|
+
Use `sequential-thinking` proportional to **decision complexity**, not a fixed quota. The numbers below are **ceilings for genuinely hard cases**, not floors to hit:
|
|
78
|
+
|
|
79
|
+
| Task | Guideline |
|
|
80
|
+
|------|-----------|
|
|
56
81
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- Adversarial review (≥6 thoughts)
|
|
61
|
-
- Complex bug root-cause analysis (≥5 thoughts)
|
|
82
|
+
**Principle**: running 8 thoughts to pick between Vue and React for a Todo is waste. Running 1 thought to architect a distributed queue is irresponsible. Match effort to stakes.
|
|
83
|
+
|
|
84
|
+
Hard rule: do NOT emit empty thoughts ("Thought 4: let me also consider X… X is fine"). If you've reached the answer, stop.
|
|
62
85
|
|
|
63
86
|
```
|
|
64
87
|
mcp__sequential-thinking__sequentialthinking({
|
|
@@ -70,7 +93,7 @@ mcp__sequential-thinking__sequentialthinking({
|
|
|
70
93
|
```
|
|
71
94
|
|
|
72
95
|
**Fallback**: when seq-think is unavailable, simulate it inside `<thinking>...</thinking>` blocks
|
|
73
|
-
in the response, still listing numbered thoughts
|
|
96
|
+
in the response, still listing numbered thoughts proportional to real decision complexity.
|
|
74
97
|
|
|
75
98
|
---
|
|
76
99
|
|
|
@@ -210,5 +233,52 @@ When you need to delegate to a sub-agent:
|
|
|
210
233
|
|
|
211
234
|
---
|
|
212
235
|
|
|
236
|
+
## L8: Long-artifact handling (truncation prevention)
|
|
237
|
+
|
|
238
|
+
When your job is to produce a long Markdown artifact (`tasks.md`, `verification-report.md`, `review-report.md`, `research.md`, `requirements.md`, `design.md`, etc.), follow these rules. Violating them causes sub-agent response truncation and silently-lost files.
|
|
239
|
+
|
|
240
|
+
### Write first, explain second
|
|
241
|
+
|
|
242
|
+
Your FIRST substantive action after gathering inputs must be a `Write` tool call with the **complete file content**. Do NOT paste the content as assistant text before writing.
|
|
243
|
+
|
|
244
|
+
- ✗ *"Here's the tasks.md I'll write:"* followed by a 500-line markdown code block, then a `Write` call containing the same 500 lines — this doubles the output tokens and usually hits the truncation limit mid-`Write`, leaving the file missing or partial.
|
|
245
|
+
- ✓ Immediately `Write` the file with full content. Then output a ≤ 5-line summary.
|
|
246
|
+
|
|
247
|
+
### Do not preview
|
|
248
|
+
|
|
249
|
+
Never output the file's content in your response. The file IS the deliverable — the reader opens it. Your response is just the ack that you wrote it.
|
|
250
|
+
|
|
251
|
+
### After write, summarize only
|
|
252
|
+
|
|
253
|
+
After `Write` returns success, respond with **at most 5 lines** summarizing what you wrote:
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
✓ Wrote .flow/specs/<spec>/tasks.md
|
|
257
|
+
40 tasks across 5 phases
|
|
258
|
+
Coverage: FR 10/10, AC 12/12, AD 4/4
|
|
259
|
+
Next: /curdx-flow:implement
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Do not re-paste any file contents. Do not narrate your reasoning. Do not list every task inline.
|
|
263
|
+
|
|
264
|
+
### Split when a single `Write` call would approach the output budget
|
|
265
|
+
|
|
266
|
+
If the artifact is large enough that one `Write` call risks truncation (sub-agent output tokens are finite), split it:
|
|
267
|
+
- `tasks.md` references `tasks-phase-1.md` … `tasks-phase-5.md`
|
|
268
|
+
- Each phase file is its own `Write` call
|
|
269
|
+
- The index file is a short table linking to the phase files
|
|
270
|
+
|
|
271
|
+
Judge by the nature of the content, not a hardcoded line count — the same content density varies wildly in line count depending on how many tables and lists it contains. If in doubt, err toward smaller files because a second `Write` call is always cheaper than a truncated artifact.
|
|
272
|
+
|
|
273
|
+
### If you see a token-budget warning
|
|
274
|
+
|
|
275
|
+
Stop narrating and call `Write` with whatever content is ready. Sub-agents do not have a "next response" — continuation is not possible after truncation. Save what you have, then return.
|
|
276
|
+
|
|
277
|
+
### Why this matters
|
|
278
|
+
|
|
279
|
+
Sub-agents invoked via the `Task` tool have a ~16 K output-token budget per invocation. A naive agent that previews then writes consumes those tokens twice — once as prose, once inside the tool call — and truncation typically lands inside the `Write` call itself. The parent command then reports "agent did not complete" and re-dispatches, burning compute for no new artifact. Writing first eliminates the failure mode at the source.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
213
283
|
**Remember**: this preamble exists because, without discipline, AI tends to slack off, hallucinate, and over-engineer.
|
|
214
284
|
These rules are not constraints — they are the tools that make you reliable.
|