@fitlab-ai/agent-infra 0.11.6 → 0.11.8
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/bin/internal-cli.js +8 -2
- package/dist/lib/agent-clients/adapters/codex.js +1 -1
- package/dist/lib/agent-clients/config.js +11 -3
- package/dist/lib/defaults.json +6 -3
- package/dist/lib/git/primary-worktree.js +58 -0
- package/dist/lib/internal/cli-route-inventory.js +3 -0
- package/dist/lib/internal/platform-pr-review.js +20 -3
- package/dist/lib/internal/task-operation-registry.js +3 -1
- package/dist/lib/internal/task-platform-recovery.js +56 -0
- package/dist/lib/merge.js +25 -5
- package/dist/lib/platform/completion-backfill.js +2 -1
- package/dist/lib/platform/in-label-sync.js +12 -1
- package/dist/lib/platform/issue-comments.js +58 -4
- package/dist/lib/platform/issues.js +105 -5
- package/dist/lib/platform/operation-coordinator.js +74 -0
- package/dist/lib/platform/pr-review.js +107 -1
- package/dist/lib/platform/pr-summary.js +79 -57
- package/dist/lib/platform/pull-requests.js +125 -7
- package/dist/lib/sandbox/commands/create.js +6 -3
- package/dist/lib/sandbox/commands/ls.js +4 -3
- package/dist/lib/sandbox/commands/rm.js +1 -1
- package/dist/lib/sandbox/config.js +22 -4
- package/dist/lib/sandbox/control/server.js +6 -2
- package/dist/lib/sandbox/git-metadata.js +50 -0
- package/dist/lib/sandbox/index.js +1 -1
- package/dist/lib/sandbox/mounts.js +12 -0
- package/dist/lib/sandbox/recovery.js +11 -0
- package/dist/lib/sandbox/removal.js +58 -20
- package/dist/lib/sandbox/tools.js +29 -7
- 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/activity-intent.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 +11 -5
- package/dist/lib/task/create.js +60 -79
- package/dist/lib/task/events.js +268 -195
- package/dist/lib/task/finalization-artifacts.js +4 -1
- package/dist/lib/task/finalization-handoff.js +2 -1
- package/dist/lib/task/finalization.js +157 -24
- package/dist/lib/task/invalidation-command.js +4 -2
- package/dist/lib/task/invalidation.js +38 -9
- package/dist/lib/task/lifecycle.js +38 -2
- package/dist/lib/task/local-artifact-finalization.js +17 -3
- package/dist/lib/task/platform-operation-journal.js +152 -0
- package/dist/lib/task/platform-operation-recovery.js +459 -0
- 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/lib/task/workflow-warning-intents.js +7 -1
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-clients/adapters/codex.ts +1 -1
- package/lib/agent-clients/config.ts +9 -3
- package/lib/defaults.json +6 -3
- package/lib/git/primary-worktree.ts +62 -0
- package/lib/internal/cli-route-inventory.ts +2 -0
- package/lib/internal/platform-pr-review.ts +14 -3
- package/lib/internal/task-operation-registry.ts +3 -1
- package/lib/internal/task-platform-recovery.ts +53 -0
- package/lib/merge.ts +26 -6
- package/lib/platform/completion-backfill.ts +2 -1
- package/lib/platform/in-label-sync.ts +12 -0
- package/lib/platform/issue-comments.ts +59 -3
- package/lib/platform/issues.ts +103 -5
- package/lib/platform/operation-coordinator.ts +96 -0
- package/lib/platform/pr-review.ts +113 -1
- package/lib/platform/pr-summary.ts +22 -1
- package/lib/platform/pull-requests.ts +132 -8
- package/lib/sandbox/commands/create.ts +7 -8
- package/lib/sandbox/commands/ls.ts +4 -3
- package/lib/sandbox/commands/rm.ts +1 -1
- package/lib/sandbox/config.ts +23 -5
- package/lib/sandbox/control/server.ts +5 -2
- package/lib/sandbox/git-metadata.ts +66 -0
- package/lib/sandbox/index.ts +1 -1
- package/lib/sandbox/mounts.ts +14 -0
- package/lib/sandbox/recovery.ts +13 -0
- package/lib/sandbox/removal.ts +57 -19
- package/lib/sandbox/tool-types.ts +1 -1
- package/lib/sandbox/tools.ts +36 -7
- 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/activity-intent.ts +4 -3
- 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 +12 -6
- package/lib/task/create.ts +54 -69
- package/lib/task/events.ts +248 -182
- package/lib/task/finalization-artifacts.ts +4 -1
- package/lib/task/finalization-handoff.ts +2 -1
- package/lib/task/finalization.ts +154 -21
- package/lib/task/invalidation-command.ts +4 -2
- package/lib/task/invalidation.ts +35 -10
- package/lib/task/lifecycle.ts +35 -3
- package/lib/task/local-artifact-finalization.ts +13 -3
- package/lib/task/platform-operation-journal.ts +230 -0
- package/lib/task/platform-operation-recovery.ts +435 -0
- 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/lib/task/workflow-warning-intents.ts +9 -1
- package/package.json +1 -1
- package/templates/.agents/README.en.md +19 -17
- package/templates/.agents/README.zh-CN.md +18 -16
- package/templates/.agents/rules/README.en.md +2 -1
- package/templates/.agents/rules/README.zh-CN.md +2 -1
- 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/task-management.en.md +12 -0
- package/templates/.agents/rules/task-management.zh-CN.md +12 -0
- 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 +6 -2
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/code-task/SKILL.en.md +5 -3
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +4 -4
- 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 +4 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +4 -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/plan-task/config/verify.en.json +1 -1
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +1 -1
- 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 +13 -11
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +13 -11
- package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +3 -3
- package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +3 -3
- package/templates/.agents/skills/review-pr/reference/report-template.en.md +4 -0
- package/templates/.agents/skills/review-pr/reference/report-template.zh-CN.md +4 -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/update-agent-infra/scripts/sync-templates.js +19 -6
- 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
|
@@ -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
|
|
@@ -66,24 +66,23 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
66
66
|
|
|
67
67
|
要求存在:
|
|
68
68
|
- `.agents/workspace/active/{task-id}/task.md`
|
|
69
|
-
-
|
|
69
|
+
- 可解析的任务分支与 Git 审查目标。实现产物属于可选上下文,不得作为审查资格门槛。
|
|
70
70
|
|
|
71
71
|
### 2. 解析审查上下文
|
|
72
72
|
|
|
73
|
-
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-code`。仅当结果为 `ready` 时继续。若 `selection.disposition` 为 `reuse`,复用 `selection.artifact`,不得执行 started、init 或写入新产物,并直接进入完成校验与下一步提示。其他状态从 `inputs`
|
|
73
|
+
运行 `agent-infra-internal task-artifact {task-id} inspect --family review-code`。仅当结果为 `ready` 时继续。若 `selection.disposition` 为 `reuse`,复用 `selection.artifact`,不得执行 started、init 或写入新产物,并直接进入完成校验与下一步提示。其他状态从 `inputs` 读取可用的最新 `{code-artifact}` 和 `{plan-artifact}`,从 `next.round` / `next.name` 取得 `{review-round}` / `{review-artifact}`;不得自行扫描轮次或拼装文件名。若没有 code 或 plan artifact,直接审查 Git 差异,并在报告中说明缺少的上下文。随后执行 started 事件并复核返回身份。
|
|
74
74
|
|
|
75
75
|
### 3. 阅读实现与修复上下文
|
|
76
76
|
|
|
77
|
-
读取步骤 2
|
|
77
|
+
读取步骤 2 返回的可用 code 与 plan 上下文。把实际读取的 artifact 文件名写入报告 `审查输入` 段;未提供的 artifact 说明为缺失,不要伪造。实现产物缺失时,仍以 Git 审查差异作为审查对象。
|
|
78
78
|
|
|
79
79
|
### 4. 执行审查
|
|
80
80
|
|
|
81
|
-
遵循 `.agents/workflows/feature-development.yaml
|
|
81
|
+
遵循 `.agents/workflows/feature-development.yaml`,并同时检查完整变更上下文。HD-1 已裁定受审范围内的改动必须先提交:在声明 started 前检查 post-review 路径;存在已跟踪或未跟踪改动时停止并提示先提交,不创建审查报告。报告身份必须绑定干净工作树的确切 HEAD commit:
|
|
82
82
|
- 在审查开始时解析任务绑定的 delivery remote/base,并一次性读取目标分支 SHA `M=$(git ls-remote --refs {remote} refs/heads/{baseRef})`;随后一次性记录审查提交 `R=$(git rev-parse HEAD)`,计算 `D=$(git merge-base "$R" "$M")`。报告保存 M/D/R,不能用后续实时目标值覆盖本轮历史证据
|
|
83
83
|
- 若 delivery target 无法解析或目标 commit 不可用,停止并记录 target 错误;M/D/R 必须来自同一轮事实采集,不以 PR 是否存在替代 delivery target 证据
|
|
84
|
-
- `git diff --binary "$D" -- <post-review-globs>` 覆盖 `D`
|
|
85
|
-
- `
|
|
86
|
-
- 把 `mode=worktree`、`baseline=R`、`diffBase=D` 写入临时 JSON,调用 `agent-infra-internal git-workflow snapshot --input {file}` 一次生成覆盖完整提交范围的审查差异指纹 `F` 与当前工作区审查快照树 `T`;把 M、R、D、F、T 全部写入报告
|
|
84
|
+
- `git diff --binary "$D" "$R" -- <post-review-globs>` 覆盖 `D` 到 `R` 的已提交跟踪变更;未提交或未跟踪的受审路径按 HD-1 先提交后再开始审查
|
|
85
|
+
- 把 `mode=worktree`、`baseline=R`、`diffBase=D` 写入临时 JSON,调用 `agent-infra-internal git-workflow snapshot --input {file}` 一次生成已提交范围的审查差异指纹 `F` 与快照树 `T`;把 M、R、D、F、T 全部写入报告
|
|
87
86
|
|
|
88
87
|
> 上述事实采集完成后,先读取 `.agents/rules/review-method.md`,以其作为 readiness 证据并按 Pass 2–5 完成追踪、风险镜头、反证和归类;报告必须记录全部五遍覆盖。
|
|
89
88
|
> 详细审查标准、严重程度划分和 reviewer 关注点见 `reference/review-criteria.md`。执行此步骤前先读取 `reference/review-criteria.md`。
|
|
@@ -127,7 +126,7 @@ agent-infra-internal task-artifact {task-id} init --family review-code --artifac
|
|
|
127
126
|
|
|
128
127
|
该 intent 原子最终化报告摘要并返回同一次账本快照;不得再调用 `stage-status`、手工替换占位符或扫描问题清单。失败后,模型只能在共享规则的机械安全门通过时修改同一个受控 artifact,并完整重跑相同 intent;每次失败都重新判断是否收敛。最终一次完整成功返回决定同一快照的 verdict 和计数:`stageStatus.canAdvance=true` 且结论为 Approved 时允许跨阶段推进;`stageStatus.canAdvance=false` 时仍须执行 `agent-infra-internal task-event {task-id} review-code.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {review-artifact} --verdict {approved|changes-requested|rejected} --blockers {unresolved-blockers} --major {unresolved-major} --minor {unresolved-minor} --manual-validation {n} {execution-flag}`,使用 `changes-requested` 并路由到同阶段修订/复审(报告明确拒绝时使用 `rejected`)。失败、模型停止、无进展或紧急熔断时,不发布完成事件或跨阶段命令,但必须按 `reference/output-templates.md` 的 `repair-stop` 场景展示已有 summary/findings、artifact、实际修复次数、最后诊断和停止原因
|
|
129
128
|
- 仅当 `canAdvance=true`、本轮结论为 Approved 且 `T == R^{tree}` 时写入 `last_reviewed_commit: {R}`;Approved 快照包含未提交差异时清除旧值。否则保留既有值,不得推进或清空
|
|
130
|
-
- Approved
|
|
129
|
+
- Approved 出口按 `reference/output-templates.md` 选择唯一场景,并使用对应的 `agent-client next-steps` helper 生成下一步命令。
|
|
131
130
|
- 完成 `last_reviewed_commit` 处理后执行 `agent-infra-internal task-event {task-id} review-code.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {review-artifact} --verdict {approved|changes-requested|rejected} --blockers {unresolved-blockers} --major {unresolved-major} --minor {unresolved-minor} --manual-validation {n} {execution-flag}`
|
|
132
131
|
|
|
133
132
|
完成日志必须始终写入 `Manual-validation: {n}` 字段,0 也保留。
|
|
@@ -153,13 +152,13 @@ agent-infra-internal task-verify {task-id} review-code.completed --artifact {rev
|
|
|
153
152
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
154
153
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
155
154
|
|
|
156
|
-
|
|
155
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
157
156
|
|
|
158
157
|
### 8. 告知用户
|
|
159
158
|
|
|
160
159
|
> 仅在校验通过后执行本步骤。
|
|
161
160
|
|
|
162
|
-
>
|
|
161
|
+
> **重要:场景名 ≠ 字段值**。以下 A/B/C 是结果输出场景,R 只展示生命周期停止时已有的结果;它们都不是产物 `**总体结论**:` 字段的取值。产物字段只取 3 个规范值之一(`通过` / `需要修改` / `拒绝`,或 EN 对应 `Approved` / `Changes Requested` / `Rejected`)。
|
|
163
162
|
|
|
164
163
|
必须先判断结果,再只选择一个输出分支:
|
|
165
164
|
- `stageStatus.canAdvance=true` -> 通过
|
|
@@ -168,7 +167,7 @@ agent-infra-internal task-verify {task-id} review-code.completed --artifact {rev
|
|
|
168
167
|
|
|
169
168
|
manual-validation 的数量不参与分支选择,只作为人工校验计数显示。
|
|
170
169
|
|
|
171
|
-
> 完整的
|
|
170
|
+
> 完整的 A/B/C 输出模板、判断规则和禁止条款见 `reference/output-templates.md`。向用户汇报审查结论前先读取 `reference/output-templates.md`。
|
|
172
171
|
|
|
173
172
|
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令的 `{task-ref}` 渲染为当前任务短号 `NN`(取值与回退见该文件),其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式;(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
174
173
|
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Read this file before presenting the final review result to the user.
|
|
4
4
|
|
|
5
|
-
> This file describes
|
|
5
|
+
> This file describes three result scenarios (A/B/C) used in the "Inform User" step. Scenario R displays existing results when lifecycle finalization stops; it is not a verdict category. The review-code artifact's `**Overall Verdict**:` field remains one of three canonical tokens (`Approved` / `Changes Requested` / `Rejected`, or zh-CN `通过` / `需要修改` / `拒绝`).
|
|
6
6
|
|
|
7
7
|
## Choose Exactly One Output Branch
|
|
8
8
|
|
|
9
9
|
Select from `stage-status` (**manual-validation and advisory counts do not participate**):
|
|
10
10
|
1. if `stageStatus.canAdvance=true`, use Branch A
|
|
11
|
-
2. if
|
|
12
|
-
3. if
|
|
13
|
-
4. if the task requires major redesign, broad reimplementation, or a restart, use Branch D
|
|
11
|
+
2. if the verdict is changes requested and findings can be addressed locally, use Branch B regardless of blocker count
|
|
12
|
+
3. if the task requires major redesign, broad reimplementation, or a restart, use Branch C
|
|
14
13
|
|
|
15
14
|
Prohibitions:
|
|
16
15
|
- never skip the branch-selection step
|
|
17
16
|
- never mix text from different branches
|
|
18
17
|
- if `Blocker > 0`, never output an approval template
|
|
19
|
-
- never count manual-validation findings as blockers / major issues / minor issues, and never use them to trigger Branch B/C
|
|
18
|
+
- never count manual-validation findings as blockers / major issues / minor issues, and never use them to trigger Branch B/C
|
|
20
19
|
- generate `{next-step-commands}` for the selected branch through the shared helper
|
|
21
20
|
- The count line shows 5 numbers. Manual-validation (`{e}`) does not affect selection. `Human-decision` (`{h}`) counts this stage's `needs-human-decision` rows; because those rows are unresolved, `{h} > 0` means `canAdvance=false`. Expand the "Pending human-decision pre-block" from `.agents/rules/next-step-output.md` and show revision and re-review paths only.
|
|
22
21
|
|
|
@@ -40,13 +39,12 @@ If the summary cannot be parsed safely, set `{last-readable-review-result}` to "
|
|
|
40
39
|
|
|
41
40
|
### Branch A: Approved with No Findings
|
|
42
41
|
|
|
43
|
-
Do not route by review round.
|
|
42
|
+
Do not route by review round. Read `prFlow` / verified `pr_delivery_fact`; when a PR exists, call `agent-infra-internal platform-checks inspect {task-id}`. Select exactly one mutually exclusive exit:
|
|
44
43
|
|
|
45
|
-
- `
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
- PR head = `R` with `
|
|
49
|
-
- PR head = `R` with `passed|no-required` checks: Branch A4 (complete).
|
|
44
|
+
- No PR: use Branch A3 (complete) when `prFlow=disabled`; otherwise use Branch A1 (create PR).
|
|
45
|
+
- Existing PR with PR head != `R`: Branch A1 (create or update the PR).
|
|
46
|
+
- PR head = `R` with `pending|failed|cancelled` checks or temporarily unavailable platform state: Branch A2 (watch); never show completion.
|
|
47
|
+
- PR head = `R` with `passed|no-required` checks: Branch A3 (complete).
|
|
50
48
|
|
|
51
49
|
Common Branch A summary:
|
|
52
50
|
|
|
@@ -54,21 +52,9 @@ Common Branch A summary:
|
|
|
54
52
|
Task {task-id} review completed. Verdict: approved.
|
|
55
53
|
- Blockers: 0 | Major: 0 | Minor: 0 | Manual-validation: {e} | Human-decision: {h}
|
|
56
54
|
[- Review report: .agents/workspace/active/{task-id}/{review-artifact}]
|
|
57
|
-
|
|
58
|
-
[When manual-validation > 0, append this final line:]
|
|
59
|
-
Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### Branch A1: Commit or Push
|
|
63
|
-
|
|
64
|
-
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}`.
|
|
65
|
-
|
|
66
|
-
```text
|
|
67
|
-
Next step - commit or push the code:
|
|
68
|
-
{next-step-commands}
|
|
69
55
|
```
|
|
70
56
|
|
|
71
|
-
#### Branch
|
|
57
|
+
#### Branch A1: Create a Pull Request
|
|
72
58
|
|
|
73
59
|
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`.
|
|
74
60
|
|
|
@@ -77,7 +63,7 @@ Next step - create a Pull Request:
|
|
|
77
63
|
{next-step-commands}
|
|
78
64
|
```
|
|
79
65
|
|
|
80
|
-
#### Branch
|
|
66
|
+
#### Branch A2: Watch All Checks
|
|
81
67
|
|
|
82
68
|
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}`.
|
|
83
69
|
|
|
@@ -86,7 +72,7 @@ Next step - watch PR checks:
|
|
|
86
72
|
{next-step-commands}
|
|
87
73
|
```
|
|
88
74
|
|
|
89
|
-
#### Branch
|
|
75
|
+
#### Branch A3: Complete and Archive
|
|
90
76
|
|
|
91
77
|
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
92
78
|
|
|
@@ -95,52 +81,43 @@ Next step - complete and archive the task:
|
|
|
95
81
|
{next-step-commands}
|
|
96
82
|
```
|
|
97
83
|
|
|
98
|
-
### Branch B:
|
|
84
|
+
### Branch B: Local Fixes Needed
|
|
99
85
|
|
|
100
|
-
|
|
86
|
+
Use this scenario for findings that can be fixed locally, regardless of blocker count. Fill in `{blockers}`, `{major}`, and `{minor}` with the unresolved counts. When `h > 0`, show the pending human-decision block required by `.agents/rules/next-step-output.md`; after those decisions, generate the re-review command with the `review-code` helper and do not show `code-task`. When `h = 0`, generate the repair command with the `code-task` helper.
|
|
87
|
+
|
|
88
|
+
When `h = 0`, populate `{next-step-commands}` by running `agent-infra-internal agent-client next-steps --skill code-task --task-ref {task-ref}`:
|
|
101
89
|
|
|
102
90
|
```text
|
|
103
91
|
Task {task-id} review completed. Verdict: changes requested.
|
|
104
|
-
- Blockers:
|
|
92
|
+
- Blockers: {blockers} | Major: {major} | Minor: {minor} | Manual-validation: {e} | Human-decision: {h}
|
|
105
93
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
106
94
|
|
|
107
95
|
Next step - fix the findings:
|
|
108
96
|
{next-step-commands}
|
|
109
97
|
|
|
110
|
-
[When manual-validation > 0, append this final line:]
|
|
111
|
-
Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
112
98
|
```
|
|
113
99
|
|
|
114
|
-
|
|
100
|
+
When `h > 0`, run `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` to generate `{next-step-commands}` for use after resolving the human decisions; show the required decision block before the command.
|
|
115
101
|
|
|
116
|
-
|
|
102
|
+
## Manual-validation Reminder
|
|
117
103
|
|
|
118
|
-
|
|
119
|
-
Task {task-id} review completed. Verdict: changes requested.
|
|
120
|
-
- Blockers: {n} | Major: {n} | Minor: {n} | Manual-validation: {e} | Human-decision: {h}
|
|
121
|
-
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
104
|
+
For scenarios A/B/C, append this reminder after the selected scenario when `{e} > 0`. Do not use it for scenario R.
|
|
122
105
|
|
|
123
|
-
|
|
124
|
-
{next-step-commands}
|
|
125
|
-
|
|
126
|
-
[When manual-validation > 0, append this final line:]
|
|
106
|
+
```text
|
|
127
107
|
Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
128
108
|
```
|
|
129
109
|
|
|
130
|
-
### Branch
|
|
110
|
+
### Branch C: Rejected and Re-design
|
|
131
111
|
|
|
132
112
|
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill plan-task --task-ref {task-ref}`.
|
|
133
113
|
|
|
134
114
|
```text
|
|
135
115
|
Task {task-id} review completed. Verdict: rejected, re-design the technical plan.
|
|
136
|
-
- Blockers: {
|
|
116
|
+
- Blockers: {blockers} | Major: {major} | Minor: {minor} | Manual-validation: {e} | Human-decision: {h}
|
|
137
117
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
138
118
|
|
|
139
119
|
Next step - re-design the technical plan:
|
|
140
120
|
{next-step-commands}
|
|
141
121
|
|
|
142
122
|
> Note: Rejected means the implementation direction needs to be reworked end-to-end, not patched locally. Core artifact lifecycle branch #7 refuses a direct `/code-task` and requires a fresh plan first.
|
|
143
|
-
|
|
144
|
-
[When manual-validation > 0, append this final line:]
|
|
145
|
-
Reminder: manual-validation findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
146
123
|
```
|
|
@@ -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
|
|---------------------|-----------|-----------------|-------------------|----------|----------|---------|-------------------|---------|---------------|
|