@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
package/lib/version.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import semver from 'semver';
|
|
2
3
|
|
|
3
4
|
const packageJsonUrl = [
|
|
4
5
|
new URL('../package.json', import.meta.url),
|
|
@@ -12,9 +13,22 @@ if (!packageJsonUrl) {
|
|
|
12
13
|
const { version } = JSON.parse(readFileSync(packageJsonUrl, 'utf8'));
|
|
13
14
|
const VERSION = `v${version}`;
|
|
14
15
|
const AGENT_INFRA_VERSION_PATTERN = /^v\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
16
|
+
const LEGACY_COMPATIBILITY_CUTOFF_VERSION = '1.0.0';
|
|
15
17
|
|
|
16
18
|
function isValidAgentInfraVersion(value: unknown): value is string {
|
|
17
19
|
return typeof value === 'string' && AGENT_INFRA_VERSION_PATTERN.test(value);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
function isLegacyCompatibilityEnabled(runtimeVersion = VERSION): boolean {
|
|
23
|
+
const normalized = runtimeVersion.startsWith('v') ? runtimeVersion.slice(1) : runtimeVersion;
|
|
24
|
+
const parsed = semver.valid(normalized);
|
|
25
|
+
return parsed !== null && semver.lt(parsed, LEGACY_COMPATIBILITY_CUTOFF_VERSION);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function legacyCompatibilityError(resource: string, runtimeVersion = VERSION): Error & { code: string } {
|
|
29
|
+
return Object.assign(new Error(
|
|
30
|
+
`PLATFORM_IDENTITY_LEGACY_UNSUPPORTED: ${resource} requires migration to the current schema before v${LEGACY_COMPATIBILITY_CUTOFF_VERSION} runtime ${runtimeVersion}`
|
|
31
|
+
), { code: 'PLATFORM_IDENTITY_LEGACY_UNSUPPORTED' });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { LEGACY_COMPATIBILITY_CUTOFF_VERSION, VERSION, isLegacyCompatibilityEnabled, isValidAgentInfraVersion, legacyCompatibilityError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fitlab-ai/agent-infra",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.14",
|
|
4
4
|
"description": "Bootstrap tool for AI multi-tool collaboration infrastructure — works with Claude Code, Codex, Antigravity CLI, and OpenCode",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
"access": "public",
|
|
18
18
|
"registry": "https://registry.npmjs.org/"
|
|
19
19
|
},
|
|
20
|
+
"exports": {
|
|
21
|
+
"./platform-provider": {
|
|
22
|
+
"types": "./dist/lib/platform/provider-contract.d.ts",
|
|
23
|
+
"import": "./dist/lib/platform/provider-contract.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
20
26
|
"bin": {
|
|
21
27
|
"agent-infra": "./dist/bin/cli.js",
|
|
22
28
|
"ai": "./dist/bin/cli.js",
|
|
@@ -48,6 +54,7 @@
|
|
|
48
54
|
"@clack/prompts": "1.7.0",
|
|
49
55
|
"@larksuiteoapi/node-sdk": "^1.68.0",
|
|
50
56
|
"cross-spawn": "^7.0.6",
|
|
57
|
+
"fs-ext-extra-prebuilt": "2.2.13",
|
|
51
58
|
"picocolors": "1.1.1",
|
|
52
59
|
"semver": "^7.8.1",
|
|
53
60
|
"smol-toml": "^1.6.1",
|
|
@@ -59,6 +66,7 @@
|
|
|
59
66
|
"prepare": "git config core.hooksPath .git-hooks || true",
|
|
60
67
|
"typecheck": "tsc -p tsconfig.test.json --noEmit && tsc -p tsconfig.jschecks.json --noEmit",
|
|
61
68
|
"test:smoke": "node scripts/run-tests.js \"tests/unit/**/*.test.ts\"",
|
|
69
|
+
"test:smoke:fast": "node scripts/run-tests.js --skip-build \"tests/unit/**/*.test.ts\"",
|
|
62
70
|
"test:core": "node scripts/run-tests.js \"tests/unit/**/*.test.ts\" \"tests/integration/**/*.test.ts\"",
|
|
63
71
|
"test:integration": "node scripts/run-tests.js \"tests/integration/**/*.test.ts\" \"tests/e2e/**/*.test.ts\"",
|
|
64
72
|
"check": "npm run typecheck && npm test",
|
|
@@ -77,5 +85,8 @@
|
|
|
77
85
|
},
|
|
78
86
|
"overrides": {
|
|
79
87
|
"axios": "1.18.1"
|
|
88
|
+
},
|
|
89
|
+
"allowScripts": {
|
|
90
|
+
"fs-ext-extra-prebuilt@2.2.13": true
|
|
80
91
|
}
|
|
81
92
|
}
|
|
@@ -13,7 +13,9 @@ so you can quickly find "which ones to read" without opening each file.
|
|
|
13
13
|
- [`version-stamp.md`](version-stamp.md) — How and when to stamp `agent_infra_version`.
|
|
14
14
|
- [`debugging-guide.md`](debugging-guide.md) — Structured debugging flow: gather evidence → form hypothesis → verify hypothesis → fix the root cause; no blind patch-and-retry.
|
|
15
15
|
- [`compatibility-policy.md`](compatibility-policy.md) — Compatibility by exception: admission evidence, implementation boundaries, exit conditions, and lifecycle review requirements.
|
|
16
|
+
- [`evidence-reporting.md`](evidence-reporting.md) — Minimum evidence semantics for state checks, successful summaries, exceptional results, identity fields, and sensitive data boundaries.
|
|
16
17
|
- [`sync-content-generation.md`](sync-content-generation.md) — Producer-side Markdown constraints for task and lifecycle content synchronized to Issues.
|
|
18
|
+
- [`decision-qualification.md`](decision-qualification.md) — Constraint, candidate, human-confirmation, and six-artifact qualification-audit contract.
|
|
17
19
|
|
|
18
20
|
## Issue / PR
|
|
19
21
|
|
|
@@ -30,7 +32,7 @@ so you can quickly find "which ones to read" without opening each file.
|
|
|
30
32
|
- [`lifecycle-orchestration.md`](lifecycle-orchestration.md) — Fresh executor/reviewer, one-use receipt, pause/recovery, and safe endpoint rules for `run-task`.
|
|
31
33
|
- [`review-handshake.md`](review-handshake.md) — Three-stage bidirectional review handshake: four-state disposition, symmetric evidence, disagreement ledger, convergence and post-review commit gate.
|
|
32
34
|
- [`review-method.md`](review-method.md) — Shared three-stage review method: multi-pass review, risk lenses, traceability, and finding evidence.
|
|
33
|
-
- [`local-artifact-repair.md`](local-artifact-repair.md) —
|
|
35
|
+
- [`local-artifact-repair.md`](local-artifact-repair.md) — Pre-completion local artifact validation for analysis/plan/code and model-per-case repair, safety gates, and convergence for failed review artifacts.
|
|
34
36
|
- [`human-decision-context.md`](human-decision-context.md) — Self-contained context and canonical structure for new human-decision details.
|
|
35
37
|
- [`task-short-id.md`](task-short-id.md) — Resolution, allocation and lifecycle of bare-number short ids.
|
|
36
38
|
- [`milestone-inference.md`](milestone-inference.md) — Milestone inference for create-task / code-task / create-pr.
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
- [`version-stamp.md`](version-stamp.md) — `agent_infra_version` 版本戳的取值命令与写入时机。
|
|
13
13
|
- [`debugging-guide.md`](debugging-guide.md) — 结构化调试流程:收集证据→形成假设→验证假设→修复根因,禁止盲目改代码重试。
|
|
14
14
|
- [`compatibility-policy.md`](compatibility-policy.md) — 兼容性默认关闭:准入证据、实现边界、退出条件与生命周期审查要求。
|
|
15
|
+
- [`evidence-reporting.md`](evidence-reporting.md) — 生命周期报告的状态核对、成功摘要、异常证据、身份字段和敏感信息边界。
|
|
15
16
|
- [`sync-content-generation.md`](sync-content-generation.md) — 同步到 Issue 的任务和生命周期 Markdown 生成约束。
|
|
17
|
+
- [`decision-qualification.md`](decision-qualification.md) — 约束、候选、人工确认和六类 artifact 资格审计契约。
|
|
16
18
|
|
|
17
19
|
## Issue / PR
|
|
18
20
|
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
- [`lifecycle-orchestration.md`](lifecycle-orchestration.md) — `run-task` 的 fresh executor/reviewer、一次性 receipt、暂停恢复与安全终点规则。
|
|
30
32
|
- [`review-handshake.md`](review-handshake.md) — 三阶段双向审查握手协议:四态处置、对称证据、分歧账本、收敛与 post-review commit 门禁。
|
|
31
33
|
- [`review-method.md`](review-method.md) — 三阶段共享检视方法:多遍检视、风险镜头、追踪与 finding 证据契约。
|
|
32
|
-
- [`local-artifact-repair.md`](local-artifact-repair.md) — review artifact
|
|
34
|
+
- [`local-artifact-repair.md`](local-artifact-repair.md) — analysis/plan/code completed 前的本地产物校验、review artifact 失败后的模型逐例修复、机械安全门与收敛契约。
|
|
33
35
|
- [`human-decision-context.md`](human-decision-context.md) — 新建人工裁决详情的自足上下文与规范结构。
|
|
34
36
|
- [`task-short-id.md`](task-short-id.md) — 裸数字任务短号的解析、分配与生命周期。
|
|
35
37
|
- [`milestone-inference.md`](milestone-inference.md) — create-task / code-task / create-pr 的 milestone 推断。
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Decision Qualification and Constraint Audit
|
|
2
|
+
|
|
3
|
+
Any analysis, plan, implementation, or review that decides whether a human decision is needed must audit qualification from the normalized constraints and candidates in `task.md` before creating `HD-N`.
|
|
4
|
+
|
|
5
|
+
## Single source of truth
|
|
6
|
+
|
|
7
|
+
- The `### Constraints` and `### Candidate and Rejected Options` tables in `task.md` are the only constraint and candidate fact source.
|
|
8
|
+
- The constraint table uses `constraint_id`, `statement`, `status`, `authority`, `source`, `evidence`, `derived_from`, and `approval_evidence`; the candidate table uses `candidate_id`, `statement`, `status`, `constraint_ids`, `impact`, and `evidence`.
|
|
9
|
+
- All six artifact families must include `## Qualification Audit` with actual constraint dependencies, candidate qualification, classification results, upstream relations, and a dependency snapshot. Each upstream relation records family, file name, round, and SHA-256.
|
|
10
|
+
|
|
11
|
+
## Status and confirmation
|
|
12
|
+
|
|
13
|
+
- A `confirmed` constraint requires source evidence, the current semantic digest, and a qualification confirmation record; a confirmation for an old digest cannot be reused.
|
|
14
|
+
- `derived`, `assumption`, `open`, `conflicted`, and `superseded` are pending facts and cannot automatically exclude a candidate.
|
|
15
|
+
- The internal proposal entry point may write only non-confirmed constraints and `pending` candidates. It cannot write actor, QCR, confirmed, or approval fields.
|
|
16
|
+
- `agent-infra-internal task-qualification` is the internal confirmation, supersession, and revocation entry point for agents and skills; ordinary users are not exposed to the constraint-digest protocol. `human-declared` is an audit label, not identity authentication. On confirmation, the core generates the QCR and binds it to the current post-write per-constraint digest, request id, time, and a single-line rationale. Supersession and revocation move the constraint to `superseded` and `open`, respectively, clear current approval evidence, and retain historical QCRs.
|
|
17
|
+
|
|
18
|
+
## Invalidation and review
|
|
19
|
+
|
|
20
|
+
When a constraint changes, only artifacts declaring the affected `C-N` can be direct invalidation seeds; the change then follows the real downstream closure. All six families, including reviews, are symmetric. If snapshots, relations, or change classification cannot prove a pure constraint change, use the existing full invalidation path. The newly completed source artifact, its receipt, and its derived snapshot are excluded from the old target graph.
|
|
21
|
+
|
|
22
|
+
Missing or unknown references, digest mismatches, dangling relations, and cycles fail closed. Formatting-only changes must not change semantic digests; changes to meaning, provenance, status, candidates, or upstream identity require a new audit.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 决策资格与约束审计
|
|
2
|
+
|
|
3
|
+
涉及“是否需要人工裁决”的分析、方案、实现或审查,必须先基于 `task.md` 的规范化约束和候选表完成资格审计,再决定是否创建 `HD-N`。
|
|
4
|
+
|
|
5
|
+
## 唯一事实源
|
|
6
|
+
|
|
7
|
+
- `task.md` 的 `### 约束` 和 `### 候选与否决方案` 是唯一约束/候选事实源。
|
|
8
|
+
- 约束表必须使用 `constraint_id`、`statement`、`status`、`authority`、`source`、`evidence`、`derived_from`、`approval_evidence`;候选表必须使用 `candidate_id`、`statement`、`status`、`constraint_ids`、`impact`、`evidence`。
|
|
9
|
+
- 六类阶段产物都要在 `## 资格审计` 中声明实际约束依赖、候选资格、分类结果、上游关系和依赖快照。上游关系必须保存 artifact 的 family、文件名、round 和 SHA-256。
|
|
10
|
+
|
|
11
|
+
## 状态与确认
|
|
12
|
+
|
|
13
|
+
- `confirmed` 约束必须有来源证据、当前语义 digest 和 `资格确认记录`;旧 digest 的确认不能复用。
|
|
14
|
+
- `derived`、`assumption`、`open`、`conflicted`、`superseded` 只能作为待审事实,不能自动排除候选。
|
|
15
|
+
- 内部 proposal 入口只能写入非 confirmed 约束和 `pending` 候选,不能写 actor、QCR、confirmed 或 approval 字段。
|
|
16
|
+
- `agent-infra-internal task-qualification` 是供 Agent/skill 使用的内部确认、替代和撤销入口,不向普通用户暴露 constraint digest 协议;`human-declared` 是审计标签,不是身份认证。确认时 QCR 由核心生成并绑定确认写入后的当前单约束 digest、request id、时间和单行理由;替代与撤销分别把约束转为 `superseded` 与 `open`,清空当前 approval evidence,并保留历史 QCR。
|
|
17
|
+
|
|
18
|
+
## 失效与审查
|
|
19
|
+
|
|
20
|
+
约束变化时,只有声明受影响 `C-N` 的 artifact 才能成为直接失效种子,并沿真实上游关系的下游闭包传播;六类 artifact(含 review)对等处理。快照、关系图或变化分类无法证明为纯约束变化时,回退既有全量失效路径。新完成的 source artifact、自身 receipt 和派生快照不作为旧图目标。
|
|
21
|
+
|
|
22
|
+
缺失、未知引用、digest 不匹配、悬空关系或环都必须 fail closed。排版变化不应改变语义 digest;语义、来源、状态、候选或上游 identity 变化必须触发重新审计。
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Lifecycle Evidence Reporting
|
|
2
|
+
|
|
3
|
+
This rule governs lifecycle reports persisted in the task workspace or synchronized to an Issue. It defines the minimum evidence semantics without changing artifact identity, receipts, synchronization, or restore protocols.
|
|
4
|
+
|
|
5
|
+
## State Check
|
|
6
|
+
|
|
7
|
+
- Record the `task-snapshot` command and its task, artifact, and scope.
|
|
8
|
+
- For normal results, record the key conclusion and exceptions; do not repeat the full directory listing or `task.md` tail.
|
|
9
|
+
- For identity mismatches, failures, blocking conditions, or disputes, retain the decisive raw lines that support the judgment.
|
|
10
|
+
|
|
11
|
+
## Successful Checks
|
|
12
|
+
|
|
13
|
+
Every successful check records the command or an allowed public command name, target and scope, exit status or structured result, actual result, and uncovered parts. Do not write only “passed” or “tests passed”, and do not paste complete successful stdout by default.
|
|
14
|
+
|
|
15
|
+
## Failures, Blocking Conditions, and Disputes
|
|
16
|
+
|
|
17
|
+
Record a reproducible command or entry point, the exact file/line/object/version location, exit status, and the smallest decisive excerpt supporting the conclusion. If reproduction is unavailable, state the limitation explicitly rather than presenting incomplete evidence as success.
|
|
18
|
+
|
|
19
|
+
## Preserved Identity and Security Boundaries
|
|
20
|
+
|
|
21
|
+
- Preserve artifact SHA-256, semantic digest, review head, receipt, request-id, snapshot tree, and platform marker exactly.
|
|
22
|
+
- The Issue continues to mirror the complete report; the report must not depend on logs accessible only on the local machine.
|
|
23
|
+
- Manual validation keeps its stricter basename-only and sanitized-result rules; this shared rule does not expand public fields.
|
|
24
|
+
- A `$ ` command line satisfies the structural gate but does not require complete successful output.
|
|
25
|
+
|
|
26
|
+
## Evidence Pairing
|
|
27
|
+
|
|
28
|
+
Pair every verification claim with a `$ ` command and a proportionate result summary. Include a decisive raw excerpt only for failure, blocking, or dispute conclusions. When a command contains sensitive arguments, use its allowed public name or a redacted command.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 生命周期报告证据记录规则
|
|
2
|
+
|
|
3
|
+
本规则约束会持久化到任务目录或同步到 Issue 的生命周期报告。它统一报告的最低证据语义,不改变 artifact 身份、receipt、同步或恢复协议。
|
|
4
|
+
|
|
5
|
+
## 状态核对
|
|
6
|
+
|
|
7
|
+
- 记录 `task-snapshot` 命令及任务、产物和检查范围。
|
|
8
|
+
- 正常结果记录关键结论和异常;不要重复粘贴完整目录清单或 `task.md` 尾部。
|
|
9
|
+
- 身份不一致、失败、阻塞或争议时,保留能支持判断的决定性原文行。
|
|
10
|
+
|
|
11
|
+
## 成功检查
|
|
12
|
+
|
|
13
|
+
成功路径至少记录:命令或允许公开的命令名称、目标与检查范围、退出状态或结构化结果、实际结果、未覆盖部分。不能只写“通过”或“测试通过”,也不默认粘贴完整成功 stdout。
|
|
14
|
+
|
|
15
|
+
## 失败、阻塞和争议
|
|
16
|
+
|
|
17
|
+
记录可复现的命令或调用入口、准确的文件/行号/对象/版本位置、退出状态,以及决定结论的最小决定性摘录。无法复现时明确写出限制,不把不完整证据写成成功。
|
|
18
|
+
|
|
19
|
+
## 不变的身份与安全边界
|
|
20
|
+
|
|
21
|
+
- artifact SHA-256、semantic digest、review head、receipt、request-id、快照树和平台 marker 必须精确保留。
|
|
22
|
+
- Issue 继续镜像报告全文;报告不得依赖只有本机可访问的日志。
|
|
23
|
+
- 人工验证继续使用 basename-only、sanitized result 等更严格规则;共享规则不扩大可公开字段。
|
|
24
|
+
- `$ ` 命令行标记满足结构门禁,但不要求附带完整成功输出。
|
|
25
|
+
|
|
26
|
+
## 证据配对
|
|
27
|
+
|
|
28
|
+
报告中的每个验证断言都应配一个 `$ ` 命令和相称结果摘要;只有失败、阻塞或争议结论才附决定性原文摘录。命令含敏感参数时使用允许公开的命令名或脱敏命令。
|
|
@@ -29,6 +29,6 @@ agent-infra-internal platform-pr sync {task-id} \
|
|
|
29
29
|
--agent {standard-agent-token} --metadata --closing-issue
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Conflicting bindings do not change `task.md`.
|
|
32
|
+
Conflicting bindings do not change `task.md`. The shared core computes one `in:` target from task-bound diff/PR files and the repository mapping. A unique closing Issue is converged before the PR; other metadata comes from the linked Issue. Zero or multiple closing Issues update only the PR and return `degraded`; `in:` labels are never copied back from the Issue or removed from unrelated resources. Permission-bound items degrade independently, partial side effects return `blocked` with `IN_LABEL_SYNC_PARTIAL`, and an already-created PR is never rolled back.
|
|
33
33
|
|
|
34
34
|
Statuses `planned|applied|no-op|degraded` exit 0, `failed` exits 1, and `blocked` exits 2.
|
|
@@ -39,7 +39,7 @@ agent-infra-internal platform-pr sync {task-id} \
|
|
|
39
39
|
--agent {standard-agent-token} --metadata --closing-issue
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
core
|
|
42
|
+
core 根据 task-bound diff/PR files 与仓库映射计算唯一 `in:` target;唯一 closing Issue 按 Issue→PR 顺序收敛,其他 metadata 从关联 Issue 复制。零或多个 closing Issue 只更新 PR 并返回 `degraded`;不得从 Issue 反向复制 `in:`,也不清除非 `in:` labels。权限不足逐项返回 `skipped`,部分副作用返回 `blocked` 与 `IN_LABEL_SYNC_PARTIAL`。
|
|
43
43
|
|
|
44
44
|
## 状态语义
|
|
45
45
|
|
|
@@ -25,6 +25,8 @@ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token
|
|
|
25
25
|
|
|
26
26
|
The core owns status/in labels, assignees, milestones, Issue Type, pinned fields, requirements, state, capabilities, dry-run, retries, errors, and idempotency. Omitted flags preserve values; `none` explicitly clears them. Status labels converge to at most one, and ambiguous requirement identity fails closed.
|
|
27
27
|
|
|
28
|
+
PR event `in:` synchronization uses `agent-infra-internal platform-pr sync-in-labels --pr <N> [--cwd <path>]`. PR files are the event evidence; a unique closing Issue is written and re-read before the PR. Zero or multiple closing Issues update only the PR and return `degraded`; unknown side effects or failed convergence return `blocked` with `IN_LABEL_SYNC_PARTIAL`.
|
|
29
|
+
|
|
28
30
|
`planned|applied|no-op|degraded` exit 0; `failed` exits 1; `blocked` exits 2.
|
|
29
31
|
|
|
30
32
|
Map material degraded/failed/blocked results to workflow warnings through the structured intent; callers must not edit warning rows directly:
|
|
@@ -71,6 +71,8 @@ agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token
|
|
|
71
71
|
|
|
72
72
|
status labels 始终至多一个;关闭后不保留 status label。`in:` labels 只从项目允许映射与仓库实际 labels 交集产生。需求复选框以 task.md 原文为身份,歧义时 fail closed。
|
|
73
73
|
|
|
74
|
+
PR event 的 `in:` 同步使用 `agent-infra-internal platform-pr sync-in-labels --pr <N> [--cwd <path>]`。PR files 是事件证据;唯一 closing Issue 按 Issue→PR 顺序写入并复读,零或多个 closing Issue 只写 PR 并返回 `degraded`。写入后副作用不明或复读未收敛必须返回 `blocked` 与 `IN_LABEL_SYNC_PARTIAL`。
|
|
75
|
+
|
|
74
76
|
## 补发
|
|
75
77
|
|
|
76
78
|
complete-task 按 artifact catalog 时间线遍历本地已有产物:task 使用 `--kind task`,其余使用 `--kind artifact --artifact <file> --backfill`;最后用 `--kind summary --body-file <path>` 原地同步交付摘要。artifact backfill 在远端缺少 marker 时创建带“历史产物补发”提示的评论;已存在合法 marker 集合时保持原评论和分片不变并返回 `no-op`;marker 冲突仍失败。该判定由 core 完成,不由 Skill 扫描评论或拼标题。
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Read this rule before initializing labels or milestones, or before changing milestone metadata during release work.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Runtime intent entry points
|
|
6
6
|
|
|
7
|
-
Use the
|
|
7
|
+
Use the internal runtime intents rather than composing platform commands in a skill:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
agent-infra-internal platform-metadata init-labels [--cleanup-stale-in]
|
|
11
|
+
agent-infra-internal platform-metadata init-milestones [--history]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
`init-labels
|
|
14
|
+
The `init-labels` runtime intent reads the repository's `labels.in` configuration, creates or updates the declared `in:` labels, and preserves unrelated labels. `--cleanup-stale-in` is destructive and may only be passed after explicit confirmation; it removes stale `in:` labels that are no longer declared.
|
|
15
15
|
|
|
16
|
-
`init-milestones
|
|
16
|
+
The `init-milestones` runtime intent owns milestone planning and result reporting. Callers must pass the requested arguments through unchanged and must not rebuild milestone discovery, ordering, or write logic.
|
|
17
17
|
|
|
18
|
-
Both
|
|
18
|
+
Both intents return a stable status. A successful no-op is still success; a degraded result must be reported without claiming that remote metadata was changed. Failed or cancelled operations must not be reported as completed.
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
在初始化 label、milestone,或在发布工作中修改 milestone 元数据前,先阅读本规则。
|
|
4
4
|
|
|
5
|
-
## 入口
|
|
5
|
+
## Runtime intent 入口
|
|
6
6
|
|
|
7
|
-
SKILL
|
|
7
|
+
SKILL 应调用内部 runtime intent,不得自行拼装平台命令:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
agent-infra-internal platform-metadata init-labels [--cleanup-stale-in]
|
|
11
|
+
agent-infra-internal platform-metadata init-milestones [--history]
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
`init-labels
|
|
14
|
+
`init-labels` runtime intent 读取仓库的 `labels.in` 配置,创建或更新声明的 `in:` label,并保留无关 label。`--cleanup-stale-in` 具有破坏性,只有在得到明确确认后才能传入;它会删除不再声明的过期 `in:` label。
|
|
15
15
|
|
|
16
|
-
`init-milestones
|
|
16
|
+
`init-milestones` runtime intent 负责 milestone 规划和结果报告。调用方应原样传递请求参数,不得重新实现 milestone 发现、排序或写入逻辑。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
两个 intent 都返回稳定状态。成功的 no-op 仍算成功;degraded 结果必须如实报告,不能声称远端元数据已变更。失败或取消的操作不得报告为已完成。
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
# General Rule - Model-Driven Local Artifact Repair
|
|
2
2
|
|
|
3
|
-
This rule applies
|
|
3
|
+
This rule applies when `analyze-task`, `plan-task`, or `code-task` handles **the same controlled local artifact** before its completed event, and when `review-analysis`, `review-plan`, or `review-code` handles a finalizer failure for **the same controlled review artifact**. It does not apply to `task.md`, the ledger, receipts, source code, Git, platform resources, or lifecycle state.
|
|
4
|
+
|
|
5
|
+
## Pre-completion gate for analysis, plan, and code artifacts
|
|
6
|
+
|
|
7
|
+
- `analyze-task`, `plan-task`, and `code-task` must call `task-artifact ... finalize-local` before publishing a completed event; pass only that call's `artifactSha256` and `semanticDigest` to the completed event.
|
|
8
|
+
- `finalize-local` does not modify the artifact or task state, but it writes a one-shot local provenance intent in the repository workspace. After `failed`, the model may make one minimal edit in the same artifact only when `repairable=true` and the diagnostic explicitly describes one provably safe structural operation (the current shared engine operations are `replace-line` and `insert-section`), then rerun the same call completely; count each byte-changing edit, up to 8.
|
|
9
|
+
- The first repairable failure's semantic digest is retained in that intent; a later `passed` result must match the baseline, and the completed event must verify and atomically transition the same intent to `consumed` before writing `task.md` under the task lock. A consumption failure must not write the task; the consumed intent is durable and retryable, so no failure-prone post-write deletion is attempted. Do not replace a failed baseline with a newly computed digest or publish a completed event without the finalizer.
|
|
10
|
+
- After `failed`, no progress, or a repeated diagnostic or fingerprint, do not publish a completed event. After `passed`, do not rescan or manually write summary data.
|
|
4
11
|
|
|
5
12
|
## Authorization Boundary
|
|
6
13
|
|
|
7
14
|
- The finalizer only reads facts, validates state, normalizes successful results, and performs atomic writes. It does not maintain a recoverable-error allowlist, infer repairability, or choose report content to delete.
|
|
8
15
|
- The initial finalizer call is not counted as a repair attempt. Editing is allowed only after the mechanical safety gates pass and the model explicitly determines that the current problem can be solved by a minimal, explainable artifact change.
|
|
9
|
-
- The model may edit only the one ordinary
|
|
16
|
+
- The model may edit only the one ordinary local artifact declared by the current skill, and the file must be inside the current task directory. It must not edit `task.md`, the review disagreement ledger, receipts, source code, other reports, or remote resources.
|
|
10
17
|
- `changed=false`, an error code, or a format shape is diagnostic evidence, not automatic authorization. The model must judge each case using the complete diagnostic, artifact content, and context.
|
|
11
18
|
|
|
12
19
|
## Non-bypassable Mechanical Safety Gates
|
|
@@ -33,6 +40,10 @@ If any condition fails, stop immediately without invoking a model edit. The mode
|
|
|
33
40
|
|
|
34
41
|
The repair count exists only in the in-memory context of the current skill invocation. Do not write it to `task.md`, the ledger, or a public receipt. Do not create different normal budgets by error code, skill, or problem type.
|
|
35
42
|
|
|
43
|
+
## Shared Structural Engine
|
|
44
|
+
|
|
45
|
+
The report skeleton is created by `agent-infra-internal task-artifact {task-id} init --family {family} --artifact {artifact}`. The skeleton writes only identity, headings, and `artifact-section:{family}:{section-id}` markers; it does not represent semantic completion. The current skill must fill each slot with real content. When the finalizer returns one provably safe structural operation, use that result's SHA and semantic digest with `task-artifact {task-id} repair --family {family} --artifact {artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`. Repair executes only the one operation from the shared engine, does not write `task.md`, the ledger, receipts, Git, or platform resources, and must be followed by a complete rerun of the original finalizer.
|
|
46
|
+
|
|
36
47
|
## Completion Events and User Output
|
|
37
48
|
|
|
38
49
|
- After the final complete finalizer result succeeds, publish the review completed event using that same result's provenance, ledger state, verdict, and counts. Generate cross-stage next-step commands only when `stageStatus.canAdvance=true` and the verdict is Approved; when `canAdvance=false`, still record the result and route to same-stage revision/review.
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
# 通用规则 - 模型驱动的本地产物修复
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本规则适用于 `analyze-task`、`plan-task`、`code-task` 在 completed 事件前处理**同一个受控本地产物**,以及 `review-analysis`、`review-plan`、`review-code` 在 finalizer 失败后处理**同一个受控 review artifact** 的场景。它不适用于 task.md、账本、receipt、源码、Git、平台资源或生命周期状态。
|
|
4
|
+
|
|
5
|
+
## 分析、方案和代码产物完成前门禁
|
|
6
|
+
|
|
7
|
+
- `analyze-task`、`plan-task` 和 `code-task` 必须在发布 completed 事件前调用 `task-artifact ... finalize-local`;只有同一次返回的 `artifactSha256` 和 `semanticDigest` 才能传给 completed 事件。
|
|
8
|
+
- `finalize-local` 不修改产物或任务状态,但会在仓库工作区写入一次性的本地 provenance intent。返回 `failed` 时,只有 `repairable=true` 且诊断明确为一个可证明安全的结构操作(当前共享引擎操作为 `replace-line` 或 `insert-section`),模型才可在同一产物中执行一次最小编辑,然后完整重跑同一调用;每次实际字节修改计一次,最多 8 次。
|
|
9
|
+
- 首次可修复失败的 semantic digest 会保存在该 intent 中;后续 `passed` 必须匹配该基线,completed event 还必须在任务锁内验证并在写 task.md 前原子转换为 `consumed` 状态。消费失败时不得写任务;转换后的 intent 是可重试的 durable 记录,成功写入后不再执行可能失败的后置删除。不得用重新计算的新摘要替换失败基线,也不得绕过 finalizer 直接发布 completed event。
|
|
10
|
+
- 返回 `failed`、无进展、诊断或指纹重复时不得发布 completed 事件;返回 `passed` 后也不得重新扫描或手工补写摘要。
|
|
4
11
|
|
|
5
12
|
## 授权边界
|
|
6
13
|
|
|
7
14
|
- finalizer 只负责读取事实、校验状态、规范化成功结果和原子写入;它不维护可修复错误码白名单,不推断 repairability,也不自动选择要删除的报告内容。
|
|
8
15
|
- 首次 finalizer 调用不计入修复次数。只有在机械安全门通过后,模型明确判断当前问题能通过最小、可解释的 artifact 修改解决时,才允许编辑。
|
|
9
|
-
- 模型只能修改当前
|
|
16
|
+
- 模型只能修改当前 skill 声明的一个普通本地产物,且该文件必须位于当前 task 目录。不得修改 task.md、审查分歧账本、receipt、源码、其他报告或远端资源。
|
|
10
17
|
- `changed=false`、错误码或某个格式形状只是诊断事实,不是自动批准。模型必须结合完整诊断、artifact 内容和上下文逐例判断。
|
|
11
18
|
|
|
12
19
|
## 不可绕过的机械安全门
|
|
@@ -33,6 +40,10 @@
|
|
|
33
40
|
|
|
34
41
|
修复次数只存在于当前 skill invocation 的内存上下文,不写入 task.md、ledger 或公共 receipt。不得按错误码、技能或问题类型设置不同的正常预算。
|
|
35
42
|
|
|
43
|
+
## 共享结构引擎
|
|
44
|
+
|
|
45
|
+
报告骨架由 `agent-infra-internal task-artifact {task-id} init --family {family} --artifact {artifact}` 创建。骨架只写身份、标题和 `artifact-section:{family}:{section-id}` marker,不代表语义完成;槽位必须由当前 skill 填入真实内容。finalizer 返回单一可证明结构操作时,使用同一返回值的 SHA 和 semantic digest 调用 `task-artifact {task-id} repair --family {family} --artifact {artifact} --expected-sha256 {artifact-sha256} --expected-semantic-digest {semantic-digest}`。repair 只执行共享引擎给出的一个结构操作,不写 task.md、ledger、receipt、Git 或平台资源,之后必须完整重跑原 finalizer。
|
|
46
|
+
|
|
36
47
|
## 完成事件与用户输出
|
|
37
48
|
|
|
38
49
|
- 最终一次完整 finalizer 成功后,必须使用同一次返回的 provenance、账本状态、verdict 和计数发布 review completed 事件;`stageStatus.canAdvance=true` 且结论为 Approved 时才可生成跨阶段 next-step 命令,`canAdvance=false` 时仍须登记结果并路由到同阶段修订/复审。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
4
4
|
|
|
5
|
-
The model writes the semantic reviewer summary. Typed core owns canonical
|
|
5
|
+
The model writes the semantic reviewer summary. Typed core owns the task-intent digest, complete three-dot diff, canonical `pr-change-report.json` sidecar, report rendering, authoritative PR-head wrapping, paginated comment lookup, and reconciliation.
|
|
6
6
|
|
|
7
7
|
## Three-Layer Isolation
|
|
8
8
|
|
|
@@ -15,11 +15,17 @@ The three never cross: a regular PR comment does not carry the full process copy
|
|
|
15
15
|
```bash
|
|
16
16
|
agent-infra-internal platform-pr summary-context {task-id}
|
|
17
17
|
|
|
18
|
+
agent-infra-internal platform-pr change-report {task-id} \
|
|
19
|
+
--agent {standard-agent-token} --mechanical-file {mechanical-report-file} \
|
|
20
|
+
--precheck-file {precheck-candidate-file}
|
|
21
|
+
|
|
18
22
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
19
|
-
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
23
|
+
--agent {standard-agent-token} --body-file {summary-body-file} \
|
|
24
|
+
--change-report-file .agents/workspace/active/{task-id}/pr-change-report.json \
|
|
25
|
+
--result {primary-result}
|
|
20
26
|
```
|
|
21
27
|
|
|
22
|
-
Use only canonical inputs returned by the context command. Write the plain body without marker or SHA. The core owns `<!-- sync-pr:{task-id}:summary -->`,
|
|
28
|
+
Use only canonical inputs returned by the context command. The precheck must contain file evidence for six fixed checks; `formalReview` is always false and `needs-review` routes to `review-code`. Write the plain body with exactly one `<!-- canonical-pr-change-report -->` placeholder, without a report heading/JSON, marker, or SHA. The core validates the task-intent digest, bound PR identity, complete patch SHA, and mechanical totals before rendering the report, then owns `<!-- sync-pr:{task-id}:summary -->`, authoritative `<!-- last-commit: ... -->`, create/update/no-op behavior, and duplicate-marker conflicts. Missing, stale, invalid, or bypassed report input never publishes; summary failure never rolls back a PR or commit.
|
|
23
29
|
|
|
24
30
|
The canonical comment envelope produced by the core is:
|
|
25
31
|
|
|
@@ -34,7 +40,7 @@ The canonical comment envelope produced by the core is:
|
|
|
34
40
|
### PR Code Changes
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
Canonical inputs include `manual-validation.md`. The manual-validation section is one of `### ✅ Manual Validation Passed`, `### ⚠️ Manual Verification Required`, or `### ✅ No Manual Verification Needed`; `complete-manual-validation` refreshes the same summary in place. The PR code-change section uses authoritative base/head facts from `platform-pr inspect` and the complete `git diff --find-renames --numstat base...head`, reconciles runtime, test, skill/rule, template, documentation, and other categories, and explains renames, mechanical mirrors, and potentially unnecessary changes.
|
|
43
|
+
Canonical inputs include `manual-validation.md`. The manual-validation section is one of `### ✅ Manual Validation Passed`, `### ⚠️ Manual Verification Required`, or `### ✅ No Manual Verification Needed`; `complete-manual-validation` refreshes the same summary in place. The PR code-change section uses authoritative base/head facts from `platform-pr inspect` and the complete `git diff --find-renames --numstat base...head`, reconciles runtime, test, skill/rule, template, documentation, and other categories, and explains renames, mechanical mirrors, and potentially unnecessary changes. The caller supplies the placeholder; the core renderer supplies the canonical `### PR Code Changes` section.
|
|
38
44
|
|
|
39
45
|
```bash
|
|
40
46
|
agent-infra-internal task-warning {task-id} add --step {step} --severity WARNING \
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
4
4
|
|
|
5
|
-
PR
|
|
5
|
+
PR 摘要的语义聚合由模型完成;任务意图 digest、完整三点 diff、canonical `pr-change-report.json` sidecar、报告渲染、marker、权威 PR head、分页评论查找和 create/update/no-op 由 typed core 负责。
|
|
6
6
|
|
|
7
7
|
## 三层隔离
|
|
8
8
|
|
|
@@ -24,7 +24,8 @@ agent-infra-internal platform-pr summary-context {task-id}
|
|
|
24
24
|
- 测试结果
|
|
25
25
|
- 审查历程与当前结论
|
|
26
26
|
- 人工校验三态:`### ⚠️ 需人工校验`、`### ✅ 人工验证已通过` 或 `### ✅ 无需人工校验`
|
|
27
|
-
-
|
|
27
|
+
- 变更摘要、实现范围、测试结果、审查历程和人工校验三态
|
|
28
|
+
- 一个 `<!-- canonical-pr-change-report -->` 占位符;`### PR 代码增减` 由 core renderer 基于权威 diff 生成,调用方不自行写标题或统计
|
|
28
29
|
|
|
29
30
|
保留人工校验项时,每条写明校验内容、定位和只能人工完成的原因。
|
|
30
31
|
|
|
@@ -41,16 +42,28 @@ core 最终包装出的 canonical 评论结构为:
|
|
|
41
42
|
### PR 代码增减
|
|
42
43
|
```
|
|
43
44
|
|
|
45
|
+
先用机械脚本和模型预检生成输入,再写入任务目录固定 sidecar:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
agent-infra-internal platform-pr change-report {task-id} \
|
|
49
|
+
--agent {standard-agent-token} --mechanical-file {mechanical-report-file} \
|
|
50
|
+
--precheck-file {precheck-candidate-file}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
precheck 必须覆盖六项固定检查并提供文件证据;`formalReview` 固定为 `false`,`needs-review` 路由到 `review-code`。sidecar 是当前 head 的可丢弃派生缓存,不是 lifecycle artifact 或 Issue artifact。
|
|
54
|
+
|
|
44
55
|
## 发布
|
|
45
56
|
|
|
46
57
|
把聚合后的纯正文写入 `{summary-body-file}`,不要自行添加 marker 或 commit SHA:
|
|
47
58
|
|
|
48
59
|
```bash
|
|
49
60
|
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
50
|
-
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
61
|
+
--agent {standard-agent-token} --body-file {summary-body-file} \
|
|
62
|
+
--change-report-file .agents/workspace/active/{task-id}/pr-change-report.json \
|
|
63
|
+
--result {primary-result}
|
|
51
64
|
```
|
|
52
65
|
|
|
53
|
-
core
|
|
66
|
+
正文必须恰好包含一次 `<!-- canonical-pr-change-report -->`,不得自行拼接报告标题/JSON、marker 或 last-commit。core 会重新校验任务意图 digest、绑定 PR identity、完整 patch SHA 和机械统计,由 renderer 生成报告段,再包装唯一 `<!-- sync-pr:{task-id}:summary -->` 和权威 `<!-- last-commit: ... -->`,分页查找 PR 普通评论:不存在则创建、正文变化则原地更新、无差异则 no-op、重复 marker 或报告失配则稳定失败。正文通过文件输入,调用方不得拼 shell/heredoc。
|
|
54
67
|
|
|
55
68
|
## 结果回传
|
|
56
69
|
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Read this rule before importing or dismissing dependency or code-scanning alerts.
|
|
4
4
|
|
|
5
|
-
## Shared
|
|
5
|
+
## Shared runtime intent
|
|
6
6
|
|
|
7
|
-
All callers use the
|
|
7
|
+
All callers use the runtime security intent and parse its single JSON result:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
agent-infra-internal platform-security read --kind dependabot --number {number}
|
|
11
|
+
agent-infra-internal platform-security dismiss --kind dependabot --number {number} --reason {reason} --comment-file {file}
|
|
12
|
+
agent-infra-internal platform-security read --kind code-scanning --number {number}
|
|
13
|
+
agent-infra-internal platform-security dismiss --kind code-scanning --number {number} --reason {reason} --comment-file {file}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The result contains `status`, `operation`, and either `data` or `error.code` plus `error.message`. The status is one of `applied`, `no-op`, `degraded`, or `failed`. Diagnostics belong on stderr; stdout must contain exactly one JSON object.
|
|
17
17
|
|
|
18
|
-
Read the current alert before any dismiss operation.
|
|
18
|
+
Read the current alert before any dismiss operation. The runtime intent validates the structured reason, and the generated task or Issue comment must be passed through `--comment-file`.
|
|
19
19
|
|
|
20
|
-
Do not
|
|
20
|
+
Do not execute platform commands or implement the platform state machine directly from a SKILL. A degraded or failed result must be reported accurately, and cancelled or failed operations must not be recorded as successful.
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
在导入或关闭依赖告警、代码扫描告警前,先阅读本规则。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 共享 runtime intent 入口
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
所有调用方都使用 runtime security intent,并解析其单个 JSON 结果:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
agent-infra-internal platform-security read --kind dependabot --number {number}
|
|
11
|
+
agent-infra-internal platform-security dismiss --kind dependabot --number {number} --reason {reason} --comment-file {file}
|
|
12
|
+
agent-infra-internal platform-security read --kind code-scanning --number {number}
|
|
13
|
+
agent-infra-internal platform-security dismiss --kind code-scanning --number {number} --reason {reason} --comment-file {file}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
结果包含 `status`、`operation`,以及 `data` 或 `error.code` 与 `error.message`。`status` 只能是 `applied`、`no-op`、`degraded` 或 `failed`。诊断信息写入 stderr;stdout 必须只包含一个 JSON 对象。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
任何关闭操作前都必须先读取当前告警。关闭原因由 runtime intent 作为结构化输入校验,生成的任务或 Issue 评论必须通过 `--comment-file` 传入。
|
|
19
19
|
|
|
20
|
-
SKILL
|
|
20
|
+
SKILL 不得直接执行平台命令或实现平台状态机。degraded 或 failed 结果必须如实报告,取消或失败的操作不得记录为成功。
|
|
@@ -123,7 +123,4 @@ repair hint.
|
|
|
123
123
|
## Cross-TUI use
|
|
124
124
|
|
|
125
125
|
Bare numeric `N` is safe in every shell and TUI without quoting:
|
|
126
|
-
`ai sandbox exec 11 'npm test'`, `/review-analysis 11`.
|
|
127
|
-
|
|
128
|
-
Starting with the next major version, migrate the old `#NN` form to `NN`;
|
|
129
|
-
even a quoted value delivered intact to the CLI is rejected.
|
|
126
|
+
`ai sandbox exec 11 'npm test'`, `/review-analysis --task 11`.
|