coding-agent-harness 1.0.2 → 1.0.4

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 (177) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/CONTRIBUTING.md +98 -0
  3. package/README.md +211 -86
  4. package/README.zh-CN.md +54 -34
  5. package/SKILL.md +25 -18
  6. package/docs-release/README.md +9 -5
  7. package/docs-release/architecture/overview.md +17 -5
  8. package/docs-release/architecture/overview.zh-CN.md +9 -5
  9. package/docs-release/assets/dashboard-overview.png +0 -0
  10. package/docs-release/guides/agent-installation.en-US.md +31 -8
  11. package/docs-release/guides/agent-installation.md +34 -9
  12. package/docs-release/guides/contributing.md +100 -0
  13. package/docs-release/guides/contributing.zh-CN.md +99 -0
  14. package/docs-release/guides/document-audience-and-surfaces.en-US.md +3 -2
  15. package/docs-release/guides/document-audience-and-surfaces.md +3 -2
  16. package/docs-release/guides/full-legacy-migration-subagent-strategy.md +2 -2
  17. package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +2 -2
  18. package/docs-release/guides/legacy-migration-agent-prompt.md +0 -11
  19. package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +0 -11
  20. package/docs-release/guides/migration-playbook.en-US.md +14 -15
  21. package/docs-release/guides/migration-playbook.md +14 -15
  22. package/docs-release/guides/parent-control-repository-pattern.en-US.md +7 -5
  23. package/docs-release/guides/parent-control-repository-pattern.md +7 -5
  24. package/docs-release/guides/preset-development.md +214 -0
  25. package/docs-release/guides/repository-operating-models.en-US.md +5 -4
  26. package/docs-release/guides/repository-operating-models.md +5 -4
  27. package/docs-release/guides/task-state-machine.en-US.md +207 -0
  28. package/docs-release/guides/task-state-machine.md +214 -0
  29. package/docs-release/intl/en-US.md +1 -1
  30. package/docs-release/intl/zh-CN.md +1 -1
  31. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/findings.md +7 -0
  32. package/package.json +8 -3
  33. package/presets/legacy-migration/checks/preset-check.mjs +3 -0
  34. package/presets/legacy-migration/preset.yaml +134 -0
  35. package/presets/legacy-migration/scripts/plan-work-queue.mjs +4 -0
  36. package/presets/legacy-migration/scripts/scaffold-task-contracts.mjs +4 -0
  37. package/presets/legacy-migration/templates/execution_strategy.append.md +18 -0
  38. package/presets/legacy-migration/templates/findings.seed.md +17 -0
  39. package/presets/legacy-migration/templates/review.seed.md +12 -0
  40. package/presets/legacy-migration/templates/task_plan.append.md +9 -0
  41. package/presets/legacy-migration/templates/visual_map.append.md +12 -0
  42. package/presets/legacy-migration/workbench/dashboard-panels.yaml +2 -0
  43. package/presets/legacy-migration/workbench/migration-queue.schema.json +23 -0
  44. package/presets/lesson-sedimentation/preset.yaml +23 -0
  45. package/presets/lesson-sedimentation/templates/prompt.md +23 -0
  46. package/presets/module/preset.yaml +25 -0
  47. package/presets/module/templates/execution_strategy.append.md +8 -0
  48. package/presets/module/templates/task_plan.append.md +17 -0
  49. package/presets/standard-task/preset.yaml +31 -0
  50. package/presets/standard-task/templates/task_plan.append.md +7 -0
  51. package/references/adversarial-review-standard.md +2 -2
  52. package/references/agents-md-pattern.md +2 -2
  53. package/references/delivery-operating-model-standard.md +3 -3
  54. package/references/docs-directory-standard.md +6 -7
  55. package/references/harness-ledger.md +53 -96
  56. package/references/lessons-governance.md +88 -93
  57. package/references/module-parallel-standard.md +14 -14
  58. package/references/planning-loop.md +12 -6
  59. package/references/pull-request-standard.md +118 -0
  60. package/references/repo-governance-standard.md +11 -2
  61. package/references/review-routing-standard.md +7 -1
  62. package/references/ssot-governance.md +67 -59
  63. package/references/taskr-gap-analysis.md +600 -0
  64. package/references/walkthrough-closeout.md +7 -7
  65. package/scripts/check-harness.mjs +40 -301
  66. package/scripts/commands/dashboard-command.mjs +67 -0
  67. package/scripts/commands/migration-command.mjs +96 -0
  68. package/scripts/commands/preset-command.mjs +73 -0
  69. package/scripts/commands/task-command.mjs +327 -0
  70. package/scripts/harness.mjs +55 -260
  71. package/scripts/lib/capability-registry.mjs +66 -8
  72. package/scripts/lib/check-module-parallel.mjs +237 -0
  73. package/scripts/lib/check-profiles.mjs +61 -153
  74. package/scripts/lib/check-task-contracts.mjs +47 -0
  75. package/scripts/lib/core-shared.mjs +10 -0
  76. package/scripts/lib/dashboard-data.mjs +29 -6
  77. package/scripts/lib/dashboard-workbench.mjs +52 -12
  78. package/scripts/lib/dashboard-writer.mjs +14 -2
  79. package/scripts/lib/git-status-summary.mjs +46 -0
  80. package/scripts/lib/governance-index-generator.mjs +174 -0
  81. package/scripts/lib/governance-sync.mjs +514 -0
  82. package/scripts/lib/governance-table-boundary.mjs +175 -0
  83. package/scripts/lib/harness-core.mjs +5 -0
  84. package/scripts/lib/lesson-maintenance.mjs +36 -29
  85. package/scripts/lib/migration-support.mjs +1 -1
  86. package/scripts/lib/preset-audit-contracts.mjs +37 -0
  87. package/scripts/lib/preset-engine.mjs +497 -0
  88. package/scripts/lib/preset-registry.mjs +627 -0
  89. package/scripts/lib/preset-resource-contracts.mjs +83 -0
  90. package/scripts/lib/review-confirm-git-gate.mjs +248 -0
  91. package/scripts/lib/status-dashboard-renderer.mjs +102 -0
  92. package/scripts/lib/subagent-authorization-audit.mjs +196 -0
  93. package/scripts/lib/task-completion-consistency.mjs +16 -0
  94. package/scripts/lib/task-index.mjs +93 -0
  95. package/scripts/lib/task-lesson-candidates.mjs +242 -0
  96. package/scripts/lib/task-lesson-sedimentation.mjs +326 -0
  97. package/scripts/lib/task-lifecycle/review-confirm.mjs +101 -0
  98. package/scripts/lib/task-lifecycle/review-gates.mjs +70 -0
  99. package/scripts/lib/task-lifecycle/text-utils.mjs +24 -0
  100. package/scripts/lib/task-lifecycle.mjs +297 -403
  101. package/scripts/lib/task-review-model.mjs +469 -0
  102. package/scripts/lib/task-scanner.mjs +130 -236
  103. package/scripts/lib/task-tombstone-commands.mjs +140 -0
  104. package/scripts/postinstall.mjs +14 -0
  105. package/skills/preset-creator/SKILL.md +179 -0
  106. package/skills/preset-creator/references/complex-task-skeleton/README.md +31 -0
  107. package/skills/preset-creator/references/complex-task-skeleton/artifacts/INDEX.md +12 -0
  108. package/skills/preset-creator/references/complex-task-skeleton/brief.md +32 -0
  109. package/skills/preset-creator/references/complex-task-skeleton/execution_strategy.md +71 -0
  110. package/skills/preset-creator/references/complex-task-skeleton/findings.md +24 -0
  111. package/skills/preset-creator/references/complex-task-skeleton/lesson_candidates.md +70 -0
  112. package/skills/preset-creator/references/complex-task-skeleton/long-running-task-contract.md +76 -0
  113. package/skills/preset-creator/references/complex-task-skeleton/progress.md +33 -0
  114. package/skills/preset-creator/references/complex-task-skeleton/references/INDEX.md +13 -0
  115. package/skills/preset-creator/references/complex-task-skeleton/review.md +107 -0
  116. package/skills/preset-creator/references/complex-task-skeleton/task_plan.md +111 -0
  117. package/skills/preset-creator/references/complex-task-skeleton/visual_map.md +50 -0
  118. package/skills/preset-creator/references/preset-package-skeleton.md +296 -0
  119. package/templates/AGENTS.md.template +19 -15
  120. package/templates/dashboard/assets/app-src/00-state.js +1 -0
  121. package/templates/dashboard/assets/app-src/10-router.js +2 -1
  122. package/templates/dashboard/assets/app-src/20-overview.js +11 -5
  123. package/templates/dashboard/assets/app-src/30-tasks.js +92 -246
  124. package/templates/dashboard/assets/app-src/35-task-detail.js +246 -0
  125. package/templates/dashboard/assets/app-src/45-review.js +241 -22
  126. package/templates/dashboard/assets/app-src/50-migration.js +24 -10
  127. package/templates/dashboard/assets/app-src/90-bindings.js +171 -29
  128. package/templates/dashboard/assets/app.css +698 -156
  129. package/templates/dashboard/assets/app.css.manifest.json +9 -0
  130. package/templates/dashboard/assets/app.js +662 -91
  131. package/templates/dashboard/assets/app.manifest.json +1 -0
  132. package/templates/dashboard/assets/css-src/00-foundation.css +342 -0
  133. package/templates/dashboard/assets/css-src/10-panels-flow.css +236 -0
  134. package/templates/dashboard/assets/css-src/20-briefs-controls.css +398 -0
  135. package/templates/dashboard/assets/css-src/30-task-index.css +739 -0
  136. package/templates/dashboard/assets/css-src/35-review-workspace.css +507 -0
  137. package/templates/dashboard/assets/css-src/40-detail-modules-migration.css +427 -0
  138. package/templates/dashboard/assets/css-src/50-responsive-overrides.css +551 -0
  139. package/templates/dashboard/assets/i18n.js +123 -21
  140. package/templates/ledger/Harness-Ledger.md +13 -25
  141. package/templates/lessons/lesson-arch-process-change.md +1 -1
  142. package/templates/lessons/lesson-new-doc.md +1 -1
  143. package/templates/lessons/lesson-ref-change.md +1 -1
  144. package/templates/planning/execution_strategy.md +31 -0
  145. package/templates/planning/lesson_candidates.md +18 -6
  146. package/templates/planning/optional/artifacts/INDEX.md +3 -3
  147. package/templates/planning/optional/references/INDEX.md +3 -3
  148. package/templates/planning/review.md +59 -0
  149. package/templates/planning/task_plan.md +36 -13
  150. package/templates/reference/execution-workflow-standard.md +4 -3
  151. package/templates/reference/pull-request-standard.md +80 -0
  152. package/templates/reference/repo-governance-standard.md +7 -6
  153. package/templates/reference/review-routing-standard.md +6 -0
  154. package/templates/reference/walkthrough-standard.md +2 -1
  155. package/templates/verifier/verifier-output.md +1 -1
  156. package/templates-zh-CN/AGENTS.md.template +20 -16
  157. package/templates-zh-CN/ledger/Harness-Ledger.md +17 -40
  158. package/templates-zh-CN/planning/execution_strategy.md +30 -0
  159. package/templates-zh-CN/planning/lesson_candidates.md +18 -6
  160. package/templates-zh-CN/planning/review.md +59 -1
  161. package/templates-zh-CN/planning/task_plan.md +30 -10
  162. package/templates-zh-CN/reference/adversarial-review-standard.md +1 -1
  163. package/templates-zh-CN/reference/docs-library-standard.md +1 -1
  164. package/templates-zh-CN/reference/execution-workflow-standard.md +4 -3
  165. package/templates-zh-CN/reference/harness-ledger-standard.md +2 -2
  166. package/templates-zh-CN/reference/pull-request-standard.md +106 -0
  167. package/templates-zh-CN/reference/repo-governance-standard.md +4 -3
  168. package/templates-zh-CN/reference/review-routing-standard.md +8 -1
  169. package/templates-zh-CN/reference/walkthrough-standard.md +3 -2
  170. package/templates-zh-CN/walkthrough/Closeout-SSoT.md +1 -1
  171. package/docs-release/assets/dashboard-overview-en.png +0 -0
  172. package/scripts/smoke-dashboard.mjs +0 -92
  173. package/scripts/test-harness.mjs +0 -1395
  174. package/templates/ssot/Feature-SSoT.md +0 -43
  175. package/templates/ssot/Lessons-SSoT.md +0 -44
  176. package/templates-zh-CN/ssot/Feature-SSoT.md +0 -49
  177. package/templates-zh-CN/ssot/Lessons-SSoT.md +0 -49
package/README.zh-CN.md CHANGED
@@ -4,22 +4,11 @@
4
4
 
5
5
  [English](README.md) | 简体中文 | [日本語](docs-release/intl/ja-JP.md) | [한국어](docs-release/intl/ko-KR.md) | [Français](docs-release/intl/fr-FR.md) | [Español](docs-release/intl/es-ES.md) | [Deutsch](docs-release/intl/de-DE.md)
6
6
 
7
- AI 写代码不难。
7
+ ![Coding Agent Harness 架构图](docs-release/assets/harness-architecture.svg)
8
8
 
9
- 难的是一个任务跑到第五个小时以后,谁还记得上一个 Agent 为什么这么改、哪些风险没处理、哪些证据是真的。
9
+ > 开源、文档驱动、开箱即用的 Agent Harness。让 Codex、Claude Code、Gemini CLI 等 Coding Agent 在长程开发中保持上下文清晰、过程透明、结果可审查。
10
10
 
11
- Coding Agent Harness 做的事很朴素:把这些东西放回仓库里,再用一个 Dashboard 展示出来。
12
-
13
- ![Coding Agent Harness Dashboard 总览](docs-release/assets/dashboard-overview-en.png)
14
-
15
- ## 先看它怎么玩
16
-
17
- | 步骤 | 人看到什么 | Agent / CLI 做什么 |
18
- | --- | --- | --- |
19
- | 1. 安装入口 | 把 Harness 入口发给 Agent | `npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness` |
20
- | 2. 初始化或迁移 | Agent 先诊断仓库,再给计划 | `init` / `migrate-plan` |
21
- | 3. 打开 Dashboard | 看任务、风险、审查和证据 | `npx --yes coding-agent-harness dev .` |
22
- | 4. 交付前检查 | 用检查结果证明状态 | `check --profile target-project` |
11
+ ![Coding Agent Harness Dashboard](docs-release/assets/dashboard-overview.png)
23
12
 
24
13
  ## 一眼看懂
25
14
 
@@ -32,6 +21,8 @@ Coding Agent Harness 不是另一个聊天提示词集合。它把 Agent 长程
32
21
  - CLI 和 Dashboard 把状态、风险、迁移计划和审查证据暴露出来。
33
22
  - 下一个 Agent 不靠上一轮聊天记忆,而是从仓库事实继续。
34
23
 
24
+ ![Harness 执行流程](docs-release/assets/harness-workflow.svg)
25
+
35
26
  ## 这是什么
36
27
 
37
28
  Coding Agent Harness 是一套给 AI Coding Agent 使用的项目工程框架。
@@ -92,15 +83,22 @@ Coding Agent Harness 适合:
92
83
 
93
84
  ## 快速开始
94
85
 
95
- ### 安装 Skill
86
+ ### 安装 Skills
96
87
 
97
- 如果你的 Agent 支持 Skills,用 `npx` 安装本 Skill
88
+ 如果你的 Agent 支持 Skills,可以用 `npx` 查看本仓库提供的 Skill。因为本仓库既有根
89
+ Skill,也有嵌套 Skill;要看到或安装 `preset-creator`,需要加 `--full-depth`:
98
90
 
99
91
  ```bash
100
- npx skills add FairladyZ625/coding-agent-harness --list
92
+ npx skills add FairladyZ625/coding-agent-harness --list --full-depth
101
93
  npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
94
+ npx skills add FairladyZ625/coding-agent-harness --skill preset-creator --full-depth
102
95
  ```
103
96
 
97
+ 两个 Skill 的用途不同:
98
+
99
+ - `coding-agent-harness`:用于在目标项目中安装、迁移、运行和审查 Harness。
100
+ - `preset-creator`:用于给一组重复任务制作可复用 Harness Preset。适合这些任务共享同一套方法、外部 Reference、Artifact、Evidence 要求,或需要在 Complex Task 骨架上叠加 Preset。这个 Skill 自带 Complex Task 骨架参考,所以 Agent 不需要预先理解 Harness 内部结构,也能做出正确的 Preset。
101
+
104
102
  安装到 Codex 全局 Skill 目录:
105
103
 
106
104
  ```bash
@@ -111,6 +109,17 @@ npx skills add FairladyZ625/coding-agent-harness \
111
109
  -y
112
110
  ```
113
111
 
112
+ 安装 Preset Creator Skill:
113
+
114
+ ```bash
115
+ npx skills add FairladyZ625/coding-agent-harness \
116
+ --skill preset-creator \
117
+ --full-depth \
118
+ --agent codex \
119
+ --global \
120
+ -y
121
+ ```
122
+
114
123
  CLI 不会自动写进目标项目依赖。需要运行 Harness 命令时,用 `npx` 即可;第一次执行会从 npm 拉取包到本机 npm 缓存,不会写入目标项目:
115
124
 
116
125
  ```bash
@@ -126,6 +135,11 @@ npm install -g coding-agent-harness
126
135
  harness --help
127
136
  ```
128
137
 
138
+ npm 安装会把内置 Preset seed 到 `~/.coding-agent-harness/presets/`。
139
+ `harness init` 也会把这些 Preset seed 到目标项目的
140
+ `.coding-agent-harness/presets/`,所以 Agent 可以用
141
+ `harness preset list --json` 发现稳定的任务方法。
142
+
129
143
  Agent 不应静默执行全局安装。只有用户明确同意修改全局 npm 环境后,Agent 才能运行 `npm install -g coding-agent-harness`;否则继续使用 `npx --yes coding-agent-harness ...`。
130
144
 
131
145
  ### 人看的常用命令
@@ -164,9 +178,6 @@ npx --yes coding-agent-harness check --profile target-project .
164
178
 
165
179
  npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
166
180
 
167
- 注意:这一步会在目标仓写入 .agents/skills/coding-agent-harness/ 和 skills-lock.json。
168
- 如果本轮只允许零写入扫描,请先跳过本步,直接使用 npx --yes coding-agent-harness ... 扫描;获准写入后再安装 Skill。
169
-
170
181
  先检查当前环境是否有 harness 命令。
171
182
 
172
183
  如果没有,不要静默全局安装。请先问我:
@@ -176,10 +187,10 @@ npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
176
187
 
177
188
  只有我明确同意后,才运行:
178
189
  npm install -g coding-agent-harness
190
+ harness preset list --json
179
191
 
180
192
  如果我不同意或没有回复,后续 CLI 都用:
181
193
  npx --yes coding-agent-harness <command>
182
- 这是“全局 npm 安装确认”,和后面的“初始化计划确认”是两个不同确认点。
183
194
 
184
195
  在当前项目上搭建 Coding Agent Harness。
185
196
  默认使用中文模板;如果项目明确是英文团队或英文文档,请先询问我是否改用英文。
@@ -188,9 +199,9 @@ npx --yes coding-agent-harness <command>
188
199
  如果项目是微服务、多仓、前后端分仓,或依赖外部系统,请主动询问我是否有外部架构文档、接口文档、流程图、会议纪要、链接或导出包。
189
200
  外部资料很多时,请先建立 external-source-packs 索引和摘要,再把稳定结论投影到 03-ARCHITECTURE / 04-DEVELOPMENT / 06-INTEGRATIONS。
190
201
  确认后,按照 Diagnose → Decide → Scaffold → Configure → Verify → Deliver 六阶段执行。
191
- 这里的确认是“初始化计划确认”;如果我已经在本消息里明确要求直接搭建,可视为已确认。
192
202
  执行初始化时使用:
193
203
  npx --yes coding-agent-harness init --locale zh-CN --capabilities core,dashboard .
204
+ npx --yes coding-agent-harness preset list --json .
194
205
 
195
206
  初始化完成后,日常查看和人工确认使用动态网页:
196
207
  npx --yes coding-agent-harness dev .
@@ -209,9 +220,6 @@ npx --yes coding-agent-harness dashboard --out-dir tmp/harness-dashboard .
209
220
 
210
221
  npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
211
222
 
212
- 注意:这一步会在目标仓写入 .agents/skills/coding-agent-harness/ 和 skills-lock.json。
213
- 如果本轮只允许零写入扫描,请先跳过本步,直接使用 npx --yes coding-agent-harness ... 扫描;获准写入后再安装 Skill。
214
-
215
223
  先检查当前环境是否有 harness 命令。
216
224
 
217
225
  如果没有,不要静默全局安装。请先问我:
@@ -221,12 +229,12 @@ npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
221
229
 
222
230
  只有我明确同意后,才运行:
223
231
  npm install -g coding-agent-harness
232
+ harness preset list --json
224
233
 
225
234
  如果我不同意或没有回复,后续 CLI 都用:
226
235
  npx --yes coding-agent-harness <command>
227
- 这是“全局 npm 安装确认”,和后面的“迁移计划确认”是两个不同确认点。
228
236
 
229
- 这个项目已有旧版 Harness。除上面 Skill 安装可能产生的 .agents/skills/coding-agent-harness/ 和 skills-lock.json 外,先不要改业务文件或 Harness 文件。
237
+ 这个项目已有旧版 Harness。先不要改文件。
230
238
 
231
239
  请先执行详尽扫描,并给我一个迁移计划:
232
240
  1. 检查当前 git 状态、Harness 状态、任务数量、brief 覆盖、visual_map 覆盖、warning/action/residual、strict 状态和 dashboard 可用性。
@@ -237,24 +245,36 @@ npx --yes coding-agent-harness <command>
237
245
  - full-semantic-rewrite:全量重写任务的 brief / execution_strategy / visual_map,让旧项目整体变成 v1.0 可读项目。
238
246
  4. 给出推荐模式、原因、预计改动范围、预计 token/时间成本、风险和是否需要 subagent。
239
247
  5. 向我提出需要确认的问题,等我确认后再开始写文件。
240
- 这里的确认是“迁移计划确认”,不是全局 npm 安装确认。
241
248
 
242
249
  扫描阶段至少运行:
243
250
  npx --yes coding-agent-harness status --json .
244
251
  npx --yes coding-agent-harness migrate-plan --json --limit 1000 .
245
252
 
246
- 确认执行迁移后,先生成并验证 baseline session,再创建 Complex Task preset:
247
- npx --yes coding-agent-harness migrate-run --locale zh-CN --session-dir /tmp/cah-migration-project --out-dir /tmp/cah-migration-project/dashboard .
248
- npx --yes coding-agent-harness migrate-verify /tmp/cah-migration-project/session.json
249
- npx --yes coding-agent-harness new-task --budget complex --preset legacy-migration --from-session /tmp/cah-migration-project/session.json
253
+ 最终迁移完成时,必须给出动态 workbench 入口或静态 dashboard HTML、session.json、normal/strict check、migrate-plan summary,以及 full-cutover 验证是否通过。需要人工确认审查时,必须通过本地网页 workbench 暴露确认操作;静态 dashboard 只作为只读证据快照。
254
+ ```
250
255
 
251
- 这个 preset 只创建任务骨架和证据包,不会继续迁移、改写历史、stage 或 commit。后续迁移工作必须在这个 Complex Task 里推进。
256
+ ## 参与贡献
252
257
 
253
- 最终迁移完成时,必须给出动态 workbench 入口或静态 dashboard HTMLsession.json、normal/strict check、migrate-plan summary,以及 full-cutover 验证是否通过。需要人工确认审查时,必须通过本地网页 workbench 暴露确认操作;静态 dashboard 只作为只读证据快照。
258
+ 外部贡献者请先阅读 [`CONTRIBUTING.md`](CONTRIBUTING.md)。它说明仓库结构、PR 要求、根包检查、Dashboard smoke testnpm package dry run GUI 子模块验证。中文详细流程见 [`docs-release/guides/contributing.zh-CN.md`](docs-release/guides/contributing.zh-CN.md)。
259
+
260
+ 如果你想让自己的 Coding Agent 帮你改这个仓库,可以把下面这段发给它:
261
+
262
+ ```text
263
+ 我想给 FairladyZ625/coding-agent-harness 贡献一个聚焦改动。
264
+
265
+ 请从最新 main 分支开始,新建一个 feature branch。先阅读 README.md 和 CONTRIBUTING.md。改文件前,先检查相关代码/文档,并给我一个简短计划。
266
+
267
+ 改动要保持聚焦。只使用公开仓库文件;不要依赖维护者本地状态、隐藏工作流、凭据、生成的 Dashboard、临时文件或被 ignore 的本地专用文件。
268
+
269
+ 根据改动范围运行检查。仅文档改动至少运行 git diff --check。根包相关改动按需运行 npm install、npm test、npm run smoke:dashboard、npm run check、node scripts/harness.mjs check --profile target-project examples/minimal-project、npm run pack:dry-run 和 git diff --check。如果改到 harness-gui,还要运行 cd harness-gui && npm ci && npm run typecheck && npm test && npm run build。
270
+
271
+ 完成后,请总结改了什么,列出验证结果,说明任何未运行检查及原因,并按仓库 PR 模板准备 PR。
254
272
  ```
255
273
 
256
274
  ## 了解更多
257
275
 
276
+ - 贡献者指南:[`CONTRIBUTING.md`](CONTRIBUTING.md)
277
+ - 中文贡献者详细指南:[`docs-release/guides/contributing.zh-CN.md`](docs-release/guides/contributing.zh-CN.md)
258
278
  - Agent 安装指南:[`docs-release/guides/agent-installation.md`](docs-release/guides/agent-installation.md)
259
279
  - 新项目安装冒烟:[`examples/minimal-project/`](examples/minimal-project/)
260
280
  - 旧项目迁移指南:[`docs-release/guides/migration-playbook.md`](docs-release/guides/migration-playbook.md)
package/SKILL.md CHANGED
@@ -5,7 +5,7 @@ description: >
5
5
  做长程项目开发的团队,在用户的项目上构建一套完整的 harness 工程体系。
6
6
  包括:项目诊断、AGENTS.md + CLAUDE.md 入口文件生成、docs/ 目录搭建、Planning Loop、SSoT 治理、
7
7
  Delivery Operating Model、Repository Governance、CI/CD、Long-Running Task Protocol、Adversarial Review Report、Review Routing、Worktree 并行开发、
8
- Regression SSoT 与 Evidence Depth 分级回归、Walkthrough / Closeout SSoT 收口、Cadence Ledger、经验沉淀回流(Lessons SSoT)、
8
+ Regression SSoT 与 Evidence Depth 分级回归、Walkthrough / Closeout SSoT 收口、Cadence Ledger、任务本地 lesson 候选与 promoted lesson 详情文档、
9
9
  Harness Ledger 全局上下文回写总账。
10
10
  当用户要求设置 coding agent 的开发流程、建立回归测试体系、设计 AGENTS.md / CLAUDE.md、
11
11
  规划长程 agent 任务的执行框架、子代理审查循环、对抗性 review 报告、搭建 harness、或者提到 harness engineering 时,使用此技能。
@@ -42,12 +42,13 @@ coding-agent-harness",不要重新 bootstrap 覆盖整个项目。先执行增
42
42
  2. 扫描目标项目现有 `AGENTS.md`、`CLAUDE.md`、`docs/` 和 SSoT / Ledger 文件。
43
43
  3. 输出 delta plan:哪些 harness 骨架、reference、template、SSoT、Ledger 项缺失或过期。
44
44
  4. 只补齐新增标准和缺失结构;不得用模板覆盖已有业务事实、历史 walkthrough、
45
- task progress、Feature SSoT、Regression SSoT 或 Lessons SSoT
45
+ task progress、generated ledger、Regression SSoT 或 lesson detail docs
46
46
  5. 对已有文档采用 merge / append / residual-with-reason;只有全新缺失文件才从模板创建。
47
- 6. 如果引入 Lessons SSoT、Harness Ledger 或新的 reference/template,同步更新入口索引。
47
+ 6. 如果引入 Harness Ledger、lesson detail docs 或新的 reference/template,同步更新入口索引。
48
48
  7. 收口时写 walkthrough,必须包含 Lessons Reflection;新任务先写并审查
49
- `lesson_candidates.md`。如人工标记值得沉淀,维护命令再写
50
- `docs/01-GOVERNANCE/lessons/` 详情文档和 Lessons SSoT;最后在
49
+ `lesson_candidates.md`。如人工标记值得沉淀,默认先用 dry-run 或后续
50
+ lesson sedimentation 任务完成分类、冲突检查和建议 diff;只有人工明确批准后,
51
+ 维护命令才写 `docs/01-GOVERNANCE/lessons/` 详情文档;最后在
51
52
  `docs/Harness-Ledger.md` 与 `docs/10-WALKTHROUGH/Closeout-SSoT.md` 记录本次 harness update 的 delta 和 Lessons Check。
52
53
 
53
54
  一句话:harness update 是 delta merge,不是重新搭一遍。
@@ -156,7 +157,9 @@ harness task-start <task-id> --message "<what started>" /path/to/project
156
157
  harness task-log <task-id> --message "<what changed>" --evidence "command:TARGET:path:summary" /path/to/project
157
158
  harness task-block <task-id> --message "<blocker>" /path/to/project
158
159
  harness task-review <task-id> --message "<ready for review>" /path/to/project
160
+ harness review-confirm <task-id> --message "<human confirmation>" /path/to/project
159
161
  harness task-complete <task-id> --message "<closeout>" /path/to/project
162
+ harness lesson-promote <task-id> <candidate-id> --dry-run /path/to/project
160
163
  harness task-list --json /path/to/project
161
164
  ```
162
165
 
@@ -166,7 +169,14 @@ harness task-list --json /path/to/project
166
169
  - 已存在任务不会被覆盖;旧项目迁移时先 `task-list --json`,再决定复用旧任务还是开新任务。
167
170
  - 状态推进只写 `progress.md`,不得重写历史 `task_plan.md`。
168
171
  - `simple` 任务可以直接 `in_progress -> done`;`standard` / `complex` 必须 `in_progress -> review -> done`,不能跳过 `task-review`。
169
- - `review-confirm` 只确认人工 review evidence / findings,不代表 closeout;closeout 仍走 walkthrough / Closeout SSoT。
172
+ - `task-review` 只表示 Agent Review Submission:agent/coordinator 认为材料包已准备好并提交待审。它不是人工确认。
173
+ - `review-confirm` 是唯一的 Human Review Confirmation 门禁。它只确认人工 review evidence / findings,不代表 closeout;closeout 仍走 walkthrough / Closeout SSoT。
174
+ - Review queue 只收录已提交 review packet、材料齐全、无 blocker、等待人工确认的任务。
175
+ - 缺文件、缺章节、缺证据、缺 lesson decision 或未执行 `task-review` 的任务进入 Missing Materials 队列,不进入 Review queue。
176
+ - open blocking finding、状态矛盾、审计失败或需要 human waiver 的任务进入 Blocked 队列,不进入 Review queue。
177
+ - 已 Human Review Confirmation 但 closeout / ledger / lesson routing 未完成的任务属于 Confirmed / Finalized 队列,不应显示成“仍在审查”。
178
+ - lesson candidate 进入 Lessons 队列后,默认先 dry-run 或创建后续沉淀任务;不要在 Dashboard 或普通 closeout 中直接写共享 Lessons 表。
179
+ - soft delete / supersede / archive 是只读可追溯生命周期,默认不 hard delete 任务目录;保留 tombstone、替代任务、原因和审计记录。
170
180
  - 证据必须进入 `task-log` 或 `progress.md`,并继续遵守 `type:PATH:summary` 格式。
171
181
 
172
182
  ### Phase 5: Verify / 验证
@@ -240,7 +250,6 @@ harness bootstrap 完成后,项目中至少应存在以下文件:
240
250
  - [ ] `docs/05-TEST-QA/Cadence-Ledger.md`
241
251
  - [ ] `docs/10-WALKTHROUGH/_walkthrough-template.md`
242
252
  - [ ] `docs/10-WALKTHROUGH/Closeout-SSoT.md`
243
- - [ ] `docs/01-GOVERNANCE/Lessons-SSoT.md`
244
253
  - [ ] `docs/01-GOVERNANCE/lessons/`(空目录 + .gitkeep)
245
254
  - [ ] `docs/01-GOVERNANCE/_archive/`(空目录 + .gitkeep)
246
255
  - [ ] `docs/Harness-Ledger.md`
@@ -256,7 +265,6 @@ harness bootstrap 完成后,项目中至少应存在以下文件:
256
265
  - [ ] 如启用模块并行:每个 active module 有 `docs/09-PLANNING/MODULES/<key>/module_plan.md`
257
266
  - [ ] 如启用模块并行:模块 task template / shared lock / dependency readiness 规则已落地
258
267
  - [ ] Harness checker 已通过,或 residual 写明 owner/action/status
259
- - [ ] Feature SSoT 文件(位置由项目决定)
260
268
  - [ ] Bootstrap Summary 已输出给用户
261
269
 
262
270
  ---
@@ -269,17 +277,17 @@ harness 搭建完成后,每个 feature 从想法到代码的标准流程:
269
277
  2. **Planning with Files** — 建任务目录,task plan / findings / progress / review 文件
270
278
  3. **Long-Running Contract(如适用)** — 明确连续执行权限、review loop、evidence、stop condition
271
279
  4. **Delivery Operating Model** — 确认本轮属于 solo / team / split-repo / program / stage-gate / kanban 哪种交付形态
272
- 5. **SSoT 排期** 回写到 Feature SSoT;模块并行时 worker 回写 module_plan + Coordinator Handoff,coordinator pass 回写 Module Registry / Harness Ledger;多人/多仓时回写 Delivery SSoT
280
+ 5. **任务生命周期事实**更新任务本地事实文件;任务生命周期总表由 CLI 生成。模块并行时 worker 回写 module_plan + Coordinator Handoff,coordinator pass 回写 Module Registry;多人/多仓时维护 Delivery SSoT
273
281
  6. **Repo Governance / CI-CD** — 确认 PR policy、required checks、branch protection、worktree concurrency
274
282
  7. **Worktree / Branch 并行开发** — 按 operating model 决定 worktree、feature branch、contract branch 或 release branch
275
283
  8. **Subagent Worker Handoff(如适用)** — coordinator 分配独立 worktree / branch / write scope;worker 提交自己的 commit 并 handoff commit SHA / checks / residuals
276
- 9. **Adversarial Review Report(如适用)** — 在任务目录写 `review.md`,记录 material findings / no-finding / residual risk
277
- 10. **Review Routing** — planned task 收口前自动触发 subagent / reviewer 审查,或记录 skip reason
284
+ 9. **Adversarial Review Report(如适用)** — 在任务目录写 `review.md`,记录 Agent Review Submission、material findings / no-finding / residual risk;这一步只表示提交待审,不等于人工批准
285
+ 10. **Review Routing** — planned task 收口前自动触发 subagent / reviewer 审查,或记录 skip reason;Review queue 只等待 Human Review Confirmation,缺材料和 blocker 分别进入 Missing Materials / Blocked 队列
278
286
  11. **Merge + 自动回归** — Cadence Ledger 触发对应回归面;coordinator 只集成 worker commit,不混合多个 worker 的未提交改动
279
287
  12. **Walkthrough 收口** — 写收口记录并引用 review report
280
288
  13. **Closeout SSoT 回写** — 每个 closed 任务必须记录 walkthrough 路径或受控 skip reason
281
- 14. **Lessons Reflection** — 写 walkthrough 时主动反思共性/反复问题;新任务用 `lesson_candidates.md` 承载人工判定,`queued-promotion` 进入维护队列,`checked-created` 必须有详情文档和 SSoT 表行,旧任务兼容的 `checked-none` 必须写明原因
282
- 15. **Harness Ledger 回写**记录本轮上下文维护是否完成
289
+ 14. **Lessons Reflection** — 写 walkthrough 时主动反思共性/反复问题;新任务用 `lesson_candidates.md` 承载人工判定,`queued-promotion` 进入 Lessons 队列;默认先 dry-run 或创建沉淀任务,不直接写共享 Lessons 表;`checked-created` 必须有 promoted lesson 详情文档,旧任务兼容的 `checked-none` 必须写明原因
290
+ 15. **Generated Ledger 刷新**由 lifecycle CLI 或 `harness governance rebuild` 生成任务生命周期总索引
283
291
  16. **Worktree 清理** — 删除已 merge 的 worktree
284
292
 
285
293
  ---
@@ -302,9 +310,9 @@ harness 搭建完成后,每个 feature 从想法到代码的标准流程:
302
310
  | Long-Running Task | `references/long-running-task-standard.md` | 任务需要连续执行、长上下文或 stop condition 时 |
303
311
  | Adversarial Review | `references/adversarial-review-standard.md` | 需要独立审查报告、信心挑战或 material finding 分级时 |
304
312
  | Review Routing | `references/review-routing-standard.md` | 决定 self-review、subagent、外部 reviewer 或人工审查时 |
305
- | SSoT 治理 | `references/ssot-governance.md` | 维护 Feature / Delivery / Regression / Lessons 等当前事实时 |
313
+ | SSoT 治理 | `references/ssot-governance.md` | 维护 Delivery / Regression 等非任务生命周期事实时 |
306
314
  | 经验沉淀 | `references/lessons-governance.md` | walkthrough 收口后判断是否沉淀 lesson 时 |
307
- | Harness Ledger | `references/harness-ledger.md` | 记录本轮 harness 上下文维护、证据和 residual |
315
+ | Harness Ledger | `references/harness-ledger.md` | 理解 generated task lifecycle ledger 与非任务治理表边界时 |
308
316
  | Regression | `references/regression-system.md` | 设计或更新回归面、evidence depth 和 gate 时 |
309
317
  | Cadence Ledger | `references/cadence-ledger.md` | 根据改动类型触发回归批次时 |
310
318
  | Walkthrough | `references/walkthrough-closeout.md` | 收口、Closeout SSoT 和交付说明时 |
@@ -316,11 +324,9 @@ harness 搭建完成后,每个 feature 从想法到代码的标准流程:
316
324
  |------|------|------|
317
325
  | AGENTS.md | `templates/AGENTS.md.template` | 目标项目 agent 入口:宪章 + 阅读矩阵 |
318
326
  | CLAUDE.md | `templates/CLAUDE.md.template` | Claude Code 兼容 shim,指向 AGENTS.md |
319
- | Feature SSoT | `templates/ssot/Feature-SSoT.md` | 功能、wave、当前实施状态 |
320
327
  | Regression SSoT | `templates/ssot/Regression-SSoT.md` | 回归面、证据深度、gate 状态 |
321
- | Lessons SSoT | `templates/ssot/Lessons-SSoT.md` | 经验沉淀候选、审批和归档 |
322
328
  | Delivery SSoT | `templates/ssot/Delivery-SSoT.md` | 多人、多仓、阶段性交付计划 |
323
- | Harness Ledger | `templates/ledger/Harness-Ledger.md` | 全局 harness 上下文维护总账 |
329
+ | Harness Ledger | `templates/ledger/Harness-Ledger.md` | CLI 生成的任务生命周期总索引 |
324
330
  | Lesson (ref-change) | `templates/lessons/lesson-ref-change.md` | Walkthrough 收口后 |
325
331
  | Lesson (new-doc) | `templates/lessons/lesson-new-doc.md` | Walkthrough 收口后 |
326
332
  | Lesson (arch/process) | `templates/lessons/lesson-arch-process-change.md` | Walkthrough 收口后 |
@@ -337,6 +343,7 @@ harness 搭建完成后,每个 feature 从想法到代码的标准流程:
337
343
  | Execution Workflow | `templates/reference/execution-workflow-standard.md` | 执行、提交、PR 和证据记录 |
338
344
  | Delivery Operating Model Standard | `templates/reference/delivery-operating-model-standard.md` | 交付组织模型选择 |
339
345
  | Repository Governance Standard | `templates/reference/repo-governance-standard.md` | repo、分支、PR、worktree 规则 |
346
+ | Pull Request Standard | `templates/reference/pull-request-standard.md` | PR 描述、中英双语、版本影响、验证和引用 |
340
347
  | CI/CD Standard | `templates/reference/ci-cd-standard.md` | CI/CD、required checks、release residual |
341
348
  | Long-Running Task Standard | `templates/reference/long-running-task-standard.md` | 长程任务协议 |
342
349
  | Adversarial Review Standard | `templates/reference/adversarial-review-standard.md` | 对抗性审查协议 |
@@ -1,7 +1,7 @@
1
1
  # Coding Agent Harness Docs Release
2
2
 
3
3
  This directory is the public-facing documentation library for Coding Agent Harness.
4
- It is separate from this source repository's private self-hosted harness.
4
+ It is separate from maintainer-only operating records for this source repository.
5
5
 
6
6
  简体中文说明:这个目录只放可公开发布的方法论、架构和使用指南。它不记录本仓库自己的私有任务计划、审查草稿、ledger 或本地运行状态。
7
7
 
@@ -27,8 +27,8 @@ Public docs in this directory explain the product architecture, concepts, and re
27
27
  roadmap. They must not contain private task ledgers, local review drafts, internal
28
28
  handoffs, or user/project-specific operating state.
29
29
 
30
- Private operating state for this repository lives in `.harness-private/`, which is
31
- ignored by the open-source repository and versioned separately.
30
+ Maintainer-only operating state for this repository is kept outside the public
31
+ documentation tree and outside the public release package.
32
32
 
33
33
  ## How To Read This Library / 如何阅读
34
34
 
@@ -40,6 +40,8 @@ Not every document is written for the same reader.
40
40
  | --- | --- | --- |
41
41
  | Product / engineering leaders 产品和工程负责人 | `guides/repository-operating-models.md` / `guides/repository-operating-models.en-US.md` | Choose single-repo, independent multi-repo, or parent-control repository mode. 选择单仓、多仓独立或主控仓库模式。 |
42
42
  | Architects / tech leads 架构负责人 | `architecture/overview.md` / `architecture/overview.zh-CN.md` | Understand the product architecture and task lifecycle. 理解产品架构和任务生命周期。 |
43
+ | Review owners / maintainers 审查负责人和维护者 | `guides/task-state-machine.md` / `guides/task-state-machine.en-US.md` | Understand task state, review status, closeout, and review queue semantics. 理解任务状态、审查状态、收口和审查队列语义。 |
44
+ | External contributors 外部贡献者 | `../CONTRIBUTING.md`, `guides/contributing.md` / `guides/contributing.zh-CN.md` | Prepare a focused PR with the right local checks and CI expectations. 按正确的本地检查和 CI 预期提交聚焦 PR。 |
43
45
  | Teams adopting Harness 项目接入团队 | `guides/agent-installation.md` / `guides/agent-installation.en-US.md` | Install and operate the agent entrypoint in a target project. 在目标项目中安装和运行 Agent 入口。 |
44
46
  | Agents running a migration 执行迁移的 Agent | `guides/legacy-migration-agent-prompt.md` / `guides/legacy-migration-agent-prompt.zh-CN.md` | Follow an executable migration contract. 按可执行迁移合同工作。 |
45
47
  | Maintainers deciding what to publish 维护者 | `guides/document-audience-and-surfaces.md` / `guides/document-audience-and-surfaces.en-US.md` | Separate human docs, agent docs, and private operating state. 区分人读文档、Agent 执行文档和私有运行状态。 |
@@ -57,9 +59,11 @@ Not every document is written for the same reader.
57
59
 
58
60
  ### Methodology / 方法论
59
61
 
62
+ - `guides/contributing.md` / `guides/contributing.zh-CN.md` — public contributor workflow, local checks, PR expectations, and GUI submodule validation. 公开贡献者流程、本地检查、PR 要求和 GUI 子模块验证。
60
63
  - `guides/document-audience-and-surfaces.md` / `guides/document-audience-and-surfaces.en-US.md` — explains which docs are for humans, which docs are for agents, and which state must stay out of public release docs. 说明哪些文档给人看,哪些给 Agent 执行,以及哪些状态不能进入公开发布文档。
61
64
  - `guides/repository-operating-models.md` / `guides/repository-operating-models.en-US.md` — compares single-repo, independent multi-repo, and parent-control repository operating models. 对比单仓、多仓独立、主控仓库三种运行模式。
62
65
  - `guides/parent-control-repository-pattern.md` / `guides/parent-control-repository-pattern.en-US.md` — describes the control-plane pattern for products with many child repositories, services, SDKs, or upstream references. 解释多子仓库、多服务、SDK、上游参考仓库场景下的控制面模式。
66
+ - `guides/task-state-machine.md` / `guides/task-state-machine.en-US.md` — explains task state, derived lifecycle, review status, closeout, review queue buckets, and human confirmation flow. 解释任务状态、派生生命周期、审查状态、收口、审查队列分桶和人工确认流程。
63
67
 
64
68
  ### Adoption And Migration / 接入与迁移
65
69
 
@@ -86,7 +90,7 @@ The parent-control pattern is the recommended default when one product spans man
86
90
 
87
91
  Release roadmaps, staged plans, task execution strategy, final-check walkthroughs,
88
92
  and maintainer publishing notes are project operating state. Keep them in
89
- `.harness-private/`, not in this public documentation tree.
93
+ maintainer-only operating records, not in this public documentation tree.
90
94
 
91
95
  ## Release Rule
92
96
 
@@ -94,4 +98,4 @@ If a document tells users how the harness works, it belongs here or under
94
98
  `references/`.
95
99
 
96
100
  If a document records how this repository is being operated, reviewed, migrated, or
97
- closed out, it belongs in `.harness-private/`.
101
+ closed out, keep it outside the public documentation tree.
@@ -103,7 +103,7 @@ The target repository can be organized in three ways:
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,
106
- the parent-control model keeps the agent startup point, Feature SSoT, regression
106
+ the parent-control model keeps the agent startup point, generated task lifecycle Ledger, regression
107
107
  state, and closeout evidence in one place. See
108
108
  `docs-release/guides/repository-operating-models.en-US.md` and
109
109
  `docs-release/guides/parent-control-repository-pattern.en-US.md`.
@@ -173,19 +173,23 @@ stateDiagram-v2
173
173
  closed --> [*]
174
174
  ```
175
175
 
176
- The scanner keeps raw task state and derived lifecycle state separate:
176
+ The scanner keeps raw task state, review status, closeout status, and derived
177
+ lifecycle state separate:
177
178
 
178
- | Raw task state | Derived lifecycle meaning |
179
+ | Raw task state / evidence | Derived lifecycle meaning |
179
180
  | --- | --- |
180
181
  | `not_started` / `planned` | `ready` |
181
182
  | `in_progress` | `active` |
182
183
  | `blocked` | `blocked` |
183
- | `review` with open blocking findings | `review-blocked` |
184
+ | `reviewStatus = blocked-open-findings` | `review-blocked` |
184
185
  | `review` without blocking findings | `in_review` |
185
186
  | `done` without closeout | `closing` |
186
- | any state with closed closeout evidence | `closed` |
187
+ | `closeoutStatus = closed` and missing human confirmation | `closed-review-pending` |
188
+ | `closeoutStatus = closed` and `reviewStatus = confirmed` | `closed` |
187
189
 
188
190
  This prevents a task from looking finished just because one file says `done`.
191
+ See `docs-release/guides/task-state-machine.en-US.md` for the full state and
192
+ review queue matrix.
189
193
 
190
194
  ## Review And Closeout Gate
191
195
 
@@ -216,6 +220,14 @@ flowchart TB
216
220
  Standard and complex tasks must show progress, evidence, lesson resolution,
217
221
  review confirmation, and closeout linkage before they are treated as closed.
218
222
 
223
+ The Review queue is only for submitted review packets that are ready for human
224
+ confirmation. Tasks with missing packets, incomplete evidence, lesson-routing
225
+ work, blocking findings, or historical closeout debt are routed to separate
226
+ lifecycle queues: Missing Materials, Blocked, Lessons, Confirmed / Finalized,
227
+ and Soft-deleted / Superseded. Agent-authored submissions can request review,
228
+ but only a strict `Human Review Confirmation` block marks the task as
229
+ `confirmed`.
230
+
219
231
  ## Migration Rails
220
232
 
221
233
  ```mermaid
@@ -93,7 +93,7 @@ flowchart TB
93
93
  | 多仓独立模式 | 每个仓库都有自己的局部 `AGENTS.md` 和 `docs/`。 | 每个仓库独立执行。 |
94
94
  | 主控仓库模式 | 父仓库管理全局 Harness 控制面。 | 子仓库管理实现代码和局部检查。 |
95
95
 
96
- 如果一个产品拆成前端、后端、SDK、微服务和上游参考仓库,主控仓库模式可以把 Agent 启动入口、Feature SSoT、回归状态和收口证据固定在一个地方。详见 `docs-release/guides/repository-operating-models.md` 和 `docs-release/guides/parent-control-repository-pattern.md`。
96
+ 如果一个产品拆成前端、后端、SDK、微服务和上游参考仓库,主控仓库模式可以把 Agent 启动入口、生成的任务生命周期 Ledger、回归状态和收口证据固定在一个地方。详见 `docs-release/guides/repository-operating-models.md` 和 `docs-release/guides/parent-control-repository-pattern.md`。
97
97
 
98
98
  ## CLI 命令面
99
99
 
@@ -158,19 +158,21 @@ stateDiagram-v2
158
158
  closed --> [*]
159
159
  ```
160
160
 
161
- 扫描器会区分原始任务状态和派生生命周期状态:
161
+ 扫描器会区分原始任务状态、审查状态、收口状态和派生生命周期状态:
162
162
 
163
- | 原始任务状态 | 派生生命周期含义 |
163
+ | 原始任务状态 / 证据 | 派生生命周期含义 |
164
164
  | --- | --- |
165
165
  | `not_started` / `planned` | `ready` |
166
166
  | `in_progress` | `active` |
167
167
  | `blocked` | `blocked` |
168
- | `review` 且存在阻塞 finding | `review-blocked` |
168
+ | `reviewStatus = blocked-open-findings` | `review-blocked` |
169
169
  | `review` 且无阻塞 finding | `in_review` |
170
170
  | `done` 但缺少 closeout | `closing` |
171
- | 任意状态且已有 closed closeout 证据 | `closed` |
171
+ | `closeoutStatus = closed` 且缺少人工确认 | `closed-review-pending` |
172
+ | `closeoutStatus = closed` 且 `reviewStatus = confirmed` | `closed` |
172
173
 
173
174
  这样可以避免一个文件里写了 `done`,任务就被误认为真正完成。
175
+ 完整状态机和审查队列矩阵见 `docs-release/guides/task-state-machine.md`。
174
176
 
175
177
  ## Review 与 Closeout 门禁
176
178
 
@@ -200,6 +202,8 @@ flowchart TB
200
202
 
201
203
  standard 和 complex 任务必须具备进度、证据、lesson 决议、人工确认和收口链接,才会被视为真正关闭。
202
204
 
205
+ Review 队列只展示已经提交审查材料包、并且可以等待人工确认的任务。缺少审查提交、证据不完整、仍有 Lesson 路由、存在阻塞发现,或历史收口债务的任务,会进入独立的生命周期队列:Missing Materials、Blocked、Lessons、Confirmed / Finalized、Soft-deleted / Superseded。Agent 写入的提交只能请求审查;只有严格的 `Human Review Confirmation` 块存在时,任务才是 `confirmed`。
206
+
203
207
  ## 迁移轨道
204
208
 
205
209
  ```mermaid
@@ -19,6 +19,19 @@ read-only scan, skip Skill installation first and use `npx --yes coding-agent-ha
19
19
  / `migrate-plan` for the scan; install the Skill or run write commands only after the user
20
20
  confirms write access.
21
21
 
22
+ This repository also publishes the nested `preset-creator` Skill for agents that author
23
+ reusable Harness preset packages. Since the repository has both a root `SKILL.md` and a
24
+ nested Skill, list or install it with `--full-depth`:
25
+
26
+ ```bash
27
+ npx skills add FairladyZ625/coding-agent-harness --list --full-depth
28
+ npx skills add FairladyZ625/coding-agent-harness --skill preset-creator --full-depth
29
+ ```
30
+
31
+ Use `coding-agent-harness` to operate Harness in a target project. Use `preset-creator`
32
+ only when the agent is designing a reusable preset for a repeatable task family with
33
+ shared references, artifacts, evidence, or complex-task overlays.
34
+
22
35
  Use the v1.0 six-phase flow:
23
36
 
24
37
  1. Diagnose: scan project structure, language, existing docs, CI, collaboration model, external dependencies, and risk surfaces.
@@ -109,6 +122,17 @@ harness install-user --agent codex --global
109
122
  harness doctor-user --agent codex
110
123
  ```
111
124
 
125
+ `npm install -g coding-agent-harness`, `harness install-user`, and `harness init`
126
+ seed bundled presets:
127
+
128
+ - User presets: `~/.coding-agent-harness/presets/<preset-id>/`
129
+ - Project presets: `<target>/.coding-agent-harness/presets/<preset-id>/`
130
+
131
+ Before initializing or taking over a task, agents must run
132
+ `harness preset list --json [target]` and choose `--preset` only after checking
133
+ the available presets. To repair missing bundled presets, run
134
+ `harness preset seed` or `harness preset seed --project <target>`.
135
+
112
136
  Supported agent targets:
113
137
 
114
138
  | Agent | User directory |
@@ -125,7 +149,7 @@ Safety rules:
125
149
  - Interactive confirmation is the default. Non-interactive runs must pass `--yes` or first use `--dry-run`.
126
150
  - Existing files are not overwritten by default; only missing files are added.
127
151
  - Use `--force` only for explicit forced updates.
128
- - `doctor-user` checks that `SKILL.md`, templates, references, CLI scripts, and this guide exist.
152
+ - `doctor-user` checks that `SKILL.md`, templates, references, bundled presets, CLI scripts, this guide, and the user-level preset seed exist.
129
153
 
130
154
  ## Legacy Harness Migration
131
155
 
@@ -140,11 +164,6 @@ harness migrate-run \
140
164
 
141
165
  harness migrate-verify \
142
166
  /tmp/cah-migration-project/session.json
143
-
144
- harness new-task \
145
- --budget complex \
146
- --preset legacy-migration \
147
- --from-session /tmp/cah-migration-project/session.json
148
167
  ```
149
168
 
150
169
  Rules:
@@ -155,8 +174,8 @@ Rules:
155
174
  - Existing project facts may be merged, appended, or recorded as residuals. They must not be replaced with generic templates.
156
175
  - Historical contract gaps become `adoption-needed` warnings in normal mode.
157
176
  - `--strict` must still fail on legacy checker failures or unresolved historical contract gaps.
177
+ - Archive old global tables and module indexes first, then regenerate them with `harness governance rebuild --archive --apply`; those tables are agent indexes, while humans should use the Dashboard for status.
158
178
  - `migrate-verify` must pass before the migration output is reported as usable, and the dashboard path must be HTML.
159
- - `new-task --preset legacy-migration --from-session` creates only the Complex Task scaffold and evidence bundle. It does not continue migration, rewrite history, stage files, or commit.
160
179
  - For detailed migration strategy, read `docs-release/guides/migration-playbook.md` or `docs-release/guides/migration-playbook.en-US.md`. If the user requires proof that the old project is fully migrated, also read `docs-release/guides/full-legacy-migration-subagent-strategy.md` or `docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md`.
161
180
 
162
181
  The agent must read `session.json` and `migrate-plan.json`, then migrate active tasks, current reviews, and truly adopted capabilities step by step. Subagent review must prove dashboard brief coverage, strict check, and final session all pass.
@@ -192,11 +211,15 @@ harness task-complete phase-2-lifecycle \
192
211
 
193
212
  Rules:
194
213
 
195
- - `new-task` creates `brief.md`, `task_plan.md`, `execution_strategy.md`, `visual_map.md`, `findings.md`, `progress.md`, and `review.md`.
214
+ - Do not manually copy task templates or create partial task folders. `harness check` enforces the file set created by `new-task`.
215
+ - `new-task --budget simple` creates `brief.md`, `task_plan.md`, `visual_map.md`, and `progress.md`.
216
+ - `new-task` defaults to `standard` and creates the simple files plus `execution_strategy.md`, `findings.md`, `lesson_candidates.md`, and `review.md`.
217
+ - `new-task --budget complex` creates the standard files plus `references/INDEX.md` and `artifacts/INDEX.md`.
196
218
  - Existing task directories are not overwritten. Renaming or continuing old tasks is a coordinator decision.
197
219
  - `task-start`, `task-block`, and `task-complete` only update lifecycle status and logs in `progress.md`.
198
220
  - `task-log` only appends execution records. Evidence uses `type:PATH:summary`, for example `command:TARGET:npm-test:passed`.
199
221
  - `review-confirm` appends a human review confirmation to `review.md` and a log entry to `progress.md`. It must reject open P0/P1/P2 findings marked `Open: yes` or `Blocks Release: yes`.
222
+ - CLI-owned lifecycle and lesson commands auto-commit allowlisted writes in a clean Git root. Dirty state appears in `status` / dashboard warnings and blocks those mechanical commits. Agent-owned manual edits still need proactive commits; deferred commits must record the no-commit reason, owner, and next step.
200
223
  - `status --json` keeps old `task.state` for compatibility and adds `lifecycleState`, `reviewStatus`, `closeoutStatus`, and `stateConflicts`. `done` means implementation finished; it does not mean `closed`.
201
224
  - For human operation, start the local HTML workbench with `harness dev /path/to/project`. It binds to `127.0.0.1`, chooses a port automatically, opens the browser, and refreshes when docs change. In headless or CI contexts, use `harness dev --no-open /path/to/project`.
202
225
  - The lower-level compatible entry point remains `harness dashboard --workbench --out-dir /tmp/harness-workbench /path/to/project`. Static dashboard files remain read-only and must not host human confirmation actions.