coding-agent-harness 1.0.0
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 +13 -0
- package/LICENSE +21 -0
- package/README.md +141 -0
- package/SKILL.md +423 -0
- package/docs-release/README.md +30 -0
- package/docs-release/architecture/overview.md +52 -0
- package/docs-release/guides/agent-installation.md +139 -0
- package/examples/minimal-project/.harness-capabilities.json +8 -0
- package/examples/minimal-project/AGENTS.md +4 -0
- package/examples/minimal-project/CLAUDE.md +3 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/execution_strategy.md +10 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/progress.md +11 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/review.md +27 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/task_plan.md +14 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/visual_roadmap.md +11 -0
- package/examples/minimal-project/docs/Harness-Ledger.md +6 -0
- package/package.json +34 -0
- package/references/adversarial-review-standard.md +173 -0
- package/references/agents-md-pattern.md +140 -0
- package/references/cadence-ledger.md +55 -0
- package/references/ci-cd-standard.md +90 -0
- package/references/delivery-operating-model-standard.md +145 -0
- package/references/docs-directory-standard.md +125 -0
- package/references/harness-ledger.md +148 -0
- package/references/lessons-governance.md +157 -0
- package/references/long-running-task-standard.md +209 -0
- package/references/module-parallel-standard.md +292 -0
- package/references/planning-loop.md +192 -0
- package/references/project-onboarding-audit.md +167 -0
- package/references/regression-system.md +89 -0
- package/references/repo-governance-standard.md +131 -0
- package/references/review-routing-standard.md +103 -0
- package/references/ssot-governance.md +111 -0
- package/references/walkthrough-closeout.md +135 -0
- package/references/worktree-parallel.md +184 -0
- package/scripts/check-harness.mjs +728 -0
- package/scripts/harness.mjs +201 -0
- package/scripts/lib/dashboard-writer.mjs +95 -0
- package/scripts/lib/harness-core.mjs +1318 -0
- package/scripts/smoke-dashboard.mjs +70 -0
- package/scripts/test-harness.mjs +482 -0
- package/templates/AGENTS.md.template +82 -0
- package/templates/CLAUDE.md.template +12 -0
- package/templates/dashboard/assets/app.css +399 -0
- package/templates/dashboard/assets/app.js +435 -0
- package/templates/dashboard/assets/i18n.js +47 -0
- package/templates/dashboard/assets/markdown-reader.js +116 -0
- package/templates/dashboard/assets/mermaid-renderer.js +59 -0
- package/templates/dashboard/index.html +18 -0
- package/templates/ledger/Harness-Ledger.md +39 -0
- package/templates/lessons/lesson-arch-process-change.md +47 -0
- package/templates/lessons/lesson-new-doc.md +50 -0
- package/templates/lessons/lesson-ref-change.md +45 -0
- package/templates/planning/execution_strategy.md +40 -0
- package/templates/planning/findings.md +24 -0
- package/templates/planning/long-running-task-contract.md +69 -0
- package/templates/planning/module_plan.md +36 -0
- package/templates/planning/module_session_prompt.md +39 -0
- package/templates/planning/optional/artifacts/INDEX.md +12 -0
- package/templates/planning/optional/references/INDEX.md +13 -0
- package/templates/planning/optional/slices/_slice-template/brief.md +27 -0
- package/templates/planning/optional/slices/_slice-template/evidence.md +9 -0
- package/templates/planning/optional/slices/_slice-template/review.md +31 -0
- package/templates/planning/progress.md +33 -0
- package/templates/planning/review.md +48 -0
- package/templates/planning/task_plan.md +86 -0
- package/templates/planning/visual_roadmap.md +28 -0
- package/templates/reference/adversarial-review-standard.md +28 -0
- package/templates/reference/ci-cd-standard.md +28 -0
- package/templates/reference/delivery-operating-model-standard.md +28 -0
- package/templates/reference/docs-library-standard.md +28 -0
- package/templates/reference/engineering-standard.md +29 -0
- package/templates/reference/execution-workflow-standard.md +29 -0
- package/templates/reference/harness-ledger-standard.md +26 -0
- package/templates/reference/long-running-task-standard.md +28 -0
- package/templates/reference/regression-ssot-governance.md +28 -0
- package/templates/reference/repo-governance-standard.md +29 -0
- package/templates/reference/review-routing-standard.md +29 -0
- package/templates/reference/testing-standard.md +28 -0
- package/templates/reference/walkthrough-standard.md +28 -0
- package/templates/reference/worktree-standard.md +28 -0
- package/templates/regression/Cadence-Ledger.md +41 -0
- package/templates/ssot/Delivery-SSoT.md +43 -0
- package/templates/ssot/Feature-SSoT.md +43 -0
- package/templates/ssot/Lessons-SSoT.md +44 -0
- package/templates/ssot/Module-Registry.md +43 -0
- package/templates/ssot/Regression-SSoT.md +51 -0
- package/templates/verifier/verifier-output.md +43 -0
- package/templates/walkthrough/Closeout-SSoT.md +43 -0
- package/templates/walkthrough/walkthrough-template.md +63 -0
- package/templates-zh-CN/AGENTS.md.template +92 -0
- package/templates-zh-CN/CLAUDE.md.template +12 -0
- package/templates-zh-CN/dashboard/assets/app.css +399 -0
- package/templates-zh-CN/dashboard/assets/app.js +435 -0
- package/templates-zh-CN/dashboard/assets/i18n.js +47 -0
- package/templates-zh-CN/dashboard/assets/markdown-reader.js +116 -0
- package/templates-zh-CN/dashboard/assets/mermaid-renderer.js +59 -0
- package/templates-zh-CN/dashboard/index.html +18 -0
- package/templates-zh-CN/ledger/Harness-Ledger.md +50 -0
- package/templates-zh-CN/lessons/lesson-arch-process-change.md +47 -0
- package/templates-zh-CN/lessons/lesson-new-doc.md +49 -0
- package/templates-zh-CN/lessons/lesson-ref-change.md +59 -0
- package/templates-zh-CN/planning/execution_strategy.md +37 -0
- package/templates-zh-CN/planning/findings.md +24 -0
- package/templates-zh-CN/planning/long-running-task-contract.md +118 -0
- package/templates-zh-CN/planning/module_plan.md +43 -0
- package/templates-zh-CN/planning/module_session_prompt.md +70 -0
- package/templates-zh-CN/planning/optional/artifacts/INDEX.md +13 -0
- package/templates-zh-CN/planning/optional/references/INDEX.md +13 -0
- package/templates-zh-CN/planning/optional/slices/_slice-template/brief.md +35 -0
- package/templates-zh-CN/planning/optional/slices/_slice-template/evidence.md +12 -0
- package/templates-zh-CN/planning/optional/slices/_slice-template/review.md +37 -0
- package/templates-zh-CN/planning/progress.md +29 -0
- package/templates-zh-CN/planning/review.md +69 -0
- package/templates-zh-CN/planning/task_plan.md +116 -0
- package/templates-zh-CN/planning/visual_roadmap.md +24 -0
- package/templates-zh-CN/reference/adversarial-review-standard.md +89 -0
- package/templates-zh-CN/reference/ci-cd-standard.md +72 -0
- package/templates-zh-CN/reference/delivery-operating-model-standard.md +79 -0
- package/templates-zh-CN/reference/docs-library-standard.md +59 -0
- package/templates-zh-CN/reference/engineering-standard.md +80 -0
- package/templates-zh-CN/reference/execution-workflow-standard.md +81 -0
- package/templates-zh-CN/reference/harness-ledger-standard.md +91 -0
- package/templates-zh-CN/reference/long-running-task-standard.md +156 -0
- package/templates-zh-CN/reference/regression-ssot-governance.md +82 -0
- package/templates-zh-CN/reference/repo-governance-standard.md +84 -0
- package/templates-zh-CN/reference/review-routing-standard.md +82 -0
- package/templates-zh-CN/reference/testing-standard.md +72 -0
- package/templates-zh-CN/reference/walkthrough-standard.md +83 -0
- package/templates-zh-CN/reference/worktree-standard.md +116 -0
- package/templates-zh-CN/regression/Cadence-Ledger.md +48 -0
- package/templates-zh-CN/ssot/Delivery-SSoT.md +60 -0
- package/templates-zh-CN/ssot/Feature-SSoT.md +49 -0
- package/templates-zh-CN/ssot/Lessons-SSoT.md +49 -0
- package/templates-zh-CN/ssot/Module-Registry.md +48 -0
- package/templates-zh-CN/ssot/Regression-SSoT.md +51 -0
- package/templates-zh-CN/verifier/verifier-output.md +38 -0
- package/templates-zh-CN/walkthrough/Closeout-SSoT.md +42 -0
- package/templates-zh-CN/walkthrough/walkthrough-template.md +62 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Cadence Ledger
|
|
2
|
+
|
|
3
|
+
## 目的
|
|
4
|
+
|
|
5
|
+
定义"什么情况下自动触发哪些回归面"。让 agent 在 merge 或改动后自动知道该跑什么回归,不依赖人的记忆。
|
|
6
|
+
|
|
7
|
+
## Cadence Ledger 结构
|
|
8
|
+
|
|
9
|
+
Cadence Ledger 是一个独立文件,放在 `docs/05-TEST-QA/Cadence-Ledger.md`。
|
|
10
|
+
|
|
11
|
+
包含两个部分:
|
|
12
|
+
|
|
13
|
+
### 1. Trigger Rules(触发规则)
|
|
14
|
+
|
|
15
|
+
定义改动范围到回归面的映射:
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
## Trigger Rules
|
|
19
|
+
|
|
20
|
+
| 改动范围 | 触发的 Regression Gates |
|
|
21
|
+
|----------|----------------------|
|
|
22
|
+
| [范围1,如 API 路由层] | RG-001, RG-003 |
|
|
23
|
+
| [范围2,如前端组件] | RG-005 |
|
|
24
|
+
| [范围3,如数据库 schema] | RG-001, RG-002, RG-004 |
|
|
25
|
+
| [范围4,如认证/权限] | RG-006, RG-007 |
|
|
26
|
+
| 任何 merge 到主干 | Full Shared Batch |
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. Shared Regression Batch Log(共享回归批次记录)
|
|
30
|
+
|
|
31
|
+
记录每一轮 shared batch 的执行情况:
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## Shared Regression Batch Log
|
|
35
|
+
|
|
36
|
+
| Batch | Date | Scope | Trigger | Result | Notes | Next Checkpoint |
|
|
37
|
+
|-------|------|-------|---------|--------|-------|-----------------|
|
|
38
|
+
| SRB-001 | YYYY-MM-DD | Full | Initial bootstrap | 3/5 🟢 2/5 🟡 | [备注] | SRB-002 after [条件] |
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 如何建立 Cadence Ledger
|
|
42
|
+
|
|
43
|
+
1. 从 Regression SSoT 中获取所有 active gate 的 ID 和 surface
|
|
44
|
+
2. 分析项目代码结构,识别哪些代码目录/模块对应哪些 surface
|
|
45
|
+
3. 建立"改动范围 → gate"的映射关系
|
|
46
|
+
4. 定义 merge 到主干时的 full batch 规则
|
|
47
|
+
5. 跑第一轮 shared batch,记录结果
|
|
48
|
+
|
|
49
|
+
## 维护规则
|
|
50
|
+
|
|
51
|
+
- 新增 regression gate 时,必须同步更新 trigger rules
|
|
52
|
+
- 每轮 shared batch 执行后,必须记录到 batch log
|
|
53
|
+
- 定期审查 trigger rules 是否还准确(代码结构可能变化)
|
|
54
|
+
- 如果本轮任务改变了 trigger rules、gate 结构或 evidence depth,收口时在 Harness Ledger 记录 `Regression=updated`
|
|
55
|
+
- routine batch 只更新 `Last Verified` 且无 residual / evidence depth 变化时,不强制写 Harness Ledger
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# CI/CD Standard
|
|
2
|
+
|
|
3
|
+
## 核心思路
|
|
4
|
+
|
|
5
|
+
每个 project harness 必须 define a project-specific CI/CD profile. Generic CI text is not enough.
|
|
6
|
+
|
|
7
|
+
CI/CD design must connect the project's real stack to required merge evidence:
|
|
8
|
+
|
|
9
|
+
- package manager
|
|
10
|
+
- lint / typecheck / build / test commands
|
|
11
|
+
- smoke or regression commands
|
|
12
|
+
- workflow trigger
|
|
13
|
+
- required status checks
|
|
14
|
+
- residuals when a command or environment is missing
|
|
15
|
+
|
|
16
|
+
## 存放位置
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
docs/11-REFERENCE/ci-cd-standard.md
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Workflow files usually live under:
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
.github/workflows/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
For non-GitHub platforms, use the native workflow location and document it here.
|
|
29
|
+
|
|
30
|
+
## CI Profile
|
|
31
|
+
|
|
32
|
+
Required fields:
|
|
33
|
+
|
|
34
|
+
- Platform: [GitHub Actions / GitLab CI / local-only / other]
|
|
35
|
+
- Runtime: [Node / Python / Go / Rust / Java / mixed / other]
|
|
36
|
+
- Package manager: [npm / pnpm / yarn / uv / pip / cargo / go / other]
|
|
37
|
+
- Install command
|
|
38
|
+
- Lint command
|
|
39
|
+
- Typecheck command
|
|
40
|
+
- Test command
|
|
41
|
+
- Build command
|
|
42
|
+
- Smoke / regression command
|
|
43
|
+
- Cache strategy
|
|
44
|
+
- Required secrets
|
|
45
|
+
- Unsupported checks and residuals
|
|
46
|
+
|
|
47
|
+
## Workflow Requirements
|
|
48
|
+
|
|
49
|
+
At minimum, CI must define:
|
|
50
|
+
|
|
51
|
+
- `pull_request` trigger
|
|
52
|
+
- default branch push trigger, unless explicitly residualized
|
|
53
|
+
- install step
|
|
54
|
+
- at least one verification step matching the project stack
|
|
55
|
+
- artifact or log strategy for smoke / screenshots when relevant
|
|
56
|
+
|
|
57
|
+
CI must not be a generic placeholder. Commands must either exist in the project or be marked
|
|
58
|
+
`blocked-with-owner`.
|
|
59
|
+
|
|
60
|
+
## Required Checks
|
|
61
|
+
|
|
62
|
+
The required checks list must match actual job names in the workflow.
|
|
63
|
+
|
|
64
|
+
Example:
|
|
65
|
+
|
|
66
|
+
| Required check | Workflow job | Source |
|
|
67
|
+
|----------------|--------------|--------|
|
|
68
|
+
| lint | `ci / lint` | `.github/workflows/ci.yml` |
|
|
69
|
+
| build | `ci / build` | `.github/workflows/ci.yml` |
|
|
70
|
+
|
|
71
|
+
## CD / Release
|
|
72
|
+
|
|
73
|
+
If the project deploys or packages artifacts, document:
|
|
74
|
+
|
|
75
|
+
- release trigger
|
|
76
|
+
- environment
|
|
77
|
+
- approval requirement
|
|
78
|
+
- rollback path
|
|
79
|
+
- signing / notarization / credential boundary
|
|
80
|
+
|
|
81
|
+
If deployment is out of scope, write `n/a` with a reason. Do not leave deployment undecided.
|
|
82
|
+
|
|
83
|
+
## Completion Rule
|
|
84
|
+
|
|
85
|
+
CI/CD setup is complete only when one is true:
|
|
86
|
+
|
|
87
|
+
1. Workflow exists and required checks are documented.
|
|
88
|
+
2. Platform cannot support CI yet, and the blocker has owner/action/status.
|
|
89
|
+
|
|
90
|
+
Generic text without workflow or residual is incomplete.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Delivery Operating Model Standard
|
|
2
|
+
|
|
3
|
+
## 核心思路
|
|
4
|
+
|
|
5
|
+
Harness 不能默认只有“一人主控 + 多 agent worktree”一种场景。项目启动时必须先识别
|
|
6
|
+
delivery operating model:谁负责拆分工作、几个仓库/团队并行、agent 能看到哪些上下文、
|
|
7
|
+
接口合同如何冻结、冲突和 merge 顺序由谁裁决。
|
|
8
|
+
|
|
9
|
+
代码结构回答“项目是什么”,delivery operating model 回答“人和 agent 怎么交付”。
|
|
10
|
+
|
|
11
|
+
## 存放位置
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
docs/11-REFERENCE/delivery-operating-model-standard.md
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
如项目是多人或多仓交付,还应创建:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
docs/09-PLANNING/Delivery-SSoT.md
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 必填字段
|
|
24
|
+
|
|
25
|
+
### Operating Model Profile
|
|
26
|
+
|
|
27
|
+
- Model: `solo-orchestrator` / `team-feature-lead` / `split-repo-contract` / `program-multi-repo` / `waterfall-stage-gate` / `kanban-continuous`
|
|
28
|
+
- Team shape: single human, multiple humans, multiple humans with personal agents, or mixed
|
|
29
|
+
- Repo topology: single repo, monorepo, split frontend/backend repos, or program of repos
|
|
30
|
+
- Primary planning owner
|
|
31
|
+
- Merge/integration owner
|
|
32
|
+
- Release owner
|
|
33
|
+
- Agent visibility: full repo, package-scoped, API-doc-only, design-doc-only, or other
|
|
34
|
+
|
|
35
|
+
### Work Decomposition Rule
|
|
36
|
+
|
|
37
|
+
Define who breaks roadmap work into feature blocks:
|
|
38
|
+
|
|
39
|
+
| Level | Owner | Artifact | Rule |
|
|
40
|
+
|-------|-------|----------|------|
|
|
41
|
+
| Roadmap | [owner] | [SSoT / issue tracker] | [how priority is chosen] |
|
|
42
|
+
| Feature block | [owner] | `Delivery-SSoT.md` / Feature SSoT | [how blocks are bounded] |
|
|
43
|
+
| Task | [owner] | `docs/09-PLANNING/TASKS/<task>/task_plan.md` | [who can start work] |
|
|
44
|
+
| Review | [owner] | `review.md` / PR review | [required reviewers] |
|
|
45
|
+
| Integration | [owner] | PR / release branch / integration branch | [merge order] |
|
|
46
|
+
|
|
47
|
+
### Model-Specific Contracts
|
|
48
|
+
|
|
49
|
+
#### solo-orchestrator
|
|
50
|
+
|
|
51
|
+
Use when one human directs multiple agents across worktrees.
|
|
52
|
+
|
|
53
|
+
- One primary Feature SSoT is enough for linear phase work.
|
|
54
|
+
- Worktree concurrency is central.
|
|
55
|
+
- Merge order is human-decided.
|
|
56
|
+
- Cross-task conflicts are managed by task ownership and shared-file notices.
|
|
57
|
+
|
|
58
|
+
**模块并行扩展**:当项目有 2+ 个可独立演进的功能域时,启用模块并行开发(见 `references/module-parallel-standard.md`)。此时:
|
|
59
|
+
|
|
60
|
+
- Module Registry 替代 Feature SSoT 作为进度追踪的主要工具
|
|
61
|
+
- 每个模块一个长期 worktree(`codex/<module-key>`)
|
|
62
|
+
- 模块间通过 write scope 声明避免冲突
|
|
63
|
+
- 跨模块修改走独立的基础设施 task
|
|
64
|
+
- 发布 = git tag + 包含的步骤 ID 列表
|
|
65
|
+
|
|
66
|
+
#### team-feature-lead
|
|
67
|
+
|
|
68
|
+
Use when a lead decomposes sprint/week work into feature blocks and several developers each direct agents.
|
|
69
|
+
|
|
70
|
+
- `Delivery-SSoT.md` is required.
|
|
71
|
+
- Each feature block must have owner, repo/package scope, shared files, dependencies, integration order, and acceptance gates.
|
|
72
|
+
- Shared files require owner-lock or explicit sequencing.
|
|
73
|
+
- Agents must not start unassigned work just because it appears in the backlog.
|
|
74
|
+
|
|
75
|
+
#### split-repo-contract
|
|
76
|
+
|
|
77
|
+
Use when frontend/backend or app/service repos remain separate.
|
|
78
|
+
|
|
79
|
+
- Each repo may have its own harness.
|
|
80
|
+
- Cross-repo work must be driven by an interface contract, not by agents reading both repos freely.
|
|
81
|
+
- Frontend agents may only rely on API schema, mock server, OpenAPI/GraphQL contract, example payloads, and agreed error semantics unless granted backend read access.
|
|
82
|
+
- Backend agents may only rely on frontend consumption contract and product acceptance notes unless granted frontend read access.
|
|
83
|
+
- Contract changes require paired PRs or a compatibility window.
|
|
84
|
+
|
|
85
|
+
#### program-multi-repo
|
|
86
|
+
|
|
87
|
+
Use when a main project coordinates several child repos.
|
|
88
|
+
|
|
89
|
+
- Program-level Delivery SSoT is required.
|
|
90
|
+
- Each repo keeps its own repo governance, CI/CD, and Regression SSoT.
|
|
91
|
+
- Integration owner decides merge order and release train.
|
|
92
|
+
- Cross-repo residuals must be represented in the program SSoT and child repo Harness Ledgers.
|
|
93
|
+
|
|
94
|
+
#### waterfall-stage-gate
|
|
95
|
+
|
|
96
|
+
Use when work passes through formal stages: requirements, design, implementation, verification, release.
|
|
97
|
+
|
|
98
|
+
- Stage entry/exit criteria must be explicit.
|
|
99
|
+
- Agents cannot skip design/review gates just because code is ready.
|
|
100
|
+
- Walkthrough and Closeout SSoT map to stage closeout, not only feature closeout.
|
|
101
|
+
|
|
102
|
+
#### kanban-continuous
|
|
103
|
+
|
|
104
|
+
Use when work flows continuously without sprint batches.
|
|
105
|
+
|
|
106
|
+
- WIP limits replace sprint allocation.
|
|
107
|
+
- Delivery SSoT can be lightweight but must record active owners, blocked items, and integration order.
|
|
108
|
+
- Closeout rules are identical: review, evidence, walkthrough/skip reason, Harness Ledger.
|
|
109
|
+
|
|
110
|
+
## Delivery SSoT Minimum Columns
|
|
111
|
+
|
|
112
|
+
| Block ID | Feature / Work Block | Owner | Agent Scope | Repo(s) | Dependencies | Shared Files / Contracts | Integration Order | Acceptance Gates | Status |
|
|
113
|
+
|----------|----------------------|-------|-------------|---------|--------------|--------------------------|-------------------|------------------|--------|
|
|
114
|
+
|
|
115
|
+
Status must use:
|
|
116
|
+
|
|
117
|
+
- `planned`
|
|
118
|
+
- `assigned`
|
|
119
|
+
- `in-progress`
|
|
120
|
+
- `blocked`
|
|
121
|
+
- `ready-for-integration`
|
|
122
|
+
- `integrated`
|
|
123
|
+
- `closed`
|
|
124
|
+
|
|
125
|
+
## Cross-Repo Interface Contract
|
|
126
|
+
|
|
127
|
+
For split frontend/backend work, every contract-bearing feature must define:
|
|
128
|
+
|
|
129
|
+
- API/schema source of truth
|
|
130
|
+
- request/response examples
|
|
131
|
+
- error semantics
|
|
132
|
+
- compatibility rule
|
|
133
|
+
- mock/stub strategy
|
|
134
|
+
- owner for breaking changes
|
|
135
|
+
- verification command on each side
|
|
136
|
+
|
|
137
|
+
## Completion Rule
|
|
138
|
+
|
|
139
|
+
Bootstrap is incomplete unless the project has:
|
|
140
|
+
|
|
141
|
+
1. A selected delivery operating model.
|
|
142
|
+
2. A named planning/integration owner, even if both are the same person.
|
|
143
|
+
3. A rule for feature block assignment.
|
|
144
|
+
4. A rule for cross-repo or shared-file conflict handling.
|
|
145
|
+
5. A Delivery SSoT when the selected model is team, split-repo, program, waterfall, or kanban with multiple people.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# docs/ 目录标准
|
|
2
|
+
|
|
3
|
+
## 目的
|
|
4
|
+
|
|
5
|
+
定义项目文档目录的标准结构。所有文档按职责分层,agent 按 Task-Type Reading Matrix 按需加载。
|
|
6
|
+
|
|
7
|
+
## 标准目录结构
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
docs/
|
|
11
|
+
├── Harness-Ledger.md ← 全局 harness 上下文回写总账
|
|
12
|
+
├── 00-RAW-PRDS/ ← 原始需求文档、PRD、用户故事
|
|
13
|
+
│ └── _archive/ ← 本层历史文档归档(如该层会增长)
|
|
14
|
+
├── 01-GOVERNANCE/ ← 项目治理规则、决策记录、经验沉淀
|
|
15
|
+
│ ├── Lessons-SSoT.md ← 经验沉淀建议表
|
|
16
|
+
│ ├── lessons/ ← 具体沉淀内容
|
|
17
|
+
│ └── _archive/ ← 已处理条目归档
|
|
18
|
+
├── 02-PRODUCT/ ← 产品设计、用户流程、功能规格
|
|
19
|
+
│ └── _archive/ ← 本层历史文档归档(如该层会增长)
|
|
20
|
+
├── 03-ARCHITECTURE/ ← 架构设计、技术方案、ADR
|
|
21
|
+
│ └── _archive/ ← 本层历史文档归档(如该层会增长)
|
|
22
|
+
├── 04-DEVELOPMENT/ ← 开发指南、环境配置、本地开发说明
|
|
23
|
+
│ └── _archive/ ← 本层历史文档归档(如该层会增长)
|
|
24
|
+
├── 05-TEST-QA/ ← 测试策略、Regression SSoT、Cadence Ledger
|
|
25
|
+
│ └── _archive/ ← 废弃 regression gate / 旧 evidence pack 归档
|
|
26
|
+
├── 06-INTEGRATIONS/ ← 第三方集成文档、API 对接说明
|
|
27
|
+
│ └── _archive/ ← 本层历史文档归档(如该层会增长)
|
|
28
|
+
├── 07-OPERATIONS/ ← 部署、运维、监控、告警
|
|
29
|
+
│ └── _archive/ ← 本层历史文档归档(如该层会增长)
|
|
30
|
+
├── 08-SECURITY/ ← 安全策略、权限模型、审计日志
|
|
31
|
+
│ └── _archive/ ← 本层历史文档归档(如该层会增长)
|
|
32
|
+
├── 09-PLANNING/ ← 排期、任务计划
|
|
33
|
+
│ ├── TASKS/ ← 任务目录(每个任务一个子目录)
|
|
34
|
+
│ │ └── _task-template/ ← 任务模板
|
|
35
|
+
│ ├── MODULES/ ← 模块并行开发计划(启用时)
|
|
36
|
+
│ │ └── _archive/ ← 已完成 / 暂停过久模块归档
|
|
37
|
+
│ ├── _archive/ ← 历史任务、旧 Feature SSoT 明细、过期排期归档
|
|
38
|
+
│ ├── Delivery-SSoT.md ← 多人 / 多仓 / 传统流程下的交付排期和集成顺序
|
|
39
|
+
│ └── [Feature-SSoT].md ← 实施排期表
|
|
40
|
+
├── 10-WALKTHROUGH/ ← Walkthrough 收口记录与 Closeout SSoT
|
|
41
|
+
│ └── _archive/ ← 历史 walkthrough 批量归档(迁移 / 年度收束时)
|
|
42
|
+
├── 11-REFERENCE/ ← 标准文件(agent 按需加载)
|
|
43
|
+
│ └── _archive/ ← 旧版标准归档
|
|
44
|
+
└── 99-TMP/ ← 临时文件(定期清理)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 裁剪规则
|
|
48
|
+
|
|
49
|
+
不是每个项目都需要全部目录。根据诊断结果裁剪:
|
|
50
|
+
|
|
51
|
+
| 目录 | 何时可省略 |
|
|
52
|
+
|------|-----------|
|
|
53
|
+
| 00-RAW-PRDS | 没有正式 PRD 流程的小项目 |
|
|
54
|
+
| 01-GOVERNANCE | 仅实验性 Lite 项目且明确不启用 Lessons / 归档时 |
|
|
55
|
+
| 02-PRODUCT | 纯技术项目(库、CLI 工具) |
|
|
56
|
+
| 06-INTEGRATIONS | 没有第三方集成 |
|
|
57
|
+
| 07-OPERATIONS | 没有部署需求(纯库) |
|
|
58
|
+
| 08-SECURITY | 没有安全敏感场景 |
|
|
59
|
+
| 99-TMP | 可选 |
|
|
60
|
+
|
|
61
|
+
以下目录是 harness 的核心,不可省略:
|
|
62
|
+
- 01-GOVERNANCE
|
|
63
|
+
- 03-ARCHITECTURE
|
|
64
|
+
- 05-TEST-QA
|
|
65
|
+
- 09-PLANNING(含 TASKS/)
|
|
66
|
+
- 10-WALKTHROUGH
|
|
67
|
+
- 11-REFERENCE
|
|
68
|
+
|
|
69
|
+
`docs/Harness-Ledger.md` 不是目录,但属于核心 harness 文件,不可省略。它是
|
|
70
|
+
`docs/` 根目录允许存在的全局控制文件;普通过程文件仍然不得放在根目录。
|
|
71
|
+
|
|
72
|
+
`docs/10-WALKTHROUGH/Closeout-SSoT.md` 是 closed task 的收口索引和硬门槛;
|
|
73
|
+
每个 closed Harness Ledger row 必须在这里登记 walkthrough 或受控 skip reason。
|
|
74
|
+
|
|
75
|
+
## 通用归档规则
|
|
76
|
+
|
|
77
|
+
归档是目录级基础设施,不是单张表的特例。任何会持续增长的目录都应该有同级
|
|
78
|
+
`_archive/` 目录;如果目录本身不会增长,可以暂不创建,但第一次归档前必须创建。
|
|
79
|
+
|
|
80
|
+
### 硬规则
|
|
81
|
+
|
|
82
|
+
- Active 文件只保存当前事实和最近需要操作的事实。
|
|
83
|
+
- 历史事实移入同级 `_archive/`,不要长期堆在 Active 表底部。
|
|
84
|
+
- 归档不改变原始 ID,不删除 task plan、walkthrough、SSoT 或 Ledger 的可追溯引用。
|
|
85
|
+
- 归档后 Active 文件必须留下归档索引或指针,说明历史在哪里。
|
|
86
|
+
- 归档文件必须按时间或范围命名:`<name>-archive-YYYY-QN.md`、`<name>-phase-1-11.md`、`YYYY-MM-DD-<name>.md`。
|
|
87
|
+
- 新增归档规则时,同步更新 `docs-library-standard.md` 和对应 checker。
|
|
88
|
+
|
|
89
|
+
### 推荐触发条件
|
|
90
|
+
|
|
91
|
+
| 对象 | 触发条件 | 归档位置 |
|
|
92
|
+
|------|----------|----------|
|
|
93
|
+
| Feature SSoT Active 表 | 模块并行切换、release 完成、或 completed rows 超过 20 条 | `09-PLANNING/_archive/` |
|
|
94
|
+
| Delivery SSoT | 集成 wave 结束或 completed/superseded blocks 超过 20 条 | `09-PLANNING/_archive/` |
|
|
95
|
+
| Module Registry / module_plan | 模块 completed 或 paused 超过 60 天 | `09-PLANNING/MODULES/_archive/<key>/` |
|
|
96
|
+
| Regression SSoT | gate 废弃或长期不再运行 | `05-TEST-QA/_archive/` |
|
|
97
|
+
| Lessons SSoT | merged/rejected 条目超过 20 条 | `01-GOVERNANCE/_archive/` |
|
|
98
|
+
| Harness Ledger | closed/superseded 超过 50 条 | `01-GOVERNANCE/_archive/` |
|
|
99
|
+
| Walkthrough | 年度/阶段迁移或目录过大 | `10-WALKTHROUGH/_archive/` |
|
|
100
|
+
|
|
101
|
+
## Reference 标准文件清单
|
|
102
|
+
|
|
103
|
+
`docs/11-REFERENCE/` 下的标准文件,按项目需要选择:
|
|
104
|
+
|
|
105
|
+
| 文件 | 职责 | 必需? |
|
|
106
|
+
|------|------|--------|
|
|
107
|
+
| testing-standard.md | 测试规范、框架选择、覆盖率要求 | 是 |
|
|
108
|
+
| execution-workflow-standard.md | 开发执行流程、commit 规范、PR 流程 | 是 |
|
|
109
|
+
| delivery-operating-model-standard.md | 工程组织形态、feature block 拆分、跨仓/团队协作模型 | 是 |
|
|
110
|
+
| repo-governance-standard.md | repo platform、branch protection、PR policy、required checks、worktree concurrency | 是 |
|
|
111
|
+
| ci-cd-standard.md | CI/CD profile、workflow、required checks、release/CD residual | 是 |
|
|
112
|
+
| long-running-task-standard.md | 长程任务合同、连续执行权限、review loop、停止条件 | 是 |
|
|
113
|
+
| adversarial-review-standard.md | 对抗性 review 报告、finding 分级、no-finding 结论、residual 路由 | 是 |
|
|
114
|
+
| review-routing-standard.md | reviewer / subagent / external agent / human review 触发和路由规则 | 是 |
|
|
115
|
+
| docs-library-standard.md | 文档治理规范、命名规则、归档规则 | 是 |
|
|
116
|
+
| harness-ledger-standard.md | Harness Ledger 写入规范、closeout 检查 | 是 |
|
|
117
|
+
| regression-ssot-governance.md | Regression SSoT 治理规范 | Standard+ |
|
|
118
|
+
| walkthrough-standard.md | Walkthrough 写作规范 | 是 |
|
|
119
|
+
| worktree-standard.md | Worktree 命名、分支、清理规范 | Standard+ |
|
|
120
|
+
| engineering-standard.md | 工程规范、代码风格、架构约束 | 推荐 |
|
|
121
|
+
| frontend-standard.md | 前端规范(如有前端) | 按需 |
|
|
122
|
+
| api-standard.md | API 设计规范(如有 API) | 按需 |
|
|
123
|
+
| security-standard.md | 安全规范(如有安全需求) | 按需 |
|
|
124
|
+
| deployment-standard.md | 部署规范(如有部署需求) | 按需 |
|
|
125
|
+
| debugging-playbook.md | 调试经验手册 | 推荐 |
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Harness Ledger
|
|
2
|
+
|
|
3
|
+
## 核心思路
|
|
4
|
+
|
|
5
|
+
Harness Ledger 是 `docs/` 骨架的全局更新总账。它不保存业务事实,也不替代
|
|
6
|
+
Delivery / Feature / Regression / Lessons 四张 SSoT;它只记录每个非平凡任务是否按 harness SOP
|
|
7
|
+
维护了应该维护的上下文。Closeout SSoT 则记录每个 closed 任务是否有 walkthrough 或受控 skip reason。
|
|
8
|
+
|
|
9
|
+
一句话定义:
|
|
10
|
+
|
|
11
|
+
> SSoT 保存当前事实;Harness Ledger 记录每轮任务是否维护了这些事实。
|
|
12
|
+
|
|
13
|
+
## 文件位置
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
docs/Harness-Ledger.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
放在 `docs/` 根目录,而不是 `docs/01-GOVERNANCE/`。原因是它横跨 planning、
|
|
20
|
+
regression、walkthrough、reference、lessons 等多个目录,是全局审计索引。
|
|
21
|
+
|
|
22
|
+
## 职责边界
|
|
23
|
+
|
|
24
|
+
Harness Ledger 记录:
|
|
25
|
+
|
|
26
|
+
- 本任务是否创建或更新 task plan
|
|
27
|
+
- 是否创建或更新 review report(如任务需要对抗性审查)
|
|
28
|
+
- 是否更新或验证 Repo Governance / CI-CD guardrails
|
|
29
|
+
- 是否回写 Feature SSoT
|
|
30
|
+
- 是否更新 Regression SSoT 或 Cadence Ledger
|
|
31
|
+
- 是否创建 walkthrough
|
|
32
|
+
- 是否执行 Lessons 检查,是否产生 Lessons SSoT 条目
|
|
33
|
+
- 如果产生 Lessons SSoT 条目,是否已创建 `docs/01-GOVERNANCE/lessons/` 详情文档
|
|
34
|
+
- 本轮触碰了哪些 harness 文档
|
|
35
|
+
- 是否有 residual 或 skipped-with-reason
|
|
36
|
+
|
|
37
|
+
Harness Ledger 不记录:
|
|
38
|
+
|
|
39
|
+
- 每次 `progress.md` 的过程性更新
|
|
40
|
+
- 每条测试输出
|
|
41
|
+
- 每个 git diff 细节
|
|
42
|
+
- Feature / Regression / Lessons 的业务事实本身
|
|
43
|
+
- 可以从 git history 直接恢复的逐行变更
|
|
44
|
+
|
|
45
|
+
## 触发规则
|
|
46
|
+
|
|
47
|
+
必须更新 Harness Ledger:
|
|
48
|
+
|
|
49
|
+
1. 完成一个非平凡 task / wave / feature
|
|
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
|
|
59
|
+
|
|
60
|
+
不需要更新 Harness Ledger:
|
|
61
|
+
|
|
62
|
+
1. 小 typo
|
|
63
|
+
2. 单次 `progress.md` 过程性更新
|
|
64
|
+
3. 普通测试输出粘贴
|
|
65
|
+
4. 只读分析
|
|
66
|
+
5. routine regression batch 只更新 `Last Verified` 且无 residual /
|
|
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
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
示例:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
HL-20260511-001
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
多 agent 并行时,每个 agent 只追加或更新自己负责的 row。冲突时保留双方 row,
|
|
97
|
+
不要重排全表。
|
|
98
|
+
|
|
99
|
+
## 归档规则
|
|
100
|
+
|
|
101
|
+
Active 表保留最近 50 条。更早的 `closed` 或 `superseded` 条目按季度归档:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
docs/01-GOVERNANCE/_archive/Harness-Ledger-archive-YYYY-QN.md
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
归档不改变 `HL-*` ID,也不删除 walkthrough、task plan 或四张 SSoT 中的引用。
|
|
108
|
+
|
|
109
|
+
## Closeout 顺序
|
|
110
|
+
|
|
111
|
+
每个非平凡任务收口时按以下顺序:
|
|
112
|
+
|
|
113
|
+
1. 更新 `progress.md`
|
|
114
|
+
2. 跑必要验证和 regression gate
|
|
115
|
+
3. 回写 Feature SSoT;模块并行 worker 只回写 module_plan 和 Coordinator Handoff,coordinator pass 再同步 Module Registry / Harness Ledger
|
|
116
|
+
4. 完成 `review.md` 并处理 material findings(如适用)
|
|
117
|
+
5. 回写 Repo Governance / CI-CD 状态(如适用)
|
|
118
|
+
6. 回写 Regression SSoT / Cadence Ledger(如适用)
|
|
119
|
+
7. 写 walkthrough
|
|
120
|
+
8. 更新 Closeout SSoT
|
|
121
|
+
9. 执行 Lessons 检查;如有沉淀,先写详情文档,再更新 Lessons SSoT
|
|
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>`。
|
|
129
|
+
|
|
130
|
+
## Harness Update 记录
|
|
131
|
+
|
|
132
|
+
更新已有 harness 时,Ledger row 只记录本次 delta merge:
|
|
133
|
+
|
|
134
|
+
- 读到了哪个最新版 Skill / reference / template
|
|
135
|
+
- 新增或修补了哪些 harness 骨架文件
|
|
136
|
+
- 哪些既有 SSoT / walkthrough / task history 被保留未覆盖
|
|
137
|
+
- 是否产生 residual,例如某个标准暂不适合当前项目
|
|
138
|
+
|
|
139
|
+
不要把模板全文、旧文档全文或逐行 diff 复制进 Ledger。细节由 git history 和
|
|
140
|
+
walkthrough 保存,Ledger 只回答"这次升级维护了哪些上下文入口"。
|
|
141
|
+
|
|
142
|
+
## 常见反模式
|
|
143
|
+
|
|
144
|
+
- 把 Harness Ledger 写成逐行 diff 日志
|
|
145
|
+
- 把 Feature / Regression / Lessons 的业务事实复制进 Ledger
|
|
146
|
+
- 每次测试或每次 progress 变动都追加 row
|
|
147
|
+
- 用自由文本状态导致无法快速扫描
|
|
148
|
+
- 任务完成但 Ledger 标记 `missing` 没有 residual 说明
|