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.
- package/CHANGELOG.md +25 -0
- package/CONTRIBUTING.md +98 -0
- package/README.md +211 -86
- package/README.zh-CN.md +54 -34
- package/SKILL.md +25 -18
- package/docs-release/README.md +9 -5
- package/docs-release/architecture/overview.md +17 -5
- package/docs-release/architecture/overview.zh-CN.md +9 -5
- package/docs-release/assets/dashboard-overview.png +0 -0
- package/docs-release/guides/agent-installation.en-US.md +31 -8
- package/docs-release/guides/agent-installation.md +34 -9
- package/docs-release/guides/contributing.md +100 -0
- package/docs-release/guides/contributing.zh-CN.md +99 -0
- package/docs-release/guides/document-audience-and-surfaces.en-US.md +3 -2
- package/docs-release/guides/document-audience-and-surfaces.md +3 -2
- package/docs-release/guides/full-legacy-migration-subagent-strategy.md +2 -2
- package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +2 -2
- package/docs-release/guides/legacy-migration-agent-prompt.md +0 -11
- package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +0 -11
- package/docs-release/guides/migration-playbook.en-US.md +14 -15
- package/docs-release/guides/migration-playbook.md +14 -15
- package/docs-release/guides/parent-control-repository-pattern.en-US.md +7 -5
- package/docs-release/guides/parent-control-repository-pattern.md +7 -5
- package/docs-release/guides/preset-development.md +214 -0
- package/docs-release/guides/repository-operating-models.en-US.md +5 -4
- package/docs-release/guides/repository-operating-models.md +5 -4
- package/docs-release/guides/task-state-machine.en-US.md +207 -0
- package/docs-release/guides/task-state-machine.md +214 -0
- package/docs-release/intl/en-US.md +1 -1
- package/docs-release/intl/zh-CN.md +1 -1
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/findings.md +7 -0
- package/package.json +8 -3
- package/presets/legacy-migration/checks/preset-check.mjs +3 -0
- package/presets/legacy-migration/preset.yaml +134 -0
- package/presets/legacy-migration/scripts/plan-work-queue.mjs +4 -0
- package/presets/legacy-migration/scripts/scaffold-task-contracts.mjs +4 -0
- package/presets/legacy-migration/templates/execution_strategy.append.md +18 -0
- package/presets/legacy-migration/templates/findings.seed.md +17 -0
- package/presets/legacy-migration/templates/review.seed.md +12 -0
- package/presets/legacy-migration/templates/task_plan.append.md +9 -0
- package/presets/legacy-migration/templates/visual_map.append.md +12 -0
- package/presets/legacy-migration/workbench/dashboard-panels.yaml +2 -0
- package/presets/legacy-migration/workbench/migration-queue.schema.json +23 -0
- package/presets/lesson-sedimentation/preset.yaml +23 -0
- package/presets/lesson-sedimentation/templates/prompt.md +23 -0
- package/presets/module/preset.yaml +25 -0
- package/presets/module/templates/execution_strategy.append.md +8 -0
- package/presets/module/templates/task_plan.append.md +17 -0
- package/presets/standard-task/preset.yaml +31 -0
- package/presets/standard-task/templates/task_plan.append.md +7 -0
- package/references/adversarial-review-standard.md +2 -2
- package/references/agents-md-pattern.md +2 -2
- package/references/delivery-operating-model-standard.md +3 -3
- package/references/docs-directory-standard.md +6 -7
- package/references/harness-ledger.md +53 -96
- package/references/lessons-governance.md +88 -93
- package/references/module-parallel-standard.md +14 -14
- package/references/planning-loop.md +12 -6
- package/references/pull-request-standard.md +118 -0
- package/references/repo-governance-standard.md +11 -2
- package/references/review-routing-standard.md +7 -1
- package/references/ssot-governance.md +67 -59
- package/references/taskr-gap-analysis.md +600 -0
- package/references/walkthrough-closeout.md +7 -7
- package/scripts/check-harness.mjs +40 -301
- package/scripts/commands/dashboard-command.mjs +67 -0
- package/scripts/commands/migration-command.mjs +96 -0
- package/scripts/commands/preset-command.mjs +73 -0
- package/scripts/commands/task-command.mjs +327 -0
- package/scripts/harness.mjs +55 -260
- package/scripts/lib/capability-registry.mjs +66 -8
- package/scripts/lib/check-module-parallel.mjs +237 -0
- package/scripts/lib/check-profiles.mjs +61 -153
- package/scripts/lib/check-task-contracts.mjs +47 -0
- package/scripts/lib/core-shared.mjs +10 -0
- package/scripts/lib/dashboard-data.mjs +29 -6
- package/scripts/lib/dashboard-workbench.mjs +52 -12
- package/scripts/lib/dashboard-writer.mjs +14 -2
- package/scripts/lib/git-status-summary.mjs +46 -0
- package/scripts/lib/governance-index-generator.mjs +174 -0
- package/scripts/lib/governance-sync.mjs +514 -0
- package/scripts/lib/governance-table-boundary.mjs +175 -0
- package/scripts/lib/harness-core.mjs +5 -0
- package/scripts/lib/lesson-maintenance.mjs +36 -29
- package/scripts/lib/migration-support.mjs +1 -1
- package/scripts/lib/preset-audit-contracts.mjs +37 -0
- package/scripts/lib/preset-engine.mjs +497 -0
- package/scripts/lib/preset-registry.mjs +627 -0
- package/scripts/lib/preset-resource-contracts.mjs +83 -0
- package/scripts/lib/review-confirm-git-gate.mjs +248 -0
- package/scripts/lib/status-dashboard-renderer.mjs +102 -0
- package/scripts/lib/subagent-authorization-audit.mjs +196 -0
- package/scripts/lib/task-completion-consistency.mjs +16 -0
- package/scripts/lib/task-index.mjs +93 -0
- package/scripts/lib/task-lesson-candidates.mjs +242 -0
- package/scripts/lib/task-lesson-sedimentation.mjs +326 -0
- package/scripts/lib/task-lifecycle/review-confirm.mjs +101 -0
- package/scripts/lib/task-lifecycle/review-gates.mjs +70 -0
- package/scripts/lib/task-lifecycle/text-utils.mjs +24 -0
- package/scripts/lib/task-lifecycle.mjs +297 -403
- package/scripts/lib/task-review-model.mjs +469 -0
- package/scripts/lib/task-scanner.mjs +130 -236
- package/scripts/lib/task-tombstone-commands.mjs +140 -0
- package/scripts/postinstall.mjs +14 -0
- package/skills/preset-creator/SKILL.md +179 -0
- package/skills/preset-creator/references/complex-task-skeleton/README.md +31 -0
- package/skills/preset-creator/references/complex-task-skeleton/artifacts/INDEX.md +12 -0
- package/skills/preset-creator/references/complex-task-skeleton/brief.md +32 -0
- package/skills/preset-creator/references/complex-task-skeleton/execution_strategy.md +71 -0
- package/skills/preset-creator/references/complex-task-skeleton/findings.md +24 -0
- package/skills/preset-creator/references/complex-task-skeleton/lesson_candidates.md +70 -0
- package/skills/preset-creator/references/complex-task-skeleton/long-running-task-contract.md +76 -0
- package/skills/preset-creator/references/complex-task-skeleton/progress.md +33 -0
- package/skills/preset-creator/references/complex-task-skeleton/references/INDEX.md +13 -0
- package/skills/preset-creator/references/complex-task-skeleton/review.md +107 -0
- package/skills/preset-creator/references/complex-task-skeleton/task_plan.md +111 -0
- package/skills/preset-creator/references/complex-task-skeleton/visual_map.md +50 -0
- package/skills/preset-creator/references/preset-package-skeleton.md +296 -0
- package/templates/AGENTS.md.template +19 -15
- package/templates/dashboard/assets/app-src/00-state.js +1 -0
- package/templates/dashboard/assets/app-src/10-router.js +2 -1
- package/templates/dashboard/assets/app-src/20-overview.js +11 -5
- package/templates/dashboard/assets/app-src/30-tasks.js +92 -246
- package/templates/dashboard/assets/app-src/35-task-detail.js +246 -0
- package/templates/dashboard/assets/app-src/45-review.js +241 -22
- package/templates/dashboard/assets/app-src/50-migration.js +24 -10
- package/templates/dashboard/assets/app-src/90-bindings.js +171 -29
- package/templates/dashboard/assets/app.css +698 -156
- package/templates/dashboard/assets/app.css.manifest.json +9 -0
- package/templates/dashboard/assets/app.js +662 -91
- package/templates/dashboard/assets/app.manifest.json +1 -0
- package/templates/dashboard/assets/css-src/00-foundation.css +342 -0
- package/templates/dashboard/assets/css-src/10-panels-flow.css +236 -0
- package/templates/dashboard/assets/css-src/20-briefs-controls.css +398 -0
- package/templates/dashboard/assets/css-src/30-task-index.css +739 -0
- package/templates/dashboard/assets/css-src/35-review-workspace.css +507 -0
- package/templates/dashboard/assets/css-src/40-detail-modules-migration.css +427 -0
- package/templates/dashboard/assets/css-src/50-responsive-overrides.css +551 -0
- package/templates/dashboard/assets/i18n.js +123 -21
- package/templates/ledger/Harness-Ledger.md +13 -25
- package/templates/lessons/lesson-arch-process-change.md +1 -1
- package/templates/lessons/lesson-new-doc.md +1 -1
- package/templates/lessons/lesson-ref-change.md +1 -1
- package/templates/planning/execution_strategy.md +31 -0
- package/templates/planning/lesson_candidates.md +18 -6
- package/templates/planning/optional/artifacts/INDEX.md +3 -3
- package/templates/planning/optional/references/INDEX.md +3 -3
- package/templates/planning/review.md +59 -0
- package/templates/planning/task_plan.md +36 -13
- package/templates/reference/execution-workflow-standard.md +4 -3
- package/templates/reference/pull-request-standard.md +80 -0
- package/templates/reference/repo-governance-standard.md +7 -6
- package/templates/reference/review-routing-standard.md +6 -0
- package/templates/reference/walkthrough-standard.md +2 -1
- package/templates/verifier/verifier-output.md +1 -1
- package/templates-zh-CN/AGENTS.md.template +20 -16
- package/templates-zh-CN/ledger/Harness-Ledger.md +17 -40
- package/templates-zh-CN/planning/execution_strategy.md +30 -0
- package/templates-zh-CN/planning/lesson_candidates.md +18 -6
- package/templates-zh-CN/planning/review.md +59 -1
- package/templates-zh-CN/planning/task_plan.md +30 -10
- package/templates-zh-CN/reference/adversarial-review-standard.md +1 -1
- package/templates-zh-CN/reference/docs-library-standard.md +1 -1
- package/templates-zh-CN/reference/execution-workflow-standard.md +4 -3
- package/templates-zh-CN/reference/harness-ledger-standard.md +2 -2
- package/templates-zh-CN/reference/pull-request-standard.md +106 -0
- package/templates-zh-CN/reference/repo-governance-standard.md +4 -3
- package/templates-zh-CN/reference/review-routing-standard.md +8 -1
- package/templates-zh-CN/reference/walkthrough-standard.md +3 -2
- package/templates-zh-CN/walkthrough/Closeout-SSoT.md +1 -1
- package/docs-release/assets/dashboard-overview-en.png +0 -0
- package/scripts/smoke-dashboard.mjs +0 -92
- package/scripts/test-harness.mjs +0 -1395
- package/templates/ssot/Feature-SSoT.md +0 -43
- package/templates/ssot/Lessons-SSoT.md +0 -44
- package/templates-zh-CN/ssot/Feature-SSoT.md +0 -49
- package/templates-zh-CN/ssot/Lessons-SSoT.md +0 -49
|
@@ -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` 或中文镜像
|
|
@@ -212,13 +230,20 @@ harness task-complete phase-2-lifecycle \
|
|
|
212
230
|
|
|
213
231
|
规则:
|
|
214
232
|
|
|
215
|
-
- `
|
|
216
|
-
`
|
|
233
|
+
- 不要手工复制任务模板,也不要创建不完整任务目录。`harness check` 会按
|
|
234
|
+
`new-task` 创建的预算文件集校验。
|
|
235
|
+
- `new-task --budget simple` 创建 `brief.md`、`task_plan.md`、`visual_map.md`
|
|
236
|
+
和 `progress.md`。
|
|
237
|
+
- `new-task` 默认 `standard`,创建 simple 文件,并额外创建
|
|
238
|
+
`execution_strategy.md`、`findings.md`、`lesson_candidates.md` 和 `review.md`。
|
|
239
|
+
- `new-task --budget complex` 创建 standard 文件,并额外创建
|
|
240
|
+
`references/INDEX.md` 和 `artifacts/INDEX.md`。
|
|
217
241
|
- 已存在的任务目录不会被覆盖;需要改名或继续旧任务时,由 coordinator 决定。
|
|
218
242
|
- `task-start`、`task-block`、`task-complete` 只更新 `progress.md` 的生命周期状态和日志。
|
|
219
243
|
- `task-log` 只追加执行记录;证据使用 `type:PATH:summary`,例如
|
|
220
244
|
`command:TARGET:npm-test:passed`。
|
|
221
245
|
- `review-confirm` 会向 `review.md` 追加人工审查确认,并向 `progress.md` 追加日志;如果存在 `Open: yes` 或 `Blocks Release: yes` 的开放 P0/P1/P2 finding,必须拒绝确认。
|
|
246
|
+
- CLI-owned lifecycle 和 lesson 命令会在干净 Git root 中自动提交 allowlisted 写入;dirty 状态会出现在 `status` / dashboard 的警告里,并阻塞这些机械化提交。Agent 手工改动仍要主动提交,不能提交时记录 no-commit reason、owner 和下一步。
|
|
222
247
|
- `status --json` 保留旧 `task.state` 用于兼容,并新增 `lifecycleState`、`reviewStatus`、`closeoutStatus` 和 `stateConflicts`。`done` 只表示实现完成,不等于 `closed`。
|
|
223
248
|
- 人工操作入口使用本地 HTML workbench:`harness dev /path/to/project`。它会启动只绑定 `127.0.0.1` 的动态页面、自动选择端口、打开浏览器并随 docs 变更刷新。无 GUI 或 CI 场景使用 `harness dev --no-open /path/to/project`。
|
|
224
249
|
- 底层兼容入口仍是 `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 |
|
|
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/
|
|
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 和项目负责人 |
|
|
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/
|
|
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,
|
|
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
|
-
- `
|
|
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、
|
|
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
|
-
- `
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
|
@@ -98,17 +98,6 @@ harness migrate-verify /tmp/cah-migration-project/session.json
|
|
|
98
98
|
|
|
99
99
|
如果后续继续清理 warning 或补活跃任务合同,第一次 session 只能作为 baseline。最终交付前要重新运行 `migrate-run` 生成新 session/dashboard,或者明确列出 baseline session 与最终检查证据的差异。
|
|
100
100
|
|
|
101
|
-
4. 用 session 创建 Complex Task preset:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
harness new-task \
|
|
105
|
-
--budget complex \
|
|
106
|
-
--preset legacy-migration \
|
|
107
|
-
--from-session /tmp/cah-migration-project/session.json
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
这一步只创建任务骨架和 `evidence/<timestamp>/` 证据包,不会继续运行迁移、改写历史任务、stage 或 commit。生成的任务会写入 `Task Kind`、`Task Preset`、`Preset Version`、`Migration Target Level`、`Migration Achieved Level` 和 `Evidence Bundle`,后续 agent 应在这个 Complex Task 里推进迁移,而不是另起一套流程。
|
|
111
|
-
|
|
112
101
|
`migrate-verify` 通过不等于 full migration complete。完整迁移还必须满足:
|
|
113
102
|
|
|
114
103
|
- `migrate-plan` 是 `declared-capability`。
|
|
@@ -119,7 +108,7 @@ harness new-task \
|
|
|
119
108
|
- 任务索引页面能打开并显示全量任务。
|
|
120
109
|
- 至少一轮 subagent 对抗审查 PASS。
|
|
121
110
|
|
|
122
|
-
|
|
111
|
+
4. 按计划继续人工/agent 清理:
|
|
123
112
|
|
|
124
113
|
- `MP-01`:确认兼容层和 locale,保证历史文档没有被覆盖。
|
|
125
114
|
- `MP-02`:选择 capability,只声明项目事实已经支持的能力。
|
|
@@ -128,14 +117,14 @@ harness new-task \
|
|
|
128
117
|
- `MP-05`:升级当前 release/architecture/security/data review,不重写所有历史 review。
|
|
129
118
|
- `MP-06`:普通检查 warning 都有 owner/action/status 后,再使用 strict 作为门禁。
|
|
130
119
|
|
|
131
|
-
|
|
120
|
+
5. 普通迁移验证:
|
|
132
121
|
|
|
133
122
|
```bash
|
|
134
123
|
harness check --profile target-project /path/to/project
|
|
135
124
|
harness dashboard --out-dir /tmp/harness-dashboard /path/to/project
|
|
136
125
|
```
|
|
137
126
|
|
|
138
|
-
|
|
127
|
+
6. 严格切换验证:
|
|
139
128
|
|
|
140
129
|
```bash
|
|
141
130
|
harness check --profile target-project --strict /path/to/project
|
|
@@ -175,6 +164,16 @@ Baseline 模式下,只有 `current-active` 或 “仍被 SSoT 引用为当前
|
|
|
175
164
|
|
|
176
165
|
Status-aware rewrite 模式下,已有 `brief.md`、`execution_strategy.md`、`visual_map.md` 不是自动保留;如果证据显示它们只是旧模板、解析残留、语言错误或不能让人判断当前状态,就重写。历史任务可以只写可读索引卡或 residual,但这个判断必须有证据。
|
|
177
166
|
|
|
167
|
+
全局表和模块索引迁移不是人工重填。新版本只把任务生命周期汇总生成到 `Harness-Ledger.md`;旧的 `Feature-SSoT.md` 和 `Private-Feature-SSoT.md` 是 legacy 生命周期投影,切换时应先归档,不再重建。模块 `module_plan.md` 的 Steps 表和模块 `visual_map.md` 的拓扑表仍由模块任务文件生成。人看当前状态应优先看 Dashboard,Agent 需要快速定位时用 `task-list` / `task-index` 查询。旧项目切换前,先把旧生命周期表归档,再用生成器从任务文件重建当前索引:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
harness governance rebuild --dry-run --archive /path/to/project
|
|
171
|
+
harness governance rebuild --archive --apply /path/to/project
|
|
172
|
+
harness task-list --json --search "keyword" /path/to/project
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
归档目录会保留旧生命周期表快照。确认 Dashboard、`task-list` / `task-index` 查询和新生成 Ledger 都能反映当前任务后,再由项目 owner 决定是否删除旧归档;迁移 agent 不应直接删除历史表证据。Delivery、Regression、Cadence、Closeout、Module Registry 等非任务生命周期治理表不是本步骤的删除对象,除非后续版本提供等价 scanner 和生成器。
|
|
176
|
+
|
|
178
177
|
Full semantic rewrite 模式下,所有任务都需要 standalone `brief.md`,但不能写空模板。历史任务的 brief 应该是“可读索引卡”:说明任务目标、第一眼应该看什么、证据来自哪里、状态判断和 residual。`visual_map.md` 是图表集合,不是路线图模板;只画能提高理解速度的 phase flow、sequence、architecture、data-flow、state、topology 或 decision map,不能为了过检查生成空图。
|
|
179
178
|
|
|
180
179
|
如果旧项目属于微服务、多仓、前后端分仓或依赖外部系统,迁移计划还必须询问用户是否有外部资料。不要把外部团队给的几十份文档直接迁入 `03/04/06`。先按 `external-source-intake-standard.md` 建立 `docs/04-DEVELOPMENT/external-source-packs/<source-key>/`,完成 source index 和 digest,再把稳定事实投影到 service profile、external context 和 integration contract。
|
|
@@ -286,7 +285,7 @@ Full cutover 的 dashboard smoke 必须验证:
|
|
|
286
285
|
| --- | --- | --- |
|
|
287
286
|
| Task Contract Worker | `docs/09-PLANNING/TASKS/**/brief.md`、`execution_strategy.md`、`visual_map.md`、同任务 `progress.md` 追加 | 清掉 task contract 缺口;在已确认 rewrite 模式下重写薄弱旧表面。 |
|
|
288
287
|
| Review/Capability Worker | `.harness-capabilities.json`、当前 strict review 文件 | 声明真实 capability,修 release-blocking review schema。 |
|
|
289
|
-
| Legacy Governance Worker | `AGENTS.md`、PR template、`docs/11-REFERENCE/**`、Ledger、Closeout SSoT、
|
|
288
|
+
| Legacy Governance Worker | `AGENTS.md`、PR template、`docs/11-REFERENCE/**`、Ledger、Closeout SSoT、lesson candidates/detail docs、walkthrough template | 清掉 legacy checker 聚合错误。 |
|
|
290
289
|
| Brief Coverage Workers | 按日期段或模块划分,写缺失或被点名薄弱的 `brief.md` | 把 dashboard brief coverage 变成 100%,并移除空模板。 |
|
|
291
290
|
| Quality Repair Worker | 只写 reviewer 点名的问题文件 | 修掉自动解析痕迹、空模板、语言不一致和证据薄弱。 |
|
|
292
291
|
|
|
@@ -16,7 +16,7 @@ Multi-repo projects often run into these failures:
|
|
|
16
16
|
|
|
17
17
|
- Frontend, backend, SDK, and services each have their own plans, and no one can tell where the global release is blocked.
|
|
18
18
|
- An agent starts inside a child repository, reads only local `AGENTS.md`, and misses cross-repo architecture constraints.
|
|
19
|
-
- Each repository maintains its own
|
|
19
|
+
- Each repository maintains its own handwritten task lifecycle table, and the states conflict.
|
|
20
20
|
- Review evidence, test evidence, and walkthroughs are scattered across repositories, making it hard to prove that a cross-repo task is complete.
|
|
21
21
|
|
|
22
22
|
The parent-control pattern solves a control-plane problem. It does not force code back into a monorepo. It moves the harness source of truth into one place.
|
|
@@ -62,7 +62,8 @@ It should contain:
|
|
|
62
62
|
- `docs/03-ARCHITECTURE/repository-topology.md`: repository topology, owners, boundaries, dependency direction.
|
|
63
63
|
- `docs/04-DEVELOPMENT/local-development.md`: cross-repo local startup, integration workflow, dependency setup.
|
|
64
64
|
- `docs/06-INTEGRATIONS/`: cross-service APIs, events, SDKs, databases, permissions, and external contracts.
|
|
65
|
-
- `docs/
|
|
65
|
+
- `docs/Harness-Ledger.md`: generated global task lifecycle index from task files.
|
|
66
|
+
- `docs/09-PLANNING/Delivery-SSoT.md`: cross-repo feature blocks, dependencies, and release orchestration.
|
|
66
67
|
- `docs/09-PLANNING/TASKS/`: cross-repo task contracts.
|
|
67
68
|
- `docs/05-TEST-QA/Regression-SSoT.md`: cross-repo regression gates.
|
|
68
69
|
- `docs/05-TEST-QA/Cadence-Ledger.md`: which changes trigger which checks.
|
|
@@ -94,7 +95,7 @@ They should contain:
|
|
|
94
95
|
- Repository-local reviews or pull requests.
|
|
95
96
|
- Repository-local test evidence.
|
|
96
97
|
|
|
97
|
-
Child repositories should not independently maintain
|
|
98
|
+
Child repositories should not independently maintain global task lifecycle tables, and they should not decide whether a cross-repo release is complete.
|
|
98
99
|
|
|
99
100
|
A child repository `AGENTS.md` can be short:
|
|
100
101
|
|
|
@@ -228,7 +229,7 @@ The agent does not need to read all docs in 100 repositories at startup. It read
|
|
|
228
229
|
|
|
229
230
|
Avoid:
|
|
230
231
|
|
|
231
|
-
- Each child repository maintaining its own global
|
|
232
|
+
- Each child repository maintaining its own global task lifecycle table.
|
|
232
233
|
- A parent repository with only a README and no task, regression, or closeout surface.
|
|
233
234
|
- Child `AGENTS.md` files copying large sections from the parent, causing drift.
|
|
234
235
|
- Starting cross-repo tasks from a child repository and backfilling parent records at the end.
|
|
@@ -241,7 +242,8 @@ To adopt the parent-control model, start with:
|
|
|
241
242
|
|
|
242
243
|
- Parent `AGENTS.md` states that this is the control repository.
|
|
243
244
|
- `docs/03-ARCHITECTURE/repository-topology.md` lists all child repositories.
|
|
244
|
-
- `docs/
|
|
245
|
+
- `docs/Harness-Ledger.md` is generated from task files as the global task lifecycle index.
|
|
246
|
+
- `docs/09-PLANNING/Delivery-SSoT.md` is maintained only when cross-repo release or block orchestration is needed.
|
|
245
247
|
- `docs/05-TEST-QA/Regression-SSoT.md` defines local, contract, integration, and release gates.
|
|
246
248
|
- Each child repository has only a short local `AGENTS.md`.
|
|
247
249
|
- New cross-repo tasks are created only in the parent repository.
|
|
@@ -16,7 +16,7 @@ English mirror: `docs-release/guides/parent-control-repository-pattern.en-US.md`
|
|
|
16
16
|
|
|
17
17
|
- 前端、后端、SDK、微服务各有自己的计划,没人知道全局 release 到底卡在哪里。
|
|
18
18
|
- Agent 从某个子仓库启动,只看到局部 `AGENTS.md`,忽略了跨仓架构约束。
|
|
19
|
-
-
|
|
19
|
+
- 每个仓库各自维护手写任务生命周期表,状态互相冲突。
|
|
20
20
|
- Review 证据、测试证据、walkthrough 分散在不同仓库,最后无法证明一个跨仓任务真正完成。
|
|
21
21
|
|
|
22
22
|
主控仓库模式解决的是控制面问题。它不是要求把代码放回单仓,而是把 Harness 的事实源收回一个地方。
|
|
@@ -62,7 +62,8 @@ product-control-repo/
|
|
|
62
62
|
- `docs/03-ARCHITECTURE/repository-topology.md`:仓库拓扑、owner、边界、依赖方向。
|
|
63
63
|
- `docs/04-DEVELOPMENT/local-development.md`:跨仓本地启动、联调、依赖安装。
|
|
64
64
|
- `docs/06-INTEGRATIONS/`:跨服务 API、事件、SDK、数据库、权限、外部系统契约。
|
|
65
|
-
- `docs/
|
|
65
|
+
- `docs/Harness-Ledger.md`:由任务文件生成的全局任务生命周期索引。
|
|
66
|
+
- `docs/09-PLANNING/Delivery-SSoT.md`:跨仓 feature block、依赖和 release 编排。
|
|
66
67
|
- `docs/09-PLANNING/TASKS/`:跨仓任务合同。
|
|
67
68
|
- `docs/05-TEST-QA/Regression-SSoT.md`:跨仓 regression gates。
|
|
68
69
|
- `docs/05-TEST-QA/Cadence-Ledger.md`:哪些变更触发哪些检查。
|
|
@@ -94,7 +95,7 @@ node tools/check-harness.mjs
|
|
|
94
95
|
- 本仓库局部 review 或 PR。
|
|
95
96
|
- 本仓库局部测试证据。
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
子仓库不应该单独维护全局任务生命周期表,也不应该自己决定跨仓 release 是否完成。
|
|
98
99
|
|
|
99
100
|
一个子仓库 `AGENTS.md` 可以很短:
|
|
100
101
|
|
|
@@ -228,7 +229,7 @@ Agent 不需要在启动时读 100 个仓库的所有文档。它先读父任务
|
|
|
228
229
|
|
|
229
230
|
避免这些做法:
|
|
230
231
|
|
|
231
|
-
-
|
|
232
|
+
- 每个子仓库各自维护全局任务生命周期表。
|
|
232
233
|
- 父仓库只有 README,没有任务、回归和 closeout。
|
|
233
234
|
- 子仓库 `AGENTS.md` 复制父仓库大段内容,导致漂移。
|
|
234
235
|
- 跨仓任务从子仓库启动,最后再补父仓库记录。
|
|
@@ -241,7 +242,8 @@ Agent 不需要在启动时读 100 个仓库的所有文档。它先读父任务
|
|
|
241
242
|
|
|
242
243
|
- 父仓库 `AGENTS.md` 写清楚它是 control repo。
|
|
243
244
|
- `docs/03-ARCHITECTURE/repository-topology.md` 列出所有子仓库。
|
|
244
|
-
- `docs/
|
|
245
|
+
- `docs/Harness-Ledger.md` 由任务文件生成全局任务生命周期索引。
|
|
246
|
+
- `docs/09-PLANNING/Delivery-SSoT.md` 只在需要跨仓 release / block 编排时维护。
|
|
245
247
|
- `docs/05-TEST-QA/Regression-SSoT.md` 定义局部、契约、集成、发布 gate。
|
|
246
248
|
- 每个子仓库只有短的局部 `AGENTS.md`。
|
|
247
249
|
- 新跨仓任务只在父仓库创建。
|