coding-agent-harness 1.0.5 → 1.0.6

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 (260) hide show
  1. package/CONTRIBUTING.md +2 -2
  2. package/README.md +63 -3
  3. package/README.zh-CN.md +52 -3
  4. package/SKILL.md +43 -43
  5. package/dist/build-dist.mjs +189 -0
  6. package/dist/check-dist-observation.mjs +428 -0
  7. package/dist/check-harness.mjs +489 -0
  8. package/dist/check-import-graph.mjs +511 -0
  9. package/dist/check-runtime-emit.mjs +304 -0
  10. package/dist/check-type-boundaries.mjs +139 -0
  11. package/dist/commands/dashboard-command.mjs +80 -0
  12. package/dist/commands/migration-command.mjs +152 -0
  13. package/dist/commands/preset-command.mjs +91 -0
  14. package/dist/commands/task-command.mjs +324 -0
  15. package/dist/harness.mjs +304 -0
  16. package/dist/lib/capability-registry.mjs +643 -0
  17. package/dist/lib/check-module-parallel.mjs +227 -0
  18. package/dist/lib/check-profiles.mjs +414 -0
  19. package/dist/lib/check-task-contracts.mjs +54 -0
  20. package/dist/lib/core-shared.mjs +254 -0
  21. package/dist/lib/dashboard-data.mjs +608 -0
  22. package/dist/lib/dashboard-workbench.mjs +334 -0
  23. package/dist/lib/dashboard-writer.mjs +200 -0
  24. package/dist/lib/git-status-summary.mjs +45 -0
  25. package/dist/lib/governance-index-generator.mjs +236 -0
  26. package/dist/lib/governance-sync.mjs +617 -0
  27. package/dist/lib/governance-table-boundary.mjs +161 -0
  28. package/{scripts → dist}/lib/harness-core.mjs +2 -0
  29. package/dist/lib/harness-paths.mjs +338 -0
  30. package/dist/lib/lesson-maintenance.mjs +139 -0
  31. package/dist/lib/markdown-utils.mjs +193 -0
  32. package/dist/lib/migration-planner.mjs +439 -0
  33. package/dist/lib/migration-support.mjs +317 -0
  34. package/dist/lib/phase-kind.mjs +46 -0
  35. package/dist/lib/preset-audit-contracts.mjs +40 -0
  36. package/dist/lib/preset-engine.mjs +516 -0
  37. package/dist/lib/preset-registry.mjs +831 -0
  38. package/dist/lib/preset-resource-contracts.mjs +83 -0
  39. package/dist/lib/review-confirm-git-gate.mjs +244 -0
  40. package/dist/lib/status-builder.mjs +87 -0
  41. package/{scripts → dist}/lib/status-dashboard-renderer.mjs +44 -46
  42. package/dist/lib/structure-migration.mjs +404 -0
  43. package/dist/lib/subagent-authorization-audit.mjs +198 -0
  44. package/dist/lib/task-audit-metadata.mjs +376 -0
  45. package/dist/lib/task-audit-migration.mjs +355 -0
  46. package/dist/lib/task-completion-consistency.mjs +29 -0
  47. package/dist/lib/task-index.mjs +133 -0
  48. package/dist/lib/task-lesson-candidates.mjs +239 -0
  49. package/dist/lib/task-lesson-sedimentation.mjs +300 -0
  50. package/dist/lib/task-lifecycle/create-task-helpers.mjs +84 -0
  51. package/dist/lib/task-lifecycle/phase-sync.mjs +82 -0
  52. package/dist/lib/task-lifecycle/review-confirm.mjs +93 -0
  53. package/dist/lib/task-lifecycle/review-gates.mjs +62 -0
  54. package/dist/lib/task-lifecycle/review-submission.mjs +52 -0
  55. package/dist/lib/task-lifecycle/scaffold-provenance.mjs +54 -0
  56. package/dist/lib/task-lifecycle/template-files.mjs +52 -0
  57. package/dist/lib/task-lifecycle/text-utils.mjs +26 -0
  58. package/dist/lib/task-lifecycle.mjs +611 -0
  59. package/dist/lib/task-metadata.mjs +116 -0
  60. package/dist/lib/task-review-model.mjs +474 -0
  61. package/dist/lib/task-scanner.mjs +439 -0
  62. package/dist/lib/task-tombstone-commands.mjs +125 -0
  63. package/dist/postinstall.mjs +14 -0
  64. package/dist/run-built-tests.mjs +84 -0
  65. package/docs-release/README.md +1 -0
  66. package/docs-release/architecture/overview.md +12 -12
  67. package/docs-release/architecture/overview.zh-CN.md +12 -12
  68. package/docs-release/architecture/system-explainer/01-system-overview.md +15 -14
  69. package/docs-release/architecture/system-explainer/02-module-dependency.md +8 -8
  70. package/docs-release/architecture/system-explainer/03-task-lifecycle.md +3 -3
  71. package/docs-release/architecture/system-explainer/04-check-and-governance.md +9 -7
  72. package/docs-release/architecture/system-explainer/05-data-flow.md +5 -5
  73. package/docs-release/architecture/system-explainer/06-preset-and-migration.md +1 -4
  74. package/docs-release/architecture/system-explainer/en-US/01-system-overview.md +15 -14
  75. package/docs-release/architecture/system-explainer/en-US/02-module-dependency.md +8 -8
  76. package/docs-release/architecture/system-explainer/en-US/03-task-lifecycle.md +3 -3
  77. package/docs-release/architecture/system-explainer/en-US/04-check-and-governance.md +10 -8
  78. package/docs-release/architecture/system-explainer/en-US/05-data-flow.md +5 -5
  79. package/docs-release/architecture/system-explainer/en-US/06-preset-and-migration.md +1 -4
  80. package/docs-release/guides/agent-installation.en-US.md +14 -8
  81. package/docs-release/guides/agent-installation.md +14 -8
  82. package/docs-release/guides/contributing.md +3 -3
  83. package/docs-release/guides/contributing.zh-CN.md +3 -3
  84. package/docs-release/guides/document-audience-and-surfaces.en-US.md +10 -10
  85. package/docs-release/guides/document-audience-and-surfaces.md +10 -10
  86. package/docs-release/guides/legacy-migration-agent-prompt.md +25 -2
  87. package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +25 -2
  88. package/docs-release/guides/migration-playbook.en-US.md +63 -1
  89. package/docs-release/guides/migration-playbook.md +59 -1
  90. package/docs-release/guides/parent-control-repository-pattern.en-US.md +25 -25
  91. package/docs-release/guides/parent-control-repository-pattern.md +25 -25
  92. package/docs-release/guides/preset-development.md +2 -2
  93. package/docs-release/guides/repository-operating-models.en-US.md +21 -21
  94. package/docs-release/guides/repository-operating-models.md +21 -21
  95. package/docs-release/guides/task-state-machine.en-US.md +5 -5
  96. package/docs-release/guides/task-state-machine.md +5 -5
  97. package/docs-release/guides/typescript-runtime-migration-closeout.md +96 -0
  98. package/examples/minimal-project/AGENTS.md +2 -2
  99. package/examples/minimal-project/coding-agent-harness/harness.yaml +14 -0
  100. package/examples/minimal-project/coding-agent-harness/planning/tasks/demo-task/progress.md +11 -0
  101. package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/review.md +1 -1
  102. package/package.json +20 -12
  103. package/presets/legacy-migration/preset.yaml +5 -5
  104. package/presets/legacy-migration/templates/execution_strategy.append.md +1 -1
  105. package/presets/lesson-sedimentation/preset.yaml +3 -3
  106. package/presets/module/preset.yaml +2 -2
  107. package/presets/module/templates/execution_strategy.append.md +1 -1
  108. package/presets/module/templates/task_plan.append.md +3 -3
  109. package/presets/standard-task/preset.yaml +2 -2
  110. package/references/adversarial-review-standard.md +2 -2
  111. package/references/agents-md-pattern.md +14 -14
  112. package/references/cadence-ledger.md +1 -1
  113. package/references/ci-cd-standard.md +1 -1
  114. package/references/delivery-operating-model-standard.md +4 -4
  115. package/references/docs-directory-standard.md +65 -159
  116. package/references/external-source-intake-standard.md +10 -10
  117. package/references/harness-ledger.md +5 -5
  118. package/references/legacy-12-phase-bootstrap.md +2 -2
  119. package/references/lessons-governance.md +15 -15
  120. package/references/long-running-task-standard.md +6 -6
  121. package/references/module-parallel-standard.md +34 -34
  122. package/references/planning-loop.md +6 -6
  123. package/references/project-onboarding-audit.md +4 -4
  124. package/references/regression-system.md +2 -2
  125. package/references/repo-governance-standard.md +4 -4
  126. package/references/review-routing-standard.md +1 -1
  127. package/references/ssot-governance.md +19 -19
  128. package/references/taskr-gap-analysis.md +5 -5
  129. package/references/walkthrough-closeout.md +14 -14
  130. package/references/worktree-parallel.md +3 -3
  131. package/skills/preset-creator/references/complex-task-skeleton/task_plan.md +1 -1
  132. package/skills/preset-creator/references/preset-package-skeleton.md +5 -5
  133. package/templates/AGENTS.md.template +26 -26
  134. package/templates/architecture/README.md +4 -4
  135. package/templates/architecture/service-catalog.md +2 -2
  136. package/templates/architecture/services/service-template.md +1 -1
  137. package/templates/dashboard/assets/app-src/20-overview.js +11 -5
  138. package/templates/dashboard/assets/app-src/40-modules.js +1 -1
  139. package/templates/dashboard/assets/app.js +12 -6
  140. package/templates/dashboard/assets/i18n.js +4 -2
  141. package/templates/development/README.md +10 -10
  142. package/templates/development/cross-repo-debugging.md +3 -3
  143. package/templates/development/external-context/service-template.md +2 -2
  144. package/templates/development/external-source-packs/README.md +4 -4
  145. package/templates/integrations/README.md +4 -4
  146. package/templates/integrations/api-contract.md +2 -2
  147. package/templates/integrations/event-contract.md +2 -2
  148. package/templates/integrations/third-party/vendor-template.md +2 -2
  149. package/templates/integrations/webhook-contract.md +2 -2
  150. package/templates/ledger/Harness-Ledger.md +1 -1
  151. package/templates/planning/INDEX.md +1 -0
  152. package/templates/planning/module_session_prompt.md +1 -1
  153. package/templates/planning/task_plan.md +1 -1
  154. package/templates/planning/walkthrough.md +47 -0
  155. package/templates/reference/docs-library-standard.md +8 -8
  156. package/templates/reference/external-source-intake-standard.md +15 -15
  157. package/templates/reference/repo-governance-standard.md +1 -1
  158. package/templates/ssot/Module-Registry.md +1 -1
  159. package/templates/walkthrough/walkthrough-template.md +2 -2
  160. package/templates-zh-CN/AGENTS.md.template +26 -26
  161. package/templates-zh-CN/CLAUDE.md.template +1 -1
  162. package/templates-zh-CN/architecture/README.md +4 -4
  163. package/templates-zh-CN/architecture/service-catalog.md +2 -2
  164. package/templates-zh-CN/architecture/services/service-template.md +1 -1
  165. package/templates-zh-CN/development/README.md +10 -10
  166. package/templates-zh-CN/development/cross-repo-debugging.md +3 -3
  167. package/templates-zh-CN/development/external-context/service-template.md +2 -2
  168. package/templates-zh-CN/development/external-source-packs/README.md +4 -4
  169. package/templates-zh-CN/integrations/README.md +4 -4
  170. package/templates-zh-CN/integrations/api-contract.md +2 -2
  171. package/templates-zh-CN/integrations/event-contract.md +2 -2
  172. package/templates-zh-CN/integrations/third-party/vendor-template.md +2 -2
  173. package/templates-zh-CN/integrations/webhook-contract.md +2 -2
  174. package/templates-zh-CN/ledger/Harness-Ledger.md +1 -1
  175. package/templates-zh-CN/lessons/lesson-arch-process-change.md +1 -1
  176. package/templates-zh-CN/lessons/lesson-new-doc.md +3 -3
  177. package/templates-zh-CN/lessons/lesson-ref-change.md +4 -4
  178. package/templates-zh-CN/planning/module_session_prompt.md +11 -11
  179. package/templates-zh-CN/planning/walkthrough.md +47 -0
  180. package/templates-zh-CN/reference/adversarial-review-standard.md +2 -2
  181. package/templates-zh-CN/reference/delivery-operating-model-standard.md +3 -3
  182. package/templates-zh-CN/reference/docs-library-standard.md +28 -28
  183. package/templates-zh-CN/reference/execution-workflow-standard.md +1 -1
  184. package/templates-zh-CN/reference/external-source-intake-standard.md +16 -16
  185. package/templates-zh-CN/reference/harness-ledger-standard.md +6 -6
  186. package/templates-zh-CN/reference/regression-ssot-governance.md +2 -2
  187. package/templates-zh-CN/reference/repo-governance-standard.md +1 -1
  188. package/templates-zh-CN/reference/review-routing-standard.md +1 -1
  189. package/templates-zh-CN/reference/walkthrough-standard.md +7 -7
  190. package/templates-zh-CN/reference/worktree-standard.md +1 -1
  191. package/templates-zh-CN/regression/Cadence-Ledger.md +2 -2
  192. package/templates-zh-CN/ssot/Delivery-SSoT.md +3 -3
  193. package/templates-zh-CN/ssot/Module-Registry.md +3 -3
  194. package/templates-zh-CN/ssot/Regression-SSoT.md +2 -2
  195. package/templates-zh-CN/walkthrough/walkthrough-template.md +5 -5
  196. package/tsconfig.dist.json +16 -0
  197. package/tsconfig.json +25 -0
  198. package/tsconfig.runtime.json +24 -0
  199. package/examples/minimal-project/.harness-capabilities.json +0 -8
  200. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/progress.md +0 -11
  201. package/scripts/check-harness.mjs +0 -508
  202. package/scripts/commands/dashboard-command.mjs +0 -67
  203. package/scripts/commands/migration-command.mjs +0 -126
  204. package/scripts/commands/preset-command.mjs +0 -73
  205. package/scripts/commands/task-command.mjs +0 -328
  206. package/scripts/harness.mjs +0 -291
  207. package/scripts/lib/capability-registry.mjs +0 -587
  208. package/scripts/lib/check-module-parallel.mjs +0 -230
  209. package/scripts/lib/check-profiles.mjs +0 -372
  210. package/scripts/lib/check-task-contracts.mjs +0 -55
  211. package/scripts/lib/core-shared.mjs +0 -249
  212. package/scripts/lib/dashboard-data.mjs +0 -520
  213. package/scripts/lib/dashboard-workbench.mjs +0 -336
  214. package/scripts/lib/dashboard-writer.mjs +0 -202
  215. package/scripts/lib/git-status-summary.mjs +0 -46
  216. package/scripts/lib/governance-index-generator.mjs +0 -174
  217. package/scripts/lib/governance-sync.mjs +0 -611
  218. package/scripts/lib/governance-table-boundary.mjs +0 -175
  219. package/scripts/lib/lesson-maintenance.mjs +0 -152
  220. package/scripts/lib/markdown-utils.mjs +0 -191
  221. package/scripts/lib/migration-planner.mjs +0 -476
  222. package/scripts/lib/migration-support.mjs +0 -312
  223. package/scripts/lib/phase-kind.mjs +0 -50
  224. package/scripts/lib/preset-audit-contracts.mjs +0 -37
  225. package/scripts/lib/preset-engine.mjs +0 -494
  226. package/scripts/lib/preset-registry.mjs +0 -776
  227. package/scripts/lib/preset-resource-contracts.mjs +0 -83
  228. package/scripts/lib/review-confirm-git-gate.mjs +0 -248
  229. package/scripts/lib/status-builder.mjs +0 -88
  230. package/scripts/lib/subagent-authorization-audit.mjs +0 -196
  231. package/scripts/lib/task-audit-metadata.mjs +0 -385
  232. package/scripts/lib/task-audit-migration.mjs +0 -350
  233. package/scripts/lib/task-completion-consistency.mjs +0 -26
  234. package/scripts/lib/task-index.mjs +0 -93
  235. package/scripts/lib/task-lesson-candidates.mjs +0 -242
  236. package/scripts/lib/task-lesson-sedimentation.mjs +0 -326
  237. package/scripts/lib/task-lifecycle/create-task-helpers.mjs +0 -67
  238. package/scripts/lib/task-lifecycle/phase-sync.mjs +0 -88
  239. package/scripts/lib/task-lifecycle/review-confirm.mjs +0 -112
  240. package/scripts/lib/task-lifecycle/review-gates.mjs +0 -73
  241. package/scripts/lib/task-lifecycle/review-submission.mjs +0 -63
  242. package/scripts/lib/task-lifecycle/scaffold-provenance.mjs +0 -49
  243. package/scripts/lib/task-lifecycle/template-files.mjs +0 -53
  244. package/scripts/lib/task-lifecycle/text-utils.mjs +0 -24
  245. package/scripts/lib/task-lifecycle.mjs +0 -616
  246. package/scripts/lib/task-metadata.mjs +0 -118
  247. package/scripts/lib/task-review-model.mjs +0 -455
  248. package/scripts/lib/task-scanner.mjs +0 -503
  249. package/scripts/lib/task-tombstone-commands.mjs +0 -140
  250. package/scripts/postinstall.mjs +0 -14
  251. package/templates/walkthrough/Closeout-SSoT.md +0 -43
  252. package/templates-zh-CN/walkthrough/Closeout-SSoT.md +0 -42
  253. /package/examples/minimal-project/{docs → coding-agent-harness/governance/generated}/Harness-Ledger.md +0 -0
  254. /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/INDEX.md +0 -0
  255. /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/brief.md +0 -0
  256. /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/execution_strategy.md +0 -0
  257. /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/findings.md +0 -0
  258. /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/lesson_candidates.md +0 -0
  259. /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/task_plan.md +0 -0
  260. /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/visual_map.md +0 -0
@@ -71,6 +71,7 @@ Not every document is written for the same reader.
71
71
  - `guides/migration-playbook.md` / `guides/migration-playbook.en-US.md` — smooth migration guide for existing legacy harness projects. 旧 Harness 项目的平滑迁移指南。
72
72
  - `guides/legacy-migration-agent-prompt.md` / `guides/legacy-migration-agent-prompt.zh-CN.md` — prompt contract for agents running baseline or full legacy migration. 给迁移 Agent 使用的执行合同。
73
73
  - `guides/full-legacy-migration-subagent-strategy.md` / `guides/full-legacy-migration-subagent-strategy.zh-CN.md` — full readable cutover strategy with subagent roles, adversarial review, and dashboard/CLI proof gates. 完整可读迁移的 subagent 分工、对抗审查和 Dashboard/CLI 证据门禁。
74
+ - `guides/typescript-runtime-migration-closeout.md` — public closeout for the TypeScript runtime source-twin migration and the remaining `.mjs` shim policy. TypeScript runtime source twin 迁移收口和剩余 `.mjs` shim 策略。
74
75
 
75
76
  ## Repository Operating Models / 仓库运行模式
76
77
 
@@ -35,10 +35,10 @@ agent workflow runs over days, handoffs, reviews, and releases.
35
35
  ```mermaid
36
36
  flowchart TB
37
37
  Skill["Agent skill<br/>SKILL.md"]
38
- CLI["Harness CLI<br/>scripts/harness.mjs"]
38
+ CLI["Harness CLI<br/>dist/harness.mjs"]
39
39
  Standards["Standards<br/>references/"]
40
40
  Templates["Scaffolds<br/>templates/ + templates-zh-CN/"]
41
- Target["Target repository<br/>AGENTS.md + docs/"]
41
+ Target["Target repository<br/>AGENTS.md + coding-agent-harness/"]
42
42
  Scanner["Scanner and validators<br/>status/check"]
43
43
  Dashboard["Dashboard / Workbench<br/>HTML + JSON"]
44
44
  Human["Human reviewer<br/>approval and inspection"]
@@ -66,15 +66,15 @@ project facts.
66
66
  ```mermaid
67
67
  flowchart TB
68
68
  Entry["AGENTS.md<br/>agent entry and routing"]
69
- Registry[".harness-capabilities.json<br/>enabled capabilities"]
69
+ Registry["coding-agent-harness/harness.yaml<br/>enabled capabilities"]
70
70
  Docs["docs/"]
71
- Architecture["03-ARCHITECTURE<br/>system facts"]
72
- Development["04-DEVELOPMENT<br/>local setup and code map"]
73
- QA["05-TEST-QA<br/>regression and cadence"]
74
- Integrations["06-INTEGRATIONS<br/>external contracts"]
75
- Planning["09-PLANNING<br/>tasks and modules"]
76
- Walkthrough["10-WALKTHROUGH<br/>closeout evidence"]
77
- Reference["11-REFERENCE<br/>local operating standards"]
71
+ Architecture["coding-agent-harness/context/architecture<br/>system facts"]
72
+ Development["coding-agent-harness/context/development<br/>local setup and code map"]
73
+ QA["coding-agent-harness/governance/regression<br/>regression and cadence"]
74
+ Integrations["coding-agent-harness/context/integrations<br/>external contracts"]
75
+ Planning["coding-agent-harness/planning<br/>tasks and modules"]
76
+ Walkthrough["coding-agent-harness/planning/tasks/<task><br/>closeout evidence"]
77
+ Reference["coding-agent-harness/governance/standards<br/>local operating standards"]
78
78
  Ledger["Harness Ledger / SSoTs / Lessons<br/>long-lived memory"]
79
79
 
80
80
  Entry --> Docs
@@ -98,8 +98,8 @@ The target repository can be organized in three ways:
98
98
 
99
99
  | Model | Control surface | Execution surface |
100
100
  | --- | --- | --- |
101
- | Single repo | The same repository owns `AGENTS.md`, `docs/`, code, tests, and closeout. | The same repository. |
102
- | Independent multi-repo | Each repository owns its own local `AGENTS.md` and `docs/`. | Each repository runs independently. |
101
+ | Single repo | The same repository owns `AGENTS.md`, `coding-agent-harness/`, code, tests, and closeout. | The same repository. |
102
+ | Independent multi-repo | Each repository owns its own local `AGENTS.md` and `coding-agent-harness/`. | Each repository runs independently. |
103
103
  | Parent-control repository | A parent repository owns the global Harness control plane. | Child repositories own implementation code and local checks. |
104
104
 
105
105
  For products split across frontend, backend, SDKs, services, and upstream references,
@@ -29,10 +29,10 @@ Prompt engineering 改善一次模型调用。Context engineering 改善模型
29
29
  ```mermaid
30
30
  flowchart TB
31
31
  Skill["Agent Skill<br/>SKILL.md"]
32
- CLI["Harness CLI<br/>scripts/harness.mjs"]
32
+ CLI["Harness CLI<br/>dist/harness.mjs"]
33
33
  Standards["标准<br/>references/"]
34
34
  Templates["脚手架<br/>templates/ + templates-zh-CN/"]
35
- Target["目标仓库<br/>AGENTS.md + docs/"]
35
+ Target["目标仓库<br/>AGENTS.md + coding-agent-harness/"]
36
36
  Scanner["扫描器与校验器<br/>status/check"]
37
37
  Dashboard["Dashboard / Workbench<br/>HTML + JSON"]
38
38
  Human["人工审查者<br/>批准与检查"]
@@ -58,15 +58,15 @@ flowchart TB
58
58
  ```mermaid
59
59
  flowchart TB
60
60
  Entry["AGENTS.md<br/>Agent 入口与路由"]
61
- Registry[".harness-capabilities.json<br/>已启用能力"]
61
+ Registry["coding-agent-harness/harness.yaml<br/>已启用能力"]
62
62
  Docs["docs/"]
63
- Architecture["03-ARCHITECTURE<br/>系统事实"]
64
- Development["04-DEVELOPMENT<br/>本地设置与代码地图"]
65
- QA["05-TEST-QA<br/>回归与节奏"]
66
- Integrations["06-INTEGRATIONS<br/>外部契约"]
67
- Planning["09-PLANNING<br/>任务与模块"]
68
- Walkthrough["10-WALKTHROUGH<br/>收口证据"]
69
- Reference["11-REFERENCE<br/>本地运行标准"]
63
+ Architecture["coding-agent-harness/context/architecture<br/>系统事实"]
64
+ Development["coding-agent-harness/context/development<br/>本地设置与代码地图"]
65
+ QA["coding-agent-harness/governance/regression<br/>回归与节奏"]
66
+ Integrations["coding-agent-harness/context/integrations<br/>外部契约"]
67
+ Planning["coding-agent-harness/planning<br/>任务与模块"]
68
+ Walkthrough["coding-agent-harness/planning/tasks/<task><br/>收口证据"]
69
+ Reference["coding-agent-harness/governance/standards<br/>本地运行标准"]
70
70
  Ledger["Harness Ledger / SSoT / Lessons<br/>长期记忆"]
71
71
 
72
72
  Entry --> Docs
@@ -89,8 +89,8 @@ flowchart TB
89
89
 
90
90
  | 模式 | 控制面 | 执行面 |
91
91
  | --- | --- | --- |
92
- | 单仓模式 | 同一个仓库管理 `AGENTS.md`、`docs/`、代码、测试和收口。 | 同一个仓库。 |
93
- | 多仓独立模式 | 每个仓库都有自己的局部 `AGENTS.md` 和 `docs/`。 | 每个仓库独立执行。 |
92
+ | 单仓模式 | 同一个仓库管理 `AGENTS.md`、`coding-agent-harness/`、代码、测试和收口。 | 同一个仓库。 |
93
+ | 多仓独立模式 | 每个仓库都有自己的局部 `AGENTS.md` 和 `coding-agent-harness/`。 | 每个仓库独立执行。 |
94
94
  | 主控仓库模式 | 父仓库管理全局 Harness 控制面。 | 子仓库管理实现代码和局部检查。 |
95
95
 
96
96
  如果一个产品拆成前端、后端、SDK、微服务和上游参考仓库,主控仓库模式可以把 Agent 启动入口、生成的任务生命周期 Ledger、回归状态和收口证据固定在一个地方。详见 `docs-release/guides/repository-operating-models.md` 和 `docs-release/guides/parent-control-repository-pattern.md`。
@@ -67,7 +67,7 @@ flowchart LR
67
67
  ```
68
68
 
69
69
  - **Package**:你 `npm install` 的那个东西,包含 CLI、模板、标准文档、Preset 包
70
- - **Target Repo**:你的项目,harness 在里面创建 `docs/` 文档树来记录任务状态
70
+ - **Target Repo**:你的项目,harness 在里面创建 `coding-agent-harness/` 文档树来记录任务状态
71
71
  - **Runtime**:CLI 运行时,扫描文档树、验证合规、生成 Dashboard
72
72
  - **Human**:浏览器里看 Dashboard,在 Workbench 里做审查确认
73
73
 
@@ -85,7 +85,7 @@ Human 通过 review-confirm 再写回 Target Repo**。
85
85
  flowchart TD
86
86
  PKG["📦 Package\ncoding-agent-harness@npm"]
87
87
 
88
- PKG --> CLI["harness CLI\nscripts/harness.mjs\n唯一命令入口"]
88
+ PKG --> CLI["harness CLI\ndist/harness.mjs\n唯一命令入口"]
89
89
  PKG --> Lib["核心库\nscripts/lib/\n~30 个模块,6 个功能层"]
90
90
  PKG --> Templates["任务模板\ntemplates/\n任务骨架文件(task_plan / visual_map 等)"]
91
91
  PKG --> References["操作标准\nreferences/\n可复制到目标仓库的规范文档"]
@@ -102,17 +102,18 @@ flowchart TD
102
102
  REPO["📁 Target Repo\n你的项目仓库"]
103
103
 
104
104
  REPO --> Entry["AGENTS.md\nAgent 入口和路由\n(告诉 Agent 去哪里找上下文)"]
105
- REPO --> Caps[".harness-capabilities.json\n启用了哪些能力模块"]
106
- REPO --> Docs["docs/\n文档树(harness 的工作区)"]
107
-
108
- Docs --> Planning["09-PLANNING/\n任务目录 + 模块目录"]
109
- Docs --> Ledger["Harness-Ledger.md\n全局账本(所有任务汇总)"]
110
- Docs --> Walkthrough["10-WALKTHROUGH/\n收口证据和 Closeout SSoT"]
111
- Docs --> Reference["11-REFERENCE/\n本地操作标准(从 Package 复制过来)"]
105
+ REPO --> Manifest["coding-agent-harness/harness.yaml\n启用能力和目录结构"]
106
+ REPO --> Harness["coding-agent-harness/\nHarness 工作区"]
107
+ REPO --> Docs["docs/\nReference 文档和项目标准"]
108
+
109
+ Harness --> Planning["planning/\n任务目录 + 模块目录"]
110
+ Harness --> Ledger["governance/generated/Harness-Ledger.md\n全局账本(所有任务汇总)"]
111
+ Harness --> Walkthrough["任务本地 walkthrough.md\n收口证据"]
112
+ Docs --> Reference["coding-agent-harness/governance/standards/\n本地操作标准(从 Package 复制过来)"]
112
113
  Docs --> Governance["01-GOVERNANCE/\nLesson 沉淀库"]
113
114
  ```
114
115
 
115
- 每个任务对应 `docs/09-PLANNING/TASKS/<task-id>/` 下的一个目录,
116
+ 每个任务对应 `coding-agent-harness/planning/tasks/<task-id>/` 下的一个目录,
116
117
  里面有 `task_plan.md`、`progress.md`、`visual_map.md`、`review.md` 等文件。
117
118
 
118
119
  ### Runtime 做什么
@@ -137,14 +138,14 @@ Runtime 是**无状态的**——每次运行都从 Markdown 文件重新读取
137
138
 
138
139
  | 概念 | 一句话解释 | 在哪里 |
139
140
  | --- | --- | --- |
140
- | **Task** | 一个有生命周期的工作单元 | `docs/09-PLANNING/TASKS/<id>/` |
141
+ | **Task** | 一个有生命周期的工作单元 | `coding-agent-harness/planning/tasks/<id>/` |
141
142
  | **Budget** | 任务复杂度:`simple` / `standard` / `complex`,决定门禁严格程度 | `task_plan.md` |
142
143
  | **Phase** | Visual Map 中的执行阶段,有状态和完成度 | `visual_map.md` |
143
- | **Capability** | 可选功能模块,如 `dashboard`、`adversarial-review` | `.harness-capabilities.json` |
144
+ | **Capability** | 可选功能模块,如 `dashboard`、`module-parallel` | `coding-agent-harness/harness.yaml` |
144
145
  | **Review Gate** | 阻止任务完成的审查门禁,必须人工确认才能通过 | `INDEX.md` + `review.md` |
145
- | **Governance Sync** | 任务状态变更时自动更新全局账本的原子操作 | `Harness-Ledger.md` |
146
+ | **Governance Sync** | 任务状态变更时自动更新全局账本的原子操作 | `coding-agent-harness/governance/generated/Harness-Ledger.md` |
146
147
  | **Preset** | 可复用的任务方法包,如 `legacy-migration`、`module` | `presets/<id>/` |
147
- | **Lesson** | 从任务中沉淀的可复用经验 | `docs/01-GOVERNANCE/lessons/` |
148
+ | **Lesson** | 从任务中沉淀的可复用经验 | `coding-agent-harness/governance/lessons/` |
148
149
  | **Tombstone** | 软删除 / 合并 / 被取代的任务标记 | `task_plan.md` 中的特殊块 |
149
150
  | **lifecycleState** | 从任务状态 + 审查状态综合派生的队列分类 | 运行时派生,不存文件 |
150
151
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  ```mermaid
8
8
  flowchart LR
9
- User["用户 / Agent\n$ harness <command> [target]"] -->|"解析参数 + 分发"| Entry["scripts/harness.mjs\n唯一 CLI 入口"]
9
+ User["用户 / Agent\n$ harness <command> [target]"] -->|"解析参数 + 分发"| Entry["dist/harness.mjs\n唯一 CLI 入口"]
10
10
  ```
11
11
 
12
12
  `harness.mjs` 做两件事:解析命令行参数,然后分发给对应的 command 模块或直接调用核心库。
@@ -18,13 +18,13 @@ flowchart LR
18
18
 
19
19
  ```mermaid
20
20
  flowchart TD
21
- Entry["scripts/harness.mjs"]
21
+ Entry["dist/harness.mjs"]
22
22
 
23
- Entry -->|"dashboard\ndev"| DashCmd["scripts/dashboard-command.mjs\nDashboard 生成 + 动态服务"]
24
- Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["scripts/migration-command.mjs\n迁移三阶段命令"]
25
- Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["scripts/task-command.mjs\n任务生命周期命令"]
26
- Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["scripts/preset-command.mjs\nPreset 管理命令"]
27
- Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["lib/harness-core.mjs\n(直接调用)"]
23
+ Entry -->|"dashboard\ndev"| DashCmd["dist/commands/dashboard-command.mjs\nDashboard 生成 + 动态服务"]
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任务生命周期命令"]
26
+ Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["dist/commands/preset-command.mjs\nPreset 管理命令"]
27
+ Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["dist/lib/harness-core.mjs\n(直接调用)"]
28
28
  ```
29
29
 
30
30
  四个 command 模块各自负责一个领域,其余命令直接调用 `harness-core.mjs`。
@@ -86,7 +86,7 @@ flowchart LR
86
86
 
87
87
  ### ② 任务扫描层
88
88
 
89
- 负责读取 `docs/09-PLANNING/TASKS/` 下的所有文件,解析出结构化数据:
89
+ 负责读取 `coding-agent-harness/planning/tasks/` 下的所有文件,解析出结构化数据:
90
90
 
91
91
  ```mermaid
92
92
  flowchart TD
@@ -197,7 +197,7 @@ flowchart TD
197
197
  sequenceDiagram
198
198
  participant CLI as harness CLI
199
199
  participant Lock as .harness/locks/governance-sync.lock
200
- participant Ledger as docs/Harness-Ledger.md
200
+ participant Ledger as coding-agent-harness/governance/generated/Harness-Ledger.md
201
201
  participant Git
202
202
 
203
203
  CLI->>Lock: fs.openSync(lockPath, "wx")\n(排他写入,EEXIST 则抛错)
@@ -216,7 +216,7 @@ sequenceDiagram
216
216
  | 操作 | 触发方式 | 写入目标 | 频率 |
217
217
  | --- | --- | --- | --- |
218
218
  | `syncTaskGovernance` | 自动(每次状态变更) | `Harness-Ledger.md` 对应行 | 高频 |
219
- | `rebuildGovernanceIndexes` | 手动(`harness governance rebuild`) | `docs/09-PLANNING/generated/` 索引表 | 低频 |
219
+ | `rebuildGovernanceIndexes` | 手动(`harness governance rebuild`) | `coding-agent-harness/governance/generated/` 索引表 | 低频 |
220
220
 
221
221
  ---
222
222
 
@@ -272,7 +272,7 @@ Tombstone 块追加到 `task_plan.md` 末尾(不替换原内容),保留历
272
272
  ### 为什么 Tombstone 不直接删除任务目录
273
273
 
274
274
  文档库没有数据库级外键,物理删除后会留下孤儿引用
275
- (Ledger、Closeout SSoT、其他任务的 `Supersedes` 字段都可能指向被删任务)。
275
+ (Ledger、Closeout Index、其他任务的 `Supersedes` 字段都可能指向被删任务)。
276
276
  Tombstone 标记让 Soft-deleted / Superseded 队列可以只读追溯"为什么这个任务不在活跃队列里"。
277
277
 
278
278
  ### 为什么 review-confirm 需要两次 Git 提交
@@ -68,7 +68,7 @@ flowchart TD
68
68
 
69
69
  ### ① validateCapabilities
70
70
 
71
- 读取 `.harness-capabilities.json`,检查:
71
+ 读取 `coding-agent-harness/harness.yaml`,检查:
72
72
  - 声明的能力是否都是合法的能力名(在 `allowedCapabilities` 枚举中)
73
73
  - 能力的依赖是否都已启用(如 `subagent-worker` 需要先有 `module-parallel`)
74
74
  - 能力对应的 artifact 路径是否存在
@@ -187,8 +187,8 @@ flowchart TD
187
187
  Filter --> Sort["按 id 字母序排序"]
188
188
  Sort --> Gen["生成 governance surfaces"]
189
189
 
190
- Gen --> TI["docs/09-PLANNING/generated/task-index.md\n所有任务的汇总索引表"]
191
- Gen --> MI["docs/09-PLANNING/generated/module-index.md\n模块步骤索引表"]
190
+ Gen --> TI["coding-agent-harness/governance/generated/task-index.md\n所有任务的汇总索引表"]
191
+ Gen --> MI["coding-agent-harness/governance/generated/module-index.md\n模块步骤索引表"]
192
192
 
193
193
  TI --> Atomic["原子写入\n(governance-sync 锁 + git commit)"]
194
194
  MI --> Atomic
@@ -207,11 +207,13 @@ flowchart TD
207
207
 
208
208
  ### 为什么检查器分 failures 和 warnings 两级
209
209
 
210
- 两级从一开始就存在,设计动机是**迁移兼容性**:
211
- - 新安装的项目(`strict=true`)对缺失文件报 failure 并阻断 CI
212
- - 旧项目在 `safe-adoption` 模式下,同样的缺失只报 `adoption-needed: ...` warning,不阻断
210
+ 两级从一开始就存在。v2 中,活跃目标项目必须从
211
+ `coding-agent-harness/harness.yaml` 运行:
212
+ - v2 项目对缺失必需文件报 failure,并可阻断 CI
213
+ - legacy 结构只作为迁移输入;先运行 `migrate-structure --plan` 和
214
+ `migrate-structure --apply`,再进入普通 status/check/dashboard 流程
213
215
 
214
- 这让 harness 可以在不破坏现有用户的情况下逐步收紧规范。
216
+ 这样 active runtime 保持单一形状,同时迁移命令仍能读取旧结构并生成切换计划。
215
217
  没有考虑过三级或更多级别——两级已经足够区分"必须修复"和"建议迁移"。
216
218
 
217
219
  ### 为什么 governance 表格有时间边界
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```mermaid
6
6
  flowchart LR
7
- A["📄 Markdown 文件\n(docs/ 下的源文件)"]
7
+ A["📄 Markdown 文件\n(coding-agent-harness/ 下的源文件)"]
8
8
  B["⚙️ Scanner\n(解析 + 验证)"]
9
9
  C["📊 Dashboard\n(HTML + JSON)"]
10
10
 
@@ -44,7 +44,7 @@ Scanner 层(`task-scanner.mjs` + `task-review-model.mjs`)把原始 Markdown
44
44
  flowchart TD
45
45
  CT["collectTasks()"]
46
46
 
47
- CT --> Discover["listTaskPlanPaths()\n扫描两个根目录:\n09-PLANNING/TASKS/\n09-PLANNING/MODULES/\n过滤模板和归档目录"]
47
+ CT --> Discover["listTaskPlanPaths()\n扫描两个根目录:\ncoding-agent-harness/planning/tasks/\ncoding-agent-harness/planning/modules/\n过滤模板和归档目录"]
48
48
 
49
49
  Discover --> ReadFiles["对每个任务目录读取 9 个文件\ntask_plan / brief / progress\nreview / visual_map\nexecution_strategy\nlesson_candidates / findings / context"]
50
50
 
@@ -152,13 +152,13 @@ flowchart TD
152
152
  flowchart TD
153
153
  Collect["collectMarkdownDocuments()"]
154
154
 
155
- Collect --> Fixed["固定路径(存在时收集)\nHarness-Ledger.md\n09-PLANNING/Module-Registry.md\n05-TEST-QA/Regression-SSoT.md\n10-WALKTHROUGH/Closeout-SSoT.md"]
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"]
156
156
 
157
- Collect --> Walkthrough["10-WALKTHROUGH/ 下所有 .md\n(排除 _archive/ 和 _ 开头文件)"]
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["09-PLANNING/MODULES/ 下:\n每个模块的 module_plan.md\n每个模块的 brief.md"]
161
+ Collect --> ModuleDocs["coding-agent-harness/planning/modules/ 下:\n每个模块的 module_plan.md\n每个模块的 brief.md"]
162
162
 
163
163
  Collect --> Lessons["01-GOVERNANCE/lessons/ 下所有 .md"]
164
164
  ```
@@ -108,7 +108,7 @@ flowchart LR
108
108
  ```
109
109
  writeScopes:
110
110
  tasks:
111
- path: docs/09-PLANNING/TASKS/**
111
+ path: coding-agent-harness/planning/tasks/**
112
112
  access: write
113
113
  ```
114
114
 
@@ -216,8 +216,6 @@ flowchart TD
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"]
219
- Core --> SafeAdoption["safe-adoption\n旧项目平滑接入"]
220
-
221
219
  ModParallel --> SubagentWorker["subagent-worker\ncommit-backed worker 交接协议"]
222
220
  ```
223
221
 
@@ -231,7 +229,6 @@ flowchart TD
231
229
  | `adversarial-review` | 发布、架构、安全、数据或策略风险需要独立审查产物时 |
232
230
  | `long-running-task` | Agent 可能跨多个 loop 运行而无需每步用户确认时 |
233
231
  | `dashboard` | 需要本地只读状态可视化时 |
234
- | `safe-adoption` | 将 v1.0 接入已有 harness 项目而不重写历史时 |
235
232
 
236
233
  ### Level 2 — Preset 资源声明(resources)
237
234
 
@@ -68,7 +68,7 @@ flowchart LR
68
68
  ```
69
69
 
70
70
  - **Package**: What you `npm install` — contains the CLI, templates, standards docs, and Preset packages
71
- - **Target Repo**: Your project, where harness creates a `docs/` tree to record task state
71
+ - **Target Repo**: Your project, where harness creates a `coding-agent-harness/` tree to record task state
72
72
  - **Runtime**: The CLI runtime that scans the doc tree, validates compliance, and generates the Dashboard
73
73
  - **Human**: Views the Dashboard in a browser, performs review confirmation in the Workbench
74
74
 
@@ -86,7 +86,7 @@ The whole system is a read-write loop centered on Markdown files, with no hidden
86
86
  flowchart TD
87
87
  PKG["📦 Package\ncoding-agent-harness@npm"]
88
88
 
89
- PKG --> CLI["harness CLI\nscripts/harness.mjs\nSingle command entry point"]
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
91
  PKG --> Templates["Task templates\ntemplates/\nTask scaffold files (task_plan / visual_map etc.)"]
92
92
  PKG --> References["Operating standards\nreferences/\nSpec docs that can be copied to target repos"]
@@ -103,17 +103,18 @@ flowchart TD
103
103
  REPO["📁 Target Repo\nYour project repository"]
104
104
 
105
105
  REPO --> Entry["AGENTS.md\nAgent entry point and routing\n(tells Agents where to find context)"]
106
- REPO --> Caps[".harness-capabilities.json\nWhich capability modules are enabled"]
107
- REPO --> Docs["docs/\nDoc tree (harness workspace)"]
108
-
109
- Docs --> Planning["09-PLANNING/\nTask directory + module directory"]
110
- Docs --> Ledger["Harness-Ledger.md\nGlobal ledger (all tasks summarized)"]
111
- Docs --> Walkthrough["10-WALKTHROUGH/\nCloseout evidence and Closeout SSoT"]
112
- Docs --> Reference["11-REFERENCE/\nLocal operating standards (copied from Package)"]
106
+ REPO --> Manifest["coding-agent-harness/harness.yaml\nEnabled capabilities and structure"]
107
+ REPO --> Harness["coding-agent-harness/\nHarness workspace"]
108
+ REPO --> Docs["docs/\nReference docs and project standards"]
109
+
110
+ Harness --> Planning["planning/\nTask directory + module directory"]
111
+ Harness --> Ledger["governance/generated/Harness-Ledger.md\nGlobal ledger (all tasks summarized)"]
112
+ Harness --> Walkthrough["task-local walkthrough.md\nCloseout evidence"]
113
+ Docs --> Reference["coding-agent-harness/governance/standards/\nLocal operating standards (copied from Package)"]
113
114
  Docs --> Governance["01-GOVERNANCE/\nLesson library"]
114
115
  ```
115
116
 
116
- Each task corresponds to a directory under `docs/09-PLANNING/TASKS/<task-id>/`,
117
+ Each task corresponds to a directory under `coding-agent-harness/planning/tasks/<task-id>/`,
117
118
  containing files like `task_plan.md`, `progress.md`, `visual_map.md`, `review.md`, etc.
118
119
 
119
120
  ### What the Runtime does
@@ -138,14 +139,14 @@ caching no intermediate state (except file watching in `harness dev`).
138
139
 
139
140
  | Concept | One-line explanation | Where |
140
141
  | --- | --- | --- |
141
- | **Task** | A unit of work with a lifecycle | `docs/09-PLANNING/TASKS/<id>/` |
142
+ | **Task** | A unit of work with a lifecycle | `coding-agent-harness/planning/tasks/<id>/` |
142
143
  | **Budget** | Task complexity: `simple` / `standard` / `complex`, determines gate strictness | `task_plan.md` |
143
144
  | **Phase** | An execution phase in the Visual Map, with state and completion | `visual_map.md` |
144
- | **Capability** | Optional feature module, e.g. `dashboard`, `adversarial-review` | `.harness-capabilities.json` |
145
+ | **Capability** | Optional feature module, e.g. `dashboard`, `module-parallel` | `coding-agent-harness/harness.yaml` |
145
146
  | **Review Gate** | A review gate that blocks task completion, requires human confirmation to pass | `review.md` |
146
- | **Governance Sync** | Atomic operation that auto-updates the global ledger on task state changes | `Harness-Ledger.md` |
147
+ | **Governance Sync** | Atomic operation that auto-updates the global ledger on task state changes | `coding-agent-harness/governance/generated/Harness-Ledger.md` |
147
148
  | **Preset** | A reusable task method package, e.g. `legacy-migration`, `module` | `presets/<id>/` |
148
- | **Lesson** | Reusable knowledge distilled from a task | `docs/01-GOVERNANCE/lessons/` |
149
+ | **Lesson** | Reusable knowledge distilled from a task | `coding-agent-harness/governance/lessons/` |
149
150
  | **Tombstone** | Marker for soft-deleted / merged / superseded tasks | Special block in `task_plan.md` |
150
151
  | **lifecycleState** | Queue classification derived from task state + review state combined | Derived at runtime, not stored in files |
151
152
 
@@ -6,7 +6,7 @@ All commands come through a single file:
6
6
 
7
7
  ```mermaid
8
8
  flowchart LR
9
- User["User / Agent\n$ harness <command> [target]"] -->|"parse args + dispatch"| Entry["scripts/harness.mjs\nSingle CLI entry point"]
9
+ User["User / Agent\n$ harness <command> [target]"] -->|"parse args + dispatch"| Entry["dist/harness.mjs\nSingle CLI entry point"]
10
10
  ```
11
11
 
12
12
  `harness.mjs` does two things: parses command-line arguments, then dispatches to the
@@ -19,13 +19,13 @@ It contains no business logic itself.
19
19
 
20
20
  ```mermaid
21
21
  flowchart TD
22
- Entry["scripts/harness.mjs"]
22
+ Entry["dist/harness.mjs"]
23
23
 
24
- Entry -->|"dashboard\ndev"| DashCmd["scripts/dashboard-command.mjs\nDashboard generation + dynamic serving"]
25
- Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["scripts/migration-command.mjs\nMigration three-phase commands"]
26
- Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["scripts/task-command.mjs\nTask lifecycle commands"]
27
- Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["scripts/preset-command.mjs\nPreset management commands"]
28
- Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["lib/harness-core.mjs\n(called directly)"]
24
+ Entry -->|"dashboard\ndev"| DashCmd["dist/commands/dashboard-command.mjs\nDashboard generation + dynamic serving"]
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"]
27
+ Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["dist/commands/preset-command.mjs\nPreset management commands"]
28
+ Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["dist/lib/harness-core.mjs\n(called directly)"]
29
29
  ```
30
30
 
31
31
  Four command modules each own one domain; other commands call `harness-core.mjs` directly.
@@ -89,7 +89,7 @@ foundation that lets the whole system derive state from Markdown files.
89
89
 
90
90
  ### ② Task scanning layer
91
91
 
92
- Responsible for reading all files under `docs/09-PLANNING/TASKS/` and parsing them into
92
+ Responsible for reading all files under `coding-agent-harness/planning/tasks/` and parsing them into
93
93
  structured data:
94
94
 
95
95
  ```mermaid
@@ -204,7 +204,7 @@ Every task state change triggers `syncTaskGovernance()`, which atomically update
204
204
  sequenceDiagram
205
205
  participant CLI as harness CLI
206
206
  participant Lock as .harness/locks/governance-sync.lock
207
- participant Ledger as docs/Harness-Ledger.md
207
+ participant Ledger as coding-agent-harness/governance/generated/Harness-Ledger.md
208
208
  participant Git
209
209
 
210
210
  CLI->>Lock: fs.openSync(lockPath, "wx")\n(exclusive write, throws EEXIST if exists)
@@ -223,7 +223,7 @@ filesystem operation. If the file already exists, `openSync` throws `EEXIST` and
223
223
  | Operation | How triggered | Write target | Frequency |
224
224
  | --- | --- | --- | --- |
225
225
  | `syncTaskGovernance` | Automatic (on every state change) | Corresponding row in `Harness-Ledger.md` | High frequency |
226
- | `rebuildGovernanceIndexes` | Manual (`harness governance rebuild`) | `docs/09-PLANNING/generated/` index tables | Low frequency |
226
+ | `rebuildGovernanceIndexes` | Manual (`harness governance rebuild`) | `coding-agent-harness/governance/generated/` index tables | Low frequency |
227
227
 
228
228
  ---
229
229
 
@@ -283,7 +283,7 @@ governance concern be tracked independently.
283
283
  ### Why Tombstone doesn't physically delete the task directory
284
284
 
285
285
  The document library has no database-level foreign keys. Physical deletion would leave
286
- orphan references (the Ledger, Closeout SSoT, and other tasks' `Supersedes` fields may
286
+ orphan references (the Ledger, Closeout Index, and other tasks' `Supersedes` fields may
287
287
  all point to the deleted task). Tombstone markers let the Soft-deleted / Superseded queue
288
288
  provide read-only traceability for "why isn't this task in the active queue".
289
289
 
@@ -70,7 +70,7 @@ Each validator returns `failures` (hard failures, must fix) and `warnings` (soft
70
70
 
71
71
  ### ① validateCapabilities
72
72
 
73
- Reads `.harness-capabilities.json` and checks:
73
+ Reads `coding-agent-harness/harness.yaml` and checks:
74
74
  - Whether declared capabilities are all valid capability names (in the `allowedCapabilities` enum)
75
75
  - Whether capability dependencies are all enabled (e.g. `subagent-worker` requires `module-parallel` first)
76
76
  - Whether the artifact paths corresponding to capabilities exist
@@ -192,8 +192,8 @@ flowchart TD
192
192
  Filter --> Sort["Sort alphabetically by id"]
193
193
  Sort --> Gen["Generate governance surfaces"]
194
194
 
195
- Gen --> TI["docs/09-PLANNING/generated/task-index.md\nSummary index table for all tasks"]
196
- Gen --> MI["docs/09-PLANNING/generated/module-index.md\nModule step index table"]
195
+ Gen --> TI["coding-agent-harness/governance/generated/task-index.md\nSummary index table for all tasks"]
196
+ Gen --> MI["coding-agent-harness/governance/generated/module-index.md\nModule step index table"]
197
197
 
198
198
  TI --> Atomic["Atomic write\n(governance-sync lock + git commit)"]
199
199
  MI --> Atomic
@@ -214,12 +214,14 @@ full scan on every state change.
214
214
 
215
215
  ### Why the validator has two levels: failures and warnings
216
216
 
217
- Both levels existed from the start. The design motivation was **migration compatibility**:
218
- - Newly installed projects (`strict=true`) report failure for missing files and block CI
219
- - Legacy projects in `safe-adoption` mode report the same missing files as
220
- `adoption-needed: ...` warnings without blocking
217
+ Both levels existed from the start. In v2, active target projects are expected to
218
+ run from `coding-agent-harness/harness.yaml`:
219
+ - v2 projects report failures for missing required files and can block CI
220
+ - legacy structures are migration input only; use `migrate-structure --plan` and
221
+ `migrate-structure --apply` before running normal status/check/dashboard flows
221
222
 
222
- This lets harness gradually tighten standards without breaking existing users.
223
+ This keeps active runtime behavior single-shaped while still giving migration
224
+ commands enough information to produce a cutover plan.
223
225
  Three or more levels were never considered — two levels are sufficient to distinguish
224
226
  "must fix" from "recommended migration".
225
227
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ```mermaid
6
6
  flowchart LR
7
- A["📄 Markdown files\n(source files under docs/)"]
7
+ A["📄 Markdown files\n(source files under coding-agent-harness/)"]
8
8
  B["⚙️ Scanner\n(parse + validate)"]
9
9
  C["📊 Dashboard\n(HTML + JSON)"]
10
10
 
@@ -45,7 +45,7 @@ into structured objects.
45
45
  flowchart TD
46
46
  CT["collectTasks()"]
47
47
 
48
- CT --> Discover["listTaskPlanPaths()\nScans two root directories:\n09-PLANNING/TASKS/\n09-PLANNING/MODULES/\nFilters out template and archive directories"]
48
+ CT --> Discover["listTaskPlanPaths()\nScans two root directories:\ncoding-agent-harness/planning/tasks/\ncoding-agent-harness/planning/modules/\nFilters out template and archive directories"]
49
49
 
50
50
  Discover --> ReadFiles["For each task directory, reads 9 files:\ntask_plan / brief / progress\nreview / visual_map\nexecution_strategy\nlesson_candidates / findings / context"]
51
51
 
@@ -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\n09-PLANNING/Module-Registry.md\n05-TEST-QA/Regression-SSoT.md\n10-WALKTHROUGH/Closeout-SSoT.md"]
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"]
159
159
 
160
- Collect --> Walkthrough["All .md files under 10-WALKTHROUGH/\n(excluding _archive/ and files starting with _)"]
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 09-PLANNING/MODULES/:\nmodule_plan.md for each module\nbrief.md for each module"]
164
+ Collect --> ModuleDocs["Under coding-agent-harness/planning/modules/:\nmodule_plan.md for each module\nbrief.md for each module"]
165
165
 
166
166
  Collect --> Lessons["All .md files under 01-GOVERNANCE/lessons/"]
167
167
  ```
@@ -115,7 +115,7 @@ Each entrypoint also declares `writes` (allowed write path globs) and `reads`
115
115
  ```
116
116
  writeScopes:
117
117
  tasks:
118
- path: docs/09-PLANNING/TASKS/**
118
+ path: coding-agent-harness/planning/tasks/**
119
119
  access: write
120
120
  ```
121
121
 
@@ -225,8 +225,6 @@ flowchart TD
225
225
  Core --> AdvReview["adversarial-review\nAdversarial review reports\n(alias: review-contract)"]
226
226
  Core --> LongRunning["long-running-task\nLong-running task contracts"]
227
227
  Core --> Dashboard["dashboard\nLocal HTML Dashboard"]
228
- Core --> SafeAdoption["safe-adoption\nSmooth onboarding for legacy projects"]
229
-
230
228
  ModParallel --> SubagentWorker["subagent-worker\nCommit-backed worker handoff protocol"]
231
229
  ```
232
230
 
@@ -240,7 +238,6 @@ flowchart TD
240
238
  | `adversarial-review` | When release, architecture, security, data, or policy risks require independent review artifacts |
241
239
  | `long-running-task` | When Agents may run across multiple loops without per-step user confirmation |
242
240
  | `dashboard` | When local read-only state visualization is needed |
243
- | `safe-adoption` | When onboarding v1.0 into an existing harness project without rewriting history |
244
241
 
245
242
  ### Level 2 — Preset resource declarations (resources)
246
243