coding-agent-harness 1.0.1 → 1.0.2
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 +19 -0
- package/README.en-US.md +14 -0
- package/README.md +111 -86
- package/README.zh-CN.md +270 -0
- package/SKILL.md +116 -189
- package/docs-release/README.md +72 -5
- package/docs-release/architecture/overview.md +286 -28
- package/docs-release/architecture/overview.zh-CN.md +288 -0
- package/docs-release/assets/dashboard-overview-en.png +0 -0
- package/docs-release/assets/harness-architecture.svg +163 -0
- package/docs-release/assets/harness-workflow.svg +64 -0
- package/docs-release/guides/agent-installation.en-US.md +214 -0
- package/docs-release/guides/agent-installation.md +123 -26
- package/docs-release/guides/document-audience-and-surfaces.en-US.md +112 -0
- package/docs-release/guides/document-audience-and-surfaces.md +112 -0
- package/docs-release/guides/full-legacy-migration-subagent-strategy.md +334 -0
- package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +334 -0
- package/docs-release/guides/legacy-migration-agent-prompt.md +384 -0
- package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +361 -0
- package/docs-release/guides/migration-playbook.en-US.md +325 -0
- package/docs-release/guides/migration-playbook.md +329 -0
- package/docs-release/guides/parent-control-repository-pattern.en-US.md +252 -0
- package/docs-release/guides/parent-control-repository-pattern.md +252 -0
- package/docs-release/guides/repository-operating-models.en-US.md +196 -0
- package/docs-release/guides/repository-operating-models.md +196 -0
- package/docs-release/intl/README.md +15 -0
- package/docs-release/intl/de-DE.md +18 -0
- package/docs-release/intl/en-US.md +18 -0
- package/docs-release/intl/es-ES.md +18 -0
- package/docs-release/intl/fr-FR.md +18 -0
- package/docs-release/intl/ja-JP.md +18 -0
- package/docs-release/intl/ko-KR.md +18 -0
- package/docs-release/intl/zh-CN.md +18 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/brief.md +13 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/lesson_candidates.md +24 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/progress.md +1 -1
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/task_plan.md +4 -2
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/{visual_roadmap.md → visual_map.md} +9 -1
- package/package.json +3 -1
- package/references/agents-md-pattern.md +3 -3
- package/references/docs-directory-standard.md +47 -3
- package/references/external-source-intake-standard.md +75 -0
- package/references/harness-ledger.md +5 -3
- package/references/legacy-12-phase-bootstrap.md +41 -0
- package/references/lessons-governance.md +23 -6
- package/references/planning-loop.md +41 -3
- package/references/project-onboarding-audit.md +10 -0
- package/references/repo-governance-standard.md +2 -0
- package/references/testing-standard.md +50 -0
- package/references/walkthrough-closeout.md +6 -5
- package/scripts/check-harness.mjs +76 -35
- package/scripts/harness.mjs +303 -12
- package/scripts/lib/capability-registry.mjs +533 -0
- package/scripts/lib/check-profiles.mjs +510 -0
- package/scripts/lib/core-shared.mjs +186 -0
- package/scripts/lib/dashboard-data.mjs +389 -0
- package/scripts/lib/dashboard-workbench.mjs +217 -0
- package/scripts/lib/dashboard-writer.mjs +93 -2
- package/scripts/lib/harness-core.mjs +10 -1318
- package/scripts/lib/lesson-maintenance.mjs +145 -0
- package/scripts/lib/markdown-utils.mjs +158 -0
- package/scripts/lib/migration-planner.mjs +478 -0
- package/scripts/lib/migration-support.mjs +312 -0
- package/scripts/lib/task-lifecycle.mjs +755 -0
- package/scripts/lib/task-scanner.mjs +682 -0
- package/scripts/smoke-dashboard.mjs +22 -0
- package/scripts/test-harness.mjs +926 -14
- package/templates/AGENTS.md.template +41 -30
- package/templates/architecture/Architecture-SSoT.md +21 -0
- package/templates/architecture/README.md +49 -0
- package/templates/architecture/critical-flows.md +22 -0
- package/templates/architecture/local-repo-context.md +20 -0
- package/templates/architecture/service-catalog.md +17 -0
- package/templates/architecture/services/service-template.md +31 -0
- package/templates/architecture/system-map.md +22 -0
- package/templates/dashboard/assets/app-src/00-state.js +41 -0
- package/templates/dashboard/assets/app-src/10-router.js +76 -0
- package/templates/dashboard/assets/app-src/20-overview.js +235 -0
- package/templates/dashboard/assets/app-src/30-tasks.js +563 -0
- package/templates/dashboard/assets/app-src/40-modules.js +58 -0
- package/templates/dashboard/assets/app-src/45-review.js +128 -0
- package/templates/dashboard/assets/app-src/50-migration.js +169 -0
- package/templates/dashboard/assets/app-src/60-shared.js +61 -0
- package/templates/dashboard/assets/app-src/90-bindings.js +382 -0
- package/templates/dashboard/assets/app.css +2575 -310
- package/templates/dashboard/assets/app.js +1498 -307
- package/templates/dashboard/assets/app.manifest.json +11 -0
- package/templates/dashboard/assets/i18n.js +429 -44
- package/templates/dashboard/assets/mermaid-renderer.js +58 -8
- package/templates/development/README.md +52 -0
- package/templates/development/codebase-map.md +11 -0
- package/templates/development/cross-repo-debugging.md +18 -0
- package/templates/development/external-context/service-template.md +33 -0
- package/templates/development/external-source-packs/README.md +24 -0
- package/templates/development/external-source-packs/digest-template.md +28 -0
- package/templates/development/local-setup.md +16 -0
- package/templates/development/stubs-and-mocks.md +11 -0
- package/templates/integrations/README.md +40 -0
- package/templates/integrations/api-contract.md +42 -0
- package/templates/integrations/event-contract.md +46 -0
- package/templates/integrations/third-party/vendor-template.md +42 -0
- package/templates/integrations/webhook-contract.md +41 -0
- package/templates/planning/brief.md +32 -0
- package/templates/planning/lesson_candidates.md +58 -0
- package/templates/planning/long-running-task-contract.md +7 -0
- package/templates/planning/module_brief.md +25 -0
- package/templates/planning/module_session_prompt.md +6 -0
- package/templates/planning/task_plan.md +7 -5
- package/templates/planning/{visual_roadmap.md → visual_map.md} +24 -2
- package/templates/reference/docs-library-standard.md +31 -0
- package/templates/reference/execution-workflow-standard.md +4 -2
- package/templates/reference/external-source-intake-standard.md +82 -0
- package/templates/reference/harness-ledger-standard.md +1 -0
- package/templates/reference/repo-governance-standard.md +6 -4
- package/templates/reference/walkthrough-standard.md +2 -1
- package/templates/walkthrough/walkthrough-template.md +2 -2
- package/templates-zh-CN/AGENTS.md.template +69 -70
- package/templates-zh-CN/architecture/Architecture-SSoT.md +21 -0
- package/templates-zh-CN/architecture/README.md +51 -0
- package/templates-zh-CN/architecture/critical-flows.md +24 -0
- package/templates-zh-CN/architecture/local-repo-context.md +20 -0
- package/templates-zh-CN/architecture/service-catalog.md +17 -0
- package/templates-zh-CN/architecture/services/service-template.md +31 -0
- package/templates-zh-CN/architecture/system-map.md +22 -0
- package/templates-zh-CN/development/README.md +54 -0
- package/templates-zh-CN/development/codebase-map.md +11 -0
- package/templates-zh-CN/development/cross-repo-debugging.md +18 -0
- package/templates-zh-CN/development/external-context/service-template.md +33 -0
- package/templates-zh-CN/development/external-source-packs/README.md +24 -0
- package/templates-zh-CN/development/external-source-packs/digest-template.md +28 -0
- package/templates-zh-CN/development/local-setup.md +16 -0
- package/templates-zh-CN/development/stubs-and-mocks.md +11 -0
- package/templates-zh-CN/integrations/README.md +42 -0
- package/templates-zh-CN/integrations/api-contract.md +42 -0
- package/templates-zh-CN/integrations/event-contract.md +46 -0
- package/templates-zh-CN/integrations/third-party/vendor-template.md +42 -0
- package/templates-zh-CN/integrations/webhook-contract.md +41 -0
- package/templates-zh-CN/planning/brief.md +32 -0
- package/templates-zh-CN/planning/lesson_candidates.md +58 -0
- package/templates-zh-CN/planning/long-running-task-contract.md +1 -1
- package/templates-zh-CN/planning/module_brief.md +25 -0
- package/templates-zh-CN/planning/module_plan.md +2 -2
- package/templates-zh-CN/planning/module_session_prompt.md +4 -3
- package/templates-zh-CN/planning/task_plan.md +10 -4
- package/templates-zh-CN/planning/{visual_roadmap.md → visual_map.md} +21 -2
- package/templates-zh-CN/reference/docs-library-standard.md +35 -0
- package/templates-zh-CN/reference/execution-workflow-standard.md +9 -2
- package/templates-zh-CN/reference/external-source-intake-standard.md +82 -0
- package/templates-zh-CN/reference/harness-ledger-standard.md +5 -2
- package/templates-zh-CN/reference/repo-governance-standard.md +2 -0
- package/templates-zh-CN/reference/walkthrough-standard.md +4 -4
- package/templates-zh-CN/walkthrough/Closeout-SSoT.md +2 -2
- package/templates-zh-CN/walkthrough/walkthrough-template.md +2 -2
- package/templates-zh-CN/dashboard/assets/app.css +0 -399
- package/templates-zh-CN/dashboard/assets/app.js +0 -435
- package/templates-zh-CN/dashboard/assets/i18n.js +0 -47
- package/templates-zh-CN/dashboard/assets/markdown-reader.js +0 -116
- package/templates-zh-CN/dashboard/assets/mermaid-renderer.js +0 -59
- package/templates-zh-CN/dashboard/index.html +0 -18
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Agent 安装指南
|
|
2
2
|
|
|
3
|
+
English mirror: `docs-release/guides/agent-installation.en-US.md`
|
|
4
|
+
|
|
3
5
|
这份指南写给在目标项目里执行安装或升级的 coding agent。README 只保留给人看的定位、
|
|
4
6
|
快速开始和最小命令;安装细则放在这里和 `SKILL.md`。
|
|
5
7
|
|
|
@@ -9,15 +11,35 @@
|
|
|
9
11
|
研究命令参数、模板目录或 capability 选择;这些决策必须在 Diagnose / Decide 阶段完成,
|
|
10
12
|
并在交付 summary 中说明依据。
|
|
11
13
|
|
|
14
|
+
本文命令默认写成已安装的 `harness`。Agent 开始前先检查 `command -v harness`。
|
|
15
|
+
如果目标环境没有 `harness` 命令,不得静默全局安装;先询问用户是否允许运行
|
|
16
|
+
`npm install -g coding-agent-harness`。只有用户明确同意后才能修改全局 npm 环境。
|
|
17
|
+
用户不同意或未回复时,用 `npx --yes coding-agent-harness <command>` 运行同一条 CLI。
|
|
18
|
+
维护者在本源码仓调试时,可以把同一命令替换为 `node scripts/harness.mjs`。
|
|
19
|
+
|
|
20
|
+
`harness init` 不会把 npm 包写进目标项目依赖;它只写 Harness 文档、模板和 registry。
|
|
21
|
+
因此 agent 交付时不能暗示目标项目已经安装了 npm dependency。`npx` 第一次运行会把包
|
|
22
|
+
下载到 npm 缓存;这不是项目依赖,也不是全局命令安装。需要 CLI 时继续用
|
|
23
|
+
`npx --yes coding-agent-harness ...`、用户批准后的全局 `harness`,或源码仓的
|
|
24
|
+
`node scripts/harness.mjs`。
|
|
25
|
+
|
|
26
|
+
`npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness`
|
|
27
|
+
不是零写入操作。它会把 Skill 拷贝到目标项目的 `.agents/skills/coding-agent-harness/`
|
|
28
|
+
并写入 `skills-lock.json`。如果用户要求严格只读扫描,先跳过 Skill 安装,用
|
|
29
|
+
`npx --yes coding-agent-harness status` / `migrate-plan` 完成扫描;等用户确认允许写入后
|
|
30
|
+
再安装 Skill 或运行初始化/迁移写入命令。
|
|
31
|
+
|
|
12
32
|
使用 v1.0 六阶段流程:
|
|
13
33
|
|
|
14
|
-
1. Diagnose:扫描项目结构、语言、现有文档、CI
|
|
15
|
-
2. Decide:确定 locale、delivery model
|
|
34
|
+
1. Diagnose:扫描项目结构、语言、现有文档、CI、协作方式、外部依赖和风险面。
|
|
35
|
+
2. Decide:确定 locale、delivery model、capability packs,以及是否需要外部资料摄取。
|
|
16
36
|
3. Scaffold:运行 `harness init` 或 `harness add-capability`。
|
|
17
37
|
4. Configure:把生成文档改成项目事实;不要把模板假装成已定制标准。
|
|
18
38
|
5. Verify:运行 CLI 检查和项目原生证据。
|
|
19
39
|
6. Deliver:输出 residual、owner 和下一步。
|
|
20
40
|
|
|
41
|
+
如果 Diagnose 阶段发现项目属于微服务、多仓、前后端分仓、平台子系统,或代码里有外部服务、SDK、API gateway、message queue、webhook、contract、schema、mock,Agent 必须询问用户是否有外部资料。资料少时作为 `Source Evidence` 链接;资料多时按 `docs/11-REFERENCE/external-source-intake-standard.md` 建立 `docs/04-DEVELOPMENT/external-source-packs/<source-key>/`,再把稳定结论投影到 `03/04/06`。
|
|
42
|
+
|
|
21
43
|
## 语言规则
|
|
22
44
|
|
|
23
45
|
- 用户在场时,先问 harness 文档使用中文还是英文。
|
|
@@ -32,7 +54,17 @@
|
|
|
32
54
|
目标项目没有旧 harness 时使用这条路径:
|
|
33
55
|
|
|
34
56
|
```bash
|
|
35
|
-
|
|
57
|
+
harness init \
|
|
58
|
+
--locale zh-CN \
|
|
59
|
+
--capabilities core,dashboard \
|
|
60
|
+
/path/to/project
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
如果目标环境没有 `harness` 命令,先询问用户是否允许全局安装;同意后运行
|
|
64
|
+
`npm install -g coding-agent-harness`。未获同意时使用:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx --yes coding-agent-harness init \
|
|
36
68
|
--locale zh-CN \
|
|
37
69
|
--capabilities core,dashboard \
|
|
38
70
|
/path/to/project
|
|
@@ -43,7 +75,7 @@ Capability 要保守选择:
|
|
|
43
75
|
| Capability | 默认 | 何时选择 |
|
|
44
76
|
| --- | --- | --- |
|
|
45
77
|
| `core` | 是 | 永远安装。这是 document kernel。 |
|
|
46
|
-
| `dashboard` | 否 | 用户或 agent
|
|
78
|
+
| `dashboard` | 否 | 用户或 agent 需要本地状态页、静态证据快照,或本机动态 workbench。 |
|
|
47
79
|
| `safe-adoption` | 否 | 旧 harness 项目接入 v1.0,需要保留历史文档。 |
|
|
48
80
|
| `adversarial-review` | 否 | 发布、架构、安全、数据或策略风险需要独立 review artifact。 |
|
|
49
81
|
| `long-running-task` | 否 | Agent 需要连续多轮执行,不能每步都询问用户。 |
|
|
@@ -55,11 +87,33 @@ Capability 要保守选择:
|
|
|
55
87
|
- locale
|
|
56
88
|
- selected capabilities,以及每个可选 capability 的选择理由
|
|
57
89
|
- created / skipped files
|
|
90
|
+
- nextCommands 中推荐的 `harness dev` 或 `npx --yes coding-agent-harness dev .` 日常入口
|
|
58
91
|
- Configure 阶段做了哪些项目化改动
|
|
59
92
|
- verification commands 和结果
|
|
60
93
|
- residual owner / action / status
|
|
61
94
|
- 是否提交;如果只是 dogfood 测试,是否已清理测试产物
|
|
62
95
|
|
|
96
|
+
`init` 默认不会修改 `package.json`。只有用户明确希望目标项目保留 npm script 时,才使用
|
|
97
|
+
`--add-npm-scripts`;该选项要求目标项目已经存在 `package.json`,并且不会覆盖已有
|
|
98
|
+
`harness:dev` 或 `harness:dashboard` script。
|
|
99
|
+
|
|
100
|
+
## 外部资料摄取
|
|
101
|
+
|
|
102
|
+
当项目依赖外部微服务、外部仓库或外部团队文档时,Agent 不应该把外部资料直接塞进 `03-ARCHITECTURE`、`04-DEVELOPMENT` 或 `06-INTEGRATIONS`。正确顺序是:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
Inventory -> Classify -> Sanitize -> Digest -> Project -> Verify -> Residual
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
处理规则:
|
|
109
|
+
|
|
110
|
+
- 询问用户是否有外部架构文档、接口文档、流程图、会议纪要、链接或导出包。
|
|
111
|
+
- 确认资料是否能复制进仓;不能入仓的只保留路径、URL、owner、访问条件和 digest。
|
|
112
|
+
- 外部资料超过 5 份、跨多个主题或会持续增长时,创建 `docs/04-DEVELOPMENT/external-source-packs/<source-key>/`。
|
|
113
|
+
- `external-source-packs/` 只保存资料索引、digest 和投影状态。
|
|
114
|
+
- 稳定事实必须回写到 `03-ARCHITECTURE/services/<service-key>.md`、`04-DEVELOPMENT/external-context/<service-key>.md` 或 `06-INTEGRATIONS/<contract>.md`。
|
|
115
|
+
- 未确认或冲突的内容只能留在 source pack 或 `Do Not Assume`。
|
|
116
|
+
|
|
63
117
|
## 用户级注册
|
|
64
118
|
|
|
65
119
|
如果用户已经通过 npm 或源码拿到了 `harness` CLI,可以把本 Skill 注册到用户级
|
|
@@ -90,50 +144,93 @@ harness doctor-user --agent codex
|
|
|
90
144
|
|
|
91
145
|
## 旧 Harness 迁移
|
|
92
146
|
|
|
93
|
-
目标项目已经有旧版 harness
|
|
147
|
+
目标项目已经有旧版 harness 时使用这条路径。不要把旧文档重建一遍,也不要从
|
|
148
|
+
`add-capability` 手工拼流程;先用迁移轨道生成可验证 session:
|
|
94
149
|
|
|
95
150
|
```bash
|
|
96
|
-
|
|
151
|
+
harness migrate-run \
|
|
97
152
|
--locale zh-CN \
|
|
153
|
+
--session-dir /tmp/cah-migration-project \
|
|
154
|
+
--out-dir /tmp/cah-migration-project/dashboard \
|
|
98
155
|
/path/to/old-project
|
|
156
|
+
|
|
157
|
+
harness migrate-verify \
|
|
158
|
+
/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
|
|
99
164
|
```
|
|
100
165
|
|
|
101
166
|
规则:
|
|
102
167
|
|
|
103
168
|
- 不覆盖已有 `AGENTS.md`、`CLAUDE.md`、`docs/Harness-Ledger.md`、SSoT、
|
|
104
169
|
walkthrough、task progress 和历史 task plan。
|
|
170
|
+
- 旧项目中英文混杂时,必须显式传 `--locale zh-CN` 或 `--locale en-US`。
|
|
105
171
|
- 只补齐缺失的 v1.0 模板和 capability registry。
|
|
106
172
|
- 已有项目事实只能 merge、append 或记录 residual;不能用泛化模板替换。
|
|
107
173
|
- 历史合同缺口在普通模式下进入 `adoption-needed` warning。
|
|
108
174
|
- `--strict` 必须仍然能因为旧 checker 失败或历史合同缺口而失败。
|
|
175
|
+
- `migrate-verify` 必须通过,才能报告迁移输出可用;dashboard 路径必须是 HTML。
|
|
176
|
+
- `new-task --preset legacy-migration --from-session` 只创建 Complex Task 骨架和证据包;不会继续迁移、改写历史、stage 或 commit。
|
|
177
|
+
- 详细迁移策略见 `docs-release/guides/migration-playbook.md` 或英文镜像
|
|
178
|
+
`docs-release/guides/migration-playbook.en-US.md`。如果用户要求证明旧项目已经完整迁移,
|
|
179
|
+
还必须读取 `docs-release/guides/full-legacy-migration-subagent-strategy.md` 或中文镜像
|
|
180
|
+
`docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md`。Agent 应读取
|
|
181
|
+
`session.json` 和 `migrate-plan.json`,再逐步迁移活跃任务、当前 review、真实采用的 capability,
|
|
182
|
+
并用 subagent 审查证明 dashboard brief 覆盖、strict check 和 final session 全部通过。
|
|
109
183
|
|
|
110
|
-
##
|
|
184
|
+
## 任务生命周期
|
|
111
185
|
|
|
112
|
-
|
|
186
|
+
初始化或迁移完成后,agent 不应手工复制任务目录。使用生命周期命令创建和推进任务:
|
|
113
187
|
|
|
114
188
|
```bash
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
189
|
+
harness new-task phase-2-lifecycle \
|
|
190
|
+
--title "阶段二任务生命周期" \
|
|
191
|
+
--locale zh-CN \
|
|
192
|
+
/path/to/project
|
|
119
193
|
|
|
120
|
-
|
|
194
|
+
harness task-start phase-2-lifecycle \
|
|
195
|
+
--message "开始实现生命周期切片" \
|
|
196
|
+
/path/to/project
|
|
121
197
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
npm
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
198
|
+
harness task-log phase-2-lifecycle \
|
|
199
|
+
--message "完成 CLI 与模板更新" \
|
|
200
|
+
--evidence "command:TARGET:npm-test:passed" \
|
|
201
|
+
/path/to/project
|
|
202
|
+
|
|
203
|
+
harness review-confirm TASKS/phase-2-lifecycle \
|
|
204
|
+
--reviewer "Human Reviewer" \
|
|
205
|
+
--confirm phase-2-lifecycle \
|
|
206
|
+
/path/to/project
|
|
207
|
+
|
|
208
|
+
harness task-complete phase-2-lifecycle \
|
|
209
|
+
--message "验证闭环完成" \
|
|
210
|
+
/path/to/project
|
|
128
211
|
```
|
|
129
212
|
|
|
130
|
-
|
|
213
|
+
规则:
|
|
131
214
|
|
|
132
|
-
|
|
215
|
+
- `new-task` 创建 `brief.md`、`task_plan.md`、`execution_strategy.md`、
|
|
216
|
+
`visual_map.md`、`findings.md`、`progress.md` 和 `review.md`。
|
|
217
|
+
- 已存在的任务目录不会被覆盖;需要改名或继续旧任务时,由 coordinator 决定。
|
|
218
|
+
- `task-start`、`task-block`、`task-complete` 只更新 `progress.md` 的生命周期状态和日志。
|
|
219
|
+
- `task-log` 只追加执行记录;证据使用 `type:PATH:summary`,例如
|
|
220
|
+
`command:TARGET:npm-test:passed`。
|
|
221
|
+
- `review-confirm` 会向 `review.md` 追加人工审查确认,并向 `progress.md` 追加日志;如果存在 `Open: yes` 或 `Blocks Release: yes` 的开放 P0/P1/P2 finding,必须拒绝确认。
|
|
222
|
+
- `status --json` 保留旧 `task.state` 用于兼容,并新增 `lifecycleState`、`reviewStatus`、`closeoutStatus` 和 `stateConflicts`。`done` 只表示实现完成,不等于 `closed`。
|
|
223
|
+
- 人工操作入口使用本地 HTML workbench:`harness dev /path/to/project`。它会启动只绑定 `127.0.0.1` 的动态页面、自动选择端口、打开浏览器并随 docs 变更刷新。无 GUI 或 CI 场景使用 `harness dev --no-open /path/to/project`。
|
|
224
|
+
- 底层兼容入口仍是 `harness dashboard --workbench --out-dir /tmp/harness-workbench /path/to/project`。静态 dashboard 文件仍然只读,不能承载人工确认动作。
|
|
225
|
+
- `task-list --json` 和 `status --json` 是 dashboard、reviewer 和后续 agent 的读取入口。
|
|
133
226
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
| 旧 harness 迁移 | 旧项目 `add-capability safe-adoption --locale ...` 后,旧文件不被覆盖,缺失 v1.0 模板被补齐,普通模式 warning,strict 模式能阻塞历史缺口。 |
|
|
227
|
+
## 验证命令
|
|
228
|
+
|
|
229
|
+
安装或升级收口前,至少运行:
|
|
138
230
|
|
|
139
|
-
|
|
231
|
+
```bash
|
|
232
|
+
harness check --profile target-project /path/to/project
|
|
233
|
+
harness status --json /path/to/project
|
|
234
|
+
harness dev --no-open --out-dir /tmp/harness-workbench /path/to/project
|
|
235
|
+
harness dashboard --out /tmp/harness-dashboard.html /path/to/project
|
|
236
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Document Audiences And Surfaces
|
|
2
|
+
|
|
3
|
+
Chinese mirror: `docs-release/guides/document-audience-and-surfaces.md`
|
|
4
|
+
|
|
5
|
+
Coding Agent Harness documentation is not one uniform pile of Markdown. It serves three audiences:
|
|
6
|
+
|
|
7
|
+
- Humans who need to understand the product, architecture, migration path, and project state.
|
|
8
|
+
- Agents that need executable entrypoints, rules, task contracts, and evidence paths.
|
|
9
|
+
- Release systems that need to know which files can ship publicly and which files are only local operating state.
|
|
10
|
+
|
|
11
|
+
If these audiences are mixed, the documentation becomes unclear. Humans cannot find the decision, and agents cannot tell which file is authoritative.
|
|
12
|
+
|
|
13
|
+
## Principle
|
|
14
|
+
|
|
15
|
+
Human-facing docs explain intent and judgment.
|
|
16
|
+
|
|
17
|
+
Agent-facing docs define facts, paths, gates, and next actions.
|
|
18
|
+
|
|
19
|
+
Release docs explain public methodology and product capability. They do not carry a team's private operating ledger.
|
|
20
|
+
|
|
21
|
+
## Documentation Surfaces
|
|
22
|
+
|
|
23
|
+
| Surface | Primary reader | Contains | Does not contain |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| `README.md` | Humans | What the project is, how to start, key links | Long-running task state, private ledgers |
|
|
26
|
+
| `docs-release/` | Humans and evaluators | Public architecture, guides, patterns, migration tutorials | Private task plans, internal reviews, customer-specific operating state |
|
|
27
|
+
| `references/` | Agents and maintainers | Reusable standards such as testing, workflow, review, worktree rules | A project's current schedule |
|
|
28
|
+
| `templates/` | CLI and agents | Files generated into target projects | Evidence from completed work |
|
|
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 |
|
|
31
|
+
| Target `docs/05-TEST-QA/` | Agents, QA, human reviewers | Regression SSoT, Cadence Ledger, quality gates | Requirement brainstorm drafts |
|
|
32
|
+
| Target `docs/10-WALKTHROUGH/` | Reviewers and handoff agents | Closeout evidence, residuals, human confirmation | Unverified plans |
|
|
33
|
+
|
|
34
|
+
## Human-Facing Docs
|
|
35
|
+
|
|
36
|
+
Human-facing docs answer:
|
|
37
|
+
|
|
38
|
+
- What problem does this method solve?
|
|
39
|
+
- Which repository operating model should I choose?
|
|
40
|
+
- What are the risks when migrating an old project?
|
|
41
|
+
- What evidence should make me trust that the agent stayed on track?
|
|
42
|
+
|
|
43
|
+
Typical files:
|
|
44
|
+
|
|
45
|
+
- `docs-release/architecture/overview.md`
|
|
46
|
+
- `docs-release/guides/repository-operating-models.en-US.md`
|
|
47
|
+
- `docs-release/guides/parent-control-repository-pattern.en-US.md`
|
|
48
|
+
- `docs-release/guides/migration-playbook.en-US.md`
|
|
49
|
+
|
|
50
|
+
Human-facing docs may explain tradeoffs, examples, and decisions, but they should not be the only source of truth. Live project state belongs in SSoTs, task files, reviews, walkthroughs, and regression files.
|
|
51
|
+
|
|
52
|
+
## Agent-Facing Docs
|
|
53
|
+
|
|
54
|
+
Agent-facing docs answer:
|
|
55
|
+
|
|
56
|
+
- Where do I start reading?
|
|
57
|
+
- Which files are authoritative?
|
|
58
|
+
- Which paths may I edit?
|
|
59
|
+
- Which checks must I run after editing?
|
|
60
|
+
- When must I stop and ask a human?
|
|
61
|
+
|
|
62
|
+
Typical files:
|
|
63
|
+
|
|
64
|
+
- `AGENTS.md`
|
|
65
|
+
- `docs/09-PLANNING/Feature-SSoT.md`
|
|
66
|
+
- `docs/09-PLANNING/TASKS/<task>/task_plan.md`
|
|
67
|
+
- `docs/09-PLANNING/TASKS/<task>/progress.md`
|
|
68
|
+
- `docs/05-TEST-QA/Regression-SSoT.md`
|
|
69
|
+
- `docs/10-WALKTHROUGH/<date>-<task>.md`
|
|
70
|
+
- `docs/11-REFERENCE/*.md`
|
|
71
|
+
|
|
72
|
+
Agent-facing docs should be concrete, path-oriented, and checkable. Do not turn them into essays, and do not make agents infer execution contracts from narrative prose.
|
|
73
|
+
|
|
74
|
+
## Release Docs
|
|
75
|
+
|
|
76
|
+
Release docs explain the public capability of Coding Agent Harness. They should not record the maintainers' private development process.
|
|
77
|
+
|
|
78
|
+
Good release docs include:
|
|
79
|
+
|
|
80
|
+
- Architecture overviews.
|
|
81
|
+
- Installation and migration guides.
|
|
82
|
+
- Single-repo, multi-repo, and parent-control operating model guidance.
|
|
83
|
+
- Public migration prompts for agents.
|
|
84
|
+
- Reusable engineering methodology.
|
|
85
|
+
|
|
86
|
+
Do not publish:
|
|
87
|
+
|
|
88
|
+
- In-progress conclusions from private tasks.
|
|
89
|
+
- Private review drafts.
|
|
90
|
+
- Machine-local paths that only work for one maintainer.
|
|
91
|
+
- Customer or team internal state.
|
|
92
|
+
- Ledgers, handoffs, or walkthroughs that have not been sanitized for release.
|
|
93
|
+
|
|
94
|
+
## Writing Rules
|
|
95
|
+
|
|
96
|
+
1. Identify the reader before choosing the file.
|
|
97
|
+
2. Human docs explain why; agent docs define how.
|
|
98
|
+
3. Public docs may describe patterns and structures, but not private operating state.
|
|
99
|
+
4. Task state belongs in SSoTs, task files, reviews, walkthroughs, and ledgers.
|
|
100
|
+
5. If one document tries to be both a human explanation and an agent execution contract, split it into a public guide and an execution contract.
|
|
101
|
+
|
|
102
|
+
## A Useful Test
|
|
103
|
+
|
|
104
|
+
Before writing a document, ask:
|
|
105
|
+
|
|
106
|
+
> Who reads this file, at what moment, and what action should they take after reading it?
|
|
107
|
+
|
|
108
|
+
If the answer is "a human uses it to understand," put it in a public guide or architecture doc.
|
|
109
|
+
|
|
110
|
+
If the answer is "an agent uses it to execute," put it in the target project's entrypoint, task, standard, or regression files.
|
|
111
|
+
|
|
112
|
+
If the answer is "a maintainer records how this source repository is being operated," it is not a public release document.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# 文档受众与表面边界
|
|
2
|
+
|
|
3
|
+
English mirror: `docs-release/guides/document-audience-and-surfaces.en-US.md`
|
|
4
|
+
|
|
5
|
+
Coding Agent Harness 的文档不是一类东西。它同时服务三种读者:
|
|
6
|
+
|
|
7
|
+
- 人:需要理解产品、架构、迁移方式和项目状态。
|
|
8
|
+
- Agent:需要可执行的入口、规则、任务合同和证据路径。
|
|
9
|
+
- 发布系统:需要知道哪些文件可以进入公开包,哪些文件只是本地运行状态。
|
|
10
|
+
|
|
11
|
+
如果不区分受众,文档会变成一堆 Markdown。人看不出重点,Agent 也不知道应该信哪一份。
|
|
12
|
+
|
|
13
|
+
## 总原则
|
|
14
|
+
|
|
15
|
+
人读的文档解释意图和判断。
|
|
16
|
+
|
|
17
|
+
Agent 读的文档定义事实、路径、门禁和下一步动作。
|
|
18
|
+
|
|
19
|
+
发布文档说明方法论和产品能力,不携带某个团队的私有运行台账。
|
|
20
|
+
|
|
21
|
+
## 文档表面
|
|
22
|
+
|
|
23
|
+
| 表面 | 主要读者 | 放什么 | 不放什么 |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| `README.md` | 人 | 项目是什么、如何开始、关键链接 | 长任务状态、私有 ledger |
|
|
26
|
+
| `docs-release/` | 人和评估者 | 公开架构、指南、模式说明、迁移教程 | 私有任务计划、内部 review、客户现场状态 |
|
|
27
|
+
| `references/` | Agent 和维护者 | 可复用标准,例如 testing、workflow、review、worktree | 某个项目的当前排期 |
|
|
28
|
+
| `templates/` | CLI 和 Agent | 初始化目标项目时生成的文件 | 已经执行过的任务证据 |
|
|
29
|
+
| 目标项目 `AGENTS.md` | Agent | 入口、路由、硬规则、读文件矩阵 | 大段背景叙事 |
|
|
30
|
+
| 目标项目 `docs/09-PLANNING/` | Agent 和项目负责人 | Feature SSoT、任务计划、当前状态 | 通用营销材料 |
|
|
31
|
+
| 目标项目 `docs/05-TEST-QA/` | Agent、QA、人审 | Regression SSoT、Cadence Ledger、质量门禁 | 需求讨论草稿 |
|
|
32
|
+
| 目标项目 `docs/10-WALKTHROUGH/` | 人审、接手 Agent | 收口证据、残留项、人工确认 | 未验证的计划 |
|
|
33
|
+
|
|
34
|
+
## 人读文档
|
|
35
|
+
|
|
36
|
+
人读文档要回答:
|
|
37
|
+
|
|
38
|
+
- 这套方法解决什么问题?
|
|
39
|
+
- 我应该选择哪种仓库组织方式?
|
|
40
|
+
- 迁移旧项目时风险在哪里?
|
|
41
|
+
- 什么证据能让我相信 Agent 没有跑偏?
|
|
42
|
+
|
|
43
|
+
典型文件:
|
|
44
|
+
|
|
45
|
+
- `docs-release/architecture/overview.zh-CN.md`
|
|
46
|
+
- `docs-release/guides/repository-operating-models.md`
|
|
47
|
+
- `docs-release/guides/parent-control-repository-pattern.md`
|
|
48
|
+
- `docs-release/guides/migration-playbook.md`
|
|
49
|
+
|
|
50
|
+
人读文档可以讲取舍、例子和判断过程,但不能成为唯一事实源。真正的项目状态必须落到 SSoT、task、review、walkthrough 和 regression 文件里。
|
|
51
|
+
|
|
52
|
+
## Agent 读文档
|
|
53
|
+
|
|
54
|
+
Agent 读文档要回答:
|
|
55
|
+
|
|
56
|
+
- 我从哪里开始读?
|
|
57
|
+
- 哪些文件是事实源?
|
|
58
|
+
- 我可以改哪些路径?
|
|
59
|
+
- 改完要跑哪些检查?
|
|
60
|
+
- 什么条件下必须停下来问人?
|
|
61
|
+
|
|
62
|
+
典型文件:
|
|
63
|
+
|
|
64
|
+
- `AGENTS.md`
|
|
65
|
+
- `docs/09-PLANNING/Feature-SSoT.md`
|
|
66
|
+
- `docs/09-PLANNING/TASKS/<task>/task_plan.md`
|
|
67
|
+
- `docs/09-PLANNING/TASKS/<task>/progress.md`
|
|
68
|
+
- `docs/05-TEST-QA/Regression-SSoT.md`
|
|
69
|
+
- `docs/10-WALKTHROUGH/<date>-<task>.md`
|
|
70
|
+
- `docs/11-REFERENCE/*.md`
|
|
71
|
+
|
|
72
|
+
Agent 文档应该具体、短路径、可检查。不要把它写成文章,也不要让 Agent 从长篇叙事里猜执行合同。
|
|
73
|
+
|
|
74
|
+
## 发布文档
|
|
75
|
+
|
|
76
|
+
发布文档要解释 Coding Agent Harness 的公开能力,而不是记录维护者自己的开发过程。
|
|
77
|
+
|
|
78
|
+
可以发布:
|
|
79
|
+
|
|
80
|
+
- 架构总览。
|
|
81
|
+
- 安装和迁移指南。
|
|
82
|
+
- 单仓、多仓、主控仓库模式的选择指南。
|
|
83
|
+
- 给 Agent 使用的公开迁移 prompt。
|
|
84
|
+
- 可复用的工程方法论。
|
|
85
|
+
|
|
86
|
+
不应发布:
|
|
87
|
+
|
|
88
|
+
- 某个私有任务的进行中结论。
|
|
89
|
+
- 私有 review 草稿。
|
|
90
|
+
- 只对某台机器有效的路径。
|
|
91
|
+
- 客户或团队内部状态。
|
|
92
|
+
- 还没有脱敏的 ledger、handoff、walkthrough。
|
|
93
|
+
|
|
94
|
+
## 写作规则
|
|
95
|
+
|
|
96
|
+
1. 先判断读者,再写文件。
|
|
97
|
+
2. 人读文档负责解释为什么;Agent 文档负责定义怎么做。
|
|
98
|
+
3. 公开文档可以引用模式和结构,不要引用私有运行状态。
|
|
99
|
+
4. 任务状态只写在 SSoT、task、review、walkthrough 和 ledger 里。
|
|
100
|
+
5. 如果一个文档既要给人读又要给 Agent 执行,把它拆成两份:公开说明和执行合同。
|
|
101
|
+
|
|
102
|
+
## 一个判断问题
|
|
103
|
+
|
|
104
|
+
写文档前问一句:
|
|
105
|
+
|
|
106
|
+
> 这个文件被谁在什么时刻读取,并且读取后要做什么动作?
|
|
107
|
+
|
|
108
|
+
如果答案是“人用来理解”,放在公开指南或架构文档里。
|
|
109
|
+
|
|
110
|
+
如果答案是“Agent 用来执行”,放在目标项目的入口、任务、标准或回归文件里。
|
|
111
|
+
|
|
112
|
+
如果答案是“维护者记录当前仓库如何运转”,它不是公开发布文档。
|