@fitlab-ai/agent-infra 0.9.1 → 0.9.3
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/README.md +24 -11
- package/README.zh-CN.md +24 -11
- package/bin/cli.ts +12 -0
- package/dist/bin/cli.js +14 -0
- package/dist/bin/internal-cli.js +30 -0
- package/dist/lib/agent-client.js +163 -0
- package/dist/lib/agent-clients/adapter.js +337 -0
- package/dist/lib/agent-clients/adapters/antigravity-cli.js +64 -0
- package/dist/lib/agent-clients/adapters/claude-code.js +71 -0
- package/dist/lib/agent-clients/adapters/codex-sandbox.js +210 -0
- package/dist/lib/agent-clients/adapters/codex.js +63 -0
- package/dist/lib/agent-clients/adapters/index.js +20 -0
- package/dist/lib/agent-clients/adapters/opencode.js +73 -0
- package/dist/lib/agent-clients/config.js +215 -0
- package/dist/lib/agent-clients/custom-tuis.js +99 -0
- package/dist/lib/agent-clients/invocation.js +9 -0
- package/dist/lib/agent-clients/next-steps.js +47 -0
- package/dist/lib/agent-clients/project-assets.js +45 -0
- package/dist/lib/agent-clients/reconcile.js +236 -0
- package/dist/lib/agent-clients/registry.js +78 -0
- package/dist/lib/agent-clients/schema.js +75 -0
- package/dist/lib/agent-clients/tokens.js +49 -0
- package/dist/lib/agent-clients/types.js +29 -0
- package/dist/lib/builtin-tuis.js +9 -14
- package/dist/lib/defaults.json +85 -73
- package/dist/lib/git/review-snapshot.js +25 -10
- package/dist/lib/git/reviewed-commit-equivalence.js +110 -0
- package/dist/lib/git/workflow.js +54 -1
- package/dist/lib/init.js +47 -91
- package/dist/lib/internal/agent-client.js +174 -0
- package/dist/lib/internal/git-workflow.js +7 -2
- package/dist/lib/internal/platform-checks.js +3 -3
- package/dist/lib/internal/platform-comment.js +29 -2
- package/dist/lib/internal/platform-issue.js +7 -0
- package/dist/lib/internal/platform-pr-review.js +132 -0
- package/dist/lib/internal/platform-pr.js +20 -2
- package/dist/lib/internal/platform-release-notes.js +52 -16
- package/dist/lib/internal/pr-review-grade.js +140 -0
- package/dist/lib/internal/release-workflow.js +82 -20
- package/dist/lib/internal/task-activity.js +73 -0
- package/dist/lib/internal/task-event.js +17 -1
- package/dist/lib/internal/task-lifecycle.js +7 -0
- package/dist/lib/internal/task-orchestration.js +196 -0
- package/dist/lib/internal/task-review.js +70 -0
- package/dist/lib/merge.js +2 -1
- package/dist/lib/platform/adapters.js +45 -1
- package/dist/lib/platform/change-request-git-evidence.js +113 -0
- package/dist/lib/platform/completion-backfill.js +122 -0
- package/dist/lib/platform/issue-comments.js +3 -2
- package/dist/lib/platform/merged-pr-equivalence.js +156 -16
- package/dist/lib/platform/pr-checks.js +101 -50
- package/dist/lib/platform/pr-review.js +166 -0
- package/dist/lib/platform/pull-requests.js +432 -7
- package/dist/lib/platform/release-notes.js +85 -3
- package/dist/lib/platform/releases.js +1 -1
- package/dist/lib/platform/verification-required.js +8 -10
- package/dist/lib/pr-review/evidence-grading.js +229 -0
- package/dist/lib/prompt.js +15 -3
- package/dist/lib/release/channels.js +4 -1
- package/dist/lib/release/workflow.js +4 -2
- package/dist/lib/remove-dir.js +25 -0
- package/dist/lib/run/tui.js +11 -7
- package/dist/lib/sandbox/agent-client-reconciler.js +234 -0
- package/dist/lib/sandbox/clipboard/linux.js +2 -1
- package/dist/lib/sandbox/commands/create.js +76 -200
- package/dist/lib/sandbox/commands/enter.js +17 -1
- package/dist/lib/sandbox/commands/prune.js +2 -2
- package/dist/lib/sandbox/commands/rm.js +3 -2
- package/dist/lib/sandbox/commands/show.js +1 -1
- package/dist/lib/sandbox/config.js +21 -4
- package/dist/lib/sandbox/constants.js +3 -0
- package/dist/lib/sandbox/dockerfile.js +2 -1
- package/dist/lib/sandbox/managed-fs.js +10 -5
- package/dist/lib/sandbox/recovery.js +52 -36
- package/dist/lib/sandbox/shell.js +1 -1
- package/dist/lib/sandbox/tool-types.js +8 -0
- package/dist/lib/sandbox/tools.js +2 -126
- package/dist/lib/task/activity-intent.js +101 -0
- package/dist/lib/task/artifact-lifecycle.js +3 -50
- package/dist/lib/task/commands/decisions.js +50 -20
- package/dist/lib/task/commands/log.js +15 -14
- package/dist/lib/task/delegation-receipts.js +128 -0
- package/dist/lib/task/events.js +146 -8
- package/dist/lib/task/finalization-artifacts.js +35 -0
- package/dist/lib/task/lifecycle-execution.js +46 -0
- package/dist/lib/task/orchestration.js +784 -0
- package/dist/lib/task/review-artifacts.js +143 -59
- package/dist/lib/task/review-finalization.js +186 -0
- package/dist/lib/task/review-fingerprint.js +4 -0
- package/dist/lib/task/task-execution-lock.js +231 -0
- package/dist/lib/task/verification-checks.js +2 -1
- package/dist/lib/task/verification-engine.js +372 -28
- package/dist/lib/task/verification-review.js +1 -1
- package/dist/lib/task/verification.js +5 -2
- package/dist/lib/task/workspace-snapshot.js +46 -0
- package/dist/lib/update.js +42 -161
- package/lib/agent-client.ts +214 -0
- package/lib/agent-clients/adapter.ts +534 -0
- package/lib/agent-clients/adapters/antigravity-cli.ts +65 -0
- package/lib/agent-clients/adapters/claude-code.ts +79 -0
- package/lib/agent-clients/adapters/codex-sandbox.ts +245 -0
- package/lib/agent-clients/adapters/codex.ts +67 -0
- package/lib/agent-clients/adapters/index.ts +27 -0
- package/lib/agent-clients/adapters/opencode.ts +75 -0
- package/lib/agent-clients/config.ts +323 -0
- package/lib/agent-clients/custom-tuis.ts +149 -0
- package/lib/agent-clients/invocation.ts +19 -0
- package/lib/agent-clients/next-steps.ts +85 -0
- package/lib/agent-clients/project-assets.ts +96 -0
- package/lib/agent-clients/reconcile.ts +325 -0
- package/lib/agent-clients/registry.ts +154 -0
- package/lib/agent-clients/schema.ts +80 -0
- package/lib/agent-clients/tokens.ts +53 -0
- package/lib/agent-clients/types.ts +92 -0
- package/lib/benchmark/schemas/v1.0.0/case-manifest.schema.json +120 -0
- package/lib/benchmark/schemas/v1.0.0/common.schema.json +109 -0
- package/lib/benchmark/schemas/v1.0.0/grader-result.schema.json +160 -0
- package/lib/benchmark/schemas/v1.0.0/run-manifest.schema.json +122 -0
- package/lib/benchmark/schemas/v1.0.0/subject.schema.json +227 -0
- package/lib/builtin-tuis.ts +16 -15
- package/lib/defaults.json +24 -12
- package/lib/git/review-snapshot.ts +39 -9
- package/lib/git/reviewed-commit-equivalence.ts +135 -0
- package/lib/git/workflow.ts +66 -2
- package/lib/init.ts +53 -121
- package/lib/internal/agent-client.ts +186 -0
- package/lib/internal/git-workflow.ts +6 -2
- package/lib/internal/platform-checks.ts +4 -4
- package/lib/internal/platform-comment.ts +17 -2
- package/lib/internal/platform-issue.ts +4 -0
- package/lib/internal/platform-pr-review.ts +104 -0
- package/lib/internal/platform-pr.ts +14 -1
- package/lib/internal/platform-release-notes.ts +59 -16
- package/lib/internal/pr-review-grade.ts +130 -0
- package/lib/internal/release-workflow.ts +79 -20
- package/lib/internal/task-activity.ts +55 -0
- package/lib/internal/task-event.ts +9 -1
- package/lib/internal/task-lifecycle.ts +4 -0
- package/lib/internal/task-orchestration.ts +171 -0
- package/lib/internal/task-review.ts +70 -0
- package/lib/merge.ts +2 -1
- package/lib/platform/adapters.ts +169 -3
- package/lib/platform/change-request-git-evidence.ts +159 -0
- package/lib/platform/completion-backfill.ts +134 -0
- package/lib/platform/issue-comments.ts +3 -2
- package/lib/platform/merged-pr-equivalence.ts +178 -19
- package/lib/platform/pr-checks.ts +121 -66
- package/lib/platform/pr-review.ts +201 -0
- package/lib/platform/pull-requests.ts +529 -27
- package/lib/platform/release-notes.ts +100 -4
- package/lib/platform/releases.ts +1 -1
- package/lib/platform/verification-required.ts +12 -10
- package/lib/pr-review/evidence-grading.ts +318 -0
- package/lib/prompt.ts +16 -3
- package/lib/release/channels.ts +4 -1
- package/lib/release/workflow.ts +4 -3
- package/lib/remove-dir.ts +28 -0
- package/lib/run/tui.ts +12 -5
- package/lib/sandbox/agent-client-reconciler.ts +378 -0
- package/lib/sandbox/clipboard/linux.ts +2 -1
- package/lib/sandbox/commands/create.ts +111 -212
- package/lib/sandbox/commands/enter.ts +23 -1
- package/lib/sandbox/commands/prune.ts +2 -2
- package/lib/sandbox/commands/rm.ts +3 -2
- package/lib/sandbox/commands/show.ts +1 -1
- package/lib/sandbox/config.ts +31 -4
- package/lib/sandbox/constants.ts +6 -0
- package/lib/sandbox/dockerfile.ts +2 -1
- package/lib/sandbox/managed-fs.ts +18 -5
- package/lib/sandbox/recovery.ts +98 -67
- package/lib/sandbox/shell.ts +1 -1
- package/lib/sandbox/tool-types.ts +143 -0
- package/lib/sandbox/tools.ts +5 -157
- package/lib/server/server.schema.json +2 -2
- package/lib/task/activity-intent.ts +128 -0
- package/lib/task/artifact-lifecycle.ts +3 -39
- package/lib/task/commands/decisions.ts +53 -20
- package/lib/task/commands/log.ts +15 -14
- package/lib/task/delegation-receipts.ts +199 -0
- package/lib/task/events.ts +164 -11
- package/lib/task/finalization-artifacts.ts +58 -0
- package/lib/task/lifecycle-execution.ts +106 -0
- package/lib/task/orchestration.ts +1022 -0
- package/lib/task/review-artifacts.ts +201 -69
- package/lib/task/review-finalization.ts +306 -0
- package/lib/task/review-fingerprint.ts +5 -0
- package/lib/task/task-execution-lock.ts +296 -0
- package/lib/task/verification-checks.ts +2 -1
- package/lib/task/verification-engine.ts +424 -28
- package/lib/task/verification-review.ts +1 -0
- package/lib/task/verification.ts +8 -3
- package/lib/task/workspace-snapshot.ts +57 -0
- package/lib/update.ts +48 -184
- package/package.json +4 -4
- package/templates/.agents/QUICKSTART.en.md +25 -8
- package/templates/.agents/QUICKSTART.zh-CN.md +25 -8
- package/templates/.agents/README.en.md +29 -25
- package/templates/.agents/README.zh-CN.md +29 -25
- package/templates/.agents/hooks/lifecycle-delegation.js +75 -0
- package/templates/.agents/rules/README.en.md +2 -0
- package/templates/.agents/rules/README.zh-CN.md +2 -0
- package/templates/.agents/rules/commit-and-pr.en.md +1 -0
- package/templates/.agents/rules/commit-and-pr.zh-CN.md +1 -0
- package/templates/.agents/rules/create-issue.github.en.md +4 -2
- package/templates/.agents/rules/create-issue.github.zh-CN.md +4 -2
- package/templates/.agents/rules/human-decision-context.en.md +14 -12
- package/templates/.agents/rules/human-decision-context.zh-CN.md +14 -12
- package/templates/.agents/rules/issue-fields.github.en.md +3 -1
- package/templates/.agents/rules/issue-fields.github.zh-CN.md +3 -1
- package/templates/.agents/rules/issue-pr-commands.en.md +5 -3
- package/templates/.agents/rules/issue-pr-commands.github.en.md +5 -3
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +5 -3
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +5 -3
- package/templates/.agents/rules/issue-sync.github.en.md +7 -3
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +8 -4
- package/templates/.agents/rules/lifecycle-orchestration.en.md +24 -0
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +24 -0
- package/templates/.agents/rules/milestone-inference.github.en.md +4 -2
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -2
- package/templates/.agents/rules/next-step-output.en.md +18 -0
- package/templates/.agents/rules/next-step-output.zh-CN.md +18 -0
- package/templates/.agents/rules/no-mid-flow-questions.en.md +19 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +19 -0
- package/templates/.agents/rules/pr-checks-commands.en.md +3 -3
- package/templates/.agents/rules/pr-checks-commands.github.en.md +2 -2
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +2 -2
- package/templates/.agents/rules/pr-checks-commands.zh-CN.md +3 -3
- package/templates/.agents/rules/pr-sync.en.md +3 -1
- package/templates/.agents/rules/pr-sync.github.en.md +11 -1
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +11 -1
- package/templates/.agents/rules/pr-sync.zh-CN.md +3 -1
- package/templates/.agents/rules/release-commands.en.md +1 -1
- package/templates/.agents/rules/release-commands.github.en.md +21 -5
- package/templates/.agents/rules/release-commands.github.zh-CN.md +21 -5
- package/templates/.agents/rules/release-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/review-handshake.en.md +4 -4
- package/templates/.agents/rules/review-handshake.zh-CN.md +4 -4
- package/templates/.agents/rules/review-method.en.md +113 -0
- package/templates/.agents/rules/review-method.zh-CN.md +98 -0
- package/templates/.agents/rules/task-management.en.md +11 -0
- package/templates/.agents/rules/task-management.zh-CN.md +11 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +15 -12
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +15 -12
- package/templates/.agents/skills/block-task/SKILL.en.md +11 -9
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +11 -9
- package/templates/.agents/skills/cancel-task/SKILL.en.md +10 -8
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +11 -9
- package/templates/.agents/skills/check-task/SKILL.en.md +16 -16
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +16 -16
- package/templates/.agents/skills/close-codescan/SKILL.en.md +7 -5
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +7 -5
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +7 -5
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +7 -5
- package/templates/.agents/skills/code-task/SKILL.en.md +10 -7
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +13 -10
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +14 -16
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +14 -16
- package/templates/.agents/skills/code-task/reference/output-template.en.md +3 -3
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/SKILL.en.md +13 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/commit/reference/commit-message.en.md +1 -1
- package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.en.md +1 -1
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +1 -1
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +24 -28
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +24 -28
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +6 -4
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +6 -4
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +1 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +23 -8
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +23 -8
- package/templates/.agents/skills/complete-task/config/verify.en.json +1 -0
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/complete-task/reference/external-delivery.en.md +17 -0
- package/templates/.agents/skills/complete-task/reference/external-delivery.zh-CN.md +17 -0
- package/templates/.agents/skills/create-pr/SKILL.en.md +13 -11
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +13 -11
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +3 -3
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +3 -3
- package/templates/.agents/skills/create-release-note/SKILL.en.md +17 -16
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +17 -16
- package/templates/.agents/skills/create-task/SKILL.en.md +16 -14
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +16 -14
- package/templates/.agents/skills/import-codescan/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-issue/SKILL.en.md +10 -8
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +10 -8
- package/templates/.agents/skills/init-labels/SKILL.en.md +4 -4
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/init-milestones/SKILL.en.md +4 -4
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/plan-task/SKILL.en.md +13 -10
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +13 -10
- package/templates/.agents/skills/post-release/SKILL.en.md +2 -0
- package/templates/.agents/skills/post-release/SKILL.zh-CN.md +2 -0
- package/templates/.agents/skills/refine-title/SKILL.en.md +1 -1
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/release/SKILL.en.md +16 -10
- package/templates/.agents/skills/release/SKILL.zh-CN.md +16 -10
- package/templates/.agents/skills/restore-task/SKILL.en.md +4 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +18 -4
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +19 -5
- package/templates/.agents/skills/review-analysis/config/verify.en.json +6 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +6 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +13 -15
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +13 -15
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +51 -5
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +52 -6
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +25 -22
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +25 -22
- package/templates/.agents/skills/review-code/SKILL.en.md +35 -12
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +35 -12
- package/templates/.agents/skills/review-code/config/verify.en.json +7 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +7 -0
- package/templates/.agents/skills/review-code/reference/concurrency-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/concurrency-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-code/reference/cross-platform-risks.en.md +27 -0
- package/templates/.agents/skills/review-code/reference/cross-platform-risks.zh-CN.md +27 -0
- package/templates/.agents/skills/review-code/reference/documentation-antipatterns.en.md +13 -0
- package/templates/.agents/skills/review-code/reference/documentation-antipatterns.zh-CN.md +13 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +22 -24
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +22 -24
- package/templates/.agents/skills/review-code/reference/report-template.en.md +54 -7
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +54 -7
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +29 -24
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +29 -24
- package/templates/.agents/skills/review-code/reference/security-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/security-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +18 -4
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +19 -5
- package/templates/.agents/skills/review-plan/config/verify.en.json +6 -0
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +6 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +13 -15
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +13 -15
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +61 -5
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +61 -5
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +21 -24
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +21 -24
- package/templates/.agents/skills/review-pr/SKILL.en.md +158 -0
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +158 -0
- package/templates/.agents/skills/review-pr/config/verify.en.json +37 -0
- package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +37 -0
- package/templates/.agents/skills/review-pr/reference/evidence-grading.en.md +65 -0
- package/templates/.agents/skills/review-pr/reference/evidence-grading.zh-CN.md +65 -0
- package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +18 -0
- package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +18 -0
- package/templates/.agents/skills/review-pr/reference/report-template.en.md +85 -0
- package/templates/.agents/skills/review-pr/reference/report-template.zh-CN.md +85 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +22 -0
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +22 -0
- package/templates/.agents/skills/run-task/config/verify.en.json +10 -0
- package/templates/.agents/skills/run-task/config/verify.zh-CN.json +10 -0
- package/templates/.agents/skills/run-task/reference/host-validation.en.md +20 -0
- package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +20 -0
- package/templates/.agents/skills/test/SKILL.en.md +4 -4
- package/templates/.agents/skills/test/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/test-integration/SKILL.en.md +4 -4
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +5 -5
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +664 -246
- package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +4 -4
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/watch-pr/SKILL.en.md +21 -21
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +21 -21
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +27 -6
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +26 -5
- package/templates/.agents/templates/task.en.md +1 -1
- package/templates/.agents/templates/task.zh-CN.md +1 -1
- package/templates/.agents/workflows/bug-fix.en.yaml +3 -3
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +3 -3
- package/templates/.agents/workflows/code-review.en.yaml +1 -1
- package/templates/.agents/workflows/code-review.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/feature-development.en.yaml +4 -4
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +4 -4
- package/templates/.agents/workflows/refactoring.en.yaml +3 -3
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +3 -3
- package/templates/.claude/agents/agent-infra-lifecycle-executor.en.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-executor.zh-CN.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-reviewer.en.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-reviewer.zh-CN.md +6 -0
- package/templates/.claude/commands/post-release.en.md +1 -0
- package/templates/.claude/commands/post-release.zh-CN.md +1 -0
- package/templates/.claude/commands/review-pr.en.md +8 -0
- package/templates/.claude/commands/review-pr.zh-CN.md +8 -0
- package/templates/.claude/commands/run-task.en.md +8 -0
- package/templates/.claude/commands/run-task.zh-CN.md +8 -0
- package/templates/.claude/settings.json +24 -0
- package/templates/.codex/agents/agent-infra-lifecycle-executor.en.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-executor.zh-CN.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-reviewer.en.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-reviewer.zh-CN.toml +3 -0
- package/templates/.gemini/commands/_project_/review-pr.en.toml +10 -0
- package/templates/.gemini/commands/_project_/review-pr.zh-CN.toml +10 -0
- package/templates/.opencode/commands/post-release.en.md +2 -0
- package/templates/.opencode/commands/post-release.zh-CN.md +2 -0
- package/templates/.opencode/commands/review-pr.en.md +11 -0
- package/templates/.opencode/commands/review-pr.zh-CN.md +11 -0
- package/templates/.opencode/commands/run-task.en.md +11 -0
- package/templates/.opencode/commands/run-task.zh-CN.md +11 -0
- package/templates/.gemini/commands/_project_/analyze-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/archive-tasks.en.toml +0 -10
- package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/block-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/cancel-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/cancel-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/check-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/close-codescan.en.toml +0 -8
- package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/close-dependabot.en.toml +0 -8
- package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/code-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/commit.en.toml +0 -10
- package/templates/.gemini/commands/_project_/commit.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-manual-validation.en.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-manual-validation.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/create-pr.en.toml +0 -10
- package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/create-release-note.en.toml +0 -8
- package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/create-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/import-codescan.en.toml +0 -8
- package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/import-dependabot.en.toml +0 -8
- package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/import-issue.en.toml +0 -8
- package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/init-labels.en.toml +0 -8
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/init-milestones.en.toml +0 -10
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/plan-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/post-release.en.toml +0 -6
- package/templates/.gemini/commands/_project_/post-release.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/refine-title.en.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/release.en.toml +0 -8
- package/templates/.gemini/commands/_project_/release.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/restore-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/restore-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/review-analysis.en.toml +0 -10
- package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/review-code.en.toml +0 -10
- package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/review-plan.en.toml +0 -10
- package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/test-integration.en.toml +0 -6
- package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/test.en.toml +0 -6
- package/templates/.gemini/commands/_project_/test.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/update-agent-infra.en.toml +0 -6
- package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/upgrade-dependency.en.toml +0 -8
- package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/watch-pr.en.toml +0 -10
- package/templates/.gemini/commands/_project_/watch-pr.zh-CN.toml +0 -10
- package/templates/.gemini/settings.json +0 -3
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
1. 调用 `agent-infra-internal platform-pr summary-context {task-id}` 获取 canonical 聚合输入。
|
|
6
6
|
2. 按 `.agents/rules/pr-sync.md` 生成纯摘要正文并写入临时文件。
|
|
7
|
-
3. 调用 `agent-infra-internal platform-pr summary-sync {task-id} --agent {agent} --body-file {summary-body-file}`。
|
|
7
|
+
3. 调用 `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file}`。
|
|
8
8
|
|
|
9
9
|
同步失败只记录 warning,不阻塞或回滚已经完成的 commit。`no-op` 回传 `summary skipped (no diff)`。
|
|
@@ -30,11 +30,11 @@ This field is the only baseline for the `complete-task` `post-review-commit` gat
|
|
|
30
30
|
|
|
31
31
|
After a new commit or the restricted push-only path is successfully pushed to an existing open PR, the only next step is to watch required checks for the new head:
|
|
32
32
|
|
|
33
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}`.
|
|
34
|
+
|
|
33
35
|
```text
|
|
34
36
|
Next step - watch PR checks:
|
|
35
|
-
|
|
36
|
-
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
37
|
-
- Codex CLI: $watch-pr {task-ref}
|
|
37
|
+
{next-step-commands}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
If push fails, keep the task active and preserve local HEAD; show diagnostics and manual push guidance only, never `watch-pr` or `complete-task`. This scenario takes precedence over the final `prFlow` route below.
|
|
@@ -50,20 +50,20 @@ This scenario ends the run before `git commit` and does not enter the successful
|
|
|
50
50
|
|
|
51
51
|
Full re-review commands:
|
|
52
52
|
|
|
53
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}`.
|
|
54
|
+
|
|
53
55
|
```text
|
|
54
56
|
Next step - re-run code review:
|
|
55
|
-
|
|
56
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
57
|
-
- Codex CLI: $review-code {task-ref}
|
|
57
|
+
{next-step-commands}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Full staging-only retry commands:
|
|
61
61
|
|
|
62
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}`.
|
|
63
|
+
|
|
62
64
|
```text
|
|
63
65
|
Next step - fix staging and retry commit:
|
|
64
|
-
|
|
65
|
-
- Gemini CLI: /{{project}}:commit {task-ref}
|
|
66
|
-
- Codex CLI: $commit {task-ref}
|
|
66
|
+
{next-step-commands}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Before selecting the next step, verify:
|
|
@@ -97,34 +97,30 @@ Required next-step commands (rendered by `prFlow`):
|
|
|
97
97
|
|
|
98
98
|
`prFlow="disabled"` -> single option "complete directly":
|
|
99
99
|
|
|
100
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
101
|
+
|
|
100
102
|
```text
|
|
101
103
|
Next step - complete and archive the task:
|
|
102
|
-
|
|
103
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
104
|
-
- Codex CLI: $complete-task {task-ref}
|
|
104
|
+
{next-step-commands}
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
`prFlow="required"` -> single option "go through the PR flow":
|
|
108
108
|
|
|
109
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`.
|
|
110
|
+
|
|
109
111
|
```text
|
|
110
112
|
Next step - create Pull Request:
|
|
111
|
-
|
|
112
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
113
|
-
- Codex CLI: $create-pr {task-ref}
|
|
113
|
+
{next-step-commands}
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
field absent ->
|
|
116
|
+
field absent -> choose one path, then invoke the helper exactly once:
|
|
117
|
+
|
|
118
|
+
- PR flow: `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`
|
|
119
|
+
- Complete directly: `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`
|
|
117
120
|
|
|
118
121
|
```text
|
|
119
|
-
Next step -
|
|
120
|
-
|
|
121
|
-
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
122
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
123
|
-
- Codex CLI: $create-pr {task-ref}
|
|
124
|
-
- Complete directly (no PR):
|
|
125
|
-
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
126
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
127
|
-
- Codex CLI: $complete-task {task-ref}
|
|
122
|
+
Next step - {selected path}:
|
|
123
|
+
{next-step-commands}
|
|
128
124
|
```
|
|
129
125
|
|
|
130
126
|
### Case 2: More Work Remains
|
|
@@ -145,11 +141,11 @@ If this commit hands work over to code review:
|
|
|
145
141
|
|
|
146
142
|
Required next-step commands:
|
|
147
143
|
|
|
144
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}`.
|
|
145
|
+
|
|
148
146
|
```text
|
|
149
147
|
Next step - code review:
|
|
150
|
-
|
|
151
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
152
|
-
- Codex CLI: $review-code {task-ref}
|
|
148
|
+
{next-step-commands}
|
|
153
149
|
```
|
|
154
150
|
|
|
155
151
|
> Note: beyond the cases above, if `task.md` contains a valid `pr_number`, the commit skill must sync the PR summary via `reference/pr-summary-sync.md` before entering the verification gate.
|
|
@@ -30,11 +30,11 @@ last_reviewed_commit: {new_head}
|
|
|
30
30
|
|
|
31
31
|
新 commit 或受限 push-only 场景成功推送到已有开放 PR 后,唯一下一步是监控新 head 的 required checks:
|
|
32
32
|
|
|
33
|
+
使用 `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
34
|
+
|
|
33
35
|
```text
|
|
34
36
|
下一步 - 监控 PR 检查:
|
|
35
|
-
|
|
36
|
-
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
37
|
-
- Codex CLI: $watch-pr {task-ref}
|
|
37
|
+
{next-step-commands}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推送提示;不得渲染 `watch-pr` 或 `complete-task`。该场景优先于下方 `prFlow` 终态路由。
|
|
@@ -50,20 +50,20 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
50
50
|
|
|
51
51
|
重新审查的完整命令:
|
|
52
52
|
|
|
53
|
+
使用 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
54
|
+
|
|
53
55
|
```text
|
|
54
56
|
下一步 - 重新代码审查:
|
|
55
|
-
|
|
56
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
57
|
-
- Codex CLI: $review-code {task-ref}
|
|
57
|
+
{next-step-commands}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
仅修正暂存的完整命令:
|
|
61
61
|
|
|
62
|
+
使用 `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
63
|
+
|
|
62
64
|
```text
|
|
63
65
|
下一步 - 修正暂存后重新提交:
|
|
64
|
-
|
|
65
|
-
- Gemini CLI: /{{project}}:commit {task-ref}
|
|
66
|
-
- Codex CLI: $commit {task-ref}
|
|
66
|
+
{next-step-commands}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
在决定下一步之前,先确认:
|
|
@@ -97,34 +97,30 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
97
97
|
|
|
98
98
|
`prFlow="disabled"` → 单选「直接完成」:
|
|
99
99
|
|
|
100
|
+
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
101
|
+
|
|
100
102
|
```text
|
|
101
103
|
下一步 - 完成并归档任务:
|
|
102
|
-
|
|
103
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
104
|
-
- Codex CLI: $complete-task {task-ref}
|
|
104
|
+
{next-step-commands}
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
`prFlow="required"` → 单选「走 PR 流程」:
|
|
108
108
|
|
|
109
|
+
使用 `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
110
|
+
|
|
109
111
|
```text
|
|
110
112
|
下一步 - 创建 Pull Request:
|
|
111
|
-
|
|
112
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
113
|
-
- Codex CLI: $create-pr {task-ref}
|
|
113
|
+
{next-step-commands}
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
字段缺省 →
|
|
116
|
+
字段缺省 → 二选一。选定路径后只运行一次 helper:
|
|
117
|
+
|
|
118
|
+
- 走 PR 流程:`agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`
|
|
119
|
+
- 直接完成:`agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`
|
|
117
120
|
|
|
118
121
|
```text
|
|
119
|
-
下一步 -
|
|
120
|
-
|
|
121
|
-
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
122
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
123
|
-
- Codex CLI: $create-pr {task-ref}
|
|
124
|
-
- 直接完成(无 PR):
|
|
125
|
-
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
126
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
127
|
-
- Codex CLI: $complete-task {task-ref}
|
|
122
|
+
下一步 - {已选路径}:
|
|
123
|
+
{next-step-commands}
|
|
128
124
|
```
|
|
129
125
|
|
|
130
126
|
### 场景 2:还有后续工作
|
|
@@ -145,11 +141,11 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
145
141
|
|
|
146
142
|
必带下一步命令:
|
|
147
143
|
|
|
144
|
+
使用 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
145
|
+
|
|
148
146
|
```text
|
|
149
147
|
下一步 - 代码审查:
|
|
150
|
-
|
|
151
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
152
|
-
- Codex CLI: $review-code {task-ref}
|
|
148
|
+
{next-step-commands}
|
|
153
149
|
```
|
|
154
150
|
|
|
155
151
|
> 注意:上述场景之外,只要 `task.md` 中存在有效 `pr_number`,commit 技能必须先按 `reference/pr-summary-sync.md` 同步 PR 摘要,再进入完成校验。
|
|
@@ -7,6 +7,8 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Complete Manual Validation
|
|
10
|
+
> `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
## Boundary / Critical Rules
|
|
12
14
|
|
|
@@ -35,7 +37,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
35
37
|
|
|
36
38
|
## Step Start: Write the started Marker
|
|
37
39
|
|
|
38
|
-
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} manual-validation.started --agent {agent}` and record the returned `artifactContext`.
|
|
40
|
+
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} manual-validation.started --agent {standard-agent-token}` and record the returned `artifactContext`.
|
|
39
41
|
|
|
40
42
|
## Steps
|
|
41
43
|
|
|
@@ -83,9 +85,9 @@ Before this step, read `reference/report-template.md`. Create `{manual-validatio
|
|
|
83
85
|
|
|
84
86
|
### 6. Update task.md
|
|
85
87
|
|
|
86
|
-
Run `agent-infra-internal task-event {task-id} manual-validation.completed --agent {agent} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`. The core keeps `current_step` unchanged while atomically recording the implementation-notes link, metadata, and done log.
|
|
88
|
+
Run `agent-infra-internal task-event {task-id} manual-validation.completed --agent {standard-agent-token} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`. The core keeps `current_step` unchanged while atomically recording the implementation-notes link, metadata, and done log.
|
|
87
89
|
|
|
88
|
-
If the task has a valid `issue_number`, run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`, then `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {manual-validation-artifact} --agent {agent}`.
|
|
90
|
+
If the task has a valid `issue_number`, run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`, then `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {manual-validation-artifact} --agent {standard-agent-token}`.
|
|
89
91
|
|
|
90
92
|
### 7. Verification Gate
|
|
91
93
|
|
|
@@ -106,7 +108,7 @@ Report:
|
|
|
106
108
|
- Artifact path
|
|
107
109
|
- PR summary sync result
|
|
108
110
|
- Current verification output
|
|
109
|
-
- Suggested next step:
|
|
111
|
+
- Suggested next step: enter the final closing flow and run /complete-task {task-ref}
|
|
110
112
|
|
|
111
113
|
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.
|
|
112
114
|
|
|
@@ -7,6 +7,8 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 完成人工验证
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
## 行为边界 / 关键规则
|
|
12
14
|
|
|
@@ -35,7 +37,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
35
37
|
|
|
36
38
|
## 步骤开始:声明 started 事件
|
|
37
39
|
|
|
38
|
-
确认前置条件和产物上下文后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} manual-validation.started --agent {agent}`,并以返回的 `artifactContext` 记录本轮身份。
|
|
40
|
+
确认前置条件和产物上下文后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} manual-validation.started --agent {standard-agent-token}`,并以返回的 `artifactContext` 记录本轮身份。
|
|
39
41
|
|
|
40
42
|
## 执行步骤
|
|
41
43
|
|
|
@@ -83,9 +85,9 @@ complete-manual-validation {task-ref} [{pr-ref}] {verification-summary}
|
|
|
83
85
|
|
|
84
86
|
### 6. 更新 task.md
|
|
85
87
|
|
|
86
|
-
执行 `agent-infra-internal task-event {task-id} manual-validation.completed --agent {agent} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`,由核心在保持 `current_step` 不变的同时原子登记实现备注链接、时间/版本和完成日志。
|
|
88
|
+
执行 `agent-infra-internal task-event {task-id} manual-validation.completed --agent {standard-agent-token} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`,由核心在保持 `current_step` 不变的同时原子登记实现备注链接、时间/版本和完成日志。
|
|
87
89
|
|
|
88
|
-
如任务存在有效 `issue_number`,调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`,再调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {manual-validation-artifact} --agent {agent}`。
|
|
90
|
+
如任务存在有效 `issue_number`,调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`,再调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {manual-validation-artifact} --agent {standard-agent-token}`。
|
|
89
91
|
|
|
90
92
|
### 7. 完成校验
|
|
91
93
|
|
|
@@ -106,7 +108,7 @@ agent-infra-internal task-verify {task-id} manual-validation.completed --artifac
|
|
|
106
108
|
- 产物路径
|
|
107
109
|
- PR 摘要同步结果
|
|
108
110
|
- 当次完成校验输出
|
|
109
|
-
-
|
|
111
|
+
- 下一步建议:进入最终收尾流程,运行 /complete-task {task-ref}
|
|
110
112
|
|
|
111
113
|
渲染最终输出前,先读取 `.agents/rules/next-step-output.md`,并在绝对最后一行追加 `Completed at: YYYY-MM-DD HH:mm:ss`。
|
|
112
114
|
|
|
@@ -10,7 +10,7 @@ Follow `.agents/rules/pr-sync.md` for the shared summary structure and failure s
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
13
|
-
--agent {agent} --body-file {summary-body-file}
|
|
13
|
+
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The core owns marker/HEAD wrapping, pagination, and in-place reconciliation. If context says no manual validation is required, stop without marking it passed.
|
package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
13
|
-
--agent {agent} --body-file {summary-body-file}
|
|
13
|
+
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
marker、当前 HEAD、分页查找和原地更新由 core 负责。若当前 context 表明无需人工校验,则停止并返回 `summary failed: no manual validation required`,不误标通过。
|
|
@@ -7,11 +7,14 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Complete Task
|
|
10
|
+
> `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
## Boundary / Critical Rules
|
|
12
14
|
|
|
13
15
|
- This command updates task metadata AND physically moves the task directory
|
|
14
16
|
- Do not move a task that has incomplete workflow steps unless forced
|
|
17
|
+
- The entry point accepts optional `--external-pr <N>` only to select among ambiguous external-delivery candidates; it never bypasses identity or platform gates
|
|
15
18
|
|
|
16
19
|
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
17
20
|
|
|
@@ -54,6 +57,16 @@ Scenario A is the normal active-task path. Scenario B `finalization-retry` retri
|
|
|
54
57
|
|
|
55
58
|
### 2. Verify Completion Prerequisites (Failure Must Stop)
|
|
56
59
|
|
|
60
|
+
Read `reference/external-delivery.md`, then run for the active task:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
agent-infra-internal platform-pr resolve-external {task-id} --agent {standard-agent-token} [--pr {external-pr}]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- `mode=external`: only this invocation's typed `authorization` and `selected` fields authorize and identify external delivery; continue through every existing hard gate below.
|
|
67
|
+
- `mode=normal`: use the existing local lifecycle prerequisites; historical `pr_number` / `pr_status` values do not authorize external delivery.
|
|
68
|
+
- `status=failed|blocked`: stop immediately and show the stable error; `--force` cannot bypass it.
|
|
69
|
+
|
|
57
70
|
**Gate read (project-level PR flow policy)**: Before running this step, read `.agents/.airc.json`'s `prFlow` field (three states: field absent = recommend PR by default, skipping allowed; `"required"` = PR mandatory; `"disabled"` = no PR flow), and `pr_status` from `task.md` frontmatter (`pending` / `created` / `skipped`).
|
|
58
71
|
|
|
59
72
|
**PR dimension decision (evaluate the `prFlow` strong constraint FIRST, then `pr_status`)**:
|
|
@@ -87,7 +100,8 @@ Before marking complete, verify ALL of these:
|
|
|
87
100
|
- [ ] Code has been reviewed (`review-code.md` or `review-code-r{N}.md` exists, and the latest review verdict is Approved; or review was done externally)
|
|
88
101
|
- [ ] Code has been committed (no uncommitted changes related to this task)
|
|
89
102
|
- [ ] Tests are passing
|
|
90
|
-
- [ ] The disagreement ledger has no unclosed disagreements or un-re-reviewed post-review commits; local HEAD, `last_reviewed_commit`, and PR head either match strictly or a merged squash has complete platform
|
|
103
|
+
- [ ] The disagreement ledger has no unclosed disagreements or un-re-reviewed post-review commits; on a bound-PR path local HEAD, `last_reviewed_commit`, and PR head either match strictly, or a merged squash has complete platform snapshot and remote Git equivalence evidence and current Git credentials can read the evidence refs; without a valid PR, a single-parent local rewrite is content-equivalent to `last_reviewed_commit` and has no later protected commits
|
|
104
|
+
- [ ] Manual validation items are complete (when the latest review-code's Manual validation count is > 0, a passed manual-validation artifact and its completion record must exist, and that completion record must sit after the latest review-code; skipped when the count is 0 or there are no pending items)
|
|
91
105
|
|
|
92
106
|
> **⚠️ Prerequisite Branch Check — you must decide whether to continue or stop before proceeding:**
|
|
93
107
|
>
|
|
@@ -124,9 +138,9 @@ Check whether task.md has a valid `issue_number`. If it does not, skip this step
|
|
|
124
138
|
|
|
125
139
|
When an `issue_number` exists, execute in this exact order:
|
|
126
140
|
|
|
127
|
-
1.
|
|
128
|
-
2. Run `agent-infra-internal platform-issue sync {task-id} --agent {agent} --requirements --fields`.
|
|
129
|
-
3. Write the business summary to a temporary file and run `agent-infra-internal platform-comment sync {task-id} --kind summary --body-file {path} --agent {agent}`.
|
|
141
|
+
1. Run `agent-infra-internal platform-comment backfill {task-id} --agent {standard-agent-token}` so core publishes only the completion canonical inventory in fixed order and resolves matching historical warnings only after full success.
|
|
142
|
+
2. Run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --requirements --fields`.
|
|
143
|
+
3. Write the business summary to a temporary file and run `agent-infra-internal platform-comment sync {task-id} --kind summary --body-file {path} --agent {standard-agent-token}`.
|
|
130
144
|
|
|
131
145
|
Do not sync the task comment here; it requires the terminal task.md written by lifecycle. Do not set a `status:` label; platform automation clears status labels after the Issue closes.
|
|
132
146
|
|
|
@@ -146,14 +160,14 @@ After platform writes succeed and before moving the directory or releasing the s
|
|
|
146
160
|
agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
147
161
|
```
|
|
148
162
|
|
|
149
|
-
This event runs `review-ledger`, `post-review-commit`, then `platform-sync-preflight`. On any non-zero exit (fail/blocked), keep the task active, derive the stable code/target from the gate result, record it through `task-warning ... add --step complete-task ...`, and stop. For a review/head mismatch, rerun `commit` or `review-code`; never fall back to the review baseline.
|
|
163
|
+
This event runs `review-ledger`, `manual-validation`, `post-review-commit`, then `platform-sync-preflight`. On any non-zero exit (fail/blocked), keep the task active, derive the stable code/target from the gate result, record it through `task-warning ... add --step complete-task ...`, and stop. For a review/head mismatch, rerun `commit` or `review-code`; never fall back to the review baseline.
|
|
150
164
|
|
|
151
|
-
`--force` does not lift this hard gate: close ledger disagreements; re-review or exempt post-review commits,
|
|
165
|
+
`--force` does not lift this hard gate: close ledger disagreements; re-review or exempt post-review commits, use the platform adapter's authoritative snapshot and remote refs for the bound change request (PR/MR) to prove a content-equivalent single-parent squash merge in an isolated temporary repository, or, without a valid change request, prove from local Git objects that the only protected commit is a content-equivalent single-parent rewrite with no later protected commits; then pass platform preflight. An unsupported adapter capability, missing required platform facts, Git objects, topology, or content evidence, or current Git credentials that cannot read the remote evidence refs fails closed. The platform adapter supplies normalized required-checks state, which remains enforced before merge by branch protection / rulesets and the `review-code` / `watch-pr` routes.
|
|
152
166
|
|
|
153
167
|
### 6. Apply the Local Lifecycle Intent and Verify the Move
|
|
154
168
|
|
|
155
169
|
```bash
|
|
156
|
-
agent-infra-internal task-lifecycle {task-id} complete --agent {agent}
|
|
170
|
+
agent-infra-internal task-lifecycle {task-id} complete --agent {standard-agent-token}
|
|
157
171
|
```
|
|
158
172
|
|
|
159
173
|
Only `status=applied|no-op` means local completion succeeded. On `status=failed`, show the structured error and recovery steps and retry the same intent; do not claim completion or hand-repair partial state.
|
|
@@ -169,7 +183,7 @@ Confirm the task directory was successfully moved.
|
|
|
169
183
|
Both Scenario A and Scenario B `finalization-retry` execute this step from the completed directory. If a valid `issue_number` exists, first run:
|
|
170
184
|
|
|
171
185
|
```bash
|
|
172
|
-
agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}
|
|
186
|
+
agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}
|
|
173
187
|
```
|
|
174
188
|
|
|
175
189
|
If this call fails, the task is already archived and `task-warning` cannot accept it. Keep the task completed and stop. After fixing the network or platform issue, rerun complete-task; Step 1 will enter `finalization-retry` and repeat only this step.
|
|
@@ -232,6 +246,7 @@ Completed at: {completion-time}
|
|
|
232
246
|
- Code is committed but not reviewed
|
|
233
247
|
- Review found blockers that haven't been fixed
|
|
234
248
|
- PR is created but not merged
|
|
249
|
+
- Manual validation items are incomplete
|
|
235
250
|
|
|
236
251
|
2. **Rollback**: If a task was incorrectly moved:
|
|
237
252
|
```bash
|
|
@@ -7,11 +7,14 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 完成任务
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
## 行为边界 / 关键规则
|
|
12
14
|
|
|
13
15
|
- 本命令更新任务元数据并物理移动任务目录
|
|
14
16
|
- 除非强制执行,不要转移有未完成工作流步骤的任务
|
|
17
|
+
- 入口接受可选 `--external-pr <N>`;仅用于外部交付候选歧义时的显式选择,不绕过身份或平台门禁
|
|
15
18
|
|
|
16
19
|
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
17
20
|
|
|
@@ -53,6 +56,16 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
53
56
|
|
|
54
57
|
### 2. 验证完成前置条件(未满足则必须停止)
|
|
55
58
|
|
|
59
|
+
先读取 `reference/external-delivery.md`,然后在 active 任务上调用:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
agent-infra-internal platform-pr resolve-external {task-id} --agent {standard-agent-token} [--pr {external-pr}]
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- `mode=external`:只以本次 typed result 的 `authorization` 和 `selected` 作为外部交付授权与绑定身份,继续本步骤的既有硬门禁。
|
|
66
|
+
- `mode=normal`:走现有本地生命周期前置条件;历史 `pr_number` / `pr_status` 不构成外部授权。
|
|
67
|
+
- `status=failed|blocked`:立即停止并展示稳定错误;`--force` 不得绕过。
|
|
68
|
+
|
|
56
69
|
**门控读取(项目级 PR 流程策略)**:在执行本步骤前,读取 `.agents/.airc.json` 的 `prFlow` 字段(三态:字段缺省 = 默认推荐 PR、允许跳过;`"required"` = 强制 PR;`"disabled"` = 强制无 PR),以及 `task.md` frontmatter 的 `pr_status`(`pending` / `created` / `skipped`)。
|
|
57
70
|
|
|
58
71
|
**PR 维度判定(先判 `prFlow` 强约束,后看 `pr_status`)**:
|
|
@@ -86,7 +99,8 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
86
99
|
- [ ] 代码已审查(`review-code.md` 或 `review-code-r{N}.md` 存在,且最新审查结论为 Approved;或已在外部完成审查)
|
|
87
100
|
- [ ] 代码已提交(没有与此任务相关的未提交变更)
|
|
88
101
|
- [ ] 测试通过
|
|
89
|
-
- [ ] 审查分歧账本无未关闭分歧、无未复审的 post-review
|
|
102
|
+
- [ ] 审查分歧账本无未关闭分歧、无未复审的 post-review 提交;绑定 PR 路径中本地 HEAD、`last_reviewed_commit`、PR head 严格一致,或已合并 squash 的平台快照与远端 Git 等价证据完整且当前 Git 凭据可读取证据 refs;无有效 PR 路径中本地单父重写与 `last_reviewed_commit` 内容等价且之后无受保护提交
|
|
103
|
+
- [ ] 人工校验项已完成(最新 review-code 的 Manual validation 计数 > 0 时,须存在通过校验的 manual-validation 产物及其完成记录,且该完成记录位于最新 review-code 之后;计数为 0 或无未决项时跳过)
|
|
90
104
|
|
|
91
105
|
> **⚠️ 前置条件分支判断 — 你必须先判断“继续”还是“停止”:**
|
|
92
106
|
>
|
|
@@ -123,9 +137,9 @@ Please complete the missing steps first, or use --force to override.
|
|
|
123
137
|
|
|
124
138
|
如果存在有效的 `issue_number`,严格按以下顺序执行:
|
|
125
139
|
|
|
126
|
-
1.
|
|
127
|
-
2. 调用 `agent-infra-internal platform-issue sync {task-id} --agent {agent} --requirements --fields`。
|
|
128
|
-
3. 把业务摘要写入临时文件,并调用 `agent-infra-internal platform-comment sync {task-id} --kind summary --body-file {path} --agent {agent}`。
|
|
140
|
+
1. 调用 `agent-infra-internal platform-comment backfill {task-id} --agent {standard-agent-token}`,由 core 仅按 completion canonical inventory 固定顺序补发产物并在全部成功后精确恢复目标历史告警。
|
|
141
|
+
2. 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --requirements --fields`。
|
|
142
|
+
3. 把业务摘要写入临时文件,并调用 `agent-infra-internal platform-comment sync {task-id} --kind summary --body-file {path} --agent {standard-agent-token}`。
|
|
129
143
|
|
|
130
144
|
不要在本步骤同步 task 评论;它依赖 lifecycle 写入后的完整终态 task.md。不要设置 `status:` label,平台自动化应在 Issue 关闭后清理状态标签。
|
|
131
145
|
|
|
@@ -145,14 +159,14 @@ agent-infra-internal task-warning {task-id} add --step complete-task --severity
|
|
|
145
159
|
agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
146
160
|
```
|
|
147
161
|
|
|
148
|
-
该事件依次执行 `review-ledger`、`post-review-commit`、`platform-sync-preflight`。任一退出码非 0(fail/blocked)时,任务必须继续留在 active;从 gate 结果取稳定 code/target,通过 `task-warning ... add --step complete-task ...` 落账后停止。若审查基线或 head 不一致,必须先重新 `commit` / `review-code`;不得回退审查基线。
|
|
162
|
+
该事件依次执行 `review-ledger`、`manual-validation`、`post-review-commit`、`platform-sync-preflight`。任一退出码非 0(fail/blocked)时,任务必须继续留在 active;从 gate 结果取稳定 code/target,通过 `task-warning ... add --step complete-task ...` 落账后停止。若审查基线或 head 不一致,必须先重新 `commit` / `review-code`;不得回退审查基线。
|
|
149
163
|
|
|
150
|
-
`--force`
|
|
164
|
+
`--force` 不解除本硬门禁:未关闭分歧必须先在账本闭合,未复审提交必须重新审查、具备有效豁免,或由平台适配器为绑定的变更请求(PR/MR)提供权威合并快照与远端 refs,并在隔离临时仓库中证明单父 squash merge 等价,或在无有效变更请求时由本地 Git 对象证明唯一受保护提交是内容等价的单父重写且之后无受保护提交;平台 preflight 必须通过。适配器不支持所需能力,平台事实、Git 对象、拓扑、内容证据缺失,或当前 Git 凭据不能读取远端证据 refs 时 fail closed。required checks 由平台适配器提供规范化状态,并在合并前通过分支保护 / ruleset 以及 `review-code` / `watch-pr` 路由承担。
|
|
151
165
|
|
|
152
166
|
### 6. 执行本地生命周期意图并验证转移
|
|
153
167
|
|
|
154
168
|
```bash
|
|
155
|
-
agent-infra-internal task-lifecycle {task-id} complete --agent {agent}
|
|
169
|
+
agent-infra-internal task-lifecycle {task-id} complete --agent {standard-agent-token}
|
|
156
170
|
```
|
|
157
171
|
|
|
158
172
|
仅 `status=applied|no-op` 视为本地完成。`status=failed` 时展示 `error` 与 completed/pending steps,以同一 intent 重试;不得宣称完成或手工补写局部状态。
|
|
@@ -168,7 +182,7 @@ ls .agents/workspace/completed/{task-id}/task.md
|
|
|
168
182
|
场景 A 与场景 B `finalization-retry` 都从 completed 目录执行本步骤。若存在有效的 `issue_number`,先调用:
|
|
169
183
|
|
|
170
184
|
```bash
|
|
171
|
-
agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}
|
|
185
|
+
agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}
|
|
172
186
|
```
|
|
173
187
|
|
|
174
188
|
该调用失败时任务已归档,不能调用只接受 active 任务的 `task-warning`;保留 completed 状态并停止。修复网络或平台问题后重跑 complete-task,会由步骤 1 进入 `finalization-retry`,只重复本步骤。
|
|
@@ -231,6 +245,7 @@ Completed at: {completion-time}
|
|
|
231
245
|
- 代码已提交但未审查
|
|
232
246
|
- 审查发现阻塞项但未修复
|
|
233
247
|
- PR 已创建但未合并
|
|
248
|
+
- 人工校验项未完成
|
|
234
249
|
|
|
235
250
|
2. **回滚**:如果任务被错误转移:
|
|
236
251
|
```bash
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# External PR Delivery
|
|
2
|
+
|
|
3
|
+
This scenario applies only to an active task whose completion canonical inventory is empty because an already-merged external PR delivered the implementation.
|
|
4
|
+
|
|
5
|
+
## Typed State Machine
|
|
6
|
+
|
|
7
|
+
Run `agent-infra-internal platform-pr resolve-external {task-id} --agent {agent} [--pr {N}]`. Core checks the completion inventory first. A non-empty inventory returns `mode=normal`, and supplying `--pr` then fails. An empty inventory requires a positive `issue_number`; otherwise core returns `EXTERNAL_DELIVERY_ISSUE_REQUIRED`.
|
|
8
|
+
|
|
9
|
+
The platform adapter supplies authoritative Issue closing change requests across all pages. Only candidates with a matching base repository, complete identity, and merge evidence are eligible. One candidate is selected automatically; ambiguity, conflicts, and missing evidence fail closed. `--pr` may only select an authoritative eligible closing candidate and cannot bypass repository, Issue, merge, or identity validation.
|
|
10
|
+
|
|
11
|
+
## Authorization and Persistent Audit
|
|
12
|
+
|
|
13
|
+
Only the current typed result's `mode=external`, `authorization`, and `selected` fields control the machine branch. `pr_status: created` is a compatibility shim for existing verifiers: it means a verifiable PR is bound, not that this task created it, and it cannot authorize lifecycle skipping by itself.
|
|
14
|
+
|
|
15
|
+
A successful bind atomically writes PR fields and appends a `Bind External PR` Activity Log entry containing the authorization source, Issue, PR URL/number, base/head repository/ref/SHA, merge time, and merge commit. Replaying identical complete evidence is a no-op; an existing same-number binding without the signature adds it once; number or identity changes fail. The PR create path must never run.
|
|
16
|
+
|
|
17
|
+
External mode still passes review-ledger, manual-validation, post-review-commit, platform-sync, preflight, and terminal gates. Without a canonical review-code artifact, only existing verifier N/A rules apply. `--force` does not disable any hard gate.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# 外部 PR 交付
|
|
2
|
+
|
|
3
|
+
本场景只适用于 completion canonical inventory 为空、实现实际由已合并的外部 PR 交付的 active 任务。
|
|
4
|
+
|
|
5
|
+
## Typed 状态机
|
|
6
|
+
|
|
7
|
+
调用 `agent-infra-internal platform-pr resolve-external {task-id} --agent {agent} [--pr {N}]`。core 先检查 completion inventory;非空时返回 `mode=normal`,且显式 `--pr` 会失败。空 inventory 必须有正整数 `issue_number`,否则返回 `EXTERNAL_DELIVERY_ISSUE_REQUIRED`。
|
|
8
|
+
|
|
9
|
+
core 通过平台 adapter 读取 Issue 的权威 closing change requests,穷尽分页后只把 base 仓库匹配任务仓库且已经合并、身份字段完整的候选视为 eligible。唯一候选自动选择;多候选、身份冲突或证据缺失均 fail closed。`--pr` 只能从权威 closing eligible 集合中显式选择,不能绕过仓库、Issue、合并或身份校验。
|
|
10
|
+
|
|
11
|
+
## 授权与持久审计
|
|
12
|
+
|
|
13
|
+
当次调用只以 typed result 的 `mode=external`、`authorization` 和 `selected` 为机器分支依据。`pr_status: created` 只是现有 verifier 的兼容 shim,表示任务已绑定可验证的 PR;它既不表示 PR 由本任务创建,也不能单独授权跳过 lifecycle。
|
|
14
|
+
|
|
15
|
+
成功绑定会原子写入 PR 字段并追加 `Bind External PR` Activity Log,记录授权来源、Issue、PR URL/编号、base/head repository/ref/SHA、合并时间和 merge commit。相同完整证据重试为 no-op;已有同号但缺审计签名时补写一次;编号或身份变化失败。不得调用 PR create 路径。
|
|
16
|
+
|
|
17
|
+
外部模式仍须通过 review ledger、manual validation、post-review commit、平台同步、preflight 与终态校验。无 canonical review-code 时仅沿用 verifier 已定义的 N/A 规则;`--force` 不解除任何硬门禁。
|
|
@@ -6,6 +6,8 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Create Pull Request
|
|
9
|
+
> `--agent` values follow the "Collaborator Token Specification" in `.agents/rules/task-management.md`: standard AI short tokens (`claude`/`codex`/`antigravity`/`opencode`/`cursor`), long-name normalization (`claude-code`->`claude`, `antigravity-cli`->`antigravity`), or the `human` manual exception.
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
Create a Pull Request and, when task-related, sync the essential metadata and reviewer summary immediately.
|
|
11
13
|
|
|
@@ -31,12 +33,12 @@ Branch on the result:
|
|
|
31
33
|
- absent / `"required"` -> continue to Step 1 below
|
|
32
34
|
- `"disabled"` -> output the message below and **stop immediately**. Do not run any subsequent numbered step, do not trigger any PR-creation command, do not modify `pr_number` / `pr_status` in `task.md`, and do not publish a PR summary comment:
|
|
33
35
|
|
|
36
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
37
|
+
|
|
34
38
|
```
|
|
35
39
|
This project does not enable the PR flow (`.agents/.airc.json` sets `prFlow: "disabled"`).
|
|
36
40
|
No Pull Request is required; run instead:
|
|
37
|
-
|
|
38
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
39
|
-
- Codex CLI: $complete-task {task-ref}
|
|
41
|
+
{next-step-commands}
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
### 1. Parse Command Arguments
|
|
@@ -72,7 +74,7 @@ If `{task-id}` is available and the related task provides `issue_number`, keep `
|
|
|
72
74
|
|
|
73
75
|
### 6. Sync PR Metadata
|
|
74
76
|
|
|
75
|
-
Run `agent-infra-internal platform-pr sync {task-id} --agent {agent} --metadata --closing-issue`. The core copies type / `in:` labels, assignee, and a specific milestone from the Issue and maintains the closing association. Permission-bound items degrade independently, and the Issue is never updated in reverse.
|
|
77
|
+
Run `agent-infra-internal platform-pr sync {task-id} --agent {standard-agent-token} --metadata --closing-issue`. The core copies type / `in:` labels, assignee, and a specific milestone from the Issue and maintains the closing association. Permission-bound items degrade independently, and the Issue is never updated in reverse.
|
|
76
78
|
|
|
77
79
|
### 7. Publish the Review Summary
|
|
78
80
|
|
|
@@ -105,24 +107,24 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
105
107
|
|
|
106
108
|
> Execute this step only after the verification gate passes.
|
|
107
109
|
|
|
108
|
-
>
|
|
110
|
+
> Before rendering next steps, read `.agents/rules/next-step-output.md`, invoke the shared helper only for the selected scenario, and insert its stdout at `{next-step-commands}`.
|
|
109
111
|
|
|
110
112
|
Explain the created PR URL, summarize metadata sync and summary-comment results, and recommend watching the PR's checks next (render `{task-ref}` as the short id `NN` per `.agents/rules/next-step-output.md`):
|
|
111
113
|
|
|
114
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}`.
|
|
115
|
+
|
|
112
116
|
```
|
|
113
117
|
Next step - Watch PR checks (auto self-heal until required checks are green):
|
|
114
|
-
|
|
115
|
-
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
116
|
-
- Codex CLI: $watch-pr {task-ref}
|
|
118
|
+
{next-step-commands}
|
|
117
119
|
```
|
|
118
120
|
|
|
119
121
|
Alternatively, to skip active monitoring and attempt completion immediately, use `complete-task`; its required-checks hard gate still fails closed for pending/failed checks or head mismatch:
|
|
120
122
|
|
|
123
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
124
|
+
|
|
121
125
|
```
|
|
122
126
|
Next step (alternative) - Skip active monitoring and attempt completion:
|
|
123
|
-
|
|
124
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
125
|
-
- Codex CLI: $complete-task {task-ref}
|
|
127
|
+
{next-step-commands}
|
|
126
128
|
```
|
|
127
129
|
|
|
128
130
|
`watch-pr` is the primary path. The alternative `complete-task` block skips active polling only; it never skips required checks and does not guarantee immediate archival.
|