coding-agent-harness 1.0.1 → 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 +44 -0
- package/CONTRIBUTING.md +98 -0
- package/README.en-US.md +14 -0
- package/README.md +230 -80
- package/README.zh-CN.md +290 -0
- package/SKILL.md +132 -198
- package/docs-release/README.md +80 -9
- package/docs-release/architecture/overview.md +298 -28
- package/docs-release/architecture/overview.zh-CN.md +292 -0
- package/docs-release/assets/dashboard-overview.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 +237 -0
- package/docs-release/guides/agent-installation.md +149 -27
- 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 +113 -0
- package/docs-release/guides/document-audience-and-surfaces.md +113 -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 +373 -0
- package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +350 -0
- package/docs-release/guides/migration-playbook.en-US.md +324 -0
- package/docs-release/guides/migration-playbook.md +328 -0
- package/docs-release/guides/parent-control-repository-pattern.en-US.md +254 -0
- package/docs-release/guides/parent-control-repository-pattern.md +254 -0
- package/docs-release/guides/preset-development.md +214 -0
- package/docs-release/guides/repository-operating-models.en-US.md +197 -0
- package/docs-release/guides/repository-operating-models.md +197 -0
- 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/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/findings.md +7 -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 +10 -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 +5 -5
- package/references/delivery-operating-model-standard.md +3 -3
- package/references/docs-directory-standard.md +53 -10
- package/references/external-source-intake-standard.md +75 -0
- package/references/harness-ledger.md +53 -94
- package/references/legacy-12-phase-bootstrap.md +41 -0
- package/references/lessons-governance.md +100 -88
- package/references/module-parallel-standard.md +14 -14
- package/references/planning-loop.md +51 -7
- package/references/project-onboarding-audit.md +10 -0
- package/references/pull-request-standard.md +118 -0
- package/references/repo-governance-standard.md +12 -1
- 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/testing-standard.md +50 -0
- package/references/walkthrough-closeout.md +10 -9
- package/scripts/check-harness.mjs +111 -331
- 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 +106 -20
- package/scripts/lib/capability-registry.mjs +591 -0
- package/scripts/lib/check-module-parallel.mjs +237 -0
- package/scripts/lib/check-profiles.mjs +418 -0
- package/scripts/lib/check-task-contracts.mjs +47 -0
- package/scripts/lib/core-shared.mjs +196 -0
- package/scripts/lib/dashboard-data.mjs +412 -0
- package/scripts/lib/dashboard-workbench.mjs +257 -0
- package/scripts/lib/dashboard-writer.mjs +107 -4
- 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 +15 -1318
- package/scripts/lib/lesson-maintenance.mjs +152 -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/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 +649 -0
- package/scripts/lib/task-review-model.mjs +469 -0
- package/scripts/lib/task-scanner.mjs +576 -0
- 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/{templates/planning/visual_roadmap.md → skills/preset-creator/references/complex-task-skeleton/visual_map.md} +24 -2
- package/skills/preset-creator/references/preset-package-skeleton.md +296 -0
- package/templates/AGENTS.md.template +51 -36
- 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 +42 -0
- package/templates/dashboard/assets/app-src/10-router.js +77 -0
- package/templates/dashboard/assets/app-src/20-overview.js +241 -0
- package/templates/dashboard/assets/app-src/30-tasks.js +409 -0
- package/templates/dashboard/assets/app-src/35-task-detail.js +246 -0
- package/templates/dashboard/assets/app-src/40-modules.js +58 -0
- package/templates/dashboard/assets/app-src/45-review.js +347 -0
- package/templates/dashboard/assets/app-src/50-migration.js +183 -0
- package/templates/dashboard/assets/app-src/60-shared.js +61 -0
- package/templates/dashboard/assets/app-src/90-bindings.js +524 -0
- package/templates/dashboard/assets/app.css +3107 -300
- package/templates/dashboard/assets/app.css.manifest.json +9 -0
- package/templates/dashboard/assets/app.js +2068 -306
- package/templates/dashboard/assets/app.manifest.json +12 -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 +531 -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/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/brief.md +32 -0
- package/templates/planning/execution_strategy.md +31 -0
- package/templates/planning/lesson_candidates.md +70 -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/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 +40 -15
- package/templates/planning/visual_map.md +50 -0
- package/templates/reference/docs-library-standard.md +31 -0
- package/templates/reference/execution-workflow-standard.md +5 -2
- package/templates/reference/external-source-intake-standard.md +82 -0
- package/templates/reference/harness-ledger-standard.md +1 -0
- package/templates/reference/pull-request-standard.md +80 -0
- package/templates/reference/repo-governance-standard.md +8 -5
- package/templates/reference/review-routing-standard.md +6 -0
- package/templates/reference/walkthrough-standard.md +3 -1
- package/templates/verifier/verifier-output.md +1 -1
- package/templates/walkthrough/walkthrough-template.md +2 -2
- package/templates-zh-CN/AGENTS.md.template +73 -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/ledger/Harness-Ledger.md +17 -40
- package/templates-zh-CN/planning/brief.md +32 -0
- package/templates-zh-CN/planning/execution_strategy.md +30 -0
- package/templates-zh-CN/planning/lesson_candidates.md +70 -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/review.md +59 -1
- package/templates-zh-CN/planning/task_plan.md +37 -11
- package/templates-zh-CN/planning/{visual_roadmap.md → visual_map.md} +21 -2
- package/templates-zh-CN/reference/adversarial-review-standard.md +1 -1
- package/templates-zh-CN/reference/docs-library-standard.md +36 -1
- package/templates-zh-CN/reference/execution-workflow-standard.md +10 -2
- package/templates-zh-CN/reference/external-source-intake-standard.md +82 -0
- package/templates-zh-CN/reference/harness-ledger-standard.md +7 -4
- package/templates-zh-CN/reference/pull-request-standard.md +106 -0
- package/templates-zh-CN/reference/repo-governance-standard.md +4 -1
- package/templates-zh-CN/reference/review-routing-standard.md +8 -1
- package/templates-zh-CN/reference/walkthrough-standard.md +6 -5
- package/templates-zh-CN/walkthrough/Closeout-SSoT.md +2 -2
- package/templates-zh-CN/walkthrough/walkthrough-template.md +2 -2
- package/scripts/smoke-dashboard.mjs +0 -70
- package/scripts/test-harness.mjs +0 -483
- package/templates/ssot/Feature-SSoT.md +0 -43
- package/templates/ssot/Lessons-SSoT.md +0 -44
- 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
- package/templates-zh-CN/ssot/Feature-SSoT.md +0 -49
- package/templates-zh-CN/ssot/Lessons-SSoT.md +0 -49
|
@@ -6,11 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
## 任务目录结构
|
|
8
8
|
|
|
9
|
+
任务信息架构预算决定默认脚手架:
|
|
10
|
+
|
|
11
|
+
| Budget | 适用场景 | 默认文件 |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `simple` | 单 owner、无 subagent、L0/L1 证据、可跳过正式 review gate | `brief.md`, `task_plan.md`, `visual_map.md`, `progress.md` |
|
|
14
|
+
| `standard` | 常规功能、修复、文档任务,需要完整可追溯记录 | 完整任务文件 |
|
|
15
|
+
| `complex` | L2/L3 证据、subagent/reviewer、外部参考、生成产物或 optional indexes | 完整任务文件 + 按需 optional structure |
|
|
16
|
+
|
|
17
|
+
`trivial` 不进入 CLI:小到不值得建立任务目录的修改,可以直接执行并在 commit 或交付说明中写清楚原因。
|
|
18
|
+
|
|
9
19
|
```
|
|
10
20
|
docs/09-PLANNING/TASKS/<YYYY-MM-DD-任务名>/
|
|
11
21
|
├── task_plan.md ← 计划:目标、范围、步骤、验收标准
|
|
12
22
|
├── execution_strategy.md ← 执行策略:模式、subagent、冲突控制、验证深度、handoff
|
|
13
|
-
├──
|
|
23
|
+
├── visual_map.md ← 图表集合:阶段图、架构图、时序图、数据流、状态机、完成度、证据状态
|
|
14
24
|
├── findings.md ← 发现:执行过程中的研究发现和技术决策
|
|
15
25
|
├── progress.md ← 进度:每个阶段的状态更新和验证结果
|
|
16
26
|
├── review.md ← 对抗性审查报告(需要 reviewer / subagent / release review 时必填)
|
|
@@ -43,8 +53,9 @@ slices/<slice-id>/review.md
|
|
|
43
53
|
6. **长程任务必须补合同** — 如果任务需要连续执行、多轮审查或子代理 review,先补 `long-running-task-contract.md`
|
|
44
54
|
7. **任务收口必须回写 Harness Ledger** — 只在任务完成或上下文回写状态变化时记录,不记录每次 `progress.md` 更新
|
|
45
55
|
8. **复杂任务必须记录 `execution_strategy.md`** — 是否使用 subagent、reviewer、worktree、handoff 都写入独立文件。
|
|
46
|
-
9. **非平凡任务必须记录 `
|
|
56
|
+
9. **非平凡任务必须记录 `visual_map.md`** — 这是任务图表集合,不只是 roadmap;HTML dashboard 从独立文件的 phase table 计算完成度、阻塞和证据状态。
|
|
47
57
|
10. **路径必须带来源前缀** — 使用 `PUBLIC:`, `PRIVATE:`, `TARGET:`, `EXTERNAL:`, `URL:`,避免脆弱相对路径。
|
|
58
|
+
11. **已验证切片必须主动提交** — 每个有意义的工作切片通过对应检查后,agent 默认主动 commit;只有用户明确要求暂不提交、检查失败、或 dirty diff 归属未清时才延期,并把 no-commit reason、owner 和下一步写入 progress / handoff。
|
|
48
59
|
|
|
49
60
|
## task_plan.md 模板
|
|
50
61
|
|
|
@@ -65,10 +76,15 @@ slices/<slice-id>/review.md
|
|
|
65
76
|
| --- | --- | --- | --- | --- |
|
|
66
77
|
|
|
67
78
|
## Execution & Visualization Files
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
Do not manually copy task templates. Create task folders through `harness new-task`
|
|
80
|
+
so the selected budget creates the correct files and `harness check` can enforce
|
|
81
|
+
the same contract.
|
|
82
|
+
|
|
83
|
+
| Budget | Required Files |
|
|
84
|
+
| --- | --- |
|
|
85
|
+
| simple | `brief.md`, `task_plan.md`, `visual_map.md`, `progress.md` |
|
|
86
|
+
| standard | simple files plus `execution_strategy.md`, `findings.md`, `lesson_candidates.md`, `review.md` |
|
|
87
|
+
| complex | standard files plus `references/INDEX.md`, `artifacts/INDEX.md` |
|
|
72
88
|
|
|
73
89
|
## 步骤
|
|
74
90
|
1. [步骤1]
|
|
@@ -181,12 +197,40 @@ Evidence values use `type:path:summary`.
|
|
|
181
197
|
## 状态流转
|
|
182
198
|
|
|
183
199
|
```
|
|
200
|
+
simple:
|
|
184
201
|
未开始 → 进行中 → 已完成
|
|
185
202
|
↓
|
|
186
203
|
已阻塞 → 进行中
|
|
204
|
+
|
|
205
|
+
standard / complex:
|
|
206
|
+
未开始 → 进行中 → 审查中 → 已完成
|
|
207
|
+
↓
|
|
208
|
+
已阻塞 → 进行中
|
|
187
209
|
```
|
|
188
210
|
|
|
189
|
-
|
|
211
|
+
`task-review` 是 standard / complex 任务进入执行审查的唯一 CLI 路径。`task-complete`
|
|
212
|
+
对 standard / complex 是硬门禁:当前状态不是 `review` 时必须拒绝。`simple`
|
|
213
|
+
可以直接从 `in_progress` 完成。
|
|
214
|
+
|
|
215
|
+
每次状态变更时,必须更新 task-local facts,例如 `progress.md`、`review.md` 或 `lesson_candidates.md`。任务生命周期总表由 lifecycle CLI 或 `harness governance rebuild` 生成,不手工维护 Feature lifecycle 表。
|
|
190
216
|
|
|
191
217
|
任务完成时,必须在 `docs/Harness-Ledger.md` 中记录本轮 task plan、SSoT、
|
|
192
218
|
walkthrough、Lessons 检查等上下文回写结果。
|
|
219
|
+
|
|
220
|
+
## Commit Convention
|
|
221
|
+
|
|
222
|
+
非平凡任务不是等用户提醒才提交。每个已验证、有意义、范围清晰的切片都应形成 commit。
|
|
223
|
+
提交前只 stage 本任务范围内文件;无关 dirty 文件、私有文件和生成产物必须保留原样或按项目规则处理。
|
|
224
|
+
不能提交时必须写清 no-commit reason、owner 和下一步;归属不清的 dirty diff 不能被混入本任务提交。
|
|
225
|
+
|
|
226
|
+
任务相关 commit 应在 message footer 中引用任务 ID:
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
feat: implement task review gate
|
|
230
|
+
|
|
231
|
+
Harness: TASKS/2026-05-21-task-review-gate
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
格式:`Harness: <task-id>`,其中 task-id 是 `task-list --json` 输出的 `id` 字段。
|
|
235
|
+
不建目录的小修改可以使用 `Harness: trivial` 或省略 footer。1.0 只定义约定,不强制
|
|
236
|
+
扫描 git 历史;后续可通过 reconcile 命令补工具化检查。
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
- 有没有 docs/ 目录?结构如何?
|
|
26
26
|
- 有没有 README 以外的开发文档?
|
|
27
27
|
- 有没有架构设计文档?
|
|
28
|
+
- 如果项目属于微服务、多仓或前后端分仓,用户是否有外部服务文档、接口文档、架构图、会议纪要、链接或导出包?
|
|
29
|
+
- 外部资料能否复制进本仓?如果不能,是否需要只保存本地路径、URL、owner 和摘要?
|
|
28
30
|
|
|
29
31
|
### 4. 现有测试
|
|
30
32
|
- 有没有测试框架?(jest / vitest / pytest / go test 等)
|
|
@@ -98,6 +100,7 @@
|
|
|
98
100
|
| Regression 体系 | [有/无/需改造] | 🟢/🟡/🔴 |
|
|
99
101
|
| CI/CD | [有/无/需改造] | 🟢/🟡/🔴 |
|
|
100
102
|
| Repo Governance | [有/无/需改造] | 🟢/🟡/🔴 |
|
|
103
|
+
| External Source Intake | [无外部资料 / 少量 evidence 链接 / 需要 source pack / 需询问用户] | 🟢/🟡/🔴 |
|
|
101
104
|
| Branch Protection | [designed/implemented/verified/blocked] | 🟢/🟡/🔴 |
|
|
102
105
|
| Required Checks | [有/无/需改造] | 🟢/🟡/🔴 |
|
|
103
106
|
| Harness Ledger | [有/无/需改造] | 🟢/🟡/🔴 |
|
|
@@ -109,6 +112,13 @@
|
|
|
109
112
|
2. [Surface 2]:[描述]
|
|
110
113
|
...
|
|
111
114
|
|
|
115
|
+
## 外部资料判断
|
|
116
|
+
|
|
117
|
+
- 是否属于微服务 / 多仓 / 前后端分仓:[是/否/不确定]
|
|
118
|
+
- 是否已询问用户外部资料:[是/否/不适用]
|
|
119
|
+
- 外部资料规模:[无 / 1-4 份 / 5+ 份 / 未知]
|
|
120
|
+
- 推荐处理:[仅作为 Source Evidence / 创建 external-source-packs/<source-key> / 暂停等待用户提供资料 / 不适用]
|
|
121
|
+
|
|
112
122
|
## 推荐 Harness 规模
|
|
113
123
|
[Lite / Standard / Full](见下方项目类型分支)
|
|
114
124
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Pull Request Standard
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Every non-trivial PR must be reviewable without reading the full agent
|
|
6
|
+
conversation. The PR body is a handoff packet for maintainers: what changed,
|
|
7
|
+
why it changed, how it was verified, which version is affected, and what risks
|
|
8
|
+
remain.
|
|
9
|
+
|
|
10
|
+
## Required Shape
|
|
11
|
+
|
|
12
|
+
Use a bilingual PR body when the repository has Chinese and English users or
|
|
13
|
+
the task discussion is Chinese. English comes first for public GitHub readers,
|
|
14
|
+
then Simplified Chinese.
|
|
15
|
+
|
|
16
|
+
The PR body must include:
|
|
17
|
+
|
|
18
|
+
1. Summary / 摘要
|
|
19
|
+
2. What Changed / 改动内容
|
|
20
|
+
3. Version Impact / 版本影响
|
|
21
|
+
4. Verification / 验证
|
|
22
|
+
5. Review Evidence / 审查证据
|
|
23
|
+
6. Residual Risk / 残余风险
|
|
24
|
+
7. References / 关联材料
|
|
25
|
+
|
|
26
|
+
## Content Rules
|
|
27
|
+
|
|
28
|
+
- State the target version explicitly. If `package.json` changes from `1.0.3`
|
|
29
|
+
to `1.0.4`, say so in Version Impact.
|
|
30
|
+
- List changed surfaces by user-visible area or module, not by dumping every
|
|
31
|
+
file path.
|
|
32
|
+
- Verification must name the real commands, browser checks, CI runs, or
|
|
33
|
+
evidence artifacts. If a check was not run, say why.
|
|
34
|
+
- Review Evidence must mention self-review, subagent review, human review, or
|
|
35
|
+
code-quality review status. Release-blocking findings must be closed or
|
|
36
|
+
routed before merge.
|
|
37
|
+
- Residual Risk must distinguish accepted risk, deferred follow-up, and
|
|
38
|
+
unrelated local/private debt.
|
|
39
|
+
- References must link relevant task docs, SSoT rows, review files, commits,
|
|
40
|
+
issues, or PRs.
|
|
41
|
+
|
|
42
|
+
## Template
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
## Summary
|
|
46
|
+
|
|
47
|
+
[One or two sentences explaining the intent and outcome.]
|
|
48
|
+
|
|
49
|
+
## What Changed
|
|
50
|
+
|
|
51
|
+
- [User-facing or module-level change.]
|
|
52
|
+
- [Governance, CLI, dashboard, docs, or template change.]
|
|
53
|
+
|
|
54
|
+
## Version Impact
|
|
55
|
+
|
|
56
|
+
- Package version: `[old]` -> `[new]`
|
|
57
|
+
- Release notes: [CHANGELOG entry or reason no release note is needed]
|
|
58
|
+
|
|
59
|
+
## Verification
|
|
60
|
+
|
|
61
|
+
- `[command]`: pass
|
|
62
|
+
- `[browser/runtime/CI evidence]`: pass
|
|
63
|
+
- Not run: [reason]
|
|
64
|
+
|
|
65
|
+
## Review Evidence
|
|
66
|
+
|
|
67
|
+
- Self-review: [summary]
|
|
68
|
+
- Additional review: [reviewer/subagent/human result]
|
|
69
|
+
- Blocking findings: [none / closed / routed]
|
|
70
|
+
|
|
71
|
+
## Residual Risk
|
|
72
|
+
|
|
73
|
+
- [none / accepted / deferred / unrelated debt]
|
|
74
|
+
|
|
75
|
+
## References
|
|
76
|
+
|
|
77
|
+
- Task: [path or issue]
|
|
78
|
+
- Review: [path or PR review]
|
|
79
|
+
- Evidence: [path, commit, screenshot, workflow, or dashboard]
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 摘要
|
|
84
|
+
|
|
85
|
+
[用一两句话说明目标和结果。]
|
|
86
|
+
|
|
87
|
+
## 改动内容
|
|
88
|
+
|
|
89
|
+
- [面向用户或模块级改动。]
|
|
90
|
+
- [治理、CLI、Dashboard、文档或模板改动。]
|
|
91
|
+
|
|
92
|
+
## 版本影响
|
|
93
|
+
|
|
94
|
+
- 包版本:`[旧版本]` -> `[新版本]`
|
|
95
|
+
- 发布说明:[CHANGELOG 条目或无需发布说明的原因]
|
|
96
|
+
|
|
97
|
+
## 验证
|
|
98
|
+
|
|
99
|
+
- `[命令]`:通过
|
|
100
|
+
- `[浏览器 / 运行时 / CI 证据]`:通过
|
|
101
|
+
- 未运行:[原因]
|
|
102
|
+
|
|
103
|
+
## 审查证据
|
|
104
|
+
|
|
105
|
+
- 自查:[摘要]
|
|
106
|
+
- 额外审查:[reviewer / subagent / human 结果]
|
|
107
|
+
- 阻塞发现:[无 / 已关闭 / 已路由]
|
|
108
|
+
|
|
109
|
+
## 残余风险
|
|
110
|
+
|
|
111
|
+
- [无 / 已接受 / 已延期 / 无关债务]
|
|
112
|
+
|
|
113
|
+
## 关联材料
|
|
114
|
+
|
|
115
|
+
- 任务:[路径或 issue]
|
|
116
|
+
- 审查:[路径或 PR review]
|
|
117
|
+
- 证据:[路径、commit、截图、workflow 或 dashboard]
|
|
118
|
+
```
|
|
@@ -46,7 +46,9 @@ docs/11-REFERENCE/ci-cd-standard.md
|
|
|
46
46
|
|
|
47
47
|
- PR required before merge: [yes / no]
|
|
48
48
|
- PR title format
|
|
49
|
-
- PR body requirements
|
|
49
|
+
- PR body requirements. Use `docs/11-REFERENCE/pull-request-standard.md` for
|
|
50
|
+
the required bilingual structure, version impact, verification, review
|
|
51
|
+
evidence, residual risk, and references.
|
|
50
52
|
- Required reviewers
|
|
51
53
|
- Required review type: [self / subagent / external / human]
|
|
52
54
|
- Merge method: [squash / merge commit / rebase]
|
|
@@ -91,6 +93,7 @@ Required fields:
|
|
|
91
93
|
- Branch pattern
|
|
92
94
|
- Ownership rule
|
|
93
95
|
- Subagent worker rule: each code-changing worker uses its own worktree / branch and hands off a commit SHA
|
|
96
|
+
- Checkpoint commit rule: verified, meaningful slices are committed proactively; deferred commits require an explicit no-commit reason, owner, and next step
|
|
94
97
|
- Merge ordering rule
|
|
95
98
|
- Cleanup rule
|
|
96
99
|
|
|
@@ -129,3 +132,11 @@ Bootstrap is not complete unless repository governance is at least:
|
|
|
129
132
|
- Branch protection: `designed` with residual, or `verified`
|
|
130
133
|
- Worktree concurrency: `implemented`
|
|
131
134
|
- Harness checker: passing or blocked-with-owner with explicit residual
|
|
135
|
+
- Checkpoint commit rule: `implemented`
|
|
136
|
+
- Dirty-state visibility: `implemented` means status/dashboard/checker expose dirty paths that can block CLI-owned auto-commit; unresolved dirty state must have an owner or no-commit reason
|
|
137
|
+
|
|
138
|
+
## Related Standards
|
|
139
|
+
|
|
140
|
+
- `docs/11-REFERENCE/pull-request-standard.md` — PR body structure, bilingual
|
|
141
|
+
requirements, version impact, verification, review evidence, residual risk,
|
|
142
|
+
and references.
|
|
@@ -38,16 +38,22 @@
|
|
|
38
38
|
|
|
39
39
|
## Subagent Worker Routing
|
|
40
40
|
|
|
41
|
+
任务开始时,先读取当前任务 `execution_strategy.md` 的 Subagent Authorization 和 Subagent Delegation Decision,并向用户说明当前授权状态和分工判断。用户不需要知道或主动要求 subagent;coordinator 必须从用户目标主动评估。
|
|
42
|
+
|
|
41
43
|
本标准默认把 subagent 当 reviewer:只读审查、写 `review.md`、报告 material findings。
|
|
44
|
+
Reviewer subagent 在单个任务内默认允许,可重复用于只读审查。
|
|
42
45
|
|
|
43
46
|
如果 subagent 被要求直接改代码、测试、产品文档或 harness 文档,它就不是 reviewer,
|
|
44
47
|
而是 worker。Worker 必须按 `worktree-parallel.md` / 项目级 `worktree-standard.md`
|
|
45
|
-
|
|
48
|
+
执行,并先在 `execution_strategy.md` 记录一次用户授权:
|
|
46
49
|
|
|
47
50
|
- coordinator 先分配独立 worktree / branch、任务目录和 write scope
|
|
48
51
|
- worker 只在自己的 worktree 内实现、验证并提交
|
|
49
52
|
- handoff 必须包含 worktree path、branch、commit SHA、checks、residual risks
|
|
50
53
|
- coordinator 负责 merge / conflict resolution / final gates
|
|
54
|
+
- 同一任务、同一范围、同一 worktree/branch 内可复用该授权;范围变化时重新请求授权
|
|
55
|
+
- 如果 worker subagent 对任务有明显帮助但尚未授权,coordinator 必须用白话主动向用户申请一次授权;可以直接说 worker subagent,但不要等用户知道或提醒使用 subagent
|
|
56
|
+
- 如果独立切片已经明显但精确文件路径还不清楚,先确认文件路径,然后在 implementation 前立刻申请独立执行助手授权
|
|
51
57
|
|
|
52
58
|
禁止把多个 worker 的未提交改动混在 coordinator 当前 checkout,再由 coordinator 一次性提交。
|
|
53
59
|
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## 核心思路
|
|
4
4
|
|
|
5
|
-
SSoT(Single Source of Truth
|
|
5
|
+
SSoT(Single Source of Truth,单一事实源)保存当前事实。任务生命周期状态现在由任务本地文件承载,并由 Harness CLI 生成 `docs/Harness-Ledger.md`,避免 Agent 或人手写多张重复进度表。
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
长程项目需要四张 SSoT 保存当前事实,再用一张全局 Harness Ledger 记录每轮任务是否按 SOP 维护这些事实。
|
|
7
|
+
## 当前治理表
|
|
10
8
|
|
|
11
9
|
### Delivery SSoT(交付排期表)
|
|
12
10
|
|
|
@@ -16,15 +14,6 @@ SSoT(Single Source of Truth,单一事实源)是长程项目的命脉。没
|
|
|
16
14
|
- 职责:谁负责哪个 feature block、agent 能看哪些上下文、依赖和 merge 顺序是什么
|
|
17
15
|
- 规则:多人、多仓、split-repo、program、waterfall 或 kanban 团队流程必须维护
|
|
18
16
|
|
|
19
|
-
### Feature SSoT(实施排期表)
|
|
20
|
-
|
|
21
|
-
管理 feature / wave / implementation 的进度和 residual。
|
|
22
|
-
|
|
23
|
-
- 文件:`docs/09-PLANNING/Feature-SSoT.md`(按你的项目命名)
|
|
24
|
-
- 职责:哪些 feature 在做、做到哪了、还剩什么
|
|
25
|
-
- 规则:开始任何非平凡任务前先读,完成后必须回写
|
|
26
|
-
- 归档:Active 表只保留未完成或仍需操作的 feature;completed / superseded 历史行超过 20 条、release 收束、或启用模块并行切换时,必须移入 `docs/09-PLANNING/_archive/` 的 Feature SSoT 归档文件
|
|
27
|
-
|
|
28
17
|
### Regression SSoT(回归控制塔)
|
|
29
18
|
|
|
30
19
|
管理所有 regression surface 的状态、证据深度和残项。
|
|
@@ -33,79 +22,98 @@ SSoT(Single Source of Truth,单一事实源)是长程项目的命脉。没
|
|
|
33
22
|
- 职责:哪些回归面存在、每条的标准入口、当前证据深度、residual
|
|
34
23
|
- 规则:新增固定 gate 或 evidence depth 变化时必须更新
|
|
35
24
|
|
|
36
|
-
###
|
|
25
|
+
### Cadence Ledger(周期验证表)
|
|
26
|
+
|
|
27
|
+
管理需要周期性复查的回归、release、migration 或环境检查。
|
|
28
|
+
|
|
29
|
+
- 文件:`docs/05-TEST-QA/Cadence-Ledger.md`
|
|
30
|
+
- 职责:哪些检查需要按节奏重跑、最近一次证据是什么、下一次应该何时触发
|
|
31
|
+
- 规则:新增或改变周期性 gate 时必须更新
|
|
32
|
+
|
|
33
|
+
### Module Registry(模块登记表)
|
|
34
|
+
|
|
35
|
+
管理模块边界、owner、worktree 和写入范围。
|
|
36
|
+
|
|
37
|
+
- 文件:`docs/09-PLANNING/Module-Registry.md`
|
|
38
|
+
- 职责:模块 key、路径范围、负责人、状态、worktree、模块计划和依赖
|
|
39
|
+
- 规则:启用模块并行时必须维护;模块内步骤进度由 module plan / module visual map 的生成索引表达
|
|
40
|
+
|
|
41
|
+
### Closeout SSoT(收口表)
|
|
42
|
+
|
|
43
|
+
管理任务是否有 walkthrough、Lessons Check 和受控 skip reason。
|
|
44
|
+
|
|
45
|
+
- 文件:`docs/10-WALKTHROUGH/Closeout-SSoT.md`
|
|
46
|
+
- 职责:任务收口状态、walkthrough 路径、lesson 结果和 residual
|
|
47
|
+
- 规则:非平凡任务完成或关闭时必须维护
|
|
48
|
+
|
|
49
|
+
### Lessons Governance(经验沉淀)
|
|
37
50
|
|
|
38
51
|
管理 Agent 在开发过程中发现的经验、改进建议和规范演进。
|
|
39
52
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
- 规则:Walkthrough
|
|
53
|
+
- 文件:任务本地 `lesson_candidates.md` 与 `docs/01-GOVERNANCE/lessons/*.md`
|
|
54
|
+
- 职责:哪些经验值得沉淀、人工如何判定、哪些 lesson 已提升为详情文档
|
|
55
|
+
- 规则:Walkthrough 收口后检查是否有沉淀建议;promotion 前必须查重 candidate 和 detail doc
|
|
43
56
|
- 详细治理规范:`references/lessons-governance.md`
|
|
44
57
|
|
|
45
|
-
### Harness Ledger
|
|
58
|
+
### Harness Ledger(生成的任务生命周期总账)
|
|
46
59
|
|
|
47
|
-
|
|
60
|
+
管理任务生命周期的可扫描汇总。
|
|
48
61
|
|
|
49
62
|
- 文件:`docs/Harness-Ledger.md`
|
|
50
|
-
-
|
|
51
|
-
-
|
|
63
|
+
- 职责:从任务本地事实生成 scope、module、task、state、queues、plan、review、lesson、closeout、residual
|
|
64
|
+
- 规则:由 Harness CLI 生成;不要手写任务生命周期行
|
|
52
65
|
- 详细规范:`references/harness-ledger.md`
|
|
53
66
|
|
|
54
|
-
|
|
67
|
+
## Legacy 生命周期表
|
|
55
68
|
|
|
56
|
-
- Feature
|
|
57
|
-
- Delivery SSoT 不替代 Feature SSoT;它管交付组织和集成顺序,不管功能细节
|
|
58
|
-
- Regression SSoT 也不替代 Feature SSoT
|
|
59
|
-
- Lessons SSoT 不替代前两者,它管的是规范本身的演进
|
|
60
|
-
- Harness Ledger 不替代任何 SSoT,它只记录本轮任务是否维护了对应事实
|
|
61
|
-
- 四张 SSoT 和 Harness Ledger 必须各司其职,不能彼此吞并
|
|
69
|
+
`Feature-SSoT.md` 和 `Private-Feature-SSoT.md` 是旧版任务生命周期投影。当前版本不再创建或重建这些表;迁移旧项目时先归档,再用 `harness governance rebuild --archive --apply` 生成新的 Harness Ledger。
|
|
62
70
|
|
|
63
|
-
|
|
71
|
+
## 分工规则
|
|
64
72
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
- Delivery SSoT 不替代 Regression SSoT;它管交付组织和集成顺序。
|
|
74
|
+
- Regression SSoT 不替代 Closeout SSoT;它管验证面和证据深度。
|
|
75
|
+
- Closeout SSoT 不替代 task-local `lesson_candidates.md`;它只记录收口状态。
|
|
76
|
+
- Module Registry 不替代 module plan;它登记模块边界和 owner。
|
|
77
|
+
- Harness Ledger 不替代上述治理表;它只生成任务生命周期索引。
|
|
78
|
+
- 任务生命周期状态不要同时维护在旧 Feature 表和新 Ledger 中。
|
|
71
79
|
|
|
72
|
-
|
|
80
|
+
## 模块并行分工
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- Active 表只保留不属于任何模块、且仍未完成的独立功能。
|
|
77
|
-
- Phase 历史、completed feature 明细、旧 task 路径明细移入 `docs/09-PLANNING/_archive/`。
|
|
78
|
-
- Feature SSoT 主文件只保留冻结边界、当前 active 指针、completed summary 和 archive index。
|
|
79
|
-
- 不允许把几百行历史明细继续堆在 Feature SSoT 底部作为“文件内归档”。
|
|
82
|
+
当项目启用模块并行开发(见 `references/module-parallel-standard.md`)时:
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
- Module Registry 管模块边界、owner、worktree 和写入范围。
|
|
85
|
+
- module plan / module visual map 管模块内步骤和拓扑索引。
|
|
86
|
+
- Harness Ledger 生成模块任务在全局任务生命周期中的位置。
|
|
87
|
+
- Delivery SSoT 只在需要跨模块、跨仓或多人交付编排时维护。
|
|
82
88
|
|
|
83
|
-
##
|
|
89
|
+
## 归档规则
|
|
84
90
|
|
|
85
|
-
|
|
91
|
+
每张治理表都必须区分 Active 与 Archive。Active 保存当前事实;Archive 保存可追溯历史。
|
|
86
92
|
|
|
87
|
-
|
|
|
93
|
+
| 表 | Active 保留 | 归档触发 | 归档位置 |
|
|
88
94
|
|------|-------------|----------|----------|
|
|
89
|
-
| Feature
|
|
95
|
+
| Legacy Feature / Private Feature 生命周期表 | 不再作为 active 表保留 | 迁移到 ledger-only 版本 | `docs/09-PLANNING/_archive/` |
|
|
90
96
|
| Delivery SSoT | 当前交付 block、集成顺序和阻塞项 | wave 结束或 completed/superseded blocks 超过 20 条 | `docs/09-PLANNING/_archive/` |
|
|
91
97
|
| Module Registry | 活跃 / 暂停不久的模块 | 模块 completed 或 paused 超过 60 天 | `docs/09-PLANNING/MODULES/_archive/<key>/` |
|
|
92
98
|
| Regression SSoT | active gates | gate 废弃或长期不再运行 | `docs/05-TEST-QA/_archive/` |
|
|
93
|
-
|
|
|
94
|
-
|
|
|
99
|
+
| Cadence Ledger | active cadence checks | cadence 废弃或合并到其他 gate | `docs/05-TEST-QA/_archive/` |
|
|
100
|
+
| Closeout SSoT | 当前 closeout 索引 | closed/superseded 超过保留窗口 | `docs/10-WALKTHROUGH/_archive/` |
|
|
101
|
+
| Lesson detail docs | pending / approved / superseded 详情文档 | merged/rejected 超过 20 条 | `docs/01-GOVERNANCE/_archive/` |
|
|
102
|
+
| Harness Ledger | 当前生成索引 | 重新生成前 archive 旧快照 | `docs/01-GOVERNANCE/_archive/` 或迁移会话 archive |
|
|
95
103
|
|
|
96
104
|
归档不改变 ID,不删除证据文件;Active 文件必须留下 archive index 或指向归档文件。
|
|
97
105
|
|
|
98
|
-
## SSoT 与 Planning
|
|
106
|
+
## SSoT 与 Planning 的绑定
|
|
99
107
|
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
108
|
+
- 每个非平凡任务必须有任务本地 plan / progress / review / lesson / closeout 事实。
|
|
109
|
+
- Harness Ledger 从这些事实生成,不要求人手写任务生命周期表。
|
|
110
|
+
- 非任务生命周期治理表只在本轮实际触达对应事实时更新。
|
|
111
|
+
- 如果生成索引不对,修复 scanner、generator 或任务本地事实。
|
|
104
112
|
|
|
105
113
|
## 常见反模式
|
|
106
114
|
|
|
107
|
-
-
|
|
108
|
-
- 只更新
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
115
|
+
- 同时维护旧 Feature 生命周期表和生成 Ledger
|
|
116
|
+
- 只更新 task plan,不刷新生成索引
|
|
117
|
+
- 手写生成表来绕过 scanner 问题
|
|
118
|
+
- 把 Regression / Delivery / Closeout 的详细治理事实复制进 Harness Ledger
|
|
119
|
+
- 建多个平行的进度总览,导致 Agent 不知道哪张表可信
|