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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# 外部资料摄取标准
|
|
2
|
+
|
|
3
|
+
## 目的
|
|
4
|
+
|
|
5
|
+
定义目标项目里的 Agent 如何接收、过滤、整理外部项目或微服务团队提供的大量资料。核心原则是:外部资料先进资料包,经过摘要和验证后,再投影到稳定执行文档。
|
|
6
|
+
|
|
7
|
+
## 核心模型
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
外部原始资料 -> source pack 索引 -> digest 摘要 -> 03/04/06 执行投影
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`03-ARCHITECTURE`、`04-DEVELOPMENT`、`06-INTEGRATIONS` 不承载外部资料堆。它们只保存已经提炼、可验证、能指导当前仓库开发的事实。
|
|
14
|
+
|
|
15
|
+
## Diagnose / Decide 必问条件
|
|
16
|
+
|
|
17
|
+
只要目标项目满足任一条件,Agent 必须询问用户是否有外部资料:
|
|
18
|
+
|
|
19
|
+
- 当前仓属于多仓系统、微服务系统、前后端分仓或平台子系统。
|
|
20
|
+
- 代码中出现外部服务、SDK、API gateway、message queue、webhook、contract、schema 或 mock。
|
|
21
|
+
- 用户提到其他仓库、上下游、接口文档、业务知识、系统整体设计。
|
|
22
|
+
- Agent 无法只靠当前仓判断服务职责、接口契约或联调方式。
|
|
23
|
+
|
|
24
|
+
推荐问题:
|
|
25
|
+
|
|
26
|
+
1. 这个项目是否依赖外部服务或其他仓库?
|
|
27
|
+
2. 你是否有外部团队提供的架构文档、接口文档、流程图、会议纪要、代码路径、链接或导出包?
|
|
28
|
+
3. 这些资料能否复制进本仓?如果不能,是否只能保存本地路径或 URL?
|
|
29
|
+
4. 哪些资料是可信来源,哪些只是历史参考?
|
|
30
|
+
|
|
31
|
+
## 存储规则
|
|
32
|
+
|
|
33
|
+
| 场景 | 存储方式 |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| 只有 1-4 个稳定外部文档 | 不必建独立 source pack;在对应 `03/04/06` 的 `Source Evidence` 中链接 |
|
|
36
|
+
| 外部资料超过 5 份、跨多个主题、或会持续增长 | 创建 `docs/04-DEVELOPMENT/external-source-packs/<source-key>/` |
|
|
37
|
+
| 资料含敏感信息、密钥、客户数据或不能进仓 | 不复制原文;只记录外部路径、owner、访问条件和摘要 |
|
|
38
|
+
| 资料可入仓 | 可放 `raw/`,但必须经过 digest 后才能投影到执行文档 |
|
|
39
|
+
|
|
40
|
+
推荐结构:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
docs/04-DEVELOPMENT/external-source-packs/<source-key>/
|
|
44
|
+
├── README.md
|
|
45
|
+
├── digests/
|
|
46
|
+
├── raw/
|
|
47
|
+
└── raw-index.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 摄取流程
|
|
51
|
+
|
|
52
|
+
1. Inventory:列出所有资料,记录来源、owner、时间、可信度和是否可入仓。
|
|
53
|
+
2. Classify:按 architecture、development、integration、security、operations、product、unknown 分类。
|
|
54
|
+
3. Sanitize:检查密钥、token、客户数据、隐私、内部账号和不可公开链接。
|
|
55
|
+
4. Digest:提炼事实、疑问、不安全假设和证据。
|
|
56
|
+
5. Project:把稳定事实投影到 `03/04/06`。
|
|
57
|
+
6. Verify:尽可能用代码、接口测试、owner 确认或运行证据验证。
|
|
58
|
+
7. Residual:不能确认的内容留在 source pack 或 `Do Not Assume`,不进入执行事实。
|
|
59
|
+
|
|
60
|
+
## 投影规则
|
|
61
|
+
|
|
62
|
+
| 资料内容 | 投影位置 |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| 服务职责、上下游、owner、数据归属、系统拓扑 | `03-ARCHITECTURE/service-catalog.md` 或 `services/<service-key>.md` |
|
|
65
|
+
| 本仓开发时如何 mock、stub、启动、联调、排查 | `04-DEVELOPMENT/external-context/<service-key>.md` |
|
|
66
|
+
| endpoint、payload、auth、error、event、webhook、SDK、contract test | `06-INTEGRATIONS/<contract>.md` |
|
|
67
|
+
| 未确认、来源冲突、过期或背景参考 | 留在 source pack README / digest |
|
|
68
|
+
|
|
69
|
+
## 禁止事项
|
|
70
|
+
|
|
71
|
+
- 不把几十份外部文档直接复制到 `03-ARCHITECTURE`、`04-DEVELOPMENT` 或 `06-INTEGRATIONS` 根目录。
|
|
72
|
+
- 不把 digest 当成已验证事实。
|
|
73
|
+
- 不在执行文档里保留大段原文、聊天流水或历史会议记录。
|
|
74
|
+
- 不把密钥、token、客户数据、个人隐私或不可公开资料提交进仓。
|
|
75
|
+
- 不为每个微服务复制一套完整目录树。
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## 核心思路
|
|
4
4
|
|
|
5
|
-
Harness Ledger
|
|
6
|
-
Delivery / Feature / Regression / Lessons 四张 SSoT;它只记录每个非平凡任务是否按 harness SOP
|
|
7
|
-
维护了应该维护的上下文。Closeout SSoT 则记录每个 closed 任务是否有 walkthrough 或受控 skip reason。
|
|
5
|
+
Harness Ledger 是任务生命周期的全局生成索引。它把任务目录、模块任务、review、lesson、closeout 和 residual 的可扫描状态汇总到一张表,方便 Agent 快速定位;人看当前状态优先使用 Dashboard。
|
|
8
6
|
|
|
9
7
|
一句话定义:
|
|
10
8
|
|
|
11
|
-
>
|
|
9
|
+
> 任务本地文件保存事实;Harness CLI 从这些事实生成 Harness Ledger。
|
|
12
10
|
|
|
13
11
|
## 文件位置
|
|
14
12
|
|
|
@@ -16,133 +14,94 @@ Delivery / Feature / Regression / Lessons 四张 SSoT;它只记录每个非平
|
|
|
16
14
|
docs/Harness-Ledger.md
|
|
17
15
|
```
|
|
18
16
|
|
|
19
|
-
放在 `docs/`
|
|
20
|
-
regression、walkthrough、reference、lessons 等多个目录,是全局审计索引。
|
|
17
|
+
放在 `docs/` 根目录,因为它横跨 planning、review、walkthrough、lessons 和模块索引。
|
|
21
18
|
|
|
22
19
|
## 职责边界
|
|
23
20
|
|
|
24
21
|
Harness Ledger 记录:
|
|
25
22
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
23
|
+
- task / module scope
|
|
24
|
+
- module key
|
|
25
|
+
- task title
|
|
26
|
+
- lifecycle state
|
|
27
|
+
- queue markers
|
|
28
|
+
- task plan 路径
|
|
29
|
+
- review 状态或路径
|
|
30
|
+
- Lessons Check 状态
|
|
31
|
+
- closeout 状态
|
|
32
|
+
- residual 摘要
|
|
33
|
+
- 生成日期
|
|
36
34
|
|
|
37
35
|
Harness Ledger 不记录:
|
|
38
36
|
|
|
39
37
|
- 每次 `progress.md` 的过程性更新
|
|
40
38
|
- 每条测试输出
|
|
41
39
|
- 每个 git diff 细节
|
|
42
|
-
-
|
|
40
|
+
- Regression / Delivery / Cadence / Closeout 的详细治理事实
|
|
41
|
+
- lesson 详情正文
|
|
43
42
|
- 可以从 git history 直接恢复的逐行变更
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
`Feature-SSoT.md` 和 `Private-Feature-SSoT.md` 是旧版任务生命周期投影。当前版本在 `harness governance rebuild --archive --apply` 中归档这些旧表,不再重新生成。
|
|
46
45
|
|
|
47
|
-
|
|
46
|
+
## 生成规则
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
2. Bootstrap harness 完成
|
|
51
|
-
3. 同步或升级最新版 coding-agent-harness
|
|
52
|
-
4. 新增或修改 AGENTS.md / CLAUDE.md / reference / template
|
|
53
|
-
5. 创建或更新 required review report
|
|
54
|
-
6. coordinator pass 同步模块任务的全局状态、review、closeout 或 regression 结果
|
|
55
|
-
7. 修改 Repo Governance / CI-CD / required checks / branch protection 状态
|
|
56
|
-
8. 修改 Feature SSoT、Regression SSoT、Lessons SSoT 任一文件
|
|
57
|
-
9. 创建 walkthrough
|
|
58
|
-
10. Lessons approved 后合入正式 reference
|
|
48
|
+
触发任务生命周期变化时,优先使用 CLI:
|
|
59
49
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
evidence depth 变化
|
|
68
|
-
|
|
69
|
-
## 状态词
|
|
70
|
-
|
|
71
|
-
字段值必须使用固定词,避免自由文本失控:
|
|
72
|
-
|
|
73
|
-
- `required`
|
|
74
|
-
- `updated`
|
|
75
|
-
- `created`
|
|
76
|
-
- `checked-none`
|
|
77
|
-
- `checked-created`
|
|
78
|
-
- `n/a`
|
|
79
|
-
- `skipped-with-reason`
|
|
80
|
-
- `missing`
|
|
81
|
-
|
|
82
|
-
## ID 规则
|
|
83
|
-
|
|
84
|
-
格式:
|
|
85
|
-
|
|
86
|
-
```text
|
|
87
|
-
HL-YYYYMMDD-NNN
|
|
50
|
+
```bash
|
|
51
|
+
harness new-task <task-id>
|
|
52
|
+
harness task-start <task-id>
|
|
53
|
+
harness task-phase <task-id> <phase-id> --state done
|
|
54
|
+
harness task-review <task-id>
|
|
55
|
+
harness task-complete <task-id>
|
|
56
|
+
harness governance rebuild --archive --apply
|
|
88
57
|
```
|
|
89
58
|
|
|
90
|
-
|
|
59
|
+
Agent 不应手写或机械更新 Ledger 的任务行。如果发现生成结果不对,应修复 scanner、generator 或任务本地事实,再重新生成。
|
|
91
60
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
61
|
+
## 与其他治理表的关系
|
|
62
|
+
|
|
63
|
+
- Delivery SSoT 仍管理交付 block、跨仓顺序、owner 和依赖。
|
|
64
|
+
- Regression SSoT 仍管理回归面、证据深度和 residual。
|
|
65
|
+
- Cadence Ledger 仍管理周期性验证节奏。
|
|
66
|
+
- Closeout SSoT 仍管理 walkthrough、closeout status 和受控 skip reason。
|
|
67
|
+
- Module Registry 仍管理模块边界、owner、worktree 和写入范围。
|
|
95
68
|
|
|
96
|
-
|
|
97
|
-
不要重排全表。
|
|
69
|
+
这些表不是任务生命周期小表。本版本只移除 `Feature-SSoT.md` / `Private-Feature-SSoT.md` 这类生命周期投影,不删除尚无等价 scanner/generator 的治理表。
|
|
98
70
|
|
|
99
71
|
## 归档规则
|
|
100
72
|
|
|
101
|
-
|
|
73
|
+
旧生命周期表切换时归档到:
|
|
102
74
|
|
|
103
75
|
```text
|
|
104
|
-
docs/
|
|
76
|
+
docs/09-PLANNING/_archive/<timestamp>/
|
|
105
77
|
```
|
|
106
78
|
|
|
107
|
-
|
|
79
|
+
归档不改变历史证据,也不要求迁移 Agent 删除旧快照。确认 Dashboard、`task-list`、`task-index` 和新 Ledger 都能表达当前任务后,项目 owner 再决定是否清理归档。
|
|
108
80
|
|
|
109
81
|
## Closeout 顺序
|
|
110
82
|
|
|
111
83
|
每个非平凡任务收口时按以下顺序:
|
|
112
84
|
|
|
113
|
-
1. 更新 `progress.md`
|
|
114
|
-
2. 跑必要验证和 regression gate
|
|
115
|
-
3.
|
|
116
|
-
4.
|
|
117
|
-
5. 回写
|
|
118
|
-
6.
|
|
119
|
-
7.
|
|
120
|
-
8.
|
|
121
|
-
9.
|
|
122
|
-
10. 更新 Harness Ledger
|
|
123
|
-
|
|
124
|
-
最后更新 Harness Ledger,是为了让它记录本轮所有上下文维护的最终状态。
|
|
125
|
-
如果 Harness Ledger row 进入 `closed` / `closed-with-residual` / `closed-local-only`,
|
|
126
|
-
必须同步在 `docs/10-WALKTHROUGH/Closeout-SSoT.md` 登记 walkthrough 或受控 skip reason。
|
|
127
|
-
同时必须登记 Lessons Check:`checked-created: L-YYYY-MM-DD-NNN` 或
|
|
128
|
-
`checked-none: <reason>`。
|
|
85
|
+
1. 更新 `progress.md` 或等价任务本地事实。
|
|
86
|
+
2. 跑必要验证和 regression gate。
|
|
87
|
+
3. 完成 `review.md` 并处理 material findings(如适用)。
|
|
88
|
+
4. 回写 Repo Governance / CI-CD 状态(如适用)。
|
|
89
|
+
5. 回写 Regression SSoT / Cadence Ledger / Delivery SSoT 等本轮实际触达的非生命周期治理表(如适用)。
|
|
90
|
+
6. 写 walkthrough。
|
|
91
|
+
7. 更新 Closeout SSoT。
|
|
92
|
+
8. 执行 Lessons 检查;新任务先更新 `lesson_candidates.md`,如人工确认沉淀,再由维护命令写详情文档。
|
|
93
|
+
9. 运行 Harness CLI 生成或刷新 Harness Ledger。
|
|
129
94
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
更新已有 harness 时,Ledger row 只记录本次 delta merge:
|
|
95
|
+
最后刷新 Harness Ledger,是为了让它记录本轮任务本地事实和治理表维护结果的最终状态。
|
|
133
96
|
|
|
134
|
-
|
|
135
|
-
- 新增或修补了哪些 harness 骨架文件
|
|
136
|
-
- 哪些既有 SSoT / walkthrough / task history 被保留未覆盖
|
|
137
|
-
- 是否产生 residual,例如某个标准暂不适合当前项目
|
|
97
|
+
## Harness Update 记录
|
|
138
98
|
|
|
139
|
-
|
|
140
|
-
walkthrough 保存,Ledger 只回答"这次升级维护了哪些上下文入口"。
|
|
99
|
+
更新已有 harness 时,Ledger row 只记录本次 task lifecycle delta。具体标准、模板、reference 的合并细节由 task plan、progress、walkthrough 和 git history 保存。
|
|
141
100
|
|
|
142
101
|
## 常见反模式
|
|
143
102
|
|
|
144
|
-
-
|
|
145
|
-
- 把
|
|
103
|
+
- 手写 Ledger 任务行而不是修复任务事实或生成器
|
|
104
|
+
- 把 Regression / Delivery 的详细治理事实复制进 Ledger
|
|
146
105
|
- 每次测试或每次 progress 变动都追加 row
|
|
147
106
|
- 用自由文本状态导致无法快速扫描
|
|
148
|
-
-
|
|
107
|
+
- 旧 Feature 生命周期表归档后又重新创建
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Historical 12-Phase Bootstrap
|
|
2
|
+
|
|
3
|
+
This document preserves the legacy bootstrap sequence used before the v1.0 capability-based installer. It is reference material for migration only. Agents should not use this as the default install protocol for new projects.
|
|
4
|
+
|
|
5
|
+
## When To Read
|
|
6
|
+
|
|
7
|
+
- You are migrating a project that was created with the older 12-phase harness flow.
|
|
8
|
+
- You need to map older documents into v1.0 capabilities and task contracts.
|
|
9
|
+
- You need to understand why a legacy project has broad reference files, embedded roadmap sections, or single-line phase planning.
|
|
10
|
+
|
|
11
|
+
## Legacy Sequence
|
|
12
|
+
|
|
13
|
+
1. Project diagnosis: read `references/project-onboarding-audit.md` and produce a project diagnosis.
|
|
14
|
+
2. Solution confirmation: decide harness scale from the diagnosis.
|
|
15
|
+
3. Delivery operating model: classify solo, team, split-repo, program, stage-gate, or kanban delivery.
|
|
16
|
+
4. Optional module registration: identify independent modules, write scopes, module registry rows, and module plans.
|
|
17
|
+
5. Directory structure: create or adapt `docs/` according to the docs directory standard.
|
|
18
|
+
6. AGENTS.md and CLAUDE.md: generate the root agent entrypoint and Claude Code shim.
|
|
19
|
+
7. Reference standards: generate project-specific reference files under `docs/11-REFERENCE/`.
|
|
20
|
+
8. Repository governance and CI/CD: define PR policy, required checks, branch protection, CI, and worktree concurrency.
|
|
21
|
+
9. Planning loop: create task templates and task directories.
|
|
22
|
+
10. Long-running task protocol: add long-running task standard and contract template.
|
|
23
|
+
11. SSoT, lessons, harness ledger, regression, cadence, walkthrough, and closeout files.
|
|
24
|
+
12. Bootstrap summary: report created files, purpose, first tasks, next actions, and checker status.
|
|
25
|
+
|
|
26
|
+
## v1.0 Mapping
|
|
27
|
+
|
|
28
|
+
| Legacy Area | v1.0 Destination |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| AGENTS.md / CLAUDE.md | Preserve existing files; merge only missing routing and residuals. |
|
|
31
|
+
| Task directory with only `task_plan.md` | Add `brief.md`, `execution_strategy.md`, `visual_map.md`, `progress.md`, `findings.md`, and `review.md` only for active tasks. |
|
|
32
|
+
| Embedded roadmap in `task_plan.md` | Move active roadmap rows into standalone `visual_map.md`; leave historical tasks untouched unless they are reopened. |
|
|
33
|
+
| Single-line progress status | Normalize active tasks through `harness task-start`, `task-block`, `task-log`, and `task-complete`. |
|
|
34
|
+
| Broad reference bundle | Declare only capabilities that are actually adopted in `.harness-capabilities.json`. |
|
|
35
|
+
| Long-running task artifacts | Add or declare `long-running-task` only when active work needs continuous autonomous execution. |
|
|
36
|
+
| Informal module lists | Adopt `module-parallel` only after modules have owners, write scopes, dependency rules, and registry maintenance. |
|
|
37
|
+
| Historical review notes | Do not rewrite all old review files. Upgrade active release-blocking reviews to the v1 review schema first. |
|
|
38
|
+
|
|
39
|
+
## Migration Rule
|
|
40
|
+
|
|
41
|
+
Do not mechanically rewrite the whole project. Use `harness add-capability safe-adoption` to add the v1.0 compatibility layer, then use `harness migrate-plan --json` to produce a staged action list. Migrate active or reopened work first; leave closed historical tasks as legacy evidence unless strict gates require them.
|
|
@@ -2,75 +2,92 @@
|
|
|
2
2
|
|
|
3
3
|
## 核心思路
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
`docs/01-GOVERNANCE/lessons/` 目录,再写入 Lessons SSoT。人审批后决定是否合入正式 reference。
|
|
5
|
+
Lessons 不再使用一张手工维护的全局表。原因很简单:lesson candidate 是任务收口时的审查材料,promotion 是后续治理动作;把两者都塞进共享表,会让多个 agent 争抢同一个文件,也会让表和任务本地事实漂移。
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
`docs/01-GOVERNANCE/lessons/L-YYYY-MM-DD-NNN-<slug>.md` 详情文档,表里的
|
|
10
|
-
`Detail Doc` 列必须指向这篇文档。如果只是填表而没有详情文档,这次 closeout
|
|
11
|
-
不算完成。
|
|
7
|
+
新的事实来源只有三层:
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
| 层级 | 文件 | 职责 |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| 任务本地队列 | `docs/09-PLANNING/**/lesson_candidates.md` | 记录候选、拒绝、无候选、排队 promotion 和人工判定 |
|
|
12
|
+
| 任务本地详情 | `docs/09-PLANNING/**/lessons/LC-*.md` | 在源任务上下文还新鲜时写完整 lesson 正文,供后续沉淀任务读取 |
|
|
13
|
+
| Promoted lesson 详情 | `docs/01-GOVERNANCE/lessons/L-YYYY-MM-DD-NNN-<slug>.md` | 记录已接受、可复用、需要后续治理合入的经验 |
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
| Feature SSoT | 实施排期 | `docs/09-PLANNING/` |
|
|
18
|
-
| Regression SSoT | 回归控制 | `docs/05-TEST-QA/` |
|
|
19
|
-
| **Lessons SSoT** | **经验沉淀** | **`docs/01-GOVERNANCE/`** |
|
|
20
|
-
|
|
21
|
-
Lessons SSoT 管“规范是否应该演进”。本轮任务是否做过 Lessons 检查、是否创建了
|
|
22
|
-
Lessons 条目,由 `docs/Harness-Ledger.md` 记录,避免把 SOP 合规状态塞进
|
|
23
|
-
Lessons SSoT。
|
|
15
|
+
`docs/Harness-Ledger.md` 和 `docs/10-WALKTHROUGH/Closeout-SSoT.md` 只记录 closeout 结果:
|
|
16
|
+
`checked-candidate:<LC-ID>`、`queued-promotion:<LC-ID>`、`checked-created:<L-ID>` 或历史兼容的 `checked-none:<reason>`。
|
|
24
17
|
|
|
25
18
|
## 目录结构
|
|
26
19
|
|
|
27
|
-
```
|
|
20
|
+
```text
|
|
28
21
|
docs/01-GOVERNANCE/
|
|
29
|
-
├──
|
|
30
|
-
├──
|
|
31
|
-
│ ├── L-2026-05-07-001-xxx.md ← 单条沉淀建议的详细内容
|
|
22
|
+
├── lessons/ ← promoted lesson 详情文档
|
|
23
|
+
│ ├── L-2026-05-07-001-xxx.md
|
|
32
24
|
│ └── ...
|
|
33
|
-
└── _archive/ ←
|
|
34
|
-
|
|
25
|
+
└── _archive/ ← 已合入或废弃的历史详情归档
|
|
26
|
+
|
|
27
|
+
docs/09-PLANNING/TASKS/<task-id>/
|
|
28
|
+
├── lesson_candidates.md ← 候选索引和人工路由状态
|
|
29
|
+
└── lessons/
|
|
30
|
+
└── LC-YYYYMMDD-NNN.md ← task-local detail artifact
|
|
35
31
|
```
|
|
36
32
|
|
|
37
33
|
## 触发时机
|
|
38
34
|
|
|
39
|
-
在 Walkthrough 收口流程中,写完 Walkthrough 并更新 Feature/Regression
|
|
35
|
+
在 Walkthrough 收口流程中,写完 Walkthrough 并更新 Feature / Regression / Closeout / Ledger 之后,Agent 执行经验沉淀检查:
|
|
40
36
|
|
|
41
37
|
1. 这次开发中有没有发现现有 reference 不够用或有误的地方?
|
|
42
|
-
2.
|
|
38
|
+
2. 有没有值得固化为规范的新模式或新做法?
|
|
43
39
|
3. 有没有踩坑经验值得记录,避免下次重复?
|
|
44
40
|
4. 有没有架构层面的洞察,值得更新架构文档?
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
如果任何一条答案是“有”,先写入任务目录的 `lesson_candidates.md`。当候选进入
|
|
43
|
+
`needs-promotion` 时,Agent 必须同步写出任务本地 `lessons/LC-*.md` 详情文件,并在
|
|
44
|
+
`Detail Artifact` 列链接它;后续沉淀任务读取这个详情文件,不从表格 brief 复写正文。
|
|
45
|
+
|
|
46
|
+
人工决定后只允许以下任务级状态:
|
|
47
|
+
|
|
48
|
+
- `no-candidate-accepted`:接受本轮没有可复用 lesson。
|
|
49
|
+
- `needs-promotion`:至少一个候选已排队进入治理沉淀。
|
|
50
|
+
- `promoted`:维护命令已经创建 promoted lesson 详情文档,并回写源 candidate。
|
|
51
|
+
- `rejected`:候选已带理由拒绝。
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
2. 详情文档必须写清背景、现状问题、建议改动、影响范围和冲突声明。
|
|
50
|
-
3. 再在 Lessons SSoT 追加表行,`Detail Doc` 指向这篇详情文档。
|
|
51
|
-
4. 在 Closeout SSoT / Harness Ledger 中记录 `checked-created`,并引用 lesson ID。
|
|
53
|
+
`needs-promotion` 不阻塞任务 closeout,但必须在 Closeout SSoT / Harness Ledger 中记录 `queued-promotion: LC-YYYYMMDD-NNN`,并由后续维护任务处理。模块级候选还必须填写 `Module Key`,避免沉淀任务丢失模块边界。`promoted` 或人工直接创建详情文档时记录 `checked-created: L-YYYY-MM-DD-NNN`。如果没有候选,记录 `checked-candidate: LC-...` 或 `checked-none: <reason>`;`checked-none` 只用于旧任务兼容或没有 candidate 文件的历史收口。
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
## Promotion 执行
|
|
56
|
+
|
|
57
|
+
promotion 只写 promoted 详情文档和源 candidate,不写共享 Lessons 表:
|
|
58
|
+
|
|
59
|
+
1. 读取源任务 `lesson_candidates.md` 中的 `Detail Artifact` 指向的任务本地详情文件。
|
|
60
|
+
2. 选择 `templates/lessons/` 下的对应模板,或由 `lesson-promote --apply` 创建 promoted 详情文档。
|
|
61
|
+
3. promoted 详情文档写清背景、现状问题、建议改动、影响范围和冲突声明。
|
|
62
|
+
4. 回写源任务 `lesson_candidates.md`:对应候选标记为 `promoted`,并记录 `promoted:<L-ID>`。
|
|
63
|
+
5. 在 Closeout SSoT / Harness Ledger 中记录 `checked-created:<L-ID>` 或 `queued-promotion:<LC-ID>`。
|
|
64
|
+
|
|
65
|
+
`lesson-promote --apply` 是 CLI-owned 机械写入:目标仓库必须是干净 Git root,
|
|
66
|
+
命令会加 governance lock,只允许提交新 lesson detail 和源任务 `lesson_candidates.md`。
|
|
67
|
+
如果存在 unrelated dirty diff,命令必须拒绝,让 coordinator 先提交、归属或记录 no-commit reason。
|
|
68
|
+
|
|
69
|
+
如果四个问题的答案全是“没有”,也不能静默跳过。新任务必须在 `lesson_candidates.md` 中使用 `no-candidate-accepted` 并填写 No-Candidate Reason;旧任务可在 Closeout SSoT 和 Harness Ledger 中记录 `checked-none: <一句话原因>`。
|
|
55
70
|
|
|
56
71
|
## Closeout 判定
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
收口时只允许以下合格状态:
|
|
59
74
|
|
|
60
|
-
- `checked-created: L-YYYY-MM-DD-NNN
|
|
61
|
-
- `
|
|
75
|
+
- `checked-created: L-YYYY-MM-DD-NNN`:发现可沉淀经验,已创建 promoted lesson 详情文档。
|
|
76
|
+
- `queued-promotion: LC-YYYYMMDD-NNN`:人工确认候选值得沉淀,但交给维护命令后续提升。
|
|
77
|
+
- `checked-candidate: LC-YYYYMMDD-NNN`:人工已审查 candidate 文件,结论为无候选或全部拒绝。
|
|
78
|
+
- `checked-none: <reason>`:旧任务兼容状态,已完整检查且没有 candidate 文件。
|
|
62
79
|
|
|
63
80
|
以下状态不合格:
|
|
64
81
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
- 在 walkthrough 或 progress 中说“无 lessons”,但 Closeout SSoT / Harness Ledger 没有记录。
|
|
82
|
+
- 只在 walkthrough 或 progress 中说“无 lessons”,但 Closeout SSoT / Harness Ledger 没有记录。
|
|
83
|
+
- 新任务跳过 `lesson_candidates.md`,只用 `checked-none` 代替 candidate 判定。
|
|
68
84
|
- 用 `n/a` 代替检查结果,除非任务是纯只读分析且没有 closed ledger row。
|
|
85
|
+
- `checked-created:<L-ID>` 指向的 `docs/01-GOVERNANCE/lessons/*.md` 不存在。
|
|
69
86
|
|
|
70
87
|
## 沉淀类型
|
|
71
88
|
|
|
72
89
|
| Type | 说明 |
|
|
73
|
-
|
|
90
|
+
| --- | --- |
|
|
74
91
|
| `ref-change` | 修改现有 reference 文档 |
|
|
75
92
|
| `new-doc` | 新增文档/规范 |
|
|
76
93
|
| `arch-change` | 架构层面的改动建议 |
|
|
@@ -78,80 +95,75 @@ Harness Ledger 中记录 `checked-none: <一句话原因>`。
|
|
|
78
95
|
|
|
79
96
|
## 冲突处理规则
|
|
80
97
|
|
|
81
|
-
### 规则 1
|
|
98
|
+
### 规则 1:写之前必须查重
|
|
99
|
+
|
|
100
|
+
Agent 在产出任何 promoted lesson 之前,必须查看:
|
|
82
101
|
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
102
|
+
- 任务本地 `lesson_candidates.md`
|
|
103
|
+
- 任务本地 `lessons/LC-*.md`
|
|
104
|
+
- `docs/01-GOVERNANCE/lessons/*.md`
|
|
105
|
+
- 目标 reference / template / checker
|
|
106
|
+
|
|
107
|
+
目的是确认是否已有同一 target、同一问题或冲突建议。
|
|
87
108
|
|
|
88
109
|
### 规则 2:副本始终基于正式版本
|
|
89
110
|
|
|
90
|
-
|
|
111
|
+
无论已有多少个待处理 lesson 指向同一个 target,新的副本始终基于当前正式 reference 的最新版本,不基于任何未合入的 pending 副本。
|
|
91
112
|
|
|
92
|
-
|
|
113
|
+
原因:人可能选择不采纳之前的 pending 改动。如果基于别人未合入的副本去改,一旦那个被 reject,改动就建立在错误基础上。
|
|
93
114
|
|
|
94
115
|
### 规则 3:以解决冲突的方式编写
|
|
95
116
|
|
|
96
|
-
|
|
97
|
-
1. 读取那个 pending 条目的内容(了解对方想改什么)
|
|
98
|
-
2. 在自己的副本中,以"解决冲突"的方式编写——即:假设对方的改动最终也会被采纳,自己的改动应该与之兼容
|
|
99
|
-
3. 在"冲突声明"中明确说明:我看到了 L-XXX 的改动,我的副本已考虑兼容
|
|
100
|
-
4. 但**不是在对方副本之上修改**,而是独立基于正式版本编写
|
|
117
|
+
如果发现已有 lesson 指向同一 target,Agent 必须:
|
|
101
118
|
|
|
102
|
-
|
|
119
|
+
1. 读取那个 lesson 的内容,了解对方想改什么。
|
|
120
|
+
2. 在自己的详情文档中,以解决冲突的方式编写。
|
|
121
|
+
3. 在“冲突声明”中明确说明看到了哪个 lesson,自己的建议如何兼容或取代它。
|
|
122
|
+
4. 独立基于正式版本编写,不直接修改对方详情文档。
|
|
103
123
|
|
|
104
|
-
|
|
105
|
-
- 逐个 approve,按顺序合入
|
|
106
|
-
- 一次性看所有 pending 改动,做聚合后合入
|
|
107
|
-
- reject 部分,approve 部分
|
|
108
|
-
- 要求 Agent 基于审批结果重新生成一个合并版本
|
|
124
|
+
### 规则 4:人做最终聚合
|
|
109
125
|
|
|
110
|
-
|
|
126
|
+
当多个 lesson 指向同一 target 时,人在审批时可以:
|
|
111
127
|
|
|
112
|
-
|
|
128
|
+
- 逐个 approve,按顺序合入。
|
|
129
|
+
- 一次性看所有 pending 改动,做聚合后合入。
|
|
130
|
+
- reject 部分,approve 部分。
|
|
131
|
+
- 要求 Agent 基于审批结果重新生成一个合并版本。
|
|
113
132
|
|
|
114
133
|
## 状态流转
|
|
115
134
|
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
135
|
+
```text
|
|
136
|
+
lesson_candidates.md:
|
|
137
|
+
pending-review -> needs-promotion -> promoted
|
|
138
|
+
-> rejected
|
|
139
|
+
-> no-candidate-accepted
|
|
140
|
+
|
|
141
|
+
lesson detail docs:
|
|
142
|
+
pending governance integration -> approved -> merged
|
|
143
|
+
-> rejected
|
|
144
|
+
-> superseded
|
|
120
145
|
```
|
|
121
146
|
|
|
122
147
|
## 归档机制
|
|
123
148
|
|
|
124
|
-
|
|
125
|
-
- Active Lessons 表超过 **20 条**时,将所有 `✅ merged` 和 `❌ rejected` 的条目移入归档
|
|
126
|
-
- 人也可以手动触发归档
|
|
127
|
-
|
|
128
|
-
### 归档格式
|
|
129
|
-
```
|
|
130
|
-
docs/01-GOVERNANCE/_archive/Lessons-SSoT-archive-YYYY-QN.md
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### 归档后
|
|
134
|
-
- Active 表只保留 `🟡 pending` / `🟢 approved` / `🔀 superseded` 的条目
|
|
135
|
-
- 归档文件保留完整历史,可追溯
|
|
149
|
+
当 `docs/01-GOVERNANCE/lessons/` 中已合入或废弃的详情文档过多时,可以把 `merged`、`rejected`、`superseded` 的文档移入 `docs/01-GOVERNANCE/_archive/`。不要归档仍被 Closeout SSoT 或 Harness Ledger 当前行引用的文档,除非同步更新引用。
|
|
136
150
|
|
|
137
151
|
## 人的审批工作流
|
|
138
152
|
|
|
139
|
-
1. 打开 `
|
|
140
|
-
2.
|
|
141
|
-
3.
|
|
142
|
-
4.
|
|
143
|
-
5.
|
|
144
|
-
6.
|
|
153
|
+
1. 打开 dashboard 的 Lessons 队列,或搜索任务本地 `lesson_candidates.md` 中的 `needs-promotion`。
|
|
154
|
+
2. 查看候选行的 `Detail Artifact`,确认任务本地详情正文足够完整。
|
|
155
|
+
3. 需要提升时创建后续 sedimentation task,或批准 `lesson-promote --apply`。
|
|
156
|
+
4. 查看生成的 `docs/01-GOVERNANCE/lessons/*.md`。
|
|
157
|
+
5. 有冲突的 lesson 一起审。
|
|
158
|
+
6. 批准后由维护任务更新目标 reference / template / checker。
|
|
145
159
|
|
|
146
160
|
## 合入执行
|
|
147
161
|
|
|
148
|
-
当 Agent
|
|
149
|
-
- `ref-change`:用 lessons/ 中的副本替换正式 reference
|
|
150
|
-
- `new-doc`:将 lessons/ 中的内容移动到建议路径
|
|
151
|
-
- `arch-change`:按建议更新架构文档
|
|
152
|
-
- `process-change`:按建议更新流程文档
|
|
162
|
+
当 Agent 获得明确的人审批准后:
|
|
153
163
|
|
|
154
|
-
|
|
164
|
+
- `ref-change`:按 lesson 详情更新正式 reference。
|
|
165
|
+
- `new-doc`:将 lesson 建议落到正式建议路径。
|
|
166
|
+
- `arch-change`:按建议更新架构文档。
|
|
167
|
+
- `process-change`:按建议更新流程文档或 CLI/checker。
|
|
155
168
|
|
|
156
|
-
|
|
157
|
-
`Lessons=updated` 或 `Lessons=checked-created`。
|
|
169
|
+
合入任务收口时,必须在 `docs/Harness-Ledger.md` 的当前任务 row 中记录 `checked-created:<L-ID>`、`queued-promotion:<LC-ID>` 或 `checked-candidate:<LC-ID>`。
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- 各功能域的源文件几乎不重叠
|
|
14
14
|
- 开发者计划多会话 / 多 worktree 并行推进
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
不满足时继续使用普通任务队列 + CLI 生成 Harness Ledger,不强行拆模块。
|
|
17
17
|
|
|
18
18
|
## 核心概念
|
|
19
19
|
|
|
@@ -241,23 +241,22 @@ HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node scripts/check-harness.mjs <repo-path>
|
|
|
241
241
|
- 建议频率:每周一次,或每次基础设施 task 完成后
|
|
242
242
|
- 目的:避免 divergence 过大导致 merge 困难
|
|
243
243
|
|
|
244
|
-
##
|
|
244
|
+
## 与生成 Ledger 的分工
|
|
245
245
|
|
|
246
246
|
启用模块并行后:
|
|
247
247
|
|
|
248
248
|
- **Module Registry + module_plan.md** 追踪模块内步骤进度
|
|
249
|
-
- **
|
|
250
|
-
|
|
251
|
-
- 发布级汇总(哪个 release 包含了哪些模块步骤)
|
|
249
|
+
- **Harness Ledger** 从任务本地事实生成全局生命周期索引
|
|
250
|
+
- **Delivery SSoT** 只在需要跨模块、跨仓或多人交付编排时追踪 release / block 依赖
|
|
252
251
|
|
|
253
|
-
|
|
252
|
+
**禁止**:同一个工作项同时作为模块步骤和另一张手写任务生命周期表维护。
|
|
254
253
|
|
|
255
|
-
|
|
254
|
+
切换时必须归档 legacy 生命周期表:
|
|
256
255
|
|
|
257
|
-
- Feature SSoT
|
|
258
|
-
- Phase 历史和 completed
|
|
259
|
-
-
|
|
260
|
-
- 不允许把历史大表留在
|
|
256
|
+
- `Feature-SSoT.md` / `Private-Feature-SSoT.md` 移到 `docs/09-PLANNING/_archive/`。
|
|
257
|
+
- Phase 历史和 completed 明细作为历史证据保留,不再作为 active 表继续维护。
|
|
258
|
+
- 使用 `harness governance rebuild --archive --apply` 从 task / module 文件重建 Harness Ledger、module plan 和 visual map 索引。
|
|
259
|
+
- 不允许把历史大表留在 active 生命周期入口底部作为"文件内归档";这会让 Agent 继续读取旧状态。
|
|
261
260
|
|
|
262
261
|
## 归档与过期检测
|
|
263
262
|
|
|
@@ -277,16 +276,17 @@ HARNESS_REQUIRE_GLOBAL_MODULE_SYNC=1 node scripts/check-harness.mjs <repo-path>
|
|
|
277
276
|
|
|
278
277
|
对已有线性 Phase 历史的项目:
|
|
279
278
|
|
|
280
|
-
1. 冻结
|
|
281
|
-
2. 将 Feature
|
|
279
|
+
1. 冻结 legacy 生命周期表当前状态,标注"后续工作按模块推进"
|
|
280
|
+
2. 将 `Feature-SSoT.md` / `Private-Feature-SSoT.md` 历史明细移入 `docs/09-PLANNING/_archive/`
|
|
282
281
|
3. 将历史 `docs/09-PLANNING/TASKS/` 移入 `docs/09-PLANNING/_archive/`
|
|
283
282
|
4. 将历史 walkthrough 移入 `docs/10-WALKTHROUGH/_archive/`
|
|
284
283
|
5. 从最后一个 Phase 的未完成项中识别模块
|
|
285
284
|
6. 创建 Module Registry 和各模块的 module_plan.md
|
|
286
285
|
7. 创建 Module Session Prompt Pack 或每模块 `session_prompt.md`
|
|
287
286
|
8. 定义切换日期,此后不再创建新 Phase
|
|
287
|
+
9. 运行 `harness governance rebuild --archive --apply` 生成新的 Harness Ledger 和模块索引
|
|
288
288
|
|
|
289
289
|
不做的事:
|
|
290
290
|
- 不回溯重写历史 Ledger 条目
|
|
291
|
-
-
|
|
291
|
+
- 不直接删除 legacy 生命周期表证据;先归档,是否清理归档由 owner 决定
|
|
292
292
|
- 不强制已完成的 Phase 工作重新归类
|