coding-agent-harness 1.0.2 → 1.0.5

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 (219) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/CONTRIBUTING.md +98 -0
  3. package/LICENSE +661 -21
  4. package/LICENSE-EXCEPTION.md +37 -0
  5. package/README.md +244 -87
  6. package/README.zh-CN.md +77 -35
  7. package/SKILL.md +32 -24
  8. package/docs-release/README.md +9 -5
  9. package/docs-release/architecture/overview.md +17 -5
  10. package/docs-release/architecture/overview.zh-CN.md +9 -5
  11. package/docs-release/architecture/system-explainer/01-system-overview.md +217 -0
  12. package/docs-release/architecture/system-explainer/02-module-dependency.md +257 -0
  13. package/docs-release/architecture/system-explainer/03-task-lifecycle.md +304 -0
  14. package/docs-release/architecture/system-explainer/04-check-and-governance.md +239 -0
  15. package/docs-release/architecture/system-explainer/05-data-flow.md +276 -0
  16. package/docs-release/architecture/system-explainer/06-preset-and-migration.md +303 -0
  17. package/docs-release/architecture/system-explainer/README.md +67 -0
  18. package/docs-release/architecture/system-explainer/en-US/01-system-overview.md +226 -0
  19. package/docs-release/architecture/system-explainer/en-US/02-module-dependency.md +263 -0
  20. package/docs-release/architecture/system-explainer/en-US/03-task-lifecycle.md +319 -0
  21. package/docs-release/architecture/system-explainer/en-US/04-check-and-governance.md +250 -0
  22. package/docs-release/architecture/system-explainer/en-US/05-data-flow.md +290 -0
  23. package/docs-release/architecture/system-explainer/en-US/06-preset-and-migration.md +323 -0
  24. package/docs-release/architecture/system-explainer/en-US/README.md +70 -0
  25. package/docs-release/assets/dashboard-overview.png +0 -0
  26. package/docs-release/guides/agent-installation.en-US.md +39 -15
  27. package/docs-release/guides/agent-installation.md +43 -16
  28. package/docs-release/guides/contributing.md +100 -0
  29. package/docs-release/guides/contributing.zh-CN.md +99 -0
  30. package/docs-release/guides/document-audience-and-surfaces.en-US.md +3 -2
  31. package/docs-release/guides/document-audience-and-surfaces.md +3 -2
  32. package/docs-release/guides/full-legacy-migration-subagent-strategy.md +2 -2
  33. package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +2 -2
  34. package/docs-release/guides/legacy-migration-agent-prompt.md +0 -11
  35. package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +0 -11
  36. package/docs-release/guides/migration-playbook.en-US.md +14 -15
  37. package/docs-release/guides/migration-playbook.md +14 -15
  38. package/docs-release/guides/parent-control-repository-pattern.en-US.md +7 -5
  39. package/docs-release/guides/parent-control-repository-pattern.md +7 -5
  40. package/docs-release/guides/preset-development.md +238 -0
  41. package/docs-release/guides/repository-operating-models.en-US.md +5 -4
  42. package/docs-release/guides/repository-operating-models.md +5 -4
  43. package/docs-release/guides/task-state-machine.en-US.md +224 -0
  44. package/docs-release/guides/task-state-machine.md +231 -0
  45. package/docs-release/intl/en-US.md +1 -1
  46. package/docs-release/intl/zh-CN.md +1 -1
  47. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/INDEX.md +60 -0
  48. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/findings.md +7 -0
  49. package/package.json +10 -4
  50. package/presets/legacy-migration/checks/preset-check.mjs +3 -0
  51. package/presets/legacy-migration/preset.yaml +134 -0
  52. package/presets/legacy-migration/scripts/plan-work-queue.mjs +4 -0
  53. package/presets/legacy-migration/scripts/scaffold-task-contracts.mjs +4 -0
  54. package/presets/legacy-migration/templates/execution_strategy.append.md +18 -0
  55. package/presets/legacy-migration/templates/findings.seed.md +17 -0
  56. package/presets/legacy-migration/templates/review.seed.md +12 -0
  57. package/presets/legacy-migration/templates/task_plan.append.md +9 -0
  58. package/presets/legacy-migration/templates/visual_map.append.md +12 -0
  59. package/presets/legacy-migration/workbench/dashboard-panels.yaml +2 -0
  60. package/presets/legacy-migration/workbench/migration-queue.schema.json +23 -0
  61. package/presets/lesson-sedimentation/preset.yaml +23 -0
  62. package/presets/lesson-sedimentation/templates/prompt.md +23 -0
  63. package/presets/module/preset.yaml +25 -0
  64. package/presets/module/templates/execution_strategy.append.md +8 -0
  65. package/presets/module/templates/task_plan.append.md +17 -0
  66. package/presets/standard-task/preset.yaml +31 -0
  67. package/presets/standard-task/templates/task_plan.append.md +7 -0
  68. package/references/adversarial-review-standard.md +2 -2
  69. package/references/agents-md-pattern.md +2 -2
  70. package/references/delivery-operating-model-standard.md +3 -3
  71. package/references/docs-directory-standard.md +6 -7
  72. package/references/harness-ledger.md +53 -96
  73. package/references/lessons-governance.md +88 -93
  74. package/references/module-parallel-standard.md +14 -14
  75. package/references/planning-loop.md +12 -6
  76. package/references/pull-request-standard.md +118 -0
  77. package/references/repo-governance-standard.md +11 -2
  78. package/references/review-routing-standard.md +7 -1
  79. package/references/ssot-governance.md +67 -59
  80. package/references/taskr-gap-analysis.md +600 -0
  81. package/references/walkthrough-closeout.md +7 -7
  82. package/scripts/check-harness.mjs +40 -301
  83. package/scripts/commands/dashboard-command.mjs +67 -0
  84. package/scripts/commands/migration-command.mjs +126 -0
  85. package/scripts/commands/preset-command.mjs +73 -0
  86. package/scripts/commands/task-command.mjs +328 -0
  87. package/scripts/harness.mjs +59 -260
  88. package/scripts/lib/capability-registry.mjs +82 -28
  89. package/scripts/lib/check-module-parallel.mjs +230 -0
  90. package/scripts/lib/check-profiles.mjs +90 -228
  91. package/scripts/lib/check-task-contracts.mjs +55 -0
  92. package/scripts/lib/core-shared.mjs +65 -2
  93. package/scripts/lib/dashboard-data.mjs +155 -24
  94. package/scripts/lib/dashboard-workbench.mjs +131 -12
  95. package/scripts/lib/dashboard-writer.mjs +20 -4
  96. package/scripts/lib/git-status-summary.mjs +46 -0
  97. package/scripts/lib/governance-index-generator.mjs +174 -0
  98. package/scripts/lib/governance-sync.mjs +611 -0
  99. package/scripts/lib/governance-table-boundary.mjs +175 -0
  100. package/scripts/lib/harness-core.mjs +6 -0
  101. package/scripts/lib/lesson-maintenance.mjs +36 -29
  102. package/scripts/lib/markdown-utils.mjs +33 -0
  103. package/scripts/lib/migration-planner.mjs +4 -6
  104. package/scripts/lib/migration-support.mjs +1 -1
  105. package/scripts/lib/phase-kind.mjs +50 -0
  106. package/scripts/lib/preset-audit-contracts.mjs +37 -0
  107. package/scripts/lib/preset-engine.mjs +494 -0
  108. package/scripts/lib/preset-registry.mjs +776 -0
  109. package/scripts/lib/preset-resource-contracts.mjs +83 -0
  110. package/scripts/lib/review-confirm-git-gate.mjs +248 -0
  111. package/scripts/lib/status-builder.mjs +88 -0
  112. package/scripts/lib/status-dashboard-renderer.mjs +105 -0
  113. package/scripts/lib/subagent-authorization-audit.mjs +196 -0
  114. package/scripts/lib/task-audit-metadata.mjs +385 -0
  115. package/scripts/lib/task-audit-migration.mjs +350 -0
  116. package/scripts/lib/task-completion-consistency.mjs +26 -0
  117. package/scripts/lib/task-index.mjs +93 -0
  118. package/scripts/lib/task-lesson-candidates.mjs +242 -0
  119. package/scripts/lib/task-lesson-sedimentation.mjs +326 -0
  120. package/scripts/lib/task-lifecycle/create-task-helpers.mjs +67 -0
  121. package/scripts/lib/task-lifecycle/phase-sync.mjs +88 -0
  122. package/scripts/lib/task-lifecycle/review-confirm.mjs +112 -0
  123. package/scripts/lib/task-lifecycle/review-gates.mjs +73 -0
  124. package/scripts/lib/task-lifecycle/review-submission.mjs +63 -0
  125. package/scripts/lib/task-lifecycle/scaffold-provenance.mjs +49 -0
  126. package/scripts/lib/task-lifecycle/template-files.mjs +53 -0
  127. package/scripts/lib/task-lifecycle/text-utils.mjs +24 -0
  128. package/scripts/lib/task-lifecycle.mjs +338 -477
  129. package/scripts/lib/task-metadata.mjs +118 -0
  130. package/scripts/lib/task-review-model.mjs +455 -0
  131. package/scripts/lib/task-scanner.mjs +193 -372
  132. package/scripts/lib/task-tombstone-commands.mjs +140 -0
  133. package/scripts/postinstall.mjs +14 -0
  134. package/skills/preset-creator/SKILL.md +179 -0
  135. package/skills/preset-creator/references/complex-task-skeleton/README.md +31 -0
  136. package/skills/preset-creator/references/complex-task-skeleton/artifacts/INDEX.md +12 -0
  137. package/skills/preset-creator/references/complex-task-skeleton/brief.md +43 -0
  138. package/skills/preset-creator/references/complex-task-skeleton/execution_strategy.md +71 -0
  139. package/skills/preset-creator/references/complex-task-skeleton/findings.md +24 -0
  140. package/skills/preset-creator/references/complex-task-skeleton/lesson_candidates.md +70 -0
  141. package/skills/preset-creator/references/complex-task-skeleton/long-running-task-contract.md +76 -0
  142. package/skills/preset-creator/references/complex-task-skeleton/progress.md +33 -0
  143. package/skills/preset-creator/references/complex-task-skeleton/references/INDEX.md +13 -0
  144. package/skills/preset-creator/references/complex-task-skeleton/review.md +107 -0
  145. package/skills/preset-creator/references/complex-task-skeleton/task_plan.md +111 -0
  146. package/skills/preset-creator/references/complex-task-skeleton/visual_map.md +50 -0
  147. package/skills/preset-creator/references/preset-package-skeleton.md +296 -0
  148. package/templates/AGENTS.md.template +24 -18
  149. package/templates/dashboard/assets/app-src/00-state.js +13 -0
  150. package/templates/dashboard/assets/app-src/10-router.js +5 -1
  151. package/templates/dashboard/assets/app-src/20-overview.js +18 -8
  152. package/templates/dashboard/assets/app-src/30-tasks.js +92 -246
  153. package/templates/dashboard/assets/app-src/35-task-detail.js +286 -0
  154. package/templates/dashboard/assets/app-src/45-review.js +241 -22
  155. package/templates/dashboard/assets/app-src/50-migration.js +24 -10
  156. package/templates/dashboard/assets/app-src/55-presets.js +375 -0
  157. package/templates/dashboard/assets/app-src/60-shared.js +3 -1
  158. package/templates/dashboard/assets/app-src/90-bindings.js +302 -29
  159. package/templates/dashboard/assets/app.css +1501 -376
  160. package/templates/dashboard/assets/app.css.manifest.json +10 -0
  161. package/templates/dashboard/assets/app.js +1240 -101
  162. package/templates/dashboard/assets/app.manifest.json +2 -0
  163. package/templates/dashboard/assets/css-src/00-foundation.css +346 -0
  164. package/templates/dashboard/assets/css-src/10-panels-flow.css +236 -0
  165. package/templates/dashboard/assets/css-src/20-briefs-controls.css +398 -0
  166. package/templates/dashboard/assets/css-src/30-task-index.css +739 -0
  167. package/templates/dashboard/assets/css-src/35-review-workspace.css +507 -0
  168. package/templates/dashboard/assets/css-src/40-detail-modules-migration.css +489 -0
  169. package/templates/dashboard/assets/css-src/45-presets.css +516 -0
  170. package/templates/dashboard/assets/css-src/50-responsive-overrides.css +551 -0
  171. package/templates/dashboard/assets/i18n.js +263 -23
  172. package/templates/ledger/Harness-Ledger.md +13 -25
  173. package/templates/lessons/lesson-arch-process-change.md +1 -1
  174. package/templates/lessons/lesson-new-doc.md +1 -1
  175. package/templates/lessons/lesson-ref-change.md +1 -1
  176. package/templates/planning/INDEX.md +87 -0
  177. package/templates/planning/brief.md +1 -1
  178. package/templates/planning/execution_strategy.md +31 -0
  179. package/templates/planning/lesson_candidates.md +18 -6
  180. package/templates/planning/module_session_prompt.md +1 -0
  181. package/templates/planning/optional/artifacts/INDEX.md +3 -3
  182. package/templates/planning/optional/references/INDEX.md +3 -3
  183. package/templates/planning/review.md +41 -0
  184. package/templates/planning/task_plan.md +5 -21
  185. package/templates/planning/visual_map.md +13 -9
  186. package/templates/planning/visual_map.simple.md +52 -0
  187. package/templates/reference/execution-workflow-standard.md +31 -3
  188. package/templates/reference/pull-request-standard.md +80 -0
  189. package/templates/reference/repo-governance-standard.md +7 -6
  190. package/templates/reference/review-routing-standard.md +6 -0
  191. package/templates/reference/walkthrough-standard.md +2 -1
  192. package/templates/verifier/verifier-output.md +1 -1
  193. package/templates-zh-CN/AGENTS.md.template +25 -19
  194. package/templates-zh-CN/ledger/Harness-Ledger.md +17 -40
  195. package/templates-zh-CN/planning/INDEX.md +87 -0
  196. package/templates-zh-CN/planning/brief.md +1 -1
  197. package/templates-zh-CN/planning/execution_strategy.md +30 -0
  198. package/templates-zh-CN/planning/lesson_candidates.md +18 -6
  199. package/templates-zh-CN/planning/module_session_prompt.md +1 -0
  200. package/templates-zh-CN/planning/review.md +41 -1
  201. package/templates-zh-CN/planning/task_plan.md +4 -44
  202. package/templates-zh-CN/planning/visual_map.md +14 -7
  203. package/templates-zh-CN/planning/visual_map.simple.md +48 -0
  204. package/templates-zh-CN/reference/adversarial-review-standard.md +1 -1
  205. package/templates-zh-CN/reference/docs-library-standard.md +1 -1
  206. package/templates-zh-CN/reference/execution-workflow-standard.md +33 -7
  207. package/templates-zh-CN/reference/harness-ledger-standard.md +2 -2
  208. package/templates-zh-CN/reference/pull-request-standard.md +106 -0
  209. package/templates-zh-CN/reference/repo-governance-standard.md +4 -3
  210. package/templates-zh-CN/reference/review-routing-standard.md +8 -1
  211. package/templates-zh-CN/reference/walkthrough-standard.md +3 -2
  212. package/templates-zh-CN/walkthrough/Closeout-SSoT.md +1 -1
  213. package/docs-release/assets/dashboard-overview-en.png +0 -0
  214. package/scripts/smoke-dashboard.mjs +0 -92
  215. package/scripts/test-harness.mjs +0 -1395
  216. package/templates/ssot/Feature-SSoT.md +0 -43
  217. package/templates/ssot/Lessons-SSoT.md +0 -44
  218. package/templates-zh-CN/ssot/Feature-SSoT.md +0 -49
  219. package/templates-zh-CN/ssot/Lessons-SSoT.md +0 -49
@@ -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.
@@ -166,37 +185,42 @@ The agent must read `session.json` and `migrate-plan.json`, then migrate active
166
185
  After initialization or migration, agents should not manually copy task folders. Use lifecycle commands:
167
186
 
168
187
  ```bash
169
- harness new-task phase-2-lifecycle \
188
+ harness new-task \
170
189
  --title "Phase 2 task lifecycle" \
171
190
  --locale en-US \
172
191
  /path/to/project
173
192
 
174
- harness task-start phase-2-lifecycle \
193
+ harness task-start <task-id-from-new-task-output> \
175
194
  --message "Start lifecycle slice implementation" \
176
195
  /path/to/project
177
196
 
178
- harness task-log phase-2-lifecycle \
197
+ harness task-log <task-id-from-new-task-output> \
179
198
  --message "Completed CLI and template updates" \
180
199
  --evidence "command:TARGET:npm-test:passed" \
181
200
  /path/to/project
182
201
 
183
- harness review-confirm TASKS/phase-2-lifecycle \
202
+ harness review-confirm <task-id-from-new-task-output> \
184
203
  --reviewer "Human Reviewer" \
185
- --confirm phase-2-lifecycle \
204
+ --confirm <task-id-from-new-task-output> \
186
205
  /path/to/project
187
206
 
188
- harness task-complete phase-2-lifecycle \
207
+ harness task-complete <task-id-from-new-task-output> \
189
208
  --message "Verification loop completed" \
190
209
  /path/to/project
191
210
  ```
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 --title "..."` generates a default ID like `YYYY-MM-DD-phase-2-task-lifecycle-a1b2c3d4` to reduce collisions when multiple people or agents create tasks in the same repository. Pass an explicit `<task-id>` only when a coordinator needs a stable compatibility ID.
216
+ - `new-task --budget simple` creates `brief.md`, `task_plan.md`, `visual_map.md`, and `progress.md`.
217
+ - `new-task` defaults to `standard` and creates the simple files plus `execution_strategy.md`, `findings.md`, `lesson_candidates.md`, and `review.md`.
218
+ - `new-task --budget complex` creates the standard files plus `references/INDEX.md` and `artifacts/INDEX.md`.
196
219
  - Existing task directories are not overwritten. Renaming or continuing old tasks is a coordinator decision.
197
220
  - `task-start`, `task-block`, and `task-complete` only update lifecycle status and logs in `progress.md`.
198
221
  - `task-log` only appends execution records. Evidence uses `type:PATH:summary`, for example `command:TARGET:npm-test:passed`.
199
- - `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
+ - `review-confirm` writes human review confirmation audit fields to the task `INDEX.md` through gated commits. It must reject open P0/P1/P2 findings marked `Open: yes` or `Blocks Release: yes`.
223
+ - 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
224
  - `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
225
  - 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
226
  - 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.
@@ -29,6 +29,19 @@ English mirror: `docs-release/guides/agent-installation.en-US.md`
29
29
  `npx --yes coding-agent-harness status` / `migrate-plan` 完成扫描;等用户确认允许写入后
30
30
  再安装 Skill 或运行初始化/迁移写入命令。
31
31
 
32
+ 本仓库还发布嵌套的 `preset-creator` Skill,给需要制作可复用 Harness Preset 的 Agent
33
+ 使用。因为本仓库同时有根目录 `SKILL.md` 和嵌套 Skill,查看或安装它时要加
34
+ `--full-depth`:
35
+
36
+ ```bash
37
+ npx skills add FairladyZ625/coding-agent-harness --list --full-depth
38
+ npx skills add FairladyZ625/coding-agent-harness --skill preset-creator --full-depth
39
+ ```
40
+
41
+ `coding-agent-harness` 用于在目标项目中运行 Harness;`preset-creator` 只在 Agent
42
+ 需要为一类可重复任务设计 Preset 时使用,例如这些任务共享 Reference、Artifact、Evidence
43
+ 或 Complex Task 骨架叠加规则。
44
+
32
45
  使用 v1.0 六阶段流程:
33
46
 
34
47
  1. Diagnose:扫描项目结构、语言、现有文档、CI、协作方式、外部依赖和风险面。
@@ -124,6 +137,16 @@ harness install-user --agent codex --global
124
137
  harness doctor-user --agent codex
125
138
  ```
126
139
 
140
+ `npm install -g coding-agent-harness`、`harness install-user` 和 `harness init`
141
+ 都会 seed 内置 Preset:
142
+
143
+ - 用户级 Preset:`~/.coding-agent-harness/presets/<preset-id>/`
144
+ - 项目级 Preset:`<target>/.coding-agent-harness/presets/<preset-id>/`
145
+
146
+ Agent 初始化或接手任务前必须运行 `harness preset list --json [target]`,
147
+ 确认可用 Preset 后再选择 `--preset`。如需修复缺失的内置 Preset,运行
148
+ `harness preset seed` 或 `harness preset seed --project <target>`。
149
+
127
150
  支持的 agent target:
128
151
 
129
152
  | Agent | 用户级目录 |
@@ -140,7 +163,7 @@ harness doctor-user --agent codex
140
163
  - 默认交互确认;非交互场景必须传 `--yes` 或先用 `--dry-run`。
141
164
  - 默认不覆盖已有文件,只补缺失文件。
142
165
  - 需要强制更新时显式传 `--force`。
143
- - `doctor-user` 会检查 `SKILL.md`、模板、references、CLI scripts 和本指南是否存在。
166
+ - `doctor-user` 会检查 `SKILL.md`、模板、references、内置 Preset、CLI scripts、本指南,以及用户级 Preset seed 是否存在。
144
167
 
145
168
  ## 旧 Harness 迁移
146
169
 
@@ -156,11 +179,6 @@ harness migrate-run \
156
179
 
157
180
  harness migrate-verify \
158
181
  /tmp/cah-migration-project/session.json
159
-
160
- harness new-task \
161
- --budget complex \
162
- --preset legacy-migration \
163
- --from-session /tmp/cah-migration-project/session.json
164
182
  ```
165
183
 
166
184
  规则:
@@ -172,8 +190,8 @@ harness new-task \
172
190
  - 已有项目事实只能 merge、append 或记录 residual;不能用泛化模板替换。
173
191
  - 历史合同缺口在普通模式下进入 `adoption-needed` warning。
174
192
  - `--strict` 必须仍然能因为旧 checker 失败或历史合同缺口而失败。
193
+ - 旧全局表和模块索引先归档,再用 `harness governance rebuild --archive --apply` 重新生成;这些表是 Agent 索引,人看状态优先用 Dashboard。
175
194
  - `migrate-verify` 必须通过,才能报告迁移输出可用;dashboard 路径必须是 HTML。
176
- - `new-task --preset legacy-migration --from-session` 只创建 Complex Task 骨架和证据包;不会继续迁移、改写历史、stage 或 commit。
177
195
  - 详细迁移策略见 `docs-release/guides/migration-playbook.md` 或英文镜像
178
196
  `docs-release/guides/migration-playbook.en-US.md`。如果用户要求证明旧项目已经完整迁移,
179
197
  还必须读取 `docs-release/guides/full-legacy-migration-subagent-strategy.md` 或中文镜像
@@ -186,39 +204,48 @@ harness new-task \
186
204
  初始化或迁移完成后,agent 不应手工复制任务目录。使用生命周期命令创建和推进任务:
187
205
 
188
206
  ```bash
189
- harness new-task phase-2-lifecycle \
207
+ harness new-task \
190
208
  --title "阶段二任务生命周期" \
191
209
  --locale zh-CN \
192
210
  /path/to/project
193
211
 
194
- harness task-start phase-2-lifecycle \
212
+ harness task-start <new-task 输出的 task-id> \
195
213
  --message "开始实现生命周期切片" \
196
214
  /path/to/project
197
215
 
198
- harness task-log phase-2-lifecycle \
216
+ harness task-log <new-task 输出的 task-id> \
199
217
  --message "完成 CLI 与模板更新" \
200
218
  --evidence "command:TARGET:npm-test:passed" \
201
219
  /path/to/project
202
220
 
203
- harness review-confirm TASKS/phase-2-lifecycle \
221
+ harness review-confirm <new-task 输出的 task-id> \
204
222
  --reviewer "Human Reviewer" \
205
- --confirm phase-2-lifecycle \
223
+ --confirm <new-task 输出的 task-id> \
206
224
  /path/to/project
207
225
 
208
- harness task-complete phase-2-lifecycle \
226
+ harness task-complete <new-task 输出的 task-id> \
209
227
  --message "验证闭环完成" \
210
228
  /path/to/project
211
229
  ```
212
230
 
213
231
  规则:
214
232
 
215
- - `new-task` 创建 `brief.md`、`task_plan.md`、`execution_strategy.md`、
216
- `visual_map.md`、`findings.md`、`progress.md` 和 `review.md`。
233
+ - 不要手工复制任务模板,也不要创建不完整任务目录。`harness check` 会按
234
+ `new-task` 创建的预算文件集校验。
235
+ - `new-task --title "..."` 默认生成类似 `YYYY-MM-DD-phase-2-task-lifecycle-a1b2c3d4`
236
+ 的任务 ID,避免多人或多 agent 同仓协作时重名;只有需要固定兼容 ID 时才传显式 `<task-id>`。
237
+ - `new-task --budget simple` 创建 `brief.md`、`task_plan.md`、`visual_map.md`
238
+ 和 `progress.md`。
239
+ - `new-task` 默认 `standard`,创建 simple 文件,并额外创建
240
+ `execution_strategy.md`、`findings.md`、`lesson_candidates.md` 和 `review.md`。
241
+ - `new-task --budget complex` 创建 standard 文件,并额外创建
242
+ `references/INDEX.md` 和 `artifacts/INDEX.md`。
217
243
  - 已存在的任务目录不会被覆盖;需要改名或继续旧任务时,由 coordinator 决定。
218
244
  - `task-start`、`task-block`、`task-complete` 只更新 `progress.md` 的生命周期状态和日志。
219
245
  - `task-log` 只追加执行记录;证据使用 `type:PATH:summary`,例如
220
246
  `command:TARGET:npm-test:passed`。
221
- - `review-confirm` 会向 `review.md` 追加人工审查确认,并向 `progress.md` 追加日志;如果存在 `Open: yes` 或 `Blocks Release: yes` 的开放 P0/P1/P2 finding,必须拒绝确认。
247
+ - `review-confirm` 会通过受控提交把人工确认审计字段写入任务 `INDEX.md`;如果存在 `Open: yes` 或 `Blocks Release: yes` 的开放 P0/P1/P2 finding,必须拒绝确认。
248
+ - CLI-owned lifecycle 和 lesson 命令会在干净 Git root 中自动提交 allowlisted 写入;dirty 状态会出现在 `status` / dashboard 的警告里,并阻塞这些机械化提交。Agent 手工改动仍要主动提交,不能提交时记录 no-commit reason、owner 和下一步。
222
249
  - `status --json` 保留旧 `task.state` 用于兼容,并新增 `lifecycleState`、`reviewStatus`、`closeoutStatus` 和 `stateConflicts`。`done` 只表示实现完成,不等于 `closed`。
223
250
  - 人工操作入口使用本地 HTML workbench:`harness dev /path/to/project`。它会启动只绑定 `127.0.0.1` 的动态页面、自动选择端口、打开浏览器并随 docs 变更刷新。无 GUI 或 CI 场景使用 `harness dev --no-open /path/to/project`。
224
251
  - 底层兼容入口仍是 `harness dashboard --workbench --out-dir /tmp/harness-workbench /path/to/project`。静态 dashboard 文件仍然只读,不能承载人工确认动作。
@@ -0,0 +1,100 @@
1
+ # Contributor Guide
2
+
3
+ This guide is for external contributors working on the public Coding Agent Harness repository.
4
+
5
+ ## Working Model
6
+
7
+ Coding Agent Harness is more than documentation. The public repository includes:
8
+
9
+ - CLI implementation under `scripts/`
10
+ - tests under `tests/`
11
+ - installable templates under `templates/` and `templates-zh-CN/`
12
+ - bundled presets under `presets/`
13
+ - public documentation under `docs-release/`
14
+ - examples under `examples/`
15
+ - an optional GUI submodule under `harness-gui/`
16
+
17
+ Keep pull requests focused on one change family when possible. Documentation, CLI behavior, target-project templates, presets, and GUI work have different verification paths.
18
+
19
+ ## Local Setup
20
+
21
+ Use Node.js 18 or newer. CI runs Node.js 20.
22
+
23
+ ```bash
24
+ npm install
25
+ ```
26
+
27
+ If your change touches the GUI submodule:
28
+
29
+ ```bash
30
+ cd harness-gui
31
+ npm ci
32
+ ```
33
+
34
+ ## Required Checks
35
+
36
+ Run the checks that match your change. For larger PRs or when you are unsure, run
37
+ the full root suite.
38
+
39
+ | Change type | Minimum local checks |
40
+ | --- | --- |
41
+ | Docs only | `git diff --check` |
42
+ | CLI/runtime | `npm test`, `npm run check`, `git diff --check` |
43
+ | Templates or examples | `npm test`, `node scripts/harness.mjs check --profile target-project examples/minimal-project`, `git diff --check` |
44
+ | Dashboard | `npm test`, `npm run smoke:dashboard`, `git diff --check` |
45
+ | Package surface | `npm test`, `npm run pack:dry-run`, `git diff --check` |
46
+ | GUI submodule | `cd harness-gui && npm ci && npm run typecheck && npm test && npm run build` |
47
+
48
+ Full root suite:
49
+
50
+ ```bash
51
+ npm test
52
+ npm run smoke:dashboard
53
+ npm run check
54
+ node scripts/harness.mjs check --profile target-project examples/minimal-project
55
+ npm run pack:dry-run
56
+ git diff --check
57
+ ```
58
+
59
+ GUI submodule setup and checks:
60
+
61
+ ```bash
62
+ cd harness-gui
63
+ npm ci
64
+ npm run typecheck
65
+ npm test
66
+ npm run build
67
+ ```
68
+
69
+ If a check cannot be run locally, say why in the PR.
70
+
71
+ ## PR Requirements
72
+
73
+ Use the repository PR template and fill in:
74
+
75
+ - summary
76
+ - what changed
77
+ - version impact
78
+ - verification evidence
79
+ - review evidence
80
+ - residual risk
81
+ - related issue, task, or design reference when available
82
+
83
+ For docs-only or CI-only changes, "no version change" is usually correct. Runtime, template, preset, or package-surface changes may need a version decision from a maintainer.
84
+
85
+ ## GUI Submodule Changes
86
+
87
+ `harness-gui/` is a Git submodule. GUI changes should be committed in the GUI repository first, then the parent repository should update the submodule pointer. A parent PR that updates the pointer should link to the GUI PR and include the GUI verification output.
88
+
89
+ ## CI
90
+
91
+ GitHub Actions runs the same broad gates contributors should run locally:
92
+
93
+ - root package tests
94
+ - source/package boundary check
95
+ - minimal target project check
96
+ - dashboard generation and smoke test
97
+ - npm package dry run
98
+ - GUI submodule typecheck, tests, and build
99
+
100
+ Repository owners manage branch protection and required checks in GitHub. Contributors only need to keep their PRs focused, documented, and verified.
@@ -0,0 +1,99 @@
1
+ # 贡献者指南
2
+
3
+ 这份指南面向参与公开 `coding-agent-harness` 仓库的外部贡献者。
4
+
5
+ ## 工作模型
6
+
7
+ Coding Agent Harness 不只是文档仓库。公开仓库包含:
8
+
9
+ - `scripts/` 下的 CLI 实现
10
+ - `tests/` 下的测试
11
+ - `templates/` 与 `templates-zh-CN/` 下的可安装模板
12
+ - `presets/` 下的内置 preset
13
+ - `docs-release/` 下的公开文档
14
+ - `examples/` 下的示例项目
15
+ - `harness-gui/` 下的可选 GUI 子模块
16
+
17
+ PR 尽量聚焦在一类改动上。文档、CLI 行为、目标项目模板、preset 和 GUI 有不同的验证路径。
18
+
19
+ ## 本地准备
20
+
21
+ 使用 Node.js 18 或更高版本。CI 当前使用 Node.js 20。
22
+
23
+ ```bash
24
+ npm install
25
+ ```
26
+
27
+ 如果改动涉及 GUI 子模块:
28
+
29
+ ```bash
30
+ cd harness-gui
31
+ npm ci
32
+ ```
33
+
34
+ ## 必要检查
35
+
36
+ 根据改动范围运行相关检查。较大的 PR 或不确定范围时,运行完整根仓检查。
37
+
38
+ | 改动类型 | 最小本地检查 |
39
+ | --- | --- |
40
+ | 仅文档 | `git diff --check` |
41
+ | CLI / runtime | `npm test`, `npm run check`, `git diff --check` |
42
+ | 模板或示例 | `npm test`, `node scripts/harness.mjs check --profile target-project examples/minimal-project`, `git diff --check` |
43
+ | Dashboard | `npm test`, `npm run smoke:dashboard`, `git diff --check` |
44
+ | Package surface | `npm test`, `npm run pack:dry-run`, `git diff --check` |
45
+ | GUI 子模块 | `cd harness-gui && npm ci && npm run typecheck && npm test && npm run build` |
46
+
47
+ 完整根仓检查:
48
+
49
+ ```bash
50
+ npm test
51
+ npm run smoke:dashboard
52
+ npm run check
53
+ node scripts/harness.mjs check --profile target-project examples/minimal-project
54
+ npm run pack:dry-run
55
+ git diff --check
56
+ ```
57
+
58
+ GUI 子模块安装和检查:
59
+
60
+ ```bash
61
+ cd harness-gui
62
+ npm ci
63
+ npm run typecheck
64
+ npm test
65
+ npm run build
66
+ ```
67
+
68
+ 如果某个检查无法在本地运行,请在 PR 中说明原因。
69
+
70
+ ## PR 要求
71
+
72
+ 使用仓库 PR 模板,并填写:
73
+
74
+ - 摘要
75
+ - 改动内容
76
+ - 版本影响
77
+ - 验证证据
78
+ - 审查证据
79
+ - 残余风险
80
+ - 如有相关 issue、任务或设计材料,附上链接
81
+
82
+ 文档或 CI-only 改动通常可以写“不改版本”。运行时、模板、preset 或 package surface 改动可能需要维护者决定版本策略。
83
+
84
+ ## GUI 子模块改动
85
+
86
+ `harness-gui/` 是 Git submodule。GUI 改动应先提交到 GUI 仓库,再由父仓更新 submodule pointer。更新 pointer 的父仓 PR 应链接 GUI PR,并附上 GUI 验证结果。
87
+
88
+ ## CI
89
+
90
+ GitHub Actions 会运行贡献者本地也应覆盖的主要 gate:
91
+
92
+ - 根包测试
93
+ - source/package boundary 检查
94
+ - minimal target project 检查
95
+ - dashboard 生成与 smoke test
96
+ - npm package dry run
97
+ - GUI 子模块 typecheck、测试和 build
98
+
99
+ GitHub branch protection 和 required checks 由仓库 owner 在 GitHub 上管理。贡献者只需要让 PR 聚焦、说明清楚并附上验证证据。
@@ -27,7 +27,7 @@ Release docs explain public methodology and product capability. They do not carr
27
27
  | `references/` | Agents and maintainers | Reusable standards such as testing, workflow, review, worktree rules | A project's current schedule |
28
28
  | `templates/` | CLI and agents | Files generated into target projects | Evidence from completed work |
29
29
  | Target `AGENTS.md` | Agents | Entrypoint, routing, hard rules, reading matrix | Long background essays |
30
- | Target `docs/09-PLANNING/` | Agents and project owners | Feature SSoT, task plans, current state | Generic marketing material |
30
+ | Target `docs/09-PLANNING/` and `docs/Harness-Ledger.md` | Agents and project owners | Task plans, generated task lifecycle index, current state | Generic marketing material |
31
31
  | Target `docs/05-TEST-QA/` | Agents, QA, human reviewers | Regression SSoT, Cadence Ledger, quality gates | Requirement brainstorm drafts |
32
32
  | Target `docs/10-WALKTHROUGH/` | Reviewers and handoff agents | Closeout evidence, residuals, human confirmation | Unverified plans |
33
33
 
@@ -62,7 +62,8 @@ Agent-facing docs answer:
62
62
  Typical files:
63
63
 
64
64
  - `AGENTS.md`
65
- - `docs/09-PLANNING/Feature-SSoT.md`
65
+ - `docs/Harness-Ledger.md`
66
+ - `docs/09-PLANNING/TASKS/<task>/task_plan.md`
66
67
  - `docs/09-PLANNING/TASKS/<task>/task_plan.md`
67
68
  - `docs/09-PLANNING/TASKS/<task>/progress.md`
68
69
  - `docs/05-TEST-QA/Regression-SSoT.md`
@@ -27,7 +27,7 @@ Agent 读的文档定义事实、路径、门禁和下一步动作。
27
27
  | `references/` | Agent 和维护者 | 可复用标准,例如 testing、workflow、review、worktree | 某个项目的当前排期 |
28
28
  | `templates/` | CLI 和 Agent | 初始化目标项目时生成的文件 | 已经执行过的任务证据 |
29
29
  | 目标项目 `AGENTS.md` | Agent | 入口、路由、硬规则、读文件矩阵 | 大段背景叙事 |
30
- | 目标项目 `docs/09-PLANNING/` | Agent 和项目负责人 | Feature SSoT、任务计划、当前状态 | 通用营销材料 |
30
+ | 目标项目 `docs/09-PLANNING/` 与 `docs/Harness-Ledger.md` | Agent 和项目负责人 | 任务计划、生成的任务生命周期索引、当前状态 | 通用营销材料 |
31
31
  | 目标项目 `docs/05-TEST-QA/` | Agent、QA、人审 | Regression SSoT、Cadence Ledger、质量门禁 | 需求讨论草稿 |
32
32
  | 目标项目 `docs/10-WALKTHROUGH/` | 人审、接手 Agent | 收口证据、残留项、人工确认 | 未验证的计划 |
33
33
 
@@ -62,7 +62,8 @@ Agent 读文档要回答:
62
62
  典型文件:
63
63
 
64
64
  - `AGENTS.md`
65
- - `docs/09-PLANNING/Feature-SSoT.md`
65
+ - `docs/Harness-Ledger.md`
66
+ - `docs/09-PLANNING/TASKS/<task>/task_plan.md`
66
67
  - `docs/09-PLANNING/TASKS/<task>/task_plan.md`
67
68
  - `docs/09-PLANNING/TASKS/<task>/progress.md`
68
69
  - `docs/05-TEST-QA/Regression-SSoT.md`
@@ -120,7 +120,7 @@ Use small, bounded worker roles. These roles can run sequentially or in parallel
120
120
  | --- | --- | --- |
121
121
  | Task Contract Worker | `docs/09-PLANNING/TASKS/**/brief.md`, `execution_strategy.md`, `visual_map.md`, optional same-task `progress.md` log | Remove task contract failures; in a confirmed rewrite mode, rewrite weak old surfaces. |
122
122
  | Review/Capability Worker | `.harness-capabilities.json`, current strict review files | Declare real capabilities and normalize release-blocking review schema. |
123
- | Legacy Governance Worker | `AGENTS.md`, PR template or residual, `docs/11-REFERENCE/**`, Ledger, Closeout SSoT, Lessons SSoT, walkthrough template | Clear legacy checker failures. |
123
+ | Legacy Governance Worker | `AGENTS.md`, PR template or residual, `docs/11-REFERENCE/**`, Ledger, Closeout SSoT, lesson candidates/detail docs, walkthrough template | Clear legacy checker failures. |
124
124
  | Brief Coverage Workers | disjoint task-date or module ranges, missing or explicitly weak `brief.md` files | Reach dashboard brief coverage 100 percent and remove empty templates. |
125
125
  | Quality Repair Worker | only files named by reviewer | Remove weak brief patterns and stale dashboard assumptions. |
126
126
 
@@ -235,7 +235,7 @@ Fix or route:
235
235
  - PR template exists or an explicit blocked-with-owner residual exists.
236
236
  - `Harness-Ledger.md` includes repo governance / CI-CD and Lessons Check columns.
237
237
  - `Closeout-SSoT.md` includes walkthrough, Lessons Check, and closeout status.
238
- - `Lessons-SSoT.md` includes ID, status, and detail doc columns.
238
+ - Promoted lessons live in `docs/01-GOVERNANCE/lessons/*.md`; task-local candidates stay in `lesson_candidates.md`.
239
239
  - `_walkthrough-template.md` includes Lessons Reflection.
240
240
 
241
241
  Do not overwrite business facts. Merge missing columns or append a migration section when possible.
@@ -120,7 +120,7 @@ harness migrate-verify /tmp/cah-migration-baseline/session.json
120
120
  | --- | --- | --- |
121
121
  | Task Contract Worker | `docs/09-PLANNING/TASKS/**/brief.md`、`execution_strategy.md`、`visual_map.md`、同任务 `progress.md` 可选追加 | 清掉 task contract failures;在已确认 rewrite 模式下重写薄弱旧表面。 |
122
122
  | Review/Capability Worker | `.harness-capabilities.json`、当前 strict review 文件 | 声明真实能力并规范 release-blocking review schema。 |
123
- | Legacy Governance Worker | `AGENTS.md`、PR template 或 residual、`docs/11-REFERENCE/**`、Ledger、Closeout SSoT、Lessons SSoT、walkthrough template | 清掉 legacy checker failures。 |
123
+ | Legacy Governance Worker | `AGENTS.md`、PR template 或 residual、`docs/11-REFERENCE/**`、Ledger、Closeout SSoT、lesson candidates/detail docs、walkthrough template | 清掉 legacy checker failures。 |
124
124
  | Brief Coverage Workers | 按 task 日期段或模块拆分,写缺失或被点名薄弱的 `brief.md` | 达到 dashboard brief coverage 100%,并移除空模板。 |
125
125
  | Quality Repair Worker | 只写 reviewer 点名的文件 | 移除弱 brief、自动解析痕迹和 stale dashboard assumptions。 |
126
126
 
@@ -235,7 +235,7 @@ Task/review cleanup 后,strict cutover 仍可能因为旧 checker 要求 gover
235
235
  - PR template 存在,或有 explicit blocked-with-owner residual。
236
236
  - `Harness-Ledger.md` 包含 repo governance / CI-CD 和 Lessons Check 列。
237
237
  - `Closeout-SSoT.md` 包含 walkthrough、Lessons Check 和 closeout status。
238
- - `Lessons-SSoT.md` 包含 ID、status 和 detail doc 列。
238
+ - Promoted lessons 位于 `docs/01-GOVERNANCE/lessons/*.md`;任务本地候选保留在 `lesson_candidates.md`。
239
239
  - `_walkthrough-template.md` 包含 Lessons Reflection。
240
240
 
241
241
  不要覆盖业务事实。尽量 merge 缺失列,或追加 migration section。
@@ -122,17 +122,6 @@ The command writes:
122
122
  - `status-strict.json`
123
123
  - `dashboard/index.html`
124
124
 
125
- After `migrate-verify` passes, create the migration task as a Complex Task preset:
126
-
127
- ```bash
128
- harness new-task \
129
- --budget complex \
130
- --preset legacy-migration \
131
- --from-session /tmp/cah-migration-project/session.json
132
- ```
133
-
134
- This command only scaffolds the task and copies/references evidence. It does not run migration, rewrite history, stage files, or commit.
135
-
136
125
  Classify the output:
137
126
 
138
127
  | Output | Meaning | Action |
@@ -123,17 +123,6 @@ harness migrate-run \
123
123
  - `status-strict.json`
124
124
  - `dashboard/index.html`
125
125
 
126
- `migrate-verify` 通过后,把本次迁移变成 Complex Task preset:
127
-
128
- ```bash
129
- harness new-task \
130
- --budget complex \
131
- --preset legacy-migration \
132
- --from-session /tmp/cah-migration-project/session.json
133
- ```
134
-
135
- 这条命令只创建任务骨架并复制/引用证据,不会继续运行迁移、改写历史、stage 或 commit。
136
-
137
126
  输出分类:
138
127
 
139
128
  | Output | 含义 | 动作 |
@@ -94,17 +94,6 @@ harness migrate-verify /tmp/cah-migration-project/session.json
94
94
 
95
95
  If later cleanup repairs warnings or active task contracts, the first session is only the baseline. Before final delivery, rerun `migrate-run` for a fresh session/dashboard or explicitly label the differences between baseline session and final evidence.
96
96
 
97
- 4. Create the Complex Task preset from the session:
98
-
99
- ```bash
100
- harness new-task \
101
- --budget complex \
102
- --preset legacy-migration \
103
- --from-session /tmp/cah-migration-project/session.json
104
- ```
105
-
106
- This only creates the task scaffold and `evidence/<timestamp>/` bundle. It does not run more migration, rewrite historical tasks, stage files, or commit. The generated task records `Task Kind`, `Task Preset`, `Preset Version`, `Migration Target Level`, `Migration Achieved Level`, and `Evidence Bundle`; later agents should continue migration inside that Complex Task instead of inventing a second workflow.
107
-
108
97
  `migrate-verify` passing does not mean the full migration is complete. Full migration also requires:
109
98
 
110
99
  - `migrate-plan` is `declared-capability`.
@@ -115,7 +104,7 @@ This only creates the task scaffold and `evidence/<timestamp>/` bundle. It does
115
104
  - The task index opens and shows all tasks.
116
105
  - At least one adversarial subagent review round passes.
117
106
 
118
- 5. Continue cleanup from the plan:
107
+ 4. Continue cleanup from the plan:
119
108
 
120
109
  - `MP-01`: confirm compatibility layer and locale; verify historical docs were not overwritten.
121
110
  - `MP-02`: choose capabilities; only declare capabilities that project facts support.
@@ -124,14 +113,14 @@ This only creates the task scaffold and `evidence/<timestamp>/` bundle. It does
124
113
  - `MP-05`: upgrade current release/architecture/security/data reviews; do not rewrite every historical review.
125
114
  - `MP-06`: only use strict as a gate after normal warnings have owner/action/status.
126
115
 
127
- 6. Normal migration verification:
116
+ 5. Normal migration verification:
128
117
 
129
118
  ```bash
130
119
  harness check --profile target-project /path/to/project
131
120
  harness dashboard --out-dir /tmp/harness-dashboard /path/to/project
132
121
  ```
133
122
 
134
- 7. Strict cutover verification:
123
+ 6. Strict cutover verification:
135
124
 
136
125
  ```bash
137
126
  harness check --profile target-project --strict /path/to/project
@@ -171,6 +160,16 @@ In baseline mode, only `current-active` tasks or tasks still referenced by SSoT
171
160
 
172
161
  In status-aware rewrite mode, an existing `brief.md`, `execution_strategy.md`, or `visual_map.md` is not automatically preserved. If evidence shows it is an old template, parser residue, wrong language, or too weak for a human to judge current state, rewrite it. Historical tasks may become readable index cards or residuals, but that decision must be evidence-backed.
173
162
 
163
+ Global table and module index migration is not manual refilling. Current Harness versions generate task lifecycle summaries into `Harness-Ledger.md` only; legacy `Feature-SSoT.md` and `Private-Feature-SSoT.md` files are archived during cutover and are not regenerated. Module `module_plan.md` Steps tables and module `visual_map.md` topology tables are still generated from module task files. Humans should inspect current state through the Dashboard; agents can use `task-list` / `task-index` queries for fast lookup. Before cutting over an older project, archive the legacy lifecycle tables and rebuild current indexes from task files:
164
+
165
+ ```bash
166
+ harness governance rebuild --dry-run --archive /path/to/project
167
+ harness governance rebuild --archive --apply /path/to/project
168
+ harness task-list --json --search "keyword" /path/to/project
169
+ ```
170
+
171
+ The archive directory preserves old lifecycle table snapshots. After the Dashboard, `task-list` / `task-index`, and generated Ledger all reflect current tasks, the project owner may decide whether to delete the old archive. Migration agents should not delete historical table evidence directly. Delivery, Regression, Cadence, Closeout, and Module Registry governance tables are not deleted by this step unless a later version provides equivalent scanner and generator support.
172
+
174
173
  In full semantic rewrite mode, every task needs a standalone `brief.md`, but the brief must not be an empty template. A historical task brief is a readable index card: task goal, first human read, evidence sources, status judgment, and residuals. `visual_map.md` is a diagram collection, not a roadmap template; include phase flow, sequence, architecture, data-flow, state, topology, or decision maps only when they improve understanding. Do not generate empty diagrams to satisfy a checker.
175
174
 
176
175
  If the legacy project is a microservice, multi-repo, split frontend/backend, or externally integrated project, the migration plan must also ask the user whether external source material exists. Do not migrate dozens of external-team documents directly into `03/04/06`. First use `external-source-intake-standard.md` to create `docs/04-DEVELOPMENT/external-source-packs/<source-key>/`, complete the source index and digests, then project stable facts into service profiles, external contexts, and integration contracts.
@@ -282,7 +281,7 @@ Full migration should not let one agent edit everything from start to finish. Us
282
281
  | --- | --- | --- |
283
282
  | Task Contract Worker | `docs/09-PLANNING/TASKS/**/brief.md`, `execution_strategy.md`, `visual_map.md`, same-task `progress.md` append | Clear task contract gaps; in a confirmed rewrite mode, rewrite weak old surfaces. |
284
283
  | Review/Capability Worker | `.harness-capabilities.json`, current strict review files | Declare real capabilities and repair release-blocking review schema. |
285
- | Legacy Governance Worker | `AGENTS.md`, PR template, `docs/11-REFERENCE/**`, Ledger, Closeout SSoT, Lessons SSoT, walkthrough template | Clear legacy checker aggregate failures. |
284
+ | Legacy Governance Worker | `AGENTS.md`, PR template, `docs/11-REFERENCE/**`, Ledger, Closeout SSoT, lesson candidates/detail docs, walkthrough template | Clear legacy checker aggregate failures. |
286
285
  | Brief Coverage Workers | date or module slices, missing or explicitly weak `brief.md` files | Bring dashboard brief coverage to 100 percent and remove empty templates. |
287
286
  | Quality Repair Worker | only files named by reviewers | Remove parser residue, empty templates, language mismatch, and weak evidence. |
288
287