coding-agent-harness 1.0.7 → 1.1.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 (238) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/CONTRIBUTING.md +9 -5
  3. package/README.md +12 -2
  4. package/README.zh-CN.md +10 -2
  5. package/SKILL.md +14 -3
  6. package/dist/build-dist.mjs +32 -6
  7. package/dist/check-dist-observation.mjs +73 -28
  8. package/dist/check-harness.mjs +0 -1
  9. package/dist/check-import-graph.mjs +44 -27
  10. package/dist/check-lite-forbidden-surfaces.mjs +121 -0
  11. package/dist/check-no-ts-nocheck.mjs +88 -0
  12. package/dist/check-runtime-emit.mjs +10 -3
  13. package/dist/check-type-boundaries.mjs +67 -8
  14. package/dist/commands/dashboard-command.mjs +52 -14
  15. package/dist/commands/migration-command.mjs +18 -8
  16. package/dist/commands/module-command.mjs +142 -0
  17. package/dist/commands/preset-command.mjs +65 -4
  18. package/dist/commands/registry.mjs +483 -0
  19. package/dist/commands/task-command.mjs +111 -53
  20. package/dist/harness.mjs +6 -303
  21. package/dist/lib/capability-registry.mjs +229 -53
  22. package/dist/lib/check-module-parallel.mjs +1 -6
  23. package/dist/lib/check-profiles.mjs +39 -46
  24. package/dist/lib/check-task-contracts.mjs +6 -4
  25. package/dist/lib/command-registry.mjs +248 -0
  26. package/dist/lib/core-shared.mjs +78 -3
  27. package/dist/lib/dashboard-data.mjs +203 -22
  28. package/dist/lib/dashboard-workbench.mjs +245 -21
  29. package/dist/lib/dashboard-writer.mjs +4 -1
  30. package/dist/lib/git-status-summary.mjs +0 -1
  31. package/dist/lib/governance-index-generator.mjs +7 -5
  32. package/dist/lib/governance-sync.mjs +46 -121
  33. package/dist/lib/governance-table-boundary.mjs +1 -14
  34. package/dist/lib/harness-core.mjs +5 -1
  35. package/dist/lib/harness-paths.mjs +115 -1
  36. package/dist/lib/impact-classifier.mjs +420 -0
  37. package/dist/lib/lesson-maintenance.mjs +1 -2
  38. package/dist/lib/markdown-utils.mjs +50 -1
  39. package/dist/lib/migration-planner.mjs +31 -16
  40. package/dist/lib/migration-support.mjs +5 -4
  41. package/dist/lib/module-registry.mjs +296 -0
  42. package/dist/lib/preset-audit-contracts.mjs +24 -1
  43. package/dist/lib/preset-engine.mjs +68 -29
  44. package/dist/lib/preset-registry.mjs +374 -72
  45. package/dist/lib/preset-runner.mjs +560 -0
  46. package/dist/lib/review-confirm-git-gate.mjs +73 -19
  47. package/dist/lib/status-builder.mjs +23 -8
  48. package/dist/lib/structure-migration.mjs +6 -4
  49. package/dist/lib/subagent-authorization-audit.mjs +8 -2
  50. package/dist/lib/task-archive-eligibility.mjs +65 -0
  51. package/dist/lib/task-audit-metadata.mjs +25 -11
  52. package/dist/lib/task-audit-migration.mjs +21 -14
  53. package/dist/lib/task-discovery-contract.mjs +32 -0
  54. package/dist/lib/task-index.mjs +4 -2
  55. package/dist/lib/task-lesson-candidates.mjs +1 -2
  56. package/dist/lib/task-lesson-sedimentation.mjs +310 -9
  57. package/dist/lib/task-lifecycle/create-task-helpers.mjs +6 -3
  58. package/dist/lib/task-lifecycle/phase-sync.mjs +0 -1
  59. package/dist/lib/task-lifecycle/preset-interop.mjs +16 -0
  60. package/dist/lib/task-lifecycle/review-confirm.mjs +34 -2
  61. package/dist/lib/task-lifecycle/review-gates.mjs +12 -5
  62. package/dist/lib/task-lifecycle/review-submission.mjs +1 -2
  63. package/dist/lib/task-lifecycle/scaffold-provenance.mjs +0 -1
  64. package/dist/lib/task-lifecycle/template-files.mjs +2 -5
  65. package/dist/lib/task-lifecycle.mjs +117 -159
  66. package/dist/lib/task-metadata.mjs +10 -5
  67. package/dist/lib/task-preset-contract-drift.mjs +45 -0
  68. package/dist/lib/task-repository.mjs +192 -0
  69. package/dist/lib/task-review-model.mjs +38 -17
  70. package/dist/lib/task-scanner.mjs +75 -23
  71. package/dist/lib/task-template-materials.mjs +131 -0
  72. package/dist/lib/task-tombstone-commands.mjs +187 -18
  73. package/dist/lib/types/check-profiles.js +1 -0
  74. package/dist/lib/types/impact.js +1 -0
  75. package/dist/lib/types/preset.js +1 -0
  76. package/dist/lib/types/task-lifecycle.js +1 -0
  77. package/dist/lib/types/task-scanner.js +1 -0
  78. package/dist/postinstall.mjs +2 -2
  79. package/dist/run-built-tests.mjs +10 -3
  80. package/docs-release/README.md +2 -1
  81. package/docs-release/architecture/document-contract-kernel/README.md +150 -0
  82. package/docs-release/architecture/document-contract-kernel/products/full-skill-overlay.md +29 -0
  83. package/docs-release/architecture/document-contract-kernel/products/lite-forbidden-surfaces.txt +26 -0
  84. package/docs-release/architecture/document-contract-kernel/products/lite-skill-overlay.md +37 -0
  85. package/docs-release/architecture/overview.md +2 -2
  86. package/docs-release/architecture/overview.zh-CN.md +2 -2
  87. package/docs-release/architecture/system-explainer/01-system-overview.md +11 -7
  88. package/docs-release/architecture/system-explainer/02-module-dependency.md +4 -4
  89. package/docs-release/architecture/system-explainer/03-task-lifecycle.md +17 -12
  90. package/docs-release/architecture/system-explainer/05-data-flow.md +6 -6
  91. package/docs-release/architecture/system-explainer/06-preset-and-migration.md +2 -2
  92. package/docs-release/architecture/system-explainer/README.md +1 -1
  93. package/docs-release/architecture/system-explainer/en-US/01-system-overview.md +12 -8
  94. package/docs-release/architecture/system-explainer/en-US/02-module-dependency.md +5 -5
  95. package/docs-release/architecture/system-explainer/en-US/03-task-lifecycle.md +19 -11
  96. package/docs-release/architecture/system-explainer/en-US/05-data-flow.md +5 -5
  97. package/docs-release/architecture/system-explainer/en-US/06-preset-and-migration.md +2 -2
  98. package/docs-release/architecture/system-explainer/en-US/README.md +1 -1
  99. package/docs-release/guides/agent-installation.en-US.md +4 -6
  100. package/docs-release/guides/agent-installation.md +11 -8
  101. package/docs-release/guides/contributing.md +10 -3
  102. package/docs-release/guides/contributing.zh-CN.md +10 -3
  103. package/docs-release/guides/legacy-migration-agent-prompt.md +1 -1
  104. package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +1 -1
  105. package/docs-release/guides/migration-playbook.en-US.md +9 -6
  106. package/docs-release/guides/migration-playbook.md +9 -6
  107. package/docs-release/guides/preset-development.md +68 -2
  108. package/docs-release/guides/task-state-machine.en-US.md +8 -8
  109. package/docs-release/guides/task-state-machine.md +7 -7
  110. package/docs-release/guides/typescript-runtime-migration-closeout.md +17 -13
  111. package/package.json +19 -11
  112. package/postinstall.mjs +37 -0
  113. package/presets/legacy-migration/preset.yaml +5 -5
  114. package/presets/legacy-migration/templates/execution_strategy.append.md +1 -1
  115. package/presets/lesson-sedimentation/preset.yaml +3 -3
  116. package/presets/module/preset.yaml +2 -2
  117. package/presets/module/templates/execution_strategy.append.md +1 -1
  118. package/presets/module/templates/task_plan.append.md +3 -3
  119. package/presets/release-closeout/checks/check-release-package.mjs +29 -0
  120. package/presets/release-closeout/preset.yaml +100 -0
  121. package/presets/release-closeout/scripts/generate-release-package.mjs +572 -0
  122. package/presets/release-closeout/templates/execution_strategy.append.md +7 -0
  123. package/presets/release-closeout/templates/findings.seed.md +5 -0
  124. package/presets/release-closeout/templates/review.seed.md +3 -0
  125. package/presets/release-closeout/templates/task_plan.append.md +24 -0
  126. package/presets/standard-task/preset.yaml +2 -2
  127. package/references/agents-md-pattern.md +23 -17
  128. package/references/lessons-governance.md +2 -2
  129. package/references/module-parallel-standard.md +3 -6
  130. package/references/pull-request-standard.md +2 -2
  131. package/references/ssot-governance.md +2 -2
  132. package/references/taskr-gap-analysis.md +3 -3
  133. package/run-dist.mjs +34 -0
  134. package/skills/preset-creator/SKILL.md +40 -8
  135. package/skills/preset-creator/references/complex-task-skeleton/brief.md +32 -8
  136. package/skills/preset-creator/references/preset-package-skeleton.md +15 -5
  137. package/skills/preset-creator/references/structure-aware-paths.md +112 -0
  138. package/templates/AGENTS.md.template +28 -26
  139. package/templates/architecture/README.md +2 -2
  140. package/templates/architecture/service-catalog.md +2 -2
  141. package/templates/architecture/services/service-template.md +1 -1
  142. package/templates/dashboard/assets/app-src/00-state.js +5 -1
  143. package/templates/dashboard/assets/app-src/10-router.js +7 -0
  144. package/templates/dashboard/assets/app-src/20-overview.js +8 -8
  145. package/templates/dashboard/assets/app-src/30-tasks.js +132 -40
  146. package/templates/dashboard/assets/app-src/32-task-swimlane.js +314 -0
  147. package/templates/dashboard/assets/app-src/35-task-detail.js +35 -5
  148. package/templates/dashboard/assets/app-src/40-modules.js +257 -41
  149. package/templates/dashboard/assets/app-src/45-review.js +127 -1
  150. package/templates/dashboard/assets/app-src/90-bindings.js +185 -2
  151. package/templates/dashboard/assets/app.css +928 -53
  152. package/templates/dashboard/assets/app.css.manifest.json +2 -0
  153. package/templates/dashboard/assets/app.js +1071 -98
  154. package/templates/dashboard/assets/app.manifest.json +1 -0
  155. package/templates/dashboard/assets/css-src/00-foundation.css +12 -6
  156. package/templates/dashboard/assets/css-src/10-panels-flow.css +2 -2
  157. package/templates/dashboard/assets/css-src/30-task-index.css +21 -13
  158. package/templates/dashboard/assets/css-src/31-archive.css +94 -0
  159. package/templates/dashboard/assets/css-src/32-task-swimlane.css +487 -0
  160. package/templates/dashboard/assets/css-src/35-review-workspace.css +78 -0
  161. package/templates/dashboard/assets/css-src/40-detail-modules-migration.css +191 -14
  162. package/templates/dashboard/assets/css-src/50-responsive-overrides.css +23 -0
  163. package/templates/dashboard/assets/i18n.js +166 -2
  164. package/templates/development/README.md +9 -9
  165. package/templates/development/cross-repo-debugging.md +3 -3
  166. package/templates/development/external-context/service-template.md +1 -1
  167. package/templates/development/external-source-packs/README.md +2 -2
  168. package/templates/integrations/README.md +4 -4
  169. package/templates/integrations/api-contract.md +1 -1
  170. package/templates/integrations/event-contract.md +1 -1
  171. package/templates/integrations/third-party/vendor-template.md +1 -1
  172. package/templates/integrations/webhook-contract.md +1 -1
  173. package/templates/ledger/Harness-Ledger.md +1 -1
  174. package/templates/modules/module_brief.md +50 -0
  175. package/templates/modules/module_plan.md +49 -0
  176. package/templates/modules/registry_view.md +9 -0
  177. package/templates/modules/session_prompt_pack.md +55 -0
  178. package/templates/planning/brief.md +32 -8
  179. package/templates/planning/module_brief.md +28 -3
  180. package/templates/planning/module_plan.md +26 -11
  181. package/templates/planning/module_session_prompt.md +11 -2
  182. package/templates/planning/optional/slices/_slice-template/brief.md +28 -0
  183. package/templates/planning/review.md +1 -1
  184. package/templates/planning/visual_map.md +1 -1
  185. package/templates/reference/docs-library-standard.md +7 -7
  186. package/templates/reference/execution-workflow-standard.md +13 -0
  187. package/templates/reference/external-source-intake-standard.md +10 -10
  188. package/templates/reference/pull-request-standard.md +2 -2
  189. package/templates/reference/repo-governance-standard.md +1 -1
  190. package/templates/reference/review-routing-standard.md +4 -0
  191. package/templates/ssot/Module-Registry.md +4 -38
  192. package/templates/walkthrough/walkthrough-template.md +1 -1
  193. package/templates-zh-CN/AGENTS.md.template +27 -25
  194. package/templates-zh-CN/CLAUDE.md.template +1 -1
  195. package/templates-zh-CN/architecture/README.md +2 -2
  196. package/templates-zh-CN/architecture/service-catalog.md +2 -2
  197. package/templates-zh-CN/architecture/services/service-template.md +1 -1
  198. package/templates-zh-CN/development/README.md +9 -9
  199. package/templates-zh-CN/development/cross-repo-debugging.md +3 -3
  200. package/templates-zh-CN/development/external-context/service-template.md +1 -1
  201. package/templates-zh-CN/development/external-source-packs/README.md +2 -2
  202. package/templates-zh-CN/integrations/README.md +4 -4
  203. package/templates-zh-CN/integrations/api-contract.md +1 -1
  204. package/templates-zh-CN/integrations/event-contract.md +1 -1
  205. package/templates-zh-CN/integrations/third-party/vendor-template.md +1 -1
  206. package/templates-zh-CN/integrations/webhook-contract.md +1 -1
  207. package/templates-zh-CN/ledger/Harness-Ledger.md +1 -1
  208. package/templates-zh-CN/lessons/lesson-arch-process-change.md +1 -1
  209. package/templates-zh-CN/lessons/lesson-new-doc.md +3 -3
  210. package/templates-zh-CN/lessons/lesson-ref-change.md +4 -4
  211. package/templates-zh-CN/modules/module_brief.md +47 -0
  212. package/templates-zh-CN/modules/module_plan.md +48 -0
  213. package/templates-zh-CN/modules/registry_view.md +9 -0
  214. package/templates-zh-CN/modules/session_prompt_pack.md +50 -0
  215. package/templates-zh-CN/planning/INDEX.md +1 -0
  216. package/templates-zh-CN/planning/brief.md +26 -7
  217. package/templates-zh-CN/planning/module_brief.md +24 -2
  218. package/templates-zh-CN/planning/module_plan.md +35 -29
  219. package/templates-zh-CN/planning/module_session_prompt.md +15 -11
  220. package/templates-zh-CN/planning/optional/slices/_slice-template/brief.md +28 -11
  221. package/templates-zh-CN/planning/review.md +1 -1
  222. package/templates-zh-CN/reference/adversarial-review-standard.md +1 -1
  223. package/templates-zh-CN/reference/delivery-operating-model-standard.md +3 -3
  224. package/templates-zh-CN/reference/docs-library-standard.md +27 -27
  225. package/templates-zh-CN/reference/execution-workflow-standard.md +12 -2
  226. package/templates-zh-CN/reference/external-source-intake-standard.md +10 -10
  227. package/templates-zh-CN/reference/harness-ledger-standard.md +3 -3
  228. package/templates-zh-CN/reference/pull-request-standard.md +1 -1
  229. package/templates-zh-CN/reference/regression-ssot-governance.md +2 -2
  230. package/templates-zh-CN/reference/repo-governance-standard.md +1 -1
  231. package/templates-zh-CN/reference/review-routing-standard.md +3 -0
  232. package/templates-zh-CN/reference/walkthrough-standard.md +2 -2
  233. package/templates-zh-CN/reference/worktree-standard.md +1 -1
  234. package/templates-zh-CN/regression/Cadence-Ledger.md +2 -2
  235. package/templates-zh-CN/ssot/Delivery-SSoT.md +2 -2
  236. package/templates-zh-CN/ssot/Module-Registry.md +5 -44
  237. package/templates-zh-CN/ssot/Regression-SSoT.md +2 -2
  238. package/templates-zh-CN/walkthrough/walkthrough-template.md +4 -4
@@ -0,0 +1,29 @@
1
+ # Full Skill Overlay Source
2
+
3
+ Compatibility matrix version: `document-contract-kernel-v0.5`.
4
+
5
+ The Full Skill keeps all Document Contract Kernel concepts and adds Full-only
6
+ automation, governance, migration, and runtime surfaces. Full must not copy or
7
+ fork the shared task semantics by hand.
8
+
9
+ ## Shared Kernel Dependency
10
+
11
+ Full task packages, context documents, progress evidence, reviews,
12
+ walkthroughs, regression records, and lessons must stay compatible with the
13
+ Document Contract Kernel compatibility matrix.
14
+
15
+ ## Full-only Surfaces
16
+
17
+ Full-only sections may describe package installation, CLI commands, Dashboard,
18
+ Workbench, Preset behavior, generated ledger files, Module Registry, lifecycle
19
+ commands, runtime checks, and source package requirements.
20
+
21
+ These sections must remain explicitly Full-only so later Lite generation can
22
+ exclude them without weakening Full's audit requirements.
23
+
24
+ ## Coverage Rule
25
+
26
+ When a Full Skill edit changes the semantics of AGENTS, context, task package,
27
+ progress evidence, review, walkthrough, regression, or lessons, classify it as a
28
+ Kernel change and update the shared contract plus the Lite overlay in the same
29
+ task.
@@ -0,0 +1,26 @@
1
+ # Lines are regex patterns matched case-insensitively against Lite product source.
2
+ # The guard scans Lite source and generated Lite Skill files, not this list.
3
+ literal:npm install
4
+ regex:\bnpx\s+(?:--yes\s+)?coding-agent-harness\b
5
+ regex:\bharness\s+init\b
6
+ regex:\bharness\s+dev\b
7
+ regex:\bharness\s+check\b
8
+ regex:\bharness\s+(?:new-task|task-start|task-log|task-block|task-review|review-confirm|task-complete|lesson-promote|task-list)\b
9
+ literal:harness.yaml
10
+ literal:Dashboard
11
+ literal:Workbench
12
+ literal:Preset
13
+ literal:preset-creator
14
+ regex:generated\s+ledger
15
+ regex:generated\s+governance
16
+ regex:generated\s+indexes?
17
+ literal:Closeout-Index
18
+ literal:Module-Registry
19
+ literal:Module Registry
20
+ regex:lifecycle\s+CLI\s+commands?
21
+ regex:CLI\s+(?:checks?|commands?|operation|automation)
22
+ literal:Node.js version requirement
23
+ regex:node\s+version\s+requirement
24
+ regex:\bTaskRepository\b
25
+ regex:\bTaskOperations\b
26
+ regex:\bHarnessTransaction\b
@@ -0,0 +1,37 @@
1
+ # Lite Skill Overlay Source
2
+
3
+ Compatibility matrix version: `document-contract-kernel-v0.5`.
4
+
5
+ This source is for a future document-only Lite Skill. Lite keeps the shared
6
+ Document Contract Kernel concepts and removes runtime product surfaces.
7
+
8
+ ## Positioning
9
+
10
+ Lite helps an agent set up and maintain a small project work protocol through
11
+ plain repository documents. It is document-only: the agent reads, writes, and
12
+ reviews project files directly.
13
+
14
+ ## Required Lite Surfaces
15
+
16
+ - `AGENTS.md` as the agent entry protocol.
17
+ - `context/` for stable project facts.
18
+ - `tasks/` for reviewable task packages.
19
+ - `brief.md`, `task_plan.md`, `progress.md`, and `walkthrough.md` in each task.
20
+ - Optional `review.md`, `visual_map.md`, `regression.md`, and `lessons.md` when
21
+ the project needs them.
22
+
23
+ ## Lite Operating Rules
24
+
25
+ - Keep all state human-readable and hand-maintainable.
26
+ - Do not require a project manifest.
27
+ - Do not require machine-produced project state.
28
+ - Treat missing review or visual material as adoption-needed if the project
29
+ later moves to the larger product.
30
+ - Keep upgrade notes short and link back to the compatibility matrix version.
31
+
32
+ ## Upgrade Note
33
+
34
+ If the project later needs the larger Full Coding Agent Harness product, keep the
35
+ Lite documents as migration input. The shared document semantics are preserved so
36
+ an agent can map Lite task packages and context into the Full structure during an
37
+ explicit migration task.
@@ -118,7 +118,7 @@ flowchart LR
118
118
  CLI --> Status["status / check<br/>derive health and failures"]
119
119
  CLI --> Dashboard["dashboard / dev<br/>render human-readable state"]
120
120
  CLI --> Migration["migrate-plan / migrate-run / migrate-verify<br/>legacy project adoption"]
121
- CLI --> Task["new-task / task-* / review-confirm<br/>task lifecycle operations"]
121
+ CLI --> Task["new-task / task-*<br/>task lifecycle operations"]
122
122
  CLI --> UserSkill["install-user / doctor-user<br/>local skill setup"]
123
123
 
124
124
  Status --> Scanner["task scanner + check profiles"]
@@ -168,7 +168,7 @@ stateDiagram-v2
168
168
  active --> in_review: task-review
169
169
  in_review --> review_blocked: open P0-P2 finding
170
170
  review_blocked --> in_review: finding closed or routed
171
- in_review --> closing: review-confirm + task-complete
171
+ in_review --> closing: Workbench confirmation + task-complete
172
172
  closing --> closed: closeout evidence linked
173
173
  closed --> [*]
174
174
  ```
@@ -105,7 +105,7 @@ flowchart LR
105
105
  CLI --> Status["status / check<br/>推导健康状态与失败项"]
106
106
  CLI --> Dashboard["dashboard / dev<br/>渲染可读状态"]
107
107
  CLI --> Migration["migrate-plan / migrate-run / migrate-verify<br/>旧项目迁移"]
108
- CLI --> Task["new-task / task-* / review-confirm<br/>任务生命周期操作"]
108
+ CLI --> Task["new-task / task-*<br/>任务生命周期操作"]
109
109
  CLI --> UserSkill["install-user / doctor-user<br/>本机 Skill 设置"]
110
110
 
111
111
  Status --> Scanner["任务扫描器 + check profiles"]
@@ -153,7 +153,7 @@ stateDiagram-v2
153
153
  active --> in_review: task-review
154
154
  in_review --> review_blocked: 存在 P0-P2 finding
155
155
  review_blocked --> in_review: finding 关闭或路由
156
- in_review --> closing: review-confirm + task-complete
156
+ in_review --> closing: Workbench 人工确认 + task-complete
157
157
  closing --> closed: 收口证据已链接
158
158
  closed --> [*]
159
159
  ```
@@ -63,7 +63,7 @@ flowchart LR
63
63
  A -->|"scaffold + validate"| B
64
64
  B -->|"读取"| C
65
65
  C -->|"生成"| D
66
- D -->|"review-confirm"| B
66
+ D -->|"workbench confirmation"| B
67
67
  ```
68
68
 
69
69
  - **Package**:你 `npm install` 的那个东西,包含 CLI、模板、标准文档、Preset 包
@@ -72,7 +72,7 @@ flowchart LR
72
72
  - **Human**:浏览器里看 Dashboard,在 Workbench 里做审查确认
73
73
 
74
74
  注意这个循环的方向:**Package 写入 Target Repo,Runtime 读取 Target Repo,
75
- Human 通过 review-confirm 再写回 Target Repo**。
75
+ Human 通过 Workbench 人工确认再写回 Target Repo**。
76
76
  整个系统是一个以 Markdown 文件为中心的读写循环,没有任何隐藏状态。
77
77
 
78
78
  ---
@@ -87,7 +87,7 @@ flowchart TD
87
87
 
88
88
  PKG --> CLI["harness CLI\ndist/harness.mjs\n唯一命令入口"]
89
89
  PKG --> Lib["核心库\nscripts/lib/\n~30 个模块,6 个功能层"]
90
- PKG --> Templates["任务模板\ntemplates/\n任务骨架文件(task_plan / visual_map 等)"]
90
+ PKG --> Templates["模板\ntemplates/\n任务骨架 + 模块根模板"]
91
91
  PKG --> References["操作标准\nreferences/\n可复制到目标仓库的规范文档"]
92
92
  PKG --> Presets["Preset 包\npresets/\n可复用任务方法(legacy-migration / module 等)"]
93
93
  ```
@@ -115,6 +115,9 @@ flowchart TD
115
115
 
116
116
  每个任务对应 `coding-agent-harness/planning/tasks/<task-id>/` 下的一个目录,
117
117
  里面有 `task_plan.md`、`progress.md`、`visual_map.md`、`review.md` 等文件。
118
+ 模块注册在 `harness.yaml` 的 `modules.items`;模块根目录默认只包含
119
+ `brief.md` 和 `module_plan.md`,模块任务放在
120
+ `coding-agent-harness/planning/modules/<key>/tasks/<task-id>/`。
118
121
 
119
122
  ### Runtime 做什么
120
123
 
@@ -142,6 +145,7 @@ Runtime 是**无状态的**——每次运行都从 Markdown 文件重新读取
142
145
  | **Budget** | 任务复杂度:`simple` / `standard` / `complex`,决定门禁严格程度 | `task_plan.md` |
143
146
  | **Phase** | Visual Map 中的执行阶段,有状态和完成度 | `visual_map.md` |
144
147
  | **Capability** | 可选功能模块,如 `dashboard`、`module-parallel` | `coding-agent-harness/harness.yaml` |
148
+ | **Module** | YAML 注册的并行工作域,带 owner、scope、依赖和任务分组 | `harness.yaml modules.items` + `planning/modules/<key>/` |
145
149
  | **Review Gate** | 阻止任务完成的审查门禁,必须人工确认才能通过 | `INDEX.md` + `review.md` |
146
150
  | **Governance Sync** | 任务状态变更时自动更新全局账本的原子操作 | `coding-agent-harness/governance/generated/Harness-Ledger.md` |
147
151
  | **Preset** | 可复用的任务方法包,如 `legacy-migration`、`module` | `presets/<id>/` |
@@ -183,9 +187,9 @@ Agent 需要在本地文件系统上读写状态。SaaS 会引入网络依赖、
183
187
  破坏 Agent 的自主执行能力。npm 包让任何能运行 Node.js 的环境都能直接使用,
184
188
  无需账号或网络。`package.json` 的 `dependencies` 为空——零运行时依赖。
185
189
 
186
- ### 为什么 review-confirm 必须是人工操作
190
+ ### 为什么人工确认必须只在 Workbench 里操作
187
191
 
188
- `review-confirm` 是整个系统里**唯一不能被 Agent 自动执行**的操作。
192
+ 人工确认是整个系统里**唯一不能由普通 CLI 暴露给 Agent 的操作**。
189
193
 
190
194
  原因:
191
195
 
@@ -193,7 +197,7 @@ Agent 需要在本地文件系统上读写状态。SaaS 会引入网络依赖、
193
197
 
194
198
  这个边界不是一开始就有的。最初 Dashboard workbench 的 review action 没有 Agent/Human 区分。
195
199
  后来通过竞品分析(Taskr competitive intake)识别出"Agent 自动确认 review"是 P0 风险,
196
- 才引入了 Git 提交门禁:`review-confirm` 会把带有 Git `user.name` / `user.email` 的
200
+ 才引入了 Workbench 写入口和 Git 提交门禁:Dashboard workbench 会把带有 Git `user.name` / `user.email` 的
197
201
  人工确认审计字段写入任务 `INDEX.md`,并做两次 Git 原子提交——第一次提交确认字段,
198
202
  第二次提交包含第一个 commit SHA 的最终审计记录。这个 Git commit 是**可审计的人类签名**,
199
203
  证明有真实的人类看过这个任务。
@@ -204,7 +208,7 @@ Agent 需要在本地文件系统上读写状态。SaaS 会引入网络依赖、
204
208
  不写回 Markdown 文件。原因有三:
205
209
 
206
210
  1. **避免事实漂移**:如果派生状态也写回文件,就有了两份事实源,任何一份过期都会造成误报
207
- 2. **防止绕过门禁**:如果 Agent 能直接修改派生字段,就能绕过 review-confirm 的门禁
211
+ 2. **防止绕过门禁**:如果 Agent 能直接修改派生字段,就能绕过人工确认门禁
208
212
  3. **治理规则即代码**:scanner 的推导规则本身就是治理规则的机器可读表达,每次运行重新计算等于每次都重新执行一遍治理检查
209
213
 
210
214
  ---
@@ -22,7 +22,7 @@ flowchart TD
22
22
 
23
23
  Entry -->|"dashboard\ndev"| DashCmd["dist/commands/dashboard-command.mjs\nDashboard 生成 + 动态服务"]
24
24
  Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["dist/commands/migration-command.mjs\n迁移三阶段命令"]
25
- Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["dist/commands/task-command.mjs\n任务生命周期命令"]
25
+ Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / task-tombstone"| TaskCmd["dist/commands/task-command.mjs\n任务生命周期命令"]
26
26
  Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["dist/commands/preset-command.mjs\nPreset 管理命令"]
27
27
  Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["dist/lib/harness-core.mjs\n(直接调用)"]
28
28
  ```
@@ -176,7 +176,7 @@ flowchart TD
176
176
  TaskLifecycle["task-lifecycle.mjs\n生命周期命令实现\nnew-task / task-start / task-phase\ntask-review / task-complete"]
177
177
 
178
178
  TaskLifecycle --> ReviewGates["task-lifecycle/review-gates.mjs\n门禁验证逻辑\n(进入 review 前的检查)"]
179
- TaskLifecycle --> ReviewConfirm["task-lifecycle/review-confirm.mjs\n人工确认执行\n(review-confirm 命令)"]
179
+ TaskLifecycle --> ReviewConfirm["task-lifecycle/review-confirm.mjs\n人工确认执行\n(Workbench 内部写入口)"]
180
180
  TaskLifecycle --> TextUtils["task-lifecycle/text-utils.mjs\n文本追加工具\n(向 Markdown 文件追加内容)"]
181
181
  TaskLifecycle --> GovSync["governance-sync.mjs\n状态变更时同步账本"]
182
182
  TaskLifecycle --> MigPreset["task-migration-preset.mjs\n迁移 preset 上下文注入"]
@@ -184,8 +184,8 @@ flowchart TD
184
184
  ReviewConfirm --> GitGate["review-confirm-git-gate.mjs\nGit 原子提交门禁\n(写入人工确认块 + commit)"]
185
185
  ```
186
186
 
187
- `review-confirm` 是整个生命周期层里最特殊的命令——它是唯一需要 Git 原子提交的操作,
188
- 也是唯一不能被 Agent 自动执行的操作(见 [01-system-overview.md](01-system-overview.md) 的设计决策)。
187
+ 人工确认是整个生命周期层里最特殊的写操作——它只通过本地 Workbench 触发,并需要 Git 原子提交
188
+ (见 [01-system-overview.md](01-system-overview.md) 的设计决策)。
189
189
 
190
190
  ---
191
191
 
@@ -30,14 +30,14 @@ flowchart TD
30
30
 
31
31
  NS -->|"harness task-start"| IP
32
32
  IP -->|"harness task-review"| R
33
- R -->|"harness review-confirm\n(人工操作)"| D
33
+ R -->|"Dashboard workbench\n人工确认"| D
34
34
  IP -->|"harness task-phase --blocked"| BL
35
35
  BL -->|"harness task-start"| IP
36
36
  R -->|"打回重做"| IP
37
37
  ```
38
38
 
39
- **关键点**:`review-confirm` 是整个系统里**唯一不能被 Agent 自动执行**的命令。
40
- 它需要真实的人类操作,并会写入带有 Git `user.name` / `user.email` 的可审计确认块。
39
+ **关键点**:人工确认不作为普通 CLI 命令暴露。它只能通过本地 Dashboard workbench 的写接口触发,
40
+ 并会写入带有 Git `user.name` / `user.email` 的可审计确认块。
41
41
 
42
42
  ---
43
43
 
@@ -53,7 +53,7 @@ Budget 是任务的复杂度等级,直接决定审查门禁有多严:
53
53
  | 需要关闭所有 blocking findings | ✗ | ✓ | ✓ |
54
54
  | 需要 Walkthrough 链接 | ✗ | ✓ | ✓ |
55
55
  | 需要 Lesson 决策完成 | ✗ | ✓ | ✓ |
56
- | 需要人工 review-confirm | ✗ | ✓ | ✓ |
56
+ | 需要 Dashboard 人工确认 | ✗ | ✓ | ✓ |
57
57
 
58
58
  `simple` 任务可以直接从 `in_progress` 跳到 `done`,没有任何门禁。
59
59
  `standard` 和 `complex` 的门禁完全相同——区别在于 `complex` 任务通常需要 subagent 授权和对抗审查。
@@ -87,15 +87,17 @@ flowchart TD
87
87
 
88
88
  ---
89
89
 
90
- ## Level 3 — review-confirm 的门禁细节
90
+ ## Level 3 — Dashboard 人工确认的门禁细节
91
91
 
92
- 当人类执行 `harness review-confirm` 时,系统在**执行确认之前**做四项检查:
92
+ 当人类在本地 Dashboard workbench 点击确认时,系统在**执行确认之前**做四项检查:
93
93
 
94
94
  ```mermaid
95
95
  flowchart TD
96
- Trigger["harness review-confirm task-123"]
96
+ Trigger["POST /api/tasks/review-complete\n(local Dashboard workbench)"]
97
97
 
98
- Trigger --> C1{"确认文本与任务 ID 匹配?"}
98
+ Trigger --> A1{"Host / Origin / CSRF\n匹配本地 workbench?"}
99
+ A1 -->|"否"| EA["❌ 拒绝\n不是 workbench 请求"]
100
+ A1 -->|"是"| C1{"确认文本与任务 ID 匹配?"}
99
101
  C1 -->|"否"| E1["❌ 拒绝\n确认文本不对"]
100
102
  C1 -->|"是"| C2{"无阻塞性审查发现?\n(P0/P1/P2 open findings)"}
101
103
  C2 -->|"否"| E2["❌ 拒绝\n还有未关闭的 blocking findings"]
@@ -108,6 +110,9 @@ flowchart TD
108
110
  Commit1 --> Commit2["Git 提交 #2\nchore: record review confirmation audit task-123"]
109
111
  ```
110
112
 
113
+ 普通 CLI 不暴露人工确认命令;Agent 可以提交审查材料,但不能通过 CLI 直接写人工确认。
114
+ Dashboard workbench 仍只绑定 `127.0.0.1`,并要求同源和 CSRF token。
115
+
111
116
  **两次提交策略**:第一次提交 `INDEX.md` 中的确认字段,第二次提交最终审计元数据。
112
117
  这样即使第二次提交失败,第一次提交也已经锁定了确认记录。
113
118
 
@@ -275,7 +280,7 @@ Tombstone 块追加到 `task_plan.md` 末尾(不替换原内容),保留历
275
280
  (Ledger、Closeout Index、其他任务的 `Supersedes` 字段都可能指向被删任务)。
276
281
  Tombstone 标记让 Soft-deleted / Superseded 队列可以只读追溯"为什么这个任务不在活跃队列里"。
277
282
 
278
- ### 为什么 review-confirm 需要两次 Git 提交
283
+ ### 为什么 Dashboard 人工确认需要两次 Git 提交
279
284
 
280
285
  两次提交让 audit commit 的 SHA 成为不可篡改的时间戳。
281
286
  第一次提交确认本身,第二次提交包含第一个 commit SHA 的审计记录。
@@ -292,13 +297,13 @@ Git 自身的锁(`.git/index.lock`)只保护 index 操作,
292
297
  ### 为什么 simple budget 跳过所有门禁
293
298
 
294
299
  simple 任务对应 trivial 级别的改动(文档修正、配置调整),
295
- 强制经过 `task-review → review-confirm → task-complete` 三步会让 overhead 超过任务本身的价值。
300
+ 强制经过 `task-review → Dashboard 人工确认 → task-complete` 三步会让 overhead 超过任务本身的价值。
296
301
  这是有意的快速路径,不是遗漏。
297
302
 
298
303
  ### Lesson 系统的设计意图
299
304
 
300
305
  Lesson 系统把任务执行中发现的可复用经验从"聊天里提到过"变成
301
306
  "可追踪、可审查、可沉淀到标准文档"的治理对象。
302
- Lesson candidate 决策必须在 `review-confirm` 之前完成,
303
- 因为 `review-confirm` 是责任转移点——人工确认后,任务进入 finalization,
307
+ Lesson candidate 决策必须在 Dashboard 人工确认之前完成,
308
+ 因为人工确认是责任转移点——确认后,任务进入 finalization,
304
309
  此时再要求 Agent 补 lesson 决策会造成责任归属混乱。
@@ -152,13 +152,13 @@ flowchart TD
152
152
  flowchart TD
153
153
  Collect["collectMarkdownDocuments()"]
154
154
 
155
- Collect --> Fixed["固定路径(存在时收集)\nHarness-Ledger.md\ncoding-agent-harness/planning/modules/Module-Registry.md\ncoding-agent-harness/governance/regression/Regression-SSoT.md\ncoding-agent-harness/governance/generated/Closeout-Index.md"]
155
+ Collect --> Fixed["固定路径(存在时收集)\nHarness-Ledger.md\nharness.yaml modules.items\ncoding-agent-harness/planning/modules/Module-Registry.md\ncoding-agent-harness/governance/regression/Regression-SSoT.md\ncoding-agent-harness/governance/generated/Closeout-Index.md"]
156
156
 
157
157
  Collect --> Walkthrough["coding-agent-harness/planning/tasks/<task>/ 下所有 .md\n(排除 _archive/ 和 _ 开头文件)"]
158
158
 
159
159
  Collect --> TaskDocs["每个任务目录下:\nbrief / task_plan / execution_strategy\nvisual_map / lesson_candidates\nprogress / review / findings\nreferences/INDEX.md / artifacts/INDEX.md"]
160
160
 
161
- Collect --> ModuleDocs["coding-agent-harness/planning/modules/ 下:\n每个模块的 module_plan.md\n每个模块的 brief.md"]
161
+ Collect --> ModuleDocs["coding-agent-harness/planning/modules/ 下:\n每个模块根 brief.md / module_plan.md\n每个模块 tasks/<task>/ 的任务合同"]
162
162
 
163
163
  Collect --> Lessons["01-GOVERNANCE/lessons/ 下所有 .md"]
164
164
  ```
@@ -191,12 +191,12 @@ flowchart LR
191
191
  DC["harness dev"]
192
192
  DC --> HTTP["本地 HTTP 服务\nlocalhost:PORT"]
193
193
  DC --> Watch["文件监听\n轮询模式,每 1 秒检查一次\n变化后延迟 250ms 重新生成"]
194
- HTTP --> Browser["浏览器实时查看\n支持 review-confirm 等写操作"]
194
+ HTTP --> Browser["浏览器实时查看\n支持人工确认等写操作"]
195
195
  end
196
196
  ```
197
197
 
198
198
  **关键边界**:静态 Dashboard 是只读的,不能触发任何写操作。
199
- 只有 `harness dev`(Workbench 模式)才能执行 `review-confirm`、`task-start` 等写操作。
199
+ 只有 `harness dev`(Workbench 模式)才能执行人工确认等写操作。
200
200
 
201
201
  ### Dashboard HTML 生成方式
202
202
 
@@ -255,8 +255,8 @@ app-src 里的 vanilla JS 组件(`DashboardShell`、`SidebarNav`、`TableView`
255
255
  ### 为什么 `harness dev` 和 `harness dashboard` 是两个命令
256
256
 
257
257
  `harness dashboard` 生成静态只读快照(适合 CI、迁移报告、离线证据)。
258
- `harness dev` 启动本地动态 Workbench server,支持文件 watch、自动刷新、
259
- review-confirm 写操作。两者的边界是:**静态快照可以分享,动态 Workbench 只能本地用**。
258
+ `harness dev` 启动本地动态 Workbench server,支持文件 watch、自动刷新和人工确认写操作。
259
+ 两者的边界是:**静态快照可以分享,动态 Workbench 只能本地用**。
260
260
 
261
261
  ### 为什么文件监听用轮询而不是 fs.watch
262
262
 
@@ -212,7 +212,7 @@ flowchart TD
212
212
  flowchart TD
213
213
  Core["core\n(必选,所有其他能力的基础)"]
214
214
 
215
- Core --> ModParallel["module-parallel\n模块注册表 + 并行工作"]
215
+ Core --> ModParallel["module-parallel\nYAML 模块注册 + 并行工作"]
216
216
  Core --> AdvReview["adversarial-review\n对抗审查报告\n(别名:review-contract)"]
217
217
  Core --> LongRunning["long-running-task\n长时间运行任务合约"]
218
218
  Core --> Dashboard["dashboard\n本地 HTML Dashboard"]
@@ -224,7 +224,7 @@ flowchart TD
224
224
  | 能力 | 何时启用 |
225
225
  | --- | --- |
226
226
  | `core` | 始终,这是必选基础 |
227
- | `module-parallel` | 项目有 2 个以上独立模块需要并行所有权时 |
227
+ | `module-parallel` | 项目有 2 个以上独立模块,需要在 `harness.yaml modules.items` 里维护 owner、scope、依赖和同步规则时 |
228
228
  | `subagent-worker` | 代码变更 subagent 需要在独立 worktree 工作并 commit 交接时 |
229
229
  | `adversarial-review` | 发布、架构、安全、数据或策略风险需要独立审查产物时 |
230
230
  | `long-running-task` | Agent 可能跨多个 loop 运行而无需每步用户确认时 |
@@ -17,7 +17,7 @@
17
17
  - 为什么状态存在 Markdown 文件里,而不是数据库?
18
18
  - 为什么有三种 check profile,而不是一种?
19
19
  - `governance-sync` 和 `governance rebuild` 有什么区别,为什么要分开?
20
- - `review-confirm` 为什么必须是人工操作,不能自动化?
20
+ - 人工确认为什么只能通过本地 Workbench,不能作为普通 CLI 命令暴露?
21
21
 
22
22
  这些问题的答案散落在设计决策、历史演进和操作规范里。
23
23
  这套文档把它们集中起来,让你不需要翻 git log 就能理解系统的"为什么"。
@@ -64,7 +64,7 @@ flowchart LR
64
64
  A -->|"scaffold + validate"| B
65
65
  B -->|"read"| C
66
66
  C -->|"generate"| D
67
- D -->|"review-confirm"| B
67
+ D -->|"workbench confirmation"| B
68
68
  ```
69
69
 
70
70
  - **Package**: What you `npm install` — contains the CLI, templates, standards docs, and Preset packages
@@ -73,7 +73,7 @@ flowchart LR
73
73
  - **Human**: Views the Dashboard in a browser, performs review confirmation in the Workbench
74
74
 
75
75
  Note the direction of this loop: **Package writes to Target Repo, Runtime reads from Target Repo,
76
- Human writes back to Target Repo via review-confirm**.
76
+ Human writes back to Target Repo through Workbench confirmation**.
77
77
  The whole system is a read-write loop centered on Markdown files, with no hidden state.
78
78
 
79
79
  ---
@@ -88,7 +88,7 @@ flowchart TD
88
88
 
89
89
  PKG --> CLI["harness CLI\ndist/harness.mjs\nSingle command entry point"]
90
90
  PKG --> Lib["Core library\nscripts/lib/\n~30 modules, 6 functional layers"]
91
- PKG --> Templates["Task templates\ntemplates/\nTask scaffold files (task_plan / visual_map etc.)"]
91
+ PKG --> Templates["Templates\ntemplates/\nTask scaffolds + module-root templates"]
92
92
  PKG --> References["Operating standards\nreferences/\nSpec docs that can be copied to target repos"]
93
93
  PKG --> Presets["Preset packages\npresets/\nReusable task methods (legacy-migration / module etc.)"]
94
94
  ```
@@ -116,6 +116,9 @@ flowchart TD
116
116
 
117
117
  Each task corresponds to a directory under `coding-agent-harness/planning/tasks/<task-id>/`,
118
118
  containing files like `task_plan.md`, `progress.md`, `visual_map.md`, `review.md`, etc.
119
+ Modules are registered in `harness.yaml` `modules.items`. A module root owns
120
+ only `brief.md` and `module_plan.md` by default, while module tasks live under
121
+ `coding-agent-harness/planning/modules/<key>/tasks/<task-id>/`.
119
122
 
120
123
  ### What the Runtime does
121
124
 
@@ -143,6 +146,7 @@ caching no intermediate state (except file watching in `harness dev`).
143
146
  | **Budget** | Task complexity: `simple` / `standard` / `complex`, determines gate strictness | `task_plan.md` |
144
147
  | **Phase** | An execution phase in the Visual Map, with state and completion | `visual_map.md` |
145
148
  | **Capability** | Optional feature module, e.g. `dashboard`, `module-parallel` | `coding-agent-harness/harness.yaml` |
149
+ | **Module** | YAML-registered parallel work domain with owner, scope, dependencies, and task grouping | `harness.yaml modules.items` + `planning/modules/<key>/` |
146
150
  | **Review Gate** | A review gate that blocks task completion, requires human confirmation to pass | `review.md` |
147
151
  | **Governance Sync** | Atomic operation that auto-updates the global ledger on task state changes | `coding-agent-harness/governance/generated/Harness-Ledger.md` |
148
152
  | **Preset** | A reusable task method package, e.g. `legacy-migration`, `module` | `presets/<id>/` |
@@ -185,10 +189,10 @@ dependency, authentication, and latency, breaking Agents' autonomous execution c
185
189
  An npm package lets any environment that can run Node.js use it directly, with no account
186
190
  or network required. `package.json` `dependencies` is empty — zero runtime dependencies.
187
191
 
188
- ### Why review-confirm must be a manual operation
192
+ ### Why human confirmation must stay in Workbench
189
193
 
190
- `review-confirm` is the **only operation in the entire system that cannot be automatically
191
- executed by an Agent**.
194
+ Human confirmation is the **only operation in the system that is not exposed to Agents
195
+ as a regular CLI command**.
192
196
 
193
197
  The reason:
194
198
 
@@ -197,7 +201,7 @@ The reason:
197
201
  This boundary wasn't there from the start. Initially the Dashboard workbench review action
198
202
  had no Agent/Human distinction. Later, through competitive analysis (Taskr competitive intake),
199
203
  "Agent auto-confirming review" was identified as a P0 risk, which led to introducing the
200
- Git commit gate: `review-confirm` writes human confirmation audit fields with Git
204
+ Workbench write endpoint and Git commit gate: Dashboard workbench writes human confirmation audit fields with Git
201
205
  `user.name` / `user.email` to the task `INDEX.md`, and makes two atomic Git commits:
202
206
  the first commits the confirmation fields, and the second commits the final audit
203
207
  record containing the first commit's SHA.
@@ -211,7 +215,7 @@ recalculated on every run and never written back to Markdown files. Three reason
211
215
  1. **Avoid fact drift**: If derived state were also written to files, there would be two sources
212
216
  of truth, and either one going stale would cause false reports
213
217
  2. **Prevent gate bypass**: If Agents could directly modify derived fields, they could bypass
214
- the review-confirm gate
218
+ the human confirmation gate
215
219
  3. **Governance rules as code**: The scanner's derivation rules are themselves a machine-readable
216
220
  expression of governance rules — recalculating on every run is equivalent to re-executing
217
221
  the governance check every time
@@ -23,7 +23,7 @@ flowchart TD
23
23
 
24
24
  Entry -->|"dashboard\ndev"| DashCmd["dist/commands/dashboard-command.mjs\nDashboard generation + dynamic serving"]
25
25
  Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["dist/commands/migration-command.mjs\nMigration three-phase commands"]
26
- Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["dist/commands/task-command.mjs\nTask lifecycle commands"]
26
+ Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / task-tombstone"| TaskCmd["dist/commands/task-command.mjs\nTask lifecycle commands"]
27
27
  Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["dist/commands/preset-command.mjs\nPreset management commands"]
28
28
  Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["dist/lib/harness-core.mjs\n(called directly)"]
29
29
  ```
@@ -181,7 +181,7 @@ flowchart TD
181
181
  TaskLifecycle["task-lifecycle.mjs\nLifecycle command implementations\nnew-task / task-start / task-phase\ntask-review / task-complete"]
182
182
 
183
183
  TaskLifecycle --> ReviewGates["task-lifecycle/review-gates.mjs\nGate validation logic\n(checks before entering review)"]
184
- TaskLifecycle --> ReviewConfirm["task-lifecycle/review-confirm.mjs\nHuman confirmation execution\n(review-confirm command)"]
184
+ TaskLifecycle --> ReviewConfirm["task-lifecycle/review-confirm.mjs\nHuman confirmation execution\n(Workbench internal write entry)"]
185
185
  TaskLifecycle --> TextUtils["task-lifecycle/text-utils.mjs\nText append utilities\n(appending content to Markdown files)"]
186
186
  TaskLifecycle --> GovSync["governance-sync.mjs\nSync ledger on state changes"]
187
187
  TaskLifecycle --> MigPreset["task-migration-preset.mjs\nMigration Preset context injection"]
@@ -189,9 +189,9 @@ flowchart TD
189
189
  ReviewConfirm --> GitGate["review-confirm-git-gate.mjs\nGit atomic commit gate\n(writes human confirmation block + commit)"]
190
190
  ```
191
191
 
192
- `review-confirm` is the most special command in the entire lifecycle layer it's the only
193
- operation that requires a Git atomic commit, and the only one that cannot be automatically
194
- executed by an Agent (see design decisions in [01-system-overview.md](01-system-overview.md)).
192
+ Human confirmation is the most special write operation in the lifecycle layer: it is triggered
193
+ only through the local Workbench and requires Git atomic commit behavior
194
+ (see design decisions in [01-system-overview.md](01-system-overview.md)).
195
195
 
196
196
  ---
197
197
 
@@ -30,14 +30,14 @@ flowchart TD
30
30
 
31
31
  NS -->|"harness task-start"| IP
32
32
  IP -->|"harness task-review"| R
33
- R -->|"harness review-confirm\n(manual operation)"| D
33
+ R -->|"Dashboard workbench\nhuman confirmation"| D
34
34
  IP -->|"harness task-phase --blocked"| BL
35
35
  BL -->|"harness task-start"| IP
36
36
  R -->|"sent back for rework"| IP
37
37
  ```
38
38
 
39
- **Key point**: `review-confirm` is the **only command in the entire system that cannot be
40
- automatically executed by an Agent**. It requires a real human operation and writes an
39
+ **Key point**: human confirmation is not exposed as a regular CLI command. It can only
40
+ be triggered through the local Dashboard workbench write endpoint, and it writes an
41
41
  auditable confirmation block with Git `user.name` / `user.email`.
42
42
 
43
43
  ---
@@ -54,7 +54,7 @@ Budget is the task's complexity level, and it directly determines how strict the
54
54
  | Requires all blocking findings closed | ✗ | ✓ | ✓ |
55
55
  | Requires Walkthrough link | ✗ | ✓ | ✓ |
56
56
  | Requires Lesson decision complete | ✗ | ✓ | ✓ |
57
- | Requires human review-confirm | ✗ | ✓ | ✓ |
57
+ | Requires Dashboard human confirmation | ✗ | ✓ | ✓ |
58
58
 
59
59
  `simple` tasks can jump directly from `in_progress` to `done` with no gates.
60
60
  `standard` and `complex` have identical gates — the difference is that `complex` tasks
@@ -89,16 +89,18 @@ After entering review state, the Agent needs to write `review.md` and fill in th
89
89
 
90
90
  ---
91
91
 
92
- ## Level 3 — Gate details for review-confirm
92
+ ## Level 3 — Gate details for Dashboard human confirmation
93
93
 
94
- When a human runs `harness review-confirm`, the system performs four checks
94
+ When a human clicks confirm in the local Dashboard workbench, the system performs four checks
95
95
  **before executing the confirmation**:
96
96
 
97
97
  ```mermaid
98
98
  flowchart TD
99
- Trigger["harness review-confirm task-123"]
99
+ Trigger["POST /api/tasks/review-complete\n(local Dashboard workbench)"]
100
100
 
101
- Trigger --> C1{"Confirmation text matches task ID?"}
101
+ Trigger --> A1{"Host / Origin / CSRF\nmatch local workbench?"}
102
+ A1 -->|"no"| EA["❌ Rejected\nNot a workbench request"]
103
+ A1 -->|"yes"| C1{"Confirmation text matches task ID?"}
102
104
  C1 -->|"no"| E1["❌ Rejected\nWrong confirmation text"]
103
105
  C1 -->|"yes"| C2{"No blocking review findings?\n(P0/P1/P2 open findings)"}
104
106
  C2 -->|"no"| E2["❌ Rejected\nStill has unclosed blocking findings"]
@@ -111,6 +113,12 @@ flowchart TD
111
113
  Commit1 --> Commit2["Git commit #2\nchore: record review confirmation audit task-123"]
112
114
  ```
113
115
 
116
+ Agent runtime detection is an accidental-self-approval guard, not cryptographic identity.
117
+ If an agent and a human share the same OS user and the agent can mutate environment
118
+ variables, files, and Git commits, the CLI cannot independently prove who operated it.
119
+ Stronger isolation requires an external human approval service, OS keychain/passkey, or
120
+ separate system-user boundary.
121
+
114
122
  **Two-commit strategy**: The first commit covers confirmation fields in `INDEX.md`; the second
115
123
  commits the final audit metadata. Even if the second commit fails, the first commit has
116
124
  already locked in the confirmation record.
@@ -287,7 +295,7 @@ orphan references (the Ledger, Closeout Index, and other tasks' `Supersedes` fie
287
295
  all point to the deleted task). Tombstone markers let the Soft-deleted / Superseded queue
288
296
  provide read-only traceability for "why isn't this task in the active queue".
289
297
 
290
- ### Why review-confirm requires two Git commits
298
+ ### Why Dashboard human confirmation requires two Git commits
291
299
 
292
300
  Two commits make the audit commit's SHA an immutable timestamp. The first commit covers
293
301
  the confirmation itself; the second commit contains an audit record with the first commit's
@@ -306,7 +314,7 @@ sync operation", not a single git command.
306
314
  ### Why simple budget skips all gates
307
315
 
308
316
  Simple tasks correspond to trivial changes (doc corrections, config adjustments). Forcing
309
- them through `task-review → review-confirm → task-complete` would make the overhead exceed
317
+ them through `task-review → Dashboard human confirmation → task-complete` would make the overhead exceed
310
318
  the value of the task itself. This is an intentional fast path, not an oversight.
311
319
 
312
320
  ### The design intent of the Lesson system
@@ -314,6 +322,6 @@ the value of the task itself. This is an intentional fast path, not an oversight
314
322
  The Lesson system transforms reusable knowledge discovered during task execution from
315
323
  "mentioned in chat" into a governance object that is "trackable, reviewable, and
316
324
  sedimentable into standard docs". Lesson candidate decisions must be completed before
317
- `review-confirm`, because `review-confirm` is the responsibility transfer point — once
325
+ Dashboard human confirmation, because human confirmation is the responsibility transfer point — once
318
326
  human confirmation is done, the task enters finalization, and requiring the Agent to
319
327
  add lesson decisions at that point would create accountability confusion.
@@ -155,13 +155,13 @@ Which files `collectMarkdownDocuments()` collects:
155
155
  flowchart TD
156
156
  Collect["collectMarkdownDocuments()"]
157
157
 
158
- Collect --> Fixed["Fixed paths (collected when they exist)\nHarness-Ledger.md\ncoding-agent-harness/planning/modules/Module-Registry.md\ncoding-agent-harness/governance/regression/Regression-SSoT.md\ncoding-agent-harness/governance/generated/Closeout-Index.md"]
158
+ Collect --> Fixed["Fixed paths (collected when they exist)\nHarness-Ledger.md\nharness.yaml modules.items\ncoding-agent-harness/planning/modules/Module-Registry.md\ncoding-agent-harness/governance/regression/Regression-SSoT.md\ncoding-agent-harness/governance/generated/Closeout-Index.md"]
159
159
 
160
160
  Collect --> Walkthrough["All .md files under coding-agent-harness/planning/tasks/<task>/\n(excluding _archive/ and files starting with _)"]
161
161
 
162
162
  Collect --> TaskDocs["Under each task directory:\nbrief / task_plan / execution_strategy\nvisual_map / lesson_candidates\nprogress / review / findings\nreferences/INDEX.md / artifacts/INDEX.md"]
163
163
 
164
- Collect --> ModuleDocs["Under coding-agent-harness/planning/modules/:\nmodule_plan.md for each module\nbrief.md for each module"]
164
+ Collect --> ModuleDocs["Under coding-agent-harness/planning/modules/:\nroot brief.md / module_plan.md for each module\ntask contracts under tasks/<task>/"]
165
165
 
166
166
  Collect --> Lessons["All .md files under 01-GOVERNANCE/lessons/"]
167
167
  ```
@@ -197,12 +197,12 @@ flowchart LR
197
197
  DC["harness dev"]
198
198
  DC --> HTTP["Local HTTP server\nlocalhost:PORT"]
199
199
  DC --> Watch["File watching\nPolling mode, checks every 1 second\nRegenerates after 250ms delay on change"]
200
- HTTP --> Browser["Live browser view\nSupports review-confirm and other write operations"]
200
+ HTTP --> Browser["Live browser view\nSupports human confirmation and other write operations"]
201
201
  end
202
202
  ```
203
203
 
204
204
  **Key boundary**: The static Dashboard is read-only and cannot trigger any write operations.
205
- Only `harness dev` (Workbench mode) can execute write operations like `review-confirm`
205
+ Only `harness dev` (Workbench mode) can execute write operations like human confirmation
206
206
  and `task-start`.
207
207
 
208
208
  ### Dashboard HTML generation
@@ -266,7 +266,7 @@ a complete security validation chain.
266
266
 
267
267
  `harness dashboard` generates a static read-only snapshot (suitable for CI, migration
268
268
  reports, offline evidence). `harness dev` starts a local dynamic Workbench server with
269
- file watching, auto-refresh, and review-confirm write operations. The boundary is:
269
+ file watching, auto-refresh, and human-confirmation write operations. The boundary is:
270
270
  **static snapshots can be shared; the dynamic Workbench is local-only**.
271
271
 
272
272
  ### Why file watching uses polling instead of fs.watch