harnessed 4.36.0 → 4.38.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/bin/harnessed-inject-state.mjs +22 -2
- package/dist/cli.mjs +466 -95
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/manifests/optional/perturn-inject-invalidate.yaml +57 -0
- package/package.json +1 -1
- package/workflows/capabilities.yaml +6 -1
- package/workflows/judgments/web-testing-routing.yaml +14 -5
- package/workflows/task/test/SKILL.md +30 -0
- package/workflows/task/test/SKILL.zh-Hans.md +26 -0
- package/workflows/verify/auto/SKILL.md +11 -0
- package/workflows/verify/auto/SKILL.zh-Hans.md +11 -0
- package/workflows/verify/qa/SKILL.md +14 -3
- package/workflows/verify/qa/SKILL.zh-Hans.md +14 -3
- package/workflows/verify/qa/workflow.yaml +8 -2
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -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.
|
|
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.38.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"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# yaml-language-server: $schema=../../schemas/manifest.v1.schema.json
|
|
2
|
+
# 4.38.0 — the compaction half of per-turn injection. PAIRS WITH `perturn-inject`;
|
|
3
|
+
# installing it alone does nothing (there is no delta cache to drop), and
|
|
4
|
+
# installing perturn-inject alone silently falls back to the 4.25.0 behaviour —
|
|
5
|
+
# a blind HARNESSED_INJECT_REFRESH_TURNS timer (default 10).
|
|
6
|
+
#
|
|
7
|
+
# Why it exists: the per-turn hook skips re-emitting <project-context> while the
|
|
8
|
+
# block's hash is unchanged, because the copy already sits in the conversation.
|
|
9
|
+
# Compaction removes that copy without touching the cache, so the skip keeps
|
|
10
|
+
# firing on behalf of content that is gone — up to REFRESH_TURNS-1 turns blind.
|
|
11
|
+
# injectCache.ts (4.25.0) named the timer "a stateless alternative to a PreCompact
|
|
12
|
+
# hook we do not install"; this manifest installs the real signal instead.
|
|
13
|
+
#
|
|
14
|
+
# SessionStart carries every context discontinuity: `compact` compresses the
|
|
15
|
+
# earlier copy away, `clear` wipes it, `resume` rebuilds from the record. No
|
|
16
|
+
# hook_matcher — `startup` is already a no-op (a new session id is a new cache
|
|
17
|
+
# key) and an unfiltered entry is one less thing to keep in sync with CC's source
|
|
18
|
+
# vocabulary. Same bin as perturn-inject, one flag apart; silent, always exit 0.
|
|
19
|
+
apiVersion: harnessed/v1
|
|
20
|
+
kind: Manifest
|
|
21
|
+
metadata:
|
|
22
|
+
name: perturn-inject-invalidate
|
|
23
|
+
display_name: Per-Turn Injection Cache Invalidation (SessionStart)
|
|
24
|
+
description: Opt-in SessionStart hook dropping the per-turn delta cache after compact/clear/resume so the next turn re-injects in full. Pairs with perturn-inject.
|
|
25
|
+
upstream:
|
|
26
|
+
source: perturn-inject-invalidate
|
|
27
|
+
homepage: https://github.com/easyinplay/harnessed
|
|
28
|
+
repository: https://github.com/easyinplay/harnessed.git
|
|
29
|
+
license: MIT
|
|
30
|
+
notice: First-party harnessed hook (4.38.0).
|
|
31
|
+
spec:
|
|
32
|
+
type: cc-hook
|
|
33
|
+
component_type: command
|
|
34
|
+
category: meta
|
|
35
|
+
install_type: hook
|
|
36
|
+
install:
|
|
37
|
+
method: cc-hook-add
|
|
38
|
+
cmd: "node bin/harnessed-inject-state.mjs --invalidate"
|
|
39
|
+
hook_event: SessionStart
|
|
40
|
+
hook_command: "node bin/harnessed-inject-state.mjs --invalidate"
|
|
41
|
+
idempotent_check: "grep -q 'harnessed-inject-state.mjs --invalidate' ~/.claude/settings.json"
|
|
42
|
+
verify:
|
|
43
|
+
cmd: "grep -q 'harnessed-inject-state.mjs --invalidate' ~/.claude/settings.json"
|
|
44
|
+
timeout_ms: 5000
|
|
45
|
+
expected_exit_code: 0
|
|
46
|
+
uninstall:
|
|
47
|
+
cmd: "true"
|
|
48
|
+
upstream_health:
|
|
49
|
+
stability: beta
|
|
50
|
+
last_check: "2026-08-26"
|
|
51
|
+
last_known_good_version: "0.1.0"
|
|
52
|
+
fallback_action: warn
|
|
53
|
+
signed_by: easyinplay
|
|
54
|
+
platforms:
|
|
55
|
+
- linux
|
|
56
|
+
- darwin
|
|
57
|
+
- win32
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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 —
|
|
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
|
|
65
|
-
|
|
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`
|
|
@@ -51,6 +51,17 @@ Engine runtime per T3.5.W0.1 `runMasterOrchestrator`:
|
|
|
51
51
|
- **关键发布 / 大重构 PR** 升级 4-specialist Agent Team Pattern C (sub multispec, gate critical-release-upgrade)
|
|
52
52
|
- 再 `code-simplifier` 末尾 (sub simplify, serial order 99)
|
|
53
53
|
|
|
54
|
+
## When verification fails
|
|
55
|
+
|
|
56
|
+
A rejected verification is a machine transition, not a note to yourself.
|
|
57
|
+
|
|
58
|
+
`harnessed checkpoint reopen <sub> --reason "<what is wrong>"` sends the offending sub back to `pending` and records why. Run it once per sub that must be redone, then re-enter the execute chain — the per-turn `<workflow-state>` breadcrumb lists the sub as `next` again and carries a `REOPENED:` line with the reason.
|
|
59
|
+
|
|
60
|
+
- **It counts as an attempt.** Bouncing the same sub repeatedly reaches the same `BUDGET-EXHAUSTED` / `BREAK-LOOP` directives a repeatedly failing sub does. When either fires, stop reopening and escalate.
|
|
61
|
+
- **Not `harnessed reject <sub>`** — that is a terminal decline (this sub is not being done at all) and deliberately does not count attempts.
|
|
62
|
+
- **Not `checkpoint fail`** — `fail` records that an attempt ended badly and stops; `reopen` says the work must be done again.
|
|
63
|
+
- A workflow already at `complete` is flipped back to `active`, so a late verification cannot leave a "complete" workflow holding pending work.
|
|
64
|
+
|
|
54
65
|
## Capability refs
|
|
55
66
|
|
|
56
67
|
Sister `workflows/capabilities.yaml`:
|
|
@@ -51,6 +51,17 @@ via stage-routing.yaml):
|
|
|
51
51
|
- **关键发布 / 大重构 PR** 升级 4-specialist Agent Team Pattern C(sub multispec,关卡 critical-release-upgrade)
|
|
52
52
|
- 再 `code-simplifier` 末尾(sub simplify,serial order 99)
|
|
53
53
|
|
|
54
|
+
## 验证判否之后
|
|
55
|
+
|
|
56
|
+
判否是一次状态机转移,不是写给自己的备注。
|
|
57
|
+
|
|
58
|
+
`harnessed checkpoint reopen <sub> --reason "<哪里不对>"` 把出问题的 sub 打回 `pending` 并记下原因。每个需要返工的 sub 跑一次,然后重新进入 execute 链 —— 每轮的 `<workflow-state>` 断点会重新把它列为 `next`,并带一行 `REOPENED:` 说明原因。
|
|
59
|
+
|
|
60
|
+
- **它计入 attempt。** 反复打回同一个 sub 会撞上与反复失败同样的 `BUDGET-EXHAUSTED` / `BREAK-LOOP` 指令。任一触发即停止打回,上报。
|
|
61
|
+
- **不是 `harnessed reject <sub>`** —— 那是终态放弃(这个 sub 根本不做了),并且刻意不计 attempt。
|
|
62
|
+
- **不是 `checkpoint fail`** —— `fail` 记录的是这次尝试收场不好、就此停下;`reopen` 说的是这活儿得重做。
|
|
63
|
+
- 已经处于 `complete` 的 workflow 会被翻回 `active`,迟到的验证不会留下一个「已完成」却挂着未决工作的 workflow。
|
|
64
|
+
|
|
54
65
|
## 能力引用
|
|
55
66
|
|
|
56
67
|
Sister `workflows/capabilities.yaml`:
|
|
@@ -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
|
|
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 / 内存诊断 →
|
|
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
|
|
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 / 内存诊断 →
|
|
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 不可用
|
|
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
|
-
# 非功能性诊断 —
|
|
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
|