@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 多 AI 协作指南
|
|
2
2
|
|
|
3
|
-
本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、
|
|
3
|
+
本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、Antigravity CLI、OpenCode 等。
|
|
4
4
|
|
|
5
5
|
## 双配置架构
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|---------|---------|---------|
|
|
11
11
|
| Claude Code | `.claude/`(CLAUDE.md、commands/、settings.json) | - |
|
|
12
12
|
| OpenAI Codex CLI | `AGENTS.md` | - |
|
|
13
|
-
|
|
|
13
|
+
| Antigravity CLI | `AGENTS.md`、`.agents/skills/` | - |
|
|
14
14
|
| OpenCode | `AGENTS.md` | - |
|
|
15
15
|
| 其他 AI 工具 | `AGENTS.md` | 项目 README |
|
|
16
16
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
|
|
76
76
|
每个 AI 工具有不同的优势,请据此分配任务:
|
|
77
77
|
|
|
78
|
-
| 能力 | Claude Code | Codex CLI |
|
|
78
|
+
| 能力 | Claude Code | Codex CLI | Antigravity CLI | OpenCode |
|
|
79
79
|
|-----|-------------|-----------|------------|----------|
|
|
80
80
|
| 代码库分析 | 优秀 | 良好 | 优秀 | 良好 |
|
|
81
81
|
| 代码审查 | 优秀 | 良好 | 良好 | 良好 |
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
|
|
89
89
|
- **分析和审查** - Claude Code(推理能力强,探索全面)
|
|
90
90
|
- **代码实现** - Codex CLI 或 OpenCode(代码生成快,命令式工作流顺手)
|
|
91
|
-
- **大上下文任务** -
|
|
91
|
+
- **大上下文任务** - Antigravity CLI(大上下文窗口,适合跨文件分析)
|
|
92
92
|
- **命令式迭代** - OpenCode(适合按工作流连续推进)
|
|
93
93
|
|
|
94
94
|
## 快速入门
|
|
@@ -173,7 +173,7 @@ disable-model-invocation: true # 可选;由支持该能力的 TUI 适配器
|
|
|
173
173
|
|
|
174
174
|
当生成的 TUI 命令需要禁用模型调用时,将通用可选字段 `disable-model-invocation` 设为 `true`;各 TUI 适配器按自身能力决定是否消费。多行 `description` 如需保留换行,使用 YAML literal block(`|`);同步器会为各 TUI 输出对应的多行元数据格式。
|
|
175
175
|
|
|
176
|
-
新增或修改自定义 skill 后,再执行一次 `update-agent-infra`。同步过程会自动检测非内置 skill
|
|
176
|
+
新增或修改自定义 skill 后,再执行一次 `update-agent-infra`。同步过程会自动检测非内置 skill,为 Claude Code 和 OpenCode 生成对应命令;Antigravity CLI 则直接发现共享 skill。
|
|
177
177
|
|
|
178
178
|
### 共享 skill 源
|
|
179
179
|
|
|
@@ -218,37 +218,41 @@ disable-model-invocation: true # 可选;由支持该能力的 TUI 适配器
|
|
|
218
218
|
|
|
219
219
|
`ejected` 条目支持字面路径或 glob,匹配规则与 `merged` 相同。
|
|
220
220
|
|
|
221
|
-
##
|
|
221
|
+
## Agent Client 配置
|
|
222
222
|
|
|
223
|
-
`.agents/.airc.json` 顶层 `
|
|
223
|
+
`.agents/.airc.json` 顶层 `agentClients` 数组用于配置全部四个内建客户端(`claude-code`、`codex`、`antigravity-cli`、`opencode`)。每个规范条目包含三个必填字段和一个可选编排策略:
|
|
224
224
|
|
|
225
|
-
|
|
|
225
|
+
| 字段 | 含义 |
|
|
226
226
|
|------|------|
|
|
227
|
-
| `
|
|
228
|
-
| `
|
|
229
|
-
| `
|
|
227
|
+
| `id` | 内建 Agent Client id。规范数组为每个内建客户端保留且仅保留一个条目。 |
|
|
228
|
+
| `enabled` | agent-infra 是否写入并维护该客户端的项目集成与种子命令。 |
|
|
229
|
+
| `installInSandbox` | 沙箱镜像是否安装该客户端 CLI;此字段与 `enabled` 相互独立。 |
|
|
230
|
+
| `orchestration` | `run-task` 可选默认策略;必须同时提供 executor/reviewer 的 `model` 与宿主原生 `reasoningEffort`,两个角色可以使用同一模型。 |
|
|
231
|
+
|
|
232
|
+
`run-task` 的显式 model/effort 参数是原子输入:只要提供其中任一字段,就必须完整提供四个 role 字段,不能从配置补齐。完全没有显式策略时,只读取当前客户端的 `orchestration`。模型目录通过 `agent-infra-internal agent-client model-selection --client <id>` 查询,并明确标记 complete、partial 或 interactive-only;局部 override 列表不能当作完整目录。
|
|
230
233
|
|
|
231
|
-
|
|
234
|
+
无需手工编辑 JSON,可使用:
|
|
232
235
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
-
|
|
236
|
-
-
|
|
236
|
+
```bash
|
|
237
|
+
ai agent-client list
|
|
238
|
+
ai agent-client status
|
|
239
|
+
ai agent-client enable codex
|
|
240
|
+
ai agent-client disable antigravity-cli
|
|
241
|
+
ai agent-client configure
|
|
242
|
+
```
|
|
237
243
|
|
|
238
|
-
|
|
244
|
+
`enable` 和 `disable` 只修改 `enabled`;`configure` 同时编辑两个维度。`ai init` 会询问启用哪些客户端,直接回车会保留界面展示的默认值。所有客户端的 `installInSandbox` 默认均为 `true`。
|
|
239
245
|
|
|
240
|
-
|
|
246
|
+
旧 `tuis` 字段和 `sandbox.tools` 中的内建客户端 id 仅作为迁移输入。下一次写配置的命令会将其转换为规范 `agentClients` 数组并移除旧字段。若规范配置与旧配置冲突,命令会在修改文件前停止,要求显式解决冲突。
|
|
241
247
|
|
|
242
|
-
|
|
243
|
-
- 在回填 `files.managed` / `files.merged` 时跳过该 TUI owned 的默认条目;
|
|
244
|
-
- **物理清理**该 TUI owned 路径前缀(`.claude/`、`.codex/`、`.gemini/`、`.opencode/`)下的已有文件——清理列表会出现在 `report.managed.removed`,与切换 `platform` 时的清理行为一致。
|
|
248
|
+
### 取消 Agent Client 的副作用
|
|
245
249
|
|
|
246
|
-
|
|
250
|
+
取消某个内建客户端后,协调流程会停止维护其种子命令和 owned 注册项。未修改的生成种子文件可以被删除;本地修改过的种子文件会受到保护并进入报告。`files.ejected` 中的文件仍由项目所有并会被保留。
|
|
247
251
|
|
|
248
252
|
### 与其他配置字段的关系
|
|
249
253
|
|
|
250
|
-
- `
|
|
251
|
-
- `
|
|
254
|
+
- `sandbox.tools` 现在只列出 `agent-infra` 和自定义工具等非客户端工具。内建客户端的安装状态由 `agentClients[].installInSandbox` 表达。
|
|
255
|
+
- `agentClients` 与 `customTUIs`(见下)相互独立。即使自定义 TUI 目录落在已取消的内建客户端路径前缀下,其命令文件也会被保留。
|
|
252
256
|
|
|
253
257
|
## 自定义 TUI 配置
|
|
254
258
|
|
|
@@ -300,7 +304,7 @@ disable-model-invocation: true # 可选;由支持该能力的 TUI 适配器
|
|
|
300
304
|
|
|
301
305
|
## 沙箱自定义工具(Sandbox Custom Tools)
|
|
302
306
|
|
|
303
|
-
`customTUIs` 只负责生成 slash-command 文件,**不影响沙箱镜像**。如果要把一个非 npm 分发的 CLI 或工具(pip / cargo / curl 脚本 / 裸二进制)装进沙箱镜像、并 live-mount 它的凭证目录,需要在 `.agents/.airc.json` 的 `sandbox.customTools` 中声明。内建
|
|
307
|
+
`customTUIs` 只负责生成 slash-command 文件,**不影响沙箱镜像**。如果要把一个非 npm 分发的 CLI 或工具(pip / cargo / curl 脚本 / 裸二进制)装进沙箱镜像、并 live-mount 它的凭证目录,需要在 `.agents/.airc.json` 的 `sandbox.customTools` 中声明。内建 Agent Client 按 `agentClients[].installInSandbox` 安装;`agent-infra` 仍是 `sandbox.tools` 中的非客户端条目,只提供沙箱内的 `ai` / `agent-infra` CLI。
|
|
304
308
|
|
|
305
309
|
### 必填字段
|
|
306
310
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const MAX_INPUT_BYTES = 64 * 1024;
|
|
6
|
+
const localInternalCli = fileURLToPath(new URL('../../dist/bin/internal-cli.js', import.meta.url));
|
|
7
|
+
const clientIndex = process.argv.indexOf('--client');
|
|
8
|
+
const client = clientIndex >= 0 ? process.argv[clientIndex + 1] : '';
|
|
9
|
+
if (client !== 'claude-code') {
|
|
10
|
+
process.stderr.write('Lifecycle delegation hook requires a supported --client value\n');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
let input = '';
|
|
14
|
+
process.stdin.setEncoding('utf8');
|
|
15
|
+
process.stdin.on('data', (chunk) => {
|
|
16
|
+
input += chunk;
|
|
17
|
+
if (Buffer.byteLength(input) > MAX_INPUT_BYTES) {
|
|
18
|
+
process.stderr.write('Lifecycle delegation hook input exceeds 64 KiB\n');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
process.stdin.on('end', () => {
|
|
23
|
+
let event;
|
|
24
|
+
try {
|
|
25
|
+
event = JSON.parse(input || '{}');
|
|
26
|
+
} catch {
|
|
27
|
+
process.stderr.write('Lifecycle delegation hook received invalid JSON\n');
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
const hook = String(event.hook_event_name || event.event || '').toLowerCase();
|
|
31
|
+
const nativeAgent = event.agent_name || event.agent_type || event.agent?.name;
|
|
32
|
+
if (!String(nativeAgent || '').startsWith('agent-infra-lifecycle-')) process.exit(0);
|
|
33
|
+
const start = hook.includes('start');
|
|
34
|
+
const stop = hook.includes('stop');
|
|
35
|
+
if (!start && !stop) {
|
|
36
|
+
process.stderr.write('Managed lifecycle hook event has an unknown type\n');
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
const args = ['task-orchestration', 'auto', start ? 'hook-start' : 'hook-stop', '--client', client];
|
|
40
|
+
if (start) {
|
|
41
|
+
args.push(
|
|
42
|
+
'--native-agent', String(nativeAgent),
|
|
43
|
+
'--child-id', String(event.child_id || event.agent_id || event.thread_id || ''),
|
|
44
|
+
'--parent-id', String(event.parent_id || event.parent_session_id || event.session_id || ''),
|
|
45
|
+
'--spawn-mode', String(event.spawn_mode || (client === 'claude-code' ? 'fresh' : ''))
|
|
46
|
+
);
|
|
47
|
+
if (event.model) args.push('--actual-model', String(event.model));
|
|
48
|
+
const actualEffort = event.actual_reasoning_effort || event.reasoning_effort || event.model_reasoning_effort;
|
|
49
|
+
if (actualEffort) args.push('--actual-reasoning-effort', String(actualEffort));
|
|
50
|
+
if (event.model_fallback_reason) args.push('--model-fallback-reason', String(event.model_fallback_reason));
|
|
51
|
+
if (event.reasoning_effort_fallback_reason) {
|
|
52
|
+
args.push('--reasoning-effort-fallback-reason', String(event.reasoning_effort_fallback_reason));
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
args.push(
|
|
56
|
+
'--native-agent', String(nativeAgent),
|
|
57
|
+
'--child-id', String(event.child_id || event.agent_id || event.thread_id || '')
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const useLocal = existsSync(localInternalCli);
|
|
62
|
+
const command = useLocal ? process.execPath : 'agent-infra-internal';
|
|
63
|
+
const commandArgs = useLocal ? [localInternalCli, ...args] : args;
|
|
64
|
+
const output = execFileSync(command, commandArgs, {
|
|
65
|
+
encoding: 'utf8',
|
|
66
|
+
shell: !useLocal && process.platform === 'win32',
|
|
67
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
68
|
+
});
|
|
69
|
+
process.stdout.write(output);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (error.stdout) process.stdout.write(String(error.stdout));
|
|
72
|
+
if (error.stderr) process.stderr.write(String(error.stderr));
|
|
73
|
+
process.exit(typeof error.status === 'number' ? error.status : 1);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
@@ -25,7 +25,9 @@ so you can quickly find "which ones to read" without opening each file.
|
|
|
25
25
|
## Task Workflow
|
|
26
26
|
|
|
27
27
|
- [`task-management.md`](task-management.md) — Task intent detection and workflow-command mapping.
|
|
28
|
+
- [`lifecycle-orchestration.md`](lifecycle-orchestration.md) — Fresh executor/reviewer, one-use receipt, pause/recovery, and safe endpoint rules for `run-task`.
|
|
28
29
|
- [`review-handshake.md`](review-handshake.md) — Three-stage bidirectional review handshake: four-state disposition, symmetric evidence, disagreement ledger, convergence and post-review commit gate.
|
|
30
|
+
- [`review-method.md`](review-method.md) — Shared three-stage review method: multi-pass review, risk lenses, traceability, and finding evidence.
|
|
29
31
|
- [`human-decision-context.md`](human-decision-context.md) — Self-contained context and canonical structure for new human-decision details.
|
|
30
32
|
- [`task-short-id.md`](task-short-id.md) — Resolution, allocation and lifecycle of bare-number short ids.
|
|
31
33
|
- [`milestone-inference.md`](milestone-inference.md) — Milestone inference for create-task / code-task / create-pr.
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
## 任务工作流
|
|
25
25
|
|
|
26
26
|
- [`task-management.md`](task-management.md) — 任务语义识别与工作流命令映射。
|
|
27
|
+
- [`lifecycle-orchestration.md`](lifecycle-orchestration.md) — `run-task` 的 fresh executor/reviewer、一次性 receipt、暂停恢复与安全终点规则。
|
|
27
28
|
- [`review-handshake.md`](review-handshake.md) — 三阶段双向审查握手协议:四态处置、对称证据、分歧账本、收敛与 post-review commit 门禁。
|
|
29
|
+
- [`review-method.md`](review-method.md) — 三阶段共享检视方法:多遍检视、风险镜头、追踪与 finding 证据契约。
|
|
28
30
|
- [`human-decision-context.md`](human-decision-context.md) — 新建人工裁决详情的自足上下文与规范结构。
|
|
29
31
|
- [`task-short-id.md`](task-short-id.md) — 裸数字任务短号的解析、分配与生命周期。
|
|
30
32
|
- [`milestone-inference.md`](milestone-inference.md) — create-task / code-task / create-pr 的 milestone 推断。
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
- Never run `git commit` or `git add` automatically
|
|
13
13
|
- Enter the commit workflow only when the user explicitly requests a commit
|
|
14
|
+
- The only exception is a one-use commit authorization issued by an active `run-task` explicitly started by the user. It authorizes this commit round but does not relax staging, sensitive-file, copyright, test, review-snapshot, HEAD/tree, or push gates.
|
|
14
15
|
- After finishing code changes, remind the user to use the appropriate TUI commit command
|
|
15
16
|
|
|
16
17
|
## PR Rules
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# Issue Creation
|
|
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
|
After `create-task` writes task.md, create and initialize the Issue through declarative internal intents:
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
agent-infra-internal platform-issue create {task-id} --agent {agent}
|
|
7
|
-
agent-infra-internal platform-issue sync {task-id} --agent {agent} --status waiting-for-triage --assignees current --milestone initial --issue-type --fields
|
|
8
|
+
agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
|
|
9
|
+
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status waiting-for-triage --assignees current --milestone initial --issue-type --fields
|
|
8
10
|
```
|
|
9
11
|
|
|
10
12
|
The core reads only persisted task identity, title, type, description, and requirements, and reuses deterministic `ai task issue-body` rendering. It owns template selection, upstream/capabilities, duplicate prevention, POST outcome boundaries, response validation, and atomic `issue_number` binding.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Issue 创建
|
|
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
|
当 `create-task` 完成本地 `task.md` 落盘后,通过声明式内部命令创建 Issue:
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
agent-infra-internal platform-issue create {task-id} --agent {agent}
|
|
8
|
+
agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
|
|
7
9
|
```
|
|
8
10
|
|
|
9
11
|
命令只从已落盘 task.md 读取身份、标题、类型、描述与需求,并复用 `ai task issue-body` 的确定性正文渲染。它负责模板选择、upstream/capability、已有绑定检查、非幂等 POST 边界、响应身份校验及通过任务写入内核回写 `issue_number`。
|
|
@@ -11,7 +13,7 @@ agent-infra-internal platform-issue create {task-id} --agent {agent}
|
|
|
11
13
|
创建后的初始元数据使用同一适配层同步:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
|
-
agent-infra-internal platform-issue sync {task-id} --agent {agent} \
|
|
16
|
+
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} \
|
|
15
17
|
--status waiting-for-triage --assignees current --milestone initial --issue-type --fields
|
|
16
18
|
```
|
|
17
19
|
|
|
@@ -4,32 +4,34 @@ This rule governs every new `[needs-human-decision]` detail block produced by an
|
|
|
4
4
|
|
|
5
5
|
## Self-contained Context
|
|
6
6
|
|
|
7
|
-
A maintainer must be able to
|
|
7
|
+
A maintainer must be able to understand the issue and choose without knowing the internal workflow or asking a model to reconstruct context. Start in plain language: explain why a decision is needed now, what must be chosen, which choice is recommended, and why. Then explain what the choice affects and what could go wrong if the wrong choice is made or no action is taken.
|
|
8
|
+
|
|
9
|
+
Provide at least two options with short names, and state the benefits and trade-offs of each one. Explain internal terms such as stage, severity, and evidence the first time they appear. IDs and evidence are for lookup and troubleshooting; they do not replace the plain-language explanation.
|
|
8
10
|
|
|
9
11
|
## Canonical Structure
|
|
10
12
|
|
|
11
13
|
```markdown
|
|
12
14
|
### {AN-N|PL-N|CD-N|HD-N}: {Title} [needs-human-decision]
|
|
13
15
|
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
16
|
+
- **Why a decision is needed now**: {plain-language facts, constraints, and why work cannot simply continue}
|
|
17
|
+
- **What needs a decision**: {the one choice that must be made}
|
|
18
|
+
- **Recommended choice**: {Option A/B/...}
|
|
19
|
+
- **Why this choice**: {reason based on benefits, trade-offs, and current constraints}
|
|
20
|
+
- **What this affects**: {affected behavior, files, users, or future practice}
|
|
21
|
+
- **What could go wrong**: {problems caused by the wrong choice or no action}
|
|
20
22
|
|
|
21
23
|
#### Option A: {Name}
|
|
22
24
|
|
|
23
|
-
- **Benefits**: {
|
|
24
|
-
- **
|
|
25
|
+
- **Benefits**: {what this option provides}
|
|
26
|
+
- **Trade-offs**: {what this option costs and where it falls short}
|
|
25
27
|
|
|
26
28
|
#### Option B: {Name}
|
|
27
29
|
|
|
28
|
-
- **Benefits**: {
|
|
29
|
-
- **
|
|
30
|
+
- **Benefits**: {what this option provides}
|
|
31
|
+
- **Trade-offs**: {what this option costs and where it falls short}
|
|
30
32
|
```
|
|
31
33
|
|
|
32
|
-
Option C and supporting evidence may be added, but none of the
|
|
34
|
+
Option C and supporting evidence may be added, but none of the information above may be omitted or collapsed into an incomparable one-line option list. The heading ID must match the task.md Review Disagreement Ledger row. Its evidence (the reference used to find the original explanation) must point to this stable heading anchor.
|
|
33
35
|
|
|
34
36
|
## Decision Closure
|
|
35
37
|
|
|
@@ -4,32 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
## 自足性要求
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
详情必须让维护者不需要了解内部流程,也不需要再问模型,就能看懂并做选择。先用大白话说明为什么现在需要决定、具体要选什么、建议选哪个以及原因;再说明会影响什么、选错或暂不处理会怎样。
|
|
8
|
+
|
|
9
|
+
每项至少提供两个有简短名称的方案,并分别写清好处和代价。第一次出现 stage、severity、evidence 等内部术语时,必须顺手解释它们的意思;ID 和 evidence 只用于后续查找和排查,不能代替问题说明。
|
|
8
10
|
|
|
9
11
|
## 规范结构
|
|
10
12
|
|
|
11
13
|
```markdown
|
|
12
14
|
### {AN-N|PL-N|CD-N|HD-N}:{标题} [needs-human-decision]
|
|
13
15
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
- **为什么现在要决定**:{用大白话说明已知情况、限制,以及为什么不能直接继续}
|
|
17
|
+
- **要决定什么**:{本次只需要选定的一件事}
|
|
18
|
+
- **建议选哪个**:{方案 A/B/...}
|
|
19
|
+
- **为什么这样建议**:{结合好处、代价和现有限制说明原因}
|
|
20
|
+
- **会影响什么**:{会受影响的功能、文件、用户或后续做法}
|
|
21
|
+
- **如果选错或暂不处理**:{可能出现的问题}
|
|
20
22
|
|
|
21
23
|
#### 方案 A:{名称}
|
|
22
24
|
|
|
23
|
-
-
|
|
24
|
-
- **代价**:{
|
|
25
|
+
- **好处**:{选择该方案能得到什么}
|
|
26
|
+
- **代价**:{选择该方案要付出什么、有哪些局限}
|
|
25
27
|
|
|
26
28
|
#### 方案 B:{名称}
|
|
27
29
|
|
|
28
|
-
-
|
|
29
|
-
- **代价**:{
|
|
30
|
+
- **好处**:{选择该方案能得到什么}
|
|
31
|
+
- **代价**:{选择该方案要付出什么、有哪些局限}
|
|
30
32
|
```
|
|
31
33
|
|
|
32
|
-
可增加方案 C
|
|
34
|
+
可增加方案 C 或补充证据,但不得省略上述信息或把多个方案压缩为无法分别比较的一行。标题 ID 必须与 task.md `## 审查分歧账本` 行一致;evidence(用于定位原始说明的引用)必须指向该标题的稳定锚点。
|
|
33
35
|
|
|
34
36
|
## 裁决闭环
|
|
35
37
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Issue Fields
|
|
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
|
Synchronize Issue Type and pinned fields through one intent:
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
agent-infra-internal platform-issue sync {task-id} --agent {agent} --issue-type --fields
|
|
8
|
+
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --issue-type --fields
|
|
7
9
|
```
|
|
8
10
|
|
|
9
11
|
Supported task.md mappings are `priority` → `Priority`, `effort` → `Effort`, `start_date` → `Start date`, and `target_date` → `Target date`. The core normalizes localized priority/effort options and validates `YYYY-MM-DD` dates.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Issue 字段
|
|
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
|
Issue Type 与 pinned fields 统一由 `platform-issue` intent 动态读取组织 schema 并同步:
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
|
-
agent-infra-internal platform-issue sync {task-id} --agent {agent} --issue-type --fields
|
|
8
|
+
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --issue-type --fields
|
|
7
9
|
```
|
|
8
10
|
|
|
9
11
|
## 支持字段
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# PR Platform Intents
|
|
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
|
PR lookup, creation, binding, and metadata synchronization go through typed internal intents. Skills decide branches and write titles/bodies; they do not assemble platform commands.
|
|
4
6
|
|
|
5
7
|
## Inspect
|
|
@@ -14,7 +16,7 @@ Write the title and body to files, then run:
|
|
|
14
16
|
|
|
15
17
|
```bash
|
|
16
18
|
agent-infra-internal platform-pr create {task-id} \
|
|
17
|
-
--agent {agent} --base {target-branch} --head {current-branch} \
|
|
19
|
+
--agent {standard-agent-token} --base {target-branch} --head {current-branch} \
|
|
18
20
|
--title-file {title-file} --body-file {body-file}
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -23,7 +25,7 @@ The core performs exact upstream/head/base lookup first. One match is reused, ze
|
|
|
23
25
|
## Bind
|
|
24
26
|
|
|
25
27
|
```bash
|
|
26
|
-
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
|
|
28
|
+
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
|
|
27
29
|
```
|
|
28
30
|
|
|
29
31
|
Conflicting bindings fail without changing `task.md`.
|
|
@@ -32,7 +34,7 @@ Conflicting bindings fail without changing `task.md`.
|
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
36
|
agent-infra-internal platform-pr sync {task-id} \
|
|
35
|
-
--agent {agent} --metadata --closing-issue
|
|
37
|
+
--agent {standard-agent-token} --metadata --closing-issue
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
The core copies type / `in:` labels, assignee, a specific milestone, and the closing association from the linked Issue. Permission-bound operations report `skipped` under top-level `degraded`; the Issue is never updated in reverse.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# PR Platform Intents
|
|
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
|
PR lookup, creation, binding, and metadata synchronization go through typed internal intents. Skills decide branches and write titles/bodies; they do not assemble platform commands.
|
|
4
6
|
|
|
5
7
|
## Inspect
|
|
@@ -12,7 +14,7 @@ agent-infra-internal platform-pr inspect {task-id}
|
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
16
|
agent-infra-internal platform-pr create {task-id} \
|
|
15
|
-
--agent {agent} --base {target-branch} --head {current-branch} \
|
|
17
|
+
--agent {standard-agent-token} --base {target-branch} --head {current-branch} \
|
|
16
18
|
--title-file {title-file} --body-file {body-file}
|
|
17
19
|
```
|
|
18
20
|
|
|
@@ -21,10 +23,10 @@ The core performs exact upstream/head/base lookup. One match is reused, zero cre
|
|
|
21
23
|
## Bind and synchronize
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
|
-
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
|
|
26
|
+
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
|
|
25
27
|
|
|
26
28
|
agent-infra-internal platform-pr sync {task-id} \
|
|
27
|
-
--agent {agent} --metadata --closing-issue
|
|
29
|
+
--agent {standard-agent-token} --metadata --closing-issue
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
Conflicting bindings do not change `task.md`. Metadata comes from the linked Issue, permission-bound items degrade independently, and an already-created PR is never rolled back.
|
|
@@ -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 资源的定位、创建、绑定和元数据同步统一通过 typed internal intent;SKILL 只负责决定分支、标题、正文和调用时机,不直接拼装平台命令。
|
|
4
6
|
|
|
5
7
|
## 定位
|
|
@@ -16,7 +18,7 @@ agent-infra-internal platform-pr inspect {task-id}
|
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
20
|
agent-infra-internal platform-pr create {task-id} \
|
|
19
|
-
--agent {agent} --base {target-branch} --head {current-branch} \
|
|
21
|
+
--agent {standard-agent-token} --base {target-branch} --head {current-branch} \
|
|
20
22
|
--title-file {title-file} --body-file {body-file}
|
|
21
23
|
```
|
|
22
24
|
|
|
@@ -25,7 +27,7 @@ core 会先按 upstream、head 和 base 精确定位;唯一既有 PR 会复用
|
|
|
25
27
|
## 显式绑定
|
|
26
28
|
|
|
27
29
|
```bash
|
|
28
|
-
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
|
|
30
|
+
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
冲突绑定稳定失败且不修改 `task.md`。
|
|
@@ -34,7 +36,7 @@ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
|
|
|
34
36
|
|
|
35
37
|
```bash
|
|
36
38
|
agent-infra-internal platform-pr sync {task-id} \
|
|
37
|
-
--agent {agent} --metadata --closing-issue
|
|
39
|
+
--agent {standard-agent-token} --metadata --closing-issue
|
|
38
40
|
```
|
|
39
41
|
|
|
40
42
|
core 从关联 Issue 复制 type / `in:` labels、assignee、具体 milestone,并确保 closing association。权限不足返回逐项 `skipped` 和顶层 `degraded`;不得反向修改 Issue。
|
|
@@ -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 资源的定位、创建、绑定和元数据同步统一通过 typed internal intent;SKILL 只负责决定分支、标题、正文和调用时机,不直接拼装平台命令。
|
|
4
6
|
|
|
5
7
|
## 定位
|
|
@@ -16,7 +18,7 @@ agent-infra-internal platform-pr inspect {task-id}
|
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
20
|
agent-infra-internal platform-pr create {task-id} \
|
|
19
|
-
--agent {agent} --base {target-branch} --head {current-branch} \
|
|
21
|
+
--agent {standard-agent-token} --base {target-branch} --head {current-branch} \
|
|
20
22
|
--title-file {title-file} --body-file {body-file}
|
|
21
23
|
```
|
|
22
24
|
|
|
@@ -25,7 +27,7 @@ core 会先按 upstream、head 和 base 精确定位;唯一既有 PR 会复用
|
|
|
25
27
|
## 显式绑定
|
|
26
28
|
|
|
27
29
|
```bash
|
|
28
|
-
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
|
|
30
|
+
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
冲突绑定稳定失败且不修改 `task.md`。
|
|
@@ -34,7 +36,7 @@ agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {agent}
|
|
|
34
36
|
|
|
35
37
|
```bash
|
|
36
38
|
agent-infra-internal platform-pr sync {task-id} \
|
|
37
|
-
--agent {agent} --metadata --closing-issue
|
|
39
|
+
--agent {standard-agent-token} --metadata --closing-issue
|
|
38
40
|
```
|
|
39
41
|
|
|
40
42
|
core 从关联 Issue 复制 type / `in:` labels、assignee、具体 milestone,并确保 closing association。权限不足返回逐项 `skipped` 和顶层 `degraded`;不得反向修改 Issue。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Issue Sync
|
|
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
|
## Marker Registry
|
|
4
6
|
|
|
5
7
|
| Key | Marker |
|
|
@@ -10,13 +12,15 @@
|
|
|
10
12
|
| `summary` | `<!-- sync-issue:{task-id}:summary -->` |
|
|
11
13
|
| `cancel` | `<!-- sync-issue:{task-id}:cancel -->` |
|
|
12
14
|
|
|
15
|
+
`pr-review` content is synced only as an Issue artifact comment (via the `artifact` / `artifactChunk` markers) and is never a `restore-task` recovery source; restore still accepts only an Issue number and reads only registered Issue markers, with no PR source.
|
|
16
|
+
|
|
13
17
|
Comments use `platform-comment`; Issue resources use `platform-issue`:
|
|
14
18
|
|
|
15
19
|
```bash
|
|
16
20
|
agent-infra-internal platform-issue inspect {task-id}
|
|
17
|
-
agent-infra-internal platform-issue create {task-id} --agent {agent}
|
|
18
|
-
agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {agent}
|
|
19
|
-
agent-infra-internal platform-issue sync {task-id} --agent {agent} {desired-state-flags}
|
|
21
|
+
agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
|
|
22
|
+
agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {standard-agent-token}
|
|
23
|
+
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} {desired-state-flags}
|
|
20
24
|
```
|
|
21
25
|
|
|
22
26
|
The core owns status/in labels, assignees, milestones, Issue Type, pinned fields, requirements, state, capabilities, dry-run, retries, errors, and idempotency. Omitted flags preserve values; `none` explicitly clears them. Status labels converge to at most one, and ambiguous requirement identity fails closed.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Issue 同步规则
|
|
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
|
## Marker 注册表
|
|
4
6
|
|
|
5
7
|
以下 key 及格式是 Issue 评论身份的兼容契约;调用方只传 key/资源,不自行拼 marker。
|
|
@@ -14,6 +16,8 @@
|
|
|
14
16
|
|
|
15
17
|
`prSummary` 属于 `.agents/rules/pr-sync.md`,本规则不实现 PR 聚合。
|
|
16
18
|
|
|
19
|
+
`pr-review` 原文只通过 `artifact` / `artifactChunk` marker 同步为 Issue artifact 评论,不作为 `restore-task` 恢复来源;恢复仍只接受 Issue 编号并只读注册的 Issue marker,不新增 PR 来源。
|
|
20
|
+
|
|
17
21
|
## 平台 intent
|
|
18
22
|
|
|
19
23
|
GitHub upstream、认证、capability、分页、marker 查找、幂等 create/update、分片、重试与错误分类由 typed platform core 统一处理:
|
|
@@ -23,7 +27,7 @@ agent-infra-internal platform-context resolve [--cwd <path>]
|
|
|
23
27
|
agent-infra-internal platform-comment list --issue <N> [--cwd <path>]
|
|
24
28
|
agent-infra-internal platform-comment owner <task-ref>
|
|
25
29
|
agent-infra-internal platform-comment sync <task-ref> \
|
|
26
|
-
--kind task|artifact|summary|cancel --agent <agent> \
|
|
30
|
+
--kind task|artifact|summary|cancel --agent <standard-agent-token> \
|
|
27
31
|
[--artifact <canonical.md>] [--body-file <path|->] [--backfill]
|
|
28
32
|
```
|
|
29
33
|
|
|
@@ -54,9 +58,9 @@ agent-infra-internal task-warning {task-id} add \
|
|
|
54
58
|
|
|
55
59
|
```bash
|
|
56
60
|
agent-infra-internal platform-issue inspect {task-id}
|
|
57
|
-
agent-infra-internal platform-issue create {task-id} --agent {agent}
|
|
58
|
-
agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {agent}
|
|
59
|
-
agent-infra-internal platform-issue sync {task-id} --agent {agent} {desired-state-flags}
|
|
61
|
+
agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
|
|
62
|
+
agent-infra-internal platform-issue bind {task-id} --issue {number} --agent {standard-agent-token}
|
|
63
|
+
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} {desired-state-flags}
|
|
60
64
|
```
|
|
61
65
|
|
|
62
66
|
`sync` 支持 status/in labels、assignee、milestone、Issue Type、pinned fields、需求复选框与 Issue state。省略 flag 表示 preserve,`none` 表示显式清空。适配层统一处理集合差集、动态 schema、权限降级、dry-run、重试、错误分类与幂等重放;SKILL 不得拼装 `gh issue`、GraphQL 或权限分支。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Common Rule - Lifecycle Orchestration
|
|
2
|
+
|
|
3
|
+
## Guarantee Boundary
|
|
4
|
+
|
|
5
|
+
- The orchestrator only routes and delegates. Stage skills remain the single source of truth for behavior and artifacts.
|
|
6
|
+
- Every stage and rework round uses a fresh executor. Every review uses a fresh reviewer; follow-up reuse is forbidden.
|
|
7
|
+
- A reviewer may only write its review artifact and core-generated task metadata. Business-code, HEAD, or index changes invalidate the receipt.
|
|
8
|
+
- An active run has one pending delegation. Missing, mismatched, forked, replayed, hook-less, or drifted evidence pauses the run.
|
|
9
|
+
- The first release ends after one existing safely gated `commit`; it does not create a PR, monitor checks, or complete the task.
|
|
10
|
+
|
|
11
|
+
## Recovery
|
|
12
|
+
|
|
13
|
+
`orchestration.json` is the detailed state source. A v2 run persists complete policy, source, and append-only recovery history. Only a v1 run with no pending delegation and zero receipts may be upgraded in place after supplying a complete policy; any historical receipt stays paused because effort is unverifiable. Migration is forward-only: old binaries must not advance active v2 runs.
|
|
14
|
+
|
|
15
|
+
## Model Policy
|
|
16
|
+
|
|
17
|
+
- A new run persists model and reasoning effort for both roles. Explicit policy is atomic across all four role fields; only a fully absent explicit policy may fall back to the current client's `agentClients[].orchestration`.
|
|
18
|
+
- Route resolves requested model/effort by role, and prepare matches both before snapshotting. Native spawn must not inherit session defaults.
|
|
19
|
+
- Native start records host-observed actual model/effort. Each mismatch needs its own fallback reason, and requested values must never be fabricated as actual evidence.
|
|
20
|
+
- Model selection is labeled as a complete catalog, partial catalog, or interactive-only guidance; a local override enum must not be presented as complete.
|
|
21
|
+
|
|
22
|
+
## Stable Pause Conditions
|
|
23
|
+
|
|
24
|
+
Human decisions, manual validation, handshake or step limits, permissions/network failures, worktree conflicts, unsupported client capability, and unknown hook schemas are persisted as pauses. The orchestrator must not ask mid-flow or degrade to same-context self-review.
|