@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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# 通用检视方法
|
|
2
|
+
|
|
3
|
+
本规则定义 `analysis`、`plan` 和 `code` 三个审查阶段共用的轻量检视协议。阶段专属检查项留在各 skill 的 `reference/review-criteria.md`;finding 状态机、人工裁决和账本写入继续以 [review-handshake.md](review-handshake.md) 为准;风险镜头只承载命中某类风险后必须加载的专项 reference。
|
|
4
|
+
|
|
5
|
+
## 职责边界
|
|
6
|
+
|
|
7
|
+
- 本规则规定审查顺序、证据形状和完成条件,不复制阶段 checklist。
|
|
8
|
+
- 风险镜头由可观察证据触发;命中后必须读取全部对应 reference,并在报告留证。
|
|
9
|
+
- 自动化检查提供事实,reviewer 负责完整性、影响、严重度、置信度和反证等语义判断。
|
|
10
|
+
- 报告结构证明审查声明可追溯,不等于自动证明语义判断正确。
|
|
11
|
+
|
|
12
|
+
## Readiness
|
|
13
|
+
|
|
14
|
+
形成候选 finding 前必须确认:
|
|
15
|
+
|
|
16
|
+
1. 任务、输入 artifact、上游来源和审查范围已解析且可读。
|
|
17
|
+
2. skill 要求的状态快照、差异或其他事实证据已捕获。
|
|
18
|
+
3. 本轮实际审查的 artifact、基线和上下文边界可在报告中准确标识。
|
|
19
|
+
|
|
20
|
+
任一前置项缺失时,不得给出通过结论;按所属 skill 的阻塞或失败路径处理。
|
|
21
|
+
|
|
22
|
+
## 多遍检视协议
|
|
23
|
+
|
|
24
|
+
按顺序执行以下五遍;每遍都在报告的检视覆盖表中记录范围、证据、结果与缺口/假设。
|
|
25
|
+
|
|
26
|
+
1. **Pass 1 — 原始证据**:先读任务来源、上游 artifact、变更和测试等原始证据,独立形成候选问题,避免被执行方摘要锚定。
|
|
27
|
+
2. **Pass 2 — 追踪与边界**:建立来源—需求—方案—实现—测试追踪,识别遗漏、断链和意外范围扩张。
|
|
28
|
+
3. **Pass 3 — 风险镜头**:依据完整上下文逐项判断注册表触发器,加载所有命中的专项 reference,并记录命中证据与结果。
|
|
29
|
+
4. **Pass 4 — 反证**:主动寻找能推翻或降级每个候选 finding 的证据,并检查放行结论可能失败的反例。
|
|
30
|
+
5. **Pass 5 — 归类与收敛**:将问题归为 finding、manual-validation 或 advisory,核对证据契约、账本意图、未验证假设和 verdict。
|
|
31
|
+
|
|
32
|
+
## 风险镜头注册表
|
|
33
|
+
|
|
34
|
+
注册行使用稳定字段:`lens_id` 标识镜头,`stages` 限定阶段,`observable_trigger` 给出可观察触发条件,`required_reference` 是命中后必读路径,`report_evidence` 规定报告留证。
|
|
35
|
+
|
|
36
|
+
| lens_id | stages | observable_trigger | required_reference | report_evidence |
|
|
37
|
+
|---------|--------|--------------------|--------------------|-----------------|
|
|
38
|
+
| documentation-antipatterns | code | 完整变更上下文触及描述当前行为的 Markdown、规则、skill、CLI 帮助或用户文档 | `.agents/skills/review-code/reference/documentation-antipatterns.md` | 记录触发文件、`loaded=yes` 与检视结果 |
|
|
39
|
+
| testing-discipline | code | 完整变更上下文触及测试、fixture、snapshot 或测试 helper | `.agents/rules/testing-discipline.md` | 记录触发文件、`loaded=yes` 与测试纪律结论 |
|
|
40
|
+
| security-risks | code | 认证授权、非可信输入、敏感数据、凭据、加密、依赖或系统边界发生变化 | `.agents/skills/review-code/reference/security-risks.md` | 记录安全边界变化、`loaded=yes` 与检视结果 |
|
|
41
|
+
| migration-risks | code | 持久化格式、schema、配置/frontmatter、兼容读取或迁移/回滚发生变化 | `.agents/skills/review-code/reference/migration-risks.md` | 记录兼容或迁移触发证据、`loaded=yes` 与检视结果 |
|
|
42
|
+
| concurrency-risks | code | 异步协调、共享状态、锁、重试、幂等、竞态、取消或超时发生变化 | `.agents/skills/review-code/reference/concurrency-risks.md` | 记录并发触发路径、`loaded=yes` 与检视结果 |
|
|
43
|
+
| cross-platform-risks | code | OS 分支、路径、shell、权限、符号链接、换行、信号或跨平台行为发生变化 | `.agents/skills/review-code/reference/cross-platform-risks.md` | 记录平台触发证据、`loaded=yes` 与检视结果 |
|
|
44
|
+
|
|
45
|
+
未命中镜头也必须记录可复核的未命中证据。`loaded` 只使用 `yes`、`no`、`not-applicable`;命中但未加载时不得给出通过结论。
|
|
46
|
+
|
|
47
|
+
## 自动化与语义判断
|
|
48
|
+
|
|
49
|
+
| 来源 | 可支持的事实 | 不可替代的语义判断 |
|
|
50
|
+
|------|--------------|--------------------|
|
|
51
|
+
| snapshot、diff、link、test、artifact gate | 文件、范围、命令结果、引用存在、章节存在 | 需求是否完整、设计是否合理、实现是否正确 |
|
|
52
|
+
| 追踪矩阵 | 显式映射及可见缺口 | 映射是否充分、缺口影响和优先级 |
|
|
53
|
+
| 风险镜头记录 | 触发证据、加载状态、专项结果入口 | 风险是否可接受、finding 严重度与置信度 |
|
|
54
|
+
|
|
55
|
+
自动化结果与语义结论冲突时,报告必须分别记录事实与推理,不得把结构 gate 的通过写成语义完整性的证明。
|
|
56
|
+
|
|
57
|
+
## 上下文覆盖与追踪契约
|
|
58
|
+
|
|
59
|
+
报告必须包含两张覆盖表:
|
|
60
|
+
|
|
61
|
+
| pass_id | scope | evidence | result | gaps_or_assumptions |
|
|
62
|
+
|---------|-------|----------|--------|---------------------|
|
|
63
|
+
| pass-1..5 | 本遍实际覆盖范围 | 可定位的 artifact、文件、命令或行号 | 发现或结论 | 未覆盖项、缺口或假设 |
|
|
64
|
+
|
|
65
|
+
| lens_id | trigger_evidence | loaded | result |
|
|
66
|
+
|---------|------------------|--------|--------|
|
|
67
|
+
| 注册表 token | 命中或未命中的可复核证据 | yes / no / not-applicable | 专项检视结论 |
|
|
68
|
+
|
|
69
|
+
并包含统一追踪矩阵:
|
|
70
|
+
|
|
71
|
+
| source_id | upstream | reviewed_target | verification | status_or_gap |
|
|
72
|
+
|-----------|----------|-----------------|--------------|---------------|
|
|
73
|
+
| 稳定来源标识 | 上游需求、决策或步骤 | 本阶段被审对象 | 自动化或人工证据 | covered / gap 及影响 |
|
|
74
|
+
|
|
75
|
+
analysis 阶段追踪来源到需求、验收、影响和风险;plan 阶段追踪已批准需求到设计决策、步骤和测试策略;code 阶段追踪需求/方案到 diff 与自动化测试或人工校验。
|
|
76
|
+
|
|
77
|
+
## Finding 证据契约
|
|
78
|
+
|
|
79
|
+
每个 blocker 或 major finding 必须包含:
|
|
80
|
+
|
|
81
|
+
1. **场景**:触发问题的前置条件和路径。
|
|
82
|
+
2. **影响**:对正确性、安全、交付或验收的具体后果。
|
|
83
|
+
3. **证据**:可复现的 artifact、`file:line`、命令和原始结果。
|
|
84
|
+
4. **置信度**:稳定 token `high`、`medium` 或 `low`。
|
|
85
|
+
5. **未验证假设**:尚未直接证明、若被推翻会改变结论的假设;没有则明确写无。
|
|
86
|
+
6. **修复方向**:可执行的最小修复目标,不替执行方越权重设计。
|
|
87
|
+
|
|
88
|
+
minor 保持轻量,但仍须提供具体位置和可执行建议。finding ledger 的 `evidence` 继续指向报告中的稳定锚点,不新增账本字段。manual-validation、advisory 和 `needs-human-decision` 按 review handshake 与阶段规则处理。
|
|
89
|
+
|
|
90
|
+
## Completion
|
|
91
|
+
|
|
92
|
+
只有同时满足以下条件才可形成最终 verdict:
|
|
93
|
+
|
|
94
|
+
- 五遍检视均已记录范围、证据、结果和缺口/假设。
|
|
95
|
+
- 所有风险触发器均有命中判断,命中镜头均已加载并留证。
|
|
96
|
+
- 追踪矩阵覆盖本阶段职责,缺口已进入 finding、manual-validation、advisory 或明确假设。
|
|
97
|
+
- 所有 blocker/major 满足统一证据契约,候选 finding 已完成反证检视。
|
|
98
|
+
- 账本意图、人工校验、待裁决项、未验证假设与问题计数一致。
|
|
@@ -19,6 +19,17 @@ Map user intent to the corresponding workflow command:
|
|
|
19
19
|
- Before updating `agent_infra_version`, read `.agents/rules/version-stamp.md`
|
|
20
20
|
- Activity Log entries are append-only and must never overwrite history
|
|
21
21
|
|
|
22
|
+
## Collaborator Token Specification
|
|
23
|
+
|
|
24
|
+
`--agent` values must converge on the standard AI collaborator tokens; OS usernames (e.g. `devuser`) and git usernames (e.g. a human name) are forbidden. The standard set (short tokens are the single source of truth for the activity log):
|
|
25
|
+
|
|
26
|
+
- AI short tokens: `claude` / `codex` / `antigravity` / `opencode` / `cursor`
|
|
27
|
+
- Long-name mapping (normalized to the short token before writing): `claude-code` -> `claude`, `antigravity-cli` -> `antigravity`
|
|
28
|
+
- Historical `gemini` / `gemini-cli` remain read-only for `ai task log` rendering and are not writable
|
|
29
|
+
- Manual-step exception: no matter which agent is used, a human-made decision is always declared as `human`
|
|
30
|
+
|
|
31
|
+
The six internal commands (`task-event` / `task-lifecycle` / `platform-issue` / `platform-comment` / `platform-pr` / `task-orchestration`) hard-validate `--agent` against a whitelist: they accept a short token, a long name, or `human`, and reject non-standard values with the matching `*_PAYLOAD_INVALID` error; long names are normalized to the short token before being persisted or forwarded. The `ai task log` renderer keeps unknown tokens grouped as `human` but appends a visible `(unknown)` marker.
|
|
32
|
+
|
|
22
33
|
## State Snapshot and Completion Verification Entrypoints
|
|
23
34
|
|
|
24
35
|
- Runtime skills that record git, task-directory, and task.md tail evidence must call `agent-infra-internal task-snapshot {task-id} --format text`; they must not resolve short ids, scan workspaces, or reconstruct the three observations themselves.
|
|
@@ -19,6 +19,17 @@
|
|
|
19
19
|
- 更新 `agent_infra_version` 前,先读取 `.agents/rules/version-stamp.md`
|
|
20
20
|
- Activity Log 只能追加,不能覆盖历史记录
|
|
21
21
|
|
|
22
|
+
## 合作者 token 规范
|
|
23
|
+
|
|
24
|
+
`--agent` 取值必须收敛到标准 AI 合作者 token,禁止填入 OS 系统用户名(如 `devuser`)或 git 用户名(如 `季聿阶`)。标准集合(短名为活动日志唯一事实来源):
|
|
25
|
+
|
|
26
|
+
- AI 短名:`claude` / `codex` / `antigravity` / `opencode` / `cursor`
|
|
27
|
+
- 长名映射(写入前归一化为短名):`claude-code` → `claude`、`antigravity-cli` → `antigravity`
|
|
28
|
+
- 历史 `gemini` / `gemini-cli` 仅保留 `ai task log` 渲染兼容,不接受写入
|
|
29
|
+
- 人工步骤例外:无论使用哪个 Agent,只要是人做的决定,统一声明 `human`
|
|
30
|
+
|
|
31
|
+
六个内部命令(`task-event` / `task-lifecycle` / `platform-issue` / `platform-comment` / `platform-pr` / `task-orchestration`)对 `--agent` 做白名单硬校验:接受短名、长名或 `human`,非标准值返回对应 `*_PAYLOAD_INVALID` 错误;长名在落库/透传前归一化为短名。渲染端 `ai task log` 对无法识别的 token 保留 `human` 归类并附加 `(unknown)` 标记。
|
|
32
|
+
|
|
22
33
|
## 状态快照与完成验证入口
|
|
23
34
|
|
|
24
35
|
- 运行时 SKILL 需要记录 git、任务目录和 task.md tail 证据时,统一调用 `agent-infra-internal task-snapshot {task-id} --format text`;不得自行解析短号、扫描 workspace 或重新拼接三段状态命令。
|
|
@@ -7,6 +7,9 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Analyze 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
|
+
|
|
12
|
+
If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to the completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
|
|
10
13
|
|
|
11
14
|
## Boundary / Critical Rules
|
|
12
15
|
|
|
@@ -36,7 +39,7 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
36
39
|
|
|
37
40
|
## Step Start: Declare the started Event
|
|
38
41
|
|
|
39
|
-
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} analyze.started --agent {agent}` and verify the returned `artifactContext`.
|
|
42
|
+
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} analyze.started --agent {standard-agent-token}` and verify the returned `artifactContext`.
|
|
40
43
|
|
|
41
44
|
## Steps
|
|
42
45
|
|
|
@@ -103,8 +106,8 @@ Runs after Step 0 state check and Step 3 (questioning is an external-state actio
|
|
|
103
106
|
1. Decide this round's question (consistent with 4.2):
|
|
104
107
|
- if a `pending_question` already exists (the previous question is still unanswered) → restate that `pending_question`, do **not** modify it and do **not** increment `question_count`;
|
|
105
108
|
- otherwise (no pending question) → pick the single highest-value question (acceptance criteria > scope > ambiguity) and write `## Brainstorming`: `status: asking`, `pending_question: <question>`, `question_count += 1`.
|
|
106
|
-
2. If `start_date` is empty, write today (`date +%F`), then run `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {agent} --question {question_count}` so the core updates base metadata and Activity Log.
|
|
107
|
-
3. Issue sync (when `issue_number` exists, skip on any failure): run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}` to update only the **task comment**; keep the `status` label at `pending-design-work`; do **not** publish an analysis artifact comment.
|
|
109
|
+
2. If `start_date` is empty, write today (`date +%F`), then run `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}` so the core updates base metadata and Activity Log.
|
|
110
|
+
3. Issue sync (when `issue_number` exists, skip on any failure): run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` to update only the **task comment**; keep the `status` label at `pending-design-work`; do **not** publish an analysis artifact comment.
|
|
108
111
|
4. Verification (replaces the step 8 artifact gate): `agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text` (the early-exit set `current_step: requirement-analysis` and wrote `start_date`, so it should pass); also keep `rg -n 'Analyze Task \(Brainstorming\)' .agents/workspace/active/{task-id}/task.md` and the task-comment sync evidence. Do **not** run the artifact gate, nor `check activity-log` / `check platform-sync` (both bind to the analysis artifact path).
|
|
109
112
|
5. User output: show only the current **single question** plus how to answer/continue (re-trigger `analyze-task {task-ref}` with the answer), and append the `Completed at` line per `.agents/rules/next-step-output.md`.
|
|
110
113
|
6. **STOP** and wait for the answer. The next trigger returns to this step.
|
|
@@ -198,14 +201,14 @@ Update `.agents/workspace/active/{task-id}/task.md`:
|
|
|
198
201
|
- Overwrite the `priority` field in frontmatter with the new value
|
|
199
202
|
- Append a `## Priority Re-estimate` section to this round's analysis artifact `{analysis-artifact}`, recording: `priority {old} → {new} (rationale: {short basis grounded in this analysis})`
|
|
200
203
|
If the re-estimated value matches the current value, skip it: do not write the `## Priority Re-estimate` section. The Flow A sync that follows reads the possibly updated frontmatter and propagates the new value to the Issue automatically.
|
|
201
|
-
After the business fields are updated, run `agent-infra-internal task-event {task-id} analyze.completed --agent {agent} --artifact {analysis-artifact}` so the core atomically records the link, stage, agent, metadata, and Activity Log.
|
|
204
|
+
After the business fields are updated, run `agent-infra-internal task-event {task-id} analyze.completed --agent {standard-agent-token} --artifact {analysis-artifact} {execution-flag}` so the core atomically records the link, stage, agent, metadata, and Activity Log.
|
|
202
205
|
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Round {N})** by {agent} — Analysis completed → {analysis-artifact}
|
|
203
206
|
```
|
|
204
207
|
|
|
205
208
|
If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
|
|
206
|
-
- Run `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status pending-design-work --fields`
|
|
207
|
-
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`
|
|
208
|
-
- Run `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {analysis-artifact} --agent {agent}`
|
|
209
|
+
- Run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status pending-design-work --fields`
|
|
210
|
+
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
211
|
+
- Run `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {analysis-artifact} --agent {standard-agent-token}`
|
|
209
212
|
|
|
210
213
|
### 8. Verification Gate
|
|
211
214
|
|
|
@@ -230,9 +233,11 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
230
233
|
|
|
231
234
|
> Execute this step only after the verification gate passes.
|
|
232
235
|
|
|
233
|
-
>
|
|
236
|
+
> 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}`.
|
|
234
237
|
|
|
235
238
|
Output format:
|
|
239
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-analysis --task-ref {task-ref}`.
|
|
240
|
+
|
|
236
241
|
```
|
|
237
242
|
Analysis complete for task {task-id}.
|
|
238
243
|
|
|
@@ -245,9 +250,7 @@ Output file:
|
|
|
245
250
|
- Analysis report: .agents/workspace/active/{task-id}/{analysis-artifact}
|
|
246
251
|
|
|
247
252
|
Next step - review the analysis:
|
|
248
|
-
|
|
249
|
-
- Gemini CLI: /{{project}}:review-analysis {task-ref}
|
|
250
|
-
- Codex CLI: $review-analysis {task-ref}
|
|
253
|
+
{next-step-commands}
|
|
251
254
|
```
|
|
252
255
|
|
|
253
256
|
## Completion Checklist
|
|
@@ -259,7 +262,7 @@ Next step - review the analysis:
|
|
|
259
262
|
- [ ] Updated `assigned_to` in task.md
|
|
260
263
|
- [ ] Appended an Activity Log entry to task.md
|
|
261
264
|
- [ ] Marked requirement-analysis as complete in workflow progress
|
|
262
|
-
- [ ]
|
|
265
|
+
- [ ] Rendered the selected next-step commands through the shared helper
|
|
263
266
|
- [ ] **Did not modify any business code**
|
|
264
267
|
|
|
265
268
|
## STOP
|
|
@@ -7,6 +7,9 @@ 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
|
+
|
|
12
|
+
若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
|
|
10
13
|
|
|
11
14
|
## 行为边界 / 关键规则
|
|
12
15
|
|
|
@@ -39,7 +42,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
39
42
|
确认前置条件和轮次后、本轮第一个产出动作之前执行:
|
|
40
43
|
|
|
41
44
|
```bash
|
|
42
|
-
agent-infra-internal task-event {task-id} analyze.started --agent {agent}
|
|
45
|
+
agent-infra-internal task-event {task-id} analyze.started --agent {standard-agent-token}
|
|
43
46
|
```
|
|
44
47
|
|
|
45
48
|
## 执行步骤
|
|
@@ -106,8 +109,8 @@ agent-infra-internal task-event {task-id} analyze.started --agent {agent}
|
|
|
106
109
|
1. 确定本轮要问的问题(与 4.2 保持一致):
|
|
107
110
|
- 若已存在 `pending_question`(上一问尚未得到答案)→ 复述该 `pending_question`,**不**修改它、**不**增加 `question_count`;
|
|
108
111
|
- 否则(无待答问题)→ 选最高价值的一个问题(验收标准 > 范围 > 歧义),写入 `## Brainstorming`:`status: asking`、`pending_question: <问题>`、`question_count += 1`。
|
|
109
|
-
2. 若 `start_date` 为空,写入当日日期(`date +%F`);随后执行 `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {agent} --question {question_count}`,由核心统一更新基础 frontmatter 和 Activity Log。
|
|
110
|
-
3. Issue 同步(存在 `issue_number` 时,任一失败跳过):调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}` 更新 **task 评论**;`status` label 维持 `pending-design-work`;**不**发布分析产物评论。
|
|
112
|
+
2. 若 `start_date` 为空,写入当日日期(`date +%F`);随后执行 `agent-infra-internal task-event {task-id} analyze.awaiting-input --agent {standard-agent-token} --question {question_count}`,由核心统一更新基础 frontmatter 和 Activity Log。
|
|
113
|
+
3. Issue 同步(存在 `issue_number` 时,任一失败跳过):调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 更新 **task 评论**;`status` label 维持 `pending-design-work`;**不**发布分析产物评论。
|
|
111
114
|
4. 校验(替代步骤 8 的 artifact gate):`agent-infra-internal task-verify {task-id} analyze.awaiting-input --format text`(早退已置 `current_step: requirement-analysis` 且已写入 `start_date`,预期通过);并保留 `rg -n 'Analyze Task \(Brainstorming\)' .agents/workspace/active/{task-id}/task.md` 与 task 评论同步证据。**不**跑 artifact gate,也不跑 `check activity-log` / `check platform-sync`(二者绑定分析产物路径)。
|
|
112
115
|
5. 用户输出:只展示当前**单个问题** + 如何回答/继续(再次触发 `analyze-task {task-ref}` 并附答案),并按 `.agents/rules/next-step-output.md` 在末行追加 `Completed at`。
|
|
113
116
|
6. **STOP**,等待回答。下一次触发回到本步骤。
|
|
@@ -199,12 +202,12 @@ agent-infra-internal task-event {task-id} analyze.started --agent {agent}
|
|
|
199
202
|
- 用新值覆盖 frontmatter 的 `priority` 字段
|
|
200
203
|
- 在本轮分析产物 `{analysis-artifact}` 中追加 `## 优先级重估` 段,记录一条:`priority {old} → {new} (rationale: {基于本轮分析的简短依据})`
|
|
201
204
|
若重估值与当前值一致,跳过:不写入 `## 优先级重估` 段。后续 Flow A 同步会读取可能更新过的 frontmatter,并自动把新值同步到 Issue。
|
|
202
|
-
- 完成业务内容更新后执行 `agent-infra-internal task-event {task-id} analyze.completed --agent {agent} --artifact {analysis-artifact}`,由核心原子登记链接、阶段、代理、时间、版本和 Activity Log。
|
|
205
|
+
- 完成业务内容更新后执行 `agent-infra-internal task-event {task-id} analyze.completed --agent {standard-agent-token} --artifact {analysis-artifact} {execution-flag}`,由核心原子登记链接、阶段、代理、时间、版本和 Activity Log。
|
|
203
206
|
|
|
204
207
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
|
|
205
|
-
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status pending-design-work --fields`
|
|
206
|
-
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`
|
|
207
|
-
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {analysis-artifact} --agent {agent}`
|
|
208
|
+
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status pending-design-work --fields`
|
|
209
|
+
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
210
|
+
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {analysis-artifact} --agent {standard-agent-token}`
|
|
208
211
|
|
|
209
212
|
### 8. 完成校验
|
|
210
213
|
|
|
@@ -229,9 +232,11 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
229
232
|
|
|
230
233
|
> 仅在校验通过后执行本步骤。
|
|
231
234
|
|
|
232
|
-
>
|
|
235
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
233
236
|
|
|
234
237
|
输出格式:
|
|
238
|
+
使用 `agent-infra-internal agent-client next-steps --skill review-analysis --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
239
|
+
|
|
235
240
|
```
|
|
236
241
|
任务 {task-id} 分析完成。
|
|
237
242
|
|
|
@@ -244,9 +249,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
244
249
|
- 分析报告:.agents/workspace/active/{task-id}/{analysis-artifact}
|
|
245
250
|
|
|
246
251
|
下一步 - 审查需求分析:
|
|
247
|
-
|
|
248
|
-
- Gemini CLI:/{{project}}:review-analysis {task-ref}
|
|
249
|
-
- Codex CLI:$review-analysis {task-ref}
|
|
252
|
+
{next-step-commands}
|
|
250
253
|
```
|
|
251
254
|
|
|
252
255
|
## 完成检查清单
|
|
@@ -258,7 +261,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
258
261
|
- [ ] 更新了 task.md 中的 `assigned_to`
|
|
259
262
|
- [ ] 追加了 Activity Log 条目到 task.md
|
|
260
263
|
- [ ] 在工作流进度中标记了 requirement-analysis 为已完成
|
|
261
|
-
- [ ]
|
|
264
|
+
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
262
265
|
- [ ] **没有修改任何业务代码**
|
|
263
266
|
|
|
264
267
|
## 停止
|
|
@@ -7,6 +7,8 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Block 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
|
|
|
@@ -53,7 +55,7 @@ Before blocking, thoroughly analyze:
|
|
|
53
55
|
### 3. Apply the Local Lifecycle Intent
|
|
54
56
|
|
|
55
57
|
```bash
|
|
56
|
-
agent-infra-internal task-lifecycle {task-id} block --agent {agent} \
|
|
58
|
+
agent-infra-internal task-lifecycle {task-id} block --agent {standard-agent-token} \
|
|
57
59
|
--reason "{one-line reason}" --unblock-condition "{unblock condition}"
|
|
58
60
|
```
|
|
59
61
|
|
|
@@ -73,8 +75,8 @@ ls .agents/workspace/blocked/{task-id}/task.md
|
|
|
73
75
|
|
|
74
76
|
Check whether `task.md` includes a valid `issue_number`. If not, skip this step.
|
|
75
77
|
|
|
76
|
-
If a valid `issue_number` exists, run `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status blocked`.
|
|
77
|
-
Then run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`.
|
|
78
|
+
If a valid `issue_number` exists, run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status blocked`.
|
|
79
|
+
Then run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`.
|
|
78
80
|
|
|
79
81
|
### 7. Verification Gate
|
|
80
82
|
|
|
@@ -95,11 +97,13 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
95
97
|
|
|
96
98
|
> Execute this step only after the verification gate passes.
|
|
97
99
|
|
|
98
|
-
>
|
|
100
|
+
> 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}`.
|
|
99
101
|
|
|
100
102
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after "Archived to" and before "To unblock" in the output below — only when BOTH (1) `.agents/.airc.json` has a `sandbox` field and (2) task.md's `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the task.md you already loaded (the task has moved to blocked/, so read it from `.agents/workspace/blocked/{task-id}/task.md`). This block is independent of "Next step" semantics.
|
|
101
103
|
|
|
102
104
|
Output format:
|
|
105
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}`.
|
|
106
|
+
|
|
103
107
|
```
|
|
104
108
|
Task {task-id} marked as blocked.
|
|
105
109
|
|
|
@@ -113,12 +117,10 @@ Optional: clean up this task's sandbox
|
|
|
113
117
|
ai sandbox rm {branch}
|
|
114
118
|
|
|
115
119
|
To unblock when the issue is resolved:
|
|
116
|
-
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{activation note}"
|
|
120
|
+
agent-infra-internal task-lifecycle {task-id} activate --agent {standard-agent-token} --note "{activation note}"
|
|
117
121
|
|
|
118
122
|
Next step - check task status after unblocking:
|
|
119
|
-
|
|
120
|
-
- Gemini CLI: /{{project}}:check-task {task-ref}
|
|
121
|
-
- Codex CLI: $check-task {task-ref}
|
|
123
|
+
{next-step-commands}
|
|
122
124
|
```
|
|
123
125
|
|
|
124
126
|
|
|
@@ -136,7 +138,7 @@ Next step - check task status after unblocking:
|
|
|
136
138
|
When the blocking issue is resolved:
|
|
137
139
|
|
|
138
140
|
```bash
|
|
139
|
-
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{activation note}"
|
|
141
|
+
agent-infra-internal task-lifecycle {task-id} activate --agent {standard-agent-token} --note "{activation note}"
|
|
140
142
|
```
|
|
141
143
|
|
|
142
144
|
Resume from the preserved `current_step`. On failure, retry the same intent from the structured recovery fields instead of hand-editing lifecycle state.
|
|
@@ -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
|
|
|
@@ -52,7 +54,7 @@ description: >
|
|
|
52
54
|
### 3. 执行本地生命周期意图
|
|
53
55
|
|
|
54
56
|
```bash
|
|
55
|
-
agent-infra-internal task-lifecycle {task-id} block --agent {agent} \
|
|
57
|
+
agent-infra-internal task-lifecycle {task-id} block --agent {standard-agent-token} \
|
|
56
58
|
--reason "{一行原因}" --unblock-condition "{解除阻塞条件}"
|
|
57
59
|
```
|
|
58
60
|
|
|
@@ -74,8 +76,8 @@ ls .agents/workspace/blocked/{task-id}/task.md
|
|
|
74
76
|
|
|
75
77
|
检查 `task.md` 中是否存在有效的 `issue_number`。如果没有,跳过。
|
|
76
78
|
|
|
77
|
-
如果存在有效的 `issue_number`,调用 `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status blocked`。
|
|
78
|
-
随后调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}` 更新 task 评论。
|
|
79
|
+
如果存在有效的 `issue_number`,调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status blocked`。
|
|
80
|
+
随后调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 更新 task 评论。
|
|
79
81
|
|
|
80
82
|
### 7. 完成校验
|
|
81
83
|
|
|
@@ -96,11 +98,13 @@ agent-infra-internal task-verify {task-id} block-task.completed --format text
|
|
|
96
98
|
|
|
97
99
|
> 仅在校验通过后执行本步骤。
|
|
98
100
|
|
|
99
|
-
>
|
|
101
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
100
102
|
|
|
101
103
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「归档路径」之后、「解除阻塞时执行」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取已读入的 task.md 的 `branch` 值(任务此时已移动到 blocked/,从 `.agents/workspace/blocked/{task-id}/task.md` 读取)。该块独立于「下一步」语义。
|
|
102
104
|
|
|
103
105
|
输出格式:
|
|
106
|
+
使用 `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
107
|
+
|
|
104
108
|
```
|
|
105
109
|
任务 {task-id} 已标记为阻塞。
|
|
106
110
|
|
|
@@ -114,12 +118,10 @@ agent-infra-internal task-verify {task-id} block-task.completed --format text
|
|
|
114
118
|
ai sandbox rm {branch}
|
|
115
119
|
|
|
116
120
|
解除阻塞时执行:
|
|
117
|
-
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{恢复说明}"
|
|
121
|
+
agent-infra-internal task-lifecycle {task-id} activate --agent {standard-agent-token} --note "{恢复说明}"
|
|
118
122
|
|
|
119
123
|
下一步 - 检查任务状态(解除阻塞后):
|
|
120
|
-
|
|
121
|
-
- Gemini CLI:/{{project}}:check-task {task-ref}
|
|
122
|
-
- Codex CLI:$check-task {task-ref}
|
|
124
|
+
{next-step-commands}
|
|
123
125
|
```
|
|
124
126
|
|
|
125
127
|
|
|
@@ -137,7 +139,7 @@ ai sandbox rm {branch}
|
|
|
137
139
|
当阻塞问题解决后:
|
|
138
140
|
|
|
139
141
|
```bash
|
|
140
|
-
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{恢复说明}"
|
|
142
|
+
agent-infra-internal task-lifecycle {task-id} activate --agent {standard-agent-token} --note "{恢复说明}"
|
|
141
143
|
```
|
|
142
144
|
|
|
143
145
|
成功后从保留的 `current_step` 继续。失败时按结构化 recovery 字段以同一 intent 重试,不手工移动目录或编辑基础元数据。
|
|
@@ -7,6 +7,8 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Cancel 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
|
|
|
@@ -53,7 +55,7 @@ When syncing to the Issue, replace any existing `status:` labels with the inferr
|
|
|
53
55
|
### 3. Apply the Local Lifecycle Intent
|
|
54
56
|
|
|
55
57
|
```bash
|
|
56
|
-
agent-infra-internal task-lifecycle {task-id} cancel --agent {agent} --reason "{one-line cancellation reason}"
|
|
58
|
+
agent-infra-internal task-lifecycle {task-id} cancel --agent {standard-agent-token} --reason "{one-line cancellation reason}"
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
Only `status=applied|no-op` means local cancellation completed. On `status=failed`, show the structured error and recovery steps and retry the same intent; do not manually edit task.md, move the directory, or release the short id.
|
|
@@ -75,9 +77,9 @@ Confirm the task directory was moved successfully.
|
|
|
75
77
|
Check whether `task.md` contains a valid `issue_number`. If not, skip this step.
|
|
76
78
|
|
|
77
79
|
If a valid `issue_number` exists:
|
|
78
|
-
- Run `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status {reason} --in-labels none --assignees none --milestone none --state closed --close-reason not_planned`
|
|
79
|
-
- Write the cancellation body to a temporary file and run `agent-infra-internal platform-comment sync {task-id} --kind cancel --body-file {path} --agent {agent}`
|
|
80
|
-
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`
|
|
80
|
+
- Run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status {reason} --in-labels none --assignees none --milestone none --state closed --close-reason not_planned`
|
|
81
|
+
- Write the cancellation body to a temporary file and run `agent-infra-internal platform-comment sync {task-id} --kind cancel --body-file {path} --agent {standard-agent-token}`
|
|
82
|
+
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
81
83
|
|
|
82
84
|
The cancellation comment must include at least:
|
|
83
85
|
- the cancellation reason
|
|
@@ -102,11 +104,13 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
102
104
|
|
|
103
105
|
> Execute this step only after the verification gate passes.
|
|
104
106
|
|
|
105
|
-
>
|
|
107
|
+
> 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}`.
|
|
106
108
|
|
|
107
109
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after "Target path" and before "Next step" in the output below — only when BOTH (1) `.agents/.airc.json` has a `sandbox` field and (2) task.md's `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the task.md you already loaded (the task has moved to completed/, so read it from `.agents/workspace/completed/{task-id}/task.md`). This block is independent of "Next steps" semantics.
|
|
108
110
|
|
|
109
111
|
Output format:
|
|
112
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}`.
|
|
113
|
+
|
|
110
114
|
```
|
|
111
115
|
Task {task-id} cancelled; task directory moved to completed/.
|
|
112
116
|
|
|
@@ -120,9 +124,7 @@ Optional: clean up this task's sandbox
|
|
|
120
124
|
ai sandbox rm {branch}
|
|
121
125
|
|
|
122
126
|
Next step - inspect the moved task:
|
|
123
|
-
|
|
124
|
-
- Gemini CLI: /{{project}}:check-task {task-ref}
|
|
125
|
-
- Codex CLI: $check-task {task-ref}
|
|
127
|
+
{next-step-commands}
|
|
126
128
|
```
|
|
127
129
|
|
|
128
130
|
|
|
@@ -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
|
|
|
@@ -52,7 +54,7 @@ description: >
|
|
|
52
54
|
### 3. 执行本地生命周期意图
|
|
53
55
|
|
|
54
56
|
```bash
|
|
55
|
-
agent-infra-internal task-lifecycle {task-id} cancel --agent {agent} --reason "{一行取消原因}"
|
|
57
|
+
agent-infra-internal task-lifecycle {task-id} cancel --agent {standard-agent-token} --reason "{一行取消原因}"
|
|
56
58
|
```
|
|
57
59
|
|
|
58
60
|
仅 `status=applied|no-op` 视为本地取消完成。`status=failed` 时展示结构化 `error` 与 recovery steps,并以同一 intent 重试;不得手工编辑 task.md、移动目录或释放短号。
|
|
@@ -74,9 +76,9 @@ ls .agents/workspace/completed/{task-id}/task.md
|
|
|
74
76
|
检查 `task.md` 中是否存在有效的 `issue_number`。如果没有,跳过此步骤。
|
|
75
77
|
|
|
76
78
|
如果存在有效的 `issue_number`:
|
|
77
|
-
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status {reason} --in-labels none --assignees none --milestone none --state closed --close-reason not_planned`
|
|
78
|
-
- 将取消正文写入临时文件,调用 `agent-infra-internal platform-comment sync {task-id} --kind cancel --body-file {path} --agent {agent}`
|
|
79
|
-
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`
|
|
79
|
+
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status {reason} --in-labels none --assignees none --milestone none --state closed --close-reason not_planned`
|
|
80
|
+
- 将取消正文写入临时文件,调用 `agent-infra-internal platform-comment sync {task-id} --kind cancel --body-file {path} --agent {standard-agent-token}`
|
|
81
|
+
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
80
82
|
|
|
81
83
|
取消评论至少包含:
|
|
82
84
|
- 取消原因
|
|
@@ -101,11 +103,13 @@ agent-infra-internal task-verify {task-id} cancel-task.completed --format text
|
|
|
101
103
|
|
|
102
104
|
> 仅在校验通过后执行本步骤。
|
|
103
105
|
|
|
104
|
-
>
|
|
106
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
105
107
|
|
|
106
108
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「目标路径」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取已读入的 task.md 的 `branch` 值(任务此时已移动到 completed/,从 `.agents/workspace/completed/{task-id}/task.md` 读取)。该块独立于「下一步」语义。
|
|
107
109
|
|
|
108
110
|
输出格式:
|
|
111
|
+
使用 `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
112
|
+
|
|
109
113
|
```
|
|
110
114
|
任务 {task-id} 已取消,任务目录已转移到 completed/。
|
|
111
115
|
|
|
@@ -119,9 +123,7 @@ agent-infra-internal task-verify {task-id} cancel-task.completed --format text
|
|
|
119
123
|
ai sandbox rm {branch}
|
|
120
124
|
|
|
121
125
|
下一步 - 查看已转移任务:
|
|
122
|
-
|
|
123
|
-
- Gemini CLI:/{{project}}:check-task {task-ref}
|
|
124
|
-
- Codex CLI:$check-task {task-ref}
|
|
126
|
+
{next-step-commands}
|
|
125
127
|
```
|
|
126
128
|
|
|
127
129
|
|
|
@@ -132,7 +134,7 @@ ai sandbox rm {branch}
|
|
|
132
134
|
- [ ] 已将任务目录移动到 `.agents/workspace/completed/`
|
|
133
135
|
- [ ] 已在存在 Issue 时完成 Issue 同步
|
|
134
136
|
- [ ] 已运行 gate 校验并通过
|
|
135
|
-
- [ ]
|
|
137
|
+
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
136
138
|
|
|
137
139
|
## 注意事项
|
|
138
140
|
|
|
@@ -59,7 +59,7 @@ Workflow progress:
|
|
|
59
59
|
|
|
60
60
|
### 3. Recommend Next Action
|
|
61
61
|
|
|
62
|
-
Recommend the appropriate next skill based on the current workflow state.
|
|
62
|
+
Recommend the appropriate next skill based on the current workflow state.
|
|
63
63
|
|
|
64
64
|
> **⚠️ CONDITION CHECK — you must choose the single matching row in the table below based on `status`, `current_step`, the latest artifacts, and the latest review result:**
|
|
65
65
|
>
|
|
@@ -77,21 +77,21 @@ Recommend the appropriate next skill based on the current workflow state. You mu
|
|
|
77
77
|
>
|
|
78
78
|
> **Important: if the latest review report contains any issue at all, do not use the corresponding review-passed row. Use the corresponding has-issues row instead.**
|
|
79
79
|
>
|
|
80
|
-
> Before rendering the final output, read `.agents/rules/next-step-output.md
|
|
81
|
-
|
|
82
|
-
| Current State |
|
|
83
|
-
|
|
84
|
-
| Analysis Complete |
|
|
85
|
-
| Analysis Review Passed |
|
|
86
|
-
| Analysis Review Has Issues |
|
|
87
|
-
| Plan Complete |
|
|
88
|
-
| Plan Review Passed |
|
|
89
|
-
| Plan Review Has Issues |
|
|
90
|
-
| Code Complete |
|
|
91
|
-
| Code Review Passed |
|
|
92
|
-
| Code Review Has Issues |
|
|
93
|
-
| Task Blocked |
|
|
94
|
-
| Task Completed |
|
|
80
|
+
> Before rendering the final output, read `.agents/rules/next-step-output.md`. After selecting an actionable row, invoke `agent-infra-internal agent-client next-steps --skill {next-skill} [--task-ref {task-ref}]` exactly once and render stdout verbatim as `{next-step-commands}`. Do not invoke the helper for `Task Blocked` or `Task Completed`. Append the `Completed at` trailing line last.
|
|
81
|
+
|
|
82
|
+
| Current State | next skill | task ref |
|
|
83
|
+
|----------------------------|-------------------|----------|
|
|
84
|
+
| Analysis Complete | `review-analysis` | required |
|
|
85
|
+
| Analysis Review Passed | `plan-task` | required |
|
|
86
|
+
| Analysis Review Has Issues | `analyze-task` | required |
|
|
87
|
+
| Plan Complete | `review-plan` | required |
|
|
88
|
+
| Plan Review Passed | `code-task` | required |
|
|
89
|
+
| Plan Review Has Issues | `plan-task` | required |
|
|
90
|
+
| Code Complete | `review-code` | required |
|
|
91
|
+
| Code Review Passed | `commit` | omitted |
|
|
92
|
+
| Code Review Has Issues | `code-task` | required |
|
|
93
|
+
| Task Blocked | — | — |
|
|
94
|
+
| Task Completed | — | — |
|
|
95
95
|
|
|
96
96
|
## Notes
|
|
97
97
|
|