@fitlab-ai/agent-infra 0.9.10 → 0.9.12
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 +19 -9
- package/README.zh-CN.md +19 -9
- package/bin/cli.ts +17 -4
- package/dist/bin/cli.js +19 -4
- package/dist/bin/internal-cli.js +55 -4
- package/dist/lib/agent-client.js +0 -1
- package/dist/lib/agent-clients/adapters/codex-lifecycle/build-identity.js +71 -10
- package/dist/lib/agent-clients/adapters/opencode-sandbox.js +0 -4
- package/dist/lib/agent-clients/adapters/traecli.js +7 -8
- package/dist/lib/agent-clients/config.js +14 -99
- package/dist/lib/agent-clients/reconcile.js +1 -11
- package/dist/lib/agent-clients/schema.js +5 -4
- package/dist/lib/agent-clients/tokens.js +5 -15
- package/dist/lib/decide.js +14 -30
- package/dist/lib/defaults.json +8 -0
- package/dist/lib/git/workflow.js +43 -1
- package/dist/lib/init.js +3 -2
- package/dist/lib/internal/git-workflow.js +8 -1
- package/dist/lib/internal/platform-pr.js +8 -2
- package/dist/lib/internal/release-workflow.js +0 -1
- package/dist/lib/internal/task-delivery.js +59 -0
- package/dist/lib/internal/task-finalization.js +19 -9
- package/dist/lib/internal/task-ledger.js +8 -2
- package/dist/lib/internal/task-lifecycle.js +17 -93
- package/dist/lib/internal/task-orchestration.js +30 -216
- package/dist/lib/internal/task-validate.js +2 -1
- package/dist/lib/merge.js +205 -103
- package/dist/lib/platform/github-client.js +7 -1
- package/dist/lib/platform/pr-checks.js +8 -5
- package/dist/lib/platform/pr-summary.js +12 -8
- package/dist/lib/platform/pull-requests.js +393 -91
- package/dist/lib/platform/verification-required.js +13 -2
- package/dist/lib/platform/verification-sync.js +9 -4
- package/dist/lib/pr-review/evidence-grading.js +12 -4
- package/dist/lib/process-data/normalize.js +2 -9
- package/dist/lib/run/host.js +46 -16
- package/dist/lib/sandbox/agent-client-reconciler.js +4 -12
- package/dist/lib/sandbox/commands/create.js +3 -3
- package/dist/lib/sandbox/commands/enter.js +18 -4
- package/dist/lib/sandbox/config.js +8 -12
- package/dist/lib/sandbox/control/executor.js +131 -39
- package/dist/lib/sandbox/control/lifecycle.js +55 -24
- package/dist/lib/sandbox/control/server.js +18 -16
- package/dist/lib/sandbox/mounts.js +3 -2
- package/dist/lib/sandbox/recovery.js +123 -22
- package/dist/lib/sandbox/workspace-identity.js +14 -0
- package/dist/lib/sandbox/workspace-view.js +8 -9
- package/dist/lib/self-update.js +278 -0
- package/dist/lib/server/process-state.js +2 -2
- package/dist/lib/server/protocol.js +5 -5
- package/dist/lib/task/activity-log.js +4 -1
- package/dist/lib/task/artifact-lifecycle.js +6 -4
- package/dist/lib/task/codex-orchestration.js +1 -1
- package/dist/lib/task/command-options.js +1 -3
- package/dist/lib/task/commands/cat.js +0 -5
- package/dist/lib/task/commands/decisions.js +76 -92
- package/dist/lib/task/commands/files.js +6 -6
- package/dist/lib/task/commands/grep.js +25 -61
- package/dist/lib/task/commands/issue-body.js +6 -6
- package/dist/lib/task/commands/log.js +25 -10
- package/dist/lib/task/commands/show.js +5 -6
- package/dist/lib/task/commands/status.js +8 -8
- package/dist/lib/task/commit-intent.js +100 -0
- package/dist/lib/task/commit-operation.js +181 -91
- package/dist/lib/task/commit-policy.js +1 -1
- package/dist/lib/task/control-authority.js +431 -0
- package/dist/lib/task/create.js +39 -8
- package/dist/lib/task/current-contract.js +35 -0
- package/dist/lib/task/decision-details.js +218 -0
- package/dist/lib/task/decision-intents.js +5 -2
- package/dist/lib/task/delivery-target.js +97 -0
- package/dist/lib/task/delivery.js +153 -0
- package/dist/lib/task/events.js +11 -5
- package/dist/lib/task/human-override.js +5 -2
- package/dist/lib/task/index.js +19 -20
- package/dist/lib/task/ledger-intents.js +8 -9
- package/dist/lib/task/ledger.js +13 -6
- package/dist/lib/task/lifecycle.js +122 -9
- package/dist/lib/task/orchestration.js +105 -75
- package/dist/lib/task/pr-delivery-fact.js +182 -0
- package/dist/lib/task/review-artifacts.js +31 -12
- package/dist/lib/task/review-finalization.js +13 -4
- package/dist/lib/task/review-fingerprint.js +8 -0
- package/dist/lib/task/verification-engine.js +86 -39
- package/dist/lib/task/verification-review.js +2 -2
- package/dist/lib/task/workspace-snapshot.js +5 -11
- package/dist/lib/task/write.js +11 -1
- package/dist/lib/update.js +13 -35
- package/dist/lib/version.js +5 -1
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-client.ts +0 -1
- package/lib/agent-clients/adapters/codex-lifecycle/build-identity.ts +105 -10
- package/lib/agent-clients/adapters/codex-lifecycle/manifest-files.json +12 -1
- package/lib/agent-clients/adapters/opencode-sandbox.ts +0 -5
- package/lib/agent-clients/adapters/traecli.ts +7 -8
- package/lib/agent-clients/config.ts +14 -144
- package/lib/agent-clients/reconcile.ts +1 -12
- package/lib/agent-clients/schema.ts +5 -4
- package/lib/agent-clients/tokens.ts +5 -18
- package/lib/decide.ts +12 -22
- package/lib/defaults.json +8 -0
- package/lib/git/workflow.ts +38 -1
- package/lib/init.ts +5 -2
- package/lib/internal/git-workflow.ts +7 -1
- package/lib/internal/platform-pr.ts +8 -1
- package/lib/internal/release-workflow.ts +0 -1
- package/lib/internal/task-delivery.ts +53 -0
- package/lib/internal/task-finalization.ts +27 -13
- package/lib/internal/task-ledger.ts +8 -2
- package/lib/internal/task-lifecycle.ts +33 -76
- package/lib/internal/task-orchestration.ts +33 -190
- package/lib/internal/task-validate.ts +3 -2
- package/lib/merge.ts +236 -120
- package/lib/platform/github-client.ts +8 -1
- package/lib/platform/pr-checks.ts +7 -5
- package/lib/platform/pr-summary.ts +10 -7
- package/lib/platform/pull-requests.ts +425 -87
- package/lib/platform/verification-required.ts +12 -2
- package/lib/platform/verification-sync.ts +9 -4
- package/lib/pr-review/evidence-grading.ts +7 -4
- package/lib/process-data/normalize.ts +2 -8
- package/lib/run/host.ts +63 -14
- package/lib/sandbox/agent-client-reconciler.ts +5 -15
- package/lib/sandbox/commands/create.ts +4 -4
- package/lib/sandbox/commands/enter.ts +24 -4
- package/lib/sandbox/config.ts +9 -14
- package/lib/sandbox/control/container-identity.ts +2 -2
- package/lib/sandbox/control/executor.ts +148 -51
- package/lib/sandbox/control/lifecycle.ts +59 -31
- package/lib/sandbox/control/protocol.ts +1 -3
- package/lib/sandbox/control/server.ts +15 -12
- package/lib/sandbox/control/state.ts +7 -7
- package/lib/sandbox/mounts.ts +4 -3
- package/lib/sandbox/recovery.ts +162 -34
- package/lib/sandbox/tools.ts +1 -1
- package/lib/sandbox/workspace-identity.ts +28 -0
- package/lib/sandbox/workspace-view.ts +14 -10
- package/lib/self-update.ts +341 -0
- package/lib/server/process-state.ts +2 -2
- package/lib/server/protocol.ts +5 -5
- package/lib/task/activity-log.ts +6 -1
- package/lib/task/artifact-lifecycle.ts +7 -5
- package/lib/task/codex-orchestration.ts +2 -1
- package/lib/task/command-options.ts +1 -2
- package/lib/task/commands/cat.ts +0 -4
- package/lib/task/commands/decisions.ts +80 -75
- package/lib/task/commands/files.ts +6 -6
- package/lib/task/commands/grep.ts +23 -51
- package/lib/task/commands/issue-body.ts +6 -6
- package/lib/task/commands/log.ts +22 -10
- package/lib/task/commands/show.ts +5 -6
- package/lib/task/commands/status.ts +8 -8
- package/lib/task/commit-intent.ts +137 -0
- package/lib/task/commit-operation.ts +161 -79
- package/lib/task/commit-policy.ts +1 -2
- package/lib/task/control-authority.ts +563 -0
- package/lib/task/create.ts +40 -10
- package/lib/task/current-contract.ts +49 -0
- package/lib/task/decision-details.ts +280 -0
- package/lib/task/decision-intents.ts +7 -2
- package/lib/task/delivery-target.ts +130 -0
- package/lib/task/delivery.ts +160 -0
- package/lib/task/events.ts +10 -5
- package/lib/task/human-override.ts +5 -2
- package/lib/task/index.ts +19 -20
- package/lib/task/ledger-intents.ts +6 -8
- package/lib/task/ledger.ts +17 -7
- package/lib/task/lifecycle.ts +113 -4
- package/lib/task/orchestration.ts +102 -80
- package/lib/task/pr-delivery-fact.ts +254 -0
- package/lib/task/review-artifacts.ts +53 -15
- package/lib/task/review-finalization.ts +21 -5
- package/lib/task/review-fingerprint.ts +10 -0
- package/lib/task/verification-engine.ts +78 -46
- package/lib/task/verification-review.ts +3 -1
- package/lib/task/workspace-snapshot.ts +4 -13
- package/lib/task/write.ts +20 -1
- package/lib/update.ts +14 -38
- package/lib/version.ts +6 -1
- package/package.json +1 -1
- package/templates/.agents/README.en.md +5 -3
- package/templates/.agents/README.zh-CN.md +5 -3
- package/templates/.agents/rules/README.en.md +4 -2
- package/templates/.agents/rules/README.zh-CN.md +4 -2
- package/templates/.agents/rules/compatibility-policy.en.md +5 -4
- package/templates/.agents/rules/compatibility-policy.zh-CN.md +5 -4
- package/templates/.agents/rules/create-issue.en.md +11 -2
- package/templates/.agents/rules/create-issue.zh-CN.md +24 -2
- package/templates/.agents/rules/human-decision-context.en.md +9 -7
- package/templates/.agents/rules/human-decision-context.zh-CN.md +9 -7
- package/templates/.agents/rules/{issue-fields.github.en.md → issue-fields.en.md} +1 -1
- package/templates/.agents/rules/{issue-fields.github.zh-CN.md → issue-fields.zh-CN.md} +1 -1
- package/templates/.agents/rules/issue-pr-commands.en.md +5 -18
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.en.md +26 -5
- package/templates/.agents/rules/issue-sync.zh-CN.md +62 -5
- package/templates/.agents/rules/label-milestone-setup.en.md +15 -2
- package/templates/.agents/rules/label-milestone-setup.zh-CN.md +15 -2
- package/templates/.agents/rules/local-artifact-repair.en.md +46 -0
- package/templates/.agents/rules/local-artifact-repair.zh-CN.md +46 -0
- package/templates/.agents/rules/milestone-inference.en.md +12 -2
- package/templates/.agents/rules/milestone-inference.zh-CN.md +25 -3
- package/templates/.agents/rules/next-step-output.en.md +3 -3
- package/templates/.agents/rules/next-step-output.zh-CN.md +3 -3
- package/templates/.agents/rules/no-mid-flow-questions.en.md +1 -1
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +1 -1
- package/templates/.agents/rules/pr-sync.en.md +23 -14
- package/templates/.agents/rules/pr-sync.zh-CN.md +23 -2
- package/templates/.agents/rules/release-commands.en.md +42 -3
- package/templates/.agents/rules/release-commands.zh-CN.md +42 -3
- package/templates/.agents/rules/review-handshake.en.md +1 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +1 -1
- package/templates/.agents/rules/security-alerts.en.md +17 -2
- package/templates/.agents/rules/security-alerts.zh-CN.md +17 -2
- package/templates/.agents/rules/sync-content-generation.en.md +8 -0
- package/templates/.agents/rules/sync-content-generation.zh-CN.md +8 -0
- package/templates/.agents/rules/task-management.en.md +2 -3
- package/templates/.agents/rules/task-management.zh-CN.md +2 -3
- package/templates/.agents/scripts/security-alerts.github.sh +151 -0
- package/templates/.agents/scripts/security-alerts.sh +31 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +4 -3
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/block-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-codescan/SKILL.en.md +3 -3
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +3 -3
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/SKILL.en.md +8 -5
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +9 -6
- package/templates/.agents/skills/commit/SKILL.en.md +30 -10
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +6 -7
- package/templates/.agents/skills/commit/config/verify.json +1 -1
- package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +3 -3
- package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +3 -3
- 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 +2 -2
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +7 -6
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +7 -6
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +1 -1
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +1 -1
- 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 +13 -13
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +13 -13
- package/templates/.agents/skills/complete-task/reference/external-delivery.en.md +2 -2
- package/templates/.agents/skills/complete-task/reference/external-delivery.zh-CN.md +2 -2
- package/templates/.agents/skills/create-pr/SKILL.en.md +9 -11
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +9 -11
- package/templates/.agents/skills/create-pr/reference/change-report.en.md +9 -4
- package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +9 -4
- package/templates/.agents/skills/create-pr/scripts/change-report.mjs +203 -0
- package/templates/.agents/skills/create-release-note/SKILL.en.md +5 -6
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +5 -6
- package/templates/.agents/skills/create-task/SKILL.en.md +2 -1
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +2 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/init-labels/SKILL.en.md +9 -10
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +9 -10
- package/templates/.agents/skills/init-labels/scripts/init-labels.github.sh +57 -1
- package/templates/.agents/skills/init-labels/scripts/init-labels.sh +27 -1
- package/templates/.agents/skills/init-milestones/SKILL.en.md +3 -5
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +3 -5
- package/templates/.agents/skills/plan-task/SKILL.en.md +4 -3
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/restore-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +8 -5
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +8 -5
- package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +18 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +18 -0
- 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/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.en.md +2 -1
- package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +2 -1
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +19 -1
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +19 -1
- package/templates/.agents/skills/review-code/reference/report-template.en.md +4 -2
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +4 -2
- package/templates/.agents/skills/review-plan/SKILL.en.md +8 -5
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +8 -5
- package/templates/.agents/skills/review-plan/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +18 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +18 -0
- package/templates/.agents/skills/review-pr/SKILL.en.md +1 -0
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/review-pr/reference/evidence-grading.en.md +2 -2
- package/templates/.agents/skills/review-pr/reference/evidence-grading.zh-CN.md +2 -2
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +5 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +5 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +5 -1
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +2 -2
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +144 -109
- package/templates/.agents/skills/watch-pr/SKILL.en.md +5 -5
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +5 -5
- package/templates/.agents/templates/task.en.md +6 -2
- package/templates/.agents/templates/task.zh-CN.md +6 -2
- package/templates/.agents/workflows/bug-fix.en.yaml +9 -8
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +9 -8
- package/templates/.agents/workflows/feature-development.en.yaml +9 -8
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +9 -8
- package/templates/.agents/workflows/refactoring.en.yaml +9 -8
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +9 -8
- package/templates/.claude/commands/analyze-task.en.md +1 -1
- package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.claude/commands/block-task.en.md +1 -1
- package/templates/.claude/commands/block-task.zh-CN.md +1 -1
- package/templates/.claude/commands/cancel-task.en.md +1 -1
- package/templates/.claude/commands/cancel-task.zh-CN.md +1 -1
- package/templates/.claude/commands/check-task.en.md +1 -1
- package/templates/.claude/commands/check-task.zh-CN.md +1 -1
- package/templates/.claude/commands/code-task.en.md +1 -1
- package/templates/.claude/commands/code-task.zh-CN.md +1 -1
- package/templates/.claude/commands/commit.en.md +1 -1
- package/templates/.claude/commands/commit.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-manual-validation.en.md +1 -1
- package/templates/.claude/commands/complete-manual-validation.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-task.en.md +1 -1
- package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
- package/templates/.claude/commands/create-pr.en.md +1 -1
- package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
- package/templates/.claude/commands/plan-task.en.md +1 -1
- package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
- package/templates/.claude/commands/review-analysis.en.md +1 -1
- package/templates/.claude/commands/review-analysis.zh-CN.md +1 -1
- package/templates/.claude/commands/review-code.en.md +1 -1
- package/templates/.claude/commands/review-code.zh-CN.md +1 -1
- package/templates/.claude/commands/review-plan.en.md +1 -1
- package/templates/.claude/commands/review-plan.zh-CN.md +1 -1
- package/templates/.claude/commands/run-manual-validation.en.md +1 -1
- package/templates/.claude/commands/run-manual-validation.zh-CN.md +1 -1
- package/templates/.claude/commands/run-task.en.md +1 -1
- package/templates/.claude/commands/run-task.zh-CN.md +1 -1
- package/templates/.claude/commands/watch-pr.en.md +1 -1
- package/templates/.claude/commands/watch-pr.zh-CN.md +1 -1
- package/templates/{.trae/skills → .traecli/commands}/update-agent-infra.en.md +0 -1
- package/templates/{.trae/skills → .traecli/commands}/update-agent-infra.zh-CN.md +0 -1
- package/dist/lib/builtin-tuis.js +0 -40
- package/lib/builtin-tuis.ts +0 -56
- package/templates/.agents/rules/create-issue.github.en.md +0 -14
- package/templates/.agents/rules/create-issue.github.zh-CN.md +0 -27
- package/templates/.agents/rules/issue-pr-commands.github.en.md +0 -34
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +0 -49
- package/templates/.agents/rules/issue-sync.github.en.md +0 -40
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +0 -76
- package/templates/.agents/rules/label-milestone-setup.github.en.md +0 -60
- package/templates/.agents/rules/label-milestone-setup.github.zh-CN.md +0 -60
- package/templates/.agents/rules/milestone-inference.github.en.md +0 -15
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +0 -27
- package/templates/.agents/rules/pr-checks-commands.github.en.md +0 -18
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +0 -34
- package/templates/.agents/rules/pr-sync.github.en.md +0 -43
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +0 -69
- package/templates/.agents/rules/release-commands.github.en.md +0 -38
- package/templates/.agents/rules/release-commands.github.zh-CN.md +0 -38
- package/templates/.agents/rules/security-alerts.github.en.md +0 -43
- package/templates/.agents/rules/security-alerts.github.zh-CN.md +0 -43
|
@@ -23,9 +23,8 @@ Map user intent to the corresponding workflow command:
|
|
|
23
23
|
|
|
24
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
25
|
|
|
26
|
-
- AI short tokens: `claude` / `codex` / `antigravity` / `opencode` / `cursor`
|
|
26
|
+
- AI short tokens: `claude` / `codex` / `antigravity` / `opencode` / `cursor` / `traecli`
|
|
27
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
28
|
- Manual-step exception: no matter which agent is used, a human-made decision is always declared as `human`
|
|
30
29
|
|
|
31
30
|
The seven internal commands (`task-event` / `task-lifecycle` / `task-finalization` / `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.
|
|
@@ -50,7 +49,7 @@ The seven internal commands (`task-event` / `task-lifecycle` / `task-finalizatio
|
|
|
50
49
|
- `review-plan`: update `current_step`, `updated_at`, `agent_infra_version`
|
|
51
50
|
- `code-task`: update `current_step`, `updated_at`, `agent_infra_version`
|
|
52
51
|
- `review-code`: update `current_step`, `updated_at`, `agent_infra_version`
|
|
53
|
-
- `create-pr`: update `
|
|
52
|
+
- `create-pr`: update the verified `pr_delivery_fact`, `updated_at`, `agent_infra_version`
|
|
54
53
|
- `commit`: update `updated_at`, `agent_infra_version`; update `current_step` when needed (see `commit/reference/task-status-update.md`)
|
|
55
54
|
- `complete-task`: update `status`, `current_step`, `completed_at`, `updated_at`, `agent_infra_version`
|
|
56
55
|
- `block-task`: update `status`, `blocked_at`, `updated_at`, `agent_infra_version`
|
|
@@ -23,9 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
`--agent` 取值必须收敛到标准 AI 合作者 token,禁止填入 OS 系统用户名(如 `devuser`)或 git 用户名(如 `季聿阶`)。标准集合(短名为活动日志唯一事实来源):
|
|
25
25
|
|
|
26
|
-
- AI 短名:`claude` / `codex` / `antigravity` / `opencode` / `cursor`
|
|
26
|
+
- AI 短名:`claude` / `codex` / `antigravity` / `opencode` / `cursor` / `traecli`
|
|
27
27
|
- 长名映射(写入前归一化为短名):`claude-code` → `claude`、`antigravity-cli` → `antigravity`
|
|
28
|
-
- 历史 `gemini` / `gemini-cli` 仅保留 `ai task log` 渲染兼容,不接受写入
|
|
29
28
|
- 人工步骤例外:无论使用哪个 Agent,只要是人做的决定,统一声明 `human`
|
|
30
29
|
|
|
31
30
|
七个内部命令(`task-event` / `task-lifecycle` / `task-finalization` / `platform-issue` / `platform-comment` / `platform-pr` / `task-orchestration`)对 `--agent` 做白名单硬校验:接受短名、长名或 `human`,非标准值返回对应 `*_PAYLOAD_INVALID` 错误;长名在落库/透传前归一化为短名。渲染端 `ai task log` 对无法识别的 token 保留 `human` 归类并附加 `(unknown)` 标记。
|
|
@@ -50,7 +49,7 @@
|
|
|
50
49
|
- `review-plan`:更新 `current_step`、`updated_at`、`agent_infra_version`
|
|
51
50
|
- `code-task`:更新 `current_step`、`updated_at`、`agent_infra_version`
|
|
52
51
|
- `review-code`:更新 `current_step`、`updated_at`、`agent_infra_version`
|
|
53
|
-
- `create-pr
|
|
52
|
+
- `create-pr`:通过 `pr_delivery_fact` writer 更新 PR 绑定事实、`updated_at`、`agent_infra_version`
|
|
54
53
|
- `commit`:更新 `updated_at`、`agent_infra_version`;必要时更新 `current_step`(详见 `commit/reference/task-status-update.md`)
|
|
55
54
|
- `complete-task`:更新 `status`、`current_step`、`completed_at`、`updated_at`、`agent_infra_version`
|
|
56
55
|
- `block-task`:更新 `status`、`blocked_at`、`updated_at`、`agent_infra_version`
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
operation="${1:-}"
|
|
6
|
+
shift || true
|
|
7
|
+
number=""
|
|
8
|
+
reason=""
|
|
9
|
+
comment_file=""
|
|
10
|
+
|
|
11
|
+
while [ "$#" -gt 0 ]; do
|
|
12
|
+
case "$1" in
|
|
13
|
+
--number)
|
|
14
|
+
number="${2:-}"
|
|
15
|
+
shift
|
|
16
|
+
;;
|
|
17
|
+
--reason)
|
|
18
|
+
reason="${2:-}"
|
|
19
|
+
shift
|
|
20
|
+
;;
|
|
21
|
+
--comment-file)
|
|
22
|
+
comment_file="${2:-}"
|
|
23
|
+
shift
|
|
24
|
+
;;
|
|
25
|
+
*)
|
|
26
|
+
echo "Unknown option: $1" >&2
|
|
27
|
+
exit 2
|
|
28
|
+
;;
|
|
29
|
+
esac
|
|
30
|
+
shift
|
|
31
|
+
done
|
|
32
|
+
|
|
33
|
+
emit_error() {
|
|
34
|
+
code="$1"
|
|
35
|
+
message="$2"
|
|
36
|
+
node - "$operation" "$code" "$message" <<'NODE'
|
|
37
|
+
const [operation, code, message] = process.argv.slice(2);
|
|
38
|
+
process.stdout.write(`${JSON.stringify({ status: "failed", operation, error: { code, message } })}\n`);
|
|
39
|
+
NODE
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
case "$operation" in
|
|
43
|
+
read-dependabot|dismiss-dependabot|read-codescan|dismiss-codescan) ;;
|
|
44
|
+
*)
|
|
45
|
+
emit_error "SECURITY_OPERATION_INVALID" "Unknown security alert operation."
|
|
46
|
+
exit 1
|
|
47
|
+
;;
|
|
48
|
+
esac
|
|
49
|
+
|
|
50
|
+
case "$number" in
|
|
51
|
+
''|*[!0-9]*)
|
|
52
|
+
emit_error "SECURITY_NUMBER_INVALID" "Alert number must be a positive integer."
|
|
53
|
+
exit 1
|
|
54
|
+
;;
|
|
55
|
+
esac
|
|
56
|
+
|
|
57
|
+
if ! command -v gh >/dev/null 2>&1; then
|
|
58
|
+
emit_error "PLATFORM_CLI_MISSING" "The platform CLI is not installed."
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
if ! gh auth token >/dev/null 2>&1; then
|
|
62
|
+
emit_error "PLATFORM_NOT_AUTHENTICATED" "The platform CLI is not authenticated."
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
65
|
+
repo="$(gh repo view --json nameWithOwner --jq '.nameWithOwner')" || {
|
|
66
|
+
emit_error "PLATFORM_REPOSITORY_UNAVAILABLE" "Unable to access the current repository."
|
|
67
|
+
exit 1
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
case "$operation" in
|
|
71
|
+
*dependabot*) endpoint="repos/$repo/dependabot/alerts/$number" ;;
|
|
72
|
+
*codescan*) endpoint="repos/$repo/code-scanning/alerts/$number" ;;
|
|
73
|
+
esac
|
|
74
|
+
|
|
75
|
+
tmpdir="$(mktemp -d)"
|
|
76
|
+
trap 'rm -rf "$tmpdir"' EXIT HUP INT TERM
|
|
77
|
+
|
|
78
|
+
if [ "$operation" = "read-dependabot" ] || [ "$operation" = "read-codescan" ]; then
|
|
79
|
+
if ! gh api "$endpoint" > "$tmpdir/response.json" 2> "$tmpdir/error.txt"; then
|
|
80
|
+
emit_error "SECURITY_API_FAILED" "Unable to read the security alert."
|
|
81
|
+
exit 2
|
|
82
|
+
fi
|
|
83
|
+
else
|
|
84
|
+
if [ -z "$reason" ] || [ -z "$comment_file" ] || [ ! -f "$comment_file" ]; then
|
|
85
|
+
emit_error "SECURITY_DISMISS_INPUT_INVALID" "Dismissal reason and comment file are required."
|
|
86
|
+
exit 1
|
|
87
|
+
fi
|
|
88
|
+
if ! gh api "$endpoint" > "$tmpdir/current.json" 2> "$tmpdir/error.txt"; then
|
|
89
|
+
emit_error "SECURITY_API_FAILED" "Unable to read the security alert before dismissal."
|
|
90
|
+
exit 2
|
|
91
|
+
fi
|
|
92
|
+
state="$(node - "$tmpdir/current.json" <<'NODE'
|
|
93
|
+
const fs = require("node:fs");
|
|
94
|
+
try {
|
|
95
|
+
const alert = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
|
96
|
+
process.stdout.write(typeof alert.state === "string" ? alert.state : "invalid");
|
|
97
|
+
} catch {
|
|
98
|
+
process.stdout.write("invalid");
|
|
99
|
+
}
|
|
100
|
+
NODE
|
|
101
|
+
)"
|
|
102
|
+
case "$state" in
|
|
103
|
+
open) ;;
|
|
104
|
+
dismissed|fixed)
|
|
105
|
+
node - "$operation" "$tmpdir/current.json" <<'NODE'
|
|
106
|
+
const fs = require("node:fs");
|
|
107
|
+
const [operation, responsePath] = process.argv.slice(2);
|
|
108
|
+
const data = JSON.parse(fs.readFileSync(responsePath, "utf8"));
|
|
109
|
+
process.stdout.write(`${JSON.stringify({ status: "no-op", operation, data })}\n`);
|
|
110
|
+
NODE
|
|
111
|
+
exit 0
|
|
112
|
+
;;
|
|
113
|
+
*)
|
|
114
|
+
emit_error "SECURITY_RESPONSE_INVALID" "The platform returned an alert without a valid state."
|
|
115
|
+
exit 1
|
|
116
|
+
;;
|
|
117
|
+
esac
|
|
118
|
+
node - "$reason" "$comment_file" > "$tmpdir/payload.json" <<'NODE'
|
|
119
|
+
const fs = require("node:fs");
|
|
120
|
+
const [reason, commentFile] = process.argv.slice(2);
|
|
121
|
+
process.stdout.write(JSON.stringify({
|
|
122
|
+
state: "dismissed",
|
|
123
|
+
dismissed_reason: reason,
|
|
124
|
+
dismissed_comment: fs.readFileSync(commentFile, "utf8")
|
|
125
|
+
}));
|
|
126
|
+
NODE
|
|
127
|
+
if ! gh api --method PATCH "$endpoint" --input "$tmpdir/payload.json" > "$tmpdir/response.json" 2> "$tmpdir/error.txt"; then
|
|
128
|
+
emit_error "SECURITY_API_FAILED" "Unable to dismiss the security alert."
|
|
129
|
+
exit 2
|
|
130
|
+
fi
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
node - "$operation" "$tmpdir/response.json" <<'NODE'
|
|
134
|
+
const fs = require("node:fs");
|
|
135
|
+
const [operation, responsePath] = process.argv.slice(2);
|
|
136
|
+
const raw = fs.readFileSync(responsePath, "utf8").trim();
|
|
137
|
+
let data = null;
|
|
138
|
+
if (raw) {
|
|
139
|
+
try {
|
|
140
|
+
data = JSON.parse(raw);
|
|
141
|
+
} catch {
|
|
142
|
+
process.stdout.write(`${JSON.stringify({
|
|
143
|
+
status: "failed",
|
|
144
|
+
operation,
|
|
145
|
+
error: { code: "SECURITY_RESPONSE_INVALID", message: "The platform returned invalid JSON." }
|
|
146
|
+
})}\n`);
|
|
147
|
+
process.exit(1);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
process.stdout.write(`${JSON.stringify({ status: "applied", operation, data })}\n`);
|
|
151
|
+
NODE
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
operation="${1:-}"
|
|
6
|
+
|
|
7
|
+
node - "$operation" <<'NODE'
|
|
8
|
+
const operation = process.argv[2] || "";
|
|
9
|
+
const known = new Set([
|
|
10
|
+
"read-dependabot",
|
|
11
|
+
"dismiss-dependabot",
|
|
12
|
+
"read-codescan",
|
|
13
|
+
"dismiss-codescan"
|
|
14
|
+
]);
|
|
15
|
+
const payload = known.has(operation)
|
|
16
|
+
? {
|
|
17
|
+
status: "degraded",
|
|
18
|
+
operation,
|
|
19
|
+
error: {
|
|
20
|
+
code: "PLATFORM_SECURITY_UNSUPPORTED",
|
|
21
|
+
message: "The current platform does not provide a security alert adapter."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
: {
|
|
25
|
+
status: "failed",
|
|
26
|
+
operation,
|
|
27
|
+
error: { code: "SECURITY_OPERATION_INVALID", message: "Unknown security alert operation." }
|
|
28
|
+
};
|
|
29
|
+
process.stdout.write(`${JSON.stringify(payload)}\n`);
|
|
30
|
+
process.exit(known.has(operation) ? 0 : 1);
|
|
31
|
+
NODE
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Analyze Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
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.
|
|
13
13
|
|
|
@@ -15,6 +15,7 @@ If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--or
|
|
|
15
15
|
|
|
16
16
|
- This skill only outputs a requirements analysis document (`analysis.md` or `analysis-r{N}.md`) and does not modify any business code
|
|
17
17
|
- Base the analysis strictly on the existing task input, requirements, context, and source information in `task.md`
|
|
18
|
+
- Before generating task or lifecycle Markdown that will be synchronized to an Issue, read `.agents/rules/sync-content-generation.md` and apply its producer-side constraints; the sync path does not parse or rewrite the body
|
|
18
19
|
- When old behavior, data, schemas, or callers are involved, read `.agents/rules/compatibility-policy.md` first. State current-only when admission evidence is absent; do not turn speculation into a requirement
|
|
19
20
|
- After executing this skill, you **must** immediately update task status in task.md
|
|
20
21
|
|
|
@@ -24,7 +25,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
24
25
|
|
|
25
26
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first. Reading instruction files does not count as an external-state action or conclusion.
|
|
26
27
|
|
|
27
|
-
Run these commands and paste the raw output into
|
|
28
|
+
Run these commands and paste the raw output into this round's `## State Check` section:
|
|
28
29
|
|
|
29
30
|
```bash
|
|
30
31
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -34,7 +35,7 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
34
35
|
|
|
35
36
|
## Task Context Resolution
|
|
36
37
|
|
|
37
|
-
> The entry point may omit the task ref
|
|
38
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
38
39
|
|
|
39
40
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
40
41
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 分析任务
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
|
|
13
13
|
|
|
@@ -15,6 +15,7 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
- 本技能仅产出需求分析文档(`analysis.md` 或 `analysis-r{N}.md`)—— 不修改任何业务代码
|
|
17
17
|
- 严格基于 `task.md` 中已有的任务输入、需求、上下文和来源信息展开分析
|
|
18
|
+
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
18
19
|
- 涉及旧行为、旧数据、旧 schema 或旧调用方时,先读取 `.agents/rules/compatibility-policy.md`;没有兼容准入证据时明确采用 current-only,不把推测写成需求
|
|
19
20
|
- 执行本技能后,你**必须**立即更新 task.md 中的任务状态
|
|
20
21
|
|
|
@@ -24,7 +25,7 @@ description: >
|
|
|
24
25
|
|
|
25
26
|
在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
|
|
28
29
|
|
|
29
30
|
```bash
|
|
30
31
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -34,7 +35,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
34
35
|
|
|
35
36
|
## 任务上下文解析
|
|
36
37
|
|
|
37
|
-
>
|
|
38
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
38
39
|
|
|
39
40
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
40
41
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Block Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## Boundary / Critical Rules
|
|
@@ -26,7 +26,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
26
26
|
|
|
27
27
|
## Task Context Resolution
|
|
28
28
|
|
|
29
|
-
> The entry point may omit the task ref
|
|
29
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
30
30
|
|
|
31
31
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
32
32
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 标记任务阻塞
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## 行为边界 / 关键规则
|
|
@@ -26,7 +26,7 @@ description: >
|
|
|
26
26
|
|
|
27
27
|
## 任务上下文解析
|
|
28
28
|
|
|
29
|
-
>
|
|
29
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
30
30
|
|
|
31
31
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
32
32
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Cancel Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## Boundary / Critical Rules
|
|
@@ -20,7 +20,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
20
20
|
|
|
21
21
|
## Task Context Resolution
|
|
22
22
|
|
|
23
|
-
> The entry point may omit the task ref
|
|
23
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
24
24
|
|
|
25
25
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
26
26
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 取消任务
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## 行为边界 / 关键规则
|
|
@@ -20,7 +20,7 @@ description: >
|
|
|
20
20
|
|
|
21
21
|
## 任务上下文解析
|
|
22
22
|
|
|
23
|
-
>
|
|
23
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
24
24
|
|
|
25
25
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
26
26
|
|
|
@@ -15,7 +15,7 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
## Task Context Resolution
|
|
17
17
|
|
|
18
|
-
> The entry point may omit the task ref
|
|
18
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
19
19
|
|
|
20
20
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ description: >
|
|
|
26
26
|
Run the deterministic CLI to collect every mechanical fact, and use its stdout as the factual base of your report:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
ai task status {task-id}
|
|
29
|
+
ai task status --task {task-id}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
The command resolves the task across the active, blocked, and completed directories and prints five sections: the task header (`id`, short id, title), `Metadata` (frontmatter fields), `Artifacts` (files grouped by workflow stage), `Git` (branch match, uncommitted count, ahead/behind), and `Platform` (Issue/PR state). Treat that output as authoritative -- do not re-derive any of it by hand.
|
|
@@ -15,7 +15,7 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
## 任务上下文解析
|
|
17
17
|
|
|
18
|
-
>
|
|
18
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
19
19
|
|
|
20
20
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ description: >
|
|
|
26
26
|
运行确定性 CLI 收集全部机械数据,并以其 stdout 作为状态报告的事实基底:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
ai task status {task-id}
|
|
29
|
+
ai task status --task {task-id}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
该命令会跨 active、blocked、completed 三目录解析任务,并输出五段:任务头(`id`、短号、标题)、`Metadata`(frontmatter 字段)、`Artifacts`(按工作流阶段分组的产物)、`Git`(分支匹配、未提交数、ahead/behind)、`Platform`(Issue/PR 状态)。把该输出视为权威事实 —— 不要再手工复述其中任何内容。
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Dismiss Code Scanning Alert
|
|
9
|
-
> `--agent` values
|
|
9
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Dismiss the specified Code Scanning (CodeQL) alert and record a justified reason.
|
|
@@ -23,7 +23,7 @@ The skill still owns the security-alert API. When a related task exists, Step 7
|
|
|
23
23
|
|
|
24
24
|
### 1. Retrieve Alert Information
|
|
25
25
|
|
|
26
|
-
Read `.agents/rules/security-alerts.md` before this step, then
|
|
26
|
+
Read `.agents/rules/security-alerts.md` before this step, then run `bash .agents/scripts/security-alerts.sh read-codescan --number {alert-number}` and parse its JSON result to fetch the alert details.
|
|
27
27
|
|
|
28
28
|
Verify that the alert is in the `open` state. If it is already dismissed or fixed, inform the user and exit.
|
|
29
29
|
|
|
@@ -71,7 +71,7 @@ Confirm? (y/N)
|
|
|
71
71
|
|
|
72
72
|
### 6. Execute the Dismissal
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Write the user's explanation to `{comment-file}`, then run `bash .agents/scripts/security-alerts.sh dismiss-codescan --number {alert-number} --reason {api-reason} --comment-file {comment-file}`. Parse the JSON result and continue only when the dismissal is `applied` or `no-op`.
|
|
75
75
|
|
|
76
76
|
**API reason mapping** (per the Code Scanning API):
|
|
77
77
|
- False Positive -> `false positive`
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 关闭 Code Scanning 告警
|
|
9
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
9
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
关闭指定的 Code Scanning(CodeQL)告警并记录合理的关闭理由。
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
### 1. 获取告警信息
|
|
25
25
|
|
|
26
|
-
执行前先读取 `.agents/rules/security-alerts.md
|
|
26
|
+
执行前先读取 `.agents/rules/security-alerts.md`,然后运行 `bash .agents/scripts/security-alerts.sh read-codescan --number {alert-number}`,解析其 JSON 结果获取告警详情。
|
|
27
27
|
|
|
28
28
|
验证告警处于 `open` 状态。如果已被关闭/修复,告知用户并退出。
|
|
29
29
|
|
|
@@ -71,7 +71,7 @@ Code Scanning 告警 #{alert-number}
|
|
|
71
71
|
|
|
72
72
|
### 6. 执行关闭
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
将用户说明写入 `{comment-file}`,然后运行 `bash .agents/scripts/security-alerts.sh dismiss-codescan --number {alert-number} --reason {api-reason} --comment-file {comment-file}`。解析 JSON 结果,仅当关闭状态为 `applied` 或 `no-op` 时继续。
|
|
75
75
|
|
|
76
76
|
**API reason 映射**(按 Code Scanning API):
|
|
77
77
|
- 误报 -> `false positive`
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Dismiss Dependabot Alert
|
|
9
|
-
> `--agent` values
|
|
9
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Dismiss the specified Dependabot security alert and record a justified reason.
|
|
@@ -23,7 +23,7 @@ The skill still owns the security-alert API. When a related task exists, Step 7
|
|
|
23
23
|
|
|
24
24
|
### 1. Retrieve Alert Information
|
|
25
25
|
|
|
26
|
-
Read `.agents/rules/security-alerts.md` before this step, then
|
|
26
|
+
Read `.agents/rules/security-alerts.md` before this step, then run `bash .agents/scripts/security-alerts.sh read-dependabot --number {alert-number}` and parse its JSON result to fetch the alert details.
|
|
27
27
|
|
|
28
28
|
Verify that the alert is in the `open` state. If it is already dismissed or fixed, inform the user and exit.
|
|
29
29
|
|
|
@@ -77,7 +77,7 @@ Confirm? (y/N)
|
|
|
77
77
|
|
|
78
78
|
### 6. Execute the Dismissal
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Write the user's explanation to `{comment-file}`, then run `bash .agents/scripts/security-alerts.sh dismiss-dependabot --number {alert-number} --reason {api-reason} --comment-file {comment-file}`. Parse the JSON result and continue only when the dismissal is `applied` or `no-op`.
|
|
81
81
|
|
|
82
82
|
**API reason mapping**:
|
|
83
83
|
- False Positive -> `not_used` or `inaccurate`
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 关闭 Dependabot 告警
|
|
9
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
9
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
关闭指定的 Dependabot 安全告警并记录合理的关闭理由。
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
### 1. 获取告警信息
|
|
25
25
|
|
|
26
|
-
执行前先读取 `.agents/rules/security-alerts.md
|
|
26
|
+
执行前先读取 `.agents/rules/security-alerts.md`,然后运行 `bash .agents/scripts/security-alerts.sh read-dependabot --number {alert-number}`,解析其 JSON 结果获取告警详情。
|
|
27
27
|
|
|
28
28
|
验证告警处于 `open` 状态。如果已被关闭/修复,告知用户并退出。
|
|
29
29
|
|
|
@@ -77,7 +77,7 @@ CVE:{cve-id}
|
|
|
77
77
|
|
|
78
78
|
### 6. 执行关闭
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
将用户说明写入 `{comment-file}`,然后运行 `bash .agents/scripts/security-alerts.sh dismiss-dependabot --number {alert-number} --reason {api-reason} --comment-file {comment-file}`。解析 JSON 结果,仅当关闭状态为 `applied` 或 `no-op` 时继续。
|
|
81
81
|
|
|
82
82
|
**API reason 映射**:
|
|
83
83
|
- 误报 -> `not_used` 或 `inaccurate`
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Code Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
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.
|
|
13
13
|
|
|
@@ -16,10 +16,11 @@ Implement the approved plan and produce `code.md` or `code-r{N}.md`. This skill
|
|
|
16
16
|
## Boundary / Critical Rules
|
|
17
17
|
|
|
18
18
|
- Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
|
|
19
|
+
- Before generating task or lifecycle Markdown that will be synchronized to an Issue, read `.agents/rules/sync-content-generation.md` and apply its producer-side constraints; the sync path does not parse or rewrite the body
|
|
19
20
|
- Read `.agents/rules/compatibility-policy.md` before implementation. Implement only the compatibility budget explicitly approved by the plan; never retain old branches, result contracts, or migration shims merely to be “safe”
|
|
20
21
|
- Fix mode verifies each finding of the latest `review-code` one by one: fix it if it holds, or rebut it and record it under unresolved if it is unfounded/hallucinated; do not expand to issues the review did not list; manual-validation items are out of scope
|
|
21
22
|
- If implementation encounters a key design decision not covered by the plan, run `agent-infra-internal task-ledger {task-id} decision-next-id`, write the returned `HD-N` detail block per `.agents/rules/human-decision-context.md` and determine whether implementation is required, then run `decision-upsert --id {HD-N} --stage code --artifact {code-artifact} --needs-implementation {true|false}`. Do not scan ids, assemble ledger rows, ask mid-flow, or silently expand scope
|
|
22
|
-
-
|
|
23
|
+
- Do not invoke the `commit` skill or push to a remote; after tests pass, call the shared commit core with `delivery: { mode: 'local' }` to create the local checkpoint. The durable intent must close only after the checkpoint and task state sync succeed; only then emit `code.completed`
|
|
23
24
|
- Create a new code artifact for each round and never overwrite an older one
|
|
24
25
|
- After executing this skill, you **must** immediately update task.md
|
|
25
26
|
|
|
@@ -29,7 +30,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
29
30
|
|
|
30
31
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first.
|
|
31
32
|
|
|
32
|
-
Run these commands and paste the raw output into
|
|
33
|
+
Run these commands and paste the raw output into this round's `## State Check` section:
|
|
33
34
|
|
|
34
35
|
```bash
|
|
35
36
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -37,7 +38,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
37
38
|
|
|
38
39
|
## Task Context Resolution
|
|
39
40
|
|
|
40
|
-
> The entry point may omit the task ref
|
|
41
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
41
42
|
|
|
42
43
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
43
44
|
|
|
@@ -103,6 +104,8 @@ Use the project test commands from the `test` skill and iterate until all requir
|
|
|
103
104
|
|
|
104
105
|
When triaging a test failure or unexpected behavior, first read `.agents/rules/debugging-guide.md` and locate the root cause via its four-phase flow; do not blindly patch and retry.
|
|
105
106
|
|
|
107
|
+
After tests pass, call the shared commit core with `agent-infra-internal git-workflow commit --input {checkpoint-input}`. Pass `delivery: { "mode": "local" }`, explicit paths, expected HEAD/tree, task ref, agent, and the code round. This creates only a local checkpoint and does not contact a remote. The core writes a durable intent before committing and removes it after task-writer synchronization; do not emit `code.completed` if either checkpoint or task synchronization fails.
|
|
108
|
+
|
|
106
109
|
### 9. Write the Code Report
|
|
107
110
|
|
|
108
111
|
Create `.agents/workspace/active/{task-id}/{code-artifact}`.
|
|
@@ -126,6 +129,6 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
126
129
|
|
|
127
130
|
### 12. Tell the User
|
|
128
131
|
|
|
129
|
-
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and render the selected next-step commands through the shared helper.
|
|
132
|
+
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and render the selected next-step commands through the shared helper. Do not push, create a PR, or invoke the `commit` skill here.
|
|
130
133
|
|
|
131
134
|
> Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the "Next steps" commands as the current task's short id `NN` (see that file for lookup and fallback), while other `{task-id}` placeholders (report titles, paths) keep the full TASK-id form; (2) append the `Completed at` line as the very last line of the user-facing output (this applies to every user-facing output — success, error, and early-return paths alike, not only the success path).
|