coding-agent-harness 1.0.5 → 1.0.6
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/CONTRIBUTING.md +2 -2
- package/README.md +63 -3
- package/README.zh-CN.md +52 -3
- package/SKILL.md +43 -43
- package/dist/build-dist.mjs +189 -0
- package/dist/check-dist-observation.mjs +428 -0
- package/dist/check-harness.mjs +489 -0
- package/dist/check-import-graph.mjs +511 -0
- package/dist/check-runtime-emit.mjs +304 -0
- package/dist/check-type-boundaries.mjs +139 -0
- package/dist/commands/dashboard-command.mjs +80 -0
- package/dist/commands/migration-command.mjs +152 -0
- package/dist/commands/preset-command.mjs +91 -0
- package/dist/commands/task-command.mjs +324 -0
- package/dist/harness.mjs +304 -0
- package/dist/lib/capability-registry.mjs +643 -0
- package/dist/lib/check-module-parallel.mjs +227 -0
- package/dist/lib/check-profiles.mjs +414 -0
- package/dist/lib/check-task-contracts.mjs +54 -0
- package/dist/lib/core-shared.mjs +254 -0
- package/dist/lib/dashboard-data.mjs +608 -0
- package/dist/lib/dashboard-workbench.mjs +334 -0
- package/dist/lib/dashboard-writer.mjs +200 -0
- package/dist/lib/git-status-summary.mjs +45 -0
- package/dist/lib/governance-index-generator.mjs +236 -0
- package/dist/lib/governance-sync.mjs +617 -0
- package/dist/lib/governance-table-boundary.mjs +161 -0
- package/{scripts → dist}/lib/harness-core.mjs +2 -0
- package/dist/lib/harness-paths.mjs +338 -0
- package/dist/lib/lesson-maintenance.mjs +139 -0
- package/dist/lib/markdown-utils.mjs +193 -0
- package/dist/lib/migration-planner.mjs +439 -0
- package/dist/lib/migration-support.mjs +317 -0
- package/dist/lib/phase-kind.mjs +46 -0
- package/dist/lib/preset-audit-contracts.mjs +40 -0
- package/dist/lib/preset-engine.mjs +516 -0
- package/dist/lib/preset-registry.mjs +831 -0
- package/dist/lib/preset-resource-contracts.mjs +83 -0
- package/dist/lib/review-confirm-git-gate.mjs +244 -0
- package/dist/lib/status-builder.mjs +87 -0
- package/{scripts → dist}/lib/status-dashboard-renderer.mjs +44 -46
- package/dist/lib/structure-migration.mjs +404 -0
- package/dist/lib/subagent-authorization-audit.mjs +198 -0
- package/dist/lib/task-audit-metadata.mjs +376 -0
- package/dist/lib/task-audit-migration.mjs +355 -0
- package/dist/lib/task-completion-consistency.mjs +29 -0
- package/dist/lib/task-index.mjs +133 -0
- package/dist/lib/task-lesson-candidates.mjs +239 -0
- package/dist/lib/task-lesson-sedimentation.mjs +300 -0
- package/dist/lib/task-lifecycle/create-task-helpers.mjs +84 -0
- package/dist/lib/task-lifecycle/phase-sync.mjs +82 -0
- package/dist/lib/task-lifecycle/review-confirm.mjs +93 -0
- package/dist/lib/task-lifecycle/review-gates.mjs +62 -0
- package/dist/lib/task-lifecycle/review-submission.mjs +52 -0
- package/dist/lib/task-lifecycle/scaffold-provenance.mjs +54 -0
- package/dist/lib/task-lifecycle/template-files.mjs +52 -0
- package/dist/lib/task-lifecycle/text-utils.mjs +26 -0
- package/dist/lib/task-lifecycle.mjs +611 -0
- package/dist/lib/task-metadata.mjs +116 -0
- package/dist/lib/task-review-model.mjs +474 -0
- package/dist/lib/task-scanner.mjs +439 -0
- package/dist/lib/task-tombstone-commands.mjs +125 -0
- package/dist/postinstall.mjs +14 -0
- package/dist/run-built-tests.mjs +84 -0
- package/docs-release/README.md +1 -0
- package/docs-release/architecture/overview.md +12 -12
- package/docs-release/architecture/overview.zh-CN.md +12 -12
- package/docs-release/architecture/system-explainer/01-system-overview.md +15 -14
- package/docs-release/architecture/system-explainer/02-module-dependency.md +8 -8
- package/docs-release/architecture/system-explainer/03-task-lifecycle.md +3 -3
- package/docs-release/architecture/system-explainer/04-check-and-governance.md +9 -7
- package/docs-release/architecture/system-explainer/05-data-flow.md +5 -5
- package/docs-release/architecture/system-explainer/06-preset-and-migration.md +1 -4
- package/docs-release/architecture/system-explainer/en-US/01-system-overview.md +15 -14
- package/docs-release/architecture/system-explainer/en-US/02-module-dependency.md +8 -8
- package/docs-release/architecture/system-explainer/en-US/03-task-lifecycle.md +3 -3
- package/docs-release/architecture/system-explainer/en-US/04-check-and-governance.md +10 -8
- package/docs-release/architecture/system-explainer/en-US/05-data-flow.md +5 -5
- package/docs-release/architecture/system-explainer/en-US/06-preset-and-migration.md +1 -4
- package/docs-release/guides/agent-installation.en-US.md +14 -8
- package/docs-release/guides/agent-installation.md +14 -8
- package/docs-release/guides/contributing.md +3 -3
- package/docs-release/guides/contributing.zh-CN.md +3 -3
- package/docs-release/guides/document-audience-and-surfaces.en-US.md +10 -10
- package/docs-release/guides/document-audience-and-surfaces.md +10 -10
- package/docs-release/guides/legacy-migration-agent-prompt.md +25 -2
- package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +25 -2
- package/docs-release/guides/migration-playbook.en-US.md +63 -1
- package/docs-release/guides/migration-playbook.md +59 -1
- package/docs-release/guides/parent-control-repository-pattern.en-US.md +25 -25
- package/docs-release/guides/parent-control-repository-pattern.md +25 -25
- package/docs-release/guides/preset-development.md +2 -2
- package/docs-release/guides/repository-operating-models.en-US.md +21 -21
- package/docs-release/guides/repository-operating-models.md +21 -21
- package/docs-release/guides/task-state-machine.en-US.md +5 -5
- package/docs-release/guides/task-state-machine.md +5 -5
- package/docs-release/guides/typescript-runtime-migration-closeout.md +96 -0
- package/examples/minimal-project/AGENTS.md +2 -2
- package/examples/minimal-project/coding-agent-harness/harness.yaml +14 -0
- package/examples/minimal-project/coding-agent-harness/planning/tasks/demo-task/progress.md +11 -0
- package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/review.md +1 -1
- package/package.json +20 -12
- package/presets/legacy-migration/preset.yaml +5 -5
- package/presets/legacy-migration/templates/execution_strategy.append.md +1 -1
- package/presets/lesson-sedimentation/preset.yaml +3 -3
- package/presets/module/preset.yaml +2 -2
- package/presets/module/templates/execution_strategy.append.md +1 -1
- package/presets/module/templates/task_plan.append.md +3 -3
- package/presets/standard-task/preset.yaml +2 -2
- package/references/adversarial-review-standard.md +2 -2
- package/references/agents-md-pattern.md +14 -14
- package/references/cadence-ledger.md +1 -1
- package/references/ci-cd-standard.md +1 -1
- package/references/delivery-operating-model-standard.md +4 -4
- package/references/docs-directory-standard.md +65 -159
- package/references/external-source-intake-standard.md +10 -10
- package/references/harness-ledger.md +5 -5
- package/references/legacy-12-phase-bootstrap.md +2 -2
- package/references/lessons-governance.md +15 -15
- package/references/long-running-task-standard.md +6 -6
- package/references/module-parallel-standard.md +34 -34
- package/references/planning-loop.md +6 -6
- package/references/project-onboarding-audit.md +4 -4
- package/references/regression-system.md +2 -2
- package/references/repo-governance-standard.md +4 -4
- package/references/review-routing-standard.md +1 -1
- package/references/ssot-governance.md +19 -19
- package/references/taskr-gap-analysis.md +5 -5
- package/references/walkthrough-closeout.md +14 -14
- package/references/worktree-parallel.md +3 -3
- package/skills/preset-creator/references/complex-task-skeleton/task_plan.md +1 -1
- package/skills/preset-creator/references/preset-package-skeleton.md +5 -5
- package/templates/AGENTS.md.template +26 -26
- package/templates/architecture/README.md +4 -4
- package/templates/architecture/service-catalog.md +2 -2
- package/templates/architecture/services/service-template.md +1 -1
- package/templates/dashboard/assets/app-src/20-overview.js +11 -5
- package/templates/dashboard/assets/app-src/40-modules.js +1 -1
- package/templates/dashboard/assets/app.js +12 -6
- package/templates/dashboard/assets/i18n.js +4 -2
- package/templates/development/README.md +10 -10
- package/templates/development/cross-repo-debugging.md +3 -3
- package/templates/development/external-context/service-template.md +2 -2
- package/templates/development/external-source-packs/README.md +4 -4
- package/templates/integrations/README.md +4 -4
- package/templates/integrations/api-contract.md +2 -2
- package/templates/integrations/event-contract.md +2 -2
- package/templates/integrations/third-party/vendor-template.md +2 -2
- package/templates/integrations/webhook-contract.md +2 -2
- package/templates/ledger/Harness-Ledger.md +1 -1
- package/templates/planning/INDEX.md +1 -0
- package/templates/planning/module_session_prompt.md +1 -1
- package/templates/planning/task_plan.md +1 -1
- package/templates/planning/walkthrough.md +47 -0
- package/templates/reference/docs-library-standard.md +8 -8
- package/templates/reference/external-source-intake-standard.md +15 -15
- package/templates/reference/repo-governance-standard.md +1 -1
- package/templates/ssot/Module-Registry.md +1 -1
- package/templates/walkthrough/walkthrough-template.md +2 -2
- package/templates-zh-CN/AGENTS.md.template +26 -26
- package/templates-zh-CN/CLAUDE.md.template +1 -1
- package/templates-zh-CN/architecture/README.md +4 -4
- package/templates-zh-CN/architecture/service-catalog.md +2 -2
- package/templates-zh-CN/architecture/services/service-template.md +1 -1
- package/templates-zh-CN/development/README.md +10 -10
- package/templates-zh-CN/development/cross-repo-debugging.md +3 -3
- package/templates-zh-CN/development/external-context/service-template.md +2 -2
- package/templates-zh-CN/development/external-source-packs/README.md +4 -4
- package/templates-zh-CN/integrations/README.md +4 -4
- package/templates-zh-CN/integrations/api-contract.md +2 -2
- package/templates-zh-CN/integrations/event-contract.md +2 -2
- package/templates-zh-CN/integrations/third-party/vendor-template.md +2 -2
- package/templates-zh-CN/integrations/webhook-contract.md +2 -2
- package/templates-zh-CN/ledger/Harness-Ledger.md +1 -1
- package/templates-zh-CN/lessons/lesson-arch-process-change.md +1 -1
- package/templates-zh-CN/lessons/lesson-new-doc.md +3 -3
- package/templates-zh-CN/lessons/lesson-ref-change.md +4 -4
- package/templates-zh-CN/planning/module_session_prompt.md +11 -11
- package/templates-zh-CN/planning/walkthrough.md +47 -0
- package/templates-zh-CN/reference/adversarial-review-standard.md +2 -2
- package/templates-zh-CN/reference/delivery-operating-model-standard.md +3 -3
- package/templates-zh-CN/reference/docs-library-standard.md +28 -28
- package/templates-zh-CN/reference/execution-workflow-standard.md +1 -1
- package/templates-zh-CN/reference/external-source-intake-standard.md +16 -16
- package/templates-zh-CN/reference/harness-ledger-standard.md +6 -6
- package/templates-zh-CN/reference/regression-ssot-governance.md +2 -2
- package/templates-zh-CN/reference/repo-governance-standard.md +1 -1
- package/templates-zh-CN/reference/review-routing-standard.md +1 -1
- package/templates-zh-CN/reference/walkthrough-standard.md +7 -7
- package/templates-zh-CN/reference/worktree-standard.md +1 -1
- package/templates-zh-CN/regression/Cadence-Ledger.md +2 -2
- package/templates-zh-CN/ssot/Delivery-SSoT.md +3 -3
- package/templates-zh-CN/ssot/Module-Registry.md +3 -3
- package/templates-zh-CN/ssot/Regression-SSoT.md +2 -2
- package/templates-zh-CN/walkthrough/walkthrough-template.md +5 -5
- package/tsconfig.dist.json +16 -0
- package/tsconfig.json +25 -0
- package/tsconfig.runtime.json +24 -0
- package/examples/minimal-project/.harness-capabilities.json +0 -8
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/progress.md +0 -11
- package/scripts/check-harness.mjs +0 -508
- package/scripts/commands/dashboard-command.mjs +0 -67
- package/scripts/commands/migration-command.mjs +0 -126
- package/scripts/commands/preset-command.mjs +0 -73
- package/scripts/commands/task-command.mjs +0 -328
- package/scripts/harness.mjs +0 -291
- package/scripts/lib/capability-registry.mjs +0 -587
- package/scripts/lib/check-module-parallel.mjs +0 -230
- package/scripts/lib/check-profiles.mjs +0 -372
- package/scripts/lib/check-task-contracts.mjs +0 -55
- package/scripts/lib/core-shared.mjs +0 -249
- package/scripts/lib/dashboard-data.mjs +0 -520
- package/scripts/lib/dashboard-workbench.mjs +0 -336
- package/scripts/lib/dashboard-writer.mjs +0 -202
- package/scripts/lib/git-status-summary.mjs +0 -46
- package/scripts/lib/governance-index-generator.mjs +0 -174
- package/scripts/lib/governance-sync.mjs +0 -611
- package/scripts/lib/governance-table-boundary.mjs +0 -175
- package/scripts/lib/lesson-maintenance.mjs +0 -152
- package/scripts/lib/markdown-utils.mjs +0 -191
- package/scripts/lib/migration-planner.mjs +0 -476
- package/scripts/lib/migration-support.mjs +0 -312
- package/scripts/lib/phase-kind.mjs +0 -50
- package/scripts/lib/preset-audit-contracts.mjs +0 -37
- package/scripts/lib/preset-engine.mjs +0 -494
- package/scripts/lib/preset-registry.mjs +0 -776
- package/scripts/lib/preset-resource-contracts.mjs +0 -83
- package/scripts/lib/review-confirm-git-gate.mjs +0 -248
- package/scripts/lib/status-builder.mjs +0 -88
- package/scripts/lib/subagent-authorization-audit.mjs +0 -196
- package/scripts/lib/task-audit-metadata.mjs +0 -385
- package/scripts/lib/task-audit-migration.mjs +0 -350
- package/scripts/lib/task-completion-consistency.mjs +0 -26
- package/scripts/lib/task-index.mjs +0 -93
- package/scripts/lib/task-lesson-candidates.mjs +0 -242
- package/scripts/lib/task-lesson-sedimentation.mjs +0 -326
- package/scripts/lib/task-lifecycle/create-task-helpers.mjs +0 -67
- package/scripts/lib/task-lifecycle/phase-sync.mjs +0 -88
- package/scripts/lib/task-lifecycle/review-confirm.mjs +0 -112
- package/scripts/lib/task-lifecycle/review-gates.mjs +0 -73
- package/scripts/lib/task-lifecycle/review-submission.mjs +0 -63
- package/scripts/lib/task-lifecycle/scaffold-provenance.mjs +0 -49
- package/scripts/lib/task-lifecycle/template-files.mjs +0 -53
- package/scripts/lib/task-lifecycle/text-utils.mjs +0 -24
- package/scripts/lib/task-lifecycle.mjs +0 -616
- package/scripts/lib/task-metadata.mjs +0 -118
- package/scripts/lib/task-review-model.mjs +0 -455
- package/scripts/lib/task-scanner.mjs +0 -503
- package/scripts/lib/task-tombstone-commands.mjs +0 -140
- package/scripts/postinstall.mjs +0 -14
- package/templates/walkthrough/Closeout-SSoT.md +0 -43
- package/templates-zh-CN/walkthrough/Closeout-SSoT.md +0 -42
- /package/examples/minimal-project/{docs → coding-agent-harness/governance/generated}/Harness-Ledger.md +0 -0
- /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/INDEX.md +0 -0
- /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/brief.md +0 -0
- /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/execution_strategy.md +0 -0
- /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/findings.md +0 -0
- /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/lesson_candidates.md +0 -0
- /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/task_plan.md +0 -0
- /package/examples/minimal-project/{docs/09-PLANNING/TASKS → coding-agent-harness/planning/tasks}/demo-task/visual_map.md +0 -0
package/docs-release/README.md
CHANGED
|
@@ -71,6 +71,7 @@ Not every document is written for the same reader.
|
|
|
71
71
|
- `guides/migration-playbook.md` / `guides/migration-playbook.en-US.md` — smooth migration guide for existing legacy harness projects. 旧 Harness 项目的平滑迁移指南。
|
|
72
72
|
- `guides/legacy-migration-agent-prompt.md` / `guides/legacy-migration-agent-prompt.zh-CN.md` — prompt contract for agents running baseline or full legacy migration. 给迁移 Agent 使用的执行合同。
|
|
73
73
|
- `guides/full-legacy-migration-subagent-strategy.md` / `guides/full-legacy-migration-subagent-strategy.zh-CN.md` — full readable cutover strategy with subagent roles, adversarial review, and dashboard/CLI proof gates. 完整可读迁移的 subagent 分工、对抗审查和 Dashboard/CLI 证据门禁。
|
|
74
|
+
- `guides/typescript-runtime-migration-closeout.md` — public closeout for the TypeScript runtime source-twin migration and the remaining `.mjs` shim policy. TypeScript runtime source twin 迁移收口和剩余 `.mjs` shim 策略。
|
|
74
75
|
|
|
75
76
|
## Repository Operating Models / 仓库运行模式
|
|
76
77
|
|
|
@@ -35,10 +35,10 @@ agent workflow runs over days, handoffs, reviews, and releases.
|
|
|
35
35
|
```mermaid
|
|
36
36
|
flowchart TB
|
|
37
37
|
Skill["Agent skill<br/>SKILL.md"]
|
|
38
|
-
CLI["Harness CLI<br/>
|
|
38
|
+
CLI["Harness CLI<br/>dist/harness.mjs"]
|
|
39
39
|
Standards["Standards<br/>references/"]
|
|
40
40
|
Templates["Scaffolds<br/>templates/ + templates-zh-CN/"]
|
|
41
|
-
Target["Target repository<br/>AGENTS.md +
|
|
41
|
+
Target["Target repository<br/>AGENTS.md + coding-agent-harness/"]
|
|
42
42
|
Scanner["Scanner and validators<br/>status/check"]
|
|
43
43
|
Dashboard["Dashboard / Workbench<br/>HTML + JSON"]
|
|
44
44
|
Human["Human reviewer<br/>approval and inspection"]
|
|
@@ -66,15 +66,15 @@ project facts.
|
|
|
66
66
|
```mermaid
|
|
67
67
|
flowchart TB
|
|
68
68
|
Entry["AGENTS.md<br/>agent entry and routing"]
|
|
69
|
-
Registry["
|
|
69
|
+
Registry["coding-agent-harness/harness.yaml<br/>enabled capabilities"]
|
|
70
70
|
Docs["docs/"]
|
|
71
|
-
Architecture["
|
|
72
|
-
Development["
|
|
73
|
-
QA["
|
|
74
|
-
Integrations["
|
|
75
|
-
Planning["
|
|
76
|
-
Walkthrough["
|
|
77
|
-
Reference["
|
|
71
|
+
Architecture["coding-agent-harness/context/architecture<br/>system facts"]
|
|
72
|
+
Development["coding-agent-harness/context/development<br/>local setup and code map"]
|
|
73
|
+
QA["coding-agent-harness/governance/regression<br/>regression and cadence"]
|
|
74
|
+
Integrations["coding-agent-harness/context/integrations<br/>external contracts"]
|
|
75
|
+
Planning["coding-agent-harness/planning<br/>tasks and modules"]
|
|
76
|
+
Walkthrough["coding-agent-harness/planning/tasks/<task><br/>closeout evidence"]
|
|
77
|
+
Reference["coding-agent-harness/governance/standards<br/>local operating standards"]
|
|
78
78
|
Ledger["Harness Ledger / SSoTs / Lessons<br/>long-lived memory"]
|
|
79
79
|
|
|
80
80
|
Entry --> Docs
|
|
@@ -98,8 +98,8 @@ The target repository can be organized in three ways:
|
|
|
98
98
|
|
|
99
99
|
| Model | Control surface | Execution surface |
|
|
100
100
|
| --- | --- | --- |
|
|
101
|
-
| Single repo | The same repository owns `AGENTS.md`, `
|
|
102
|
-
| Independent multi-repo | Each repository owns its own local `AGENTS.md` and `
|
|
101
|
+
| Single repo | The same repository owns `AGENTS.md`, `coding-agent-harness/`, code, tests, and closeout. | The same repository. |
|
|
102
|
+
| Independent multi-repo | Each repository owns its own local `AGENTS.md` and `coding-agent-harness/`. | Each repository runs independently. |
|
|
103
103
|
| Parent-control repository | A parent repository owns the global Harness control plane. | Child repositories own implementation code and local checks. |
|
|
104
104
|
|
|
105
105
|
For products split across frontend, backend, SDKs, services, and upstream references,
|
|
@@ -29,10 +29,10 @@ Prompt engineering 改善一次模型调用。Context engineering 改善模型
|
|
|
29
29
|
```mermaid
|
|
30
30
|
flowchart TB
|
|
31
31
|
Skill["Agent Skill<br/>SKILL.md"]
|
|
32
|
-
CLI["Harness CLI<br/>
|
|
32
|
+
CLI["Harness CLI<br/>dist/harness.mjs"]
|
|
33
33
|
Standards["标准<br/>references/"]
|
|
34
34
|
Templates["脚手架<br/>templates/ + templates-zh-CN/"]
|
|
35
|
-
Target["目标仓库<br/>AGENTS.md +
|
|
35
|
+
Target["目标仓库<br/>AGENTS.md + coding-agent-harness/"]
|
|
36
36
|
Scanner["扫描器与校验器<br/>status/check"]
|
|
37
37
|
Dashboard["Dashboard / Workbench<br/>HTML + JSON"]
|
|
38
38
|
Human["人工审查者<br/>批准与检查"]
|
|
@@ -58,15 +58,15 @@ flowchart TB
|
|
|
58
58
|
```mermaid
|
|
59
59
|
flowchart TB
|
|
60
60
|
Entry["AGENTS.md<br/>Agent 入口与路由"]
|
|
61
|
-
Registry["
|
|
61
|
+
Registry["coding-agent-harness/harness.yaml<br/>已启用能力"]
|
|
62
62
|
Docs["docs/"]
|
|
63
|
-
Architecture["
|
|
64
|
-
Development["
|
|
65
|
-
QA["
|
|
66
|
-
Integrations["
|
|
67
|
-
Planning["
|
|
68
|
-
Walkthrough["
|
|
69
|
-
Reference["
|
|
63
|
+
Architecture["coding-agent-harness/context/architecture<br/>系统事实"]
|
|
64
|
+
Development["coding-agent-harness/context/development<br/>本地设置与代码地图"]
|
|
65
|
+
QA["coding-agent-harness/governance/regression<br/>回归与节奏"]
|
|
66
|
+
Integrations["coding-agent-harness/context/integrations<br/>外部契约"]
|
|
67
|
+
Planning["coding-agent-harness/planning<br/>任务与模块"]
|
|
68
|
+
Walkthrough["coding-agent-harness/planning/tasks/<task><br/>收口证据"]
|
|
69
|
+
Reference["coding-agent-harness/governance/standards<br/>本地运行标准"]
|
|
70
70
|
Ledger["Harness Ledger / SSoT / Lessons<br/>长期记忆"]
|
|
71
71
|
|
|
72
72
|
Entry --> Docs
|
|
@@ -89,8 +89,8 @@ flowchart TB
|
|
|
89
89
|
|
|
90
90
|
| 模式 | 控制面 | 执行面 |
|
|
91
91
|
| --- | --- | --- |
|
|
92
|
-
| 单仓模式 | 同一个仓库管理 `AGENTS.md`、`
|
|
93
|
-
| 多仓独立模式 | 每个仓库都有自己的局部 `AGENTS.md` 和 `
|
|
92
|
+
| 单仓模式 | 同一个仓库管理 `AGENTS.md`、`coding-agent-harness/`、代码、测试和收口。 | 同一个仓库。 |
|
|
93
|
+
| 多仓独立模式 | 每个仓库都有自己的局部 `AGENTS.md` 和 `coding-agent-harness/`。 | 每个仓库独立执行。 |
|
|
94
94
|
| 主控仓库模式 | 父仓库管理全局 Harness 控制面。 | 子仓库管理实现代码和局部检查。 |
|
|
95
95
|
|
|
96
96
|
如果一个产品拆成前端、后端、SDK、微服务和上游参考仓库,主控仓库模式可以把 Agent 启动入口、生成的任务生命周期 Ledger、回归状态和收口证据固定在一个地方。详见 `docs-release/guides/repository-operating-models.md` 和 `docs-release/guides/parent-control-repository-pattern.md`。
|
|
@@ -67,7 +67,7 @@ flowchart LR
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
- **Package**:你 `npm install` 的那个东西,包含 CLI、模板、标准文档、Preset 包
|
|
70
|
-
- **Target Repo**:你的项目,harness 在里面创建 `
|
|
70
|
+
- **Target Repo**:你的项目,harness 在里面创建 `coding-agent-harness/` 文档树来记录任务状态
|
|
71
71
|
- **Runtime**:CLI 运行时,扫描文档树、验证合规、生成 Dashboard
|
|
72
72
|
- **Human**:浏览器里看 Dashboard,在 Workbench 里做审查确认
|
|
73
73
|
|
|
@@ -85,7 +85,7 @@ Human 通过 review-confirm 再写回 Target Repo**。
|
|
|
85
85
|
flowchart TD
|
|
86
86
|
PKG["📦 Package\ncoding-agent-harness@npm"]
|
|
87
87
|
|
|
88
|
-
PKG --> CLI["harness CLI\
|
|
88
|
+
PKG --> CLI["harness CLI\ndist/harness.mjs\n唯一命令入口"]
|
|
89
89
|
PKG --> Lib["核心库\nscripts/lib/\n~30 个模块,6 个功能层"]
|
|
90
90
|
PKG --> Templates["任务模板\ntemplates/\n任务骨架文件(task_plan / visual_map 等)"]
|
|
91
91
|
PKG --> References["操作标准\nreferences/\n可复制到目标仓库的规范文档"]
|
|
@@ -102,17 +102,18 @@ flowchart TD
|
|
|
102
102
|
REPO["📁 Target Repo\n你的项目仓库"]
|
|
103
103
|
|
|
104
104
|
REPO --> Entry["AGENTS.md\nAgent 入口和路由\n(告诉 Agent 去哪里找上下文)"]
|
|
105
|
-
REPO -->
|
|
106
|
-
REPO -->
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
REPO --> Manifest["coding-agent-harness/harness.yaml\n启用能力和目录结构"]
|
|
106
|
+
REPO --> Harness["coding-agent-harness/\nHarness 工作区"]
|
|
107
|
+
REPO --> Docs["docs/\nReference 文档和项目标准"]
|
|
108
|
+
|
|
109
|
+
Harness --> Planning["planning/\n任务目录 + 模块目录"]
|
|
110
|
+
Harness --> Ledger["governance/generated/Harness-Ledger.md\n全局账本(所有任务汇总)"]
|
|
111
|
+
Harness --> Walkthrough["任务本地 walkthrough.md\n收口证据"]
|
|
112
|
+
Docs --> Reference["coding-agent-harness/governance/standards/\n本地操作标准(从 Package 复制过来)"]
|
|
112
113
|
Docs --> Governance["01-GOVERNANCE/\nLesson 沉淀库"]
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
每个任务对应 `
|
|
116
|
+
每个任务对应 `coding-agent-harness/planning/tasks/<task-id>/` 下的一个目录,
|
|
116
117
|
里面有 `task_plan.md`、`progress.md`、`visual_map.md`、`review.md` 等文件。
|
|
117
118
|
|
|
118
119
|
### Runtime 做什么
|
|
@@ -137,14 +138,14 @@ Runtime 是**无状态的**——每次运行都从 Markdown 文件重新读取
|
|
|
137
138
|
|
|
138
139
|
| 概念 | 一句话解释 | 在哪里 |
|
|
139
140
|
| --- | --- | --- |
|
|
140
|
-
| **Task** | 一个有生命周期的工作单元 | `
|
|
141
|
+
| **Task** | 一个有生命周期的工作单元 | `coding-agent-harness/planning/tasks/<id>/` |
|
|
141
142
|
| **Budget** | 任务复杂度:`simple` / `standard` / `complex`,决定门禁严格程度 | `task_plan.md` |
|
|
142
143
|
| **Phase** | Visual Map 中的执行阶段,有状态和完成度 | `visual_map.md` |
|
|
143
|
-
| **Capability** | 可选功能模块,如 `dashboard`、`
|
|
144
|
+
| **Capability** | 可选功能模块,如 `dashboard`、`module-parallel` | `coding-agent-harness/harness.yaml` |
|
|
144
145
|
| **Review Gate** | 阻止任务完成的审查门禁,必须人工确认才能通过 | `INDEX.md` + `review.md` |
|
|
145
|
-
| **Governance Sync** | 任务状态变更时自动更新全局账本的原子操作 | `Harness-Ledger.md` |
|
|
146
|
+
| **Governance Sync** | 任务状态变更时自动更新全局账本的原子操作 | `coding-agent-harness/governance/generated/Harness-Ledger.md` |
|
|
146
147
|
| **Preset** | 可复用的任务方法包,如 `legacy-migration`、`module` | `presets/<id>/` |
|
|
147
|
-
| **Lesson** | 从任务中沉淀的可复用经验 | `
|
|
148
|
+
| **Lesson** | 从任务中沉淀的可复用经验 | `coding-agent-harness/governance/lessons/` |
|
|
148
149
|
| **Tombstone** | 软删除 / 合并 / 被取代的任务标记 | `task_plan.md` 中的特殊块 |
|
|
149
150
|
| **lifecycleState** | 从任务状态 + 审查状态综合派生的队列分类 | 运行时派生,不存文件 |
|
|
150
151
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
flowchart LR
|
|
9
|
-
User["用户 / Agent\n$ harness <command> [target]"] -->|"解析参数 + 分发"| Entry["
|
|
9
|
+
User["用户 / Agent\n$ harness <command> [target]"] -->|"解析参数 + 分发"| Entry["dist/harness.mjs\n唯一 CLI 入口"]
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
`harness.mjs` 做两件事:解析命令行参数,然后分发给对应的 command 模块或直接调用核心库。
|
|
@@ -18,13 +18,13 @@ flowchart LR
|
|
|
18
18
|
|
|
19
19
|
```mermaid
|
|
20
20
|
flowchart TD
|
|
21
|
-
Entry["
|
|
21
|
+
Entry["dist/harness.mjs"]
|
|
22
22
|
|
|
23
|
-
Entry -->|"dashboard\ndev"| DashCmd["
|
|
24
|
-
Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["
|
|
25
|
-
Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["
|
|
26
|
-
Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["
|
|
27
|
-
Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["lib/harness-core.mjs\n(直接调用)"]
|
|
23
|
+
Entry -->|"dashboard\ndev"| DashCmd["dist/commands/dashboard-command.mjs\nDashboard 生成 + 动态服务"]
|
|
24
|
+
Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["dist/commands/migration-command.mjs\n迁移三阶段命令"]
|
|
25
|
+
Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["dist/commands/task-command.mjs\n任务生命周期命令"]
|
|
26
|
+
Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["dist/commands/preset-command.mjs\nPreset 管理命令"]
|
|
27
|
+
Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["dist/lib/harness-core.mjs\n(直接调用)"]
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
四个 command 模块各自负责一个领域,其余命令直接调用 `harness-core.mjs`。
|
|
@@ -86,7 +86,7 @@ flowchart LR
|
|
|
86
86
|
|
|
87
87
|
### ② 任务扫描层
|
|
88
88
|
|
|
89
|
-
负责读取 `
|
|
89
|
+
负责读取 `coding-agent-harness/planning/tasks/` 下的所有文件,解析出结构化数据:
|
|
90
90
|
|
|
91
91
|
```mermaid
|
|
92
92
|
flowchart TD
|
|
@@ -197,7 +197,7 @@ flowchart TD
|
|
|
197
197
|
sequenceDiagram
|
|
198
198
|
participant CLI as harness CLI
|
|
199
199
|
participant Lock as .harness/locks/governance-sync.lock
|
|
200
|
-
participant Ledger as
|
|
200
|
+
participant Ledger as coding-agent-harness/governance/generated/Harness-Ledger.md
|
|
201
201
|
participant Git
|
|
202
202
|
|
|
203
203
|
CLI->>Lock: fs.openSync(lockPath, "wx")\n(排他写入,EEXIST 则抛错)
|
|
@@ -216,7 +216,7 @@ sequenceDiagram
|
|
|
216
216
|
| 操作 | 触发方式 | 写入目标 | 频率 |
|
|
217
217
|
| --- | --- | --- | --- |
|
|
218
218
|
| `syncTaskGovernance` | 自动(每次状态变更) | `Harness-Ledger.md` 对应行 | 高频 |
|
|
219
|
-
| `rebuildGovernanceIndexes` | 手动(`harness governance rebuild`) | `
|
|
219
|
+
| `rebuildGovernanceIndexes` | 手动(`harness governance rebuild`) | `coding-agent-harness/governance/generated/` 索引表 | 低频 |
|
|
220
220
|
|
|
221
221
|
---
|
|
222
222
|
|
|
@@ -272,7 +272,7 @@ Tombstone 块追加到 `task_plan.md` 末尾(不替换原内容),保留历
|
|
|
272
272
|
### 为什么 Tombstone 不直接删除任务目录
|
|
273
273
|
|
|
274
274
|
文档库没有数据库级外键,物理删除后会留下孤儿引用
|
|
275
|
-
(Ledger、Closeout
|
|
275
|
+
(Ledger、Closeout Index、其他任务的 `Supersedes` 字段都可能指向被删任务)。
|
|
276
276
|
Tombstone 标记让 Soft-deleted / Superseded 队列可以只读追溯"为什么这个任务不在活跃队列里"。
|
|
277
277
|
|
|
278
278
|
### 为什么 review-confirm 需要两次 Git 提交
|
|
@@ -68,7 +68,7 @@ flowchart TD
|
|
|
68
68
|
|
|
69
69
|
### ① validateCapabilities
|
|
70
70
|
|
|
71
|
-
读取
|
|
71
|
+
读取 `coding-agent-harness/harness.yaml`,检查:
|
|
72
72
|
- 声明的能力是否都是合法的能力名(在 `allowedCapabilities` 枚举中)
|
|
73
73
|
- 能力的依赖是否都已启用(如 `subagent-worker` 需要先有 `module-parallel`)
|
|
74
74
|
- 能力对应的 artifact 路径是否存在
|
|
@@ -187,8 +187,8 @@ flowchart TD
|
|
|
187
187
|
Filter --> Sort["按 id 字母序排序"]
|
|
188
188
|
Sort --> Gen["生成 governance surfaces"]
|
|
189
189
|
|
|
190
|
-
Gen --> TI["
|
|
191
|
-
Gen --> MI["
|
|
190
|
+
Gen --> TI["coding-agent-harness/governance/generated/task-index.md\n所有任务的汇总索引表"]
|
|
191
|
+
Gen --> MI["coding-agent-harness/governance/generated/module-index.md\n模块步骤索引表"]
|
|
192
192
|
|
|
193
193
|
TI --> Atomic["原子写入\n(governance-sync 锁 + git commit)"]
|
|
194
194
|
MI --> Atomic
|
|
@@ -207,11 +207,13 @@ flowchart TD
|
|
|
207
207
|
|
|
208
208
|
### 为什么检查器分 failures 和 warnings 两级
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
-
|
|
212
|
-
-
|
|
210
|
+
两级从一开始就存在。v2 中,活跃目标项目必须从
|
|
211
|
+
`coding-agent-harness/harness.yaml` 运行:
|
|
212
|
+
- v2 项目对缺失必需文件报 failure,并可阻断 CI
|
|
213
|
+
- legacy 结构只作为迁移输入;先运行 `migrate-structure --plan` 和
|
|
214
|
+
`migrate-structure --apply`,再进入普通 status/check/dashboard 流程
|
|
213
215
|
|
|
214
|
-
|
|
216
|
+
这样 active runtime 保持单一形状,同时迁移命令仍能读取旧结构并生成切换计划。
|
|
215
217
|
没有考虑过三级或更多级别——两级已经足够区分"必须修复"和"建议迁移"。
|
|
216
218
|
|
|
217
219
|
### 为什么 governance 表格有时间边界
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
```mermaid
|
|
6
6
|
flowchart LR
|
|
7
|
-
A["📄 Markdown 文件\n(
|
|
7
|
+
A["📄 Markdown 文件\n(coding-agent-harness/ 下的源文件)"]
|
|
8
8
|
B["⚙️ Scanner\n(解析 + 验证)"]
|
|
9
9
|
C["📊 Dashboard\n(HTML + JSON)"]
|
|
10
10
|
|
|
@@ -44,7 +44,7 @@ Scanner 层(`task-scanner.mjs` + `task-review-model.mjs`)把原始 Markdown
|
|
|
44
44
|
flowchart TD
|
|
45
45
|
CT["collectTasks()"]
|
|
46
46
|
|
|
47
|
-
CT --> Discover["listTaskPlanPaths()\n扫描两个根目录:\
|
|
47
|
+
CT --> Discover["listTaskPlanPaths()\n扫描两个根目录:\ncoding-agent-harness/planning/tasks/\ncoding-agent-harness/planning/modules/\n过滤模板和归档目录"]
|
|
48
48
|
|
|
49
49
|
Discover --> ReadFiles["对每个任务目录读取 9 个文件\ntask_plan / brief / progress\nreview / visual_map\nexecution_strategy\nlesson_candidates / findings / context"]
|
|
50
50
|
|
|
@@ -152,13 +152,13 @@ flowchart TD
|
|
|
152
152
|
flowchart TD
|
|
153
153
|
Collect["collectMarkdownDocuments()"]
|
|
154
154
|
|
|
155
|
-
Collect --> Fixed["固定路径(存在时收集)\nHarness-Ledger.md\
|
|
155
|
+
Collect --> Fixed["固定路径(存在时收集)\nHarness-Ledger.md\ncoding-agent-harness/planning/modules/Module-Registry.md\ncoding-agent-harness/governance/regression/Regression-SSoT.md\ncoding-agent-harness/governance/generated/Closeout-Index.md"]
|
|
156
156
|
|
|
157
|
-
Collect --> Walkthrough["
|
|
157
|
+
Collect --> Walkthrough["coding-agent-harness/planning/tasks/<task>/ 下所有 .md\n(排除 _archive/ 和 _ 开头文件)"]
|
|
158
158
|
|
|
159
159
|
Collect --> TaskDocs["每个任务目录下:\nbrief / task_plan / execution_strategy\nvisual_map / lesson_candidates\nprogress / review / findings\nreferences/INDEX.md / artifacts/INDEX.md"]
|
|
160
160
|
|
|
161
|
-
Collect --> ModuleDocs["
|
|
161
|
+
Collect --> ModuleDocs["coding-agent-harness/planning/modules/ 下:\n每个模块的 module_plan.md\n每个模块的 brief.md"]
|
|
162
162
|
|
|
163
163
|
Collect --> Lessons["01-GOVERNANCE/lessons/ 下所有 .md"]
|
|
164
164
|
```
|
|
@@ -108,7 +108,7 @@ flowchart LR
|
|
|
108
108
|
```
|
|
109
109
|
writeScopes:
|
|
110
110
|
tasks:
|
|
111
|
-
path:
|
|
111
|
+
path: coding-agent-harness/planning/tasks/**
|
|
112
112
|
access: write
|
|
113
113
|
```
|
|
114
114
|
|
|
@@ -216,8 +216,6 @@ flowchart TD
|
|
|
216
216
|
Core --> AdvReview["adversarial-review\n对抗审查报告\n(别名:review-contract)"]
|
|
217
217
|
Core --> LongRunning["long-running-task\n长时间运行任务合约"]
|
|
218
218
|
Core --> Dashboard["dashboard\n本地 HTML Dashboard"]
|
|
219
|
-
Core --> SafeAdoption["safe-adoption\n旧项目平滑接入"]
|
|
220
|
-
|
|
221
219
|
ModParallel --> SubagentWorker["subagent-worker\ncommit-backed worker 交接协议"]
|
|
222
220
|
```
|
|
223
221
|
|
|
@@ -231,7 +229,6 @@ flowchart TD
|
|
|
231
229
|
| `adversarial-review` | 发布、架构、安全、数据或策略风险需要独立审查产物时 |
|
|
232
230
|
| `long-running-task` | Agent 可能跨多个 loop 运行而无需每步用户确认时 |
|
|
233
231
|
| `dashboard` | 需要本地只读状态可视化时 |
|
|
234
|
-
| `safe-adoption` | 将 v1.0 接入已有 harness 项目而不重写历史时 |
|
|
235
232
|
|
|
236
233
|
### Level 2 — Preset 资源声明(resources)
|
|
237
234
|
|
|
@@ -68,7 +68,7 @@ flowchart LR
|
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
- **Package**: What you `npm install` — contains the CLI, templates, standards docs, and Preset packages
|
|
71
|
-
- **Target Repo**: Your project, where harness creates a `
|
|
71
|
+
- **Target Repo**: Your project, where harness creates a `coding-agent-harness/` tree to record task state
|
|
72
72
|
- **Runtime**: The CLI runtime that scans the doc tree, validates compliance, and generates the Dashboard
|
|
73
73
|
- **Human**: Views the Dashboard in a browser, performs review confirmation in the Workbench
|
|
74
74
|
|
|
@@ -86,7 +86,7 @@ The whole system is a read-write loop centered on Markdown files, with no hidden
|
|
|
86
86
|
flowchart TD
|
|
87
87
|
PKG["📦 Package\ncoding-agent-harness@npm"]
|
|
88
88
|
|
|
89
|
-
PKG --> CLI["harness CLI\
|
|
89
|
+
PKG --> CLI["harness CLI\ndist/harness.mjs\nSingle command entry point"]
|
|
90
90
|
PKG --> Lib["Core library\nscripts/lib/\n~30 modules, 6 functional layers"]
|
|
91
91
|
PKG --> Templates["Task templates\ntemplates/\nTask scaffold files (task_plan / visual_map etc.)"]
|
|
92
92
|
PKG --> References["Operating standards\nreferences/\nSpec docs that can be copied to target repos"]
|
|
@@ -103,17 +103,18 @@ flowchart TD
|
|
|
103
103
|
REPO["📁 Target Repo\nYour project repository"]
|
|
104
104
|
|
|
105
105
|
REPO --> Entry["AGENTS.md\nAgent entry point and routing\n(tells Agents where to find context)"]
|
|
106
|
-
REPO -->
|
|
107
|
-
REPO -->
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
REPO --> Manifest["coding-agent-harness/harness.yaml\nEnabled capabilities and structure"]
|
|
107
|
+
REPO --> Harness["coding-agent-harness/\nHarness workspace"]
|
|
108
|
+
REPO --> Docs["docs/\nReference docs and project standards"]
|
|
109
|
+
|
|
110
|
+
Harness --> Planning["planning/\nTask directory + module directory"]
|
|
111
|
+
Harness --> Ledger["governance/generated/Harness-Ledger.md\nGlobal ledger (all tasks summarized)"]
|
|
112
|
+
Harness --> Walkthrough["task-local walkthrough.md\nCloseout evidence"]
|
|
113
|
+
Docs --> Reference["coding-agent-harness/governance/standards/\nLocal operating standards (copied from Package)"]
|
|
113
114
|
Docs --> Governance["01-GOVERNANCE/\nLesson library"]
|
|
114
115
|
```
|
|
115
116
|
|
|
116
|
-
Each task corresponds to a directory under `
|
|
117
|
+
Each task corresponds to a directory under `coding-agent-harness/planning/tasks/<task-id>/`,
|
|
117
118
|
containing files like `task_plan.md`, `progress.md`, `visual_map.md`, `review.md`, etc.
|
|
118
119
|
|
|
119
120
|
### What the Runtime does
|
|
@@ -138,14 +139,14 @@ caching no intermediate state (except file watching in `harness dev`).
|
|
|
138
139
|
|
|
139
140
|
| Concept | One-line explanation | Where |
|
|
140
141
|
| --- | --- | --- |
|
|
141
|
-
| **Task** | A unit of work with a lifecycle | `
|
|
142
|
+
| **Task** | A unit of work with a lifecycle | `coding-agent-harness/planning/tasks/<id>/` |
|
|
142
143
|
| **Budget** | Task complexity: `simple` / `standard` / `complex`, determines gate strictness | `task_plan.md` |
|
|
143
144
|
| **Phase** | An execution phase in the Visual Map, with state and completion | `visual_map.md` |
|
|
144
|
-
| **Capability** | Optional feature module, e.g. `dashboard`, `
|
|
145
|
+
| **Capability** | Optional feature module, e.g. `dashboard`, `module-parallel` | `coding-agent-harness/harness.yaml` |
|
|
145
146
|
| **Review Gate** | A review gate that blocks task completion, requires human confirmation to pass | `review.md` |
|
|
146
|
-
| **Governance Sync** | Atomic operation that auto-updates the global ledger on task state changes | `Harness-Ledger.md` |
|
|
147
|
+
| **Governance Sync** | Atomic operation that auto-updates the global ledger on task state changes | `coding-agent-harness/governance/generated/Harness-Ledger.md` |
|
|
147
148
|
| **Preset** | A reusable task method package, e.g. `legacy-migration`, `module` | `presets/<id>/` |
|
|
148
|
-
| **Lesson** | Reusable knowledge distilled from a task | `
|
|
149
|
+
| **Lesson** | Reusable knowledge distilled from a task | `coding-agent-harness/governance/lessons/` |
|
|
149
150
|
| **Tombstone** | Marker for soft-deleted / merged / superseded tasks | Special block in `task_plan.md` |
|
|
150
151
|
| **lifecycleState** | Queue classification derived from task state + review state combined | Derived at runtime, not stored in files |
|
|
151
152
|
|
|
@@ -6,7 +6,7 @@ All commands come through a single file:
|
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
flowchart LR
|
|
9
|
-
User["User / Agent\n$ harness <command> [target]"] -->|"parse args + dispatch"| Entry["
|
|
9
|
+
User["User / Agent\n$ harness <command> [target]"] -->|"parse args + dispatch"| Entry["dist/harness.mjs\nSingle CLI entry point"]
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
`harness.mjs` does two things: parses command-line arguments, then dispatches to the
|
|
@@ -19,13 +19,13 @@ It contains no business logic itself.
|
|
|
19
19
|
|
|
20
20
|
```mermaid
|
|
21
21
|
flowchart TD
|
|
22
|
-
Entry["
|
|
22
|
+
Entry["dist/harness.mjs"]
|
|
23
23
|
|
|
24
|
-
Entry -->|"dashboard\ndev"| DashCmd["
|
|
25
|
-
Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["
|
|
26
|
-
Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["
|
|
27
|
-
Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["
|
|
28
|
-
Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["lib/harness-core.mjs\n(called directly)"]
|
|
24
|
+
Entry -->|"dashboard\ndev"| DashCmd["dist/commands/dashboard-command.mjs\nDashboard generation + dynamic serving"]
|
|
25
|
+
Entry -->|"migrate-plan\nmigrate-run\nmigrate-verify"| MigCmd["dist/commands/migration-command.mjs\nMigration three-phase commands"]
|
|
26
|
+
Entry -->|"new-task / task-start\ntask-phase / task-review\ntask-complete / review-confirm\ntask-tombstone"| TaskCmd["dist/commands/task-command.mjs\nTask lifecycle commands"]
|
|
27
|
+
Entry -->|"preset catalog\npreset install\npreset uninstall"| PresetCmd["dist/commands/preset-command.mjs\nPreset management commands"]
|
|
28
|
+
Entry -->|"check / status / init\ngovernance / lesson-promote\n..."| Core["dist/lib/harness-core.mjs\n(called directly)"]
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Four command modules each own one domain; other commands call `harness-core.mjs` directly.
|
|
@@ -89,7 +89,7 @@ foundation that lets the whole system derive state from Markdown files.
|
|
|
89
89
|
|
|
90
90
|
### ② Task scanning layer
|
|
91
91
|
|
|
92
|
-
Responsible for reading all files under `
|
|
92
|
+
Responsible for reading all files under `coding-agent-harness/planning/tasks/` and parsing them into
|
|
93
93
|
structured data:
|
|
94
94
|
|
|
95
95
|
```mermaid
|
|
@@ -204,7 +204,7 @@ Every task state change triggers `syncTaskGovernance()`, which atomically update
|
|
|
204
204
|
sequenceDiagram
|
|
205
205
|
participant CLI as harness CLI
|
|
206
206
|
participant Lock as .harness/locks/governance-sync.lock
|
|
207
|
-
participant Ledger as
|
|
207
|
+
participant Ledger as coding-agent-harness/governance/generated/Harness-Ledger.md
|
|
208
208
|
participant Git
|
|
209
209
|
|
|
210
210
|
CLI->>Lock: fs.openSync(lockPath, "wx")\n(exclusive write, throws EEXIST if exists)
|
|
@@ -223,7 +223,7 @@ filesystem operation. If the file already exists, `openSync` throws `EEXIST` and
|
|
|
223
223
|
| Operation | How triggered | Write target | Frequency |
|
|
224
224
|
| --- | --- | --- | --- |
|
|
225
225
|
| `syncTaskGovernance` | Automatic (on every state change) | Corresponding row in `Harness-Ledger.md` | High frequency |
|
|
226
|
-
| `rebuildGovernanceIndexes` | Manual (`harness governance rebuild`) | `
|
|
226
|
+
| `rebuildGovernanceIndexes` | Manual (`harness governance rebuild`) | `coding-agent-harness/governance/generated/` index tables | Low frequency |
|
|
227
227
|
|
|
228
228
|
---
|
|
229
229
|
|
|
@@ -283,7 +283,7 @@ governance concern be tracked independently.
|
|
|
283
283
|
### Why Tombstone doesn't physically delete the task directory
|
|
284
284
|
|
|
285
285
|
The document library has no database-level foreign keys. Physical deletion would leave
|
|
286
|
-
orphan references (the Ledger, Closeout
|
|
286
|
+
orphan references (the Ledger, Closeout Index, and other tasks' `Supersedes` fields may
|
|
287
287
|
all point to the deleted task). Tombstone markers let the Soft-deleted / Superseded queue
|
|
288
288
|
provide read-only traceability for "why isn't this task in the active queue".
|
|
289
289
|
|
|
@@ -70,7 +70,7 @@ Each validator returns `failures` (hard failures, must fix) and `warnings` (soft
|
|
|
70
70
|
|
|
71
71
|
### ① validateCapabilities
|
|
72
72
|
|
|
73
|
-
Reads
|
|
73
|
+
Reads `coding-agent-harness/harness.yaml` and checks:
|
|
74
74
|
- Whether declared capabilities are all valid capability names (in the `allowedCapabilities` enum)
|
|
75
75
|
- Whether capability dependencies are all enabled (e.g. `subagent-worker` requires `module-parallel` first)
|
|
76
76
|
- Whether the artifact paths corresponding to capabilities exist
|
|
@@ -192,8 +192,8 @@ flowchart TD
|
|
|
192
192
|
Filter --> Sort["Sort alphabetically by id"]
|
|
193
193
|
Sort --> Gen["Generate governance surfaces"]
|
|
194
194
|
|
|
195
|
-
Gen --> TI["
|
|
196
|
-
Gen --> MI["
|
|
195
|
+
Gen --> TI["coding-agent-harness/governance/generated/task-index.md\nSummary index table for all tasks"]
|
|
196
|
+
Gen --> MI["coding-agent-harness/governance/generated/module-index.md\nModule step index table"]
|
|
197
197
|
|
|
198
198
|
TI --> Atomic["Atomic write\n(governance-sync lock + git commit)"]
|
|
199
199
|
MI --> Atomic
|
|
@@ -214,12 +214,14 @@ full scan on every state change.
|
|
|
214
214
|
|
|
215
215
|
### Why the validator has two levels: failures and warnings
|
|
216
216
|
|
|
217
|
-
Both levels existed from the start.
|
|
218
|
-
|
|
219
|
-
-
|
|
220
|
-
|
|
217
|
+
Both levels existed from the start. In v2, active target projects are expected to
|
|
218
|
+
run from `coding-agent-harness/harness.yaml`:
|
|
219
|
+
- v2 projects report failures for missing required files and can block CI
|
|
220
|
+
- legacy structures are migration input only; use `migrate-structure --plan` and
|
|
221
|
+
`migrate-structure --apply` before running normal status/check/dashboard flows
|
|
221
222
|
|
|
222
|
-
This
|
|
223
|
+
This keeps active runtime behavior single-shaped while still giving migration
|
|
224
|
+
commands enough information to produce a cutover plan.
|
|
223
225
|
Three or more levels were never considered — two levels are sufficient to distinguish
|
|
224
226
|
"must fix" from "recommended migration".
|
|
225
227
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
```mermaid
|
|
6
6
|
flowchart LR
|
|
7
|
-
A["📄 Markdown files\n(source files under
|
|
7
|
+
A["📄 Markdown files\n(source files under coding-agent-harness/)"]
|
|
8
8
|
B["⚙️ Scanner\n(parse + validate)"]
|
|
9
9
|
C["📊 Dashboard\n(HTML + JSON)"]
|
|
10
10
|
|
|
@@ -45,7 +45,7 @@ into structured objects.
|
|
|
45
45
|
flowchart TD
|
|
46
46
|
CT["collectTasks()"]
|
|
47
47
|
|
|
48
|
-
CT --> Discover["listTaskPlanPaths()\nScans two root directories:\
|
|
48
|
+
CT --> Discover["listTaskPlanPaths()\nScans two root directories:\ncoding-agent-harness/planning/tasks/\ncoding-agent-harness/planning/modules/\nFilters out template and archive directories"]
|
|
49
49
|
|
|
50
50
|
Discover --> ReadFiles["For each task directory, reads 9 files:\ntask_plan / brief / progress\nreview / visual_map\nexecution_strategy\nlesson_candidates / findings / context"]
|
|
51
51
|
|
|
@@ -155,13 +155,13 @@ Which files `collectMarkdownDocuments()` collects:
|
|
|
155
155
|
flowchart TD
|
|
156
156
|
Collect["collectMarkdownDocuments()"]
|
|
157
157
|
|
|
158
|
-
Collect --> Fixed["Fixed paths (collected when they exist)\nHarness-Ledger.md\
|
|
158
|
+
Collect --> Fixed["Fixed paths (collected when they exist)\nHarness-Ledger.md\ncoding-agent-harness/planning/modules/Module-Registry.md\ncoding-agent-harness/governance/regression/Regression-SSoT.md\ncoding-agent-harness/governance/generated/Closeout-Index.md"]
|
|
159
159
|
|
|
160
|
-
Collect --> Walkthrough["All .md files under
|
|
160
|
+
Collect --> Walkthrough["All .md files under coding-agent-harness/planning/tasks/<task>/\n(excluding _archive/ and files starting with _)"]
|
|
161
161
|
|
|
162
162
|
Collect --> TaskDocs["Under each task directory:\nbrief / task_plan / execution_strategy\nvisual_map / lesson_candidates\nprogress / review / findings\nreferences/INDEX.md / artifacts/INDEX.md"]
|
|
163
163
|
|
|
164
|
-
Collect --> ModuleDocs["Under
|
|
164
|
+
Collect --> ModuleDocs["Under coding-agent-harness/planning/modules/:\nmodule_plan.md for each module\nbrief.md for each module"]
|
|
165
165
|
|
|
166
166
|
Collect --> Lessons["All .md files under 01-GOVERNANCE/lessons/"]
|
|
167
167
|
```
|
|
@@ -115,7 +115,7 @@ Each entrypoint also declares `writes` (allowed write path globs) and `reads`
|
|
|
115
115
|
```
|
|
116
116
|
writeScopes:
|
|
117
117
|
tasks:
|
|
118
|
-
path:
|
|
118
|
+
path: coding-agent-harness/planning/tasks/**
|
|
119
119
|
access: write
|
|
120
120
|
```
|
|
121
121
|
|
|
@@ -225,8 +225,6 @@ flowchart TD
|
|
|
225
225
|
Core --> AdvReview["adversarial-review\nAdversarial review reports\n(alias: review-contract)"]
|
|
226
226
|
Core --> LongRunning["long-running-task\nLong-running task contracts"]
|
|
227
227
|
Core --> Dashboard["dashboard\nLocal HTML Dashboard"]
|
|
228
|
-
Core --> SafeAdoption["safe-adoption\nSmooth onboarding for legacy projects"]
|
|
229
|
-
|
|
230
228
|
ModParallel --> SubagentWorker["subagent-worker\nCommit-backed worker handoff protocol"]
|
|
231
229
|
```
|
|
232
230
|
|
|
@@ -240,7 +238,6 @@ flowchart TD
|
|
|
240
238
|
| `adversarial-review` | When release, architecture, security, data, or policy risks require independent review artifacts |
|
|
241
239
|
| `long-running-task` | When Agents may run across multiple loops without per-step user confirmation |
|
|
242
240
|
| `dashboard` | When local read-only state visualization is needed |
|
|
243
|
-
| `safe-adoption` | When onboarding v1.0 into an existing harness project without rewriting history |
|
|
244
241
|
|
|
245
242
|
### Level 2 — Preset resource declarations (resources)
|
|
246
243
|
|