@fitlab-ai/agent-infra 0.9.2 → 0.9.4
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 +12 -9
- package/README.zh-CN.md +12 -9
- package/bin/cli.ts +12 -0
- package/dist/bin/cli.js +14 -0
- package/dist/bin/internal-cli.js +134 -108
- package/dist/lib/agent-clients/adapter.js +137 -4
- package/dist/lib/agent-clients/adapters/antigravity-cli.js +64 -0
- package/dist/lib/{sandbox/credentials.js → agent-clients/adapters/claude-code-credentials.js} +4 -14
- package/dist/lib/agent-clients/adapters/claude-code-refresh.js +85 -0
- package/dist/lib/agent-clients/adapters/claude-code-sandbox.js +247 -0
- package/dist/lib/agent-clients/adapters/claude-code.js +27 -4
- package/dist/lib/agent-clients/adapters/codex.js +9 -0
- package/dist/lib/agent-clients/adapters/index.js +2 -2
- package/dist/lib/agent-clients/adapters/opencode-sandbox.js +108 -0
- package/dist/lib/agent-clients/adapters/opencode.js +24 -3
- package/dist/lib/agent-clients/adapters/runtimes/claude-code.dockerfile +65 -0
- package/dist/lib/agent-clients/config.js +42 -4
- package/dist/lib/agent-clients/next-steps.js +11 -2
- package/dist/lib/agent-clients/reconcile.js +2 -1
- package/dist/lib/agent-clients/registry.js +16 -2
- package/dist/lib/agent-clients/schema.js +18 -0
- package/dist/lib/agent-clients/tokens.js +49 -0
- package/dist/lib/agent-clients/types.js +1 -1
- package/dist/lib/defaults.json +1 -1
- package/dist/lib/git/workflow.js +54 -1
- package/dist/lib/internal/agent-client.js +61 -4
- package/dist/lib/internal/git-workflow.js +6 -1
- 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 +13 -6
- package/dist/lib/internal/sandbox-control.js +24 -0
- package/dist/lib/internal/task-activity.js +105 -0
- package/dist/lib/internal/task-event.js +17 -1
- package/dist/lib/internal/task-ledger.js +12 -3
- package/dist/lib/internal/task-lifecycle.js +26 -1
- package/dist/lib/internal/task-orchestration.js +167 -18
- package/dist/lib/internal/task-review.js +8 -3
- package/dist/lib/platform/adapters.js +8 -1
- package/dist/lib/platform/completion-backfill.js +122 -0
- package/dist/lib/platform/github-client.js +19 -2
- package/dist/lib/platform/issue-comments.js +3 -2
- package/dist/lib/platform/merged-pr-equivalence.js +115 -5
- package/dist/lib/platform/pr-checks.js +65 -42
- package/dist/lib/platform/pr-review.js +166 -0
- package/dist/lib/platform/pull-requests.js +371 -4
- package/dist/lib/platform/release-notes.js +85 -3
- package/dist/lib/platform/releases.js +13 -5
- package/dist/lib/pr-review/evidence-grading.js +229 -0
- package/dist/lib/process-data/index.js +239 -0
- package/dist/lib/process-data/normalize.js +198 -0
- package/dist/lib/process-data/privacy.js +33 -0
- package/dist/lib/process-data/reconcile.js +95 -0
- package/dist/lib/process-data/repair.js +58 -0
- package/dist/lib/process-data/sources.js +345 -0
- package/dist/lib/process-data/store.js +282 -0
- package/dist/lib/process-data/types.js +2 -0
- package/dist/lib/run/index.js +4 -3
- package/dist/lib/run/tui.js +10 -13
- package/dist/lib/sandbox/agent-client-reconciler.js +26 -2
- package/dist/lib/sandbox/capture.js +7 -2
- package/dist/lib/sandbox/commands/create.js +109 -248
- package/dist/lib/sandbox/commands/enter.js +15 -47
- package/dist/lib/sandbox/commands/list-running.js +16 -6
- package/dist/lib/sandbox/commands/ls.js +10 -6
- package/dist/lib/sandbox/commands/rebuild.js +4 -3
- package/dist/lib/sandbox/commands/refresh.js +4 -84
- package/dist/lib/sandbox/commands/rm.js +24 -3
- package/dist/lib/sandbox/commands/show.js +13 -4
- package/dist/lib/sandbox/commands/start.js +7 -4
- package/dist/lib/sandbox/config.js +2 -0
- package/dist/lib/sandbox/constants.js +6 -0
- package/dist/lib/sandbox/control/client.js +44 -0
- package/dist/lib/sandbox/control/protocol.js +35 -0
- package/dist/lib/sandbox/control/server.js +109 -0
- package/dist/lib/sandbox/dockerfile.js +36 -13
- package/dist/lib/sandbox/mounts.js +17 -4
- package/dist/lib/sandbox/recovery.js +128 -5
- package/dist/lib/sandbox/redaction.js +12 -0
- package/dist/lib/sandbox/runtimes/base.dockerfile +24 -74
- package/dist/lib/sandbox/workspace-identity.js +95 -0
- package/dist/lib/sandbox/workspace-view.js +103 -0
- package/dist/lib/task/activity-intent.js +307 -0
- package/dist/lib/task/artifact-lifecycle.js +2 -1
- package/dist/lib/task/commands/log.js +15 -14
- package/dist/lib/task/commit-finalization.js +267 -0
- package/dist/lib/task/commit-intent.js +165 -0
- package/dist/lib/task/decision-intents.js +31 -17
- package/dist/lib/task/delegation-receipts.js +25 -4
- package/dist/lib/task/events.js +67 -28
- package/dist/lib/task/finalization-artifacts.js +35 -0
- package/dist/lib/task/implementation-inputs.js +54 -7
- package/dist/lib/task/ledger-intents.js +35 -1
- package/dist/lib/task/lifecycle-execution.js +46 -0
- package/dist/lib/task/orchestration.js +753 -54
- package/dist/lib/task/resolve-ref.js +41 -1
- package/dist/lib/task/review-finalization.js +29 -9
- package/dist/lib/task/task-execution-lock.js +231 -0
- package/dist/lib/task/verification-checks.js +1 -1
- package/dist/lib/task/verification-engine.js +218 -2
- package/dist/lib/task/verification.js +4 -3
- package/dist/lib/task/workspace-snapshot.js +17 -5
- package/lib/agent-clients/adapter.ts +201 -4
- package/lib/agent-clients/adapters/antigravity-cli.ts +65 -0
- package/lib/{sandbox/credentials.ts → agent-clients/adapters/claude-code-credentials.ts} +3 -18
- package/lib/agent-clients/adapters/claude-code-refresh.ts +128 -0
- package/lib/agent-clients/adapters/claude-code-sandbox.ts +295 -0
- package/lib/agent-clients/adapters/claude-code.ts +31 -4
- package/lib/agent-clients/adapters/codex.ts +9 -0
- package/lib/agent-clients/adapters/index.ts +2 -2
- package/lib/agent-clients/adapters/opencode-sandbox.ts +136 -0
- package/lib/agent-clients/adapters/opencode.ts +27 -3
- package/lib/agent-clients/adapters/runtimes/claude-code.dockerfile +65 -0
- package/lib/agent-clients/config.ts +49 -4
- package/lib/agent-clients/next-steps.ts +15 -2
- package/lib/agent-clients/reconcile.ts +2 -1
- package/lib/agent-clients/registry.ts +19 -1
- package/lib/agent-clients/schema.ts +18 -0
- package/lib/agent-clients/tokens.ts +53 -0
- package/lib/agent-clients/types.ts +15 -1
- package/lib/defaults.json +1 -1
- package/lib/git/workflow.ts +66 -2
- package/lib/internal/agent-client.ts +59 -4
- package/lib/internal/git-workflow.ts +5 -1
- 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 +13 -6
- package/lib/internal/sandbox-control.ts +24 -0
- package/lib/internal/task-activity.ts +91 -0
- package/lib/internal/task-event.ts +9 -1
- package/lib/internal/task-ledger.ts +12 -3
- package/lib/internal/task-lifecycle.ts +26 -1
- package/lib/internal/task-orchestration.ts +123 -14
- package/lib/internal/task-review.ts +8 -3
- package/lib/platform/adapters.ts +29 -2
- package/lib/platform/completion-backfill.ts +134 -0
- package/lib/platform/github-client.ts +20 -2
- package/lib/platform/issue-comments.ts +3 -2
- package/lib/platform/merged-pr-equivalence.ts +127 -5
- package/lib/platform/pr-checks.ts +73 -46
- package/lib/platform/pr-review.ts +201 -0
- package/lib/platform/pull-requests.ts +444 -3
- package/lib/platform/release-notes.ts +100 -4
- package/lib/platform/releases.ts +16 -4
- package/lib/pr-review/evidence-grading.ts +318 -0
- package/lib/process-data/index.ts +224 -0
- package/lib/process-data/normalize.ts +202 -0
- package/lib/process-data/privacy.ts +41 -0
- package/lib/process-data/reconcile.ts +110 -0
- package/lib/process-data/repair.ts +64 -0
- package/lib/process-data/sources.ts +354 -0
- package/lib/process-data/store.ts +315 -0
- package/lib/process-data/types.ts +135 -0
- package/lib/run/index.ts +5 -3
- package/lib/run/tui.ts +14 -12
- package/lib/sandbox/agent-client-reconciler.ts +44 -2
- package/lib/sandbox/capture.ts +9 -2
- package/lib/sandbox/commands/create.ts +126 -280
- package/lib/sandbox/commands/enter.ts +13 -59
- package/lib/sandbox/commands/list-running.ts +23 -6
- package/lib/sandbox/commands/ls.ts +22 -6
- package/lib/sandbox/commands/rebuild.ts +4 -3
- package/lib/sandbox/commands/refresh.ts +4 -126
- package/lib/sandbox/commands/rm.ts +24 -3
- package/lib/sandbox/commands/show.ts +30 -4
- package/lib/sandbox/commands/start.ts +6 -4
- package/lib/sandbox/config.ts +4 -0
- package/lib/sandbox/constants.ts +8 -0
- package/lib/sandbox/control/client.ts +55 -0
- package/lib/sandbox/control/protocol.ts +75 -0
- package/lib/sandbox/control/server.ts +117 -0
- package/lib/sandbox/dockerfile.ts +66 -13
- package/lib/sandbox/mounts.ts +24 -4
- package/lib/sandbox/recovery.ts +163 -6
- package/lib/sandbox/redaction.ts +14 -0
- package/lib/sandbox/runtimes/base.dockerfile +24 -74
- package/lib/sandbox/tool-types.ts +16 -0
- package/lib/sandbox/workspace-identity.ts +123 -0
- package/lib/sandbox/workspace-view.ts +143 -0
- package/lib/server/server.schema.json +2 -2
- package/lib/task/activity-intent.ts +417 -0
- package/lib/task/artifact-lifecycle.ts +2 -1
- package/lib/task/commands/log.ts +15 -14
- package/lib/task/commit-finalization.ts +356 -0
- package/lib/task/commit-intent.ts +230 -0
- package/lib/task/decision-intents.ts +32 -12
- package/lib/task/delegation-receipts.ts +34 -5
- package/lib/task/events.ts +75 -30
- package/lib/task/finalization-artifacts.ts +58 -0
- package/lib/task/implementation-inputs.ts +62 -8
- package/lib/task/ledger-intents.ts +43 -3
- package/lib/task/lifecycle-execution.ts +106 -0
- package/lib/task/orchestration.ts +1019 -72
- package/lib/task/resolve-ref.ts +46 -1
- package/lib/task/review-finalization.ts +40 -9
- package/lib/task/task-execution-lock.ts +296 -0
- package/lib/task/verification-checks.ts +1 -1
- package/lib/task/verification-engine.ts +249 -2
- package/lib/task/verification.ts +5 -3
- package/lib/task/workspace-snapshot.ts +26 -5
- package/package.json +3 -3
- package/templates/.agents/QUICKSTART.en.md +25 -8
- package/templates/.agents/QUICKSTART.zh-CN.md +25 -8
- package/templates/.agents/README.en.md +10 -7
- package/templates/.agents/README.zh-CN.md +10 -7
- package/templates/.agents/hooks/lifecycle-delegation.js +15 -4
- package/templates/.agents/rules/README.en.md +1 -1
- package/templates/.agents/rules/README.zh-CN.md +1 -1
- 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 +11 -2
- package/templates/.agents/rules/human-decision-context.zh-CN.md +11 -2
- 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 +5 -2
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +5 -2
- 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 +3 -1
- package/templates/.agents/rules/next-step-output.zh-CN.md +3 -1
- package/templates/.agents/rules/no-mid-flow-questions.en.md +17 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +17 -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 +3 -3
- 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 +12 -2
- package/templates/.agents/rules/release-commands.github.zh-CN.md +12 -2
- package/templates/.agents/rules/release-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +1 -1
- package/templates/.agents/rules/task-management.en.md +13 -0
- package/templates/.agents/rules/task-management.zh-CN.md +13 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +10 -7
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +10 -7
- package/templates/.agents/skills/block-task/SKILL.en.md +7 -5
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +7 -5
- package/templates/.agents/skills/cancel-task/SKILL.en.md +6 -4
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +6 -4
- package/templates/.agents/skills/close-codescan/SKILL.en.md +3 -1
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +3 -1
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +10 -7
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +12 -9
- package/templates/.agents/skills/commit/SKILL.en.md +23 -11
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +29 -11
- 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/commit-orchestration.en.md +49 -0
- package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +55 -0
- 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 +4 -4
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +4 -4
- 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 +22 -7
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +22 -7
- 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 +7 -5
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +7 -5
- 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-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 +5 -3
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/create-task/reference/context-capture.en.md +34 -0
- package/templates/.agents/skills/create-task/reference/context-capture.zh-CN.md +34 -0
- package/templates/.agents/skills/import-issue/SKILL.en.md +5 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/plan-task/SKILL.en.md +8 -5
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +8 -5
- 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/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 +7 -4
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +7 -4
- package/templates/.agents/skills/review-code/SKILL.en.md +11 -8
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +11 -8
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +1 -1
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +1 -1
- package/templates/.agents/skills/review-plan/SKILL.en.md +7 -4
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +7 -4
- package/templates/.agents/skills/review-pr/SKILL.en.md +186 -0
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +186 -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 +8 -8
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/run-task/config/verify.en.json +2 -1
- package/templates/.agents/skills/run-task/config/verify.zh-CN.json +2 -1
- 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/update-agent-infra/scripts/sync-templates.js +98 -107
- package/templates/.agents/skills/watch-pr/SKILL.en.md +13 -13
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +13 -13
- 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 +2 -2
- package/templates/.agents/templates/task.zh-CN.md +2 -2
- 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/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/watch-pr.en.md +1 -1
- package/templates/.claude/commands/watch-pr.zh-CN.md +1 -1
- package/templates/.claude/rules/tool-preferences.en.md +20 -0
- package/templates/.claude/rules/tool-preferences.zh-CN.md +20 -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/watch-pr.en.md +1 -1
- package/templates/.opencode/commands/watch-pr.zh-CN.md +1 -1
- package/dist/lib/agent-clients/adapters/gemini-cli.js +0 -64
- package/lib/agent-clients/adapters/gemini-cli.ts +0 -65
- 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_/run-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/run-task.zh-CN.toml +0 -8
- 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
|
@@ -39,6 +39,23 @@
|
|
|
39
39
|
|
|
40
40
|
- `analyze-task`:任务描述/需求信息不足以支撑可靠分析时,可在入口处逐个提问收敛需求
|
|
41
41
|
|
|
42
|
+
### 例外 4:当前快照的远端发布授权
|
|
43
|
+
|
|
44
|
+
仅允许在当前会话已完成准备、已展示待发布的最新快照或精确内容后,询问一次是否执行对应远端发布。确认不跨会话、不跨快照复用;否定、调整、疑问、歧义或中断均 fail closed,不得写入远端。
|
|
45
|
+
|
|
46
|
+
当前归入本例外的 SKILL:
|
|
47
|
+
|
|
48
|
+
- `release`:展示最新 release snapshot 后确认是否 publish
|
|
49
|
+
- `create-release-note`:展示 stage 后的精确 notes 与摘要后确认是否 publish
|
|
50
|
+
|
|
51
|
+
### 例外 5:生命周期启动缺少完整模型策略
|
|
52
|
+
|
|
53
|
+
仅当 `run-task` 在创建任何 run、baseline、receipt 或 child 之前收到核心错误 `ORCHESTRATION_MODEL_POLICY_REQUIRED` 时,可展示带完整性标签的模型选择上下文,并一次询问 executor/reviewer 的完整 model + reasoning effort。部分显式策略、缺少 client、active delegation 或其他暂停原因不适用;用户未回答时不得创建 run。
|
|
54
|
+
|
|
55
|
+
当前归入本例外的 SKILL:
|
|
56
|
+
|
|
57
|
+
- `run-task`:仅补齐核心明确要求的原子模型策略
|
|
58
|
+
|
|
42
59
|
## 禁言条款(默认行为)
|
|
43
60
|
|
|
44
61
|
不属于上述任一例外的所有 SKILL 执行场景,遵循以下默认行为:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# PR Readiness Platform Intents
|
|
2
2
|
|
|
3
|
-
Typed intents own
|
|
3
|
+
Typed intents own full check-set retrieval, PR mergeability, polling deadlines, run/job resolution, and logs. Every inspect/poll aggregates facts from one PR head snapshot; facts are never mixed across heads.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
agent-infra-internal platform-checks inspect {task-id}
|
|
@@ -15,4 +15,4 @@ agent-infra-internal platform-checks logs {task-id} \
|
|
|
15
15
|
--run {run-id} [--job {job-id}]
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
`
|
|
18
|
+
`readiness.state` is `ready|conflicting|checks-failed|pending|timed-out|cancelled` and carries `headSha`. Only `ready` exits 0; conflicting/check failures exit 1; all other readiness or network blocking exits 2. `checks.state` remains available as check-only diagnostics. Adapter dependency and deterministic platform errors are preserved without degradation. Platform intents never edit business code or push.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# GitHub PR Readiness Intents
|
|
2
2
|
|
|
3
3
|
The GitHub adapter requires `gh >= 2.16.0`. Platform context checks this dependency before any GitHub API, PR, or checks operation. Projects that do not select GitHub neither probe nor depend on `gh`.
|
|
4
4
|
|
|
@@ -15,4 +15,4 @@ agent-infra-internal platform-checks logs {task-id} \
|
|
|
15
15
|
--run {run-id} [--job {job-id}]
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The
|
|
18
|
+
The adapter normalizes REST `mergeable=false` to `conflicting`, null/missing to `unknown`, and true to `mergeable`; `mergeable=true` plus diagnostic `dirty` is contradictory and becomes `unknown`. Other diagnostics such as `blocked` do not override REST true. Core combines that fact with all checks for one `headSha`: only `ready` exits 0, `conflicting|checks-failed` exit 1, and pending/timeout/cancel/network blocking exit 2. Dependency and deterministic platform errors are preserved without degradation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# PR
|
|
1
|
+
# GitHub PR readiness 平台意图
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
PR 全部 checks 的获取、轮询 deadline、失败 run/job 定位和日志获取统一由 typed internal intent 执行。SKILL/模型只负责失败分类、根因分析、最小修复和授权后的提交推送。
|
|
4
4
|
|
|
5
5
|
GitHub adapter 要求 `gh >= 2.16.0`。平台上下文会在任何 GitHub API、PR 或 checks 操作前检查该依赖;未选择 GitHub 平台时不探测也不依赖 `gh`。
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ agent-infra-internal platform-checks watch {task-id} \
|
|
|
13
13
|
--interval-seconds 30 --deadline-seconds 1800
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
adapter 把 REST `mergeable=false` 规范化为 `conflicting`,null/缺失为 `unknown`,true 为 `mergeable`;true 与诊断 `dirty` 矛盾时降为 `unknown`。`blocked` 等其他诊断不覆盖 REST true。core 在同一 `headSha` 上与全部 checks 聚合:仅 `ready` 退出 0,`conflicting|checks-failed` 退出 1,pending/timeout/cancel/网络阻塞退出 2。依赖与确定性平台错误不降级。
|
|
17
17
|
|
|
18
18
|
## 定位失败 run/job
|
|
19
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# PR
|
|
1
|
+
# PR readiness 平台意图
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
PR 全部 checks、PR mergeability、轮询 deadline、失败 run/job 定位和日志获取统一由 typed internal intent 执行。每次 inspect/poll 都在同一 PR head 快照上聚合,不跨 head 拼接事实。
|
|
4
4
|
|
|
5
5
|
## 快照与监控
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ agent-infra-internal platform-checks watch {task-id} \
|
|
|
11
11
|
--interval-seconds 30 --deadline-seconds 1800
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
结构化 `
|
|
14
|
+
结构化 `readiness.state` 为 `ready|conflicting|checks-failed|pending|timed-out|cancelled`,并携带 `headSha`。仅 `ready` 退出 0;`conflicting|checks-failed` 退出 1;其余或网络阻塞退出 2。`checks.state` 仍保留 check-only 诊断;平台 adapter 的依赖和确定性错误不降级。
|
|
15
15
|
|
|
16
16
|
## 定位失败 run/job
|
|
17
17
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# PR Summary Synchronization
|
|
2
2
|
|
|
3
|
+
> `--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.
|
|
4
|
+
|
|
3
5
|
The model writes the semantic reviewer summary. Typed core owns canonical artifact selection, the marker, current HEAD, paginated comment lookup, and create/update/no-op reconciliation.
|
|
4
6
|
|
|
5
7
|
## Inputs
|
|
@@ -16,7 +18,7 @@ Write only the summary body to a file, without marker or SHA:
|
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
20
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
19
|
-
--agent {agent} --body-file {summary-body-file}
|
|
21
|
+
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
20
22
|
```
|
|
21
23
|
|
|
22
24
|
The core wraps `<!-- sync-pr:{task-id}:summary -->` and current `<!-- last-commit: ... -->`, then creates, updates in place, or returns no-op. Duplicate markers fail deterministically. Callers never assemble shell/heredoc comment commands.
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# PR Summary Synchronization
|
|
2
2
|
|
|
3
|
+
> `--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.
|
|
4
|
+
|
|
3
5
|
The model writes the semantic reviewer summary. Typed core owns canonical artifact selection, marker/HEAD wrapping, paginated comment lookup, and reconciliation.
|
|
4
6
|
|
|
7
|
+
## Three-Layer Isolation
|
|
8
|
+
|
|
9
|
+
- `sync-pr:{task-id}:summary` (`platform-pr summary-sync`) is an updatable reviewer summary; it is neither a process copy nor a formal Review.
|
|
10
|
+
- The full `pr-review*` process copy lives in the Issue artifact comment (`platform-comment sync --kind artifact`) and is restored by `restore-task` under its Issue-only contract.
|
|
11
|
+
- A formal PR Review (`platform-pr-review publish`) is the only formal conclusion carrier published to the PR, bound to the reviewed head SHA, and includes conclusion, findings, receipt, and the Issue artifact link.
|
|
12
|
+
|
|
13
|
+
The three never cross: a regular PR comment does not carry the full process copy; an Issue artifact comment is not treated as a formal Review; a summary is not presented as a formal Review.
|
|
14
|
+
|
|
5
15
|
```bash
|
|
6
16
|
agent-infra-internal platform-pr summary-context {task-id}
|
|
7
17
|
|
|
8
18
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
9
|
-
--agent {agent} --body-file {summary-body-file}
|
|
19
|
+
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
10
20
|
```
|
|
11
21
|
|
|
12
22
|
Use only canonical inputs returned by the context command. Write the plain body without marker or SHA. The core owns `<!-- sync-pr:{task-id}:summary -->`, current `<!-- last-commit: ... -->`, create/update/no-op behavior, and duplicate-marker conflicts. Summary failure never rolls back a PR or commit.
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
# PR 摘要同步
|
|
2
2
|
|
|
3
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
|
|
4
|
+
|
|
3
5
|
PR 摘要的语义聚合由模型完成;canonical 产物选择、marker、当前 HEAD、分页评论查找和 create/update/no-op 由 typed core 负责。
|
|
4
6
|
|
|
7
|
+
## 三层隔离
|
|
8
|
+
|
|
9
|
+
- `sync-pr:{task-id}:summary`(`platform-pr summary-sync`)是可更新的 reviewer 摘要,不是过程原文,也不是正式 Review。
|
|
10
|
+
- `pr-review*` 完整过程原文在 Issue artifact 评论(`platform-comment sync --kind artifact`),由 `restore-task` 按 Issue-only 契约恢复。
|
|
11
|
+
- 正式 PR Review(`platform-pr-review publish`)是唯一发布到 PR 的正式结论载体,绑定被审 head SHA,含结论、finding、receipt 与 Issue artifact 链接。
|
|
12
|
+
|
|
13
|
+
三者不串用:PR 普通评论不承载完整过程原文;Issue artifact 评论不当作正式 Review;摘要不冒充正式 Review。
|
|
14
|
+
|
|
5
15
|
## 聚合输入
|
|
6
16
|
|
|
7
17
|
```bash
|
|
@@ -35,7 +45,7 @@ core 最终包装出的 canonical 评论结构为:
|
|
|
35
45
|
|
|
36
46
|
```bash
|
|
37
47
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
38
|
-
--agent {agent} --body-file {summary-body-file}
|
|
48
|
+
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
39
49
|
```
|
|
40
50
|
|
|
41
51
|
core 会包装唯一 `<!-- sync-pr:{task-id}:summary -->` 和当前 `<!-- last-commit: ... -->`,分页查找 PR 普通评论:不存在则创建、正文变化则原地更新、无差异则 no-op、重复 marker 则稳定失败。正文通过文件输入,调用方不得拼 shell/heredoc。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# PR 摘要同步
|
|
2
2
|
|
|
3
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
|
|
4
|
+
|
|
3
5
|
PR 摘要的语义聚合由模型完成;canonical 产物选择、marker、当前 HEAD、分页评论查找和 create/update/no-op 由 typed core 负责。
|
|
4
6
|
|
|
5
7
|
## 聚合输入
|
|
@@ -23,7 +25,7 @@ agent-infra-internal platform-pr summary-context {task-id}
|
|
|
23
25
|
|
|
24
26
|
```bash
|
|
25
27
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
26
|
-
--agent {agent} --body-file {summary-body-file}
|
|
28
|
+
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
27
29
|
```
|
|
28
30
|
|
|
29
31
|
core 会包装唯一 `<!-- sync-pr:{task-id}:summary -->` 和当前 `<!-- last-commit: ... -->`,分页查找 PR 普通评论:不存在则创建、正文变化则原地更新、无差异则 no-op、重复 marker 则稳定失败。正文通过文件输入,调用方不得拼 shell/heredoc。
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
This code platform does not provide a release-note adapter.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Local `agent-infra-internal platform-release-notes stage --notes-file "{notes-file}"` still normalizes an external file and returns its digest. Use `context` to receive a structured `PLATFORM_RELEASE_NOTES_UNSUPPORTED` no-op and do not probe another platform client. Publish with `--expected-sha256` remains a no-op until an adapter is provided.
|
|
@@ -14,6 +14,15 @@ agent-infra-internal platform-release-notes context \
|
|
|
14
14
|
|
|
15
15
|
The result contains `history`, `pullRequests`, `closingIssues`, and commit `authors` with normalized `login` / `resolution` values. `status: no-op` with error code `PLATFORM_RELEASE_NOTES_UNSUPPORTED` means the current platform does not support remote release-note operations.
|
|
16
16
|
|
|
17
|
+
## Stage Release Notes
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
agent-infra-internal platform-release-notes stage \
|
|
21
|
+
--notes-file "{notes-file}"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The command accepts only an external regular file, normalizes it atomically, and returns SHA-256 for its exact bytes.
|
|
25
|
+
|
|
17
26
|
## Publish Release Notes
|
|
18
27
|
|
|
19
28
|
Call this only after user confirmation:
|
|
@@ -22,7 +31,8 @@ Call this only after user confirmation:
|
|
|
22
31
|
agent-infra-internal platform-release-notes publish \
|
|
23
32
|
--tag "v{version}" \
|
|
24
33
|
--title "v{version}" \
|
|
25
|
-
--notes-file "{notes-file}"
|
|
34
|
+
--notes-file "{notes-file}" \
|
|
35
|
+
--expected-sha256 "{preview-sha256}"
|
|
26
36
|
```
|
|
27
37
|
|
|
28
|
-
The command updates an existing Release or creates it when missing; `--dry-run` returns only the planned operation. Exit code `0` means success, `1` means a stable failure, and `2` means a network or platform block.
|
|
38
|
+
The command recomputes the digest before platform access and performs no platform write on mismatch. On a match it updates an existing Release or creates it when missing; `--dry-run` returns only the planned operation. Exit code `0` means success, `1` means a stable failure, and `2` means a network or platform block.
|
|
@@ -14,6 +14,15 @@ agent-infra-internal platform-release-notes context \
|
|
|
14
14
|
|
|
15
15
|
结果包含 `history`、`pullRequests`、`closingIssues` 和带规范化 `login` / `resolution` 的 commit `authors`。`status: no-op` 且错误码为 `PLATFORM_RELEASE_NOTES_UNSUPPORTED` 表示当前平台不支持远端发布说明能力。
|
|
16
16
|
|
|
17
|
+
## Stage Release notes
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
agent-infra-internal platform-release-notes stage \
|
|
21
|
+
--notes-file "{notes-file}"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
命令只接受工作树外普通文件,原子规范化并返回精确 bytes 的 SHA-256。
|
|
25
|
+
|
|
17
26
|
## 发布 Release notes
|
|
18
27
|
|
|
19
28
|
用户确认后调用:
|
|
@@ -22,7 +31,8 @@ agent-infra-internal platform-release-notes context \
|
|
|
22
31
|
agent-infra-internal platform-release-notes publish \
|
|
23
32
|
--tag "v{version}" \
|
|
24
33
|
--title "v{version}" \
|
|
25
|
-
--notes-file "{notes-file}"
|
|
34
|
+
--notes-file "{notes-file}" \
|
|
35
|
+
--expected-sha256 "{preview-sha256}"
|
|
26
36
|
```
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
命令在平台访问前复算摘要,不匹配时零写入;匹配时更新已有 Release,缺失时创建。`--dry-run` 只返回 planned operation。退出码为 `0` 时成功,`1` 表示稳定失败,`2` 表示网络或平台阻塞。
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
当前代码平台未提供发布说明 adapter。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本地 `agent-infra-internal platform-release-notes stage --notes-file "{notes-file}"` 仍可规范化工作树外文件并返回摘要。调用 `context` 会返回结构化的 `PLATFORM_RELEASE_NOTES_UNSUPPORTED` no-op,不得探测其他平台 client;提供 adapter 前,带 `--expected-sha256` 的 publish 同样保持 no-op。
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
- 成功提交后令 `B=last_reviewed_commit=<new_head>`;`B` 只表示已经落到 Git commit 的审查锚点。
|
|
94
94
|
- `complete-task` 的 `post-review-commit` gate 只使用 B;B 缺失、畸形或对象不存在时报告 `reviewed snapshot was not anchored`,不得回退 R。
|
|
95
95
|
- 若 B 之后代码 / 规则路径出现新提交,gate 会拦截,要求重新 `review-code`。自动例外仅限两类:(1) 绑定的平台变更请求(PR/MR)已合并,且平台适配器提供权威快照与远端 Git 证据引用;gate 在隔离的临时仓库中抓取受审查 head 与目标分支,证明 B 是原变更请求 head、merge commit 位于权威目标分支历史中、受审查变更与单父 squash commit 的规范化补丁完全一致,并且 merge 后受保护路径没有新提交;(2) 无有效变更请求,B 后恰有一个受保护路径提交,该提交是本地 HEAD 历史中的单父重写,且它与 B 的完整 tree 相同或受保护内容相同,重写后也没有受保护路径提交。适配器不支持该能力,缺少所需平台 / Git 证据,或当前 Git 凭据不能读取这些远端 refs 时 fail closed。
|
|
96
|
-
-
|
|
96
|
+
- 全部 PR checks 由合并前的 `review-code` / `watch-pr` 路由负责,其中 required checks 仍受分支保护 / ruleset 强制。post-review-commit 仍独立执行适用的严格 / PR squash / 本地重写等价判定。
|
|
97
97
|
- **豁免**:在账本追加一行 `| PRC-1 | post-review-commit | - | - | human-decided | <裁定说明> |`,记录人工明确允许该批提交免复审。
|
|
98
98
|
|
|
99
99
|
## gate 行为速查
|
|
@@ -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.
|
|
@@ -72,4 +83,6 @@ Map user intent to the corresponding workflow command:
|
|
|
72
83
|
- **Deferred form (the skill creates task.md, so there is no file to write to at the start)** — capture `started_at` in memory before running, then when writing the Activity Log at the end, **append both lines at once** (started line uses `started_at`, done line uses the completion time):
|
|
73
84
|
`create-task`, `import-issue`, `import-codescan`, `import-dependabot`.
|
|
74
85
|
|
|
86
|
+
- **After host resolution** — `review-pr` writes started through `task-activity pr-review-start` only after resolving the unique task host, canonical round, and reviewed head. Success closes through `pr-review-complete`; a controlled pre-publication failure or head drift closes through `pr-review-terminate` with an `aborted` / `superseded` terminal. Replaying the same task/round/head/terminal payload is a no-op; one-shot review never writes a task Activity Log.
|
|
87
|
+
|
|
75
88
|
**Exceptions**: read-only inspection skills that do not represent real progress (e.g. `check-task`) do not write started. A bare operation with no task.md context (e.g. a `commit` not tied to a task) likewise skips it.
|
|
@@ -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 或重新拼接三段状态命令。
|
|
@@ -75,4 +86,6 @@
|
|
|
75
86
|
- **延迟补写(本技能创建 task.md,开始时无文件可写)**——开始执行前先在内存记录 `started_at`,最后写活动日志时**一次性补两条**(started 行用 `started_at`、done 行用完成时间):
|
|
76
87
|
`create-task`、`import-issue`、`import-codescan`、`import-dependabot`。
|
|
77
88
|
|
|
89
|
+
- **宿主解析后写入**——`review-pr` 只有在唯一任务宿主、canonical round 与被审 head 确定后才通过 `task-activity pr-review-start` 写 started;成功以 `pr-review-complete` 闭合,已知未发布的受控失败或 head 漂移以 `pr-review-terminate` 写 `aborted` / `superseded` 终态。同一 task/round/head/terminal payload 重放为 no-op;一次性检视不写任务日志。
|
|
90
|
+
|
|
78
91
|
**例外**:`check-task` 等只读巡检类、不代表实质工作推进的技能不写 started。无 task.md 上下文的纯操作(如无关联任务的 `commit`)同样跳过。
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -115,7 +117,7 @@ Optional: clean up this task's sandbox
|
|
|
115
117
|
ai sandbox rm {branch}
|
|
116
118
|
|
|
117
119
|
To unblock when the issue is resolved:
|
|
118
|
-
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}"
|
|
119
121
|
|
|
120
122
|
Next step - check task status after unblocking:
|
|
121
123
|
{next-step-commands}
|
|
@@ -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
|
|
|
@@ -116,7 +118,7 @@ agent-infra-internal task-verify {task-id} block-task.completed --format text
|
|
|
116
118
|
ai sandbox rm {branch}
|
|
117
119
|
|
|
118
120
|
解除阻塞时执行:
|
|
119
|
-
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 "{恢复说明}"
|
|
120
122
|
|
|
121
123
|
下一步 - 检查任务状态(解除阻塞后):
|
|
122
124
|
{next-step-commands}
|
|
@@ -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
|
|
@@ -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
|
- 取消原因
|
|
@@ -6,6 +6,8 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Dismiss Code Scanning Alert
|
|
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
|
Dismiss the specified Code Scanning (CodeQL) alert and record a justified reason.
|
|
11
13
|
|
|
@@ -81,7 +83,7 @@ Dismiss the alert by following the Code Scanning dismiss command in `.agents/rul
|
|
|
81
83
|
If a related task exists (search for `codescan_alert_number: <alert-number>`):
|
|
82
84
|
|
|
83
85
|
```bash
|
|
84
|
-
agent-infra-internal task-lifecycle {task-id} close-codescan --agent {agent} \
|
|
86
|
+
agent-infra-internal task-lifecycle {task-id} close-codescan --agent {standard-agent-token} \
|
|
85
87
|
--alert-number {alert-number} --reason "{reason}"
|
|
86
88
|
```
|
|
87
89
|
|
|
@@ -6,6 +6,8 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 关闭 Code Scanning 告警
|
|
9
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。
|
|
10
|
+
|
|
9
11
|
|
|
10
12
|
关闭指定的 Code Scanning(CodeQL)告警并记录合理的关闭理由。
|
|
11
13
|
|
|
@@ -81,7 +83,7 @@ Code Scanning 告警 #{alert-number}
|
|
|
81
83
|
如果有关联任务(搜索 `codescan_alert_number: <alert-number>`):
|
|
82
84
|
|
|
83
85
|
```bash
|
|
84
|
-
agent-infra-internal task-lifecycle {task-id} close-codescan --agent {agent} \
|
|
86
|
+
agent-infra-internal task-lifecycle {task-id} close-codescan --agent {standard-agent-token} \
|
|
85
87
|
--alert-number {alert-number} --reason "{reason}"
|
|
86
88
|
```
|
|
87
89
|
|