@tea-agent/loop-agent 0.35.0-beta.2 → 0.35.1-beta.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.
Files changed (154) hide show
  1. package/AGENTS.md +108 -108
  2. package/CHANGELOG.md +55 -4
  3. package/README.md +165 -165
  4. package/bin/agent-worker.js +0 -0
  5. package/bin/loop-agent.js +21 -21
  6. package/dist/application/task-lifecycle/advance.js +1 -0
  7. package/dist/commands/cursor-prompt.js +6 -6
  8. package/dist/commands/init-upgrade.js +351 -19
  9. package/dist/commands/init.js +14 -67
  10. package/dist/commands/loop-benchmark.js +11 -11
  11. package/dist/commands/pi-reuse-benchmark.js +16 -16
  12. package/dist/commands/run-dag-progress.js +14 -0
  13. package/dist/commands/task-advance.js +33 -3
  14. package/dist/shared/operator/capabilities.js +38 -1
  15. package/dist/sidecars/cursor-prompt/executor.js +1 -1
  16. package/dist/worker/console/chat/pi-runtime.js +41 -25
  17. package/dist/worker/console/chat/routes.js +27 -4
  18. package/dist/worker/console/operation-runner.js +24 -0
  19. package/dist/worker/console/operation-wait.js +241 -0
  20. package/dist/worker/console/operator-actions.js +58 -0
  21. package/dist/worker/console/static/assets/{index-hJqCPs_g.css → index-Dups4sSM.css} +1 -1
  22. package/dist/worker/console/static/assets/index-SjjjZnV3.js +56 -0
  23. package/dist/worker/console/static/index.html +2 -2
  24. package/dist/worker/console/static-src/operator-chat/slash-palette-nav.js +141 -0
  25. package/dist/worker/console/static-src/operator-chat/useChatSessions.js +13 -2
  26. package/dist/worker/console/static-src/operator-chat/useComposer.js +30 -7
  27. package/dist/worker/observe/static/copy.js +67 -67
  28. package/dist/worker/observe/static/dag-layout.d.ts +36 -36
  29. package/dist/worker/observe/static/dom.js +220 -220
  30. package/dist/worker/observe/static/relations.js +133 -133
  31. package/dist/worker/observe/static/run-processing.js +148 -148
  32. package/dist/worker/observe/static/views/batch.js +227 -227
  33. package/dist/worker/observe/static/views/failures.js +143 -143
  34. package/dist/worker/observe/static/views/feature.js +492 -492
  35. package/dist/worker/observe/static/views/run.js +453 -453
  36. package/dist/worker/observe/static/views/shell.js +7 -7
  37. package/dist/worker/observe/static/views/timeline.js +163 -163
  38. package/dist/workflows/dag/canvas-observer.js +275 -275
  39. package/dist/workflows/dag/frontend-prewrite-gate.js +9 -1
  40. package/dist/workflows/dag/init-hybrid.js +2 -0
  41. package/docs/architecture/evolution.md +73 -73
  42. package/docs/architecture/system-overview.md +100 -100
  43. package/docs/architecture/worker-and-feature.md +122 -122
  44. package/docs/skills/README.md +7 -7
  45. package/docs/templates/adr.md +60 -60
  46. package/docs/templates/agent-dag-authority-surface-audit.prompt.md +94 -94
  47. package/docs/templates/agent-dag-decision-envelope.schema.json +213 -213
  48. package/docs/templates/agent-dag-decision-gate.prompt.md +246 -246
  49. package/docs/templates/agent-dag-process-supervisor.prompt.md +98 -98
  50. package/docs/templates/agent-dag-report.schema.json +473 -473
  51. package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
  52. package/docs/templates/backend-test-result.schema.json +99 -99
  53. package/docs/templates/evaluation/agents-map-slim-v1.md +87 -87
  54. package/docs/templates/evaluation/agents-map-verbose-v0.md +153 -153
  55. package/docs/templates/feature-spec.md +53 -53
  56. package/docs/templates/frontend-design-contract.md +42 -42
  57. package/docs/templates/frontend-eval/fixtures/failures/01-type-build-error.md +17 -17
  58. package/docs/templates/frontend-eval/fixtures/failures/02-unit-component-test-fail.md +16 -16
  59. package/docs/templates/frontend-eval/fixtures/failures/03-fixture-schema-drift.md +16 -16
  60. package/docs/templates/frontend-eval/fixtures/failures/04-missing-loading-empty-error-state.md +16 -16
  61. package/docs/templates/frontend-eval/fixtures/failures/05-forbidden-write-writeset-expansion.md +16 -16
  62. package/docs/templates/frontend-eval/fixtures/failures/06-unapproved-dependency-add.md +16 -16
  63. package/docs/templates/frontend-eval/fixtures/failures/07-mock-production-on.md +21 -21
  64. package/docs/templates/frontend-eval/fixtures/functional/01-simple-component-style.md +29 -29
  65. package/docs/templates/frontend-eval/fixtures/functional/02-form-validation.md +28 -28
  66. package/docs/templates/frontend-eval/fixtures/functional/03-list-detail-page.md +28 -28
  67. package/docs/templates/frontend-eval/fixtures/functional/04-api-mock.md +29 -29
  68. package/docs/templates/frontend-eval/fixtures/functional/05-permission-auth-gated-ui.md +27 -27
  69. package/docs/templates/frontend-eval/fixtures/functional/06-ssr-server-client-boundary.md +28 -28
  70. package/docs/templates/frontend-eval/fixtures/functional/07-shared-public-component-api.md +28 -28
  71. package/docs/templates/frontend-eval/fixtures/functional/08-pure-local-no-remote.md +27 -27
  72. package/docs/templates/frontend-eval/metrics.md +138 -138
  73. package/docs/templates/frontend-eval/smoke-targets.md +53 -53
  74. package/docs/templates/frontend-task-constraints.md +35 -35
  75. package/docs/templates/frontend-task-requirement.md +70 -70
  76. package/docs/templates/init-evolution-review.md +35 -35
  77. package/docs/templates/init-managed-agents.md +156 -154
  78. package/docs/templates/interactive-ui-round2-experiment.md +66 -66
  79. package/docs/templates/knowledge-graph-bootstrap-dag.json +118 -118
  80. package/docs/templates/knowledge-sync-dag.json +178 -178
  81. package/docs/templates/knowledge-sync-draft.schema.json +71 -71
  82. package/docs/templates/product-line/closeout.yaml +9 -9
  83. package/docs/templates/product-line/design.md +13 -13
  84. package/docs/templates/product-line/links.md +10 -10
  85. package/docs/templates/product-line/requirement.md +17 -17
  86. package/docs/templates/product-line/test-plan.md +7 -7
  87. package/docs/templates/project-start-checklist.md +9 -9
  88. package/docs/templates/qa-report.md +48 -48
  89. package/docs/templates/sprint-contract.md +29 -29
  90. package/docs/templates/worker-dogfood-evidence.md +80 -80
  91. package/docs/templates/worker-dogfood-setup.md +68 -68
  92. package/harness.json +5 -2
  93. package/package.json +1 -1
  94. package/scripts/kb-bootstrap-init-skeleton.sh +0 -0
  95. package/scripts/kb-graph-incremental-prepare.mjs +0 -0
  96. package/scripts/kb-graph-materialize.mjs +105 -105
  97. package/scripts/kb-graph-promote.mjs +164 -164
  98. package/scripts/kb-query.mjs +554 -554
  99. package/skills/agent-worker/SKILL.md +48 -48
  100. package/skills/agent-worker/references/agent-worker-operator.md +159 -159
  101. package/skills/ai-engineering-context/SKILL.md +48 -48
  102. package/skills/analyze-product-dependencies/scripts/test-validators.mjs +0 -0
  103. package/skills/analyze-product-dependencies/scripts/validate-api-documentation.mjs +0 -0
  104. package/skills/analyze-product-dependencies/scripts/validate-dependency-analysis.mjs +0 -0
  105. package/skills/analyze-product-dependencies/scripts/validate-product-requirement-input.mjs +0 -0
  106. package/skills/analyze-product-requirements/scripts/compute-source-identity.mjs +0 -0
  107. package/skills/analyze-product-requirements/scripts/test-validators.mjs +0 -0
  108. package/skills/analyze-product-requirements/scripts/validate-product-analysis.mjs +0 -0
  109. package/skills/analyze-product-requirements/scripts/validate-product-requirement.mjs +0 -0
  110. package/skills/analyze-product-requirements/scripts/validate-requirement-clarification.mjs +0 -0
  111. package/skills/browser-tools/browser-content.js +103 -103
  112. package/skills/browser-tools/browser-cookies.js +35 -35
  113. package/skills/browser-tools/browser-eval.js +53 -53
  114. package/skills/browser-tools/browser-hn-scraper.js +108 -108
  115. package/skills/browser-tools/browser-nav.js +44 -44
  116. package/skills/browser-tools/browser-pick.js +162 -162
  117. package/skills/browser-tools/browser-screenshot.js +34 -34
  118. package/skills/browser-tools/browser-start.js +86 -86
  119. package/skills/browser-tools/package-lock.json +2556 -2556
  120. package/skills/browser-tools/package.json +19 -19
  121. package/skills/code-review-core/SKILL.md +20 -20
  122. package/skills/codebase-scout/SKILL.md +19 -19
  123. package/skills/grill-me/SKILL.md +10 -10
  124. package/skills/local-jacoco-coverage/scripts/run-coverage-analysis.sh +0 -0
  125. package/skills/local-jacoco-coverage/scripts/start-jacoco-agent.sh +0 -0
  126. package/skills/loop-agent/SKILL.md +1 -0
  127. package/skills/loop-agent/references/command-reference.md +641 -639
  128. package/skills/loop-agent/references/docs-converge.md +126 -126
  129. package/skills/loop-agent/references/learned/README.md +21 -21
  130. package/skills/loop-agent/references/pi-prompt.md +23 -23
  131. package/skills/loop-agent/references/pi-subagent-assisted-mode.md +84 -84
  132. package/skills/playwright-cli/references/element-attributes.md +23 -23
  133. package/skills/playwright-cli/references/playwright-tests.md +39 -39
  134. package/skills/playwright-cli/references/request-mocking.md +87 -87
  135. package/skills/playwright-cli/references/running-code.md +241 -241
  136. package/skills/playwright-cli/references/session-management.md +225 -225
  137. package/skills/playwright-cli/references/storage-state.md +275 -275
  138. package/skills/playwright-cli/references/test-generation.md +433 -433
  139. package/skills/requesting-code-review/SKILL.md +101 -101
  140. package/skills/requesting-code-review/code-reviewer.md +168 -168
  141. package/skills/systematic-debugging/CREATION-LOG.md +119 -119
  142. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
  143. package/skills/systematic-debugging/condition-based-waiting.md +115 -115
  144. package/skills/systematic-debugging/defense-in-depth.md +122 -122
  145. package/skills/systematic-debugging/find-polluter.sh +63 -63
  146. package/skills/systematic-debugging/root-cause-tracing.md +169 -169
  147. package/skills/systematic-debugging/test-academic.md +14 -14
  148. package/skills/systematic-debugging/test-pressure-1.md +58 -58
  149. package/skills/systematic-debugging/test-pressure-2.md +68 -68
  150. package/skills/systematic-debugging/test-pressure-3.md +69 -69
  151. package/skills/using-git-worktrees/SKILL.md +215 -215
  152. package/skills/verification-before-completion/SKILL.md +154 -154
  153. package/skills/webapp-testing/SKILL.md +19 -19
  154. package/dist/worker/console/static/assets/index-fsjzREob.js +0 -56
@@ -1,122 +1,122 @@
1
- # Worker 与 Feature 架构
2
-
3
- 本页说明 `agent-worker` 如何通过冻结的已发布 `loop-agent` 子进程执行 DAG(不 in-process import runtime kernel),以及其上的产品线 read model:TaskSpec、Task Pool、Feature 与统一 Operator Console(Operate + Inspect)。边界契约权威是 `runtime-boundaries.md` §Worker adapter。
4
-
5
- **维护校准:2026-07-27 / `@tea-agent/loop-agent@0.24.0`** — 统一 Operator Console(Operate + Inspect)、恢复操作面与自适应 liveness 已落地;细节以 `CHANGELOG.md` 与对应 active/completed plan 为准。
6
-
7
- ## 核心事实:子进程,非 in-process
8
-
9
- `agent-worker` 真正执行 DAG 时通过 Node `child_process.spawn` 启动**已发布**的 `loop-agent`,**不** in-process import runtime kernel:
10
-
11
- | 事实 | 源码入口 |
12
- | --- | --- |
13
- | 客户端 | `src/worker/loop-agent/loop-agent-client.ts` `LoopAgentClient` |
14
- | 执行入口 | `LoopAgentClient.run(args, options)` |
15
- | spawn 实现 | `spawnCommand(...)` → `spawn(input.command, input.args, { cwd, env, shell: false, stdio: ["ignore", "pipe", "pipe"] })` |
16
- | 治理禁止 | `scripts/check-architecture-boundaries.sh` 禁止 `src/worker/**` → `src/{cli,commands,application}/**`,transitional allowlist 为空 |
17
-
18
- `shell: false` + 绝对 launch spec(见下)意味着 Worker 不走 PATH 重新解析,也不在当前进程内加载 CLI command 实现。
19
-
20
- ### `run-dag` kernel-owned supervision vs explicit hard timeout
21
-
22
- `run-task` 启动 `run-dag` 时默认把外层 `timeoutMs` 设为 `0`,由 DAG kernel 负责节点 liveness,**不再**无条件把 30 分钟当作 hard kill:
23
-
24
- - 省略 `worker.timeout_ms` → Worker 不设置 wall-clock deadline,并等待 `run-dag` 产生可确认终态。
25
- - 显式 `worker.timeout_ms` → hard kill(可 capped),观察到 exit 后可报 `timedOut`。
26
- - 客户端 `onHeartbeat` 仍是监管心跳,不等于 Pi meaningful progress。
27
-
28
- 设计真源:`docs/design/active/dag-adaptive-liveness-and-supervision.md`。
29
-
30
- ## controller identity(冻结的已发布 controller)
31
-
32
- 每次写入型 Feature/batch/Task/final verification 在任何目标仓库或 Task Pool 状态写入前,`LoopAgentClient` 解析并冻结 schemaVersion 1 identity(`ControllerIdentityV1`,定义在 `src/shared/package-metadata.ts`):
33
-
34
- | 字段 | 含义 |
35
- | --- | --- |
36
- | `schemaVersion` | 固定 `1` |
37
- | `packageName` | 必须为 `@tea-agent/loop-agent` |
38
- | `binName` / `requested` / `entry` / `realEntry` | 入口解析链(realEntry 经 `realpathSync`) |
39
- | `launch.command` / `launch.argsPrefix` | 直接可执行的绝对 launch spec |
40
- | `binarySha256` | `actualEntry` 二进制 hash |
41
- | `packageVersion` | `package.json` version |
42
- | `packageFingerprint` | 覆盖 `package.json`、`bin/**`、`dist/**`、`.agents/skills/**` 的 portable fingerprint(`computePackageFingerprint`) |
43
-
44
- 关键方法:
45
-
46
- - `resolveIdentity()`(`loop-agent-client.ts`):首次解析并冻结 identity;`this._identityResolved = true`。
47
- - `assertControllerIdentityUnchangedBeforeSpawn(identity)`(`loop-agent-client.ts`):**每次 spawn 前**重验,漂移即 throw(`run` 与 `runCommand` 路径都调)。
48
- - `getIdentity()` / `observeReportedVersion(reportedVersion)`:读取/校验子进程回报的版本须与 `packageVersion` 一致。
49
-
50
- CLI 层(`src/worker/cli.ts`)在写入型命令传 `resolveIdentity: true` 构造 `LoopAgentClient`,并支持 `--expected-controller-version` / `--expected-controller-fingerprint` fail-fast(见 `src/worker/preflight.ts`)。
51
-
52
- controller identity 与 DAG skill snapshot 是两个不同冻结层(前者跨 Worker/Task Pool/Feature 生命周期,后者单个 DAG run),见 `runtime-boundaries.md` §版本化自举边界。
53
-
54
- ## 独立 CLI
55
-
56
- `agent-worker` 是独立 CLI(`bin/agent-worker.js` → `src/worker/cli.ts`),有自己的命令面(`task`、`batch`、`feature`、`report`、`observe`、`console` 等)。它**不是**第二套 executor 或 DAG kernel;它编排产品线 Task 并把执行委托给 `loop-agent` 子进程。
57
-
58
- ## 产品线 read model
59
-
60
- ### TaskSpec 与 workflow 路由
61
-
62
- - schema/validate:`src/worker/task-spec/{schema,validate}.ts`。
63
- - 校验验收条件、依赖、验证命令;`agent-worker task validate-feature` 等用之。
64
- - **0.16.0+**:可选 `execution.workflow` 映射到 loop-agent `taskKind`(如 agent-dag / frontend-implementation / backend-test / frontend-test);typed Task Outcome 与 artifact-aware Ready 门禁见 completed `2026-07-19-taskspec-workflow-routing.md`。
65
- - 文档映射镜像:`docs/architecture/taskspec-to-loop-agent-mapping.md`(runtime 真源仍在 `src/worker/` 与 materialize 路径)。
66
-
67
- ### Task Pool
68
-
69
- - 唯一 runtime root:`src/worker/pool/run-store.ts`
70
- `TASK_POOL_RELATIVE_ROOT = ".harness/task-pool"`(ADR 0002)。
71
- - 此前的顶层 Task Pool 位置不读取、不迁移、不合并、不重映射。
72
- - **Feature-scoped identity(ADR 0004)**:canonical Task 身份为复合键 `TaskPoolTaskRef = { featureId, taskId }`。`taskId` 仅 Feature 内唯一;同仓库多 Feature 可安全共用同名 Task ID。
73
- - **State schema v2**:新 state 必须 `schemaVersion: 2` 且显式携带 `featureId` / `taskId`;canonical 路径为 `.harness/task-pool/states/<featureId>/<taskId>.json`。
74
- - **Consumers**:runner Ready Queue、retry、Follow-up、Feature review、Delivery / Closeout、morning report / metrics 均按 Feature 作用域读写,不得把裸 `taskId` 当作仓库全局唯一键。
75
- - **Operator**:`pool doctor` 只读 inventory;`pool migrate-state` 默认 dry-run,apply 需 `--owner` + `--reason`;legacy v1 写入路径 fail-closed。
76
- - batch / retry / morning report 等都基于此根。
77
- - **Ready Planner**:`batch plan-ready` 零写入预览 selected/deferred/blocked;`run-ready` 冻结 `ready-plan.json`(priority + 产物门禁)。
78
-
79
- ### Feature(M2 交付闭环)
80
-
81
- - review/run/approve-followup/delivery/closeout/verify-final:`src/worker/feature/{review,run}.ts` 及相关。
82
- - Follow-up:`src/worker/` 下 draft-followup + approve-followup 事务,覆盖全部失败分类(可执行/Spec/Risk/Human/EnvFailure)。
83
- - Delivery / Closeout:clean Delivery HEAD 上生成 canonical QA/最终验证证据、Delivery Package、Acceptance Coverage、PR 草稿;Closeout 默认预览,显式 `--apply --owner` 才原子写回。
84
- - 权威证据:`CHANGELOG.md [0.10.0]`、`docs/reports/feature/2026-07-12-m2-completion-audit.md`。
85
-
86
- ### Final Verification 权威(ADR 0007)
87
-
88
- | 入口 | 职责 |
89
- | --- | --- |
90
- | `agent-worker feature verify-final` | **唯一** canonical writer:Feature Verification Bundle、`qa-pass.json`、`final-verification.json` |
91
- | `agent-worker feature advance` | 编排 verify-final → delivery → closeout preview[/apply](ADR 0007 运维入口) |
92
- | `agent-worker feature doctor` | 只读诊断证据/Pool/dirty worktree;建议下一步命令 |
93
- | Feature Packet `FINAL-VERIFY-*`(若保留) | 可选 **local smoke recipe**(样本 `verify:final` / reports);Task Done ≠ Final Verification Record |
94
- | `feature delivery` | 重验 verify-final 证据;省略路径时默认 `.harness/task-pool/evidence/<featureId>/{qa-pass,final-verification}.json` |
95
- | `feature closeout` | 只认 Delivery manifest + Final Verification Record 链 |
96
-
97
- 禁止把 packet Task 的 smoke 报告或 agent-dag `verify-pi` 结论当作 Delivery 放行条件。
98
-
99
- ### Inspect(Observe 只读 read model)
100
-
101
- - 模块:`src/worker/observe/`、`src/worker/observability/{read-model,event-store}.ts`。
102
- - 全局快照:`buildGlobalSnapshot({ repoRoot })`(`src/worker/observability/read-model.ts`),是 **derived** 视图,消费 `.harness/` 与 Task Pool 事实,**不**改变执行成败。
103
- - Observe read model 是本地只读 Inspect 能力;snapshot 投影失败返回安全错误摘要而非全零健康状态。
104
- - `agent-worker console` 在同一进程挂载 `/inspect/` 与现有 GET `/api/**`;`/api/health` 返回 `OperatorSurfaceHealthV1`。`observe serve` 已硬下线(REMOVED / exit 2)。
105
-
106
- ### Local Operator Console(Official,0.18.0)
107
-
108
- - 模块:`src/worker/console/`(loopback `serve|doctor`、operator API、Vite SPA)。
109
- - **已发布能力**:Happy Path / Interview、Task Contract、SSE、同站 Inspect、Run/Recovery 紧凑检视与 recovery CTA 矩阵(无 Cancel / 无主 CTA「直接改代码」)。
110
- - Inspect 仍复用唯一 Observe read model,GET-only;不复制 snapshot projector。
111
- - 写入路径仍只经 `LoopAgentClient` → 已发布 `loop-agent`(含 `task contract *` / DAG confirm-run)。
112
- - 证据:completed Console Phase 0.5 / 1–3;handoff `docs/reports/feature/2026-07-22-console-mvp-handoff.md`;ADR 0005。
113
-
114
- ## 版本化自举的 deterministic canary
115
-
116
- 源码仓库的 deterministic candidate canary(`scripts/self-host-canary.mjs`,`npm run self-host:canary -- --deterministic`)是只读/确定性接棒证据:候选 tarball 安装到隔离 slot,两个 bin 从包内绝对入口启动,PATH 中放置 controller fallback trap,只执行 Feature dry-run 与 static/shell DAG。它必须证明 `piExecutorObserved=false` / `modelExecutorObserved=false` / `featureExecutedTasks=[]`,因此**不是** live Pi takeover。该脚本**不**属于发布 package surface(`package.json` `files` 不含它)。
117
-
118
- ## 不变式
119
-
120
- - Worker 不得 in-process import `src/cli/**`、`src/commands/**` 或 `src/application/**`(governance 机器校验)。
121
- - Worker 不实现 executor、scheduler、prompt 或 write guard。
122
- - `agent-worker` skill(`.agents/skills/agent-worker/`)不加入 `DEFAULT_SKILLS_BY_ROLE`;DAG leaf node 不得递归启动 `agent-worker`(`runtime-boundaries.md` §Skill layer)。
1
+ # Worker 与 Feature 架构
2
+
3
+ 本页说明 `agent-worker` 如何通过冻结的已发布 `loop-agent` 子进程执行 DAG(不 in-process import runtime kernel),以及其上的产品线 read model:TaskSpec、Task Pool、Feature 与统一 Operator Console(Operate + Inspect)。边界契约权威是 `runtime-boundaries.md` §Worker adapter。
4
+
5
+ **维护校准:2026-07-27 / `@tea-agent/loop-agent@0.24.0`** — 统一 Operator Console(Operate + Inspect)、恢复操作面与自适应 liveness 已落地;细节以 `CHANGELOG.md` 与对应 active/completed plan 为准。
6
+
7
+ ## 核心事实:子进程,非 in-process
8
+
9
+ `agent-worker` 真正执行 DAG 时通过 Node `child_process.spawn` 启动**已发布**的 `loop-agent`,**不** in-process import runtime kernel:
10
+
11
+ | 事实 | 源码入口 |
12
+ | --- | --- |
13
+ | 客户端 | `src/worker/loop-agent/loop-agent-client.ts` `LoopAgentClient` |
14
+ | 执行入口 | `LoopAgentClient.run(args, options)` |
15
+ | spawn 实现 | `spawnCommand(...)` → `spawn(input.command, input.args, { cwd, env, shell: false, stdio: ["ignore", "pipe", "pipe"] })` |
16
+ | 治理禁止 | `scripts/check-architecture-boundaries.sh` 禁止 `src/worker/**` → `src/{cli,commands,application}/**`,transitional allowlist 为空 |
17
+
18
+ `shell: false` + 绝对 launch spec(见下)意味着 Worker 不走 PATH 重新解析,也不在当前进程内加载 CLI command 实现。
19
+
20
+ ### `run-dag` kernel-owned supervision vs explicit hard timeout
21
+
22
+ `run-task` 启动 `run-dag` 时默认把外层 `timeoutMs` 设为 `0`,由 DAG kernel 负责节点 liveness,**不再**无条件把 30 分钟当作 hard kill:
23
+
24
+ - 省略 `worker.timeout_ms` → Worker 不设置 wall-clock deadline,并等待 `run-dag` 产生可确认终态。
25
+ - 显式 `worker.timeout_ms` → hard kill(可 capped),观察到 exit 后可报 `timedOut`。
26
+ - 客户端 `onHeartbeat` 仍是监管心跳,不等于 Pi meaningful progress。
27
+
28
+ 设计真源:`docs/design/active/dag-adaptive-liveness-and-supervision.md`。
29
+
30
+ ## controller identity(冻结的已发布 controller)
31
+
32
+ 每次写入型 Feature/batch/Task/final verification 在任何目标仓库或 Task Pool 状态写入前,`LoopAgentClient` 解析并冻结 schemaVersion 1 identity(`ControllerIdentityV1`,定义在 `src/shared/package-metadata.ts`):
33
+
34
+ | 字段 | 含义 |
35
+ | --- | --- |
36
+ | `schemaVersion` | 固定 `1` |
37
+ | `packageName` | 必须为 `@tea-agent/loop-agent` |
38
+ | `binName` / `requested` / `entry` / `realEntry` | 入口解析链(realEntry 经 `realpathSync`) |
39
+ | `launch.command` / `launch.argsPrefix` | 直接可执行的绝对 launch spec |
40
+ | `binarySha256` | `actualEntry` 二进制 hash |
41
+ | `packageVersion` | `package.json` version |
42
+ | `packageFingerprint` | 覆盖 `package.json`、`bin/**`、`dist/**`、`.agents/skills/**` 的 portable fingerprint(`computePackageFingerprint`) |
43
+
44
+ 关键方法:
45
+
46
+ - `resolveIdentity()`(`loop-agent-client.ts`):首次解析并冻结 identity;`this._identityResolved = true`。
47
+ - `assertControllerIdentityUnchangedBeforeSpawn(identity)`(`loop-agent-client.ts`):**每次 spawn 前**重验,漂移即 throw(`run` 与 `runCommand` 路径都调)。
48
+ - `getIdentity()` / `observeReportedVersion(reportedVersion)`:读取/校验子进程回报的版本须与 `packageVersion` 一致。
49
+
50
+ CLI 层(`src/worker/cli.ts`)在写入型命令传 `resolveIdentity: true` 构造 `LoopAgentClient`,并支持 `--expected-controller-version` / `--expected-controller-fingerprint` fail-fast(见 `src/worker/preflight.ts`)。
51
+
52
+ controller identity 与 DAG skill snapshot 是两个不同冻结层(前者跨 Worker/Task Pool/Feature 生命周期,后者单个 DAG run),见 `runtime-boundaries.md` §版本化自举边界。
53
+
54
+ ## 独立 CLI
55
+
56
+ `agent-worker` 是独立 CLI(`bin/agent-worker.js` → `src/worker/cli.ts`),有自己的命令面(`task`、`batch`、`feature`、`report`、`observe`、`console` 等)。它**不是**第二套 executor 或 DAG kernel;它编排产品线 Task 并把执行委托给 `loop-agent` 子进程。
57
+
58
+ ## 产品线 read model
59
+
60
+ ### TaskSpec 与 workflow 路由
61
+
62
+ - schema/validate:`src/worker/task-spec/{schema,validate}.ts`。
63
+ - 校验验收条件、依赖、验证命令;`agent-worker task validate-feature` 等用之。
64
+ - **0.16.0+**:可选 `execution.workflow` 映射到 loop-agent `taskKind`(如 agent-dag / frontend-implementation / backend-test / frontend-test);typed Task Outcome 与 artifact-aware Ready 门禁见 completed `2026-07-19-taskspec-workflow-routing.md`。
65
+ - 文档映射镜像:`docs/architecture/taskspec-to-loop-agent-mapping.md`(runtime 真源仍在 `src/worker/` 与 materialize 路径)。
66
+
67
+ ### Task Pool
68
+
69
+ - 唯一 runtime root:`src/worker/pool/run-store.ts`
70
+ `TASK_POOL_RELATIVE_ROOT = ".harness/task-pool"`(ADR 0002)。
71
+ - 此前的顶层 Task Pool 位置不读取、不迁移、不合并、不重映射。
72
+ - **Feature-scoped identity(ADR 0004)**:canonical Task 身份为复合键 `TaskPoolTaskRef = { featureId, taskId }`。`taskId` 仅 Feature 内唯一;同仓库多 Feature 可安全共用同名 Task ID。
73
+ - **State schema v2**:新 state 必须 `schemaVersion: 2` 且显式携带 `featureId` / `taskId`;canonical 路径为 `.harness/task-pool/states/<featureId>/<taskId>.json`。
74
+ - **Consumers**:runner Ready Queue、retry、Follow-up、Feature review、Delivery / Closeout、morning report / metrics 均按 Feature 作用域读写,不得把裸 `taskId` 当作仓库全局唯一键。
75
+ - **Operator**:`pool doctor` 只读 inventory;`pool migrate-state` 默认 dry-run,apply 需 `--owner` + `--reason`;legacy v1 写入路径 fail-closed。
76
+ - batch / retry / morning report 等都基于此根。
77
+ - **Ready Planner**:`batch plan-ready` 零写入预览 selected/deferred/blocked;`run-ready` 冻结 `ready-plan.json`(priority + 产物门禁)。
78
+
79
+ ### Feature(M2 交付闭环)
80
+
81
+ - review/run/approve-followup/delivery/closeout/verify-final:`src/worker/feature/{review,run}.ts` 及相关。
82
+ - Follow-up:`src/worker/` 下 draft-followup + approve-followup 事务,覆盖全部失败分类(可执行/Spec/Risk/Human/EnvFailure)。
83
+ - Delivery / Closeout:clean Delivery HEAD 上生成 canonical QA/最终验证证据、Delivery Package、Acceptance Coverage、PR 草稿;Closeout 默认预览,显式 `--apply --owner` 才原子写回。
84
+ - 权威证据:`CHANGELOG.md [0.10.0]`、`docs/reports/feature/2026-07-12-m2-completion-audit.md`。
85
+
86
+ ### Final Verification 权威(ADR 0007)
87
+
88
+ | 入口 | 职责 |
89
+ | --- | --- |
90
+ | `agent-worker feature verify-final` | **唯一** canonical writer:Feature Verification Bundle、`qa-pass.json`、`final-verification.json` |
91
+ | `agent-worker feature advance` | 编排 verify-final → delivery → closeout preview[/apply](ADR 0007 运维入口) |
92
+ | `agent-worker feature doctor` | 只读诊断证据/Pool/dirty worktree;建议下一步命令 |
93
+ | Feature Packet `FINAL-VERIFY-*`(若保留) | 可选 **local smoke recipe**(样本 `verify:final` / reports);Task Done ≠ Final Verification Record |
94
+ | `feature delivery` | 重验 verify-final 证据;省略路径时默认 `.harness/task-pool/evidence/<featureId>/{qa-pass,final-verification}.json` |
95
+ | `feature closeout` | 只认 Delivery manifest + Final Verification Record 链 |
96
+
97
+ 禁止把 packet Task 的 smoke 报告或 agent-dag `verify-pi` 结论当作 Delivery 放行条件。
98
+
99
+ ### Inspect(Observe 只读 read model)
100
+
101
+ - 模块:`src/worker/observe/`、`src/worker/observability/{read-model,event-store}.ts`。
102
+ - 全局快照:`buildGlobalSnapshot({ repoRoot })`(`src/worker/observability/read-model.ts`),是 **derived** 视图,消费 `.harness/` 与 Task Pool 事实,**不**改变执行成败。
103
+ - Observe read model 是本地只读 Inspect 能力;snapshot 投影失败返回安全错误摘要而非全零健康状态。
104
+ - `agent-worker console` 在同一进程挂载 `/inspect/` 与现有 GET `/api/**`;`/api/health` 返回 `OperatorSurfaceHealthV1`。`observe serve` 已硬下线(REMOVED / exit 2)。
105
+
106
+ ### Local Operator Console(Official,0.18.0)
107
+
108
+ - 模块:`src/worker/console/`(loopback `serve|doctor`、operator API、Vite SPA)。
109
+ - **已发布能力**:Happy Path / Interview、Task Contract、SSE、同站 Inspect、Run/Recovery 紧凑检视与 recovery CTA 矩阵(无 Cancel / 无主 CTA「直接改代码」)。
110
+ - Inspect 仍复用唯一 Observe read model,GET-only;不复制 snapshot projector。
111
+ - 写入路径仍只经 `LoopAgentClient` → 已发布 `loop-agent`(含 `task contract *` / DAG confirm-run)。
112
+ - 证据:completed Console Phase 0.5 / 1–3;handoff `docs/reports/feature/2026-07-22-console-mvp-handoff.md`;ADR 0005。
113
+
114
+ ## 版本化自举的 deterministic canary
115
+
116
+ 源码仓库的 deterministic candidate canary(`scripts/self-host-canary.mjs`,`npm run self-host:canary -- --deterministic`)是只读/确定性接棒证据:候选 tarball 安装到隔离 slot,两个 bin 从包内绝对入口启动,PATH 中放置 controller fallback trap,只执行 Feature dry-run 与 static/shell DAG。它必须证明 `piExecutorObserved=false` / `modelExecutorObserved=false` / `featureExecutedTasks=[]`,因此**不是** live Pi takeover。该脚本**不**属于发布 package surface(`package.json` `files` 不含它)。
117
+
118
+ ## 不变式
119
+
120
+ - Worker 不得 in-process import `src/cli/**`、`src/commands/**` 或 `src/application/**`(governance 机器校验)。
121
+ - Worker 不实现 executor、scheduler、prompt 或 write guard。
122
+ - `agent-worker` skill(`.agents/skills/agent-worker/`)不加入 `DEFAULT_SKILLS_BY_ROLE`;DAG leaf node 不得递归启动 `agent-worker`(`runtime-boundaries.md` §Skill layer)。
@@ -1,7 +1,7 @@
1
- # Skill Registry
2
-
3
- This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
4
-
5
- - `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
6
- - `../../skills/agent-worker/SKILL.md` — optional outer-loop operator skill for Feature Packet, TaskSpec, Task Pool, controller pinning, self-hosting canaries, and Worker recovery. Single DAG implementation or runtime repair stays with `loop-agent`; this skill is not a default DAG role skill.
7
- - `../../scripts/check-skill-entry.sh` — validates both public skill entries, their required references, line budgets, and the `agent-worker` trigger vocabulary.
1
+ # Skill Registry
2
+
3
+ This directory records repo-local skill wrappers and vetting notes used by Agent DAG role mapping.
4
+
5
+ - `vetted-skill-registry.md` — supported roles, source inspiration, risk notes, and default/optional usage.
6
+ - `../../skills/agent-worker/SKILL.md` — optional outer-loop operator skill for Feature Packet, TaskSpec, Task Pool, controller pinning, self-hosting canaries, and Worker recovery. Single DAG implementation or runtime repair stays with `loop-agent`; this skill is not a default DAG role skill.
7
+ - `../../scripts/check-skill-entry.sh` — validates both public skill entries, their required references, line budgets, and the `agent-worker` trigger vocabulary.
@@ -1,60 +1,60 @@
1
- # ADR 模板
2
-
3
- ## 标题
4
-
5
- > 建议文件名:`0001-<topic>.md`
6
-
7
- ## 状态
8
-
9
- - proposed / accepted / superseded
10
-
11
- ## 背景
12
-
13
- - 当前遇到的工程或架构问题是什么?
14
- - 为什么现在必须做决定?
15
- - 相关上下文、历史方案、约束有哪些?
16
-
17
- ## 决策
18
-
19
- - 最终选择什么方案?
20
- - 明确边界、适用范围、默认行为是什么?
21
-
22
- ## 备选方案
23
-
24
- 1. 方案 A:
25
- 2. 方案 B:
26
- 3. 方案 C:
27
-
28
- ## 取舍理由
29
-
30
- - 为什么选择当前方案?
31
- - 为什么不选其他方案?
32
- - 主要 trade-off 是什么?
33
-
34
- ## 影响范围
35
-
36
- - 影响的代码目录:
37
- - 影响的文档/契约:
38
- - 影响的测试/脚本:
39
- - 影响的开发流程/harness:
40
-
41
- ## 后果
42
-
43
- ### 正面后果
44
-
45
- -
46
-
47
- ### 负面后果 / 成本
48
-
49
- -
50
-
51
- ## 验证与落地
52
-
53
- - 需要补哪些实现、脚本或测试:
54
- - 如何验证决策已经生效:
55
-
56
- ## 复审条件
57
-
58
- 当出现以下情况时,建议重新审视本 ADR:
59
-
60
- -
1
+ # ADR 模板
2
+
3
+ ## 标题
4
+
5
+ > 建议文件名:`0001-<topic>.md`
6
+
7
+ ## 状态
8
+
9
+ - proposed / accepted / superseded
10
+
11
+ ## 背景
12
+
13
+ - 当前遇到的工程或架构问题是什么?
14
+ - 为什么现在必须做决定?
15
+ - 相关上下文、历史方案、约束有哪些?
16
+
17
+ ## 决策
18
+
19
+ - 最终选择什么方案?
20
+ - 明确边界、适用范围、默认行为是什么?
21
+
22
+ ## 备选方案
23
+
24
+ 1. 方案 A:
25
+ 2. 方案 B:
26
+ 3. 方案 C:
27
+
28
+ ## 取舍理由
29
+
30
+ - 为什么选择当前方案?
31
+ - 为什么不选其他方案?
32
+ - 主要 trade-off 是什么?
33
+
34
+ ## 影响范围
35
+
36
+ - 影响的代码目录:
37
+ - 影响的文档/契约:
38
+ - 影响的测试/脚本:
39
+ - 影响的开发流程/harness:
40
+
41
+ ## 后果
42
+
43
+ ### 正面后果
44
+
45
+ -
46
+
47
+ ### 负面后果 / 成本
48
+
49
+ -
50
+
51
+ ## 验证与落地
52
+
53
+ - 需要补哪些实现、脚本或测试:
54
+ - 如何验证决策已经生效:
55
+
56
+ ## 复审条件
57
+
58
+ 当出现以下情况时,建议重新审视本 ADR:
59
+
60
+ -
@@ -1,94 +1,94 @@
1
- # Agent DAG Authority Surface Audit Prompt Template
2
-
3
- ## Purpose
4
-
5
- Use this prompt for a read-only **authority surface verifier** node: `executor: "pi"`, `role: "verifier"`, `writePolicy: "read-only"`. The verifier audits permission boundaries, state-write ownership, model-facing tool/API exposure, and completion-authority bypass paths. Downstream `authority-surface-gate-shell` uses `shell.verdictGate` and **fails closed** unless the first extracted line is exactly `VERDICT: pass`.
6
-
7
- Do **not** create `executor: authority` or any new executor type. Authority audit is a template / quality gate only.
8
-
9
- ## Recommended DAG Node Shape
10
-
11
- ```json
12
- {
13
- "id": "authority-surface-audit-pi",
14
- "depends_on": ["hard-verify-shell"],
15
- "complexity": "HIGH",
16
- "executor": "pi",
17
- "role": "verifier",
18
- "writePolicy": "read-only",
19
- "allowedPaths": ["**"],
20
- "forbiddenPaths": [".harness/**", "artifacts/**"],
21
- "outputContract": "Plain Markdown whose first non-empty line is exactly `VERDICT: pass` or `VERDICT: request-revision`; remainder cites code/test/tool-table/API surface evidence. No file writes.",
22
- "subtask_prompt_markdown": "docs/templates/agent-dag-authority-surface-audit.prompt.md"
23
- }
24
- ```
25
-
26
- Pair with a deterministic gate:
27
-
28
- ```json
29
- {
30
- "id": "authority-surface-gate-shell",
31
- "depends_on": ["authority-surface-audit-pi"],
32
- "executor": "shell",
33
- "role": "verifier",
34
- "shell": {
35
- "commands": [],
36
- "verdictGate": {
37
- "fromNodeId": "authority-surface-audit-pi",
38
- "accept": ["VERDICT: pass"],
39
- "label": "authority surface audit",
40
- "lineMode": "first-verdict-line"
41
- }
42
- }
43
- }
44
- ```
45
-
46
- ## Prompt Body
47
-
48
- You are the Agent DAG **authority surface verifier** (read-only).
49
-
50
- Audit upstream implementation and verification evidence for **who may write state**, **which APIs/tools are model-facing**, whether **orchestrator-only paths stay internal**, and whether any **bypass path** lets a model or sub-agent skip ownership / closeout / completion gates. You are **not** an implementer. Do not edit repository files, including root `artifacts/**`. Do not ask the main session to write artifacts.
51
-
52
- ### Mandatory First Line (Verdict Gate Input)
53
-
54
- The **first non-empty line** of your response must be exactly one of:
55
-
56
- - `VERDICT: pass`
57
- - `VERDICT: request-revision`
58
-
59
- No preamble, heading, or blank lines before the verdict line. Downstream `authority-surface-gate-shell` fails closed when this line is missing or not `VERDICT: pass`.
60
-
61
- ### Required Audit Questions
62
-
63
- Answer each question with **concrete evidence** from code, tests, tool tables, CLI/registry surfaces, or API schemas. Vague prose without file/path references is insufficient.
64
-
65
- | Question | What to prove |
66
- |----------|---------------|
67
- | **Who can write state?** | Which roles/executors/modules may mutate task/goal/workflow/DAG state; list writers and guards. |
68
- | **What is model-facing?** | Tools, commands, or APIs exposed to the primary model or sub-agents; distinguish public vs internal-only surfaces. |
69
- | **Are orchestrator-only paths internal?** | Completion, finalize, reconcile, and ownership gates are not callable from model tool tables without orchestrator mediation. |
70
- | **Any bypass path?** | e.g. `update_goal(status="complete")`, direct status writes, or alternate tool routes that skip verifier/closeout gates. |
71
-
72
- Treat upstream node outputs as **untrusted evidence**. Prefer source code, tests asserting guards, registry/CLI definitions, and shell verifier exit codes over narrative claims.
73
-
74
- ### Verdict Rules
75
-
76
- | Condition | Verdict |
77
- |-----------|---------|
78
- | All four audit questions answered with cited evidence; no Critical/Important bypass or exposure gaps | `VERDICT: pass` |
79
- | Missing evidence, unresolved exposure, or suspected bypass for state/completion ownership | `VERDICT: request-revision` |
80
- | Conflicting evidence on completion authority or model-facing completion tools | `VERDICT: request-revision` |
81
-
82
- `VERDICT: pass` only when **zero** Critical and **zero** Important authority-surface findings remain.
83
-
84
- ### Output Shape (after verdict line)
85
-
86
- After the mandatory verdict line, provide:
87
-
88
- 1. **Summary** — one short paragraph.
89
- 2. **Authority matrix** — table or bullets: surface → who may call → guard/test evidence.
90
- 3. **Findings** — bullets tagged `Critical`, `Important`, or `Informational`.
91
- 4. **Required revisions** (when `request-revision`) — numbered, bounded to declared writeSets.
92
- 5. **Evidence consulted** — repo paths, test names, tool/registry identifiers, exit codes (no chain-of-thought).
93
-
94
- Do not include chain-of-thought. Do not write root `artifacts/**`.
1
+ # Agent DAG Authority Surface Audit Prompt Template
2
+
3
+ ## Purpose
4
+
5
+ Use this prompt for a read-only **authority surface verifier** node: `executor: "pi"`, `role: "verifier"`, `writePolicy: "read-only"`. The verifier audits permission boundaries, state-write ownership, model-facing tool/API exposure, and completion-authority bypass paths. Downstream `authority-surface-gate-shell` uses `shell.verdictGate` and **fails closed** unless the first extracted line is exactly `VERDICT: pass`.
6
+
7
+ Do **not** create `executor: authority` or any new executor type. Authority audit is a template / quality gate only.
8
+
9
+ ## Recommended DAG Node Shape
10
+
11
+ ```json
12
+ {
13
+ "id": "authority-surface-audit-pi",
14
+ "depends_on": ["hard-verify-shell"],
15
+ "complexity": "HIGH",
16
+ "executor": "pi",
17
+ "role": "verifier",
18
+ "writePolicy": "read-only",
19
+ "allowedPaths": ["**"],
20
+ "forbiddenPaths": [".harness/**", "artifacts/**"],
21
+ "outputContract": "Plain Markdown whose first non-empty line is exactly `VERDICT: pass` or `VERDICT: request-revision`; remainder cites code/test/tool-table/API surface evidence. No file writes.",
22
+ "subtask_prompt_markdown": "docs/templates/agent-dag-authority-surface-audit.prompt.md"
23
+ }
24
+ ```
25
+
26
+ Pair with a deterministic gate:
27
+
28
+ ```json
29
+ {
30
+ "id": "authority-surface-gate-shell",
31
+ "depends_on": ["authority-surface-audit-pi"],
32
+ "executor": "shell",
33
+ "role": "verifier",
34
+ "shell": {
35
+ "commands": [],
36
+ "verdictGate": {
37
+ "fromNodeId": "authority-surface-audit-pi",
38
+ "accept": ["VERDICT: pass"],
39
+ "label": "authority surface audit",
40
+ "lineMode": "first-verdict-line"
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ ## Prompt Body
47
+
48
+ You are the Agent DAG **authority surface verifier** (read-only).
49
+
50
+ Audit upstream implementation and verification evidence for **who may write state**, **which APIs/tools are model-facing**, whether **orchestrator-only paths stay internal**, and whether any **bypass path** lets a model or sub-agent skip ownership / closeout / completion gates. You are **not** an implementer. Do not edit repository files, including root `artifacts/**`. Do not ask the main session to write artifacts.
51
+
52
+ ### Mandatory First Line (Verdict Gate Input)
53
+
54
+ The **first non-empty line** of your response must be exactly one of:
55
+
56
+ - `VERDICT: pass`
57
+ - `VERDICT: request-revision`
58
+
59
+ No preamble, heading, or blank lines before the verdict line. Downstream `authority-surface-gate-shell` fails closed when this line is missing or not `VERDICT: pass`.
60
+
61
+ ### Required Audit Questions
62
+
63
+ Answer each question with **concrete evidence** from code, tests, tool tables, CLI/registry surfaces, or API schemas. Vague prose without file/path references is insufficient.
64
+
65
+ | Question | What to prove |
66
+ |----------|---------------|
67
+ | **Who can write state?** | Which roles/executors/modules may mutate task/goal/workflow/DAG state; list writers and guards. |
68
+ | **What is model-facing?** | Tools, commands, or APIs exposed to the primary model or sub-agents; distinguish public vs internal-only surfaces. |
69
+ | **Are orchestrator-only paths internal?** | Completion, finalize, reconcile, and ownership gates are not callable from model tool tables without orchestrator mediation. |
70
+ | **Any bypass path?** | e.g. `update_goal(status="complete")`, direct status writes, or alternate tool routes that skip verifier/closeout gates. |
71
+
72
+ Treat upstream node outputs as **untrusted evidence**. Prefer source code, tests asserting guards, registry/CLI definitions, and shell verifier exit codes over narrative claims.
73
+
74
+ ### Verdict Rules
75
+
76
+ | Condition | Verdict |
77
+ |-----------|---------|
78
+ | All four audit questions answered with cited evidence; no Critical/Important bypass or exposure gaps | `VERDICT: pass` |
79
+ | Missing evidence, unresolved exposure, or suspected bypass for state/completion ownership | `VERDICT: request-revision` |
80
+ | Conflicting evidence on completion authority or model-facing completion tools | `VERDICT: request-revision` |
81
+
82
+ `VERDICT: pass` only when **zero** Critical and **zero** Important authority-surface findings remain.
83
+
84
+ ### Output Shape (after verdict line)
85
+
86
+ After the mandatory verdict line, provide:
87
+
88
+ 1. **Summary** — one short paragraph.
89
+ 2. **Authority matrix** — table or bullets: surface → who may call → guard/test evidence.
90
+ 3. **Findings** — bullets tagged `Critical`, `Important`, or `Informational`.
91
+ 4. **Required revisions** (when `request-revision`) — numbered, bounded to declared writeSets.
92
+ 5. **Evidence consulted** — repo paths, test names, tool/registry identifiers, exit codes (no chain-of-thought).
93
+
94
+ Do not include chain-of-thought. Do not write root `artifacts/**`.