@heihei0299/matt-skills 3.0.16 → 3.0.18
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.
|
@@ -6,84 +6,100 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
# TDD Implement
|
|
8
8
|
|
|
9
|
-
完成已确认的 spec/task。TDD 的红绿语义、测试质量、seam 和 mock 规则以 [tdd](.agents/skills/tdd/SKILL.md)
|
|
9
|
+
完成已确认的 spec/task。TDD 的红绿语义、测试质量、seam 和 mock 规则以 [tdd](.agents/skills/tdd/SKILL.md) 为唯一事实源;本技能负责 issue 级实现、证据记录,以及 batch 级 Review 与收尾编排。
|
|
10
|
+
|
|
11
|
+
> Ticket defines WHAT. TDD determines HOW to prove it. Repository determines HOW to implement it.
|
|
10
12
|
|
|
11
13
|
## 入口
|
|
12
14
|
|
|
13
|
-
- **单 issue
|
|
14
|
-
- **多 issue**:存在多个 `Type: task` 时,读取 [orchestration.md](references/orchestration.md)
|
|
15
|
+
- **单 issue**:使用下方同一套 issue 与 batch lifecycle,等价于 batch size = 1。
|
|
16
|
+
- **多 issue**:存在多个 `Type: task` 时,读取 [orchestration.md](references/orchestration.md) 后按依赖顺序执行。
|
|
15
17
|
- `research`、`prototype`、`grilling` 类型任务分流到对应技能。
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
正常 Red-Green / Verify 执行由当前 session 原生完成,不为每个 Behavior 或 issue 常规派发 implementer/reviewer。子代理只用于证据不足、证据冲突、复杂诊断等异常升级;常规独立 Review 只发生在 batch 末尾。
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
## Issue lifecycle:
|
|
20
22
|
|
|
21
|
-
`Red-Green → Verify →
|
|
23
|
+
`Red-Green → Verify → Record`
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
Issue 状态可使用 `ready`、`in_progress`、`verified_pending_review`、`resolved`、`blocked`、`failed`。`verified_pending_review` 不是最终完成;只有 batch Review 与 finding fix 完成后才收敛为 `resolved`。
|
|
24
26
|
|
|
25
27
|
### ① Red-Green
|
|
26
28
|
|
|
27
29
|
按 `tdd` 完成当前 issue 的所有 Acceptance Criteria。
|
|
28
30
|
|
|
29
|
-
将需要实现或修改的内容拆成可独立验证的 Behavior。一次只推进一个 Behavior:每个尚未实现的 Behavior 都必须分别完成 `tdd` 的 Red → Green cycle,完成后才能进入下一个 Behavior。
|
|
31
|
+
将需要实现或修改的内容拆成可独立验证的 Behavior。一次只推进一个 Behavior:每个尚未实现的 Behavior 都必须分别完成 `tdd` 的 Red → Green cycle,完成后才能进入下一个 Behavior。已有行为若无需修改且已由现有测试充分覆盖,不强制制造 Red。
|
|
32
|
+
|
|
33
|
+
**出口:**所有需要实现或修改的 Behavior 均完成各自的 Red → Green cycle,Acceptance Criteria 对应行为通过相关验证。
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
### ② Verify
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
读取 [verify.md](references/verify.md),执行当前 issue 所需的最终验证。Verify 只覆盖必要范围,不重复等价验证。
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
**出口:**当前 issue 所需最终验证通过,并完成要求的真实运行验证;状态进入 `verified_pending_review`。
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
- Acceptance Criteria 对应行为通过相关验证。
|
|
41
|
+
### ③ Record Evidence
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
Verify 后将每个 issue 的最小充分证据写入 git-ignored `.scratch/tdd-implement/` ledger。只记录命令/场景和结果,不保存完整测试输出;记录 ticket/repository 冲突时使用 `Ruling: <finding> — <decision and why> — <cost if wrong>`。
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
Issue: <id>
|
|
47
|
+
issue_base: <sha>
|
|
48
|
+
issue_head: <sha>
|
|
49
|
+
|
|
50
|
+
Acceptance:
|
|
51
|
+
- AC1 → PASS
|
|
52
|
+
- AC2 → PASS
|
|
53
|
+
|
|
54
|
+
TDD:
|
|
55
|
+
- behavior A → RED → GREEN
|
|
56
|
+
- behavior B → RED → GREEN
|
|
57
|
+
|
|
58
|
+
Verify:
|
|
59
|
+
- <command/scenario> → PASS
|
|
41
60
|
|
|
42
|
-
|
|
61
|
+
Rulings:
|
|
62
|
+
- none
|
|
63
|
+
```
|
|
43
64
|
|
|
44
|
-
**出口:**
|
|
65
|
+
**出口:**ledger 完整,包含 Acceptance、TDD、Verify 和 Rulings 结果;未将 `verified_pending_review` 对外宣称为最终 `resolved`。
|
|
45
66
|
|
|
46
|
-
|
|
47
|
-
- 要求的真实运行验证完成。
|
|
67
|
+
## Batch lifecycle:
|
|
48
68
|
|
|
49
|
-
|
|
69
|
+
`Batch Review → Finding Fix → Finalize → State Sync`
|
|
50
70
|
|
|
51
|
-
Verify
|
|
71
|
+
全部当前 batch 可执行 issue 都完成 Red-Green、Verify 和 Evidence Record 后,才进入 batch lifecycle。batch review 是整个 execution batch 唯一的 fresh `code-review`;issue loop 内不调用 `code-review`。
|
|
52
72
|
|
|
53
|
-
|
|
73
|
+
### Batch Review
|
|
54
74
|
|
|
55
|
-
|
|
75
|
+
读取 [review.md](references/review.md),将 batch 内全部交付代码、测试、文档和配置形成唯一的 committed Review Point,再以 `batch_base...batch_review_head` 调用一次 `code-review`。继续复用 [code-review](.agents/skills/code-review/SKILL.md) 的 Standards / Spec 双轴结构,不修改其机制。
|
|
56
76
|
|
|
57
|
-
|
|
77
|
+
### Finding Fix
|
|
58
78
|
|
|
59
|
-
- `
|
|
60
|
-
- `open_findings` 为空;
|
|
61
|
-
- `review_head` 已记录;
|
|
62
|
-
- 当前 issue 的实现范围已完整进入 Review 证据。
|
|
79
|
+
读取 [review.md](references/review.md) 的 finding-fix contract。Behavioral finding 通过真实 RED → GREEN 证据修复;non-behavioral finding 直接修复并做必要验证。全部 blocking findings 一次处理,最多一个 finding-fix commit;修复后不再次调用 `code-review`,不执行 Incremental Review。
|
|
63
80
|
|
|
64
|
-
|
|
81
|
+
### Finalize
|
|
65
82
|
|
|
66
|
-
|
|
83
|
+
读取 [finalize.md](references/finalize.md)。Finalize 只归档 Acceptance、Review、finding 和验证证据,将 `verified_pending_review → resolved`,解除已满足的 blockers,并记录最终 issue/batch head;不新增 Behavior、不修改产品实现、不偷偷补测试。
|
|
67
84
|
|
|
68
|
-
|
|
85
|
+
### State Sync
|
|
69
86
|
|
|
70
|
-
|
|
87
|
+
batch 结束时统一同步仓库内 tracker/progress/status;如确有待同步状态,最多创建 1 个 batch state-sync commit,且不混入产品实现或任何单个 issue 的提交范围。
|
|
71
88
|
|
|
72
89
|
## 运行纪律
|
|
73
90
|
|
|
74
|
-
- Red-Green 必须覆盖当前 issue 的全部待实现 Behavior
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- 当前 Step 达到出口后继续进入下一 Step;仅在需要用户决策或存在外部阻塞时暂停。
|
|
91
|
+
- Red-Green 必须覆盖当前 issue 的全部待实现 Behavior;Red-Green / Verify 不按 Behavior、阶段或验证动作拆 commit。
|
|
92
|
+
- Verify 通过后先记录 evidence;不要因单个 issue 已验证就提前 Review 或宣称 resolved。
|
|
93
|
+
- batch Review 前必须满足全部 issue Verify、ledger 完整、交付修改已提交且 working tree 没有遗漏。
|
|
94
|
+
- 整个 execution batch 的 `code-review calls = 1`、`per-issue review = 0`、`incremental review = 0`。
|
|
95
|
+
- 只有外部阻塞、需要用户决策、destructive / irreversible 操作、安全敏感行为或 ticket/plan 已无法可靠解释时才暂停。
|
|
96
|
+
- 仅在当前 Step 达到出口后继续下一 Step;发现失败时保留实际状态,不把失败静默当作完成。
|
|
81
97
|
|
|
82
98
|
## References
|
|
83
99
|
|
|
84
100
|
- TDD:[tdd](.agents/skills/tdd/SKILL.md)
|
|
85
101
|
- Verify:[verify.md](references/verify.md)
|
|
86
|
-
- Review:[review.md](references/review.md)
|
|
87
|
-
- Finalize:[finalize.md](references/finalize.md)
|
|
88
|
-
-
|
|
102
|
+
- Batch Review / Finding Fix:[review.md](references/review.md)
|
|
103
|
+
- Finalize / State Sync:[finalize.md](references/finalize.md)
|
|
104
|
+
- 唯一 Review:[code-review](.agents/skills/code-review/SKILL.md)
|
|
89
105
|
- 多 issue 编排:[orchestration.md](references/orchestration.md)
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
# Finalize
|
|
2
2
|
|
|
3
|
-
仅在
|
|
3
|
+
仅在 batch Review 完成、所有 blocking findings 已关闭且必要验证通过后执行。Finalize 只负责 batch 内 issue 的状态收敛与证据归档,不新增产品 Behavior,不修改产品实现,不偷偷补测试。
|
|
4
4
|
|
|
5
5
|
## 步骤
|
|
6
6
|
|
|
7
|
-
1. 确认 `
|
|
8
|
-
2.
|
|
9
|
-
3.
|
|
10
|
-
4.
|
|
11
|
-
5.
|
|
7
|
+
1. 确认 `batch_review_head` 已记录为本 batch 唯一一次 `code-review` 的 Review Point,且 `full_review_done = true`。
|
|
8
|
+
2. 若存在 finding-fix,确认它位于 `batch_review_head` 之后、是本轮唯一 finding-fix commit,且已完成必要验证;不得对它再次 Review。
|
|
9
|
+
3. 汇总全部 issue 的 Acceptance、TDD、Verify、Review 和 finding-fix evidence,准备 tracker/progress/status 的最终状态。
|
|
10
|
+
4. 若发现任何实现、测试、交付文档、配置或验证遗漏,立即停止 batch:保持 issue 为 `verified_pending_review` 或 `failed`,不标记 `resolved`,不解除 blockers,并报告遗漏请求决策。不得在 Finalize 中补改或自动重新进入 Red-Green、Verify 或 Review。
|
|
11
|
+
5. 仅在未发现遗漏后,将 `verified_pending_review → resolved`,解除已满足的 blockers,并设置每个完成 issue 的 `issue_head = HEAD`。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Finalize 不为单个 issue 创建 status commit;普通 Finalize 不创建 commit。Issue 的最终状态只能在 batch Review/fix 完成后统一收敛,避免 reviewer 发现 blocking bug 后出现状态反转。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## Batch State Sync
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
batch Finalize 完成后,如仓库内 tracker/progress/status 存在待同步状态,统一写入全部待同步内容,最多 1 个 batch state-sync commit。该 commit:
|
|
18
|
+
|
|
19
|
+
- 不混入产品实现、测试、交付文档或配置;
|
|
18
20
|
- 不属于任何单个 issue 的 `issue_base...issue_head` 范围;
|
|
19
|
-
- 不因 issue 数量增加而拆成多个 status commits
|
|
21
|
+
- 不因 issue 数量增加而拆成多个 status commits;
|
|
22
|
+
- 不触发新的 `code-review`。
|
|
20
23
|
|
|
21
24
|
## 出口
|
|
22
25
|
|
|
23
26
|
- Acceptance Criteria 全部通过;
|
|
24
|
-
- `
|
|
27
|
+
- batch Review 已完成,`batch_review_head` 已记录;
|
|
28
|
+
- 如有 finding-fix commit,其必要验证已通过且未执行第二次 Review;
|
|
25
29
|
- Finalize 未发现实现、测试、交付文档、配置或验证遗漏;
|
|
26
30
|
- tracker/progress/status 已同步,或已进入本批次唯一的待同步集合;
|
|
27
|
-
- `issue_head =
|
|
28
|
-
- issue 已 `resolved`,已满足的 blockers 已解除。
|
|
31
|
+
- 所有完成 issue 的 `issue_head = HEAD`;
|
|
32
|
+
- 完成 issue 已 `resolved`,已满足的 blockers 已解除。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 多 issue 编排
|
|
2
2
|
|
|
3
|
-
仅在存在多个 `Type: task` issue
|
|
3
|
+
仅在存在多个 `Type: task` issue 时生效。单 issue 也使用同一套 batch lifecycle,等价于 batch size = 1。
|
|
4
4
|
|
|
5
5
|
## 1. 构建依赖图
|
|
6
6
|
|
|
@@ -10,57 +10,73 @@
|
|
|
10
10
|
- 引用了其它 issue 时建立依赖边;
|
|
11
11
|
- 字段无法解析、依赖节点不存在或出现环时,对受影响 issue 停止调度并报告实际原因,不降级为无依赖。
|
|
12
12
|
|
|
13
|
-
使用 Kahn 算法按依赖关系分层;层间串行,每层内按 issue
|
|
13
|
+
使用 Kahn 算法按依赖关系分层;层间串行,每层内按 issue 编号串行。状态使用 `ready`、`in_progress`、`verified_pending_review`、`resolved`、`blocked`、`failed`。
|
|
14
14
|
|
|
15
|
-
## 2.
|
|
15
|
+
## 2. Issue loop
|
|
16
|
+
|
|
17
|
+
记录 batch 开始时的 `batch_base = HEAD`。每个 issue 只执行 issue-level correctness gate,不在 loop 内进行 Review:
|
|
16
18
|
|
|
17
19
|
```text
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
batch_base = HEAD
|
|
21
|
+
|
|
22
|
+
for each dependency layer:
|
|
23
|
+
for each executable issue:
|
|
20
24
|
issue_base = HEAD
|
|
21
25
|
Red-Green
|
|
22
26
|
Verify
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
Record Evidence
|
|
28
|
+
issue_head = HEAD
|
|
29
|
+
status = verified_pending_review
|
|
26
30
|
```
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
每个 issue Verify 后必须有完整 evidence ledger,才能进入 `verified_pending_review`。该状态不是最终 `resolved`,也不能提前对外宣称完成。前置 issue 未完成时,其依赖项保持 `blocked`;当前 issue 失败时保持 `failed`,依赖项不被错误放行。
|
|
33
|
+
|
|
34
|
+
下一个 issue 以当前 `issue_head` 作为新的 `issue_base`。Issue loop 不调用 `code-review`,不执行 Incremental Review,也不因 issue 数量拆分 Review Point。
|
|
35
|
+
|
|
36
|
+
## 3. Batch lifecycle
|
|
37
|
+
|
|
38
|
+
全部当前 batch 可执行 issue 完成后,确认 batch 内全部 issue 已 Verify,且 Red-Green、Evidence Record 和 evidence ledger 完整,才执行:
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
```text
|
|
41
|
+
after all executable issues:
|
|
42
|
+
Batch Review
|
|
43
|
+
Finding Fix
|
|
44
|
+
Finalize completed issues
|
|
45
|
+
Batch State Sync
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- `Batch Review` 以 `batch_base` 为 fixed point,以当前全部交付修改形成的 `batch_review_head` 为唯一 Review Point,整个 batch 只调用 1 次 `code-review`;
|
|
49
|
+
- `Finding Fix` 一次处理全部 blocking findings。Behavioral finding 必须有 RED → GREEN 证据;修复后不再 Review;
|
|
50
|
+
- `Finalize completed issues` 将 `verified_pending_review` 统一收敛为 `resolved`,记录 Acceptance、Review、finding 和 Verify 证据;
|
|
51
|
+
- `Batch State Sync` 统一同步 tracker/progress/status,最多创建 1 个不属于任何单个 issue 范围的 state-sync commit。
|
|
31
52
|
|
|
32
|
-
|
|
53
|
+
`batch_review_head` 只记录 batch 的 fresh Review Point;finding-fix 若存在位于其后,但不重新调用 `code-review`。整个 execution batch 的 `code-review calls = 1`、`per-issue review = 0`、`incremental review = 0`。
|
|
33
54
|
|
|
34
|
-
##
|
|
55
|
+
## 4. 状态与证据
|
|
35
56
|
|
|
36
|
-
|
|
57
|
+
每个完成 issue 只携带后续调度所需的最小状态:
|
|
37
58
|
|
|
38
59
|
- `Status`;
|
|
39
60
|
- `issue_base`;
|
|
40
|
-
- `review_head`;
|
|
41
61
|
- `issue_head`;
|
|
42
|
-
-
|
|
62
|
+
- Acceptance、TDD、Verify 和 Rulings evidence;
|
|
63
|
+
- batch Review、finding-fix 与最终状态;
|
|
43
64
|
- 已解除的 blockers。
|
|
44
65
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- `issue_base...review_head` 是已完成 Review 的实现范围;
|
|
48
|
-
- `issue_head = review_head`,因此 `issue_base...issue_head` 只包含当前 issue 的 Review Point commit,以及可选的唯一 finding-fix commit;
|
|
49
|
-
- `issue_head` 是下一个 issue 的 `issue_base`。
|
|
50
|
-
|
|
51
|
-
当前层所有 issue 完成后进入下一层。全部层完成后,如仓库内 tracker/progress/status 存在待同步状态,统一写入并最多创建 1 个 batch state-sync commit;该 commit 不属于任何单个 issue 的提交范围。随后确认 issue 与 progress 状态一致即可结束;不额外扩大验证范围,也不再次执行完整 Review。
|
|
66
|
+
Issue evidence 使用 `.scratch/tdd-implement/` ledger。后续 issue 不重复研究前序 issue 已确认且已记录的事实;context compact 后优先使用 ledger 与 git history。Ledger 不保存完整测试输出,只保存命令/场景及结果。
|
|
52
67
|
|
|
53
68
|
## 冲突与失败
|
|
54
69
|
|
|
55
|
-
- `Blocked by`
|
|
56
|
-
- issue 执行失败:保持未完成,按失败所在 Step 处理;其依赖项继续保持 `blocked
|
|
57
|
-
- 多个 issue 修改同一位置且无法安全串行归属:暂停相关 issue
|
|
58
|
-
-
|
|
70
|
+
- `Blocked by` 无法解析、依赖缺失或存在环:停止受影响调度并报告;
|
|
71
|
+
- issue 执行失败:保持未完成,按失败所在 Step 处理;其依赖项继续保持 `blocked`;
|
|
72
|
+
- 多个 issue 修改同一位置且无法安全串行归属:暂停相关 issue,请求用户决定;
|
|
73
|
+
- 外部权限、工具或环境阻塞:记录实际状态,不把失败静默当作完成;
|
|
74
|
+
- Batch Review 或 finding-fix 未完成、无法修复或必要验证失败:batch 不进入 Finalize。
|
|
59
75
|
|
|
60
76
|
## 出口
|
|
61
77
|
|
|
62
|
-
- 所有可执行 issue
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
78
|
+
- 所有可执行 issue 均按依赖顺序完成并有 evidence ledger;
|
|
79
|
+
- 依赖状态、Acceptance、Review、Verify 与 progress 一致;
|
|
80
|
+
- batch 只调用 1 次 `code-review`,Incremental Review 调用次数为 0;
|
|
81
|
+
- 不存在被误当作已完成的 blocked issue;
|
|
82
|
+
- 仓库内状态同步如有需要,只形成最多 1 个 batch state-sync commit。
|
|
@@ -1,98 +1,105 @@
|
|
|
1
|
-
# Review
|
|
1
|
+
# Batch Review
|
|
2
2
|
|
|
3
|
-
仅在
|
|
3
|
+
仅在 batch 内全部可执行 issue 完成 Red-Green、Verify 和 Evidence Record 后执行。本文件负责 batch 的 committed Review Point、唯一一次 `code-review` 和 finding-fix;`code-review` 的维度、reviewer 数量、提示词和输出格式仍以 [code-review](.agents/skills/code-review/SKILL.md) 为唯一事实源。
|
|
4
4
|
|
|
5
5
|
## 状态
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
batch 首次进入 Review 时初始化以下状态,且仅初始化一次:
|
|
8
8
|
|
|
9
|
-
- `
|
|
9
|
+
- `batch_base`:batch 开始时的 `HEAD`;
|
|
10
|
+
- `batch_review_head = null`;
|
|
10
11
|
- `full_review_done = false`;
|
|
11
|
-
- `open_findings = []
|
|
12
|
-
- `last_reviewed_head = null`;
|
|
13
|
-
- `review_head = null`;
|
|
14
|
-
- `incremental_review_rounds = 0`。
|
|
12
|
+
- `open_findings = []`。
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
整个 execution batch 的调用约束是:
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
```text
|
|
17
|
+
code-review calls = 1
|
|
18
|
+
per-issue review = 0
|
|
19
|
+
incremental review = 0
|
|
20
|
+
```
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
2. 若最后的文档/配置修改影响已验证证据,重新验证受影响范围;
|
|
22
|
-
3. 将当前 issue 已完成并验证的交付修改合并形成当前 issue 唯一的 Review Point commit;不得按 Behavior、阶段或验证动作拆分 commit;
|
|
23
|
-
4. 确认不存在属于当前 issue 交付内容的未提交修改。
|
|
22
|
+
## Review 前置条件
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
开始 Review 前确认:
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
- batch 内全部 issue 已完成 Red-Green 和 Verify;
|
|
27
|
+
- 每个 issue 的 evidence ledger 完整;
|
|
28
|
+
- 所有交付代码、测试、文档和配置均已完成并提交;
|
|
29
|
+
- working tree 不包含当前 batch 的交付遗漏;
|
|
30
|
+
- 当前 `HEAD` 可作为唯一 batch Review Point。
|
|
28
31
|
|
|
29
|
-
-
|
|
30
|
-
- review target:当前 `HEAD`;
|
|
31
|
-
- diff:`issue_base...HEAD`;
|
|
32
|
-
- spec source:当前 issue/spec。
|
|
32
|
+
未满足前置条件时,不调用 `code-review`,保持 issue 为 `verified_pending_review` 并报告缺口。
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
## 1. 形成 batch Review Point
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
调用 `code-review` 前,将 batch 内全部已验证交付修改合并形成唯一的 committed Review Point。不得按 issue、Behavior、阶段或验证动作拆分 Review Point;不得用未提交 working tree 代替 committed diff。
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
唯一一次 Review 的输入是:
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
- fixed point = `batch_base`;
|
|
41
|
+
- review target = `batch_review_head`;
|
|
42
|
+
- diff = `batch_base...batch_review_head`;
|
|
43
|
+
- spec sources = batch 内全部 tickets;
|
|
44
|
+
- evidence = execution ledger。
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
- 将 blocking findings 写入 `open_findings`;
|
|
44
|
-
- 设置 `last_reviewed_head = HEAD`。
|
|
45
|
-
|
|
46
|
-
工具错误、stream interruption、sub-agent failure 或其它未形成完整聚合结果的技术失败,不改变 `full_review_done`、`open_findings` 或 `last_reviewed_head`。恢复时只补足缺失的执行结果;这种技术重试不算新的逻辑完整 Review。
|
|
46
|
+
## 2. 唯一一次 code-review
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
整个 execution batch 只调用 1 次 `code-review`,且发生在全部 issue Verify 之后。调用开始前确认 `full_review_done = false`;调用一旦启动即消耗本 batch 唯一机会。
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
若调用正常形成完整聚合结果:
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
- 设置 `full_review_done = true`;
|
|
53
|
+
- 设置 `batch_review_head = HEAD`,记录本次唯一 fresh Review 的 committed Review Point;
|
|
54
|
+
- 将 blocking findings 写入 `open_findings`。
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
若该次调用因技术原因未形成完整聚合结果,停止当前 batch 并报告实际失败;不得重跑 `code-review`,不得进入 Finalize。
|
|
57
57
|
|
|
58
|
-
若 `
|
|
58
|
+
若 `open_findings` 为空,batch Review 完成,进入 Finding Fix 的空步骤,再进入 Finalize。
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
## 3. Finding Fix
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
2. 若修复产生新的 Behavior,返回 Red-Green 对该 Behavior 执行 TDD;否则直接进入受影响证据的重新验证;
|
|
64
|
-
3. 重新验证全部修复直接影响的证据;
|
|
65
|
-
4. 将本轮全部修复合并形成最多 1 个 finding-fix commit,并确认不存在属于本轮修复的未提交修改;不得按 finding 拆分 commit;
|
|
66
|
-
5. 只针对 `last_reviewed_head...HEAD` 与现有 findings 做增量 Review;增量 Review 不调用完整 `code-review`。
|
|
62
|
+
若 `open_findings` 非空,一次性处理当前全部 blocking findings,不扩大当前 batch 范围,最多一个 finding-fix commit。
|
|
67
63
|
|
|
68
|
-
|
|
64
|
+
### Behavioral finding
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
行为性 finding 必须走真实的最小 TDD 修复证据:
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
```text
|
|
69
|
+
Behavioral finding
|
|
70
|
+
↓
|
|
71
|
+
write reproducing test
|
|
72
|
+
↓
|
|
73
|
+
RED
|
|
74
|
+
↓
|
|
75
|
+
minimal fix
|
|
76
|
+
↓
|
|
77
|
+
GREEN
|
|
78
|
+
↓
|
|
79
|
+
affected verification
|
|
80
|
+
```
|
|
74
81
|
|
|
75
|
-
|
|
82
|
+
### Non-behavioral finding
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
- 不推进 `last_reviewed_head`;
|
|
79
|
-
- 停止当前 issue,不设置 `review_head`,不进入 Finalize,并报告剩余 findings 请求决策。
|
|
84
|
+
文档、naming、配置说明或其它非行为性 finding 直接修复,再执行 targeted verification,不为它制造虚假的行为测试。
|
|
80
85
|
|
|
81
|
-
|
|
86
|
+
Finding Fix 的共同约束:
|
|
82
87
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
88
|
+
- 不按 finding 拆分 commit;
|
|
89
|
+
- behavioral finding 必须有真实 RED → GREEN 证据;
|
|
90
|
+
- 所有必要验证必须通过;
|
|
91
|
+
- 修复后不得再次调用 `code-review`;
|
|
92
|
+
- 不执行 Incremental Review;
|
|
93
|
+
- 修复无法完成或验证失败时,batch 不进入 Finalize,保留未解决 findings。
|
|
87
94
|
|
|
88
|
-
|
|
95
|
+
验证通过后,将全部修复合并为最多 1 个 finding-fix commit。该 commit 位于 `batch_review_head` 之后,不属于再次 Review 的输入。
|
|
89
96
|
|
|
90
97
|
## 出口
|
|
91
98
|
|
|
92
99
|
- `full_review_done = true`;
|
|
100
|
+
- `batch_review_head` 非空,且指向唯一一次 `code-review` 的 Review Point;
|
|
93
101
|
- `open_findings` 为空;
|
|
94
|
-
-
|
|
95
|
-
- `
|
|
96
|
-
- `
|
|
97
|
-
-
|
|
98
|
-
- 不存在属于该实现范围的未提交交付修改。
|
|
102
|
+
- Incremental Review 调用次数为 0;
|
|
103
|
+
- `code-review` 调用次数为 1;
|
|
104
|
+
- 当前 `HEAD` 为 `batch_review_head`,或为其后的唯一 finding-fix commit;
|
|
105
|
+
- 不存在属于当前 batch 的未提交交付修改。
|