@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 @@ This stage consumes only the canonical path fact parsed by core from the latest
|
|
|
23
23
|
|
|
24
24
|
Before generating the implementation report, read `.agents/rules/evidence-reporting.md`. Successful tests record the command, target scope, status or structured result, actual result, and uncovered parts; failures, blocking conditions, or disputes retain a reproducible entry point, exact location, and decisive excerpt instead of complete successful stdout.
|
|
25
25
|
|
|
26
|
-
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the
|
|
26
|
+
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the three qualification-audit decision tables and snapshot in the implementation report; unknown or unconfirmed constraints must not automatically exclude a candidate
|
|
27
27
|
- Follow the lifecycle input selected by core: `analysis.md` / `analysis-r{N}.md` for the streamlined path, and `plan.md` / `plan-r{N}.md` for the standard or full path
|
|
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
|
- Read `.agents/rules/compatibility-policy.md` before implementation. Implement only the compatibility budget explicitly approved by the plan; never retain old branches, result contracts, or migration shims merely to be “safe”
|
|
@@ -118,7 +118,7 @@ When triaging a test failure or unexpected behavior, first read `.agents/rules/d
|
|
|
118
118
|
|
|
119
119
|
After tests pass, call the shared commit core with `agent-infra-internal git-workflow commit --input {checkpoint-input}`. Pass `delivery: { "mode": "local" }`, explicit paths, expected HEAD/tree, task ref, agent, and the code round. This creates only a local checkpoint and does not contact a remote. The core writes a durable intent before committing and removes it after task-writer synchronization; do not emit `code.completed` if either checkpoint or task synchronization fails.
|
|
120
120
|
|
|
121
|
-
After the checkpoint succeeds, when task.md has a `platform_issue_identity`, run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {delivery-base-ref}`. The task-bound `delivery_base_ref` is the only source for Issue `in:` evidence; record a warning and
|
|
121
|
+
After the checkpoint succeeds, when task.md has a `platform_issue_identity`, run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {delivery-base-ref}`. The task-bound `delivery_base_ref` is the only source for Issue `in:` evidence; record a warning and continue the local code stage if this sync fails. `complete-task` restores and verifies this evidence before archiving.
|
|
122
122
|
|
|
123
123
|
### 9. Write the Code Report
|
|
124
124
|
|
|
@@ -154,7 +154,7 @@ Do not rescan or manually write digest data; the completion event must include `
|
|
|
154
154
|
|
|
155
155
|
After requirement checkboxes are updated, run the initial event `agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {code-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} --files-modified {n} --tests-passed {n} {execution-flag}`; in fix mode add `--fix-for {review-artifact} --blockers {n} --major {n} --minor {n} --manual-validation {n} {execution-flag}` instead; in decision mode add `--implementation-input {input-id}` to the initial counts. The core atomically records the artifact link, stage, metadata, done log, and decision-input consumption.
|
|
156
156
|
|
|
157
|
-
If task.md has a valid `platform_issue_identity`, read `.agents/rules/issue-sync.md`, then
|
|
157
|
+
If task.md has a valid `platform_issue_identity`, read `.agents/rules/issue-sync.md`, then run these syncs. Record failures as warnings and continue the local workflow:
|
|
158
158
|
- Run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status in-progress`
|
|
159
159
|
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
160
160
|
- Run `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {code-artifact} --agent {standard-agent-token}`
|
|
@@ -165,6 +165,8 @@ If task.md has a valid `platform_issue_identity`, read `.agents/rules/issue-sync
|
|
|
165
165
|
agent-infra-internal task-verify {task-id} code.completed --artifact {code-artifact} --format text
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
169
|
+
|
|
168
170
|
### 13. Tell the User
|
|
169
171
|
|
|
170
172
|
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and render the selected next-step commands through the shared helper. Do not push, create a PR, or invoke the `commit` skill here.
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
生成实现报告时,先读取 `.agents/rules/evidence-reporting.md`。成功测试记录命令、目标范围、状态/结构化结果、实际结果和未覆盖部分;失败、阻塞或争议保留复现入口、准确位置和决定性摘录,不默认粘贴完整成功 stdout。
|
|
25
25
|
|
|
26
|
-
- 涉及候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,基于 task.md
|
|
26
|
+
- 涉及候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,基于 task.md 规范化约束/候选完成资格审计,并在实现报告记录三张资格审计决策表和资格快照;不得把来源不明或未确认约束自动升级为排除条件
|
|
27
27
|
- 严格遵循核心选择的最新生命周期输入:精简路径为 `analysis.md` / `analysis-r{N}.md`,标准或完整路径为 `plan.md` / `plan-r{N}.md`
|
|
28
28
|
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
29
29
|
- 实现前读取 `.agents/rules/compatibility-policy.md`;只实现方案明确批准的兼容预算,不以“稳妥”为由保留旧分支、旧结果契约或迁移 shim
|
|
@@ -155,7 +155,7 @@ echo "$result"
|
|
|
155
155
|
|
|
156
156
|
测试通过后,先创建报告并运行 `task-artifact {task-id} preflight --family code --artifact {code-artifact}`;preflight 失败只允许在同一受控 candidate 中修复并完整重跑,且不得产生 checkpoint、ledger、completed 或平台副作用。preflight 通过后,才通过 `agent-infra-internal git-workflow commit --input {checkpoint-input}` 调用共享 commit core,输入 `delivery: { "mode": "local" }`、明确 paths、expected HEAD/tree、task ref、agent 和 code round。该调用只创建本地 checkpoint,不访问远端;core 会在 commit 前写入 durable intent,并在 task writer 成功后清理 intent。checkpoint 失败或 task 状态未闭合时,不得发送 `code.completed`。
|
|
157
157
|
|
|
158
|
-
checkpoint 成功后,若任务存在 `platform_issue_identity`,调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {delivery-base-ref}`,由 task-bound `delivery_base_ref` 产生 Issue 的 `in:` target
|
|
158
|
+
checkpoint 成功后,若任务存在 `platform_issue_identity`,调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {delivery-base-ref}`,由 task-bound `delivery_base_ref` 产生 Issue 的 `in:` target;同步失败时记录 warning,继续完成本地代码阶段。`complete-task` 在归档前补齐并核验该证据。
|
|
159
159
|
|
|
160
160
|
排查测试失败或行为不符合预期时,先读取 `.agents/rules/debugging-guide.md`,按其四阶段流程定位根因,禁止盲目改代码重试。
|
|
161
161
|
|
|
@@ -199,7 +199,7 @@ echo "$finalizer"
|
|
|
199
199
|
- 修复模式:`agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {code-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} --fix-for {review-artifact} --blockers {n} --major {n} --minor {n} --manual-validation {n} {execution-flag}`
|
|
200
200
|
- 裁决模式:`agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {code-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} --implementation-input {input-id} --files-modified {n} --tests-passed {n} {execution-flag}`
|
|
201
201
|
|
|
202
|
-
如果 task.md 中存在有效的 `platform_issue_identity
|
|
202
|
+
如果 task.md 中存在有效的 `platform_issue_identity`,执行以下同步操作(失败按规则记录 warning,继续本地流程;边界见 `.agents/rules/issue-sync.md`):
|
|
203
203
|
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status in-progress`
|
|
204
204
|
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
205
205
|
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {code-artifact} --agent {standard-agent-token}`
|
|
@@ -217,7 +217,7 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
217
217
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
218
218
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
221
221
|
|
|
222
222
|
### 13. 告知用户
|
|
223
223
|
|
|
@@ -26,7 +26,7 @@ Use this structure when creating `code.md` or `code-r{N}.md`.
|
|
|
26
26
|
|
|
27
27
|
## Qualification Audit
|
|
28
28
|
|
|
29
|
-
>
|
|
29
|
+
> Include this section only when this stage actually evaluates candidate qualification, constraint dependencies, or human-decision eligibility. In that case, record 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 structure when creating `code.md` or `code-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
|
## Changed Files
|
|
52
48
|
|
|
@@ -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
|
|
|
@@ -92,7 +92,7 @@ date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
|
92
92
|
agent-infra-internal task-verify {task-id} commit.completed --format text
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Present the verification summary per `.agents/rules/validation-output.md`; do not claim task finalization without fresh verification output.
|
|
96
96
|
|
|
97
97
|
## 6. Render the next step
|
|
98
98
|
|
|
@@ -92,7 +92,7 @@ date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
|
92
92
|
agent-infra-internal task-verify {task-id} commit.completed --format text
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
按 `.agents/rules/validation-output.md` 展示校验摘要;没有当次校验输出,不得声明任务收尾完成。
|
|
96
96
|
|
|
97
97
|
## 6. 输出下一步
|
|
98
98
|
|
|
@@ -126,7 +126,7 @@ Handle the result:
|
|
|
126
126
|
Report:
|
|
127
127
|
- Artifact path
|
|
128
128
|
- PR summary sync result
|
|
129
|
-
-
|
|
129
|
+
- Present the completion verification summary per `.agents/rules/validation-output.md`
|
|
130
130
|
- Suggested next step: enter the final closing flow and run /complete-task --task {task-ref}
|
|
131
131
|
|
|
132
132
|
Before rendering the final output, read `.agents/rules/next-step-output.md` and append `Completed at: YYYY-MM-DD HH:mm:ss` as the absolute last line.
|
|
@@ -126,7 +126,7 @@ agent-infra-internal task-verify {task-id} manual-validation.completed --artifac
|
|
|
126
126
|
输出:
|
|
127
127
|
- 产物路径
|
|
128
128
|
- PR 摘要同步结果
|
|
129
|
-
-
|
|
129
|
+
- 按 `.agents/rules/validation-output.md` 展示当次完成校验摘要
|
|
130
130
|
- 下一步建议:进入最终收尾流程,运行 /complete-task --task {task-ref}
|
|
131
131
|
|
|
132
132
|
渲染最终输出前,先读取 `.agents/rules/next-step-output.md`,并在绝对最后一行追加 `Completed at: YYYY-MM-DD HH:mm:ss`。
|
|
@@ -164,6 +164,8 @@ After platform writes succeed and before moving the directory or releasing the s
|
|
|
164
164
|
agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
168
|
+
|
|
167
169
|
This event runs only the required-PR delivery hard preflight; host finalization still enforces identity, concurrency, and local atomicity before lifecycle. Peripheral review/manual/platform checks run through `complete-task.completed` after lifecycle and are projected as warning/pending steps. On a hard-gate non-zero exit (fail/blocked), keep the task active, record the stable code/target, and stop.
|
|
168
170
|
|
|
169
171
|
If a summary must mirror a human-decided `post-review-commit` exemption, make a best-effort sync in Step 4 with the original failure code/message, PRC id/evidence, and ruling details. A sync failure records `SUMMARY_SYNC_FAILED` and still allows lifecycle; terminal verification decides the final state.
|
|
@@ -176,6 +178,8 @@ If a summary must mirror a human-decided `post-review-commit` exemption, make a
|
|
|
176
178
|
agent-infra-internal task-finalization {task-id} complete --agent {standard-agent-token}
|
|
177
179
|
```
|
|
178
180
|
|
|
181
|
+
For an active task, finalization first recovers pending platform operations, then syncs and rereads Issue `in:` labels from `delivery_base_ref` together with requirements, Issue Type, and fields. If a required fact cannot be confirmed, the task stays active and completion is not committed.
|
|
182
|
+
|
|
179
183
|
Finalization runs allowed artifact backfill -> lifecycle -> terminal task comment -> core verification -> warning task-comment update -> summary seal in a fixed order. Every backfill that actually runs must reach a successful terminal result before lifecycle starts; an ordinary replay with a complete receipt and no recovery fact does not rerun backfill, comments, verification, or summary. A completed recovery that may write a managed comment first persists a done summary as pending, then seals it only at the end. Summary seal always reads the durable staging record retained in the task directory; the platform entry point validates marker, owner, and digest, performs any required delete/recreate, and reads back final remote order. `result=completed` means the host safely completed the task from structured results and the receipt; if peripheral warnings or pending steps remain, return `result=completed_with_warnings`, warnings, and pending steps. Use `result=failed` or `result=blocked` only for hard or receipt/capability failures, then fix the cause and retry through the same entry point; do not claim completion or hand-repair partial state. A sandbox must not run `ls completed` or a local terminal verification against its historical mount to re-decide this result.
|
|
180
184
|
|
|
181
185
|
### 7. Handle Finalization Retries and Results
|
|
@@ -163,6 +163,8 @@ agent-infra-internal task-warning {task-id} add --step complete-task --severity
|
|
|
163
163
|
agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;失败、阻塞和软警告保留必要诊断。
|
|
167
|
+
|
|
166
168
|
该事件只执行 required-PR delivery hard preflight;身份、并发和本地原子性仍由宿主 finalization 强制执行。外围 review/manual/platform 检查在 lifecycle 后由 `complete-task.completed` 处理,并投影为 warning/pending steps。硬门禁退出码非 0(fail/blocked)时,任务继续留在 active,记录稳定 code/target 后停止。
|
|
167
169
|
|
|
168
170
|
若需要在摘要中镜像 `post-review-commit` 的 human-decided exemption,在步骤 4 尽力同步原始 failure code/message、PRC id/evidence 和裁决信息;同步失败只记录 `SUMMARY_SYNC_FAILED` warning,仍继续生命周期。最终是否完成由生命周期后的 terminal verification 决定。
|
|
@@ -175,6 +177,8 @@ agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
|
175
177
|
agent-infra-internal task-finalization {task-id} complete --agent {standard-agent-token}
|
|
176
178
|
```
|
|
177
179
|
|
|
180
|
+
active 任务的 finalization 先恢复账本中的待处理平台操作,并将 `delivery_base_ref` 对应的 Issue `in:` 标签与需求、Issue Type、字段一并同步及复读。任一必要事实无法确认时保持 active,不提交完成状态。
|
|
181
|
+
|
|
178
182
|
finalization 按允许的 artifact backfill → lifecycle → task 评论 → core verification → warning task 评论更新 → summary seal 的固定顺序执行。每项实际运行的 backfill 必须取得成功终态,否则不得进入 lifecycle;完整 receipt 且无恢复事实的普通重入不执行 backfill、评论、验证或 summary。任何可能写入 managed comment 的 completed 恢复会先把 done summary 持久化为 pending,恢复末尾才重新 seal。summary seal 始终读取任务目录中保留的 durable staging record;平台入口负责校验 marker、owner 和 digest,必要时删除并重建摘要,再复读最终远端顺序。`result=completed` 即表示宿主已依据结构化结果和 receipt 安全完成;若还有外围 warning 或 pending step,返回 `result=completed_with_warnings`、warnings 和 pending steps。`result=failed` 或 `result=blocked` 仅用于硬失败或 receipt/capability 失败,修复原因后以同一入口重试,不得宣称完成或手工补写局部状态。沙箱不得从旧挂载执行 `ls completed` 或本地终态校验来重新裁决该结果。
|
|
179
183
|
|
|
180
184
|
### 7. 处理 finalization 重试与结果
|
|
@@ -102,6 +102,8 @@ If this operation is associated with `{task-id}`, run the verification gate to c
|
|
|
102
102
|
agent-infra-internal task-verify {task-id} create-pr.completed --format text
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
106
|
+
|
|
105
107
|
Handle the result as follows:
|
|
106
108
|
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
107
109
|
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
@@ -107,7 +107,7 @@ agent-infra-internal task-verify {task-id} create-pr.completed --format text
|
|
|
107
107
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
108
108
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
111
111
|
|
|
112
112
|
### 11. 告知用户
|
|
113
113
|
|
|
@@ -153,6 +153,8 @@ The host `task-create` service runs the same typed gate before returning. Consum
|
|
|
153
153
|
agent-infra-internal task-verify {task-id} create-task.completed --format text
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
157
|
+
|
|
156
158
|
Handle the result as follows:
|
|
157
159
|
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
158
160
|
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
@@ -156,7 +156,7 @@ agent-infra-internal task-verify {task-id} create-task.completed --format text
|
|
|
156
156
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
157
157
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
160
160
|
|
|
161
161
|
### 6. 告知用户
|
|
162
162
|
|
|
@@ -86,6 +86,8 @@ Run the verification gate to confirm the task artifact and sync state are valid:
|
|
|
86
86
|
agent-infra-internal task-verify {task-id} import-codescan.completed --format text
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
90
|
+
|
|
89
91
|
Handle the result as follows:
|
|
90
92
|
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
91
93
|
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
@@ -91,7 +91,7 @@ agent-infra-internal task-verify {task-id} import-codescan.completed --format te
|
|
|
91
91
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
92
92
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
95
95
|
|
|
96
96
|
### 5. 告知用户
|
|
97
97
|
|
|
@@ -89,6 +89,8 @@ Run the verification gate to confirm the task artifact and sync state are valid:
|
|
|
89
89
|
agent-infra-internal task-verify {task-id} import-dependabot.completed --format text
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
93
|
+
|
|
92
94
|
Handle the result as follows:
|
|
93
95
|
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
94
96
|
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
@@ -94,7 +94,7 @@ agent-infra-internal task-verify {task-id} import-dependabot.completed --format
|
|
|
94
94
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
95
95
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
98
98
|
|
|
99
99
|
### 5. 告知用户
|
|
100
100
|
|
|
@@ -167,6 +167,8 @@ Run the verification gate to confirm the task artifact and sync state are valid:
|
|
|
167
167
|
agent-infra-internal task-verify {task-id} import-issue.completed --format text
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
171
|
+
|
|
170
172
|
Handle the result as follows:
|
|
171
173
|
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
172
174
|
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
@@ -172,7 +172,7 @@ agent-infra-internal task-verify {task-id} import-issue.completed --format text
|
|
|
172
172
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
173
173
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
176
176
|
|
|
177
177
|
### 7. 告知用户
|
|
178
178
|
|
|
@@ -21,7 +21,7 @@ This stage consumes only the canonical path fact parsed by core from the latest
|
|
|
21
21
|
|
|
22
22
|
Before generating the plan report, read `.agents/rules/evidence-reporting.md`. Record the command, target scope, status or structured result, actual result, and uncovered parts for state checks and verification; include decisive raw excerpts only for failures, blocking conditions, or disputes.
|
|
23
23
|
|
|
24
|
-
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the
|
|
24
|
+
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the three qualification-audit decision tables and snapshot in the plan artifact; unknown or unconfirmed constraints must not automatically exclude a candidate
|
|
25
25
|
- This skill only outputs a technical plan document (`plan.md` or `plan-r{N}.md`) and does not modify any business code
|
|
26
26
|
- The full path proceeds to plan review; the standard path may proceed directly to implementation
|
|
27
27
|
- 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
|
|
@@ -159,6 +159,8 @@ Run the verification gate to confirm the task artifact and sync state are valid:
|
|
|
159
159
|
agent-infra-internal task-verify {task-id} plan.completed --artifact {plan-artifact} --format text
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
163
|
+
|
|
162
164
|
Handle the result as follows:
|
|
163
165
|
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
164
166
|
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
@@ -21,7 +21,7 @@ description: >
|
|
|
21
21
|
|
|
22
22
|
生成方案报告时,先读取 `.agents/rules/evidence-reporting.md`。状态核对和验证记录命令、目标范围、状态/结构化结果、实际结果和未覆盖部分;失败、阻塞或争议才附决定性原文摘录。
|
|
23
23
|
|
|
24
|
-
- 涉及候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,基于 task.md
|
|
24
|
+
- 涉及候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,基于 task.md 规范化约束/候选完成资格审计,并在方案产物记录三张资格审计决策表和资格快照;不得把来源不明或未确认约束自动升级为排除条件
|
|
25
25
|
- 本技能仅产出技术方案文档(`plan.md` 或 `plan-r{N}.md`)—— 不修改任何业务代码
|
|
26
26
|
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
27
27
|
- 完整路径进入方案审查;标准路径完成方案后可直接进入实现阶段
|
|
@@ -92,7 +92,7 @@ agent-infra-internal task-event {task-id} plan.started --agent {standard-agent-t
|
|
|
92
92
|
|
|
93
93
|
### 5. 设计技术方案
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
仅当方案阶段实际判断候选资格、约束依赖或人工裁决资格时,才按 `.agents/rules/decision-qualification.md` 复核规范化约束和候选,并在方案产物记录完整资格审计;否则省略整个审计段。来源不明或未人工确认的约束不得自动排除候选。
|
|
96
96
|
|
|
97
97
|
遵循 `.agents/workflows/feature-development.yaml` 中的 `technical-design` 步骤:
|
|
98
98
|
|
|
@@ -160,7 +160,7 @@ agent-infra-internal task-verify {task-id} plan.completed --artifact {plan-artif
|
|
|
160
160
|
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
161
161
|
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
按 `.agents/rules/validation-output.md` 展示当次校验摘要;没有当次校验输出,不得声明完成。
|
|
164
164
|
|
|
165
165
|
### 9. 告知用户
|
|
166
166
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"schema": "plan"
|
|
21
21
|
},
|
|
22
22
|
"activity-log": {
|
|
23
|
-
"expected_action_pattern": "(Plan Task|Technical Design) \\(Round \\d+\\)"
|
|
23
|
+
"expected_action_pattern": "((Plan Task|Technical Design) \\(Round \\d+\\)|Human Decision)"
|
|
24
24
|
},
|
|
25
25
|
"review-ledger": {
|
|
26
26
|
"stage_scope": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"schema": "plan"
|
|
21
21
|
},
|
|
22
22
|
"activity-log": {
|
|
23
|
-
"expected_action_pattern": "(Plan Task|Technical Design) \\(Round \\d+\\)"
|
|
23
|
+
"expected_action_pattern": "((Plan Task|Technical Design) \\(Round \\d+\\)|Human Decision)"
|
|
24
24
|
},
|
|
25
25
|
"review-ledger": {
|
|
26
26
|
"stage_scope": [
|
|
@@ -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 analysis 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-analysis.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-analysis --art
|
|
|
114
114
|
agent-infra-internal task-verify {task-id} review-analysis.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-analysis.md` or `review-analysis-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-analysis.md` or `review-analysis-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
|
|
|
@@ -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
|
|
|
@@ -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 reviews code 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
|
|
@@ -67,30 +67,29 @@ After resolving the artifact context and before this round's first artifact acti
|
|
|
67
67
|
|
|
68
68
|
Require:
|
|
69
69
|
- `.agents/workspace/active/{task-id}/task.md`
|
|
70
|
-
-
|
|
70
|
+
- a resolvable task branch and Git review target. Implementation artifacts are optional context and must not gate review eligibility.
|
|
71
71
|
|
|
72
72
|
### 2. Resolve the Artifact Context
|
|
73
73
|
|
|
74
|
-
Run `agent-infra-internal task-artifact {task-id} inspect --family review-code`. Continue only for `ready`. When `selection.disposition` is `reuse`, reuse `selection.artifact`, do not run started/init or write a new artifact, and continue directly to completion verification and next-step guidance. Otherwise take
|
|
74
|
+
Run `agent-infra-internal task-artifact {task-id} inspect --family review-code`. Continue only for `ready`. When `selection.disposition` is `reuse`, reuse `selection.artifact`, do not run started/init or write a new artifact, and continue directly to completion verification and next-step guidance. Otherwise take any available latest `{code-artifact}` and `{plan-artifact}` from `inputs`, and `{review-round}` / `{review-artifact}` from `next.round` / `next.name`. Do not scan rounds or construct names in the skill. If no code or plan artifact exists, review the Git diff and record the missing context in the report. Then run the started event and verify the returned identity.
|
|
75
75
|
|
|
76
76
|
### 3. Read Implementation and Refinement Context
|
|
77
77
|
|
|
78
|
-
Read the
|
|
78
|
+
Read the available code and plan context returned in step 2. Record the artifact filenames actually read in the report's `Review Input` field; identify missing context without fabricating an artifact. When no implementation artifact exists, review the Git diff as the review subject.
|
|
79
79
|
|
|
80
80
|
### 4. Perform the Review
|
|
81
81
|
|
|
82
|
-
Follow `.agents/workflows/feature-development.yaml` and inspect the full change context:
|
|
82
|
+
Follow `.agents/workflows/feature-development.yaml` and inspect the full change context. HD-1 decided that changes within the reviewed scope must be committed first: before writing the started event, check the post-review paths and stop with an actionable commit instruction when tracked or untracked changes remain. Do not create a review report for a dirty reviewed scope. Bind the report identity to the exact HEAD of a clean worktree:
|
|
83
83
|
- Resolve the task's bound delivery remote/base and read the target SHA once at review start, `M=$(git ls-remote --refs {remote} refs/heads/{baseRef})`; then capture the reviewed commit `R=$(git rev-parse HEAD)` once and compute `D=$(git merge-base "$R" "$M")`. Save M/D/R as historical evidence and never overwrite them with a later live target value
|
|
84
84
|
- If the delivery target cannot be resolved or its target commit is unavailable, stop and record the target error; M/D/R must come from one fact-collection round and must not be replaced by PR-existence evidence
|
|
85
|
-
- `git diff --binary "$D" -- <post-review-globs>` covers committed
|
|
86
|
-
- `
|
|
87
|
-
- Write `mode=worktree`, `baseline=R`, and `diffBase=D` to a temporary JSON file, then call `agent-infra-internal git-workflow snapshot --input {file}` to generate a reviewed diff fingerprint `F` for the complete committed range and a reviewed snapshot tree `T` for the current worktree; write M, R, D, F, and T into the report
|
|
85
|
+
- `git diff --binary "$D" "$R" -- <post-review-globs>` covers committed tracked changes from D to R; commit any uncommitted or untracked reviewed paths before starting, as required by HD-1
|
|
86
|
+
- Write `mode=worktree`, `baseline=R`, and `diffBase=D` to a temporary JSON file, then call `agent-infra-internal git-workflow snapshot --input {file}` to generate a reviewed diff fingerprint `F` for the committed range and a snapshot tree `T`; write M, R, D, F, and T into the report
|
|
88
87
|
|
|
89
88
|
> After collecting those facts, read `.agents/rules/review-method.md`, use them as readiness evidence, and run Passes 2–5 for traceability, risk lenses, counterevidence, and classification; the report must record all five passes.
|
|
90
89
|
> Detailed review criteria, severity rules, and reviewer expectations live in `reference/review-criteria.md`. Read `reference/review-criteria.md` before reviewing.
|
|
91
90
|
|
|
92
91
|
Apply the shared five-pass protocol to code in this order:
|
|
93
|
-
- Pass 1 reads the complete diff,
|
|
92
|
+
- Pass 1 reads the complete diff, any available code/plan artifacts, task source, and raw test results; when code or plan context is missing, record that gap and continue with the Git diff.
|
|
94
93
|
- Pass 2 maps acceptance/plan → implementation → verification and records changed lines, necessary callers/callees, state/data flow, and uncovered areas per file.
|
|
95
94
|
- Pass 3 reviews overall design before per-file semantics, evaluates every shared registry trigger, and reads every matched reference in full. Test changes load `.agents/rules/testing-discipline.md` through the registry's `testing-discipline` lens; do not maintain a second trigger list.
|
|
96
95
|
- Pass 4 checks guards, call constraints, test coverage, and narrower impact boundaries as counterevidence.
|
|
@@ -129,7 +128,7 @@ Update task.md:
|
|
|
129
128
|
|
|
130
129
|
The intent atomically finalizes the report summary and returns the same ledger snapshot. Do not call `stage-status`, replace placeholders manually, or rescan the finding list. After a failure, the model may edit the same controlled artifact and rerun the same intent only when the shared rule's mechanical gates pass; reassess convergence after every failure. The final complete result determines the verdict and counts from that same snapshot: `stageStatus.canAdvance=true` with an Approved conclusion permits cross-stage advancement; `stageStatus.canAdvance=false` still requires `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}`, using `changes-requested` and routing to same-stage revision/review (use `rejected` when the report explicitly rejects). On failure, model stop, lack of progress, or the emergency cap, do not publish a completion event or cross-stage command; use the `repair-stop` scenario in `reference/output-templates.md` to show existing summary/findings, the artifact, actual repair attempts, the last diagnostic, and the stop reason
|
|
131
130
|
- Only when `canAdvance=true`, the verdict is Approved, and `T == R^{tree}`, write `last_reviewed_commit: {R}`. Clear an old value for an Approved snapshot with uncommitted differences; otherwise preserve the existing value and do not advance it
|
|
132
|
-
- For an Approved exit,
|
|
131
|
+
- For an Approved exit, use `reference/output-templates.md` to select one branch and its `agent-client next-steps` helper to generate the next command.
|
|
133
132
|
- After handling `last_reviewed_commit`, run `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}`
|
|
134
133
|
|
|
135
134
|
Always include the `Manual-validation: {n}` field in the done log, including when it is 0.
|
|
@@ -150,6 +149,8 @@ Run the verification gate to confirm the task artifact and sync state are valid:
|
|
|
150
149
|
agent-infra-internal task-verify {task-id} review-code.completed --artifact {review-artifact} --format text
|
|
151
150
|
```
|
|
152
151
|
|
|
152
|
+
Present the verification summary per `.agents/rules/validation-output.md`, retaining necessary failure, blocked, and soft-warning diagnostics.
|
|
153
|
+
|
|
153
154
|
Handle the result as follows:
|
|
154
155
|
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
155
156
|
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
@@ -161,7 +162,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
161
162
|
|
|
162
163
|
> Execute this step only after the verification gate passes.
|
|
163
164
|
|
|
164
|
-
> **Important —
|
|
165
|
+
> **Important — scenario labels are not values for the verdict field**. A/B/C are result scenarios; R displays existing results when lifecycle finalization stops. None are values for the `**Overall Verdict**:` field, which accepts exactly one of the three canonical values (`Approved` / `Changes Requested` / `Rejected`, or zh-CN `通过` / `需要修改` / `拒绝`).
|
|
165
166
|
|
|
166
167
|
Choose exactly one branch based on the findings:
|
|
167
168
|
- `stageStatus.canAdvance=true` -> approved
|
|
@@ -170,7 +171,7 @@ Choose exactly one branch based on the findings:
|
|
|
170
171
|
|
|
171
172
|
manual-validation counts do not influence branch selection; they are displayed only as manual validation counts.
|
|
172
173
|
|
|
173
|
-
> The
|
|
174
|
+
> The A/B/C output templates, selection rules, and prohibition clauses live in `reference/output-templates.md`. Read `reference/output-templates.md` before reporting the review result.
|
|
174
175
|
|
|
175
176
|
> Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the "Next steps" commands as the current task's short id `NN` (see that file for lookup and fallback), while other `{task-id}` placeholders (report titles, paths) keep the full TASK-id form; (2) append the `Completed at` line as the very last line of the user-facing output (this applies to every user-facing output — success, error, and early-return paths alike, not only the success path).
|
|
176
177
|
|