harnessed 4.36.0 → 4.37.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/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var package_default = {
3
- version: "4.36.0"};
3
+ version: "4.37.0"};
4
4
 
5
5
  // src/index.ts
6
6
  var VERSION = package_default.version;
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,QAqGb,CAAA;;;AClGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.36.0\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\",\n \"harnessed-inject-state\": \"./bin/harnessed-inject-state.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"manifests\",\n \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup && node ./scripts/build-hooks.mjs\",\n \"build:hooks\": \"node ./scripts/build-hooks.mjs\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"bench\": \"vitest bench --run\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\",\n \"build:binary\": \"bun scripts/build-binary.mjs\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"esbuild\": \"0.27.7\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
1
+ {"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,QAqGb,CAAA;;;AClGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.37.0\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\",\n \"harnessed-inject-state\": \"./bin/harnessed-inject-state.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"manifests\",\n \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup && node ./scripts/build-hooks.mjs\",\n \"build:hooks\": \"node ./scripts/build-hooks.mjs\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"bench\": \"vitest bench --run\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\",\n \"build:binary\": \"bun scripts/build-binary.mjs\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"esbuild\": \"0.27.7\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harnessed",
3
- "version": "4.36.0",
3
+ "version": "4.37.0",
4
4
  "description": "AI coding harness package manager + composition orchestrator",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -259,7 +259,12 @@ capabilities:
259
259
  # 或 optional 自装 manifest (manifests/optional/chrome-devtools-mcp.yaml,
260
260
  # mcp-stdio-add 兜底, 供不装 ecc 的用户)。双装会产生同名双前缀调用歧义
261
261
  # (doctor `ecc` check 挡残留双装)。
262
- description: "性能/a11y/内存泄漏诊断 (非功能性 only; NOT for E2E test); provider 二选一 — ecc (bonus tier, ECC 唯一默认 MCP connector) 或 optional 自装 manifest chrome-devtools-mcp (不装 ecc 的兜底); 双装 doctor warn; 两者都缺时本 capability 不可用"
262
+ # 「两者都缺时本 capability 不可用」曾经只是这行散文 —— 无任何代码求值,
263
+ # 于是 verify/qa phase 05 在零 provider 的机器上照样 fire。现由
264
+ # judgments.web-testing-routing.chrome-devtools-mcp-diagnostic.fires 的
265
+ # `chrome_devtools_available == true` arm 强制 (实测: probe-chrome-devtools.ts;
266
+ # 自动填入: `harnessed facts`; 报告: doctor `ecc` check)。
267
+ description: "性能/a11y/内存泄漏诊断 (非功能性 only; NOT for E2E test); provider 二选一 — ecc (bonus tier, ECC 唯一默认 MCP connector) 或 optional 自装 manifest chrome-devtools-mcp (不装 ecc 的兜底); 双装 doctor warn; 两者都缺时本 capability 不可用 —— 由 gate fact chrome_devtools_available 强制, 该 lane 不 fire, 开启路径 `harnessed install ecc` 或 `claude mcp add chrome-devtools-mcp` 二选一"
263
268
  fires_when:
264
269
  - subtask.type in ['perf_diagnose', 'a11y_audit', 'memory_leak']
265
270
 
@@ -7,7 +7,8 @@
7
7
  # 手 (AI 实时操作) — /browse 主导 (gstack headless Playwright);
8
8
  # 未装 gstack 降级 playwright-cli (一行 Bash, token 最省)
9
9
  # 筋骨 (Python 后端联动) — webapp-testing skill (tests/e2e/*.py)
10
- # 非功能性诊断 (性能/a11y/内存) — chrome-devtools-mcp (必用)
10
+ # 非功能性诊断 (性能/a11y/内存) — chrome-devtools-mcp (有 provider 时必用;
11
+ # ecc / 自装 manifest 二选一, 两者都缺则该 lane 不 fire)
11
12
  #
12
13
  # T2.3 — 本 file 的 4 trigger 之前是运行时孤儿 (零 gate ref → resolveJudgmentGate
13
14
  # 纯 ref 驱动, 永不加载求值)。现由 workflows/verify/qa/workflow.yaml 的 4 条 lane
@@ -55,13 +56,21 @@ triggers:
55
56
 
56
57
  chrome-devtools-mcp-diagnostic:
57
58
  description: |
58
- chrome-devtools-mcp — 非功能性诊断必须用 (NOT playwright/test/cli/webapp-testing)。
59
- LCP / Core Web Vitals / ARIA / 堆快照。
59
+ chrome-devtools-mcp — 非功能性诊断在 provider 在场时必须用它
60
+ (NOT playwright/test/cli/webapp-testing)。LCP / Core Web Vitals / ARIA / 堆快照。
60
61
  Provider 说明 (4.32.22 终局): 二选一 — ecc (manifests/optional/ecc.yaml,
61
62
  bonus tier; ECC 唯一默认 MCP connector) 或 optional 自装 manifest
62
63
  (manifests/optional/chrome-devtools-mcp.yaml, mcp-stdio-add 兜底, 供不装
63
64
  ecc 的用户; setup optional offer 可勾选)。双装同名双前缀歧义, doctor
64
- `ecc` check 会 warn。两者都缺 → 本 capability 不可用。
65
- fires_when: "subtask.test_type == 'perf-diagnostic'"
65
+ `ecc` check 会 warn。
66
+ 两者都缺 → 本 capability 不可用, 本 trigger 不 fire。这一句从散文变成判据:
67
+ fires_when 第二个 arm `chrome_devtools_available == true` 由
68
+ src/cli/lib/probe-chrome-devtools.ts 实测 (ecc plugin / 官方 plugin /
69
+ stdio mcpServers 三种注册形态), 经 `harnessed facts` 自动填入 (确定性事实,
70
+ 不问模型)。probe 抛错 = unknown → 仍算 available (fail-soft; 绝不静默删掉
71
+ 已声明的诊断能力, sister src/workflow/skipGate.ts)。
72
+ 未 fire 时的开启路径 (二选一): `harnessed install ecc`
73
+ 或 `claude mcp add chrome-devtools-mcp` —— 只装其中一个。
74
+ fires_when: "subtask.test_type == 'perf-diagnostic' and chrome_devtools_available == true"
66
75
  invokes:
67
76
  - capability: chrome-devtools-mcp
@@ -63,6 +63,36 @@ Phase 01-test 条件性 fire `diagnose` (capabilities.yaml L55-64 mattpocock-ski
63
63
  test fail 时进入 diagnose loop (reproduce → minimise → hypothesise → instrument →
64
64
  fix → regression-test), 测试通过则 skip diagnose entirely。
65
65
 
66
+ ## Narrowing the test run with CodeGraph (opt-in, presence-conditional)
67
+
68
+ **Only when the project has a `.codegraph/` index AND `codegraph` is on PATH.** Both
69
+ missing-cases run the full suite exactly as before, **silently — no install nag** (same
70
+ standing contract as `workflows/task/code` CodeGraph navigation).
71
+
72
+ When both are present, derive the affected test files from the working-tree diff and run
73
+ those first (upstream's own CI/hook recipe):
74
+
75
+ ```bash
76
+ AFFECTED=$(git diff --name-only HEAD | codegraph affected --stdin --quiet)
77
+ if [ -n "$AFFECTED" ]; then npx vitest run $AFFECTED; fi
78
+ ```
79
+
80
+ `codegraph affected` traces import dependencies transitively (default depth 5) from the
81
+ changed source files to the test files that reach them. Do NOT re-index or `codegraph
82
+ sync` first: the index auto-syncs on every file change.
83
+
84
+ **An EMPTY affected list means "run the full suite" — never "run nothing".** Empty is
85
+ "the trace found no edge", not "there is nothing to verify": the diff may touch files the
86
+ graph does not model (config, fixtures, generated code), or the graph may simply be
87
+ behind. A narrowing heuristic that can silently run zero tests turns a green run into a
88
+ lie, so an empty list falls straight back to the full suite.
89
+
90
+ **The narrowed run is a fast first pass, not a substitute for the full suite.** Use it
91
+ inside the red-green inner loop for quick feedback. **The completion evidence for this sub
92
+ MUST come from a FULL-suite run** — the test log cited in `artifacts_expected` /
93
+ `tdd-evidence.md` and the run backing `<promise>COMPLETE</promise>` are the full-suite
94
+ result. Never mark this sub complete on a narrowed pass alone.
95
+
66
96
  ## How to invoke
67
97
 
68
98
  !`harnessed checkpoint intent task-test`
@@ -63,6 +63,32 @@ SDK,用户发出明确信号时可切换至 mattpocock /tdd 别名路径。
63
63
  测试失败时进入 diagnose 循环(reproduce → minimise → hypothesise → instrument →
64
64
  fix → regression-test),测试通过则完全跳过 diagnose。
65
65
 
66
+ ## 用 CodeGraph 收窄测试范围(opt-in,presence-conditional)
67
+
68
+ **仅当项目存在 `.codegraph/` 索引且 `codegraph` 在 PATH 上时生效。** 两者任一缺失就照旧跑
69
+ 全量测试,**且静默 —— 不做安装提示**(与 `workflows/task/code` 的 CodeGraph 导航同一条既定
70
+ 契约)。
71
+
72
+ 两者都在时,从工作树 diff 推导出受影响的测试文件并优先跑它们(上游自带的 CI/hook 配方):
73
+
74
+ ```bash
75
+ AFFECTED=$(git diff --name-only HEAD | codegraph affected --stdin --quiet)
76
+ if [ -n "$AFFECTED" ]; then npx vitest run $AFFECTED; fi
77
+ ```
78
+
79
+ `codegraph affected` 从改动的源文件出发,传递式追踪 import 依赖(默认深度 5)找到能触达它们
80
+ 的测试文件。**不要**先重建索引或跑 `codegraph sync`:索引在每次文件变更时自动同步。
81
+
82
+ **affected 列表为空表示「跑全量套件」,绝不是「什么都不跑」。** 空的含义是「没追踪到边」,
83
+ 而非「没有东西需要验证」:diff 可能触及图未建模的文件(配置、fixture、生成代码),也可能只是
84
+ 图落后了。一个能悄无声息跑零个测试的收窄启发式会把绿色跑结果变成谎言,所以列表为空时直接
85
+ 回退到全量套件。
86
+
87
+ **收窄跑只是快速首过,不能替代全量套件。** 它用于 red-green 内循环拿快速反馈。**本 sub 的完成
88
+ 证据必须来自一次全量跑** —— `artifacts_expected` / `tdd-evidence.md` 中引用的测试日志、以及
89
+ 支撑 `<promise>COMPLETE</promise>` 的那次运行,都是全量套件的结果。绝不允许仅凭一次收窄跑通
90
+ 就把本 sub 标记为完成。
91
+
66
92
  ## 如何调用
67
93
 
68
94
  !`harnessed checkpoint intent task-test`
@@ -45,8 +45,9 @@ Sister `workflows/capabilities.yaml` entries:
45
45
  - `playwright-cli` — Bucket 2 special-purpose (impl: npm-cli, browser_probe — 未装 gstack 时的降级)
46
46
  - `playwright-test` — Bucket 2 special-purpose (impl: npm-cli, e2e_test typescript)
47
47
  - `webapp-testing` — Bucket 2 special-purpose (impl: gstack, e2e_test python)
48
- - `chrome-devtools-mcp` — Bucket 4 tool-mcp (impl: mcp, cmd: chrome-devtools — 非功能性诊断必用;
49
- provider 二选一: ecc bonus tier 或 optional 自装 manifest,两者都缺则该 lane 不可用)
48
+ - `chrome-devtools-mcp` — Bucket 4 tool-mcp (impl: mcp, cmd: chrome-devtools — 有 provider 时
49
+ 非功能性诊断必用; provider 二选一: ecc bonus tier 或 optional 自装 manifest,两者都缺则
50
+ 该 lane 不 fire,由 gate fact `chrome_devtools_available` 强制)
50
51
 
51
52
  ## Gate ref
52
53
 
@@ -65,7 +66,17 @@ Sister `workflows/judgments/web-testing-routing.yaml` (T2.3 — 4 条 lane 各
65
66
  - 探查 / 调试 / 一次性确认 → `/browse` 主导 (token 高效, 可复用 cookies 与会话状态);
66
67
  未装 gstack 时降级 `playwright-cli` — phase 03
67
68
  - setup 需 Python 后端 (Tortoise ORM / pandas) → `webapp-testing` skill — phase 04
68
- - 性能 / a11y / 内存诊断 → **必用** `chrome-devtools-mcp` (NOT playwright/test/cli/webapp-testing) — phase 05
69
+ - 性能 / a11y / 内存诊断 → **provider 在场时必用** `chrome-devtools-mcp`
70
+ (NOT playwright/test/cli/webapp-testing) — phase 05。
71
+ chrome-devtools 有两个 provider,且都是 optional:**ecc plugin** 或**自装的
72
+ chrome-devtools-mcp server**。两者都缺时本 lane 的 gate
73
+ (`chrome-devtools-mcp-diagnostic.fires` 含 `chrome_devtools_available == true`)
74
+ 为 false,phase 05 不 fire —— 不要去调一个不存在的工具,也不要用
75
+ playwright / webapp-testing 顶替它做非功能性诊断。
76
+ 开启路径二选一(只装一个,双装会产生同名双前缀调用歧义):
77
+ `harnessed install ecc`,或 `claude mcp add chrome-devtools-mcp`。
78
+ 当前机器的实测值:`harnessed facts verify` 的 `derived.chrome_devtools_available`
79
+ (`source` 字段写明原因与开启路径);`harnessed doctor` 的 `ecc` check 同样会报。
69
80
 
70
81
  ## How to invoke
71
82
 
@@ -45,8 +45,9 @@ Sister `workflows/capabilities.yaml` 条目:
45
45
  - `playwright-cli` — Bucket 2 special-purpose (impl: npm-cli, browser_probe——未装 gstack 时的降级)
46
46
  - `playwright-test` — Bucket 2 special-purpose (impl: npm-cli, e2e_test typescript)
47
47
  - `webapp-testing` — Bucket 2 special-purpose (impl: gstack, e2e_test python)
48
- - `chrome-devtools-mcp` — Bucket 4 tool-mcp (impl: mcp, cmd: chrome-devtools——非功能性诊断必用;
49
- provider 二选一: ecc bonus tier 或 optional 自装 manifest,两者都缺则该 lane 不可用)
48
+ - `chrome-devtools-mcp` — Bucket 4 tool-mcp (impl: mcp, cmd: chrome-devtools——有 provider 时
49
+ 非功能性诊断必用;provider 二选一: ecc bonus tier 或 optional 自装 manifest,两者都缺则
50
+ 该 lane 不 fire,由 gate fact `chrome_devtools_available` 强制)
50
51
 
51
52
  ## Gate ref
52
53
 
@@ -65,7 +66,17 @@ Sister `workflows/judgments/web-testing-routing.yaml`(T2.3 — 4 条 lane 各
65
66
  - 探查 / 调试 / 一次性确认 → `/browse` 主导(token 高效,可复用 cookies 与会话状态);
66
67
  未装 gstack 时降级 `playwright-cli`——phase 03
67
68
  - setup 需 Python 后端 (Tortoise ORM / pandas) → `webapp-testing` skill——phase 04
68
- - 性能 / a11y / 内存诊断 → **必用** `chrome-devtools-mcp`(NOT playwright/test/cli/webapp-testing)——phase 05
69
+ - 性能 / a11y / 内存诊断 → **provider 在场时必用** `chrome-devtools-mcp`
70
+ (NOT playwright/test/cli/webapp-testing)——phase 05。
71
+ chrome-devtools 有两个 provider,且都是 optional:**ecc plugin** 或**自装的
72
+ chrome-devtools-mcp server**。两者都缺时本 lane 的 gate
73
+ (`chrome-devtools-mcp-diagnostic.fires` 含 `chrome_devtools_available == true`)
74
+ 为 false,phase 05 不 fire —— 不要去调一个不存在的工具,也不要用
75
+ playwright / webapp-testing 顶替它做非功能性诊断。
76
+ 开启路径二选一(只装一个,双装会产生同名双前缀调用歧义):
77
+ `harnessed install ecc`,或 `claude mcp add chrome-devtools-mcp`。
78
+ 当前机器的实测值:`harnessed facts verify` 的 `derived.chrome_devtools_available`
79
+ (`source` 字段写明原因与开启路径);`harnessed doctor` 的 `ecc` check 同样会报。
69
80
 
70
81
  ## 如何调用
71
82
 
@@ -25,7 +25,8 @@ disciplines_applied: [karpathy, output-style, language, operational, priority, p
25
25
  # chrome-devtools-mcp」之前对模型完全不可见 (不在任何 tools_available)。
26
26
  # chrome-devtools-mcp provider 二选一: ecc (bonus tier, ECC 唯一默认 MCP connector)
27
27
  # 或 optional 自装 manifest chrome-devtools-mcp (不装 ecc 的兜底); 双装 doctor warn;
28
- # 两者都缺时该 lane 不可用 (注记体例同 web-testing-routing.yaml)。
28
+ # 两者都缺时该 lane 不可用 —— 不再只是注记: phase 05 gate 含
29
+ # `chrome_devtools_available == true` arm 强制 (注记体例同 web-testing-routing.yaml)。
29
30
  tools_available:
30
31
  - gstack-qa
31
32
  - browse
@@ -77,7 +78,12 @@ phases:
77
78
  gate: judgments.web-testing-routing.webapp-testing-python-backend.fires
78
79
  max_iterations: 3
79
80
 
80
- # 非功能性诊断 — 必用 chrome-devtools-mcp (NOT playwright/test/cli/webapp-testing)
81
+ # 非功能性诊断 — 有 provider 时必用 chrome-devtools-mcp (NOT playwright/test/cli/webapp-testing)。
82
+ # gate 有两个 arm: subtask.test_type == 'perf-diagnostic' AND chrome_devtools_available == true。
83
+ # 第二个 arm 由 src/cli/lib/probe-chrome-devtools.ts 实测 (ecc plugin / 官方 plugin /
84
+ # stdio mcpServers), `harnessed facts` 自动填入。两个 provider 都缺 → 本 phase 不 fire;
85
+ # 开启路径二选一: `harnessed install ecc` 或 `claude mcp add chrome-devtools-mcp`
86
+ # (只装一个; 双装 doctor `ecc` check warn)。probe 抛错 = unknown → 仍 fire (fail-soft)。
81
87
  - id: 05-perf-a11y-diagnostic
82
88
  name: chrome-devtools-mcp (LCP / Core Web Vitals / ARIA / 堆快照 — 非功能性 only)
83
89
  upstream: chrome-devtools-mcp