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
@@ -11,10 +11,10 @@ Harness Ledger 是任务生命周期的全局生成索引。它把任务目录
11
11
  ## 文件位置
12
12
 
13
13
  ```text
14
- docs/Harness-Ledger.md
14
+ coding-agent-harness/governance/generated/Harness-Ledger.md
15
15
  ```
16
16
 
17
- 放在 `docs/` 根目录,因为它横跨 planning、review、walkthrough、lessons 和模块索引。
17
+ 放在 `coding-agent-harness/` 根目录,因为它横跨 planning、review、walkthrough、lessons 和模块索引。
18
18
 
19
19
  ## 职责边界
20
20
 
@@ -63,7 +63,7 @@ Agent 不应手写或机械更新 Ledger 的任务行。如果发现生成结果
63
63
  - Delivery SSoT 仍管理交付 block、跨仓顺序、owner 和依赖。
64
64
  - Regression SSoT 仍管理回归面、证据深度和 residual。
65
65
  - Cadence Ledger 仍管理周期性验证节奏。
66
- - Closeout SSoT 仍管理 walkthrough、closeout status 和受控 skip reason。
66
+ - Closeout Index 仍管理 walkthrough、closeout status 和受控 skip reason。
67
67
  - Module Registry 仍管理模块边界、owner、worktree 和写入范围。
68
68
 
69
69
  这些表不是任务生命周期小表。本版本只移除 `Feature-SSoT.md` / `Private-Feature-SSoT.md` 这类生命周期投影,不删除尚无等价 scanner/generator 的治理表。
@@ -73,7 +73,7 @@ Agent 不应手写或机械更新 Ledger 的任务行。如果发现生成结果
73
73
  旧生命周期表切换时归档到:
74
74
 
75
75
  ```text
76
- docs/09-PLANNING/_archive/<timestamp>/
76
+ coding-agent-harness/planning/_archive/<timestamp>/
77
77
  ```
78
78
 
79
79
  归档不改变历史证据,也不要求迁移 Agent 删除旧快照。确认 Dashboard、`task-list`、`task-index` 和新 Ledger 都能表达当前任务后,项目 owner 再决定是否清理归档。
@@ -88,7 +88,7 @@ docs/09-PLANNING/_archive/<timestamp>/
88
88
  4. 回写 Repo Governance / CI-CD 状态(如适用)。
89
89
  5. 回写 Regression SSoT / Cadence Ledger / Delivery SSoT 等本轮实际触达的非生命周期治理表(如适用)。
90
90
  6. 写 walkthrough。
91
- 7. 更新 Closeout SSoT
91
+ 7. 更新 Closeout Index
92
92
  8. 执行 Lessons 检查;新任务先更新 `lesson_candidates.md`,如人工确认沉淀,再由维护命令写详情文档。
93
93
  9. 运行 Harness CLI 生成或刷新 Harness Ledger。
94
94
 
@@ -16,7 +16,7 @@ This document preserves the legacy bootstrap sequence used before the v1.0 capab
16
16
  4. Optional module registration: identify independent modules, write scopes, module registry rows, and module plans.
17
17
  5. Directory structure: create or adapt `docs/` according to the docs directory standard.
18
18
  6. AGENTS.md and CLAUDE.md: generate the root agent entrypoint and Claude Code shim.
19
- 7. Reference standards: generate project-specific reference files under `docs/11-REFERENCE/`.
19
+ 7. Reference standards: generate project-specific reference files under `coding-agent-harness/governance/standards/`.
20
20
  8. Repository governance and CI/CD: define PR policy, required checks, branch protection, CI, and worktree concurrency.
21
21
  9. Planning loop: create task templates and task directories.
22
22
  10. Long-running task protocol: add long-running task standard and contract template.
@@ -31,7 +31,7 @@ This document preserves the legacy bootstrap sequence used before the v1.0 capab
31
31
  | Task directory with only `task_plan.md` | Add `brief.md`, `execution_strategy.md`, `visual_map.md`, `progress.md`, `findings.md`, and `review.md` only for active tasks. |
32
32
  | Embedded roadmap in `task_plan.md` | Move active roadmap rows into standalone `visual_map.md`; leave historical tasks untouched unless they are reopened. |
33
33
  | Single-line progress status | Normalize active tasks through `harness task-start`, `task-block`, `task-log`, and `task-complete`. |
34
- | Broad reference bundle | Declare only capabilities that are actually adopted in `.harness-capabilities.json`. |
34
+ | Broad reference bundle | Declare only capabilities that are actually adopted in `coding-agent-harness/harness.yaml`. |
35
35
  | Long-running task artifacts | Add or declare `long-running-task` only when active work needs continuous autonomous execution. |
36
36
  | Informal module lists | Adopt `module-parallel` only after modules have owners, write scopes, dependency rules, and registry maintenance. |
37
37
  | Historical review notes | Do not rewrite all old review files. Upgrade active release-blocking reviews to the v1 review schema first. |
@@ -8,23 +8,23 @@ Lessons 不再使用一张手工维护的全局表。原因很简单:lesson ca
8
8
 
9
9
  | 层级 | 文件 | 职责 |
10
10
  | --- | --- | --- |
11
- | 任务本地队列 | `docs/09-PLANNING/**/lesson_candidates.md` | 记录候选、拒绝、无候选、排队 promotion 和人工判定 |
12
- | 任务本地详情 | `docs/09-PLANNING/**/lessons/LC-*.md` | 在源任务上下文还新鲜时写完整 lesson 正文,供后续沉淀任务读取 |
13
- | Promoted lesson 详情 | `docs/01-GOVERNANCE/lessons/L-YYYY-MM-DD-NNN-<slug>.md` | 记录已接受、可复用、需要后续治理合入的经验 |
11
+ | 任务本地队列 | `coding-agent-harness/planning/**/lesson_candidates.md` | 记录候选、拒绝、无候选、排队 promotion 和人工判定 |
12
+ | 任务本地详情 | `coding-agent-harness/planning/**/lessons/LC-*.md` | 在源任务上下文还新鲜时写完整 lesson 正文,供后续沉淀任务读取 |
13
+ | Promoted lesson 详情 | `coding-agent-harness/governance/lessons/L-YYYY-MM-DD-NNN-<slug>.md` | 记录已接受、可复用、需要后续治理合入的经验 |
14
14
 
15
- `docs/Harness-Ledger.md` 和 `docs/10-WALKTHROUGH/Closeout-SSoT.md` 只记录 closeout 结果:
15
+ `coding-agent-harness/governance/generated/Harness-Ledger.md` 和 `coding-agent-harness/governance/generated/Closeout-Index.md` 只记录 closeout 结果:
16
16
  `checked-candidate:<LC-ID>`、`queued-promotion:<LC-ID>`、`checked-created:<L-ID>` 或历史兼容的 `checked-none:<reason>`。
17
17
 
18
18
  ## 目录结构
19
19
 
20
20
  ```text
21
- docs/01-GOVERNANCE/
21
+ coding-agent-harness/governance/
22
22
  ├── lessons/ ← promoted lesson 详情文档
23
23
  │ ├── L-2026-05-07-001-xxx.md
24
24
  │ └── ...
25
25
  └── _archive/ ← 已合入或废弃的历史详情归档
26
26
 
27
- docs/09-PLANNING/TASKS/<task-id>/
27
+ coding-agent-harness/planning/tasks/<task-id>/
28
28
  ├── lesson_candidates.md ← 候选索引和人工路由状态
29
29
  └── lessons/
30
30
  └── LC-YYYYMMDD-NNN.md ← task-local detail artifact
@@ -50,7 +50,7 @@ docs/09-PLANNING/TASKS/<task-id>/
50
50
  - `promoted`:维护命令已经创建 promoted lesson 详情文档,并回写源 candidate。
51
51
  - `rejected`:候选已带理由拒绝。
52
52
 
53
- `needs-promotion` 不阻塞任务 closeout,但必须在 Closeout SSoT / Harness Ledger 中记录 `queued-promotion: LC-YYYYMMDD-NNN`,并由后续维护任务处理。模块级候选还必须填写 `Module Key`,避免沉淀任务丢失模块边界。`promoted` 或人工直接创建详情文档时记录 `checked-created: L-YYYY-MM-DD-NNN`。如果没有候选,记录 `checked-candidate: LC-...` 或 `checked-none: <reason>`;`checked-none` 只用于旧任务兼容或没有 candidate 文件的历史收口。
53
+ `needs-promotion` 不阻塞任务 closeout,但必须在 Closeout Index / Harness Ledger 中记录 `queued-promotion: LC-YYYYMMDD-NNN`,并由后续维护任务处理。模块级候选还必须填写 `Module Key`,避免沉淀任务丢失模块边界。`promoted` 或人工直接创建详情文档时记录 `checked-created: L-YYYY-MM-DD-NNN`。如果没有候选,记录 `checked-candidate: LC-...` 或 `checked-none: <reason>`;`checked-none` 只用于旧任务兼容或没有 candidate 文件的历史收口。
54
54
 
55
55
  ## Promotion 执行
56
56
 
@@ -60,13 +60,13 @@ promotion 只写 promoted 详情文档和源 candidate,不写共享 Lessons
60
60
  2. 选择 `templates/lessons/` 下的对应模板,或由 `lesson-promote --apply` 创建 promoted 详情文档。
61
61
  3. promoted 详情文档写清背景、现状问题、建议改动、影响范围和冲突声明。
62
62
  4. 回写源任务 `lesson_candidates.md`:对应候选标记为 `promoted`,并记录 `promoted:<L-ID>`。
63
- 5. 在 Closeout SSoT / Harness Ledger 中记录 `checked-created:<L-ID>` 或 `queued-promotion:<LC-ID>`。
63
+ 5. 在 Closeout Index / Harness Ledger 中记录 `checked-created:<L-ID>` 或 `queued-promotion:<LC-ID>`。
64
64
 
65
65
  `lesson-promote --apply` 是 CLI-owned 机械写入:目标仓库必须是干净 Git root,
66
66
  命令会加 governance lock,只允许提交新 lesson detail 和源任务 `lesson_candidates.md`。
67
67
  如果存在 unrelated dirty diff,命令必须拒绝,让 coordinator 先提交、归属或记录 no-commit reason。
68
68
 
69
- 如果四个问题的答案全是“没有”,也不能静默跳过。新任务必须在 `lesson_candidates.md` 中使用 `no-candidate-accepted` 并填写 No-Candidate Reason;旧任务可在 Closeout SSoT 和 Harness Ledger 中记录 `checked-none: <一句话原因>`。
69
+ 如果四个问题的答案全是“没有”,也不能静默跳过。新任务必须在 `lesson_candidates.md` 中使用 `no-candidate-accepted` 并填写 No-Candidate Reason;旧任务可在 Closeout Index 和 Harness Ledger 中记录 `checked-none: <一句话原因>`。
70
70
 
71
71
  ## Closeout 判定
72
72
 
@@ -79,10 +79,10 @@ promotion 只写 promoted 详情文档和源 candidate,不写共享 Lessons
79
79
 
80
80
  以下状态不合格:
81
81
 
82
- - 只在 walkthrough 或 progress 中说“无 lessons”,但 Closeout SSoT / Harness Ledger 没有记录。
82
+ - 只在 walkthrough 或 progress 中说“无 lessons”,但 Closeout Index / Harness Ledger 没有记录。
83
83
  - 新任务跳过 `lesson_candidates.md`,只用 `checked-none` 代替 candidate 判定。
84
84
  - 用 `n/a` 代替检查结果,除非任务是纯只读分析且没有 closed ledger row。
85
- - `checked-created:<L-ID>` 指向的 `docs/01-GOVERNANCE/lessons/*.md` 不存在。
85
+ - `checked-created:<L-ID>` 指向的 `coding-agent-harness/governance/lessons/*.md` 不存在。
86
86
 
87
87
  ## 沉淀类型
88
88
 
@@ -101,7 +101,7 @@ Agent 在产出任何 promoted lesson 之前,必须查看:
101
101
 
102
102
  - 任务本地 `lesson_candidates.md`
103
103
  - 任务本地 `lessons/LC-*.md`
104
- - `docs/01-GOVERNANCE/lessons/*.md`
104
+ - `coding-agent-harness/governance/lessons/*.md`
105
105
  - 目标 reference / template / checker
106
106
 
107
107
  目的是确认是否已有同一 target、同一问题或冲突建议。
@@ -146,14 +146,14 @@ pending governance integration -> approved -> merged
146
146
 
147
147
  ## 归档机制
148
148
 
149
- 当 `docs/01-GOVERNANCE/lessons/` 中已合入或废弃的详情文档过多时,可以把 `merged`、`rejected`、`superseded` 的文档移入 `docs/01-GOVERNANCE/_archive/`。不要归档仍被 Closeout SSoT 或 Harness Ledger 当前行引用的文档,除非同步更新引用。
149
+ 当 `coding-agent-harness/governance/lessons/` 中已合入或废弃的详情文档过多时,可以把 `merged`、`rejected`、`superseded` 的文档移入 `coding-agent-harness/governance/_archive/`。不要归档仍被 Closeout Index 或 Harness Ledger 当前行引用的文档,除非同步更新引用。
150
150
 
151
151
  ## 人的审批工作流
152
152
 
153
153
  1. 打开 dashboard 的 Lessons 队列,或搜索任务本地 `lesson_candidates.md` 中的 `needs-promotion`。
154
154
  2. 查看候选行的 `Detail Artifact`,确认任务本地详情正文足够完整。
155
155
  3. 需要提升时创建后续 sedimentation task,或批准 `lesson-promote --apply`。
156
- 4. 查看生成的 `docs/01-GOVERNANCE/lessons/*.md`。
156
+ 4. 查看生成的 `coding-agent-harness/governance/lessons/*.md`。
157
157
  5. 有冲突的 lesson 一起审。
158
158
  6. 批准后由维护任务更新目标 reference / template / checker。
159
159
 
@@ -166,4 +166,4 @@ pending governance integration -> approved -> merged
166
166
  - `arch-change`:按建议更新架构文档。
167
167
  - `process-change`:按建议更新流程文档或 CLI/checker。
168
168
 
169
- 合入任务收口时,必须在 `docs/Harness-Ledger.md` 的当前任务 row 中记录 `checked-created:<L-ID>`、`queued-promotion:<LC-ID>` 或 `checked-candidate:<LC-ID>`。
169
+ 合入任务收口时,必须在 `coding-agent-harness/governance/generated/Harness-Ledger.md` 的当前任务 row 中记录 `checked-created:<L-ID>`、`queued-promotion:<LC-ID>` 或 `checked-candidate:<LC-ID>`。
@@ -105,7 +105,7 @@
105
105
  必须先升级为 worker 并补齐 worktree 合同。
106
106
 
107
107
  如果 review loop 使用 reviewer agent、subagent 或外部审查者,必须在任务目录写
108
- `review.md`,并按 `docs/11-REFERENCE/adversarial-review-standard.md` 记录 material findings、
108
+ `review.md`,并按 `coding-agent-harness/governance/standards/adversarial-review-standard.md` 记录 material findings、
109
109
  no-finding statement、evidence checked 和 residual risk。
110
110
 
111
111
  ### Evidence Depth
@@ -200,10 +200,10 @@ no-finding statement、evidence checked 和 residual risk。
200
200
 
201
201
  一个项目安装 harness 后,应做到:
202
202
 
203
- - `AGENTS.md` 的 Task-Type Reading Matrix 指向 `docs/11-REFERENCE/long-running-task-standard.md`
204
- - `docs/09-PLANNING/TASKS/_task-template/` 包含 long-running task contract 模板
205
- - `docs/09-PLANNING/TASKS/_task-template/` 包含 `review.md` 模板
206
- - `docs/11-REFERENCE/adversarial-review-standard.md` 定义 reviewer 报告规范
203
+ - `AGENTS.md` 的 Task-Type Reading Matrix 指向 `coding-agent-harness/governance/standards/long-running-task-standard.md`
204
+ - `coding-agent-harness/planning/tasks/_task-template/` 包含 long-running task contract 模板
205
+ - `coding-agent-harness/planning/tasks/_task-template/` 包含 `review.md` 模板
206
+ - `coding-agent-harness/governance/standards/adversarial-review-standard.md` 定义 reviewer 报告规范
207
207
  - `execution-workflow-standard.md` 在开始任务前要求判断是否属于长程任务
208
208
  - regression / testing 标准能提供可复查证据,而不是只依赖主观判断
209
- - `docs/Harness-Ledger.md` 记录长程任务是否完成必要的上下文回写
209
+ - `coding-agent-harness/governance/generated/Harness-Ledger.md` 记录长程任务是否完成必要的上下文回写
@@ -25,7 +25,7 @@
25
25
 
26
26
  ## 模块注册表(Module Registry)
27
27
 
28
- 安装位置:`docs/09-PLANNING/Module-Registry.md`
28
+ 安装位置:`coding-agent-harness/planning/modules/Module-Registry.md`
29
29
 
30
30
  使用模板:`templates/ssot/Module-Registry.md`
31
31
 
@@ -43,20 +43,20 @@
43
43
 
44
44
  ## 模块计划(Module Plan)
45
45
 
46
- 安装位置:`docs/09-PLANNING/MODULES/<key>/module_plan.md`
46
+ 安装位置:`coding-agent-harness/planning/modules/<key>/module_plan.md`
47
47
 
48
48
  使用模板:`templates/planning/module_plan.md`
49
49
 
50
50
  职责:
51
51
  - 记录该模块的步骤序列、当前进度、完成标准
52
- - 每个步骤对应一个 task_plan(在模块的 TASKS/ 子目录下)
52
+ - 每个步骤对应一个 task_plan(在模块的 tasks/ 子目录下)
53
53
 
54
54
  ## 模块会话启动 Prompt(Module Session Prompt)
55
55
 
56
56
  安装位置由项目选择,推荐二选一:
57
57
 
58
- - 单文件 Prompt Pack:`docs/09-PLANNING/MODULES/Session-Prompt-Pack.md`
59
- - 每模块 Prompt:`docs/09-PLANNING/MODULES/<key>/session_prompt.md`
58
+ - 单文件 Prompt Pack:`coding-agent-harness/planning/modules/Session-Prompt-Pack.md`
59
+ - 每模块 Prompt:`coding-agent-harness/planning/modules/<key>/session_prompt.md`
60
60
 
61
61
  使用模板:`templates/planning/module_session_prompt.md`
62
62
 
@@ -73,16 +73,16 @@
73
73
  - Prompt 必须写清楚至少一个项目级 check 和该模块的 targeted checks。
74
74
  - Prompt 必须包含 start gate:校验 registry 当前步骤、branch/worktree、dirty state、共享锁和过期 prompt。
75
75
  - Prompt 必须要求开始改代码前创建或更新模块 task_plan,并记录 scope、acceptance、verification、worktree 和 shared coordination。
76
- - Prompt 必须包含 closeout:review.md 或 skipped-with-reason、walkthrough Lessons Reflection、Closeout SSoT、Lessons Check、Regression SSoT / Harness Ledger 条件更新。
76
+ - Prompt 必须包含 closeout:review.md 或 skipped-with-reason、walkthrough Lessons Reflection、Closeout Index、Lessons Check、Regression SSoT / Harness Ledger 条件更新。
77
77
  - Prompt 中不得要求 agent 修改其他模块代码;需要跨模块文件时,必须先进入 `_shared` task 或指定单一 owner。
78
78
 
79
79
  ## 模块目录结构
80
80
 
81
81
  ```
82
- docs/09-PLANNING/MODULES/<key>/
82
+ coding-agent-harness/planning/modules/<key>/
83
83
  ├── module_plan.md ← 模块总览和步骤序列
84
84
  ├── session_prompt.md ← 可选:该模块专用启动 prompt
85
- └── TASKS/ ← 该模块的所有 task
85
+ └── tasks/ ← 该模块的所有 task
86
86
  ├── <PREFIX>-NN-<name>/
87
87
  │ ├── task_plan.md
88
88
  │ ├── progress.md
@@ -90,13 +90,13 @@ docs/09-PLANNING/MODULES/<key>/
90
90
  │ └── review.md (如需要)
91
91
  └── ...
92
92
 
93
- docs/10-WALKTHROUGH/
93
+ task-local walkthrough.md/
94
94
  ├── <module-key>/
95
95
  │ ├── <PREFIX>-NN-walkthrough.md
96
96
  │ └── ...
97
97
  └── _shared/ ← 跨模块基础设施 task 的 walkthrough
98
98
 
99
- docs/09-PLANNING/MODULES/_shared/TASKS/
99
+ coding-agent-harness/planning/modules/_shared/tasks/
100
100
  └── YYYY-MM-DD-<name>/ ← 跨模块/基础设施 task
101
101
  └── ...
102
102
  ```
@@ -113,25 +113,25 @@ docs/09-PLANNING/MODULES/_shared/TASKS/
113
113
  新会话的读取顺序:
114
114
 
115
115
  1. `AGENTS.md` — 获取项目总览和模块并行指引
116
- 2. `docs/09-PLANNING/Module-Registry.md` — 了解全局模块状态
117
- 3. `docs/09-PLANNING/MODULES/Session-Prompt-Pack.md` 或目标模块的 `session_prompt.md` — 获取会话启动合同
118
- 4. 目标模块的 `docs/09-PLANNING/MODULES/<key>/module_plan.md` — 了解模块进度
116
+ 2. `coding-agent-harness/planning/modules/Module-Registry.md` — 了解全局模块状态
117
+ 3. `coding-agent-harness/planning/modules/Session-Prompt-Pack.md` 或目标模块的 `session_prompt.md` — 获取会话启动合同
118
+ 4. 目标模块的 `coding-agent-harness/planning/modules/<key>/module_plan.md` — 了解模块进度
119
119
  5. 当前步骤的 `task_plan.md` — 了解具体任务
120
120
 
121
121
  会话开始时,用户告知目标模块(如"做 Reader"),agent 据此定位。
122
122
 
123
123
  会话结束时必须更新:
124
124
  - module_plan.md 的步骤状态和"当前状态"段落
125
- - 模块 TASKS 下的 progress / findings / review / walkthrough 相关引用
126
- - 模块 TASKS 下的 Coordinator Handoff,列出需要 coordinator 同步到总表的 registry / ledger / closeout 项
125
+ - 模块 tasks 下的 progress / findings / review / walkthrough 相关引用
126
+ - 模块 tasks 下的 Coordinator Handoff,列出需要 coordinator 同步到总表的 registry / ledger / closeout 项
127
127
 
128
128
  模块 worker 默认不得写全局总表:
129
129
 
130
- - `docs/09-PLANNING/Module-Registry.md`
131
- - `docs/Harness-Ledger.md`
132
- - `docs/10-WALKTHROUGH/Closeout-SSoT.md`
133
- - `docs/05-TEST-QA/Regression-SSoT.md`
134
- - `docs/05-TEST-QA/Cadence-Ledger.md`
130
+ - `coding-agent-harness/planning/modules/Module-Registry.md`
131
+ - `coding-agent-harness/governance/generated/Harness-Ledger.md`
132
+ - `coding-agent-harness/governance/generated/Closeout-Index.md`
133
+ - `coding-agent-harness/governance/regression/Regression-SSoT.md`
134
+ - `coding-agent-harness/governance/regression/Cadence-Ledger.md`
135
135
 
136
136
  这些文件只有 coordinator pass 或显式 shared lock owner 能写。模块 worker 需要总表同步时,只在模块任务的
137
137
  `progress.md` / `task_plan.md` 中写 `Coordinator Handoff`,状态使用
@@ -144,9 +144,9 @@ docs/09-PLANNING/MODULES/_shared/TASKS/
144
144
 
145
145
  本项目启用了模块并行开发。开始任何模块工作前:
146
146
 
147
- 1. 读 docs/09-PLANNING/Module-Registry.md 了解全局状态
148
- 2. 读 docs/09-PLANNING/MODULES/Session-Prompt-Pack.md 或目标模块的 session_prompt.md
149
- 3. 读目标模块的 docs/09-PLANNING/MODULES/<key>/module_plan.md
147
+ 1. 读 coding-agent-harness/planning/modules/Module-Registry.md 了解全局状态
148
+ 2. 读 coding-agent-harness/planning/modules/Session-Prompt-Pack.md 或目标模块的 session_prompt.md
149
+ 3. 读目标模块的 coding-agent-harness/planning/modules/<key>/module_plan.md
150
150
  4. 在模块对应的 worktree 上工作
151
151
  5. 不跨模块修改文件(不修改 write scope 之外的代码)
152
152
  6. 如果作为 worker subagent 改代码/测试/文档,必须在 coordinator 分配的独立 worktree / branch 中工作,提交自己的 commit,并 handoff commit SHA / checks / residual risks
@@ -163,7 +163,7 @@ docs/09-PLANNING/MODULES/_shared/TASKS/
163
163
  - 发布 = git tag + merge 到 main 的一批模块步骤
164
164
  - 在 git tag message 中列出包含的步骤 ID
165
165
  - 示例:`git tag -a v0.3.0 -m "Release 3: RDR-01, RDR-02, GRF-01, MOT-01"`
166
- - 如需更正式的发布管理,可选创建 `docs/09-PLANNING/releases/` 目录
166
+ - 如需更正式的发布管理,可选创建 `coding-agent-harness/planning/releases/` 目录
167
167
 
168
168
  ## 共享文件冲突规则
169
169
 
@@ -188,10 +188,10 @@ shell、data layer、design system 等共享基础设施的修改:
188
188
 
189
189
  最小协调产物:
190
190
 
191
- - `_shared` task:`docs/09-PLANNING/MODULES/_shared/TASKS/<id>/task_plan.md`
191
+ - `_shared` task:`coding-agent-harness/planning/modules/_shared/tasks/<id>/task_plan.md`
192
192
  - 或模块 task_plan 中的 `Shared Coordination` 段落,必须写明 owner、touched files、allowed change、reviewer、merge order。
193
193
 
194
- Module Registry 本身也是 shared lock。活跃模块会话默认更新自己的 module_plan 和 TASKS;Registry 的 Current Step / Status 只在持锁或 coordinator pass 中更新,避免多个会话同时改同一个表。
194
+ Module Registry 本身也是 shared lock。活跃模块会话默认更新自己的 module_plan 和 tasks;Registry 的 Current Step / Status 只在持锁或 coordinator pass 中更新,避免多个会话同时改同一个表。
195
195
 
196
196
  Checker 必须反向扫描模块任务目录:
197
197
 
@@ -203,7 +203,7 @@ Checker 必须反向扫描模块任务目录:
203
203
  严格模式命令:
204
204
 
205
205
  ```bash
206
- HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node scripts/check-harness.mjs <repo-path>
206
+ HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node dist/check-harness.mjs <repo-path>
207
207
  ```
208
208
 
209
209
  这条规则的目的不是让每个 worker 都改总表,而是让总表同步变成单一 owner 的串行步骤。
@@ -218,7 +218,7 @@ HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node scripts/check-harness.mjs <repo-path>
218
218
  4. 各模块 worktree rebase 到最新主干
219
219
  5. 可选:在 Module Registry 标注 `infra-task-pending: true`,提醒各模块会话 rebase
220
220
 
221
- 基础设施 task 的文件放在 `docs/09-PLANNING/MODULES/_shared/TASKS/` 下。
221
+ 基础设施 task 的文件放在 `coding-agent-harness/planning/modules/_shared/tasks/` 下。
222
222
 
223
223
  ## 模块级 Worktree
224
224
 
@@ -253,7 +253,7 @@ HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node scripts/check-harness.mjs <repo-path>
253
253
 
254
254
  切换时必须归档 legacy 生命周期表:
255
255
 
256
- - `Feature-SSoT.md` / `Private-Feature-SSoT.md` 移到 `docs/09-PLANNING/_archive/`。
256
+ - `Feature-SSoT.md` / `Private-Feature-SSoT.md` 移到 `coding-agent-harness/planning/_archive/`。
257
257
  - Phase 历史和 completed 明细作为历史证据保留,不再作为 active 表继续维护。
258
258
  - 使用 `harness governance rebuild --archive --apply` 从 task / module 文件重建 Harness Ledger、module plan 和 visual map 索引。
259
259
  - 不允许把历史大表留在 active 生命周期入口底部作为"文件内归档";这会让 Agent 继续读取旧状态。
@@ -263,8 +263,8 @@ HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node scripts/check-harness.mjs <repo-path>
263
263
  ### 归档
264
264
 
265
265
  - 模块所有步骤完成后,状态改为 `completed`
266
- - 将模块目录移入 `docs/09-PLANNING/MODULES/_archive/<key>/`
267
- - 对应的 walkthrough 保留在 `docs/10-WALKTHROUGH/<key>/`(不归档)
266
+ - 将模块目录移入 `coding-agent-harness/planning/modules/_archive/<key>/`
267
+ - 对应的 walkthrough 保留在 `walkthrough.md/`(不归档)
268
268
 
269
269
  ### 过期检测
270
270
 
@@ -277,9 +277,9 @@ HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node scripts/check-harness.mjs <repo-path>
277
277
  对已有线性 Phase 历史的项目:
278
278
 
279
279
  1. 冻结 legacy 生命周期表当前状态,标注"后续工作按模块推进"
280
- 2. 将 `Feature-SSoT.md` / `Private-Feature-SSoT.md` 历史明细移入 `docs/09-PLANNING/_archive/`
281
- 3. 将历史 `docs/09-PLANNING/TASKS/` 移入 `docs/09-PLANNING/_archive/`
282
- 4. 将历史 walkthrough 移入 `docs/10-WALKTHROUGH/_archive/`
280
+ 2. 将 `Feature-SSoT.md` / `Private-Feature-SSoT.md` 历史明细移入 `coding-agent-harness/planning/_archive/`
281
+ 3. 将历史 `coding-agent-harness/planning/tasks/` 移入 `coding-agent-harness/planning/_archive/`
282
+ 4. 将历史 walkthrough 移入 `coding-agent-harness/governance/archive/legacy-walkthrough/`
283
283
  5. 从最后一个 Phase 的未完成项中识别模块
284
284
  6. 创建 Module Registry 和各模块的 module_plan.md
285
285
  7. 创建 Module Session Prompt Pack 或每模块 `session_prompt.md`
@@ -17,7 +17,7 @@
17
17
  `trivial` 不进入 CLI:小到不值得建立任务目录的修改,可以直接执行并在 commit 或交付说明中写清楚原因。
18
18
 
19
19
  ```
20
- docs/09-PLANNING/TASKS/<YYYY-MM-DD-任务名>/
20
+ coding-agent-harness/planning/tasks/<YYYY-MM-DD-任务名>/
21
21
  ├── task_plan.md ← 计划:目标、范围、步骤、验收标准
22
22
  ├── execution_strategy.md ← 执行策略:模式、subagent、冲突控制、验证深度、handoff
23
23
  ├── visual_map.md ← 图表集合:阶段图、架构图、时序图、数据流、状态机、完成度、证据状态
@@ -118,11 +118,11 @@ the same contract.
118
118
 
119
119
  当项目启用模块并行开发(见 `references/module-parallel-standard.md`)时:
120
120
 
121
- - 任务目录位于模块内:`docs/09-PLANNING/MODULES/<key>/TASKS/<PREFIX>-NN-<name>/`
122
- - 跨模块基础设施任务位于:`docs/09-PLANNING/MODULES/_shared/TASKS/YYYY-MM-DD-<name>/`
121
+ - 任务目录位于模块内:`coding-agent-harness/planning/modules/<key>/tasks/<PREFIX>-NN-<name>/`
122
+ - 跨模块基础设施任务位于:`coding-agent-harness/planning/modules/_shared/tasks/YYYY-MM-DD-<name>/`
123
123
  - task_plan.md 应填写"模块关联"段(Module、Step、Module Plan link)
124
124
  - 会话结束时除了更新 progress.md,还需更新 module_plan.md。
125
- - 模块 worker 不直接写 Module Registry / Harness Ledger / Closeout SSoT。需要总表同步时,在 task_plan.md 或 progress.md 的 `Coordinator Handoff` 段标记 `pending-coordinator-pass`,由 coordinator 串行同步。
125
+ - 模块 worker 不直接写 Module Registry / Harness Ledger / Closeout Index。需要总表同步时,在 task_plan.md 或 progress.md 的 `Coordinator Handoff` 段标记 `pending-coordinator-pass`,由 coordinator 串行同步。
126
126
  - coordinator pass 完成后,才更新 Module Registry、Harness Ledger、必要的 Closeout / Regression 表,并把 handoff 标记为 `synced`。
127
127
 
128
128
  ## 为什么这套东西有效
@@ -214,7 +214,7 @@ standard / complex:
214
214
 
215
215
  每次状态变更时,必须更新 task-local facts,例如 `progress.md`、`review.md` 或 `lesson_candidates.md`。任务生命周期总表由 lifecycle CLI 或 `harness governance rebuild` 生成,不手工维护 Feature lifecycle 表。
216
216
 
217
- 任务完成时,必须在 `docs/Harness-Ledger.md` 中记录本轮 task plan、SSoT、
217
+ 任务完成时,必须在 `coding-agent-harness/governance/generated/Harness-Ledger.md` 中记录本轮 task plan、SSoT、
218
218
  walkthrough、Lessons 检查等上下文回写结果。
219
219
 
220
220
  ## Commit Convention
@@ -228,7 +228,7 @@ walkthrough、Lessons 检查等上下文回写结果。
228
228
  ```text
229
229
  feat: implement task review gate
230
230
 
231
- Harness: TASKS/2026-05-21-task-review-gate
231
+ Harness: tasks/2026-05-21-task-review-gate
232
232
  ```
233
233
 
234
234
  格式:`Harness: <task-id>`,其中 task-id 是 `task-list --json` 输出的 `id` 字段。
@@ -22,7 +22,7 @@
22
22
 
23
23
  ### 3. 现有文档
24
24
  - 有没有 AGENTS.md / CLAUDE.md / COPILOT.md?
25
- - 有没有 docs/ 目录?结构如何?
25
+ - 有没有 coding-agent-harness/ 目录?结构如何?
26
26
  - 有没有 README 以外的开发文档?
27
27
  - 有没有架构设计文档?
28
28
  - 如果项目属于微服务、多仓或前后端分仓,用户是否有外部服务文档、接口文档、架构图、会议纪要、链接或导出包?
@@ -58,7 +58,7 @@
58
58
  - 是否是前后端分仓、app/service 分仓或 program 多仓?
59
59
  - 前端 agent 是否只能看到 API 文档 / mock / schema?后端 agent 是否只能看到消费合同?
60
60
  - 当前使用敏捷 sprint、kanban 连续流、瀑布 stage-gate,还是个人连续执行?
61
- - 是否需要 `docs/09-PLANNING/Delivery-SSoT.md` 记录 feature block owner、依赖、集成顺序和 acceptance gates?
61
+ - 是否需要 `coding-agent-harness/planning/Delivery-SSoT.md` 记录 feature block owner、依赖、集成顺序和 acceptance gates?
62
62
 
63
63
  ### 6b. Repo Governance
64
64
  - repo platform 是 GitHub / GitLab / local-only / 其他?
@@ -91,7 +91,7 @@
91
91
  | 维度 | 现状 | 评级 |
92
92
  |------|------|------|
93
93
  | AGENTS.md | [有/无/需改造] | 🟢/🟡/🔴 |
94
- | docs/ 目录 | [有/无/需改造] | 🟢/🟡/🔴 |
94
+ | coding-agent-harness/ 目录 | [有/无/需改造] | 🟢/🟡/🔴 |
95
95
  | Reference 标准 | [有/无/需改造] | 🟢/🟡/🔴 |
96
96
  | Planning Loop | [有/无/需改造] | 🟢/🟡/🔴 |
97
97
  | Delivery Operating Model | [solo/team/split-repo/program/waterfall/kanban/需确认] | 🟢/🟡/🔴 |
@@ -139,7 +139,7 @@
139
139
 
140
140
  最小配置:
141
141
  - AGENTS.md
142
- - docs/11-REFERENCE/ 下 2-3 个标准文件
142
+ - coding-agent-harness/governance/standards/ 下 2-3 个标准文件
143
143
  - Delivery Operating Model 标准,明确是否为 `solo-orchestrator`
144
144
  - Planning task plan / findings / progress / review 模板
145
145
  - repo governance / CI-CD 标准和 residual
@@ -49,7 +49,7 @@
49
49
 
50
50
  | Archive | Range | Notes |
51
51
  |---------|-------|-------|
52
- | `docs/05-TEST-QA/_archive/Regression-SSoT-archive-YYYY-QN.md` | RG-XXX-RG-YYY | retired gates |
52
+ | `coding-agent-harness/governance/regression/_archive/Regression-SSoT-archive-YYYY-QN.md` | RG-XXX-RG-YYY | retired gates |
53
53
  ```
54
54
 
55
55
  ## Cadence Ledger
@@ -86,4 +86,4 @@ Harness Ledger 只在当前任务收口时记录 `Regression=updated`、`Regress
86
86
  6. 持续迭代:每次新增 surface 或 evidence depth 提升时更新 SSoT
87
87
 
88
88
  废弃 gate 或过期 shared batch 明细不要长期堆在 Active 表底部;移动到
89
- `docs/05-TEST-QA/_archive/`,并在 Regression SSoT 中保留 Archive Index。
89
+ `coding-agent-harness/governance/regression/_archive/`,并在 Regression SSoT 中保留 Archive Index。
@@ -13,13 +13,13 @@ Harness 不是只生成文档骨架。每个项目必须有项目级 repository
13
13
  标准文件:
14
14
 
15
15
  ```text
16
- docs/11-REFERENCE/repo-governance-standard.md
16
+ coding-agent-harness/governance/standards/repo-governance-standard.md
17
17
  ```
18
18
 
19
19
  如果项目需要更详细的 CI/CD 说明,另见:
20
20
 
21
21
  ```text
22
- docs/11-REFERENCE/ci-cd-standard.md
22
+ coding-agent-harness/governance/standards/ci-cd-standard.md
23
23
  ```
24
24
 
25
25
  ## 必填字段
@@ -46,7 +46,7 @@ docs/11-REFERENCE/ci-cd-standard.md
46
46
 
47
47
  - PR required before merge: [yes / no]
48
48
  - PR title format
49
- - PR body requirements. Use `docs/11-REFERENCE/pull-request-standard.md` for
49
+ - PR body requirements. Use `coding-agent-harness/governance/standards/pull-request-standard.md` for
50
50
  the required bilingual structure, version impact, verification, review
51
51
  evidence, residual risk, and references.
52
52
  - Required reviewers
@@ -137,6 +137,6 @@ Bootstrap is not complete unless repository governance is at least:
137
137
 
138
138
  ## Related Standards
139
139
 
140
- - `docs/11-REFERENCE/pull-request-standard.md` — PR body structure, bilingual
140
+ - `coding-agent-harness/governance/standards/pull-request-standard.md` — PR body structure, bilingual
141
141
  requirements, version impact, verification, review evidence, residual risk,
142
142
  and references.
@@ -63,7 +63,7 @@ Reviewer subagent 在单个任务内默认允许,可重复用于只读审查
63
63
 
64
64
  1. 在当前任务的 `review.md` 记录触发来源和审查范围。
65
65
  2. 如果是一次性审查,按本轮任务执行。
66
- 3. 如果用户希望长期遵循,创建或更新项目级 `docs/11-REFERENCE/review-routing-standard.md`。
66
+ 3. 如果用户希望长期遵循,创建或更新项目级 `coding-agent-harness/governance/standards/review-routing-standard.md`。
67
67
  4. 在 `AGENTS.md` 的 Task-Type Reading Matrix 中加入 reviewer routing 入口。
68
68
  5. 在 Harness Ledger 记录该规则变更。
69
69
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 核心思路
4
4
 
5
- SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生命周期状态现在由任务本地文件承载,并由 Harness CLI 生成 `docs/Harness-Ledger.md`,避免 Agent 或人手写多张重复进度表。
5
+ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生命周期状态现在由任务本地文件承载,并由 Harness CLI 生成 `coding-agent-harness/governance/generated/Harness-Ledger.md`,避免 Agent 或人手写多张重复进度表。
6
6
 
7
7
  ## 当前治理表
8
8
 
@@ -10,7 +10,7 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
10
10
 
11
11
  管理多人、多 agent、多仓或传统流程下的 feature block 分配、依赖和集成顺序。
12
12
 
13
- - 文件:`docs/09-PLANNING/Delivery-SSoT.md`
13
+ - 文件:`coding-agent-harness/planning/Delivery-SSoT.md`
14
14
  - 职责:谁负责哪个 feature block、agent 能看哪些上下文、依赖和 merge 顺序是什么
15
15
  - 规则:多人、多仓、split-repo、program、waterfall 或 kanban 团队流程必须维护
16
16
 
@@ -18,7 +18,7 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
18
18
 
19
19
  管理所有 regression surface 的状态、证据深度和残项。
20
20
 
21
- - 文件:`docs/05-TEST-QA/Regression-SSoT.md`
21
+ - 文件:`coding-agent-harness/governance/regression/Regression-SSoT.md`
22
22
  - 职责:哪些回归面存在、每条的标准入口、当前证据深度、residual
23
23
  - 规则:新增固定 gate 或 evidence depth 变化时必须更新
24
24
 
@@ -26,7 +26,7 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
26
26
 
27
27
  管理需要周期性复查的回归、release、migration 或环境检查。
28
28
 
29
- - 文件:`docs/05-TEST-QA/Cadence-Ledger.md`
29
+ - 文件:`coding-agent-harness/governance/regression/Cadence-Ledger.md`
30
30
  - 职责:哪些检查需要按节奏重跑、最近一次证据是什么、下一次应该何时触发
31
31
  - 规则:新增或改变周期性 gate 时必须更新
32
32
 
@@ -34,15 +34,15 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
34
34
 
35
35
  管理模块边界、owner、worktree 和写入范围。
36
36
 
37
- - 文件:`docs/09-PLANNING/Module-Registry.md`
37
+ - 文件:`coding-agent-harness/planning/modules/Module-Registry.md`
38
38
  - 职责:模块 key、路径范围、负责人、状态、worktree、模块计划和依赖
39
39
  - 规则:启用模块并行时必须维护;模块内步骤进度由 module plan / module visual map 的生成索引表达
40
40
 
41
- ### Closeout SSoT(收口表)
41
+ ### Closeout Index(收口表)
42
42
 
43
43
  管理任务是否有 walkthrough、Lessons Check 和受控 skip reason。
44
44
 
45
- - 文件:`docs/10-WALKTHROUGH/Closeout-SSoT.md`
45
+ - 文件:`coding-agent-harness/governance/generated/Closeout-Index.md`
46
46
  - 职责:任务收口状态、walkthrough 路径、lesson 结果和 residual
47
47
  - 规则:非平凡任务完成或关闭时必须维护
48
48
 
@@ -50,7 +50,7 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
50
50
 
51
51
  管理 Agent 在开发过程中发现的经验、改进建议和规范演进。
52
52
 
53
- - 文件:任务本地 `lesson_candidates.md` 与 `docs/01-GOVERNANCE/lessons/*.md`
53
+ - 文件:任务本地 `lesson_candidates.md` 与 `coding-agent-harness/governance/lessons/*.md`
54
54
  - 职责:哪些经验值得沉淀、人工如何判定、哪些 lesson 已提升为详情文档
55
55
  - 规则:Walkthrough 收口后检查是否有沉淀建议;promotion 前必须查重 candidate 和 detail doc
56
56
  - 详细治理规范:`references/lessons-governance.md`
@@ -59,7 +59,7 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
59
59
 
60
60
  管理任务生命周期的可扫描汇总。
61
61
 
62
- - 文件:`docs/Harness-Ledger.md`
62
+ - 文件:`coding-agent-harness/governance/generated/Harness-Ledger.md`
63
63
  - 职责:从任务本地事实生成 scope、module、task、state、queues、plan、review、lesson、closeout、residual
64
64
  - 规则:由 Harness CLI 生成;不要手写任务生命周期行
65
65
  - 详细规范:`references/harness-ledger.md`
@@ -71,8 +71,8 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
71
71
  ## 分工规则
72
72
 
73
73
  - Delivery SSoT 不替代 Regression SSoT;它管交付组织和集成顺序。
74
- - Regression SSoT 不替代 Closeout SSoT;它管验证面和证据深度。
75
- - Closeout SSoT 不替代 task-local `lesson_candidates.md`;它只记录收口状态。
74
+ - Regression SSoT 不替代 Closeout Index;它管验证面和证据深度。
75
+ - Closeout Index 不替代 task-local `lesson_candidates.md`;它只记录收口状态。
76
76
  - Module Registry 不替代 module plan;它登记模块边界和 owner。
77
77
  - Harness Ledger 不替代上述治理表;它只生成任务生命周期索引。
78
78
  - 任务生命周期状态不要同时维护在旧 Feature 表和新 Ledger 中。
@@ -92,14 +92,14 @@ SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生
92
92
 
93
93
  | 表 | Active 保留 | 归档触发 | 归档位置 |
94
94
  |------|-------------|----------|----------|
95
- | Legacy Feature / Private Feature 生命周期表 | 不再作为 active 表保留 | 迁移到 ledger-only 版本 | `docs/09-PLANNING/_archive/` |
96
- | Delivery SSoT | 当前交付 block、集成顺序和阻塞项 | wave 结束或 completed/superseded blocks 超过 20 条 | `docs/09-PLANNING/_archive/` |
97
- | Module Registry | 活跃 / 暂停不久的模块 | 模块 completed 或 paused 超过 60 天 | `docs/09-PLANNING/MODULES/_archive/<key>/` |
98
- | Regression SSoT | active gates | gate 废弃或长期不再运行 | `docs/05-TEST-QA/_archive/` |
99
- | Cadence Ledger | active cadence checks | cadence 废弃或合并到其他 gate | `docs/05-TEST-QA/_archive/` |
100
- | Closeout SSoT | 当前 closeout 索引 | closed/superseded 超过保留窗口 | `docs/10-WALKTHROUGH/_archive/` |
101
- | Lesson detail docs | pending / approved / superseded 详情文档 | merged/rejected 超过 20 条 | `docs/01-GOVERNANCE/_archive/` |
102
- | Harness Ledger | 当前生成索引 | 重新生成前 archive 旧快照 | `docs/01-GOVERNANCE/_archive/` 或迁移会话 archive |
95
+ | Legacy Feature / Private Feature 生命周期表 | 不再作为 active 表保留 | 迁移到 ledger-only 版本 | `coding-agent-harness/planning/_archive/` |
96
+ | Delivery SSoT | 当前交付 block、集成顺序和阻塞项 | wave 结束或 completed/superseded blocks 超过 20 条 | `coding-agent-harness/planning/_archive/` |
97
+ | Module Registry | 活跃 / 暂停不久的模块 | 模块 completed 或 paused 超过 60 天 | `coding-agent-harness/planning/modules/_archive/<key>/` |
98
+ | Regression SSoT | active gates | gate 废弃或长期不再运行 | `coding-agent-harness/governance/regression/_archive/` |
99
+ | Cadence Ledger | active cadence checks | cadence 废弃或合并到其他 gate | `coding-agent-harness/governance/regression/_archive/` |
100
+ | Closeout Index | 当前 closeout 索引 | closed/superseded 超过保留窗口 | `coding-agent-harness/governance/archive/legacy-walkthrough/` |
101
+ | Lesson detail docs | pending / approved / superseded 详情文档 | merged/rejected 超过 20 条 | `coding-agent-harness/governance/_archive/` |
102
+ | Harness Ledger | 当前生成索引 | 重新生成前 archive 旧快照 | `coding-agent-harness/governance/_archive/` 或迁移会话 archive |
103
103
 
104
104
  归档不改变 ID,不删除证据文件;Active 文件必须留下 archive index 或指向归档文件。
105
105