@fitlab-ai/agent-infra 0.9.12 → 0.9.14
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 +11 -11
- package/README.zh-CN.md +11 -11
- package/bin/cli.ts +26 -9
- package/dist/bin/cli.js +173 -157
- package/dist/bin/internal-cli.js +66 -40
- package/dist/lib/agent-client.js +5 -0
- package/dist/lib/agent-clients/next-steps.js +6 -1
- package/dist/lib/decide.js +3 -3
- package/dist/lib/internal/agent-client.js +5 -2
- package/dist/lib/internal/cli-route-inventory.js +152 -0
- package/dist/lib/internal/codex-lifecycle.js +9 -6
- package/dist/lib/internal/codex-sandbox-controller.js +8 -2
- package/dist/lib/internal/git-workflow.js +10 -6
- package/dist/lib/internal/platform-checks.js +19 -7
- package/dist/lib/internal/platform-comment.js +25 -13
- package/dist/lib/internal/platform-context.js +6 -3
- package/dist/lib/internal/platform-issue.js +20 -13
- package/dist/lib/internal/platform-metadata.js +88 -0
- package/dist/lib/internal/platform-pr-review.js +26 -13
- package/dist/lib/internal/platform-pr.js +84 -31
- package/dist/lib/internal/platform-release-notes.js +9 -6
- package/dist/lib/internal/platform-security.js +93 -0
- package/dist/lib/internal/pr-review-grade.js +25 -12
- package/dist/lib/internal/release-workflow.js +23 -9
- package/dist/lib/internal/sandbox-control.js +50 -7
- package/dist/lib/internal/task-activity.js +16 -7
- package/dist/lib/internal/task-artifact.js +235 -24
- package/dist/lib/internal/task-context.js +4 -1
- package/dist/lib/internal/task-create.js +50 -17
- package/dist/lib/internal/task-delivery.js +4 -1
- package/dist/lib/internal/task-event.js +10 -4
- package/dist/lib/internal/task-finalization.js +6 -3
- package/dist/lib/internal/task-invalidation.js +63 -0
- package/dist/lib/internal/task-ledger.js +20 -6
- package/dist/lib/internal/task-lifecycle.js +6 -3
- package/dist/lib/internal/task-operation-registry.js +421 -0
- package/dist/lib/internal/task-orchestration.js +12 -0
- package/dist/lib/internal/task-override.js +14 -7
- package/dist/lib/internal/task-qualification.js +90 -0
- package/dist/lib/internal/task-review.js +7 -4
- package/dist/lib/internal/task-short-id.js +11 -1
- package/dist/lib/internal/task-snapshot.js +4 -1
- package/dist/lib/internal/task-validate.js +7 -2
- package/dist/lib/internal/task-verify.js +11 -7
- package/dist/lib/internal/task-warning.js +11 -4
- package/dist/lib/platform/adapters.js +1 -3
- package/dist/lib/platform/change-request-git-evidence.js +27 -7
- package/dist/lib/platform/comment-safety.js +226 -0
- package/dist/lib/platform/completion-backfill.js +6 -5
- package/dist/lib/platform/context.js +70 -130
- package/dist/lib/platform/github-client.js +1 -1
- package/dist/lib/platform/github-provider.js +1130 -0
- package/dist/lib/platform/in-label-sync.js +143 -0
- package/dist/lib/platform/issue-comments.js +237 -72
- package/dist/lib/platform/issues.js +335 -189
- package/dist/lib/platform/metadata-labels.js +6 -2
- package/dist/lib/platform/none-provider.js +28 -0
- package/dist/lib/platform/pr-change-report.js +545 -0
- package/dist/lib/platform/pr-checks.js +119 -104
- package/dist/lib/platform/pr-review.js +88 -72
- package/dist/lib/platform/pr-summary.js +541 -50
- package/dist/lib/platform/provider-bridge.js +45 -0
- package/dist/lib/platform/provider-contract.d.ts +553 -0
- package/dist/lib/platform/provider-contract.js +99 -0
- package/dist/lib/platform/provider-loader.js +251 -0
- package/dist/lib/platform/provider-validation.js +577 -0
- package/dist/lib/platform/pull-request-metadata.js +8 -6
- package/dist/lib/platform/pull-requests.js +734 -543
- package/dist/lib/platform/release-notes.js +78 -55
- package/dist/lib/platform/releases.js +79 -50
- package/dist/lib/platform/repository-metadata.js +377 -0
- package/dist/lib/platform/resource-identity.d.ts +26 -0
- package/dist/lib/platform/resource-identity.js +92 -0
- package/dist/lib/platform/security-alerts.js +155 -0
- package/dist/lib/platform/task-identities.js +31 -0
- package/dist/lib/platform/verification-required.js +11 -12
- package/dist/lib/platform/verification-sync.js +129 -248
- package/dist/lib/pr-review/evidence-grading.js +19 -6
- package/dist/lib/process-data/index.js +7 -0
- package/dist/lib/run/index.js +68 -23
- package/dist/lib/sandbox/commands/control-status.js +22 -0
- package/dist/lib/sandbox/commands/create.js +32 -6
- package/dist/lib/sandbox/commands/ls.js +5 -0
- package/dist/lib/sandbox/commands/rm.js +827 -120
- package/dist/lib/sandbox/commands/show.js +16 -0
- package/dist/lib/sandbox/control/client.js +174 -19
- package/dist/lib/sandbox/control/completed-reentry.js +85 -0
- package/dist/lib/sandbox/control/container-identity.js +28 -31
- package/dist/lib/sandbox/control/executor.js +151 -16
- package/dist/lib/sandbox/control/lifecycle.js +621 -127
- package/dist/lib/sandbox/control/native-file-lock.js +177 -0
- package/dist/lib/sandbox/control/protocol.js +77 -0
- package/dist/lib/sandbox/control/server.js +677 -34
- package/dist/lib/sandbox/control/state.js +209 -4
- package/dist/lib/sandbox/control/task-view.js +183 -0
- package/dist/lib/sandbox/engines/authority.js +289 -0
- package/dist/lib/sandbox/engines/docker-exact-discovery.js +97 -0
- package/dist/lib/sandbox/index.js +5 -0
- package/dist/lib/sandbox/recovery.js +21 -1
- package/dist/lib/sandbox/workspace-view.js +2 -1
- package/dist/lib/sandbox/worktree-safety.js +4 -1
- package/dist/lib/server/index.js +8 -0
- package/dist/lib/server/protocol.js +38 -1
- package/dist/lib/task/activity-log.js +8 -1
- package/dist/lib/task/artifact-lifecycle.js +75 -18
- package/dist/lib/task/artifact-operations.js +520 -0
- package/dist/lib/task/artifact-repair-intent.js +59 -0
- package/dist/lib/task/artifact-schema.js +135 -0
- package/dist/lib/task/capabilities.js +310 -0
- package/dist/lib/task/commands/status.js +32 -0
- package/dist/lib/task/commit-operation.js +12 -1
- package/dist/lib/task/control-authority.js +12 -5
- package/dist/lib/task/create-service.js +111 -12
- package/dist/lib/task/create.js +25 -0
- package/dist/lib/task/current-contract.js +5 -1
- package/dist/lib/task/decision-details.js +1 -1
- package/dist/lib/task/events.js +416 -17
- package/dist/lib/task/finalization.js +37 -13
- package/dist/lib/task/human-override.js +58 -36
- package/dist/lib/task/index.js +11 -3
- package/dist/lib/task/invalidation-command.js +86 -0
- package/dist/lib/task/invalidation.js +260 -0
- package/dist/lib/task/ledger-intents.js +37 -0
- package/dist/lib/task/local-artifact-finalization.js +299 -0
- package/dist/lib/task/orchestration.js +240 -144
- package/dist/lib/task/pr-delivery-fact.js +102 -101
- package/dist/lib/task/qualification-audit.js +490 -0
- package/dist/lib/task/qualification-confirmation.js +109 -0
- package/dist/lib/task/qualification-intents.js +148 -0
- package/dist/lib/task/review-artifacts.js +22 -23
- package/dist/lib/task/review-finalization.js +121 -4
- package/dist/lib/task/review-fingerprint.js +24 -2
- package/dist/lib/task/rework-intent.js +138 -0
- package/dist/lib/task/sections.js +6 -4
- package/dist/lib/task/skill-scope.js +23 -0
- package/dist/lib/task/task-execution-lock.js +27 -17
- package/dist/lib/task/verification-config.js +11 -0
- package/dist/lib/task/verification-engine.js +93 -16
- package/dist/lib/task/verification.js +3 -3
- package/dist/lib/task/workflow-warning-intents.js +1 -1
- package/dist/lib/task/write.js +11 -0
- package/dist/lib/version.js +11 -1
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-client.ts +9 -0
- package/lib/agent-clients/next-steps.ts +6 -1
- package/lib/decide.ts +3 -3
- package/lib/init.ts +1 -1
- package/lib/internal/agent-client.ts +4 -2
- package/lib/internal/cli-route-inventory.ts +140 -0
- package/lib/internal/codex-lifecycle.ts +8 -6
- package/lib/internal/codex-sandbox-controller.ts +7 -2
- package/lib/internal/git-workflow.ts +9 -6
- package/lib/internal/platform-checks.ts +14 -6
- package/lib/internal/platform-comment.ts +20 -12
- package/lib/internal/platform-context.ts +5 -3
- package/lib/internal/platform-issue.ts +17 -11
- package/lib/internal/platform-metadata.ts +70 -0
- package/lib/internal/platform-pr-review.ts +23 -12
- package/lib/internal/platform-pr.ts +65 -27
- package/lib/internal/platform-release-notes.ts +8 -6
- package/lib/internal/platform-security.ts +83 -0
- package/lib/internal/pr-review-grade.ts +20 -11
- package/lib/internal/release-workflow.ts +21 -9
- package/lib/internal/sandbox-control.ts +44 -6
- package/lib/internal/task-activity.ts +15 -7
- package/lib/internal/task-artifact.ts +204 -22
- package/lib/internal/task-context.ts +3 -1
- package/lib/internal/task-create.ts +78 -17
- package/lib/internal/task-delivery.ts +3 -1
- package/lib/internal/task-event.ts +9 -4
- package/lib/internal/task-finalization.ts +6 -4
- package/lib/internal/task-invalidation.ts +41 -0
- package/lib/internal/task-ledger.ts +21 -8
- package/lib/internal/task-lifecycle.ts +5 -3
- package/lib/internal/task-operation-registry.ts +482 -0
- package/lib/internal/task-orchestration.ts +12 -0
- package/lib/internal/task-override.ts +15 -9
- package/lib/internal/task-qualification.ts +61 -0
- package/lib/internal/task-review.ts +6 -4
- package/lib/internal/task-short-id.ts +10 -1
- package/lib/internal/task-snapshot.ts +3 -1
- package/lib/internal/task-validate.ts +6 -2
- package/lib/internal/task-verify.ts +10 -7
- package/lib/internal/task-warning.ts +10 -4
- package/lib/platform/adapters.ts +3 -2
- package/lib/platform/change-request-git-evidence.ts +36 -9
- package/lib/platform/comment-safety.ts +250 -0
- package/lib/platform/completion-backfill.ts +9 -8
- package/lib/platform/context.ts +97 -134
- package/lib/platform/github-client.ts +2 -2
- package/lib/platform/github-provider.ts +1132 -0
- package/lib/platform/in-label-sync.ts +208 -0
- package/lib/platform/issue-comments.ts +255 -80
- package/lib/platform/issues.ts +344 -174
- package/lib/platform/metadata-labels.ts +5 -2
- package/lib/platform/none-provider.ts +35 -0
- package/lib/platform/pr-change-report.ts +639 -0
- package/lib/platform/pr-checks.ts +126 -106
- package/lib/platform/pr-review.ts +88 -85
- package/lib/platform/pr-summary.ts +581 -53
- package/lib/platform/provider-bridge.ts +82 -0
- package/lib/platform/provider-contract.ts +611 -0
- package/lib/platform/provider-loader.ts +307 -0
- package/lib/platform/provider-validation.ts +611 -0
- package/lib/platform/pull-request-metadata.ts +10 -7
- package/lib/platform/pull-requests.ts +781 -550
- package/lib/platform/release-notes.ts +76 -59
- package/lib/platform/releases.ts +77 -43
- package/lib/platform/repository-metadata.ts +453 -0
- package/lib/platform/resource-identity.ts +121 -0
- package/lib/platform/security-alerts.ts +191 -0
- package/lib/platform/task-identities.ts +40 -0
- package/lib/platform/types.ts +4 -2
- package/lib/platform/verification-required.ts +11 -13
- package/lib/platform/verification-sync.ts +128 -304
- package/lib/pr-review/evidence-grading.ts +25 -8
- package/lib/process-data/index.ts +7 -0
- package/lib/run/index.ts +62 -22
- package/lib/sandbox/commands/control-status.ts +26 -0
- package/lib/sandbox/commands/create.ts +46 -6
- package/lib/sandbox/commands/ls.ts +7 -0
- package/lib/sandbox/commands/rm.ts +1000 -87
- package/lib/sandbox/commands/show.ts +16 -0
- package/lib/sandbox/control/client.ts +203 -19
- package/lib/sandbox/control/completed-reentry.ts +98 -0
- package/lib/sandbox/control/container-identity.ts +27 -43
- package/lib/sandbox/control/executor.ts +180 -15
- package/lib/sandbox/control/lifecycle.ts +629 -17
- package/lib/sandbox/control/native-file-lock.ts +209 -0
- package/lib/sandbox/control/protocol.ts +118 -2
- package/lib/sandbox/control/server.ts +724 -34
- package/lib/sandbox/control/state.ts +257 -4
- package/lib/sandbox/control/task-view.ts +240 -0
- package/lib/sandbox/engines/authority.ts +365 -0
- package/lib/sandbox/engines/docker-exact-discovery.ts +132 -0
- package/lib/sandbox/index.ts +7 -0
- package/lib/sandbox/recovery.ts +21 -1
- package/lib/sandbox/workspace-view.ts +9 -3
- package/lib/sandbox/worktree-safety.ts +4 -1
- package/lib/server/index.ts +10 -0
- package/lib/server/protocol.ts +36 -1
- package/lib/task/activity-log.ts +8 -0
- package/lib/task/artifact-lifecycle.ts +70 -22
- package/lib/task/artifact-operations.ts +626 -0
- package/lib/task/artifact-repair-intent.ts +71 -0
- package/lib/task/artifact-schema.ts +192 -0
- package/lib/task/capabilities.ts +331 -0
- package/lib/task/commands/status.ts +38 -0
- package/lib/task/commit-operation.ts +12 -1
- package/lib/task/control-authority.ts +22 -9
- package/lib/task/create-service.ts +139 -14
- package/lib/task/create.ts +27 -0
- package/lib/task/current-contract.ts +6 -1
- package/lib/task/decision-details.ts +6 -2
- package/lib/task/events.ts +392 -16
- package/lib/task/finalization.ts +50 -14
- package/lib/task/human-override.ts +70 -46
- package/lib/task/index.ts +16 -3
- package/lib/task/invalidation-command.ts +86 -0
- package/lib/task/invalidation.ts +332 -0
- package/lib/task/ledger-intents.ts +35 -1
- package/lib/task/local-artifact-finalization.ts +432 -0
- package/lib/task/orchestration.ts +223 -133
- package/lib/task/pr-delivery-fact.ts +131 -148
- package/lib/task/qualification-audit.ts +599 -0
- package/lib/task/qualification-confirmation.ts +117 -0
- package/lib/task/qualification-intents.ts +150 -0
- package/lib/task/review-artifacts.ts +21 -22
- package/lib/task/review-finalization.ts +133 -4
- package/lib/task/review-fingerprint.ts +23 -2
- package/lib/task/rework-intent.ts +165 -0
- package/lib/task/sections.ts +6 -4
- package/lib/task/skill-scope.ts +24 -0
- package/lib/task/task-execution-lock.ts +23 -14
- package/lib/task/verification-config.ts +12 -0
- package/lib/task/verification-engine.ts +103 -17
- package/lib/task/verification.ts +4 -4
- package/lib/task/workflow-warning-intents.ts +1 -1
- package/lib/task/write.ts +19 -0
- package/lib/update.ts +1 -1
- package/lib/version.ts +15 -1
- package/package.json +12 -1
- package/templates/.agents/rules/README.en.md +3 -1
- package/templates/.agents/rules/README.zh-CN.md +3 -1
- package/templates/.agents/rules/decision-qualification.en.md +22 -0
- package/templates/.agents/rules/decision-qualification.zh-CN.md +22 -0
- package/templates/.agents/rules/evidence-reporting.en.md +28 -0
- package/templates/.agents/rules/evidence-reporting.zh-CN.md +28 -0
- package/templates/.agents/rules/issue-pr-commands.en.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.en.md +2 -0
- package/templates/.agents/rules/issue-sync.zh-CN.md +2 -0
- package/templates/.agents/rules/label-milestone-setup.en.md +7 -7
- package/templates/.agents/rules/label-milestone-setup.zh-CN.md +7 -7
- package/templates/.agents/rules/local-artifact-repair.en.md +13 -2
- package/templates/.agents/rules/local-artifact-repair.zh-CN.md +13 -2
- package/templates/.agents/rules/pr-sync.en.md +10 -4
- package/templates/.agents/rules/pr-sync.zh-CN.md +17 -4
- package/templates/.agents/rules/security-alerts.en.md +8 -8
- package/templates/.agents/rules/security-alerts.zh-CN.md +8 -8
- package/templates/.agents/rules/task-short-id.en.md +1 -4
- package/templates/.agents/rules/task-short-id.zh-CN.md +1 -3
- package/templates/.agents/skills/analyze-task/SKILL.en.md +28 -5
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +29 -5
- package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -12
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -12
- package/templates/.agents/skills/check-task/SKILL.en.md +16 -37
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +16 -37
- package/templates/.agents/skills/close-codescan/SKILL.en.md +2 -2
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/SKILL.en.md +41 -9
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +43 -11
- package/templates/.agents/skills/code-task/config/verify.en.json +6 -14
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +6 -14
- package/templates/.agents/skills/code-task/reference/code-rules.en.md +5 -4
- package/templates/.agents/skills/code-task/reference/code-rules.zh-CN.md +5 -4
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +1 -1
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +3 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +3 -1
- package/templates/.agents/skills/code-task/reference/report-template.en.md +42 -15
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +39 -12
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.en.md +2 -0
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.zh-CN.md +2 -0
- package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +3 -3
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +3 -3
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +10 -4
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +10 -4
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.en.md +2 -0
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.zh-CN.md +2 -0
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +4 -3
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +4 -3
- package/templates/.agents/skills/complete-task/SKILL.en.md +26 -21
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +25 -21
- package/templates/.agents/skills/create-pr/SKILL.en.md +7 -6
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +7 -7
- package/templates/.agents/skills/create-pr/config/verify.json +1 -0
- package/templates/.agents/skills/create-pr/reference/change-report.en.md +16 -4
- package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +16 -4
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +5 -3
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +5 -3
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +1 -1
- package/templates/.agents/skills/create-pr/scripts/change-report.mjs +3 -0
- package/templates/.agents/skills/create-task/SKILL.en.md +8 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +7 -0
- 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/init-labels/SKILL.en.md +8 -8
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/init-milestones/SKILL.en.md +9 -11
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +9 -11
- package/templates/.agents/skills/plan-task/SKILL.en.md +27 -4
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +26 -4
- package/templates/.agents/skills/plan-task/config/verify.en.json +4 -14
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +4 -14
- package/templates/.agents/skills/review-analysis/SKILL.en.md +17 -4
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +17 -4
- package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -18
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -18
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +50 -23
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +45 -18
- package/templates/.agents/skills/review-code/SKILL.en.md +18 -5
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +18 -5
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -23
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -23
- package/templates/.agents/skills/review-code/reference/report-template.en.md +49 -22
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +45 -18
- package/templates/.agents/skills/review-plan/SKILL.en.md +17 -4
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +17 -4
- package/templates/.agents/skills/review-plan/config/verify.en.json +1 -18
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -18
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +49 -22
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +45 -18
- package/templates/.agents/skills/review-pr/SKILL.en.md +5 -1
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/review-pr/reference/report-template.en.md +4 -3
- package/templates/.agents/skills/review-pr/reference/report-template.zh-CN.md +4 -3
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +9 -3
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +9 -3
- package/templates/.agents/skills/run-manual-validation/reference/report-template.en.md +3 -1
- package/templates/.agents/skills/run-manual-validation/reference/report-template.zh-CN.md +3 -1
- package/templates/.agents/skills/test/SKILL.en.md +13 -2
- package/templates/.agents/skills/test/SKILL.zh-CN.md +13 -2
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +14 -0
- package/templates/.agents/skills/watch-pr/SKILL.en.md +2 -2
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +6 -0
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +6 -0
- package/templates/.agents/templates/task.en.md +24 -1
- package/templates/.agents/templates/task.zh-CN.md +24 -1
- package/templates/.github/workflows/pr-label.yml +7 -26
- package/templates/.agents/scripts/security-alerts.github.sh +0 -151
- package/templates/.agents/scripts/security-alerts.sh +0 -31
- package/templates/.agents/skills/init-labels/scripts/init-labels.github.sh +0 -146
- package/templates/.agents/skills/init-labels/scripts/init-labels.sh +0 -32
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.github.sh +0 -294
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.sh +0 -6
|
@@ -9,10 +9,15 @@ description: >
|
|
|
9
9
|
# Analyze Task
|
|
10
10
|
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
|
-
If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to the completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
|
|
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. Lifecycle events also require explicit trigger data: use `{trigger-initiator}=orchestrator` for orchestration and `model` otherwise; `{request-id}` is a stable single-line identifier for this task and artifact round, and `{reason-code}` is `user-request`, `new-requirement`, or `upstream-fact-doubt`. Reuse the same values for started and completed.
|
|
13
13
|
|
|
14
14
|
## Boundary / Critical Rules
|
|
15
15
|
|
|
16
|
+
### Persisted Report Evidence
|
|
17
|
+
|
|
18
|
+
Before generating the analysis report, read `.agents/rules/evidence-reporting.md`. Record the command, target scope, status or structured result, actual result, and uncovered parts for state checks and successful checks; include decisive raw excerpts only for failures, blocking conditions, or disputes.
|
|
19
|
+
|
|
20
|
+
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the five qualification-audit tables in the analysis artifact; unknown or unconfirmed constraints must not automatically exclude a candidate
|
|
16
21
|
- This skill only outputs a requirements analysis document (`analysis.md` or `analysis-r{N}.md`) and does not modify any business code
|
|
17
22
|
- Base the analysis strictly on the existing task input, requirements, context, and source information in `task.md`
|
|
18
23
|
- 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
|
|
@@ -25,7 +30,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
25
30
|
|
|
26
31
|
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.
|
|
27
32
|
|
|
28
|
-
Run these commands and
|
|
33
|
+
Run these commands and record the task/artifact scope, key result, and uncovered parts in this round's `## State Check` section; do not paste complete directory listings or task tails on normal success. Retain decisive raw lines only for failures, blocking conditions, identity mismatches, or disputes:
|
|
29
34
|
|
|
30
35
|
```bash
|
|
31
36
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -41,7 +46,7 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
41
46
|
|
|
42
47
|
## Step Start: Declare the started Event
|
|
43
48
|
|
|
44
|
-
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} analyze.started --agent {standard-agent-token}` and verify the returned `artifactContext`.
|
|
49
|
+
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} analyze.started --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code}` and verify the returned `artifactContext`.
|
|
45
50
|
|
|
46
51
|
## Steps
|
|
47
52
|
|
|
@@ -129,6 +134,14 @@ Follow the `analysis` step in `.agents/workflows/feature-development.yaml`:
|
|
|
129
134
|
|
|
130
135
|
### 6. Output Analysis Document
|
|
131
136
|
|
|
137
|
+
Before writing this round's `{analysis-artifact}`, create the controlled report skeleton:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
agent-infra-internal task-artifact {task-id} init --family analysis --artifact {analysis-artifact} --locale en
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The skeleton contains identity metadata, stable section markers, and required headings only; real analysis content is required before the completion gate can pass. If the finalizer returns one provably safe structural error, call `task-artifact {task-id} repair --family analysis --artifact {analysis-artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`, then rerun the same finalizer.
|
|
144
|
+
|
|
132
145
|
> Steps 6–9 are the **Scenario A (normal output)** path. **Scenario B (ask and early-exit)** already finished its state update, task-comment sync, and verification inside step 4 and STOPped, so it does not enter these steps.
|
|
133
146
|
|
|
134
147
|
Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
|
|
@@ -143,7 +156,7 @@ Create `.agents/workspace/active/{task-id}/{analysis-artifact}`.
|
|
|
143
156
|
|
|
144
157
|
## State Check
|
|
145
158
|
|
|
146
|
-
>
|
|
159
|
+
> Record the Step 0 state-check command, task/artifact scope, key result, and uncovered parts; each command starts with `$ `. Do not paste complete directory listings or task tails on normal success; retain decisive raw lines only for failures, blocking conditions, identity mismatches, or disputes.
|
|
147
160
|
|
|
148
161
|
## Requirement Source
|
|
149
162
|
|
|
@@ -203,7 +216,17 @@ Update `.agents/workspace/active/{task-id}/task.md`:
|
|
|
203
216
|
- Overwrite the `priority` field in frontmatter with the new value
|
|
204
217
|
- Append a `## Priority Re-estimate` section to this round's analysis artifact `{analysis-artifact}`, recording: `priority {old} → {new} (rationale: {short basis grounded in this analysis})`
|
|
205
218
|
If the re-estimated value matches the current value, skip it: do not write the `## Priority Re-estimate` section. The Flow A sync that follows reads the possibly updated frontmatter and propagates the new value to the Issue automatically.
|
|
206
|
-
After the
|
|
219
|
+
After writing the local artifact, run the pre-completion gate:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
agent-infra-internal task-artifact {task-id} finalize-local --family analysis --artifact {analysis-artifact}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
- On `status=passed`, save that result's `artifactSha256` and `semanticDigest`; the finalizer has recorded the matching one-shot local provenance intent.
|
|
226
|
+
- On `status=failed` with `repairable=true`, apply only the diagnostic's `replace-line` operation once, then rerun the same command completely; count an attempt only after bytes change, up to 8 attempts.
|
|
227
|
+
- The first repairable failure's `semanticDigest` is retained as the baseline; a retried `status=passed` result must match it. On baseline mismatch, any other failure, no progress, or a repeated diagnostic, stop without publishing a completed event.
|
|
228
|
+
|
|
229
|
+
Use the digests from that same `status=passed` result in `agent-infra-internal task-event {task-id} analyze.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {analysis-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} {execution-flag}` so the core records the link, stage, agent, metadata, and Activity Log atomically.
|
|
207
230
|
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Round {N})** by {agent} — Analysis completed → {analysis-artifact}
|
|
208
231
|
```
|
|
209
232
|
|
|
@@ -9,10 +9,15 @@ description: >
|
|
|
9
9
|
# 分析任务
|
|
10
10
|
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
|
-
若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 completed 事件;否则绑定为空。不得从 `orchestration.json
|
|
12
|
+
若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。生命周期事件还必须携带显式触发信息:编排调用使用 `{trigger-initiator}=orchestrator`,否则使用 `model`;`{request-id}` 是本任务与本轮产物的稳定单行标识,`{reason-code}` 使用 `user-request`、`new-requirement` 或 `upstream-fact-doubt`;started 与 completed 使用同一组值。
|
|
13
13
|
|
|
14
14
|
## 行为边界 / 关键规则
|
|
15
15
|
|
|
16
|
+
### 持久化报告证据
|
|
17
|
+
|
|
18
|
+
生成分析报告时,先读取 `.agents/rules/evidence-reporting.md`。状态核对和成功检查记录命令、目标范围、状态/结构化结果、实际结果和未覆盖部分;失败、阻塞或争议才附决定性原文摘录。
|
|
19
|
+
|
|
20
|
+
- 涉及候选资格或 `HD-N` 判断时,先读取 `.agents/rules/decision-qualification.md`,基于 task.md 规范化约束/候选完成资格审计,并在分析产物记录五张资格审计表;不得把来源不明或未确认约束自动升级为排除条件
|
|
16
21
|
- 本技能仅产出需求分析文档(`analysis.md` 或 `analysis-r{N}.md`)—— 不修改任何业务代码
|
|
17
22
|
- 严格基于 `task.md` 中已有的任务输入、需求、上下文和来源信息展开分析
|
|
18
23
|
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
@@ -25,7 +30,7 @@ description: >
|
|
|
25
30
|
|
|
26
31
|
在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
运行以下命令,并在本轮产物的 `## 状态核对` 段记录任务/产物范围、关键结果和未覆盖部分;正常成功不粘贴完整目录清单或 `task.md` 尾部。失败、阻塞、身份不一致或争议时,附决定性原文行:
|
|
29
34
|
|
|
30
35
|
```bash
|
|
31
36
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -44,7 +49,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
44
49
|
确认前置条件和轮次后、本轮第一个产出动作之前执行:
|
|
45
50
|
|
|
46
51
|
```bash
|
|
47
|
-
agent-infra-internal task-event {task-id} analyze.started --agent {standard-agent-token}
|
|
52
|
+
agent-infra-internal task-event {task-id} analyze.started --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code}
|
|
48
53
|
```
|
|
49
54
|
|
|
50
55
|
## 执行步骤
|
|
@@ -132,6 +137,14 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
132
137
|
|
|
133
138
|
### 6. 输出分析文档
|
|
134
139
|
|
|
140
|
+
在首次写入本轮 `{analysis-artifact}` 前,先创建受控报告骨架:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
agent-infra-internal task-artifact {task-id} init --family analysis --artifact {analysis-artifact}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
骨架只包含身份元数据、稳定 section marker 和必需标题;必须填入真实分析内容后才能通过完成门禁。finalizer 返回可证明的单个结构错误时,使用其 SHA 和 semantic digest 调用 `task-artifact {task-id} repair --family analysis --artifact {analysis-artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`,然后完整重跑 finalizer。
|
|
147
|
+
|
|
135
148
|
> 步骤 6–9 属**场景 A(正常产出)**路径。**场景 B(提问早退)**已在步骤 4 内完成状态更新、task 评论同步与校验并 STOP,不进入这些步骤。
|
|
136
149
|
|
|
137
150
|
创建 `.agents/workspace/active/{task-id}/{analysis-artifact}`。
|
|
@@ -146,7 +159,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
146
159
|
|
|
147
160
|
## 状态核对
|
|
148
161
|
|
|
149
|
-
>
|
|
162
|
+
> 记录第 0 步状态核对命令、任务/产物范围、关键结果和未覆盖部分;每条命令以 `$ ` 开头。正常成功不粘贴完整目录清单或 `task.md` 尾部,失败、阻塞、身份不一致或争议时附决定性原文行。
|
|
150
163
|
|
|
151
164
|
## 需求来源
|
|
152
165
|
|
|
@@ -173,6 +186,10 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
173
186
|
## 依赖关系
|
|
174
187
|
- {需要的依赖和与其他模块的协调}
|
|
175
188
|
|
|
189
|
+
## 资格审计
|
|
190
|
+
|
|
191
|
+
> 按 `.agents/rules/decision-qualification.md` 填写约束依赖、候选资格、分类结果、上游关系、依赖快照五张表;没有 artifact 上游时保留空表头,不虚构关系。
|
|
192
|
+
|
|
176
193
|
## 假设
|
|
177
194
|
|
|
178
195
|
> 如本次分析依赖某些假设,列在此处;没有则可省略本段。
|
|
@@ -204,7 +221,14 @@ agent-infra-internal task-event {task-id} analyze.started --agent {standard-agen
|
|
|
204
221
|
- 用新值覆盖 frontmatter 的 `priority` 字段
|
|
205
222
|
- 在本轮分析产物 `{analysis-artifact}` 中追加 `## 优先级重估` 段,记录一条:`priority {old} → {new} (rationale: {基于本轮分析的简短依据})`
|
|
206
223
|
若重估值与当前值一致,跳过:不写入 `## 优先级重估` 段。后续 Flow A 同步会读取可能更新过的 frontmatter,并自动把新值同步到 Issue。
|
|
207
|
-
-
|
|
224
|
+
- 完成本地产物后,先执行本地完成前门禁:
|
|
225
|
+
```bash
|
|
226
|
+
agent-infra-internal task-artifact {task-id} finalize-local --family analysis --artifact {analysis-artifact}
|
|
227
|
+
```
|
|
228
|
+
- `status=passed`:保存本次返回的 `artifactSha256` 和 `semanticDigest`;finalizer 已记录对应的一次性本地 provenance intent。
|
|
229
|
+
- `status=failed` 且 `repairable=true`:仅按诊断中的 `replace-line` 操作做一次最小修改,然后完整重跑同一命令;实际字节发生变化才计一次 `repairAttempts`,最多 8 次。
|
|
230
|
+
- 首次可修复失败的 `semanticDigest` 由 finalizer 保留为基线;重试后的 `status=passed` 必须匹配该基线。基线不匹配、其他失败、无进展或重复诊断:停止,不发布 completed 事件。
|
|
231
|
+
- 使用同一次 `status=passed` 返回的摘要执行 `agent-infra-internal task-event {task-id} analyze.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {analysis-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} {execution-flag}`,由核心登记链接、阶段、代理、时间、版本和 Activity Log。
|
|
208
232
|
|
|
209
233
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
|
|
210
234
|
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status pending-design-work --fields`
|
|
@@ -18,18 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"artifact": {
|
|
20
20
|
"file_pattern": "analysis.md|analysis-r{N}.md",
|
|
21
|
-
"
|
|
22
|
-
"Requirement Source",
|
|
23
|
-
"Requirement Understanding",
|
|
24
|
-
"Related Files",
|
|
25
|
-
"Impact Assessment",
|
|
26
|
-
"Technical Risks",
|
|
27
|
-
"Effort and Complexity Assessment",
|
|
28
|
-
"State Check"
|
|
29
|
-
],
|
|
30
|
-
"required_patterns": [
|
|
31
|
-
"^\\$ "
|
|
32
|
-
]
|
|
21
|
+
"schema": "analysis"
|
|
33
22
|
},
|
|
34
23
|
"activity-log": {
|
|
35
24
|
"expected_action_pattern": "(Analyze Task|Requirement Analysis) \\(Round \\d+\\)"
|
|
@@ -18,18 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"artifact": {
|
|
20
20
|
"file_pattern": "analysis.md|analysis-r{N}.md",
|
|
21
|
-
"
|
|
22
|
-
"需求来源",
|
|
23
|
-
"需求理解",
|
|
24
|
-
"相关文件",
|
|
25
|
-
"影响评估",
|
|
26
|
-
"技术风险",
|
|
27
|
-
"工作量和复杂度评估",
|
|
28
|
-
"状态核对"
|
|
29
|
-
],
|
|
30
|
-
"required_patterns": [
|
|
31
|
-
"^\\$ "
|
|
32
|
-
]
|
|
21
|
+
"schema": "analysis"
|
|
33
22
|
},
|
|
34
23
|
"activity-log": {
|
|
35
24
|
"expected_action_pattern": "(Analyze Task|Requirement Analysis) \\(Round \\d+\\)"
|
|
@@ -11,7 +11,7 @@ description: >
|
|
|
11
11
|
## Boundary / Critical Rules
|
|
12
12
|
|
|
13
13
|
- This skill is **read-only** -- do not modify any files
|
|
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
|
|
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 and review-verdict parsing; the next action comes directly from the CLI's canonical recommendation.
|
|
15
15
|
|
|
16
16
|
## Task Context Resolution
|
|
17
17
|
|
|
@@ -45,7 +45,7 @@ This is the semantic layer the CLI does not produce. Using the `Artifacts` group
|
|
|
45
45
|
- `[pending]` - not started yet
|
|
46
46
|
- `[blocked]` - blocked
|
|
47
47
|
- `[skipped]` - skipped
|
|
48
|
-
- For the latest review artifact of each stage (`review-analysis`, `review-plan`, `review-code`), read the report body and parse its conclusion: the overall verdict (Approved / Changes Requested / Rejected) and the blocker / major / minor counts.
|
|
48
|
+
- For the latest review artifact of each stage (`review-analysis`, `review-plan`, `review-code`), read the report body and parse its conclusion: the overall verdict (Approved / Changes Requested / Rejected) and the blocker / major / minor counts. Use these conclusions only to explain stage status; do not recompute the next action from them.
|
|
49
49
|
|
|
50
50
|
Present the workflow progress as an overlay on top of the CLI output, marking the latest round and the parsed review verdict, for example:
|
|
51
51
|
|
|
@@ -57,41 +57,20 @@ Workflow progress:
|
|
|
57
57
|
[pending] Plan Review
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
### 3.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
> - The latest code artifact exists and there is still no latest code review artifact -> choose "Code Complete"
|
|
75
|
-
> - `current_step = code-review` and the latest code review artifact exists, the verdict is `Approved`, and `Blocker = 0`, `Major = 0`, `Minor = 0` -> choose "Code Review Passed"
|
|
76
|
-
> - `current_step = code-review` and the latest code review artifact exists, but any `Blocker`, `Major`, or `Minor` issue remains, or the verdict is not a clean approval -> choose "Code Review Has Issues"
|
|
77
|
-
>
|
|
78
|
-
> **Important: if the latest review report contains any issue at all, do not use the corresponding review-passed row. Use the corresponding has-issues row instead.**
|
|
79
|
-
>
|
|
80
|
-
> Before rendering the final output, read `.agents/rules/next-step-output.md`. After selecting an actionable row, invoke `agent-infra-internal agent-client next-steps --skill {next-skill} [--task-ref {task-ref}]` exactly once and render stdout verbatim as `{next-step-commands}`. Do not invoke the helper for `Task Blocked` or `Task Completed`. Append the `Completed at` trailing line last.
|
|
81
|
-
|
|
82
|
-
| Current State | next skill | task ref |
|
|
83
|
-
|----------------------------|-------------------|----------|
|
|
84
|
-
| Analysis Complete | `review-analysis` | required |
|
|
85
|
-
| Analysis Review Passed | `plan-task` | required |
|
|
86
|
-
| Analysis Review Has Issues | `analyze-task` | required |
|
|
87
|
-
| Plan Complete | `review-plan` | required |
|
|
88
|
-
| Plan Review Passed | `code-task` | required |
|
|
89
|
-
| Plan Review Has Issues | `plan-task` | required |
|
|
90
|
-
| Code Complete | `review-code` | required |
|
|
91
|
-
| Code Review Passed | `commit` | omitted |
|
|
92
|
-
| Code Review Has Issues | `code-task` | required |
|
|
93
|
-
| Task Blocked | — | — |
|
|
94
|
-
| Task Completed | — | — |
|
|
60
|
+
### 3. Display the canonical recommendation
|
|
61
|
+
|
|
62
|
+
Read only `Recommendation.action` from the `ai task status --task {task-id}` output and use it as the sole source of the next action. Do not recompute an action from `current_step`, the latest files, review prose, or the Activity Log.
|
|
63
|
+
|
|
64
|
+
When the action is non-empty, perform only this literal action-to-skill conversion, then invoke the shared helper once:
|
|
65
|
+
|
|
66
|
+
| Recommendation.action | next skill |
|
|
67
|
+
|-----------------------|------------|
|
|
68
|
+
| `analysis` | `analyze-task` |
|
|
69
|
+
| `plan` | `plan-task` |
|
|
70
|
+
| `code` | `code-task` |
|
|
71
|
+
| any other action | same-named skill |
|
|
72
|
+
|
|
73
|
+
When the action is empty, do not invoke the helper; state that no next skill is currently recommended. Before rendering the final output, read `.agents/rules/next-step-output.md`; invoke `agent-infra-internal agent-client next-steps --skill {next-skill} --task-ref {task-ref}` and render stdout verbatim as `{next-step-commands}`. Append the `Completed at` trailing line last.
|
|
95
74
|
|
|
96
75
|
## Notes
|
|
97
76
|
|
|
@@ -11,7 +11,7 @@ description: >
|
|
|
11
11
|
## 行为边界 / 关键规则
|
|
12
12
|
|
|
13
13
|
- 本技能是**只读**操作 —— 不修改任何文件
|
|
14
|
-
- 机械数据(frontmatter 元数据、产物分组、Git/Platform 状态,以及跨 active、blocked、completed 三目录定位任务)一律委托给确定性的 `ai task status` 命令。本技能只负责 CLI
|
|
14
|
+
- 机械数据(frontmatter 元数据、产物分组、Git/Platform 状态,以及跨 active、blocked、completed 三目录定位任务)一律委托给确定性的 `ai task status` 命令。本技能只负责 CLI 无法产出的语义层:工作流阶段解读和审查结论解析;下一步 action 直接使用 CLI 的 canonical recommendation。
|
|
15
15
|
|
|
16
16
|
## 任务上下文解析
|
|
17
17
|
|
|
@@ -45,7 +45,7 @@ ai task status --task {task-id}
|
|
|
45
45
|
- `[pending]` - 尚未开始
|
|
46
46
|
- `[blocked]` - 被阻塞
|
|
47
47
|
- `[skipped]` - 已跳过
|
|
48
|
-
- 对各阶段最新的审查产物(`review-analysis`、`review-plan`、`review-code`),读取报告正文并解析结论:总体结论(通过 / 需要修改 / 拒绝)与阻塞项 / 主要问题 /
|
|
48
|
+
- 对各阶段最新的审查产物(`review-analysis`、`review-plan`、`review-code`),读取报告正文并解析结论:总体结论(通过 / 需要修改 / 拒绝)与阻塞项 / 主要问题 / 次要问题计数。这些结论只用于阶段状态展示和解释,不得用于重算下一步 action。
|
|
49
49
|
|
|
50
50
|
把工作流进度作为 CLI 输出之上的叠加层呈现,标注最新轮次与解析出的审查结论,例如:
|
|
51
51
|
|
|
@@ -57,41 +57,20 @@ ai task status --task {task-id}
|
|
|
57
57
|
[pending] 技术方案审查
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
### 3.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
> - 最新实现产物已存在,且尚无最新审查产物 → 选择「实现完成」
|
|
75
|
-
> - `current_step = code-review` 且最新代码审查产物存在,且结论为 `Approved`,同时 `Blocker = 0`、`Major = 0`、`Minor = 0` → 选择「代码审查通过」
|
|
76
|
-
> - `current_step = code-review` 且最新代码审查产物存在,但仍有任何 `Blocker`、`Major` 或 `Minor` 问题,或结论不是无问题通过 → 选择「代码审查有问题」
|
|
77
|
-
>
|
|
78
|
-
> **特别注意:只要最新审查报告中存在任何问题,就不能使用对应「审查通过」行。必须改用对应「审查有问题」行。**
|
|
79
|
-
>
|
|
80
|
-
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md`。选中可执行行后只调用一次 `agent-infra-internal agent-client next-steps --skill {next-skill} [--task-ref {task-ref}]`,将 stdout 原样输出为 `{next-step-commands}`;`任务被阻塞` 与 `任务已完成` 不调用 helper。最后追加 `Completed at` 收尾行。
|
|
81
|
-
|
|
82
|
-
| 当前状态 | next skill | task ref |
|
|
83
|
-
|--------------------|-------------------|----------|
|
|
84
|
-
| 分析完成 | `review-analysis` | required |
|
|
85
|
-
| 需求分析审查通过 | `plan-task` | required |
|
|
86
|
-
| 需求分析审查有问题 | `analyze-task` | required |
|
|
87
|
-
| 计划完成 | `review-plan` | required |
|
|
88
|
-
| 技术方案审查通过 | `code-task` | required |
|
|
89
|
-
| 技术方案审查有问题 | `plan-task` | required |
|
|
90
|
-
| 实现完成 | `review-code` | required |
|
|
91
|
-
| 代码审查通过 | `commit` | omitted |
|
|
92
|
-
| 代码审查有问题 | `code-task` | required |
|
|
93
|
-
| 任务被阻塞 | — | — |
|
|
94
|
-
| 任务已完成 | — | — |
|
|
60
|
+
### 3. 展示 canonical recommendation
|
|
61
|
+
|
|
62
|
+
只读取 `ai task status --task {task-id}` 输出中的 `Recommendation.action`,将其作为唯一下一步来源。不要根据 `current_step`、目录中的最新产物、审查正文或 Activity Log 再计算 action。
|
|
63
|
+
|
|
64
|
+
当 action 非空时,仅做以下 action 到 skill 的字面转换,然后调用一次统一 helper:
|
|
65
|
+
|
|
66
|
+
| Recommendation.action | next skill |
|
|
67
|
+
|-----------------------|------------|
|
|
68
|
+
| `analysis` | `analyze-task` |
|
|
69
|
+
| `plan` | `plan-task` |
|
|
70
|
+
| `code` | `code-task` |
|
|
71
|
+
| 其他 action | 同名 skill |
|
|
72
|
+
|
|
73
|
+
`action` 为空时不调用 helper,只说明当前没有可推荐的下一技能。渲染最终输出前先读取 `.agents/rules/next-step-output.md`;helper 命令为 `agent-infra-internal agent-client next-steps --skill {next-skill} --task-ref {task-ref}`,stdout 原样作为 `{next-step-commands}` 下一步命令。最后追加 `Completed at` 收尾行。
|
|
95
74
|
|
|
96
75
|
## 注意事项
|
|
97
76
|
|
|
@@ -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 run `
|
|
26
|
+
Read `.agents/rules/security-alerts.md` before this step, then run `agent-infra-internal platform-security read --kind code-scanning --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
|
-
Write the user's explanation to `{comment-file}`, then run `
|
|
74
|
+
Write the user's explanation to `{comment-file}`, then run `agent-infra-internal platform-security dismiss --kind code-scanning --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`
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
### 1. 获取告警信息
|
|
25
25
|
|
|
26
|
-
执行前先读取 `.agents/rules/security-alerts.md`,然后运行 `
|
|
26
|
+
执行前先读取 `.agents/rules/security-alerts.md`,然后运行 `agent-infra-internal platform-security read --kind code-scanning --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
|
-
将用户说明写入 `{comment-file}`,然后运行 `
|
|
74
|
+
将用户说明写入 `{comment-file}`,然后运行 `agent-infra-internal platform-security dismiss --kind code-scanning --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`
|
|
@@ -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 run `
|
|
26
|
+
Read `.agents/rules/security-alerts.md` before this step, then run `agent-infra-internal platform-security read --kind 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
|
-
Write the user's explanation to `{comment-file}`, then run `
|
|
80
|
+
Write the user's explanation to `{comment-file}`, then run `agent-infra-internal platform-security dismiss --kind 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`
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
### 1. 获取告警信息
|
|
25
25
|
|
|
26
|
-
执行前先读取 `.agents/rules/security-alerts.md`,然后运行 `
|
|
26
|
+
执行前先读取 `.agents/rules/security-alerts.md`,然后运行 `agent-infra-internal platform-security read --kind 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
|
-
将用户说明写入 `{comment-file}`,然后运行 `
|
|
80
|
+
将用户说明写入 `{comment-file}`,然后运行 `agent-infra-internal platform-security dismiss --kind 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`
|
|
@@ -9,16 +9,22 @@ description: >
|
|
|
9
9
|
# Code Task
|
|
10
10
|
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
|
-
If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to the completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
|
|
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. Lifecycle events also require explicit trigger data: use `{trigger-initiator}=orchestrator` for orchestration and `model` otherwise; `{request-id}` is a stable single-line identifier for this task and artifact round, and `{reason-code}` is `user-request` for initial work and `review-finding` for fixes or decisions. Reuse the same values for started and completed.
|
|
13
13
|
|
|
14
14
|
Implement the approved plan and produce `code.md` or `code-r{N}.md`. This skill supports initial implementation, fix mode based on `review-code` feedback, and human-decision-driven implementation.
|
|
15
15
|
|
|
16
16
|
## Boundary / Critical Rules
|
|
17
17
|
|
|
18
|
+
### Persisted Report Evidence
|
|
19
|
+
|
|
20
|
+
Before generating the implementation report, read `.agents/rules/evidence-reporting.md`. Successful tests record the command, target scope, status or structured result, actual result, and uncovered parts; failures, blocking conditions, or disputes retain a reproducible entry point, exact location, and decisive excerpt instead of complete successful stdout.
|
|
21
|
+
|
|
22
|
+
- When evaluating candidate qualification or `HD-N`, read `.agents/rules/decision-qualification.md`, audit normalized task constraints/candidates, and record the five qualification-audit tables in the implementation report; unknown or unconfirmed constraints must not automatically exclude a candidate
|
|
18
23
|
- Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
|
|
19
24
|
- 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
|
|
20
25
|
- 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”
|
|
21
26
|
- 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
|
|
27
|
+
- Before `code.completed`, the implementation report must pass `task-artifact ... finalize-local --family code`; follow `.agents/rules/local-artifact-repair.md` for any provably safe minimal structural repair in that same report, and pass only that successful call's digests to the completion event
|
|
22
28
|
- 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
|
|
23
29
|
- 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`
|
|
24
30
|
- Create a new code artifact for each round and never overwrite an older one
|
|
@@ -30,7 +36,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
30
36
|
|
|
31
37
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first.
|
|
32
38
|
|
|
33
|
-
Run these commands and
|
|
39
|
+
Run these commands and record the task/artifact scope, key result, and uncovered parts in this round's `## State Check` section; do not paste complete directory listings or task tails on normal success. Retain decisive raw lines only for failures, blocking conditions, identity mismatches, or disputes:
|
|
34
40
|
|
|
35
41
|
```bash
|
|
36
42
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -44,7 +50,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
44
50
|
|
|
45
51
|
## Step Start: Write the started Marker
|
|
46
52
|
|
|
47
|
-
After prerequisites and mode are confirmed and before this round's first artifact action, run `agent-infra-internal task-event {task-id} code.started --agent {standard-agent-token}`. Append `--fix-for {review-artifact}` in fix mode or `--implementation-input {input-id}` in decision mode. The core derives and validates the round and input identity; record the returned `artifactContext`.
|
|
53
|
+
After prerequisites and mode are confirmed and before this round's first artifact action, run `agent-infra-internal task-event {task-id} code.started --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code}`. Append `--fix-for {review-artifact}` in fix mode or `--implementation-input {input-id}` in decision mode. The core derives and validates the round and input identity; record the returned `artifactContext`.
|
|
48
54
|
|
|
49
55
|
## Steps
|
|
50
56
|
|
|
@@ -60,7 +66,7 @@ Read `reference/branch-management.md`, ensure the current branch matches the tas
|
|
|
60
66
|
|
|
61
67
|
**Mandatory; do not skip.** If task.md has a valid `issue_number`, run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --milestone specific`.
|
|
62
68
|
|
|
63
|
-
> If the milestone remains `X.Y.x`, step
|
|
69
|
+
> If the milestone remains `X.Y.x`, step 12 `task-verify code.completed` blocks through the typed milestone check.
|
|
64
70
|
|
|
65
71
|
### 4. Determine Mode and Round
|
|
66
72
|
|
|
@@ -106,28 +112,54 @@ When triaging a test failure or unexpected behavior, first read `.agents/rules/d
|
|
|
106
112
|
|
|
107
113
|
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
114
|
|
|
115
|
+
After the checkpoint succeeds, when task.md has an `issue_number`, run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {delivery-base-ref}`. The task-bound `delivery_base_ref` is the only source for Issue `in:` evidence; record a warning and stop this round without emitting `code.completed` if this sync fails.
|
|
116
|
+
|
|
109
117
|
### 9. Write the Code Report
|
|
110
118
|
|
|
119
|
+
Before writing this round's `{code-artifact}`, create the controlled report skeleton:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
agent-infra-internal task-artifact {task-id} init --family code --artifact {code-artifact} --locale en
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The skeleton contains identity metadata, stable section markers, and required headings only; real implementation and verification content is required before the completion gate can pass. If the finalizer returns one provably safe structural error, call `task-artifact {task-id} repair --family code --artifact {code-artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`, then rerun the same finalizer.
|
|
126
|
+
|
|
111
127
|
Create `.agents/workspace/active/{task-id}/{code-artifact}`.
|
|
112
128
|
|
|
113
129
|
> Read `reference/report-template.md` before writing the report.
|
|
114
130
|
|
|
115
|
-
### 10.
|
|
131
|
+
### 10. Pre-completion Report Gate
|
|
132
|
+
|
|
133
|
+
After writing the report and before publishing `code.completed`, read and follow `.agents/rules/local-artifact-repair.md` and run:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
finalizer=$(agent-infra-internal task-artifact {task-id} finalize-local --family code --artifact {code-artifact})
|
|
137
|
+
status=$?
|
|
138
|
+
echo "$finalizer"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
- `status=0` with `finalizer.status="passed"`: bind `{artifact-sha256}` and `{semantic-digest}` from this result.
|
|
142
|
+
- `status=1` with `repairable=true` and a diagnostic explicitly describing a one-line replacement: confirm task, round, artifact, and provenance are unchanged; edit only that `code*.md` once, confirm the bytes changed, then rerun the same command completely.
|
|
143
|
+
- For any other failure, lack of progress, repeated diagnostic, or eight actual report edits, stop without publishing `code.completed`.
|
|
144
|
+
|
|
145
|
+
Do not rescan or manually write digest data; the completion event must include `--artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest}` from the successful finalizer result.
|
|
146
|
+
|
|
147
|
+
### 11. Update Task Status
|
|
116
148
|
|
|
117
|
-
After requirement checkboxes are updated, run the initial event `agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --artifact {code-artifact} --files-modified {n} --tests-passed {n} {execution-flag}`; in fix mode
|
|
149
|
+
After requirement checkboxes are updated, run the initial event `agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {code-artifact} --artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest} --files-modified {n} --tests-passed {n} {execution-flag}`; in fix mode add `--fix-for {review-artifact} --blockers {n} --major {n} --minor {n} --manual-validation {n} {execution-flag}` instead; in decision mode add `--implementation-input {input-id}` to the initial counts. The core atomically records the artifact link, stage, metadata, done log, and decision-input consumption.
|
|
118
150
|
|
|
119
|
-
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, then:
|
|
151
|
+
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, then (status/comment failures follow the warning rules; an Issue `in:` evidence failure must not emit `code.completed`):
|
|
120
152
|
- Run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status in-progress`
|
|
121
153
|
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
122
154
|
- Run `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {code-artifact} --agent {standard-agent-token}`
|
|
123
155
|
|
|
124
|
-
###
|
|
156
|
+
### 12. Run Completion Gate
|
|
125
157
|
|
|
126
158
|
```bash
|
|
127
159
|
agent-infra-internal task-verify {task-id} code.completed --artifact {code-artifact} --format text
|
|
128
160
|
```
|
|
129
161
|
|
|
130
|
-
###
|
|
162
|
+
### 13. Tell the User
|
|
131
163
|
|
|
132
164
|
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.
|
|
133
165
|
|