@fitlab-ai/agent-infra 0.11.6 → 0.11.7
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/dist/lib/git/primary-worktree.js +58 -0
- package/dist/lib/platform/pull-requests.js +29 -3
- package/dist/lib/sandbox/control/server.js +6 -2
- package/dist/lib/server/config.js +7 -27
- package/dist/lib/server/daemon.js +4 -3
- package/dist/lib/server/process-control.js +4 -2
- package/dist/lib/server/runner.js +4 -3
- package/dist/lib/task/artifact-lifecycle.js +42 -10
- package/dist/lib/task/artifact-receipts.js +62 -22
- package/dist/lib/task/capabilities.js +22 -4
- package/dist/lib/task/completion-facts.js +56 -0
- package/dist/lib/task/create-service.js +6 -2
- package/dist/lib/task/create.js +46 -82
- package/dist/lib/task/events.js +268 -195
- package/dist/lib/task/finalization-handoff.js +2 -1
- package/dist/lib/task/invalidation-command.js +4 -2
- package/dist/lib/task/invalidation.js +38 -9
- package/dist/lib/task/local-artifact-finalization.js +17 -3
- package/dist/lib/task/qualification-audit.js +23 -105
- package/dist/lib/task/review-finalization.js +7 -0
- package/dist/lib/task/review-identity.js +69 -0
- package/dist/lib/task/sections.js +6 -5
- package/dist/lib/task/task-execution-lock.js +6 -3
- package/dist/lib/task/verification-engine.js +14 -63
- package/dist/lib/task/verification.js +35 -38
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/git/primary-worktree.ts +62 -0
- package/lib/platform/pull-requests.ts +27 -3
- package/lib/sandbox/control/server.ts +5 -2
- package/lib/server/config.ts +7 -29
- package/lib/server/daemon.ts +5 -3
- package/lib/server/process-control.ts +4 -2
- package/lib/server/runner.ts +7 -4
- package/lib/server/server.schema.json +0 -4
- package/lib/task/artifact-lifecycle.ts +35 -11
- package/lib/task/artifact-receipts.ts +55 -15
- package/lib/task/capabilities.ts +17 -3
- package/lib/task/completion-facts.ts +66 -0
- package/lib/task/create-service.ts +7 -3
- package/lib/task/create.ts +44 -71
- package/lib/task/events.ts +248 -182
- package/lib/task/finalization-handoff.ts +2 -1
- package/lib/task/invalidation-command.ts +4 -2
- package/lib/task/invalidation.ts +35 -10
- package/lib/task/local-artifact-finalization.ts +13 -3
- package/lib/task/qualification-audit.ts +21 -114
- package/lib/task/review-finalization.ts +7 -0
- package/lib/task/review-identity.ts +85 -0
- package/lib/task/sections.ts +6 -6
- package/lib/task/task-execution-lock.ts +7 -3
- package/lib/task/verification-engine.ts +13 -86
- package/lib/task/verification.ts +34 -38
- package/package.json +1 -1
- package/templates/.agents/rules/README.en.md +1 -0
- package/templates/.agents/rules/README.zh-CN.md +1 -0
- package/templates/.agents/rules/decision-qualification.en.md +4 -3
- package/templates/.agents/rules/decision-qualification.zh-CN.md +4 -3
- package/templates/.agents/rules/validation-output.en.md +19 -0
- package/templates/.agents/rules/validation-output.zh-CN.md +19 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -1
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/block-task/SKILL.en.md +2 -0
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +2 -0
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +3 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/reference/report-template.en.md +4 -8
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +4 -8
- package/templates/.agents/skills/commit/SKILL.en.md +1 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +1 -1
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +2 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +2 -0
- package/templates/.agents/skills/create-pr/SKILL.en.md +2 -0
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/create-task/SKILL.en.md +2 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +2 -0
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -0
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +2 -0
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +3 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/review-analysis/SKILL.en.md +3 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +4 -8
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +4 -8
- package/templates/.agents/skills/review-code/SKILL.en.md +13 -12
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +11 -12
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -3
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -3
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +23 -46
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +27 -48
- package/templates/.agents/skills/review-code/reference/report-template.en.md +8 -11
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +8 -11
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +2 -2
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +2 -2
- package/templates/.agents/skills/review-plan/SKILL.en.md +3 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +5 -9
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +5 -9
- package/templates/.agents/skills/review-pr/SKILL.en.md +2 -0
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +2 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +1 -1
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/run-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/watch-pr/SKILL.en.md +2 -0
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +1 -1
- package/templates/.agents/templates/task.en.md +2 -2
- package/templates/.agents/templates/task.zh-CN.md +2 -2
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
在向用户汇报最终审查结论之前先读取本文件。
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> 本文件描述的是「向用户汇报结论」的 3 个结果场景(A/B/C)。场景 R 只用于生命周期未完成时展示已有结果,不属于审查结论分类。产物的 `**总体结论**:` 字段仍只取 3 个规范值(`通过` / `需要修改` / `拒绝`,或 EN 对应 `Approved` / `Changes Requested` / `Rejected`)。
|
|
6
6
|
|
|
7
7
|
## 选择唯一输出场景
|
|
8
8
|
|
|
9
9
|
按 `stage-status` 结果判断(**注意:manual-validation 和 advisory 数量不参与判断**):
|
|
10
10
|
1. 如果 `stageStatus.canAdvance=true`,使用场景 A
|
|
11
|
-
2.
|
|
12
|
-
3.
|
|
13
|
-
4. 如果任务需要重大重构、大范围重写或整体重来,使用场景 D
|
|
11
|
+
2. 如果结论为需要修改且 findings 可局部修复,使用场景 B(不按 blocker 数量拆分)
|
|
12
|
+
3. 如果任务需要重大重构、大范围重写或整体重来,使用场景 C
|
|
14
13
|
|
|
15
14
|
禁止规则:
|
|
16
15
|
- 不要跳过场景判断步骤
|
|
17
16
|
- 不要混用不同场景的文案
|
|
18
17
|
- 只要 `Blocker > 0`,就绝对不能输出通过模板
|
|
19
|
-
- manual-validation 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C
|
|
18
|
+
- manual-validation 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C 的依据
|
|
20
19
|
- 所选场景必须通过统一 helper 生成 `{next-step-commands}`
|
|
21
20
|
- 计数行固定显示 5 个数字。manual-validation(`{e}`)不影响分支;`人工裁决`(`{h}`)是本阶段 `needs-human-decision` 行数,属于未闭环账本状态,因此 `{h} > 0` 时 `canAdvance=false`,必须按 `.agents/rules/next-step-output.md` 的「人工裁决待办前置块」展开详情,并只输出修订与复审路径。
|
|
22
21
|
|
|
@@ -40,13 +39,12 @@
|
|
|
40
39
|
|
|
41
40
|
### 场景 A:通过且无问题
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
通过后不得按轮次路由。读取任务的 `prFlow` / verified `pr_delivery_fact`;存在 PR 时调用 `agent-infra-internal platform-checks inspect {task-id}`。只选择以下一个互斥出口:
|
|
44
43
|
|
|
45
|
-
- `
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
- PR head = `R`,checks 为 `
|
|
49
|
-
- PR head = `R`,checks 为 `passed|no-required`:场景 A4(完成)。
|
|
44
|
+
- 无 PR:`prFlow=disabled` 用场景 A3(完成);PR flow 开启时用场景 A1(创建 PR)。
|
|
45
|
+
- 已有 PR 但 PR head != `R`:场景 A1(创建或更新 PR)。
|
|
46
|
+
- PR head = `R`,checks 为 `pending|failed|cancelled` 或平台暂不可用:场景 A2(监控),不得输出完成命令。
|
|
47
|
+
- PR head = `R`,checks 为 `passed|no-required`:场景 A3(完成)。
|
|
50
48
|
|
|
51
49
|
场景 A 的共同摘要:
|
|
52
50
|
|
|
@@ -55,20 +53,9 @@
|
|
|
55
53
|
- 阻塞项:0 | 主要问题:0 | 次要问题:0 | 人工校验点:{e} | 人工裁决:{h}
|
|
56
54
|
[- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}]
|
|
57
55
|
|
|
58
|
-
[当 manual-validation > 0 时,在最后附加一行:]
|
|
59
|
-
提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### 场景 A1:提交或推送
|
|
63
|
-
|
|
64
|
-
使用 `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
65
|
-
|
|
66
|
-
```text
|
|
67
|
-
下一步 - 提交或推送代码:
|
|
68
|
-
{next-step-commands}
|
|
69
56
|
```
|
|
70
57
|
|
|
71
|
-
#### 场景
|
|
58
|
+
#### 场景 A1:创建 Pull Request
|
|
72
59
|
|
|
73
60
|
使用 `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
74
61
|
|
|
@@ -77,7 +64,7 @@
|
|
|
77
64
|
{next-step-commands}
|
|
78
65
|
```
|
|
79
66
|
|
|
80
|
-
#### 场景
|
|
67
|
+
#### 场景 A2:监控全部 checks
|
|
81
68
|
|
|
82
69
|
使用 `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
83
70
|
|
|
@@ -86,7 +73,7 @@
|
|
|
86
73
|
{next-step-commands}
|
|
87
74
|
```
|
|
88
75
|
|
|
89
|
-
#### 场景
|
|
76
|
+
#### 场景 A3:完成并归档
|
|
90
77
|
|
|
91
78
|
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
92
79
|
|
|
@@ -95,45 +82,31 @@
|
|
|
95
82
|
{next-step-commands}
|
|
96
83
|
```
|
|
97
84
|
|
|
98
|
-
### 场景 B
|
|
85
|
+
### 场景 B:需要局部修订
|
|
99
86
|
|
|
100
|
-
|
|
87
|
+
无论 findings 中是否包含 blocker,只要可以局部修复或按需修复,都使用同一个场景。阻塞项、主要问题和次要问题分别填写实际未解决计数。若 `h > 0`,遵循 `.agents/rules/next-step-output.md` 展开裁决待办;裁决完成后用 `review-code` helper 重新检视,不输出 `code-task` 命令。若 `h = 0`,使用 `code-task` helper 修复 findings。
|
|
101
88
|
|
|
102
|
-
|
|
103
|
-
任务 {task-id} 代码审查完成。结论:需要修改。
|
|
104
|
-
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n} | 人工校验点:{e} | 人工裁决:{h}
|
|
105
|
-
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
106
|
-
|
|
107
|
-
下一步 - 修复问题:
|
|
108
|
-
{next-step-commands}
|
|
109
|
-
|
|
110
|
-
[当 manual-validation > 0 时,在最后附加一行:]
|
|
111
|
-
提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### 场景 C:需要修改
|
|
115
|
-
|
|
116
|
-
使用 `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
89
|
+
`h = 0` 时运行 `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}` 生成 `{next-step-commands}`:
|
|
117
90
|
|
|
118
91
|
```text
|
|
119
92
|
任务 {task-id} 代码审查完成。结论:需要修改。
|
|
120
|
-
- 阻塞项:{
|
|
93
|
+
- 阻塞项:{blockers} | 主要问题:{major} | 次要问题:{minor} | 人工校验点:{e} | 人工裁决:{h}
|
|
121
94
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
122
95
|
|
|
123
96
|
下一步 - 修复问题:
|
|
124
97
|
{next-step-commands}
|
|
125
98
|
|
|
126
|
-
[当 manual-validation > 0 时,在最后附加一行:]
|
|
127
|
-
提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
128
99
|
```
|
|
129
100
|
|
|
130
|
-
|
|
101
|
+
`h > 0` 时运行 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成裁决完成后的 `{next-step-commands}`;在命令前展示规则要求的人工裁决待办块。
|
|
102
|
+
|
|
103
|
+
### 场景 C:拒绝并重新设计
|
|
131
104
|
|
|
132
105
|
使用 `agent-infra-internal agent-client next-steps --skill plan-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
133
106
|
|
|
134
107
|
```text
|
|
135
108
|
任务 {task-id} 代码审查完成。结论:拒绝,需要重新设计方案。
|
|
136
|
-
- 阻塞项:{
|
|
109
|
+
- 阻塞项:{blockers} | 主要问题:{major} | 次要问题:{minor} | 人工校验点:{e} | 人工裁决:{h}
|
|
137
110
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
138
111
|
|
|
139
112
|
下一步 - 重新设计技术方案:
|
|
@@ -141,6 +114,12 @@
|
|
|
141
114
|
|
|
142
115
|
> 注意:Rejected 表示实现方向需要整体重做,不是局部修复。核心 artifact lifecycle 的分支 #7 会拒绝直接 `/code-task`,要求先重新方案设计。
|
|
143
116
|
|
|
144
|
-
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 人工校验提醒
|
|
120
|
+
|
|
121
|
+
场景 A/B/C 的输出中,如果 `{e} > 0`,在所选场景内容之后附加以下提醒;场景 R 不使用此提醒:
|
|
122
|
+
|
|
123
|
+
```text
|
|
145
124
|
提醒:manual-validation 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
146
125
|
```
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Use this template when writing `review-code.md` or `review-code-r{N}.md`.
|
|
6
6
|
|
|
7
|
-
> The `Review Input` field provides reader-facing traceability.
|
|
7
|
+
> The `Review Input` field provides reader-facing traceability and may be empty. Review identity is proven by the report's exact HEAD/diff snapshot, a valid `review-code.completed` completion fact, and an Activity Log done row referencing this report. Code and plan artifacts are optional context.
|
|
8
8
|
|
|
9
9
|
## Output Template
|
|
10
10
|
|
|
@@ -13,8 +13,9 @@ Use this template when writing `review-code.md` or `review-code-r{N}.md`.
|
|
|
13
13
|
|
|
14
14
|
- **Review Round**: Round {review-round}
|
|
15
15
|
- **Artifact File**: `{review-artifact}`
|
|
16
|
-
- **Review Input
|
|
17
|
-
- `{code-artifact}` (the highest-round implementation artifact actually
|
|
16
|
+
- **Review Input** (example: `code.md`):
|
|
17
|
+
- `{code-artifact}` (the highest-round implementation artifact actually read; record “missing” when absent and still review the Git diff)
|
|
18
|
+
- `{plan-artifact}` (the plan actually read; record “missing” when absent)
|
|
18
19
|
|
|
19
20
|
## Review Summary
|
|
20
21
|
|
|
@@ -32,7 +33,7 @@ Use this template when writing `review-code.md` or `review-code-r{N}.md`.
|
|
|
32
33
|
|
|
33
34
|
## Qualification Audit Review
|
|
34
35
|
|
|
35
|
-
>
|
|
36
|
+
> Include this section only when this stage actually reviews candidate qualification, constraint dependencies, or human-decision eligibility. In that case, review all three decision tables and the qualification snapshot per `.agents/rules/decision-qualification.md`; otherwise omit this section entirely.
|
|
36
37
|
|
|
37
38
|
### Constraint Dependencies
|
|
38
39
|
| constraint_id | constraint_digest | role | evidence |
|
|
@@ -46,13 +47,9 @@ Use this template when writing `review-code.md` or `review-code-r{N}.md`.
|
|
|
46
47
|
| decision_id | classification | evidence |
|
|
47
48
|
| --- | --- | --- |
|
|
48
49
|
|
|
49
|
-
###
|
|
50
|
-
|
|
|
51
|
-
| --- | --- |
|
|
52
|
-
|
|
53
|
-
### Dependency Snapshot
|
|
54
|
-
| task_input_digest | non_constraint_input_digest | upstream_artifact_digest |
|
|
55
|
-
| --- | --- | --- |
|
|
50
|
+
### Qualification Snapshot
|
|
51
|
+
| task_input_digest | non_constraint_input_digest |
|
|
52
|
+
| --- | --- |
|
|
56
53
|
|
|
57
54
|
## Inspection Coverage
|
|
58
55
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
编写 `review-code.md` 或 `review-code-r{N}.md` 时使用本模板。
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> “审查输入”字段用于读者追溯,可为空。审查身份以报告中的确切 HEAD / diff snapshot、有效 `review-code.completed` completion fact 和指向本报告的 Activity Log done 行共同证明;code、plan artifact 仅作可选上下文。
|
|
8
8
|
|
|
9
9
|
## 输出模板
|
|
10
10
|
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
- **审查轮次**:第 {review-round} 轮
|
|
15
15
|
- **产物文件**:`{review-artifact}`
|
|
16
|
-
-
|
|
17
|
-
- `{code-artifact}
|
|
16
|
+
- **审查输入**(示例:`code.md`):
|
|
17
|
+
- `{code-artifact}`(实际读取的最高轮实现产物;无该产物时写“缺失”,但仍审查 Git 差异)
|
|
18
|
+
- `{plan-artifact}`(实际读取的方案;无该产物时写“缺失”)
|
|
18
19
|
|
|
19
20
|
## 审查摘要
|
|
20
21
|
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
|
|
33
34
|
## 资格审计复核
|
|
34
35
|
|
|
35
|
-
>
|
|
36
|
+
> 仅当本阶段实际复核了候选资格、约束依赖或人工裁决资格时填写本节,并按 `.agents/rules/decision-qualification.md` 完整复核三张决策表和资格快照;否则删除整个审计段。
|
|
36
37
|
|
|
37
38
|
### 约束依赖
|
|
38
39
|
| constraint_id | constraint_digest | role | evidence |
|
|
@@ -46,13 +47,9 @@
|
|
|
46
47
|
| decision_id | classification | evidence |
|
|
47
48
|
| --- | --- | --- |
|
|
48
49
|
|
|
49
|
-
###
|
|
50
|
-
|
|
|
51
|
-
| --- | --- |
|
|
52
|
-
|
|
53
|
-
### 依赖快照
|
|
54
|
-
| task_input_digest | non_constraint_input_digest | upstream_artifact_digest |
|
|
55
|
-
| --- | --- | --- |
|
|
50
|
+
### 资格快照
|
|
51
|
+
| task_input_digest | non_constraint_input_digest |
|
|
52
|
+
| --- | --- |
|
|
56
53
|
|
|
57
54
|
## 检视覆盖声明
|
|
58
55
|
|
|
@@ -30,13 +30,13 @@ Follow the `code-review` step in `.agents/workflows/feature-development.yaml`.
|
|
|
30
30
|
|
|
31
31
|
Read `.agents/rules/review-method.md` first and apply its five-pass protocol, risk lenses, and finding evidence contract. Finding, manual-validation, advisory, and `needs-human-decision` state semantics remain governed by `.agents/rules/review-handshake.md`. This file adds only code-stage criteria.
|
|
32
32
|
|
|
33
|
-
Also inspect `git diff`,
|
|
33
|
+
Also inspect `git diff`, available implementation and plan-review artifacts, and the `task.md` Activity Log so the report reflects the full change context. If implementation or plan artifacts are missing, record the context gap and continue reviewing the Git diff; their absence must not block review.
|
|
34
34
|
|
|
35
35
|
## Five Code-stage Passes
|
|
36
36
|
|
|
37
37
|
| pass_id | code-stage action |
|
|
38
38
|
|---------|-------------------|
|
|
39
|
-
| pass-1 | Read the complete diff,
|
|
39
|
+
| pass-1 | Read the complete diff, available implementation/plan artifacts, task source, and raw test results; record missing artifact context and continue with the Git diff |
|
|
40
40
|
| pass-2 | Map acceptance/plan → implementation → verification and record changed lines, call context, state/data flow, and uncovered areas |
|
|
41
41
|
| pass-3 | Review overall design before per-file semantics; evaluate every shared registry trigger and read each matched reference in full |
|
|
42
42
|
| pass-4 | Check guards, call constraints, test coverage, and narrower impact boundaries as counterevidence |
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
|
|
31
31
|
先读取 `.agents/rules/review-method.md`,按其五遍协议、风险镜头和 finding 证据契约执行;finding、manual-validation、advisory 与 `needs-human-decision` 的状态语义以 `.agents/rules/review-handshake.md` 为准。本文件只补充代码实现阶段的专项判断。
|
|
32
32
|
|
|
33
|
-
同时检查 `git diff
|
|
33
|
+
同时检查 `git diff`、可用的实现与方案审查产物和 `task.md` Activity Log,确保报告反映完整的变更上下文。实现或方案产物缺失时记录上下文缺口并继续审查 Git 差异,不得拒绝审查。
|
|
34
34
|
|
|
35
35
|
## 代码阶段五遍动作
|
|
36
36
|
|
|
37
37
|
| pass_id | code-stage action |
|
|
38
38
|
|---------|-------------------|
|
|
39
|
-
| pass-1 | 读取完整 diff
|
|
39
|
+
| pass-1 | 读取完整 diff、可用实现/方案产物、任务来源和测试原始结果;记录缺失的产物上下文并继续审查 Git 差异 |
|
|
40
40
|
| pass-2 | 建立验收/方案—实现—验证映射,并记录 changed lines、调用上下文、状态/数据流和未覆盖区域 |
|
|
41
41
|
| pass-3 | 先检查整体设计,再检查逐文件语义;判断共享注册表的每个触发器并完整加载命中 reference |
|
|
42
42
|
| pass-4 | 检查保护条件、调用约束、测试覆盖和更窄影响范围等反证 |
|
|
@@ -23,7 +23,7 @@ This stage consumes only the canonical path fact parsed by core from the latest
|
|
|
23
23
|
|
|
24
24
|
Before generating the review report, read `.agents/rules/evidence-reporting.md`. Normal inspection records the command, scope, structured result, actual conclusion, and uncovered parts; findings, blocking conditions, or disputes retain reproducible locations and decisive excerpts, while identity fields remain exact.
|
|
25
25
|
|
|
26
|
-
- When reviewing candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md` and check the
|
|
26
|
+
- When reviewing candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md` and check the three qualification-audit decision tables, snapshot, digests, and QCR; do not treat a process label as identity authentication
|
|
27
27
|
- This skill only reviews plan artifacts and writes a report; it does not modify product code.
|
|
28
28
|
- Before generating task or lifecycle Markdown that will be synchronized to an Issue, read `.agents/rules/sync-content-generation.md` and apply its producer-side constraints; the sync path does not parse or rewrite the body
|
|
29
29
|
- After executing this skill, you **must** immediately update task.md.
|
|
@@ -111,6 +111,8 @@ Before writing the summary, the finalization intent checks decision-detail ids;
|
|
|
111
111
|
agent-infra-internal task-verify {task-id} review-plan.completed --artifact {review-artifact} --format text
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
115
|
+
|
|
114
116
|
### 8. Tell the User
|
|
115
117
|
|
|
116
118
|
Use the conclusion branch in `reference/output-templates.md` and render the selected next-step commands through the shared helper.
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
生成审查报告时,先读取 `.agents/rules/evidence-reporting.md`。正常检视记录命令、范围、结构化结果、实际结论和未覆盖部分;finding、阻塞或争议保留可复现位置与决定性摘录,身份字段必须精确保留。
|
|
25
25
|
|
|
26
|
-
- 审查候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md
|
|
26
|
+
- 审查候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,逐项复核产物中的三张资格审计决策表、资格快照、digest 和 QCR;不得把流程标签当作身份认证
|
|
27
27
|
- 本技能只审查方案产物并写报告,不修改业务代码
|
|
28
28
|
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
29
29
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
@@ -114,6 +114,8 @@ agent-infra-internal task-artifact {task-id} init --family review-plan --artifac
|
|
|
114
114
|
agent-infra-internal task-verify {task-id} review-plan.completed --artifact {review-artifact} --format text
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;失败、阻塞和软警告保留必要诊断。
|
|
118
|
+
|
|
117
119
|
校验通过后继续告知用户;校验失败则修复报告或 task 状态后重跑。
|
|
118
120
|
|
|
119
121
|
### 8. 告知用户
|
|
@@ -26,7 +26,7 @@ Use this template when writing `review-plan.md` or `review-plan-r{N}.md`.
|
|
|
26
26
|
|
|
27
27
|
## Qualification Audit Review
|
|
28
28
|
|
|
29
|
-
>
|
|
29
|
+
> Include this section only when this stage actually reviews candidate qualification, constraint dependencies, or human-decision eligibility. In that case, review all three decision tables and the qualification snapshot per `.agents/rules/decision-qualification.md`; otherwise omit this section entirely.
|
|
30
30
|
|
|
31
31
|
### Constraint Dependencies
|
|
32
32
|
| constraint_id | constraint_digest | role | evidence |
|
|
@@ -40,13 +40,9 @@ Use this template when writing `review-plan.md` or `review-plan-r{N}.md`.
|
|
|
40
40
|
| decision_id | classification | evidence |
|
|
41
41
|
| --- | --- | --- |
|
|
42
42
|
|
|
43
|
-
###
|
|
44
|
-
|
|
|
45
|
-
| --- | --- |
|
|
46
|
-
|
|
47
|
-
### Dependency Snapshot
|
|
48
|
-
| task_input_digest | non_constraint_input_digest | upstream_artifact_digest |
|
|
49
|
-
| --- | --- | --- |
|
|
43
|
+
### Qualification Snapshot
|
|
44
|
+
| task_input_digest | non_constraint_input_digest |
|
|
45
|
+
| --- | --- |
|
|
50
46
|
|
|
51
47
|
## Inspection Coverage
|
|
52
48
|
|
|
@@ -66,7 +62,7 @@ Use this template when writing `review-plan.md` or `review-plan-r{N}.md`.
|
|
|
66
62
|
|
|
67
63
|
> Scenario A (`ordinary`): keep the table above, record `Mini-ATAM: not-applicable` with a reviewable reason, and delete the Scenario B tables.
|
|
68
64
|
>
|
|
69
|
-
> Scenario B (`architecture-significant`): keep the table above and the
|
|
65
|
+
> Scenario B (`architecture-significant`): keep the table above and the architecture assessment tables below, and delete the Scenario A guidance.
|
|
70
66
|
|
|
71
67
|
| quality_scenario_id | source_id | business_driver | quality_attribute | priority | stimulus | context | expected_response | measure | result_or_gap |
|
|
72
68
|
|---------------------|-----------|-----------------|-------------------|----------|----------|---------|-------------------|---------|---------------|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
## 资格审计复核
|
|
28
28
|
|
|
29
|
-
>
|
|
29
|
+
> 仅当本阶段实际复核了候选资格、约束依赖或人工裁决资格时填写本节,并按 `.agents/rules/decision-qualification.md` 完整复核三张决策表和资格快照;否则删除整个审计段。
|
|
30
30
|
|
|
31
31
|
### 约束依赖
|
|
32
32
|
| constraint_id | constraint_digest | role | evidence |
|
|
@@ -40,13 +40,9 @@
|
|
|
40
40
|
| decision_id | classification | evidence |
|
|
41
41
|
| --- | --- | --- |
|
|
42
42
|
|
|
43
|
-
###
|
|
44
|
-
|
|
|
45
|
-
| --- | --- |
|
|
46
|
-
|
|
47
|
-
### 依赖快照
|
|
48
|
-
| task_input_digest | non_constraint_input_digest | upstream_artifact_digest |
|
|
49
|
-
| --- | --- | --- |
|
|
43
|
+
### 资格快照
|
|
44
|
+
| task_input_digest | non_constraint_input_digest |
|
|
45
|
+
| --- | --- |
|
|
50
46
|
|
|
51
47
|
## 检视覆盖声明
|
|
52
48
|
|
|
@@ -66,7 +62,7 @@
|
|
|
66
62
|
|
|
67
63
|
> 场景 A(`ordinary`):保留上表,记录 `Mini-ATAM: not-applicable` 及可复核理由,并删除场景 B 的表格。
|
|
68
64
|
>
|
|
69
|
-
> 场景 B(`architecture-significant
|
|
65
|
+
> 场景 B(`architecture-significant`):保留上表和以下架构评估表,并删除场景 A 的说明。
|
|
70
66
|
|
|
71
67
|
| quality_scenario_id | source_id | business_driver | quality_attribute | priority | stimulus | context | expected_response | measure | result_or_gap |
|
|
72
68
|
|---------------------|-----------|-----------------|-------------------|----------|----------|---------|-------------------|---------|---------------|
|
|
@@ -166,6 +166,8 @@ agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact
|
|
|
166
166
|
agent-infra-internal task-verify {task-id} review-pr.completed --artifact {pr-review-artifact} --format text
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
170
|
+
|
|
169
171
|
- **One-shot path**:
|
|
170
172
|
|
|
171
173
|
```bash
|
|
@@ -166,6 +166,8 @@ agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact
|
|
|
166
166
|
agent-infra-internal task-verify {task-id} review-pr.completed --artifact {pr-review-artifact} --format text
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;失败、阻塞和软警告保留必要诊断。
|
|
170
|
+
|
|
169
171
|
- **一次性路径**:
|
|
170
172
|
|
|
171
173
|
```bash
|
|
@@ -47,7 +47,7 @@ Branch-only has no `{task-id}`: skip this step and record `not-applicable (branc
|
|
|
47
47
|
4. Allocate an `{evidence-file}` for each validation target and invoke every executable item separately with `agent-infra-internal task-validate {task-ref} --scope snapshot --format json --evidence-file {evidence-file} -- {command...}`. Only make a second explicit inplace invocation for that item when evidence proves it is required, using its evidence file. If no item is executable, run no fabricated command but still produce coverage-gap evidence.
|
|
48
48
|
5. Read `reference/report-template.md`, create `validation-run.md|validation-run-r{N}.md`, and record the input mode, discovered list, per-item results, CLI JSON allowlist, and sanitized summaries.
|
|
49
49
|
6. Run `agent-infra-internal task-event {task-id} validation-run.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {artifact}`. When an Issue exists, run only `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`; do not publish the validation artifact as an Issue comment.
|
|
50
|
-
7. Run `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`; fix failures and rerun it.
|
|
50
|
+
7. Run `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`; fix failures and rerun it, then present the summary per `.agents/rules/validation-output.md` with necessary diagnostics.
|
|
51
51
|
8. Report the evidence path, coverage gaps, and verification result; explicitly leave the decision to run `complete-manual-validation` to the maintainer. Read `.agents/rules/next-step-output.md` and end with `Completed at`.
|
|
52
52
|
|
|
53
53
|
## Scenario B: Branch-Only Fallback
|
|
@@ -47,7 +47,7 @@ branch-only 无 `{task-id}`,跳过本步,并在产物 `## 状态核对` 记
|
|
|
47
47
|
4. 为每个验证目标分配 `{evidence-file}`,分别调用 `agent-infra-internal task-validate {task-ref} --scope snapshot --format json --evidence-file {evidence-file} -- {command...}`;只有证据表明必须原位时才对该项进行第二次显式 inplace 调用并写入对应 evidence 文件。零项可执行时不运行伪造命令,但仍继续产出覆盖缺口证据。
|
|
48
48
|
5. 读取 `reference/report-template.md`,创建 `validation-run.md|validation-run-r{N}.md`;记录输入模式、发现清单、逐项结果、CLI JSON allowlist 与去敏摘要。
|
|
49
49
|
6. 运行 `agent-infra-internal task-event {task-id} validation-run.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {artifact}`。存在 Issue 时仅运行 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`;验证 artifact 不发布为 Issue 评论。
|
|
50
|
-
7. 运行 `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text
|
|
50
|
+
7. 运行 `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`;未通过则修复后重跑,并按 `.agents/rules/validation-output.md` 展示摘要和必要诊断。
|
|
51
51
|
8. 告知用户证据路径、覆盖缺口和验证结果;明确仍需维护者判断是否执行 `complete-manual-validation`。读取 `.agents/rules/next-step-output.md`,最后一行输出 `Completed at`。
|
|
52
52
|
|
|
53
53
|
## 场景 B:branch-only 降级
|
|
@@ -17,7 +17,7 @@ The orchestrator delegates only and never executes a stage skill itself. First r
|
|
|
17
17
|
2. Use the current host's native child spawn, wait, and result interfaces. Task-bound sandboxes execute ordinary task orchestration locally in the current worktree; Codex controller `open`, `verify`, and `close` remain restricted broker operations. Retain task binding and checks for real external process operations.
|
|
18
18
|
3. Before each loop, run `agent-infra-internal task-lifecycle {task-id} recover-started --agent {client} --auto`. The client adapter owns recovery capability and stop-evidence validation; an unsupported adapter or a run that needs no recovery returns `no-op`. Continue only after `no-op` or `applied`. Stop on every other result; a later operator invocation retries from persisted state without routing or dispatching a child.
|
|
19
19
|
4. Run `task-orchestration {task-id} begin-or-resume --client {client}` with the complete explicit policy. With no explicit policy, core reads that client's configured policy; existing runs use persisted policy. Disk state outside the complete current structure fails closed without rewriting; finish or clear active runs before upgrading. Stop on paused/completed results.
|
|
20
|
-
5. Run `route`. On `completed`, run `agent-infra-internal task-verify {task-id} run-task.completed --format text` and stop. Only a `running` result with non-null `next` supplies action, role, round, artifact, requested model, and requested effort.
|
|
20
|
+
5. Run `route`. On `completed`, run `agent-infra-internal task-verify {task-id} run-task.completed --format text`, present its summary per `.agents/rules/validation-output.md` while retaining necessary diagnostics, and stop. Only a `running` result with non-null `next` supplies action, role, round, artifact, requested model, and requested effort.
|
|
21
21
|
6. Call `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort}` with route's exact policy. The client adapter runs host preflight. Report actual task, policy, or host failures.
|
|
22
22
|
7. After prepare, run `task-orchestration <task-ref> dispatch` before spawning a fresh native child with route's model/effort. Pass the short task ref, skill, `--orchestrated`, and stage identity. The child calls `await-activation --stage ... --round ... --artifact ... --role ...` to associate its actual identity before executing. Code-task creates the local checkpoint; do not delegate a separate commit stage or push. Retain existing write locks without introducing a new lock protocol around native spawn.
|
|
23
23
|
8. Record actual start and terminal results through the current host's native lifecycle events and result interfaces. A timed-out wait does not imply success. Pause on actual identity, transport, or terminal failures. After the stage and child finish, call `advance`; repeat step 3 only while running.
|
|
@@ -17,7 +17,7 @@ description: >
|
|
|
17
17
|
2. 使用当前宿主的原生子 Agent 启动、等待与结果接口。task-bound sandbox 在当前 worktree 本地执行普通任务编排;Codex controller 的 `open`、`verify`、`close` 继续通过受限 broker 执行。保留任务绑定与真实外部进程操作检查。
|
|
18
18
|
3. 每次进入循环时先调用 `agent-infra-internal task-lifecycle {task-id} recover-started --agent {client} --auto`。客户端适配器负责恢复能力和停止证据校验;没有该能力或无需恢复时返回 `no-op`。仅在结构化结果为 `no-op` 或 `applied` 时继续,其他结果安全停止;下一次人为调用按持久化状态幂等重试,不 route、不派发 child。
|
|
19
19
|
4. 调用 `agent-infra-internal task-orchestration {task-id} begin-or-resume --client {client}` 并转发完整显式策略。完全没有显式策略时由核心读取当前 client 的 `agentClients[].orchestration`;existing run 使用持久化策略。磁盘状态不符合当前完整结构时核心失败关闭且不改写;升级前必须完成或清空 active run。仅当核心返回 `ORCHESTRATION_MODEL_POLICY_REQUIRED` 时,先用 `agent-client model-selection` 展示 complete/partial/interactive-only 来源,再一次收集完整策略;未回答则不创建 run。若为 paused/completed,按结构化结果停止。
|
|
20
|
-
5. 调用 `route` 并读取结构化结果。若返回 `completed`,立即运行 `agent-infra-internal task-verify {task-id} run-task.completed --format text`
|
|
20
|
+
5. 调用 `route` 并读取结构化结果。若返回 `completed`,立即运行 `agent-infra-internal task-verify {task-id} run-task.completed --format text` 并停止;按 `.agents/rules/validation-output.md` 展示摘要并保留必要诊断。仅当返回 `running` 且 `next` 非空时读取唯一 action、role、round、artifact、`requestedModel` 和 `requestedReasoningEffort`,不得自行推断。
|
|
21
21
|
6. 调用 `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort}`,使用 route 返回的精确策略。客户端适配器执行宿主 preflight;任务身份、策略或宿主检查失败时记录实际诊断。
|
|
22
22
|
7. prepare 成功后,在调用 fresh 原生子 Agent 前执行 `task-orchestration <task-ref> dispatch`,显式指定 route 返回的 model/effort;传递短任务引用、skill 名、`--orchestrated` 与 stage/round/artifact/role。child 调用 `await-activation --stage ... --round ... --artifact ... --role ...`,确认当前阶段与实际 child 关联后执行。代码阶段通过 code-task 创建本地 checkpoint;禁止单独委派 commit 阶段或推送。保留已有写锁,不把实际 spawn 纳入新建锁协议。
|
|
23
23
|
8. 通过当前宿主的原生生命周期事件和结果接口记录实际启动及终态。timed-out wait 不推断成功;身份、传输或异常终态失败如实暂停。阶段结果和 child 完成后调用 `advance`;只有 `running` 才重复步骤 3。
|
|
@@ -90,6 +90,8 @@ Run the verification gate:
|
|
|
90
90
|
agent-infra-internal task-verify {task-id} watch-pr.completed --format text
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
94
|
+
|
|
93
95
|
Handle the result:
|
|
94
96
|
- exit code 0 (all passed) -> continue to "Inform User"
|
|
95
97
|
- exit code 1 (verification failed) -> fix per the output and re-run the gate
|
|
@@ -95,7 +95,7 @@ agent-infra-internal task-verify {task-id} watch-pr.completed --format text
|
|
|
95
95
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
96
96
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
99
99
|
|
|
100
100
|
### 7. 告知用户
|
|
101
101
|
|
|
@@ -118,8 +118,8 @@ delivery_remote_head: # Most recent successfully delivered task branch
|
|
|
118
118
|
|
|
119
119
|
### Targets
|
|
120
120
|
|
|
121
|
-
| target_id | operation_id | target_kind | target_family | target_artifact | target_round | target_sha256 | status | reason_code | updated_at |
|
|
122
|
-
|
|
121
|
+
| target_id | operation_id | target_kind | target_family | target_artifact | target_input | target_round | target_sha256 | status | reason_code | updated_at |
|
|
122
|
+
|-----------|--------------|-------------|---------------|-----------------|--------------|--------------|---------------|--------|-------------|------------|
|
|
123
123
|
|
|
124
124
|
## Activity Log
|
|
125
125
|
|
|
@@ -118,8 +118,8 @@ delivery_remote_head: # 最近一次成功交付到 remote 的任务分
|
|
|
118
118
|
|
|
119
119
|
### Targets
|
|
120
120
|
|
|
121
|
-
| target_id | operation_id | target_kind | target_family | target_artifact | target_round | target_sha256 | status | reason_code | updated_at |
|
|
122
|
-
|
|
121
|
+
| target_id | operation_id | target_kind | target_family | target_artifact | target_input | target_round | target_sha256 | status | reason_code | updated_at |
|
|
122
|
+
|-----------|--------------|-------------|---------------|-----------------|--------------|--------------|---------------|--------|-------------|------------|
|
|
123
123
|
|
|
124
124
|
## 活动日志
|
|
125
125
|
|