@fitlab-ai/agent-infra 0.8.4 → 0.9.0
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/bin/cli.ts +2 -2
- package/dist/bin/cli.js +2 -2
- package/dist/bin/internal-cli.js +98 -0
- package/dist/lib/decide.js +81 -90
- package/dist/lib/defaults.json +9 -0
- package/dist/lib/git/review-snapshot.js +79 -0
- package/dist/lib/git/workflow.js +101 -0
- package/dist/lib/init.js +5 -0
- package/dist/lib/internal/git-workflow.js +42 -0
- package/dist/lib/internal/platform-checks.js +119 -0
- package/dist/lib/internal/platform-comment.js +129 -0
- package/dist/lib/internal/platform-context.js +46 -0
- package/dist/lib/internal/platform-issue.js +142 -0
- package/dist/lib/internal/platform-pr.js +146 -0
- package/dist/lib/internal/release-workflow.js +217 -0
- package/dist/lib/internal/task-artifact.js +67 -0
- package/dist/lib/internal/task-context.js +43 -0
- package/dist/lib/internal/task-event.js +70 -0
- package/dist/lib/internal/task-ledger.js +114 -0
- package/dist/lib/internal/task-lifecycle.js +58 -0
- package/dist/lib/internal/task-short-id.js +83 -0
- package/dist/lib/internal/task-snapshot.js +47 -0
- package/dist/lib/internal/task-verify.js +50 -0
- package/dist/lib/internal/task-warning.js +74 -0
- package/dist/lib/platform/adapters.js +14 -0
- package/dist/lib/platform/context.js +146 -0
- package/dist/lib/platform/github-client.js +124 -0
- package/dist/lib/platform/issue-comments.js +409 -0
- package/dist/lib/platform/issue-metadata.js +183 -0
- package/dist/lib/platform/issues.js +617 -0
- package/dist/lib/platform/metadata-labels.js +28 -0
- package/dist/lib/platform/pr-checks.js +216 -0
- package/dist/lib/platform/pr-summary.js +88 -0
- package/dist/lib/platform/pull-request-metadata.js +38 -0
- package/dist/lib/platform/pull-requests.js +338 -0
- package/dist/lib/platform/releases.js +82 -0
- package/dist/lib/platform/types.js +22 -0
- package/dist/lib/platform/verification-required.js +78 -0
- package/dist/lib/platform/verification-sync.js +1014 -0
- package/dist/lib/platform/verification.js +6 -0
- package/dist/lib/release/channels.js +31 -0
- package/dist/lib/release/workflow.js +32 -0
- package/dist/lib/render.js +3 -2
- package/dist/lib/run/index.js +24 -7
- package/dist/lib/sandbox/capture.js +25 -3
- package/dist/lib/sandbox/commands/create.js +66 -26
- package/dist/lib/sandbox/commands/enter.js +34 -11
- package/dist/lib/sandbox/commands/list-running.js +10 -8
- package/dist/lib/sandbox/commands/show.js +2 -2
- package/dist/lib/sandbox/commands/start.js +53 -15
- package/dist/lib/sandbox/engine.js +33 -3
- package/dist/lib/sandbox/engines/colima.js +2 -2
- package/dist/lib/sandbox/index.js +6 -6
- package/dist/lib/sandbox/mounts.js +36 -0
- package/dist/lib/sandbox/recovery.js +562 -0
- package/dist/lib/sandbox/runtimes/base.dockerfile +4 -0
- package/dist/lib/sandbox/task-resolver.js +5 -1
- package/dist/lib/sandbox/tools.js +19 -0
- package/dist/lib/server/daemon.js +9 -0
- package/dist/lib/server/process-control.js +66 -73
- package/dist/lib/server/process-state.js +168 -0
- package/dist/lib/server/protocol.js +5 -5
- package/dist/lib/task/activity-log.js +61 -0
- package/dist/lib/task/artifact-lifecycle.js +427 -0
- package/dist/lib/task/command-options.js +30 -0
- package/dist/lib/task/commands/cat.js +36 -6
- package/dist/lib/task/commands/decisions.js +80 -46
- package/dist/lib/task/commands/files.js +21 -7
- package/dist/lib/task/commands/grep.js +55 -7
- package/dist/lib/task/commands/issue-body.js +23 -14
- package/dist/lib/task/commands/log.js +27 -70
- package/dist/lib/task/commands/show.js +20 -7
- package/dist/lib/task/commands/status.js +18 -8
- package/dist/lib/task/decision-intents.js +154 -0
- package/dist/lib/task/decision-items.js +53 -0
- package/dist/lib/task/events.js +318 -0
- package/dist/lib/task/frontmatter.js +159 -1
- package/dist/lib/task/implementation-inputs.js +117 -0
- package/dist/lib/task/index.js +12 -9
- package/dist/lib/task/issue-form.js +19 -6
- package/dist/lib/task/ledger-intents.js +185 -0
- package/dist/lib/task/ledger.js +65 -35
- package/dist/lib/task/lifecycle.js +484 -0
- package/dist/lib/task/resolve-ref.js +152 -32
- package/dist/lib/task/review-artifacts.js +101 -0
- package/dist/lib/task/review-fingerprint.js +46 -0
- package/dist/lib/task/sections.js +358 -4
- package/dist/lib/task/short-id.js +292 -7
- package/dist/lib/task/snapshot.js +95 -0
- package/dist/lib/task/verification-checks.js +8 -0
- package/dist/lib/task/verification-config.js +14 -0
- package/dist/lib/task/verification-engine.js +906 -0
- package/dist/lib/task/verification-review.js +3 -0
- package/dist/lib/task/verification-types.js +2 -0
- package/dist/lib/task/verification.js +113 -0
- package/dist/lib/task/workflow-warning-intents.js +131 -0
- package/dist/lib/task/workflow-warnings.js +10 -78
- package/dist/lib/task/write.js +241 -0
- package/dist/lib/update.js +2 -0
- package/lib/decide.ts +57 -97
- package/lib/defaults.json +9 -0
- package/lib/git/review-snapshot.ts +73 -0
- package/lib/git/workflow.ts +101 -0
- package/lib/init.ts +9 -0
- package/lib/internal/git-workflow.ts +37 -0
- package/lib/internal/platform-checks.ts +101 -0
- package/lib/internal/platform-comment.ts +99 -0
- package/lib/internal/platform-context.ts +33 -0
- package/lib/internal/platform-issue.ts +116 -0
- package/lib/internal/platform-pr.ts +119 -0
- package/lib/internal/release-workflow.ts +186 -0
- package/lib/internal/task-artifact.ts +47 -0
- package/lib/internal/task-context.ts +35 -0
- package/lib/internal/task-event.ts +51 -0
- package/lib/internal/task-ledger.ts +86 -0
- package/lib/internal/task-lifecycle.ts +41 -0
- package/lib/internal/task-short-id.ts +55 -0
- package/lib/internal/task-snapshot.ts +32 -0
- package/lib/internal/task-verify.ts +33 -0
- package/lib/internal/task-warning.ts +50 -0
- package/lib/platform/adapters.ts +30 -0
- package/lib/platform/context.ts +164 -0
- package/lib/platform/github-client.ts +146 -0
- package/lib/platform/issue-comments.ts +479 -0
- package/lib/platform/issue-metadata.ts +250 -0
- package/lib/platform/issues.ts +691 -0
- package/lib/platform/metadata-labels.ts +33 -0
- package/lib/platform/pr-checks.ts +246 -0
- package/lib/platform/pr-summary.ts +90 -0
- package/lib/platform/pull-request-metadata.ts +69 -0
- package/lib/platform/pull-requests.ts +380 -0
- package/lib/platform/releases.ts +71 -0
- package/lib/platform/types.ts +74 -0
- package/lib/platform/verification-required.ts +83 -0
- package/{templates/.agents/scripts/platform-adapters/platform-sync.github.js → lib/platform/verification-sync.ts} +221 -363
- package/lib/platform/verification.ts +11 -0
- package/lib/release/channels.ts +30 -0
- package/lib/release/workflow.ts +31 -0
- package/lib/render.ts +3 -2
- package/lib/run/index.ts +25 -7
- package/lib/sandbox/capture.ts +29 -3
- package/lib/sandbox/commands/create.ts +75 -28
- package/lib/sandbox/commands/enter.ts +38 -11
- package/lib/sandbox/commands/list-running.ts +10 -8
- package/lib/sandbox/commands/show.ts +2 -2
- package/lib/sandbox/commands/start.ts +50 -16
- package/lib/sandbox/engine.ts +37 -3
- package/lib/sandbox/engines/colima.ts +2 -2
- package/lib/sandbox/index.ts +6 -6
- package/lib/sandbox/mounts.ts +55 -0
- package/lib/sandbox/recovery.ts +828 -0
- package/lib/sandbox/runtimes/base.dockerfile +4 -0
- package/lib/sandbox/task-resolver.ts +5 -1
- package/lib/sandbox/tools.ts +31 -0
- package/lib/server/daemon.ts +9 -0
- package/lib/server/process-control.ts +70 -71
- package/lib/server/process-state.ts +183 -0
- package/lib/server/protocol.ts +5 -5
- package/lib/task/activity-log.ts +62 -0
- package/lib/task/artifact-lifecycle.ts +484 -0
- package/lib/task/command-options.ts +32 -0
- package/lib/task/commands/cat.ts +22 -9
- package/lib/task/commands/decisions.ts +49 -47
- package/lib/task/commands/files.ts +14 -6
- package/lib/task/commands/grep.ts +34 -7
- package/lib/task/commands/issue-body.ts +16 -16
- package/lib/task/commands/log.ts +17 -70
- package/lib/task/commands/show.ts +14 -6
- package/lib/task/commands/status.ts +17 -7
- package/lib/task/decision-intents.ts +163 -0
- package/lib/task/decision-items.ts +64 -0
- package/lib/task/events.ts +320 -0
- package/lib/task/frontmatter.ts +202 -2
- package/lib/task/implementation-inputs.ts +137 -0
- package/lib/task/index.ts +12 -9
- package/lib/task/issue-form.ts +20 -6
- package/lib/task/ledger-intents.ts +201 -0
- package/lib/task/ledger.ts +77 -31
- package/lib/task/lifecycle.ts +458 -0
- package/lib/task/resolve-ref.ts +197 -36
- package/{templates/.agents/scripts/lib/review-artifacts.js → lib/task/review-artifacts.ts} +11 -12
- package/{templates/.agents/scripts/lib/post-review-commit.js → lib/task/review-fingerprint.ts} +20 -10
- package/lib/task/sections.ts +486 -4
- package/lib/task/short-id.ts +403 -9
- package/lib/task/snapshot.ts +143 -0
- package/lib/task/verification-checks.ts +9 -0
- package/lib/task/verification-config.ts +20 -0
- package/{templates/.agents/scripts/validate-artifact.js → lib/task/verification-engine.ts} +257 -451
- package/lib/task/verification-review.ts +9 -0
- package/lib/task/verification-types.ts +29 -0
- package/lib/task/verification.ts +156 -0
- package/lib/task/workflow-warning-intents.ts +142 -0
- package/lib/task/workflow-warnings.ts +10 -78
- package/lib/task/write.ts +468 -0
- package/lib/update.ts +6 -0
- package/package.json +5 -2
- package/templates/.agents/README.en.md +6 -3
- package/templates/.agents/README.zh-CN.md +6 -3
- package/templates/.agents/rules/README.en.md +6 -5
- package/templates/.agents/rules/README.zh-CN.md +6 -5
- package/templates/.agents/rules/create-issue.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.en.md +5 -184
- package/templates/.agents/rules/create-issue.github.zh-CN.md +12 -178
- package/templates/.agents/rules/create-issue.zh-CN.md +1 -1
- package/templates/.agents/rules/human-decision-context.en.md +36 -0
- package/templates/.agents/rules/human-decision-context.zh-CN.md +36 -0
- package/templates/.agents/rules/issue-fields.github.en.md +4 -148
- package/templates/.agents/rules/issue-fields.github.zh-CN.md +9 -144
- package/templates/.agents/rules/issue-pr-commands.en.md +43 -3
- package/templates/.agents/rules/issue-pr-commands.github.en.md +15 -220
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +23 -213
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +45 -3
- package/templates/.agents/rules/issue-sync.en.md +1 -1
- package/templates/.agents/rules/issue-sync.github.en.md +14 -301
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +36 -287
- package/templates/.agents/rules/issue-sync.zh-CN.md +1 -1
- package/templates/.agents/rules/milestone-inference.en.md +1 -1
- package/templates/.agents/rules/milestone-inference.github.en.md +7 -119
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +8 -108
- package/templates/.agents/rules/milestone-inference.zh-CN.md +1 -1
- package/templates/.agents/rules/next-step-output.en.md +12 -11
- package/templates/.agents/rules/next-step-output.zh-CN.md +12 -11
- package/templates/.agents/rules/no-mid-flow-questions.en.md +3 -3
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +3 -3
- package/templates/.agents/rules/pr-checks-commands.en.md +16 -3
- package/templates/.agents/rules/pr-checks-commands.github.en.md +10 -54
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +19 -47
- package/templates/.agents/rules/pr-checks-commands.zh-CN.md +30 -3
- package/templates/.agents/rules/pr-sync.en.md +30 -3
- package/templates/.agents/rules/pr-sync.github.en.md +12 -115
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +26 -104
- package/templates/.agents/rules/pr-sync.zh-CN.md +43 -3
- package/templates/.agents/rules/review-handshake.en.md +13 -9
- package/templates/.agents/rules/review-handshake.zh-CN.md +13 -9
- package/templates/.agents/rules/task-management.en.md +11 -2
- package/templates/.agents/rules/task-management.zh-CN.md +11 -3
- package/templates/.agents/rules/task-short-id.en.md +25 -29
- package/templates/.agents/rules/task-short-id.zh-CN.md +20 -23
- package/templates/.agents/scripts/lib/agent-infra-package.js +141 -0
- package/templates/.agents/scripts/task-short-id.js +71 -533
- package/templates/.agents/skills/analyze-task/SKILL.en.md +22 -55
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +26 -59
- package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -3
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -3
- package/templates/.agents/skills/block-task/SKILL.en.md +21 -47
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +23 -47
- package/templates/.agents/skills/block-task/config/verify.json +1 -2
- package/templates/.agents/skills/cancel-task/SKILL.en.md +16 -45
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +16 -45
- package/templates/.agents/skills/cancel-task/config/verify.json +1 -2
- package/templates/.agents/skills/check-task/SKILL.en.md +6 -3
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +6 -3
- package/templates/.agents/skills/close-codescan/SKILL.en.md +6 -24
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +6 -24
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +6 -24
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +6 -24
- package/templates/.agents/skills/code-task/SKILL.en.md +22 -35
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +28 -44
- package/templates/.agents/skills/code-task/config/verify.en.json +3 -3
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +3 -3
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +13 -9
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +13 -9
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/reference/report-template.en.md +11 -1
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +11 -1
- package/templates/.agents/skills/commit/SKILL.en.md +18 -14
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +18 -14
- package/templates/.agents/skills/commit/config/verify.json +1 -2
- package/templates/.agents/skills/commit/reference/commit-message.en.md +1 -11
- package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +1 -11
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.en.md +4 -8
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.zh-CN.md +4 -8
- package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +6 -18
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +5 -17
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +42 -2
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +42 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +13 -36
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +13 -36
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +1 -3
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +1 -3
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +10 -54
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +10 -79
- package/templates/.agents/skills/complete-task/SKILL.en.md +59 -63
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +59 -63
- package/templates/.agents/skills/complete-task/config/verify.en.json +11 -6
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +11 -6
- package/templates/.agents/skills/create-pr/SKILL.en.md +19 -44
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +19 -43
- package/templates/.agents/skills/create-pr/config/verify.json +1 -2
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +8 -12
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +7 -11
- package/templates/.agents/skills/create-task/SKILL.en.md +12 -13
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +12 -13
- package/templates/.agents/skills/create-task/config/verify.json +1 -2
- package/templates/.agents/skills/import-codescan/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/import-codescan/config/verify.json +1 -2
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/import-dependabot/config/verify.json +1 -2
- package/templates/.agents/skills/import-issue/SKILL.en.md +9 -13
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +10 -14
- package/templates/.agents/skills/import-issue/config/verify.json +1 -2
- package/templates/.agents/skills/init-milestones/SKILL.en.md +2 -2
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.github.sh +5 -4
- package/templates/.agents/skills/plan-task/SKILL.en.md +17 -42
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +22 -49
- package/templates/.agents/skills/plan-task/config/verify.en.json +1 -3
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +1 -3
- package/templates/.agents/skills/post-release/SKILL.en.md +11 -81
- package/templates/.agents/skills/post-release/SKILL.zh-CN.md +8 -78
- 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 -163
- package/templates/.agents/skills/release/SKILL.zh-CN.md +15 -162
- package/templates/.agents/skills/restore-task/SKILL.en.md +11 -29
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +11 -29
- package/templates/.agents/skills/restore-task/config/verify.json +1 -2
- package/templates/.agents/skills/review-analysis/SKILL.en.md +13 -25
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +13 -33
- package/templates/.agents/skills/review-analysis/config/verify.en.json +3 -4
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +3 -4
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +9 -12
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +9 -12
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +9 -2
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +9 -2
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +7 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +7 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +22 -36
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +23 -41
- package/templates/.agents/skills/review-code/config/verify.en.json +5 -5
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +5 -5
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +56 -18
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +56 -18
- package/templates/.agents/skills/review-code/reference/report-template.en.md +12 -4
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +12 -4
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +7 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +7 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +13 -25
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +13 -33
- package/templates/.agents/skills/review-plan/config/verify.en.json +3 -4
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +3 -4
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +9 -12
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +9 -12
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +9 -2
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +9 -2
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +7 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +7 -0
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +6 -3
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -3
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +177 -151
- package/templates/.agents/skills/watch-pr/SKILL.en.md +24 -14
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +25 -15
- package/templates/.agents/skills/watch-pr/config/verify.json +1 -2
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +2 -2
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +2 -2
- package/templates/.agents/templates/task.en.md +6 -1
- package/templates/.agents/templates/task.zh-CN.md +6 -1
- 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 -0
- package/templates/.claude/commands/commit.zh-CN.md +1 -0
- 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/watch-pr.en.md +1 -1
- package/templates/.claude/commands/watch-pr.zh-CN.md +1 -1
- package/templates/.gemini/commands/_project_/analyze-task.en.toml +2 -0
- package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/block-task.en.toml +2 -0
- package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/cancel-task.en.toml +2 -0
- package/templates/.gemini/commands/_project_/cancel-task.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/check-task.en.toml +2 -0
- package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/code-task.en.toml +2 -0
- package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/commit.en.toml +4 -0
- package/templates/.gemini/commands/_project_/commit.zh-CN.toml +4 -0
- package/templates/.gemini/commands/_project_/complete-manual-validation.en.toml +2 -0
- package/templates/.gemini/commands/_project_/complete-manual-validation.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/complete-task.en.toml +2 -0
- package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/create-pr.en.toml +2 -0
- package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/plan-task.en.toml +2 -0
- package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/review-analysis.en.toml +2 -0
- package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/review-code.en.toml +2 -0
- package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/review-plan.en.toml +2 -0
- package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +2 -0
- package/templates/.gemini/commands/_project_/watch-pr.en.toml +2 -0
- package/templates/.gemini/commands/_project_/watch-pr.zh-CN.toml +2 -0
- package/templates/.git-hooks/check-large-files.cjs +92 -0
- package/templates/.git-hooks/check-version-format.sh +5 -1
- package/templates/.git-hooks/pre-commit +1 -0
- package/templates/.opencode/commands/analyze-task.en.md +1 -1
- package/templates/.opencode/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/check-task.en.md +1 -1
- package/templates/.opencode/commands/check-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/code-task.en.md +1 -1
- package/templates/.opencode/commands/code-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/commit.en.md +2 -0
- package/templates/.opencode/commands/commit.zh-CN.md +2 -0
- package/templates/.opencode/commands/complete-task.en.md +1 -1
- package/templates/.opencode/commands/complete-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/plan-task.en.md +1 -1
- package/templates/.opencode/commands/plan-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/review-analysis.en.md +1 -1
- package/templates/.opencode/commands/review-analysis.zh-CN.md +1 -1
- package/templates/.opencode/commands/review-code.en.md +1 -1
- package/templates/.opencode/commands/review-code.zh-CN.md +1 -1
- package/templates/.opencode/commands/review-plan.en.md +1 -1
- package/templates/.opencode/commands/review-plan.zh-CN.md +1 -1
- package/templates/.agents/scripts/platform-adapters/platform-sync.js +0 -13
- package/templates/.agents/scripts/review-diff-fingerprint.js +0 -99
- package/templates/.agents/scripts/workflow-warnings.js +0 -290
- package/templates/.agents/skills/code-task/scripts/detect-mode.js +0 -257
- package/templates/.agents/skills/release/scripts/manage-milestones.github.sh +0 -80
- package/templates/.agents/skills/release/scripts/manage-milestones.sh +0 -6
|
@@ -3,6 +3,7 @@ name: block-task
|
|
|
3
3
|
description: >
|
|
4
4
|
标记任务为阻塞状态并记录原因。
|
|
5
5
|
当任务因外部阻塞无法推进、需要挂起并记录原因时使用。
|
|
6
|
+
仅当对话包含可解析的任务引用时才可自动调用本技能。
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# 标记任务阻塞
|
|
@@ -21,19 +22,15 @@ description: >
|
|
|
21
22
|
|
|
22
23
|
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
23
24
|
|
|
24
|
-
##
|
|
25
|
+
## 任务上下文解析
|
|
25
26
|
|
|
26
|
-
>
|
|
27
|
+
> 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
## 步骤开始:本地生命周期边界
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task [started]** by {agent} — started
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
33
|
+
确认前置条件后,由步骤 3 的单次 lifecycle intent 原子写入 started/done 日志、基础元数据、目录转移和短号释放;本步骤不得提前手工写入其中任一项。
|
|
37
34
|
|
|
38
35
|
## 执行步骤
|
|
39
36
|
### 1. 验证任务存在
|
|
@@ -52,58 +49,40 @@ description: >
|
|
|
52
49
|
- [ ] 已经尝试了哪些解决方案?
|
|
53
50
|
- [ ] 需要什么帮助或信息才能解除阻塞?
|
|
54
51
|
|
|
55
|
-
### 3.
|
|
56
|
-
|
|
57
|
-
获取当前时间:
|
|
52
|
+
### 3. 执行本地生命周期意图
|
|
58
53
|
|
|
59
54
|
```bash
|
|
60
|
-
|
|
55
|
+
agent-infra-internal task-lifecycle {task-id} block --agent {agent} \
|
|
56
|
+
--reason "{一行原因}" --unblock-condition "{解除阻塞条件}"
|
|
61
57
|
```
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
- `status`:blocked
|
|
65
|
-
- `blocked_at`:{当前时间戳}
|
|
66
|
-
- `updated_at`:{当前时间戳}
|
|
67
|
-
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
68
|
-
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
69
|
-
```
|
|
70
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task** by {agent} — {一行原因}
|
|
71
|
-
```
|
|
59
|
+
解析 stdout 单 JSON。仅 `status=applied|no-op` 视为本地完成;`status=failed` 时展示 `error` 与 `completedSteps`/`pendingSteps`,不得宣称任务已阻塞。生命周期核心统一维护 `status`/`blocked_at`、阻塞信息、Activity Log、目录与短号。
|
|
72
60
|
|
|
73
|
-
|
|
61
|
+
### 4. 验证本地终态
|
|
74
62
|
|
|
75
|
-
|
|
63
|
+
确认结构化结果的 `targetState=blocked`、目标路径为 `.agents/workspace/blocked/{task-id}`、短号效果已提交,并检查:
|
|
76
64
|
|
|
77
65
|
```bash
|
|
78
|
-
|
|
66
|
+
ls .agents/workspace/blocked/{task-id}/task.md
|
|
79
67
|
```
|
|
80
68
|
|
|
81
|
-
### 5.
|
|
69
|
+
### 5. 保留恢复身份
|
|
82
70
|
|
|
83
|
-
|
|
84
|
-
ls .agents/workspace/blocked/{task-id}/task.md
|
|
85
|
-
```
|
|
71
|
+
记录 lifecycle 结果中的请求身份与规范 metadata,供失败后以同一 intent 安全重试;不得手工补写局部状态。
|
|
86
72
|
|
|
87
73
|
### 6. 同步到 Issue(可选)
|
|
88
74
|
|
|
89
75
|
检查 `task.md` 中是否存在有效的 `issue_number`。如果没有,跳过。
|
|
90
76
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
如果存在有效的 `issue_number`,按 issue-sync.md 设置 `status: blocked`。
|
|
77
|
+
如果存在有效的 `issue_number`,调用 `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status blocked`。
|
|
78
|
+
随后调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}` 更新 task 评论。
|
|
94
79
|
|
|
95
80
|
### 7. 完成校验
|
|
96
81
|
|
|
97
|
-
**释放短号**(先 `mv` 目录已成功,再 release;脚本幂等,未在注册表也返回 0):
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
node .agents/scripts/task-short-id.js release "$task_id" || true
|
|
101
|
-
```
|
|
102
|
-
|
|
103
82
|
运行完成校验,确认任务产物和同步状态符合规范:
|
|
104
83
|
|
|
105
84
|
```bash
|
|
106
|
-
|
|
85
|
+
agent-infra-internal task-verify {task-id} block-task.completed --format text
|
|
107
86
|
```
|
|
108
87
|
|
|
109
88
|
处理结果:
|
|
@@ -117,7 +96,7 @@ node .agents/scripts/validate-artifact.js gate block-task .agents/workspace/bloc
|
|
|
117
96
|
|
|
118
97
|
> 仅在校验通过后执行本步骤。
|
|
119
98
|
|
|
120
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号
|
|
99
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
121
100
|
|
|
122
101
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「归档路径」之后、「解除阻塞时执行」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取已读入的 task.md 的 `branch` 值(任务此时已移动到 blocked/,从 `.agents/workspace/blocked/{task-id}/task.md` 读取)。该块独立于「下一步」语义。
|
|
123
102
|
|
|
@@ -135,8 +114,7 @@ node .agents/scripts/validate-artifact.js gate block-task .agents/workspace/bloc
|
|
|
135
114
|
ai sandbox rm {branch}
|
|
136
115
|
|
|
137
116
|
解除阻塞时执行:
|
|
138
|
-
|
|
139
|
-
# 然后更新 task.md:status -> active,移除 blocked_at
|
|
117
|
+
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{恢复说明}"
|
|
140
118
|
|
|
141
119
|
下一步 - 检查任务状态(解除阻塞后):
|
|
142
120
|
- Claude Code / OpenCode:/check-task {task-ref}
|
|
@@ -159,13 +137,11 @@ ai sandbox rm {branch}
|
|
|
159
137
|
当阻塞问题解决后:
|
|
160
138
|
|
|
161
139
|
```bash
|
|
162
|
-
|
|
163
|
-
mv .agents/workspace/blocked/{task-id} .agents/workspace/active/{task-id}
|
|
164
|
-
|
|
165
|
-
# 2. 更新 task.md:设置 status 为 active,更新时间戳
|
|
166
|
-
# 3. 从中断处继续(检查 current_step)
|
|
140
|
+
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{恢复说明}"
|
|
167
141
|
```
|
|
168
142
|
|
|
143
|
+
成功后从保留的 `current_step` 继续。失败时按结构化 recovery 字段以同一 intent 重试,不手工移动目录或编辑基础元数据。
|
|
144
|
+
|
|
169
145
|
## 注意事项
|
|
170
146
|
|
|
171
147
|
1. **何时阻塞**:仅在确实无法继续时才阻塞。如果是可以克服的困难,先尝试解决。
|
|
@@ -3,6 +3,7 @@ name: cancel-task
|
|
|
3
3
|
description: >
|
|
4
4
|
Cancel an unneeded task and move it.
|
|
5
5
|
Use when a task is no longer needed and should be dropped from active work.
|
|
6
|
+
Only invoke this skill automatically when the conversation includes a resolvable task reference.
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Cancel Task
|
|
@@ -15,19 +16,15 @@ description: >
|
|
|
15
16
|
|
|
16
17
|
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
17
18
|
|
|
18
|
-
## Task
|
|
19
|
+
## Task Context Resolution
|
|
19
20
|
|
|
20
|
-
>
|
|
21
|
+
> The entry point may omit the task ref and also accepts a legacy positional ref or `--task <ref>` / `-t <ref>`. Separate task scope from the full arguments while preserving every business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty, one positional ref, or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to that full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
> 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.
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
## Step Start: Local Lifecycle Boundary
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task [started]** by {agent} — started
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
27
|
+
After prerequisites pass, Step 3 declares one lifecycle intent that atomically commits base metadata, the started/done pair, the directory move, and short-id handling. Do not write partial lifecycle state first.
|
|
31
28
|
|
|
32
29
|
## Steps
|
|
33
30
|
|
|
@@ -53,30 +50,17 @@ Infer the Issue closing label from the cancellation reason:
|
|
|
53
50
|
|
|
54
51
|
When syncing to the Issue, replace any existing `status:` labels with the inferred label.
|
|
55
52
|
|
|
56
|
-
### 3.
|
|
57
|
-
|
|
58
|
-
Get the current time:
|
|
53
|
+
### 3. Apply the Local Lifecycle Intent
|
|
59
54
|
|
|
60
55
|
```bash
|
|
61
|
-
|
|
56
|
+
agent-infra-internal task-lifecycle {task-id} cancel --agent {agent} --reason "{one-line cancellation reason}"
|
|
62
57
|
```
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
- `status`: completed
|
|
66
|
-
- `cancelled_at`: {current timestamp}
|
|
67
|
-
- `cancel_reason`: {cancellation reason}
|
|
68
|
-
- `updated_at`: {current timestamp}
|
|
69
|
-
- `agent_infra_version`: value from `.agents/rules/version-stamp.md`
|
|
70
|
-
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
71
|
-
```
|
|
72
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task** by {agent} — {one-line cancellation reason}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### 4. Move the Task
|
|
59
|
+
Only `status=applied|no-op` means local cancellation completed. On `status=failed`, show the structured error and recovery steps and retry the same intent; do not manually edit task.md, move the directory, or release the short id.
|
|
76
60
|
|
|
77
|
-
|
|
61
|
+
### 4. Verify the Local Final State
|
|
78
62
|
|
|
79
|
-
|
|
63
|
+
Confirm `targetState=completed`, terminal fields, and the short-id effect from the structured result.
|
|
80
64
|
|
|
81
65
|
### 5. Verify the Move
|
|
82
66
|
|
|
@@ -90,17 +74,10 @@ Confirm the task directory was moved successfully.
|
|
|
90
74
|
|
|
91
75
|
Check whether `task.md` contains a valid `issue_number`. If not, skip this step.
|
|
92
76
|
|
|
93
|
-
> Issue sync rules live in `.agents/rules/issue-sync.md`. Read that file before syncing, and complete upstream repository detection plus permission detection.
|
|
94
|
-
> Read `.agents/rules/issue-pr-commands.md` before closing the Issue.
|
|
95
|
-
|
|
96
77
|
If a valid `issue_number` exists:
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
- Remove all assignees (skip directly when permission is insufficient; no fallback)
|
|
101
|
-
- Publish a cancellation comment using the cancel marker defined in `.agents/rules/issue-sync.md`
|
|
102
|
-
- Create or update the task comment marker defined in `.agents/rules/issue-sync.md` using the task-comment sync rules from `.agents/rules/issue-sync.md`
|
|
103
|
-
- Close the Issue by following the "Close an Issue" command in `.agents/rules/issue-pr-commands.md`, using the fixed reason `not planned`
|
|
78
|
+
- Run `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status {reason} --in-labels none --assignees none --milestone none --state closed --close-reason not_planned`
|
|
79
|
+
- Write the cancellation body to a temporary file and run `agent-infra-internal platform-comment sync {task-id} --kind cancel --body-file {path} --agent {agent}`
|
|
80
|
+
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`
|
|
104
81
|
|
|
105
82
|
The cancellation comment must include at least:
|
|
106
83
|
- the cancellation reason
|
|
@@ -108,16 +85,10 @@ The cancellation comment must include at least:
|
|
|
108
85
|
|
|
109
86
|
### 7. Verification Gate
|
|
110
87
|
|
|
111
|
-
**Release short id** (after the directory has already been moved; the script is idempotent and returns 0 even if the task isn't registered):
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
node .agents/scripts/task-short-id.js release "$task_id" || true
|
|
115
|
-
```
|
|
116
|
-
|
|
117
88
|
Run the verification gate to confirm the moved task and sync state are valid:
|
|
118
89
|
|
|
119
90
|
```bash
|
|
120
|
-
|
|
91
|
+
agent-infra-internal task-verify {task-id} cancel-task.completed --format text
|
|
121
92
|
```
|
|
122
93
|
|
|
123
94
|
Handle the result as follows:
|
|
@@ -131,7 +102,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
131
102
|
|
|
132
103
|
> Execute this step only after the verification gate passes.
|
|
133
104
|
|
|
134
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id
|
|
105
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id `NN` (falling back to the full TASK-id when unallocated or released); (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).
|
|
135
106
|
|
|
136
107
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after "Target path" and before "Next step" in the output below — only when BOTH (1) `.agents/.airc.json` has a `sandbox` field and (2) task.md's `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the task.md you already loaded (the task has moved to completed/, so read it from `.agents/workspace/completed/{task-id}/task.md`). This block is independent of "Next steps" semantics.
|
|
137
108
|
|
|
@@ -3,6 +3,7 @@ name: cancel-task
|
|
|
3
3
|
description: >
|
|
4
4
|
取消不再需要的任务并转移。
|
|
5
5
|
当某个任务不再需要、应从 active 工作中撤下时使用。
|
|
6
|
+
仅当对话包含可解析的任务引用时才可自动调用本技能。
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# 取消任务
|
|
@@ -15,19 +16,15 @@ description: >
|
|
|
15
16
|
|
|
16
17
|
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
17
18
|
|
|
18
|
-
##
|
|
19
|
+
## 任务上下文解析
|
|
19
20
|
|
|
20
|
-
>
|
|
21
|
+
> 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
## 步骤开始:本地生命周期边界
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task [started]** by {agent} — started
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
27
|
+
确认前置条件后,由步骤 3 的单次 lifecycle intent 原子完成基础元数据、started/done 日志、目录转移和短号处理;不得提前手工写入局部状态。
|
|
31
28
|
|
|
32
29
|
## 执行步骤
|
|
33
30
|
### 1. 验证任务存在
|
|
@@ -52,30 +49,17 @@ description: >
|
|
|
52
49
|
|
|
53
50
|
后续同步到 Issue 时,使用最终推断结果替换现有 `status:` labels。
|
|
54
51
|
|
|
55
|
-
### 3.
|
|
56
|
-
|
|
57
|
-
获取当前时间:
|
|
52
|
+
### 3. 执行本地生命周期意图
|
|
58
53
|
|
|
59
54
|
```bash
|
|
60
|
-
|
|
55
|
+
agent-infra-internal task-lifecycle {task-id} cancel --agent {agent} --reason "{一行取消原因}"
|
|
61
56
|
```
|
|
62
57
|
|
|
63
|
-
|
|
64
|
-
- `status`:completed
|
|
65
|
-
- `cancelled_at`:{当前时间戳}
|
|
66
|
-
- `cancel_reason`:{取消原因}
|
|
67
|
-
- `updated_at`:{当前时间戳}
|
|
68
|
-
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
69
|
-
- **追加**到 `## Activity Log`(不要覆盖之前记录):
|
|
70
|
-
```
|
|
71
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task** by {agent} — {一行取消原因}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 4. 转移任务
|
|
58
|
+
仅 `status=applied|no-op` 视为本地取消完成。`status=failed` 时展示结构化 `error` 与 recovery steps,并以同一 intent 重试;不得手工编辑 task.md、移动目录或释放短号。
|
|
75
59
|
|
|
76
|
-
|
|
60
|
+
### 4. 验证本地终态
|
|
77
61
|
|
|
78
|
-
|
|
62
|
+
确认 `targetState=completed`、终态字段与短号效果符合结构化结果。
|
|
79
63
|
|
|
80
64
|
### 5. 验证转移
|
|
81
65
|
|
|
@@ -89,17 +73,10 @@ ls .agents/workspace/completed/{task-id}/task.md
|
|
|
89
73
|
|
|
90
74
|
检查 `task.md` 中是否存在有效的 `issue_number`。如果没有,跳过此步骤。
|
|
91
75
|
|
|
92
|
-
> Issue 同步规则见 `.agents/rules/issue-sync.md`。执行同步前先读取该文件,完成 upstream 仓库检测和权限检测。
|
|
93
|
-
> 关闭 Issue 前先读取 `.agents/rules/issue-pr-commands.md`。
|
|
94
|
-
|
|
95
76
|
如果存在有效的 `issue_number`:
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
- 移除全部 assignees(无权限时直接跳过,不做替代)
|
|
100
|
-
- 发布取消评论,隐藏标记使用 `.agents/rules/issue-sync.md` 中定义的 cancel 评论标记
|
|
101
|
-
- 使用 `.agents/rules/issue-sync.md` 的 task.md 评论同步规则创建或更新 `.agents/rules/issue-sync.md` 中定义的 task 评论标记
|
|
102
|
-
- 关闭 Issue:按 `.agents/rules/issue-pr-commands.md` 中的“关闭 Issue”命令执行,关闭原因固定为 `not planned`
|
|
77
|
+
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {agent} --status {reason} --in-labels none --assignees none --milestone none --state closed --close-reason not_planned`
|
|
78
|
+
- 将取消正文写入临时文件,调用 `agent-infra-internal platform-comment sync {task-id} --kind cancel --body-file {path} --agent {agent}`
|
|
79
|
+
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {agent}`
|
|
103
80
|
|
|
104
81
|
取消评论至少包含:
|
|
105
82
|
- 取消原因
|
|
@@ -107,16 +84,10 @@ ls .agents/workspace/completed/{task-id}/task.md
|
|
|
107
84
|
|
|
108
85
|
### 7. 完成校验
|
|
109
86
|
|
|
110
|
-
**释放短号**(先 `mv` 目录已成功,再 release;脚本幂等,未在注册表也返回 0):
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
node .agents/scripts/task-short-id.js release "$task_id" || true
|
|
114
|
-
```
|
|
115
|
-
|
|
116
87
|
运行完成校验,确认任务转移和同步状态符合规范:
|
|
117
88
|
|
|
118
89
|
```bash
|
|
119
|
-
|
|
90
|
+
agent-infra-internal task-verify {task-id} cancel-task.completed --format text
|
|
120
91
|
```
|
|
121
92
|
|
|
122
93
|
处理结果:
|
|
@@ -130,7 +101,7 @@ node .agents/scripts/validate-artifact.js gate cancel-task .agents/workspace/com
|
|
|
130
101
|
|
|
131
102
|
> 仅在校验通过后执行本步骤。
|
|
132
103
|
|
|
133
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号
|
|
104
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
134
105
|
|
|
135
106
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「目标路径」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取已读入的 task.md 的 `branch` 值(任务此时已移动到 completed/,从 `.agents/workspace/completed/{task-id}/task.md` 读取)。该块独立于「下一步」语义。
|
|
136
107
|
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
"require_cancelled_at": true
|
|
20
20
|
},
|
|
21
21
|
"activity-log": {
|
|
22
|
-
"expected_action_pattern": "(Cancel Task|Cancelled)"
|
|
23
|
-
"freshness_minutes": 30
|
|
22
|
+
"expected_action_pattern": "(Cancel Task|Cancelled)"
|
|
24
23
|
},
|
|
25
24
|
"platform-sync": {
|
|
26
25
|
"when": "issue_number_exists",
|
|
@@ -3,6 +3,7 @@ name: check-task
|
|
|
3
3
|
description: >
|
|
4
4
|
Check a task's current status and progress.
|
|
5
5
|
Use when you want a quick view of a task's current status and progress.
|
|
6
|
+
Only invoke this skill automatically when the conversation includes a resolvable task reference.
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Check Task Status
|
|
@@ -12,9 +13,11 @@ description: >
|
|
|
12
13
|
- This skill is **read-only** -- do not modify any files
|
|
13
14
|
- Mechanical facts (frontmatter metadata, artifact grouping, git/platform state, and locating the task across the active, blocked, and completed directories) are delegated to the deterministic `ai task status` command. This skill only adds the semantic layer the CLI cannot produce: workflow-stage interpretation, review-verdict parsing, and the next-step recommendation.
|
|
14
15
|
|
|
15
|
-
## Task
|
|
16
|
+
## Task Context Resolution
|
|
16
17
|
|
|
17
|
-
>
|
|
18
|
+
> The entry point may omit the task ref and also accepts a legacy positional ref or `--task <ref>` / `-t <ref>`. Separate task scope from the full arguments while preserving every business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty, one positional ref, or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to that full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
19
|
+
|
|
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.
|
|
18
21
|
|
|
19
22
|
## Steps
|
|
20
23
|
|
|
@@ -74,7 +77,7 @@ Recommend the appropriate next skill based on the current workflow state. You mu
|
|
|
74
77
|
>
|
|
75
78
|
> **Important: if the latest review report contains any issue at all, do not use the corresponding review-passed row. Use the corresponding has-issues row instead.**
|
|
76
79
|
>
|
|
77
|
-
> Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the table commands below as the short id
|
|
80
|
+
> Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the table commands below as the short id `NN` (falling back to the full TASK-id when unallocated or released); (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).
|
|
78
81
|
|
|
79
82
|
| Current State | Claude Code / OpenCode | Gemini CLI | Codex CLI |
|
|
80
83
|
|----------------------------|-----------------------------------------------------|------------------------------------------|-----------------------------------------------------|
|
|
@@ -3,6 +3,7 @@ name: check-task
|
|
|
3
3
|
description: >
|
|
4
4
|
查看任务的当前状态和进度。
|
|
5
5
|
当想快速查看某个任务当前状态与进度时使用。
|
|
6
|
+
仅当对话包含可解析的任务引用时才可自动调用本技能。
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# 查看任务状态
|
|
@@ -12,9 +13,11 @@ description: >
|
|
|
12
13
|
- 本技能是**只读**操作 —— 不修改任何文件
|
|
13
14
|
- 机械数据(frontmatter 元数据、产物分组、Git/Platform 状态,以及跨 active、blocked、completed 三目录定位任务)一律委托给确定性的 `ai task status` 命令。本技能只负责 CLI 无法产出的语义层:工作流阶段解读、审查结论解析、下一步建议。
|
|
14
15
|
|
|
15
|
-
##
|
|
16
|
+
## 任务上下文解析
|
|
16
17
|
|
|
17
|
-
>
|
|
18
|
+
> 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
19
|
+
|
|
20
|
+
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
18
21
|
|
|
19
22
|
## 执行步骤
|
|
20
23
|
|
|
@@ -74,7 +77,7 @@ ai task status {task-id}
|
|
|
74
77
|
>
|
|
75
78
|
> **特别注意:只要最新审查报告中存在任何问题,就不能使用对应「审查通过」行。必须改用对应「审查有问题」行。**
|
|
76
79
|
>
|
|
77
|
-
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 下方表格中命令的 `{task-ref}` 渲染为短号
|
|
80
|
+
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 下方表格中命令的 `{task-ref}` 渲染为短号 `NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
78
81
|
|
|
79
82
|
| 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
|
|
80
83
|
|--------------------|------------------------------|------------------------------------------|------------------------------|
|
|
@@ -13,15 +13,9 @@ Dismiss the specified Code Scanning (CodeQL) alert and record a justified reason
|
|
|
13
13
|
|
|
14
14
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
15
15
|
|
|
16
|
-
## Step Start:
|
|
16
|
+
## Step Start: Local Lifecycle Boundary
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan [started]** by {agent} — started
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
18
|
+
The skill still owns the security-alert API. When a related task exists, Step 7 declares exactly one local lifecycle intent that commits base metadata, the log pair, archival placement, and short-id handling.
|
|
25
19
|
|
|
26
20
|
## Execution Flow
|
|
27
21
|
|
|
@@ -85,27 +79,17 @@ Dismiss the alert by following the Code Scanning dismiss command in `.agents/rul
|
|
|
85
79
|
### 7. Record in the Task (If Any)
|
|
86
80
|
|
|
87
81
|
If a related task exists (search for `codescan_alert_number: <alert-number>`):
|
|
88
|
-
Get the current time:
|
|
89
82
|
|
|
90
83
|
```bash
|
|
91
|
-
|
|
84
|
+
agent-infra-internal task-lifecycle {task-id} close-codescan --agent {agent} \
|
|
85
|
+
--alert-number {alert-number} --reason "{reason}"
|
|
92
86
|
```
|
|
93
87
|
|
|
94
|
-
-
|
|
95
|
-
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
96
|
-
```
|
|
97
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
|
|
98
|
-
```
|
|
99
|
-
- Archive the task
|
|
100
|
-
- **Release short id** (after the archive `mv` succeeded; the script is idempotent):
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
node .agents/scripts/task-short-id.js release "$task_id" || true
|
|
104
|
-
```
|
|
88
|
+
Only `status=applied|no-op` means local archival completed. If the API dismissal succeeded but lifecycle returns `failed`, explicitly report that remote is dismissed while local recovery remains, show recovery steps, and retry the same intent. Do not hand-edit task.md, move directories, or release the short id.
|
|
105
89
|
|
|
106
90
|
### 8. Inform User
|
|
107
91
|
|
|
108
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id
|
|
92
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id `NN` (falling back to the full TASK-id when unallocated or released); (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).
|
|
109
93
|
|
|
110
94
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after the "Note:" line and before "Next step" in the output below — only when ALL of (1) `.agents/.airc.json` has a `sandbox` field, (2) step 7 located a related task by the alert number, and (3) that related task's task.md `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the related task.md located in step 7. This block is independent of "Next step" semantics.
|
|
111
95
|
|
|
@@ -145,5 +129,3 @@ Next step - complete and archive the task if a related task exists:
|
|
|
145
129
|
- Already closed: output "Alert #{number} is already {state}"
|
|
146
130
|
- Permission error: output "No permission to modify alerts"
|
|
147
131
|
- User canceled: output "Cancellation acknowledged"
|
|
148
|
-
|
|
149
|
-
|
|
@@ -13,15 +13,9 @@ description: >
|
|
|
13
13
|
|
|
14
14
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## 步骤开始:本地生命周期边界
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan [started]** by {agent} — started
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
18
|
+
安全告警 API 仍由本技能处理;若存在关联任务,步骤 7 只声明一个本地 lifecycle intent,由核心统一提交基础元数据、日志、归档目录和短号。
|
|
25
19
|
|
|
26
20
|
## 执行流程
|
|
27
21
|
|
|
@@ -85,27 +79,17 @@ Code Scanning 告警 #{alert-number}
|
|
|
85
79
|
### 7. 记录到任务(如存在)
|
|
86
80
|
|
|
87
81
|
如果有关联任务(搜索 `codescan_alert_number: <alert-number>`):
|
|
88
|
-
获取当前时间:
|
|
89
82
|
|
|
90
83
|
```bash
|
|
91
|
-
|
|
84
|
+
agent-infra-internal task-lifecycle {task-id} close-codescan --agent {agent} \
|
|
85
|
+
--alert-number {alert-number} --reason "{reason}"
|
|
92
86
|
```
|
|
93
87
|
|
|
94
|
-
-
|
|
95
|
-
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
96
|
-
```
|
|
97
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
|
|
98
|
-
```
|
|
99
|
-
- 归档任务
|
|
100
|
-
- **释放短号**(归档目录已 mv 成功,再 release;脚本幂等):
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
node .agents/scripts/task-short-id.js release "$task_id" || true
|
|
104
|
-
```
|
|
88
|
+
仅 `status=applied|no-op` 视为本地归档完成。若 API 已关闭但 lifecycle 返回 `failed`,必须明确报告“远端已关闭、本地待恢复”,展示 recovery steps,并以同一 intent 重试;不得手工更新 task.md、移动目录或释放短号。
|
|
105
89
|
|
|
106
90
|
### 8. 告知用户
|
|
107
91
|
|
|
108
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号
|
|
92
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
109
93
|
|
|
110
94
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) 第 7 步按告警号定位到了关联任务、(3) 该关联任务 task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「注意:…」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取第 7 步定位到的关联任务 task.md 的 `branch` 值。该块独立于「下一步」语义。
|
|
111
95
|
|
|
@@ -145,5 +129,3 @@ ai sandbox rm {branch}
|
|
|
145
129
|
- 已关闭:提示 "Alert #{number} is already {state}"
|
|
146
130
|
- 权限错误:提示 "No permission to modify alerts"
|
|
147
131
|
- 用户取消:提示 "Cancellation acknowledged"
|
|
148
|
-
|
|
149
|
-
|