@curdx/flow 2.0.21 → 2.2.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 +25 -2
- package/.claude-plugin/plugin.json +10 -1
- package/CHANGELOG.md +106 -3
- package/README.md +3 -0
- package/README.zh.md +14 -5
- package/agent-preamble/preamble.md +3 -6
- package/agents/flow-qa-engineer.md +16 -15
- package/agents/flow-ui-researcher.md +2 -2
- package/agents/flow-verifier.md +3 -3
- package/bin/curdx-flow +5 -0
- package/cli/README.md +10 -9
- package/cli/install-bundled-mcps.js +37 -0
- package/cli/install-companions.js +19 -252
- package/cli/install-context7-config.js +97 -0
- package/cli/install-recommended-plugins.js +104 -0
- package/cli/install-required-plugins.js +57 -0
- package/cli/install-self-update.js +2 -91
- package/cli/install.js +12 -1
- package/cli/lib/claude.js +42 -11
- package/cli/lib/doctor-report.js +47 -8
- package/cli/lib/semver.js +95 -0
- package/cli/protocols-body.md +3 -2
- package/cli/utils.js +1 -0
- package/hooks/scripts/quick-mode-guard.sh +6 -7
- package/hooks/scripts/session-start.sh +6 -3
- package/knowledge/execution-strategies.md +5 -5
- package/knowledge/planning-reviews.md +2 -2
- package/knowledge/wave-execution.md +17 -17
- package/package.json +3 -3
- package/schemas/agent-frontmatter.schema.json +66 -0
- package/schemas/config.schema.json +24 -4
- package/schemas/gate-frontmatter.schema.json +30 -0
- package/schemas/hooks.schema.json +83 -0
- package/schemas/plugin-manifest.schema.json +66 -0
- package/schemas/skill-frontmatter.schema.json +72 -0
- package/schemas/spec-state.schema.json +7 -2
- package/skills/brownfield-index/SKILL.md +2 -1
- package/skills/browser-qa/SKILL.md +5 -4
- package/skills/debug/SKILL.md +105 -0
- package/skills/epic/SKILL.md +2 -1
- package/{commands/fast.md → skills/fast/SKILL.md} +2 -1
- package/{commands/help.md → skills/help/SKILL.md} +15 -5
- package/{commands/implement.md → skills/implement/SKILL.md} +14 -154
- package/skills/implement/references/wave-execution.md +162 -0
- package/{commands/init.md → skills/init/SKILL.md} +1 -0
- package/{commands/review.md → skills/review/SKILL.md} +38 -3
- package/skills/security-audit/SKILL.md +2 -1
- package/{commands/spec.md → skills/spec/SKILL.md} +4 -3
- package/{commands/start.md → skills/start/SKILL.md} +2 -1
- package/skills/ui-sketch/SKILL.md +2 -1
- package/skills/verify/SKILL.md +99 -0
- package/templates/CONTEXT.md.tmpl +1 -1
- package/templates/PROJECT.md.tmpl +1 -1
- package/templates/config.json.tmpl +6 -6
- package/templates/progress.md.tmpl +2 -2
- package/commands/debug.md +0 -199
- package/commands/verify.md +0 -142
|
@@ -6,20 +6,43 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
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
|
|
9
|
+
"version": "2.2.0"
|
|
10
10
|
},
|
|
11
|
+
"allowCrossMarketplaceDependenciesOn": [
|
|
12
|
+
"context7-marketplace"
|
|
13
|
+
],
|
|
11
14
|
"plugins": [
|
|
12
15
|
{
|
|
13
16
|
"name": "curdx-flow",
|
|
14
17
|
"source": "./",
|
|
15
18
|
"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.",
|
|
19
|
+
"version": "2.2.0",
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "wdx",
|
|
22
|
+
"email": "bydongxin@gmail.com"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/curdx/curdx-flow",
|
|
25
|
+
"repository": "https://github.com/curdx/curdx-flow",
|
|
26
|
+
"license": "MIT",
|
|
16
27
|
"keywords": [
|
|
17
28
|
"workflow",
|
|
18
29
|
"spec-driven",
|
|
19
30
|
"ai-engineering",
|
|
20
31
|
"orchestration"
|
|
21
32
|
],
|
|
22
|
-
"
|
|
33
|
+
"tags": [
|
|
34
|
+
"claude-code",
|
|
35
|
+
"spec-driven",
|
|
36
|
+
"verification",
|
|
37
|
+
"workflow"
|
|
38
|
+
],
|
|
39
|
+
"category": "productivity",
|
|
40
|
+
"dependencies": [
|
|
41
|
+
{
|
|
42
|
+
"name": "context7-plugin",
|
|
43
|
+
"marketplace": "context7-marketplace"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
23
46
|
}
|
|
24
47
|
]
|
|
25
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "curdx-flow",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
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",
|
|
@@ -16,5 +16,14 @@
|
|
|
16
16
|
"orchestration",
|
|
17
17
|
"karpathy",
|
|
18
18
|
"claude-code"
|
|
19
|
+
],
|
|
20
|
+
"skills": "./skills/",
|
|
21
|
+
"agents": "./agents/",
|
|
22
|
+
"hooks": "./hooks/hooks.json",
|
|
23
|
+
"dependencies": [
|
|
24
|
+
{
|
|
25
|
+
"name": "context7-plugin",
|
|
26
|
+
"marketplace": "context7-marketplace"
|
|
27
|
+
}
|
|
19
28
|
]
|
|
20
29
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to CurdX-Flow will be documented here.
|
|
4
4
|
|
|
5
|
+
## [2.2.0] - 2026-04-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Plugin manifest dependency declaration** — `.claude-plugin/plugin.json` declares `skills/`, `agents/`, `hooks/hooks.json`, and a cross-marketplace dependency on `context7-plugin`. `marketplace.json` opts into `allowCrossMarketplaceDependenciesOn: ["context7-marketplace"]` and mirrors the dependency on the plugin entry. Claude Code resolves the dependency during install.
|
|
10
|
+
- **Plugin `bin/` PATH wrapper** — new `bin/curdx-flow` POSIX `sh` wrapper exposes the CLI on the Claude Code plugin `bin/` PATH, so the in-session Bash tool can invoke `curdx-flow` without `npx`.
|
|
11
|
+
- **Extension contract layer** — five JSON schemas (`plugin-manifest`, `skill-frontmatter`, `agent-frontmatter`, `gate-frontmatter`, `hooks`) plus `scripts/validate-plugin-contracts.mjs` and four contract test suites enforce structural correctness in CI. `prepublishOnly` runs the validator before `npm test`.
|
|
12
|
+
- **`addRequiredPluginMarketplaces`** — split out of `installRequiredPlugins`. The install flow now pre-registers required companion marketplaces immediately after `curdx-flow-marketplace`, so the cross-marketplace dependency resolves cleanly during the curdx-flow plugin install step.
|
|
13
|
+
- **Doctor: stale Claude Code warning + plugin error surfacing** — `curdx-flow doctor` warns when the local `claude` CLI is below `2.1.110` (the minimum version with modern plugin dependency resolution and `bin/` PATH support), and surfaces per-plugin load errors propagated from `claude plugin list --json`.
|
|
14
|
+
- **`cli/lib/semver.js`** — extracted from `install-self-update.js`. Adds `isVersionAtLeast` for the doctor warning. The updater re-exports for backward compat.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **Skill spec alignment** — primary slash workflows (`init`, `start`, `spec`, `implement`, `verify`, `review`, `fast`, `debug`, `help`) gain `disable-model-invocation: true` so the model cannot auto-trigger them outside an explicit slash. Specialty skills (`epic`, `browser-qa`, `ui-sketch`, `security-audit`, `brownfield-index`) split trigger phrases into `when_to_use` and keep `description` short.
|
|
19
|
+
- **`Task` → `Agent` tool naming** — every `allowed-tools`, `Task(...)` call site, and prose mention in `skills/`, `knowledge/`, and `templates/` updated to the current Claude Code `Agent` tool nomenclature.
|
|
20
|
+
- **chrome-devtools MCP namespace** — `agents/flow-{qa-engineer,ui-researcher,verifier}.md` and `skills/{browser-qa,verify}` updated to `mcp__chrome_devtools__*` (underscore namespace) and the renamed tool surface (`new_page`, `navigate_page`, `take_screenshot`, `list_console_messages`, `list_network_requests`, `take_snapshot`, `lighthouse_audit`).
|
|
21
|
+
- **Doctor: duplicate-MCP section** renamed from "Legacy plugin-bundled MCPs still present" to "Duplicate MCP registrations", with ownership-aware remediation (the official Context7 plugin gets `claude mcp remove --scope user` guidance, the migrated curdx-flow MCPs get the `claude plugin update` guidance).
|
|
22
|
+
- **Templates** — `templates/{CONTEXT,PROJECT,progress,config}.md.tmpl` reference the current `/curdx-flow:*` slash names; `templates/config.json.tmpl` removes the retired `sketch` / `autonomous` modes and the retired `simplicity-gate` / `hard-gate` gates, and adds `wave_fail_policy`.
|
|
23
|
+
- **`schemas/config.schema.json`** — new `gateName` definition enumerates the eight real gates; `gates.always_on / standard_mode / enterprise_mode` switch to `$ref` on it. Added `execution.wave_fail_policy`.
|
|
24
|
+
- **`schemas/spec-state.schema.json`** — added `quickMode` boolean (the hook-controlled no-ask flag); fixed `goal` description to reference `/curdx-flow:start`.
|
|
25
|
+
- **`hooks/scripts/quick-mode-guard.sh`** — stop treating the retired `mode=autonomous` as quick mode. Only `quickMode=true` denies `AskUserQuestion`. Regression test added.
|
|
26
|
+
- **`agent-preamble/preamble.md`** — drops the "commands" wording and documents the quick-mode `AskUserQuestion` behavior.
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
|
|
30
|
+
- **`CLAUDE.md`** — blanked. The L1 mind baseline now lives in `hooks/scripts/inject-karpathy.sh` (injected on every SessionStart) and the protocol section that the installer writes to `~/.claude/CLAUDE.md`. The repo file added drift surface without adding signal. The matching `language-rule-scan` allow-list entry is removed.
|
|
31
|
+
- **`mode=autonomous`** — fully retired. The hook no longer treats it as quick mode, the templates no longer advertise it, and `schema-drift.test.js` regression-locks both.
|
|
32
|
+
|
|
33
|
+
### Required
|
|
34
|
+
|
|
35
|
+
- **Claude Code 2.1.110+** — the plugin dependency resolution and the plugin `bin/` PATH support require this baseline. The installer warns if your local `claude` is older.
|
|
36
|
+
|
|
5
37
|
## [2.0.21] - 2026-04-23
|
|
6
38
|
|
|
7
39
|
### Fixed
|
|
@@ -9,9 +41,80 @@ All notable changes to CurdX-Flow will be documented here.
|
|
|
9
41
|
- `cli/install-workflow.js` + `cli/install-self-update.js` — after `npm install -g @curdx/flow@latest`, the self-update restart spawned a bare `curdx-flow`, which fails under `npx` (PATH not guaranteed) or when the global bin dir isn't on PATH, surfacing as `sh: curdx-flow: command not found`. `checkAndUpdateSelf` now returns the absolute entry path of the freshly installed package, and the restart re-launches with `process.execPath` + that absolute script path. No PATH dependency, no shell involvement. Two new unit tests assert the spawn contract.
|
|
10
42
|
- `README.zh.md` — corrected the `smart-ralph` credit URL. The previously listed `Nibzard/smart-ralph` 404s; the repo matching the described feature set ("Spec-driven + Ralph Wiggum loop + Claude Code plugin") is `tzachbon/smart-ralph`.
|
|
11
43
|
|
|
12
|
-
## [
|
|
13
|
-
|
|
14
|
-
###
|
|
44
|
+
## [2.1.0] - 2026-04-23
|
|
45
|
+
|
|
46
|
+
### Changed (commands → skills migration; zero user-visible change)
|
|
47
|
+
|
|
48
|
+
All 9 slash workflows migrate from `commands/*.md` to
|
|
49
|
+
`skills/<name>/SKILL.md`, per Anthropic's recommended plugin layout.
|
|
50
|
+
`/curdx-flow:<name>` still resolves to the same slash paths with the
|
|
51
|
+
same arguments and output. File history is preserved via `git mv`.
|
|
52
|
+
|
|
53
|
+
- `skills/implement/SKILL.md` — progressive-disclosure split to
|
|
54
|
+
`skills/implement/references/wave-execution.md`; body reduced
|
|
55
|
+
from 381 to 240 lines.
|
|
56
|
+
- `/curdx-flow:verify` and `/curdx-flow:debug` — route via
|
|
57
|
+
Anthropic's native `context: fork + agent:` mechanism instead of
|
|
58
|
+
hand-rolled `Task()` dispatch prose. `agents/flow-verifier.md`
|
|
59
|
+
and `agents/flow-debugger.md` are unchanged.
|
|
60
|
+
- `/curdx-flow:review --devex` — new optional flag; wires the
|
|
61
|
+
previously caller-less `gates/devex-gate.md` into the reviewer
|
|
62
|
+
dispatch.
|
|
63
|
+
- `cli/install-companions.js` — split by concern into four modules
|
|
64
|
+
(`install-required-plugins.js`, `install-bundled-mcps.js`,
|
|
65
|
+
`install-recommended-plugins.js`, `install-context7-config.js`).
|
|
66
|
+
`install-companions.js` becomes a re-export barrel; callers in
|
|
67
|
+
`cli/install.js` and `cli/install-workflow.js` unchanged.
|
|
68
|
+
- `package.json.files` — drops `"commands/"` (directory removed);
|
|
69
|
+
`"skills/"` retained.
|
|
70
|
+
- `.gitignore` — anchors the `references/` pattern to the repo root
|
|
71
|
+
(`/references/`) so `skills/<name>/references/` progressive-disclosure
|
|
72
|
+
directories ship with the plugin.
|
|
73
|
+
|
|
74
|
+
### Added (internal test coverage)
|
|
75
|
+
|
|
76
|
+
- `test/skill-surface-parity.test.js` — snapshot of 14 unqualified
|
|
77
|
+
slash names (9 migrated + 5 pre-existing); pins the public
|
|
78
|
+
command surface across every refactor stage.
|
|
79
|
+
- `test/schema-drift.test.js` — strict equality between
|
|
80
|
+
`schemas/*.json` mode enum and documented v2 modes.
|
|
81
|
+
- `test/registry-session-start-parity.test.js` — strict equality
|
|
82
|
+
between `hooks/scripts/session-start.sh` plugin list and
|
|
83
|
+
`cli/registry.js` RECOMMENDED_PLUGINS.
|
|
84
|
+
- `test/language-rule-scan.test.js` — no CJK characters outside
|
|
85
|
+
`cli/**` and an explicit small allow-list.
|
|
86
|
+
- `test/install-required-plugins.test.js`,
|
|
87
|
+
`test/install-bundled-mcps.test.js`,
|
|
88
|
+
`test/install-recommended-plugins.test.js`,
|
|
89
|
+
`test/install-context7-config.test.js` — module-import smoke
|
|
90
|
+
tests for the four split install modules.
|
|
91
|
+
- `test/pack-tarball-smoke.test.js` — `npm pack --dry-run`
|
|
92
|
+
assertions that `commands/` is absent, 14 SKILL.md files and
|
|
93
|
+
`skills/implement/references/` ship, and every top-level
|
|
94
|
+
infrastructure directory is present in the tarball (Acceptance
|
|
95
|
+
#18 from `docs/refactor-plan.md`).
|
|
96
|
+
|
|
97
|
+
Total test count: 85 → 104, all green.
|
|
98
|
+
|
|
99
|
+
### Fixed (drift cleanup)
|
|
100
|
+
|
|
101
|
+
- `schemas/spec-state.schema.json`, `schemas/config.schema.json` —
|
|
102
|
+
remove unreachable `sketch` and `autonomous` mode enum values.
|
|
103
|
+
Both were retired on the user-facing surface in v2 but never
|
|
104
|
+
cleaned from the schemas (see `MIGRATION.md`).
|
|
105
|
+
- `hooks/scripts/session-start.sh` — adds `chrome-devtools-mcp` to
|
|
106
|
+
the dependency-check list, closing the beta.8 drift that
|
|
107
|
+
`cli/registry.js` was supposed to prevent.
|
|
108
|
+
- `agent-preamble/preamble.md` — removes an empty
|
|
109
|
+
`| Task | Guideline |` table header left behind by a prior edit.
|
|
110
|
+
- `README.zh.md` — masthead paragraph rewritten from the pre-v2
|
|
111
|
+
"meta-framework" positioning to the current "discipline layer"
|
|
112
|
+
framing, parallel to `README.md`.
|
|
113
|
+
- `cli/protocols-body.md` — explicit carve-out paragraph allowing
|
|
114
|
+
`cli/` installer menus to be bilingual; every other layer stays
|
|
115
|
+
English for AI / agent adaptation.
|
|
116
|
+
|
|
117
|
+
### Fixed (hooks — previously pending)
|
|
15
118
|
|
|
16
119
|
- `hooks/hooks.json` + `hooks/scripts/inject-karpathy.sh` — migrated the L1 baseline injector from the `InstructionsLoaded` event to `SessionStart` with `matcher: "startup|clear|compact"`. Per the Claude Code hooks docs (code.claude.com/docs/en/hooks), `InstructionsLoaded` is an observability-only event: its hook schema has no `hookSpecificOutput` field, so the injector's `{"hookSpecificOutput":{"hookEventName":"InstructionsLoaded","additionalContext":…}}` payload was rejected at session boot with `Hook JSON output validation failed — (root): Invalid input`, producing the `SessionStart:startup hook error` banner on every Claude Code launch. The `startup|clear|compact` matcher preserves the original "baseline survives compaction" intent. Also updated `docs/architecture.md` and `README.zh.md` hook-event inventories.
|
|
17
120
|
|
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@ Not a framework. Not a methodology library. A discipline layer.
|
|
|
24
24
|
|
|
25
25
|
## Install (one command)
|
|
26
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.
|
|
28
|
+
|
|
27
29
|
```bash
|
|
28
30
|
npx @curdx/flow install --all
|
|
29
31
|
```
|
|
@@ -101,6 +103,7 @@ npm i -g @curdx/flow@^1.1
|
|
|
101
103
|
- **5 hook events** that enforce the discipline without user action
|
|
102
104
|
- **Required docs/reasoning tools** — Context7 official plugin (MCP + skill + docs agent) and sequential-thinking MCP
|
|
103
105
|
- **4 recommended companion plugins** — pua, claude-mem, frontend-design, chrome-devtools-mcp
|
|
106
|
+
- **Plugin PATH helper** — `curdx-flow` is available inside Claude Code Bash sessions via the plugin `bin/` directory on modern Claude Code
|
|
104
107
|
- **Offline-capable install** — the npm package ships the full plugin body; zero GitHub round-trips during install
|
|
105
108
|
|
|
106
109
|
## Documentation
|
package/README.zh.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# CurdX-Flow
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
>
|
|
3
|
+
> **让 Claude Code 不再假装"完成"。**
|
|
4
|
+
> 规格驱动工作流 + 目标反向验证 + Karpathy 4 原则。
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@curdx/flow)
|
|
7
7
|
[](./LICENSE)
|
|
@@ -10,11 +10,17 @@
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 为什么存在
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Claude Code 会漂——声称功能跑通但从未跑过测试、用训练数据里陈旧的库 API、把三个问题的代码量塞进六问。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
CurdX-Flow 是 Claude Code 之上的一层薄**纪律层**,只做三件事,拒绝做更多:
|
|
18
|
+
|
|
19
|
+
1. **一套规格工作流**(研究 → 需求 → 设计 → 任务),用于超出一次性 vibe-code 尺度的特性。
|
|
20
|
+
2. **目标反向验证**——扫描实现是否对齐每一条 FR / AC / AD,揪出桩代码、假完成、未被测试覆盖的验收标准。
|
|
21
|
+
3. **Karpathy 4 原则**(先思考再编码 / 简单优先 / 外科式修改 / 目标驱动)通过常开 hook 和 gate 强制执行。
|
|
22
|
+
|
|
23
|
+
不是框架。不是方法论库。就是一层纪律。
|
|
18
24
|
|
|
19
25
|
## 一览(v2)
|
|
20
26
|
|
|
@@ -25,6 +31,7 @@ CurdX-Flow 是一个 Claude Code 插件,把 6 个验证过的 AI 工程工作
|
|
|
25
31
|
- **10 个知识文档** — 规格驱动 / POC-First / 原子提交 / 执行策略 / ...
|
|
26
32
|
- **4 个 hook 事件** — SessionStart / SessionStart(startup|clear|compact) / Stop / PreToolUse
|
|
27
33
|
- **必需文档/推理工具 + 4 个推荐插件** — Context7 官方插件 / sequential-thinking MCP + pua / claude-mem / frontend-design / chrome-devtools-mcp
|
|
34
|
+
- **插件 PATH helper** — 在新版 Claude Code 的 Bash 工具里可直接调用 `curdx-flow`
|
|
28
35
|
- **优雅降级** — 依赖缺失时进入 fallback 模式并清晰告知
|
|
29
36
|
|
|
30
37
|
## 为什么用
|
|
@@ -41,6 +48,8 @@ CurdX-Flow 是一个 Claude Code 插件,把 6 个验证过的 AI 工程工作
|
|
|
41
48
|
|
|
42
49
|
## 安装
|
|
43
50
|
|
|
51
|
+
需要 Claude Code v2.1.110+(推荐最新版)。安装器会检查本机 `claude`,`curdx-flow doctor` 会在版本过旧、无法完整支持新版插件依赖解析时给出警告。
|
|
52
|
+
|
|
44
53
|
```bash
|
|
45
54
|
npx @curdx/flow install --all
|
|
46
55
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CurdX-Flow Agent Shared Preamble
|
|
2
2
|
|
|
3
|
-
> All `flow-*` agents
|
|
3
|
+
> All `flow-*` agents inherit this file via `@${CLAUDE_PLUGIN_ROOT}/agent-preamble/preamble.md`.
|
|
4
4
|
> This is a behavioral baseline, not a suggestion. Violation counts as agent failure.
|
|
5
5
|
|
|
6
6
|
---
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
### 1. Think Before Coding
|
|
11
11
|
- State your assumptions before starting
|
|
12
|
-
- When
|
|
12
|
+
- When uncertainty changes product/business direction, use AskUserQuestion unless the current mode forbids it; in quick mode, state the best assumption and continue
|
|
13
13
|
- Offer multiple interpretations and let the user choose
|
|
14
14
|
- Never skip "understanding" and jump straight to "implementation"
|
|
15
15
|
|
|
@@ -74,10 +74,7 @@ Do NOT query context7 for:
|
|
|
74
74
|
|
|
75
75
|
### Structured thinking → sequential-thinking MCP
|
|
76
76
|
|
|
77
|
-
Use `sequential-thinking` proportional to **decision complexity**, not a fixed quota.
|
|
78
|
-
|
|
79
|
-
| Task | Guideline |
|
|
80
|
-
|------|-----------|
|
|
77
|
+
Use `sequential-thinking` proportional to **decision complexity**, not a fixed quota. Any thought count is a **ceiling for genuinely hard cases**, not a floor to hit.
|
|
81
78
|
|
|
82
79
|
**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
80
|
|
|
@@ -34,19 +34,20 @@ Output: `.flow/specs/<name>/qa-report.md`.
|
|
|
34
34
|
|
|
35
35
|
## Core Tool: chrome-devtools MCP
|
|
36
36
|
|
|
37
|
-
What you can do via `
|
|
37
|
+
What you can do via `mcp__chrome_devtools__*`:
|
|
38
38
|
|
|
39
39
|
### Navigation and Interaction
|
|
40
|
-
- `
|
|
41
|
-
- `click` / `
|
|
42
|
-
- `
|
|
43
|
-
- `wait_for` — wait for
|
|
40
|
+
- `new_page` / `navigate_page` — open or change URL
|
|
41
|
+
- `click` / `type_text` / `fill` — interact
|
|
42
|
+
- `take_screenshot` — take screenshot
|
|
43
|
+
- `wait_for` — wait for visible text
|
|
44
44
|
|
|
45
45
|
### Diagnostics
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
46
|
+
- `list_console_messages` — capture console errors
|
|
47
|
+
- `list_network_requests` — list of network requests (including failed)
|
|
48
48
|
- `performance_start_trace` / `performance_stop_trace` — performance trace
|
|
49
|
-
- `
|
|
49
|
+
- `take_snapshot` — accessibility tree snapshot
|
|
50
|
+
- `lighthouse_audit` — accessibility, SEO, and best-practice audit
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
@@ -78,17 +79,17 @@ Read from `design.md`:
|
|
|
78
79
|
For each core AC, run through it in the browser:
|
|
79
80
|
|
|
80
81
|
```
|
|
81
|
-
|
|
82
|
+
mcp__chrome_devtools__navigate_page → localhost:3000
|
|
82
83
|
click → login button
|
|
83
84
|
fill → email / password
|
|
84
85
|
click → submit
|
|
85
86
|
wait_for → redirect to dashboard
|
|
86
|
-
|
|
87
|
+
mcp__chrome_devtools__take_screenshot
|
|
87
88
|
```
|
|
88
89
|
|
|
89
90
|
Capture:
|
|
90
|
-
- Console errors (
|
|
91
|
-
- Network failures (non-2xx in
|
|
91
|
+
- Console errors (`list_console_messages`)
|
|
92
|
+
- Network failures (non-2xx in `list_network_requests`)
|
|
92
93
|
- Performance data (e.g. LCP, INP)
|
|
93
94
|
- Final URL / page state
|
|
94
95
|
|
|
@@ -122,7 +123,7 @@ Capture:
|
|
|
122
123
|
### Step 5: Accessibility Review
|
|
123
124
|
|
|
124
125
|
```
|
|
125
|
-
|
|
126
|
+
mcp__chrome_devtools__take_snapshot
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
Check:
|
|
@@ -134,9 +135,9 @@ Check:
|
|
|
134
135
|
### Step 6: Performance Review
|
|
135
136
|
|
|
136
137
|
```
|
|
137
|
-
|
|
138
|
+
mcp__chrome_devtools__performance_start_trace
|
|
138
139
|
# run through user flow
|
|
139
|
-
|
|
140
|
+
mcp__chrome_devtools__performance_stop_trace
|
|
140
141
|
```
|
|
141
142
|
|
|
142
143
|
Check:
|
|
@@ -62,8 +62,8 @@ WebSearch: "<competitor> <feature> screenshot"
|
|
|
62
62
|
|
|
63
63
|
If chrome-devtools MCP is available:
|
|
64
64
|
```
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
mcp__chrome_devtools__navigate_page → <competitor URL>
|
|
66
|
+
mcp__chrome_devtools__take_screenshot → save to .flow/specs/<name>/ui-research/refs/
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### Step 4: Classify with sequential-thinking
|
package/agents/flow-verifier.md
CHANGED
|
@@ -124,11 +124,11 @@ Code inspection + unit tests are **insufficient** evidence for a UI-facing AC. A
|
|
|
124
124
|
For every UI-facing AC:
|
|
125
125
|
|
|
126
126
|
```
|
|
127
|
-
1. Check chrome-devtools MCP availability (
|
|
127
|
+
1. Check chrome-devtools MCP availability (`mcp__chrome_devtools__*`).
|
|
128
128
|
2. If available:
|
|
129
129
|
- Start the app (dev server or served build) in the current repo.
|
|
130
|
-
- Drive the flow described in the AC: click /
|
|
131
|
-
- Capture
|
|
130
|
+
- Drive the flow described in the AC: `click` / `type_text` / `fill` / `navigate_page`.
|
|
131
|
+
- Capture evidence with `take_screenshot`, `list_console_messages`, and `list_network_requests`.
|
|
132
132
|
- Compare observed behavior against the AC text.
|
|
133
133
|
- Verdict: verified | partial | failed, with the screenshot as evidence.
|
|
134
134
|
3. If chrome-devtools MCP is NOT available:
|
package/bin/curdx-flow
ADDED
package/cli/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# curdx-flow CLI
|
|
2
2
|
|
|
3
|
-
One-shot installer + external diagnostics + external init.
|
|
3
|
+
One-shot installer + external diagnostics + external init. Requires Node.js 18+ and Claude Code v2.1.110+.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -25,10 +25,11 @@ npx @curdx/flow upgrade
|
|
|
25
25
|
Steps:
|
|
26
26
|
1. Verify the `claude` CLI is installed
|
|
27
27
|
2. `claude plugin marketplace add --scope user curdx/curdx-flow`
|
|
28
|
-
3.
|
|
29
|
-
4.
|
|
30
|
-
5.
|
|
31
|
-
6.
|
|
28
|
+
3. Pre-register required companion marketplaces so plugin dependencies can resolve
|
|
29
|
+
4. `claude plugin install --scope user curdx-flow@curdx-flow-marketplace`
|
|
30
|
+
5. Install required companion plugin: **context7-plugin@context7-marketplace**
|
|
31
|
+
6. Register required user-level MCP: **sequential-thinking**
|
|
32
|
+
7. Interactively (or automatically) install recommended plugins: **pua**, **claude-mem**, **frontend-design**, **chrome-devtools-mcp**
|
|
32
33
|
|
|
33
34
|
| Flag | Purpose |
|
|
34
35
|
|------|---------|
|
|
@@ -66,12 +67,12 @@ The **core workflow** still lives inside Claude Code (`/curdx-flow:*` commands).
|
|
|
66
67
|
- **External diagnostics**: check health without entering Claude Code
|
|
67
68
|
- **Batch deployment**: write a script for your team — `for host in ...; do ssh $host npx github:curdx/curdx-flow install; done`
|
|
68
69
|
|
|
69
|
-
##
|
|
70
|
+
## Small-dependency design
|
|
70
71
|
|
|
71
72
|
- Pure ES Modules (Node 18+)
|
|
72
|
-
-
|
|
73
|
-
- No `
|
|
74
|
-
- Fast `npx`
|
|
73
|
+
- Tiny runtime dependency surface (`@clack/prompts`, `picocolors`)
|
|
74
|
+
- No `commander` / `inquirer` / `execa`
|
|
75
|
+
- Fast `npx` and offline-capable plugin install
|
|
75
76
|
|
|
76
77
|
## Local development
|
|
77
78
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register MCP servers that curdx-flow depends on at user level via
|
|
3
|
+
* `claude mcp add`. Source-of-truth list: cli/registry.js BUNDLED_MCPS.
|
|
4
|
+
* Preserves existing user-level entries when mcp.preserveExisting is set.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { addMcp } from "./lib/claude-ops.js";
|
|
8
|
+
import { BUNDLED_MCPS } from "./registry.js";
|
|
9
|
+
import { color, log, readUserMcpConfig, resultLastLine } from "./utils.js";
|
|
10
|
+
|
|
11
|
+
export async function registerBundledMcps() {
|
|
12
|
+
log.blank();
|
|
13
|
+
log.info("Registering required MCP servers (user-level)...");
|
|
14
|
+
const existingUserMcps = readUserMcpConfig();
|
|
15
|
+
for (const mcp of BUNDLED_MCPS) {
|
|
16
|
+
if (mcp.preserveExisting && existingUserMcps.has(mcp.name)) {
|
|
17
|
+
const existing = existingUserMcps.get(mcp.name);
|
|
18
|
+
log.info(
|
|
19
|
+
` ${mcp.name.padEnd(22)} ${color.dim(`already registered (${(existing.args || []).join(" ")}) — preserving`)}`
|
|
20
|
+
);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const r = await addMcp(mcp);
|
|
24
|
+
if (r.code === 0) {
|
|
25
|
+
log.ok(` ${mcp.name.padEnd(22)} ${color.dim("registered")}`);
|
|
26
|
+
} else if (r.stderr.includes("already exists")) {
|
|
27
|
+
log.info(` ${mcp.name.padEnd(22)} ${color.dim("already exists — skipped")}`);
|
|
28
|
+
} else {
|
|
29
|
+
log.warn(
|
|
30
|
+
` ${mcp.name.padEnd(22)} registration failed: ${resultLastLine(r)}`
|
|
31
|
+
);
|
|
32
|
+
log.info(
|
|
33
|
+
` Run manually: claude mcp add --scope user ${mcp.name} -- ${mcp.command} ${mcp.args.join(" ")}`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|