@fitlab-ai/agent-infra 0.9.11 → 0.9.13
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 +13 -13
- package/README.zh-CN.md +13 -13
- package/dist/bin/internal-cli.js +29 -19
- package/dist/lib/agent-clients/adapters/codex-lifecycle/build-identity.js +71 -10
- package/dist/lib/agent-clients/next-steps.js +6 -1
- package/dist/lib/decide.js +3 -3
- package/dist/lib/defaults.json +4 -0
- package/dist/lib/git/workflow.js +43 -1
- package/dist/lib/init.js +1 -0
- package/dist/lib/internal/git-workflow.js +8 -1
- package/dist/lib/internal/platform-checks.js +3 -3
- package/dist/lib/internal/platform-comment.js +9 -9
- package/dist/lib/internal/platform-context.js +2 -2
- package/dist/lib/internal/platform-issue.js +8 -9
- package/dist/lib/internal/platform-pr-review.js +10 -10
- package/dist/lib/internal/platform-pr.js +68 -23
- package/dist/lib/internal/platform-release-notes.js +3 -3
- package/dist/lib/internal/pr-review-grade.js +11 -9
- package/dist/lib/internal/release-workflow.js +4 -4
- package/dist/lib/internal/sandbox-control.js +30 -4
- package/dist/lib/internal/task-activity.js +3 -3
- package/dist/lib/internal/task-artifact.js +76 -24
- package/dist/lib/internal/task-create.js +2 -2
- package/dist/lib/internal/task-delivery.js +59 -0
- package/dist/lib/internal/task-event.js +6 -3
- package/dist/lib/internal/task-finalization.js +2 -2
- package/dist/lib/internal/task-invalidation.js +60 -0
- package/dist/lib/internal/task-ledger.js +9 -6
- package/dist/lib/internal/task-lifecycle.js +2 -2
- package/dist/lib/internal/task-override.js +4 -4
- package/dist/lib/internal/task-review.js +3 -3
- package/dist/lib/internal/task-verify.js +6 -6
- package/dist/lib/internal/task-warning.js +3 -3
- package/dist/lib/platform/adapters.js +1 -3
- package/dist/lib/platform/change-request-git-evidence.js +27 -7
- package/dist/lib/platform/completion-backfill.js +6 -5
- package/dist/lib/platform/context.js +70 -130
- package/dist/lib/platform/github-client.js +8 -2
- package/dist/lib/platform/github-provider.js +903 -0
- package/dist/lib/platform/in-label-sync.js +143 -0
- package/dist/lib/platform/issue-comments.js +94 -41
- 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 +551 -0
- package/dist/lib/platform/pr-checks.js +124 -106
- package/dist/lib/platform/pr-review.js +88 -72
- package/dist/lib/platform/pr-summary.js +523 -49
- package/dist/lib/platform/provider-bridge.js +45 -0
- package/dist/lib/platform/provider-contract.d.ts +487 -0
- package/dist/lib/platform/provider-contract.js +95 -0
- package/dist/lib/platform/provider-loader.js +251 -0
- package/dist/lib/platform/provider-validation.js +504 -0
- package/dist/lib/platform/pull-request-metadata.js +8 -6
- package/dist/lib/platform/pull-requests.js +1050 -502
- package/dist/lib/platform/release-notes.js +78 -55
- package/dist/lib/platform/releases.js +79 -50
- package/dist/lib/platform/resource-identity.d.ts +26 -0
- package/dist/lib/platform/resource-identity.js +92 -0
- package/dist/lib/platform/task-identities.js +31 -0
- package/dist/lib/platform/verification-required.js +22 -12
- package/dist/lib/platform/verification-sync.js +118 -239
- package/dist/lib/pr-review/evidence-grading.js +30 -9
- package/dist/lib/run/index.js +63 -23
- package/dist/lib/sandbox/config.js +5 -0
- package/dist/lib/sandbox/control/client.js +96 -15
- package/dist/lib/sandbox/control/executor.js +3 -3
- package/dist/lib/sandbox/control/lifecycle.js +29 -7
- package/dist/lib/sandbox/control/protocol.js +77 -0
- package/dist/lib/sandbox/control/server.js +398 -25
- package/dist/lib/sandbox/control/state.js +204 -1
- package/dist/lib/server/process-state.js +2 -2
- package/dist/lib/server/protocol.js +38 -1
- package/dist/lib/task/activity-log.js +8 -1
- package/dist/lib/task/artifact-lifecycle.js +35 -7
- package/dist/lib/task/capabilities.js +239 -0
- package/dist/lib/task/commands/status.js +32 -0
- package/dist/lib/task/commit-intent.js +100 -0
- package/dist/lib/task/commit-operation.js +207 -102
- package/dist/lib/task/control-authority.js +8 -5
- package/dist/lib/task/create-service.js +8 -8
- package/dist/lib/task/create.js +33 -7
- package/dist/lib/task/current-contract.js +5 -1
- package/dist/lib/task/decision-details.js +3 -48
- package/dist/lib/task/delivery-target.js +97 -0
- package/dist/lib/task/delivery.js +153 -0
- package/dist/lib/task/events.js +297 -17
- package/dist/lib/task/finalization.js +37 -13
- package/dist/lib/task/human-override.js +61 -36
- 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/lifecycle.js +106 -9
- package/dist/lib/task/local-artifact-finalization.js +374 -0
- package/dist/lib/task/orchestration.js +100 -151
- package/dist/lib/task/pr-delivery-fact.js +183 -0
- package/dist/lib/task/review-finalization.js +4 -8
- package/dist/lib/task/review-fingerprint.js +32 -2
- package/dist/lib/task/rework-intent.js +138 -0
- package/dist/lib/task/skill-scope.js +23 -0
- package/dist/lib/task/task-execution-lock.js +27 -17
- package/dist/lib/task/verification-engine.js +89 -38
- package/dist/lib/task/verification-review.js +1 -1
- 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/update.js +9 -0
- package/dist/lib/version.js +11 -1
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-clients/adapters/codex-lifecycle/build-identity.ts +105 -10
- package/lib/agent-clients/adapters/codex-lifecycle/manifest-files.json +12 -1
- package/lib/agent-clients/next-steps.ts +6 -1
- package/lib/decide.ts +3 -3
- package/lib/defaults.json +4 -0
- package/lib/git/workflow.ts +38 -1
- package/lib/init.ts +4 -1
- package/lib/internal/git-workflow.ts +7 -1
- package/lib/internal/platform-checks.ts +3 -3
- package/lib/internal/platform-comment.ts +8 -8
- package/lib/internal/platform-context.ts +2 -2
- package/lib/internal/platform-issue.ts +7 -8
- package/lib/internal/platform-pr-review.ts +9 -9
- package/lib/internal/platform-pr.ts +53 -21
- package/lib/internal/platform-release-notes.ts +3 -3
- package/lib/internal/pr-review-grade.ts +10 -8
- package/lib/internal/release-workflow.ts +4 -4
- package/lib/internal/sandbox-control.ts +27 -3
- package/lib/internal/task-activity.ts +3 -3
- package/lib/internal/task-artifact.ts +65 -22
- package/lib/internal/task-create.ts +2 -2
- package/lib/internal/task-delivery.ts +53 -0
- package/lib/internal/task-event.ts +6 -3
- package/lib/internal/task-finalization.ts +3 -3
- package/lib/internal/task-invalidation.ts +39 -0
- package/lib/internal/task-ledger.ts +11 -8
- package/lib/internal/task-lifecycle.ts +2 -2
- package/lib/internal/task-override.ts +6 -6
- package/lib/internal/task-review.ts +3 -3
- package/lib/internal/task-verify.ts +6 -6
- package/lib/internal/task-warning.ts +3 -3
- package/lib/platform/adapters.ts +3 -2
- package/lib/platform/change-request-git-evidence.ts +36 -9
- package/lib/platform/completion-backfill.ts +9 -8
- package/lib/platform/context.ts +97 -134
- package/lib/platform/github-client.ts +10 -3
- package/lib/platform/github-provider.ts +910 -0
- package/lib/platform/in-label-sync.ts +208 -0
- package/lib/platform/issue-comments.ts +97 -47
- 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 +645 -0
- package/lib/platform/pr-checks.ts +129 -107
- package/lib/platform/pr-review.ts +88 -85
- package/lib/platform/pr-summary.ts +562 -52
- package/lib/platform/provider-bridge.ts +82 -0
- package/lib/platform/provider-contract.ts +536 -0
- package/lib/platform/provider-loader.ts +307 -0
- package/lib/platform/provider-validation.ts +529 -0
- package/lib/platform/pull-request-metadata.ts +10 -7
- package/lib/platform/pull-requests.ts +1126 -505
- package/lib/platform/release-notes.ts +76 -59
- package/lib/platform/releases.ts +77 -43
- package/lib/platform/resource-identity.ts +121 -0
- package/lib/platform/task-identities.ts +40 -0
- package/lib/platform/types.ts +4 -2
- package/lib/platform/verification-required.ts +21 -13
- package/lib/platform/verification-sync.ts +118 -293
- package/lib/pr-review/evidence-grading.ts +31 -11
- package/lib/run/index.ts +57 -22
- package/lib/sandbox/config.ts +7 -0
- package/lib/sandbox/control/client.ts +105 -15
- package/lib/sandbox/control/executor.ts +4 -4
- package/lib/sandbox/control/lifecycle.ts +30 -8
- package/lib/sandbox/control/protocol.ts +113 -0
- package/lib/sandbox/control/server.ts +431 -23
- package/lib/sandbox/control/state.ts +251 -1
- package/lib/server/process-state.ts +2 -2
- package/lib/server/protocol.ts +36 -1
- package/lib/task/activity-log.ts +8 -0
- package/lib/task/artifact-lifecycle.ts +34 -8
- package/lib/task/capabilities.ts +262 -0
- package/lib/task/commands/status.ts +38 -0
- package/lib/task/commit-intent.ts +137 -0
- package/lib/task/commit-operation.ts +186 -88
- package/lib/task/control-authority.ts +11 -8
- package/lib/task/create-service.ts +8 -8
- package/lib/task/create.ts +34 -9
- package/lib/task/current-contract.ts +6 -1
- package/lib/task/decision-details.ts +8 -64
- package/lib/task/delivery-target.ts +130 -0
- package/lib/task/delivery.ts +160 -0
- package/lib/task/events.ts +296 -16
- package/lib/task/finalization.ts +50 -14
- package/lib/task/human-override.ts +73 -46
- 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/lifecycle.ts +93 -4
- package/lib/task/local-artifact-finalization.ts +563 -0
- package/lib/task/orchestration.ts +110 -146
- package/lib/task/pr-delivery-fact.ts +237 -0
- package/lib/task/review-finalization.ts +4 -14
- package/lib/task/review-fingerprint.ts +33 -2
- package/lib/task/rework-intent.ts +165 -0
- package/lib/task/skill-scope.ts +24 -0
- package/lib/task/task-execution-lock.ts +23 -14
- package/lib/task/verification-engine.ts +95 -43
- package/lib/task/verification-review.ts +2 -0
- 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 +11 -1
- package/lib/version.ts +15 -1
- package/package.json +7 -1
- package/templates/.agents/rules/README.en.md +4 -2
- package/templates/.agents/rules/README.zh-CN.md +4 -2
- package/templates/.agents/rules/create-issue.en.md +11 -2
- package/templates/.agents/rules/create-issue.zh-CN.md +24 -2
- package/templates/.agents/rules/issue-pr-commands.en.md +4 -17
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.en.md +28 -5
- package/templates/.agents/rules/issue-sync.zh-CN.md +64 -5
- package/templates/.agents/rules/label-milestone-setup.en.md +15 -2
- package/templates/.agents/rules/label-milestone-setup.zh-CN.md +15 -2
- package/templates/.agents/rules/local-artifact-repair.en.md +53 -0
- package/templates/.agents/rules/local-artifact-repair.zh-CN.md +53 -0
- package/templates/.agents/rules/milestone-inference.en.md +12 -2
- package/templates/.agents/rules/milestone-inference.zh-CN.md +25 -3
- package/templates/.agents/rules/pr-sync.en.md +28 -13
- package/templates/.agents/rules/pr-sync.zh-CN.md +39 -5
- package/templates/.agents/rules/release-commands.en.md +42 -3
- package/templates/.agents/rules/release-commands.zh-CN.md +42 -3
- package/templates/.agents/rules/security-alerts.en.md +17 -2
- package/templates/.agents/rules/security-alerts.zh-CN.md +17 -2
- package/templates/.agents/rules/sync-content-generation.en.md +8 -0
- package/templates/.agents/rules/sync-content-generation.zh-CN.md +8 -0
- package/templates/.agents/rules/task-management.en.md +1 -1
- package/templates/.agents/rules/task-management.zh-CN.md +1 -1
- 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/scripts/security-alerts.github.sh +151 -0
- package/templates/.agents/scripts/security-alerts.sh +31 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +14 -3
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +11 -3
- 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 +32 -10
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +35 -13
- package/templates/.agents/skills/code-task/config/verify.en.json +1 -0
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/commit/SKILL.en.md +3 -3
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/config/verify.json +1 -1
- package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +3 -3
- package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/reference/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 +4 -4
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +4 -4
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +2 -2
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +7 -4
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +7 -4
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +1 -1
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +5 -4
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +5 -4
- package/templates/.agents/skills/complete-task/SKILL.en.md +31 -13
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +30 -13
- package/templates/.agents/skills/complete-task/reference/external-delivery.en.md +2 -2
- package/templates/.agents/skills/complete-task/reference/external-delivery.zh-CN.md +2 -2
- package/templates/.agents/skills/create-pr/SKILL.en.md +11 -10
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +11 -11
- 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 +1 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -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 +9 -10
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +9 -10
- package/templates/.agents/skills/init-labels/scripts/init-labels.github.sh +57 -1
- package/templates/.agents/skills/init-labels/scripts/init-labels.sh +27 -1
- package/templates/.agents/skills/init-milestones/SKILL.en.md +3 -5
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +3 -5
- package/templates/.agents/skills/plan-task/SKILL.en.md +14 -3
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +11 -3
- package/templates/.agents/skills/review-analysis/SKILL.en.md +6 -5
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +6 -5
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +18 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +18 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +10 -9
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +10 -9
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +19 -1
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +19 -1
- package/templates/.agents/skills/review-code/reference/report-template.en.md +4 -2
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +4 -2
- package/templates/.agents/skills/review-plan/SKILL.en.md +6 -5
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +6 -5
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +18 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +18 -0
- package/templates/.agents/skills/review-pr/SKILL.en.md +1 -0
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/review-pr/reference/evidence-grading.en.md +2 -2
- package/templates/.agents/skills/review-pr/reference/evidence-grading.zh-CN.md +2 -2
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +5 -2
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +5 -2
- package/templates/.agents/skills/run-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +4 -0
- package/templates/.agents/skills/watch-pr/SKILL.en.md +6 -6
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +6 -6
- 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 +23 -2
- package/templates/.agents/templates/task.zh-CN.md +23 -2
- package/templates/.agents/workflows/bug-fix.en.yaml +9 -8
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +9 -8
- package/templates/.agents/workflows/feature-development.en.yaml +9 -8
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +9 -8
- package/templates/.agents/workflows/refactoring.en.yaml +9 -8
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +9 -8
- package/templates/.github/workflows/pr-label.yml +7 -26
- package/templates/.agents/rules/create-issue.github.en.md +0 -14
- package/templates/.agents/rules/create-issue.github.zh-CN.md +0 -27
- package/templates/.agents/rules/issue-pr-commands.github.en.md +0 -34
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +0 -49
- package/templates/.agents/rules/issue-sync.github.en.md +0 -40
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +0 -76
- package/templates/.agents/rules/label-milestone-setup.github.en.md +0 -60
- package/templates/.agents/rules/label-milestone-setup.github.zh-CN.md +0 -60
- package/templates/.agents/rules/milestone-inference.github.en.md +0 -15
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +0 -27
- package/templates/.agents/rules/pr-checks-commands.github.en.md +0 -18
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +0 -34
- package/templates/.agents/rules/pr-sync.github.en.md +0 -43
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +0 -69
- package/templates/.agents/rules/release-commands.github.en.md +0 -44
- package/templates/.agents/rules/release-commands.github.zh-CN.md +0 -44
- package/templates/.agents/rules/security-alerts.github.en.md +0 -43
- package/templates/.agents/rules/security-alerts.github.zh-CN.md +0 -43
- /package/templates/.agents/rules/{issue-fields.github.en.md → issue-fields.en.md} +0 -0
- /package/templates/.agents/rules/{issue-fields.github.zh-CN.md → issue-fields.zh-CN.md} +0 -0
|
@@ -23,7 +23,7 @@ The skill still owns the security-alert API. When a related task exists, Step 7
|
|
|
23
23
|
|
|
24
24
|
### 1. Retrieve Alert Information
|
|
25
25
|
|
|
26
|
-
Read `.agents/rules/security-alerts.md` before this step, then
|
|
26
|
+
Read `.agents/rules/security-alerts.md` before this step, then run `bash .agents/scripts/security-alerts.sh read-dependabot --number {alert-number}` and parse its JSON result to fetch the alert details.
|
|
27
27
|
|
|
28
28
|
Verify that the alert is in the `open` state. If it is already dismissed or fixed, inform the user and exit.
|
|
29
29
|
|
|
@@ -77,7 +77,7 @@ Confirm? (y/N)
|
|
|
77
77
|
|
|
78
78
|
### 6. Execute the Dismissal
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Write the user's explanation to `{comment-file}`, then run `bash .agents/scripts/security-alerts.sh dismiss-dependabot --number {alert-number} --reason {api-reason} --comment-file {comment-file}`. Parse the JSON result and continue only when the dismissal is `applied` or `no-op`.
|
|
81
81
|
|
|
82
82
|
**API reason mapping**:
|
|
83
83
|
- False Positive -> `not_used` or `inaccurate`
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
### 1. 获取告警信息
|
|
25
25
|
|
|
26
|
-
执行前先读取 `.agents/rules/security-alerts.md
|
|
26
|
+
执行前先读取 `.agents/rules/security-alerts.md`,然后运行 `bash .agents/scripts/security-alerts.sh read-dependabot --number {alert-number}`,解析其 JSON 结果获取告警详情。
|
|
27
27
|
|
|
28
28
|
验证告警处于 `open` 状态。如果已被关闭/修复,告知用户并退出。
|
|
29
29
|
|
|
@@ -77,7 +77,7 @@ CVE:{cve-id}
|
|
|
77
77
|
|
|
78
78
|
### 6. 执行关闭
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
将用户说明写入 `{comment-file}`,然后运行 `bash .agents/scripts/security-alerts.sh dismiss-dependabot --number {alert-number} --reason {api-reason} --comment-file {comment-file}`。解析 JSON 结果,仅当关闭状态为 `applied` 或 `no-op` 时继续。
|
|
81
81
|
|
|
82
82
|
**API reason 映射**:
|
|
83
83
|
- 误报 -> `not_used` 或 `inaccurate`
|
|
@@ -9,17 +9,19 @@ 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
18
|
- Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
|
|
19
|
+
- Before generating task or lifecycle Markdown that will be synchronized to an Issue, read `.agents/rules/sync-content-generation.md` and apply its producer-side constraints; the sync path does not parse or rewrite the body
|
|
19
20
|
- Read `.agents/rules/compatibility-policy.md` before implementation. Implement only the compatibility budget explicitly approved by the plan; never retain old branches, result contracts, or migration shims merely to be “safe”
|
|
20
21
|
- Fix mode verifies each finding of the latest `review-code` one by one: fix it if it holds, or rebut it and record it under unresolved if it is unfounded/hallucinated; do not expand to issues the review did not list; manual-validation items are out of scope
|
|
22
|
+
- 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
|
|
21
23
|
- If implementation encounters a key design decision not covered by the plan, run `agent-infra-internal task-ledger {task-id} decision-next-id`, write the returned `HD-N` detail block per `.agents/rules/human-decision-context.md` and determine whether implementation is required, then run `decision-upsert --id {HD-N} --stage code --artifact {code-artifact} --needs-implementation {true|false}`. Do not scan ids, assemble ledger rows, ask mid-flow, or silently expand scope
|
|
22
|
-
-
|
|
24
|
+
- Do not invoke the `commit` skill or push to a remote; after tests pass, call the shared commit core with `delivery: { mode: 'local' }` to create the local checkpoint. The durable intent must close only after the checkpoint and task state sync succeed; only then emit `code.completed`
|
|
23
25
|
- Create a new code artifact for each round and never overwrite an older one
|
|
24
26
|
- After executing this skill, you **must** immediately update task.md
|
|
25
27
|
|
|
@@ -43,7 +45,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
43
45
|
|
|
44
46
|
## Step Start: Write the started Marker
|
|
45
47
|
|
|
46
|
-
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`.
|
|
48
|
+
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`.
|
|
47
49
|
|
|
48
50
|
## Steps
|
|
49
51
|
|
|
@@ -59,7 +61,7 @@ Read `reference/branch-management.md`, ensure the current branch matches the tas
|
|
|
59
61
|
|
|
60
62
|
**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`.
|
|
61
63
|
|
|
62
|
-
> If the milestone remains `X.Y.x`, step
|
|
64
|
+
> If the milestone remains `X.Y.x`, step 12 `task-verify code.completed` blocks through the typed milestone check.
|
|
63
65
|
|
|
64
66
|
### 4. Determine Mode and Round
|
|
65
67
|
|
|
@@ -103,29 +105,49 @@ Use the project test commands from the `test` skill and iterate until all requir
|
|
|
103
105
|
|
|
104
106
|
When triaging a test failure or unexpected behavior, first read `.agents/rules/debugging-guide.md` and locate the root cause via its four-phase flow; do not blindly patch and retry.
|
|
105
107
|
|
|
108
|
+
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.
|
|
109
|
+
|
|
110
|
+
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.
|
|
111
|
+
|
|
106
112
|
### 9. Write the Code Report
|
|
107
113
|
|
|
108
114
|
Create `.agents/workspace/active/{task-id}/{code-artifact}`.
|
|
109
115
|
|
|
110
116
|
> Read `reference/report-template.md` before writing the report.
|
|
111
117
|
|
|
112
|
-
### 10.
|
|
118
|
+
### 10. Pre-completion Report Gate
|
|
119
|
+
|
|
120
|
+
After writing the report and before publishing `code.completed`, read and follow `.agents/rules/local-artifact-repair.md` and run:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
finalizer=$(agent-infra-internal task-artifact {task-id} finalize-local --family code --artifact {code-artifact})
|
|
124
|
+
status=$?
|
|
125
|
+
echo "$finalizer"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- `status=0` with `finalizer.status="passed"`: bind `{artifact-sha256}` and `{semantic-digest}` from this result.
|
|
129
|
+
- `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.
|
|
130
|
+
- For any other failure, lack of progress, repeated diagnostic, or eight actual report edits, stop without publishing `code.completed`.
|
|
131
|
+
|
|
132
|
+
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.
|
|
133
|
+
|
|
134
|
+
### 11. Update Task Status
|
|
113
135
|
|
|
114
|
-
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
|
|
136
|
+
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.
|
|
115
137
|
|
|
116
|
-
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, then:
|
|
138
|
+
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`):
|
|
117
139
|
- Run `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status in-progress`
|
|
118
140
|
- Run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
119
141
|
- Run `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {code-artifact} --agent {standard-agent-token}`
|
|
120
142
|
|
|
121
|
-
###
|
|
143
|
+
### 12. Run Completion Gate
|
|
122
144
|
|
|
123
145
|
```bash
|
|
124
146
|
agent-infra-internal task-verify {task-id} code.completed --artifact {code-artifact} --format text
|
|
125
147
|
```
|
|
126
148
|
|
|
127
|
-
###
|
|
149
|
+
### 13. Tell the User
|
|
128
150
|
|
|
129
|
-
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and render the selected next-step commands through the shared helper.
|
|
151
|
+
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and render the selected next-step commands through the shared helper. Do not push, create a PR, or invoke the `commit` skill here.
|
|
130
152
|
|
|
131
153
|
> Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the "Next steps" commands as the current task's short id `NN` (see that file for lookup and fallback), while other `{task-id}` placeholders (report titles, paths) keep the full TASK-id form; (2) append the `Completed at` line as the very last line of the user-facing output (this applies to every user-facing output — success, error, and early-return paths alike, not only the success path).
|
|
@@ -9,17 +9,19 @@ 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`,修复或裁决使用 `review-finding`;started 与 completed 使用同一组值。
|
|
13
13
|
|
|
14
14
|
根据已批准的技术方案编码任务,并产出 `code.md` 或 `code-r{N}.md`。本技能支持初次实现、基于 `review-code` 反馈的修复,以及人工裁决驱动实现三种模式。
|
|
15
15
|
|
|
16
16
|
## 行为边界 / 关键规则
|
|
17
17
|
|
|
18
18
|
- 严格遵循最新方案产物:`plan.md` 或 `plan-r{N}.md`
|
|
19
|
+
- 生成会同步到 Issue 的任务或生命周期 Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;同步端不解析或改写正文
|
|
19
20
|
- 实现前读取 `.agents/rules/compatibility-policy.md`;只实现方案明确批准的兼容预算,不以“稳妥”为由保留旧分支、旧结果契约或迁移 shim
|
|
20
21
|
- 修复模式逐条核实最新 `review-code` 的发现:成立则修复,判定为不成立/幻觉则在报告中反驳并记入 unresolved;不擅自扩大到审查未列出的问题;manual-validation 项不在修复范围
|
|
22
|
+
- 实现报告在 `code.completed` 前必须通过 `task-artifact ... finalize-local --family code`;按 `.agents/rules/local-artifact-repair.md` 处理同一报告内可证明安全的最小结构修复,并只把同一次通过结果的摘要传给完成事件
|
|
21
23
|
- 实现中遇到方案未覆盖的关键设计决策时,先调用 `agent-infra-internal task-ledger {task-id} decision-next-id` 取得 `HD-N`,按 `.agents/rules/human-decision-context.md` 写入实现报告的 `## 人工裁决待办` 详情块并判断是否需要实现,再调用 `decision-upsert --id {HD-N} --stage code --artifact {code-artifact} --needs-implementation {true|false}`;不得扫描编号、手写账本行、中途提问或擅自扩范围
|
|
22
|
-
-
|
|
24
|
+
- 不调用 `commit` 技能,也不推送远端;测试通过后直接调用共享 commit core 的 `delivery: { mode: 'local' }` 创建本地 checkpoint。checkpoint 使用 durable intent,只有 checkpoint 与 task 状态同步成功后才发送 `code.completed`
|
|
23
25
|
- 每轮实现都创建新的实现产物,不覆盖旧文件
|
|
24
26
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
25
27
|
|
|
@@ -34,7 +36,7 @@ description: >
|
|
|
34
36
|
| 「代码太简单,不需要测试」 | 简单代码也会回归;没有"失败→通过"的用例就没有完成标志,先写验证业务行为的测试。 |
|
|
35
37
|
| 「先写代码再补测试更高效」 | 后补测试常沦为对实现的镜像;目标驱动应先定义可验证用例再让它通过。 |
|
|
36
38
|
| 「方案这里不合理,顺手改更好」 | 偏离 `{plan-artifact}` 必须在报告中记录原因;有异议先停下确认,不擅自改方向。 |
|
|
37
|
-
|
|
|
39
|
+
| 「测试过了,顺便推送一下」 | 本技能只创建本地 checkpoint;远端推送是 `create-pr` 的唯一边界。 |
|
|
38
40
|
| 「审查既然写了,照着改就行」 | 审查可能基于错误 `file:line` 或幻觉;动手前先 Read/Grep 核实,成立才修,不成立就反驳并记入 unresolved,不盲从。 |
|
|
39
41
|
| 「保留旧入口更稳妥,反正只多一个分支」 | 未获批准的兼容是范围扩张和长期债务;没有对象、必要性、期限和退出条件就只实现当前契约。 |
|
|
40
42
|
|
|
@@ -58,7 +60,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
58
60
|
|
|
59
61
|
## 步骤开始:声明 started 事件
|
|
60
62
|
|
|
61
|
-
确认前置条件与模式后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} code.started --agent {standard-agent-token}`。修复模式追加 `--fix-for {review-artifact}`,裁决模式追加 `--implementation-input {input-id}`。核心根据 artifact context 推导并校验轮次与输入身份;以返回的 `artifactContext` 记录本轮身份。
|
|
63
|
+
确认前置条件与模式后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} code.started --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code}`。修复模式追加 `--fix-for {review-artifact}`,裁决模式追加 `--implementation-input {input-id}`。核心根据 artifact context 推导并校验轮次与输入身份;以返回的 `artifactContext` 记录本轮身份。
|
|
62
64
|
|
|
63
65
|
## 执行步骤
|
|
64
66
|
### 1. 验证前置条件
|
|
@@ -86,7 +88,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
86
88
|
|
|
87
89
|
**必须执行,不得跳过。** 如果 task.md 中存在有效的 `issue_number`,调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --milestone specific`;里程碑推断、权限降级与幂等写入由 internal core 处理。
|
|
88
90
|
|
|
89
|
-
> 若跳过或收窄后仍为 `X.Y.x`,步骤
|
|
91
|
+
> 若跳过或收窄后仍为 `X.Y.x`,步骤 12 的 `task-verify code.completed` 会通过 typed milestone check 截停本轮。
|
|
90
92
|
|
|
91
93
|
### 4. 确定模式与轮次
|
|
92
94
|
|
|
@@ -141,6 +143,10 @@ echo "$result"
|
|
|
141
143
|
|
|
142
144
|
如果测试失败,先尝试修复并重新运行测试。只有在确认存在外部阻塞、环境缺失或需求不明确且超出任务范围时,才可以停止。
|
|
143
145
|
|
|
146
|
+
测试通过后,通过 `agent-infra-internal git-workflow commit --input {checkpoint-input}` 调用共享 commit core,输入 `delivery: { "mode": "local" }`、明确 paths、expected HEAD/tree、task ref、agent 和 code round。该调用只创建本地 checkpoint,不访问远端;core 会在 commit 前写入 durable intent,并在 task writer 成功后清理 intent。checkpoint 失败或 task 状态未闭合时,不得发送 `code.completed`。
|
|
147
|
+
|
|
148
|
+
checkpoint 成功后,若任务存在 `issue_number`,调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {delivery-base-ref}`,由 task-bound `delivery_base_ref` 产生 Issue 的 `in:` target;该同步失败时记录 warning 并停止本轮,不发送 `code.completed`。
|
|
149
|
+
|
|
144
150
|
排查测试失败或行为不符合预期时,先读取 `.agents/rules/debugging-guide.md`,按其四阶段流程定位根因,禁止盲目改代码重试。
|
|
145
151
|
|
|
146
152
|
### 9. 编写实现报告
|
|
@@ -149,22 +155,38 @@ echo "$result"
|
|
|
149
155
|
|
|
150
156
|
> 报告结构、必填章节和完整模板见 `reference/report-template.md`。写报告前先读取 `reference/report-template.md`。
|
|
151
157
|
|
|
152
|
-
### 10.
|
|
158
|
+
### 10. 报告完成前门禁
|
|
159
|
+
|
|
160
|
+
报告写入后、发布 `code.completed` 前,读取并遵循 `.agents/rules/local-artifact-repair.md`,执行:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
finalizer=$(agent-infra-internal task-artifact {task-id} finalize-local --family code --artifact {code-artifact})
|
|
164
|
+
status=$?
|
|
165
|
+
echo "$finalizer"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
- `status=0` 且 `finalizer.status="passed"`:绑定这一次返回的 `{artifact-sha256}` 和 `{semantic-digest}`。
|
|
169
|
+
- `status=1` 且返回 `repairable=true`、诊断明确为当前报告中的单行替换:确认任务、轮次、产物和 provenance 未变化后,只编辑该 `code*.md` 一次,确认字节确实变化,再完整重跑同一命令。
|
|
170
|
+
- 其他失败、无进展、诊断重复或达到 8 次实际报告编辑:停止,不发布 `code.completed`。
|
|
171
|
+
|
|
172
|
+
不得重新扫描或手工补写摘要;完成事件必须携带本次 `passed` 结果的 `--artifact-sha256 {artifact-sha256} --semantic-digest {semantic-digest}`。
|
|
173
|
+
|
|
174
|
+
### 11. 更新任务状态
|
|
153
175
|
|
|
154
176
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
155
177
|
- 审查 `## 需求` 段落,仅把本轮已由代码实现且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
|
|
156
178
|
- 产物链接、阶段与完成日志由 completed 事件统一登记
|
|
157
179
|
- 完成业务内容更新后声明完成事件:
|
|
158
|
-
- 初次实现:`agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --artifact {code-artifact} --files-modified {n} --tests-passed {n} {execution-flag}`
|
|
159
|
-
- 修复模式:`agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --artifact {code-artifact} --fix-for {review-artifact} --blockers {n} --major {n} --minor {n} --manual-validation {n} {execution-flag}`
|
|
160
|
-
- 裁决模式:`agent-infra-internal task-event {task-id} code.completed --agent {standard-agent-token} --artifact {code-artifact} --implementation-input {input-id} --files-modified {n} --tests-passed {n} {execution-flag}`
|
|
180
|
+
- 初次实现:`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}`
|
|
181
|
+
- 修复模式:`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} --fix-for {review-artifact} --blockers {n} --major {n} --minor {n} --manual-validation {n} {execution-flag}`
|
|
182
|
+
- 裁决模式:`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} --implementation-input {input-id} --files-modified {n} --tests-passed {n} {execution-flag}`
|
|
161
183
|
|
|
162
|
-
如果 task.md 中存在有效的 `issue_number
|
|
184
|
+
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(状态/评论失败按规则记录 warning;Issue `in:` evidence 同步失败不得发送 `code.completed`;边界见 `.agents/rules/issue-sync.md`):
|
|
163
185
|
- 调用 `agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status in-progress`
|
|
164
186
|
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
165
187
|
- 调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {code-artifact} --agent {standard-agent-token}`
|
|
166
188
|
|
|
167
|
-
###
|
|
189
|
+
### 12. 完成校验
|
|
168
190
|
|
|
169
191
|
运行完成校验,确认任务产物和同步状态符合规范:
|
|
170
192
|
|
|
@@ -179,7 +201,7 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
179
201
|
|
|
180
202
|
将校验输出保留在回复中作为当次验证输出。没有当次校验输出,不得声明完成。
|
|
181
203
|
|
|
182
|
-
###
|
|
204
|
+
### 13. 告知用户
|
|
183
205
|
|
|
184
206
|
> 仅在校验通过后执行本步骤。
|
|
185
207
|
|
|
@@ -197,7 +219,7 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
197
219
|
|
|
198
220
|
## 停止
|
|
199
221
|
|
|
200
|
-
|
|
222
|
+
完成检查清单后立即停止。不要在本技能中推送远端、创建 PR 或调用 `commit` 技能。
|
|
201
223
|
|
|
202
224
|
## 注意事项
|
|
203
225
|
|
|
@@ -19,9 +19,9 @@ The entry point may omit the task ref; explicit task scope accepts only `--task
|
|
|
19
19
|
|
|
20
20
|
- An explicit task-resolution failure stops the operation.
|
|
21
21
|
- Without an explicit task scope, only `TASK_CONTEXT_NOT_FOUND` may enter taskless direct mode; detached HEAD, malformed candidates, and multiple matches fail closed.
|
|
22
|
-
- If the literal `--orchestrated` is present in the business operands,
|
|
22
|
+
- If the literal `--orchestrated` is present in the business operands, fail with `ORCHESTRATED_COMMIT_REMOVED` because the standalone commit stage has been removed; otherwise use `mode=direct`. Never infer the mode from files or environment.
|
|
23
23
|
- Taskless direct mode does not read, create, or complete task intent, receipt, checkpoint, or task.md records.
|
|
24
|
-
- Task-bound direct mode does not require a delegation receipt;
|
|
24
|
+
- Task-bound direct mode does not require a delegation receipt; `code-task` calls the shared core for local checkpoints, while standalone `commit` continues to use push delivery.
|
|
25
25
|
- After resolution, use only the core-returned `taskId`; never infer task identity from the environment, branch, or filename.
|
|
26
26
|
|
|
27
27
|
## 1. Inspect local changes
|
|
@@ -71,7 +71,7 @@ Example:
|
|
|
71
71
|
}
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Taskless direct mode omits `taskRef`;
|
|
74
|
+
Taskless direct mode omits `taskRef`; direct task-bound commits use push delivery. The core owns repository/worktree mutation locking, task locking when bound, path and sensitive-file checks, staged scope, HEAD/tree, branch/ref, commit, push, protected-branch policy, warnings, and idempotency.
|
|
75
75
|
|
|
76
76
|
- Create at most one local commit for explicit changes.
|
|
77
77
|
- If there are no changes but HEAD is ahead and delivery is requested, perform push-only and do not create an empty commit.
|
|
@@ -19,9 +19,9 @@ commit core 只返回一个主结果:`committed`、`no_op`、`committed_with_w
|
|
|
19
19
|
|
|
20
20
|
- 显式 task scope 解析失败时停止。
|
|
21
21
|
- 未显式指定 task scope 时,只有 `TASK_CONTEXT_NOT_FOUND` 可进入 taskless direct;detached HEAD、损坏候选或多匹配必须 fail closed。
|
|
22
|
-
- 入口业务操作数包含字面 `--orchestrated`
|
|
22
|
+
- 入口业务操作数包含字面 `--orchestrated` 时直接失败并返回 `ORCHESTRATED_COMMIT_REMOVED`;普通入口使用 `mode=direct`,不得从 run 文件或环境推断模式。
|
|
23
23
|
- taskless direct 不读取、创建或完成 task intent、receipt、checkpoint 或 task.md 收尾记录。
|
|
24
|
-
- task-bound direct 不要求 delegation receipt;
|
|
24
|
+
- task-bound direct 不要求 delegation receipt;local checkpoint 由 `code-task` 直接调用共享 core,独立 `commit` 继续使用 push delivery。
|
|
25
25
|
- 解析成功后只使用 core 返回的 `taskId`;不得从环境、分支或文件名猜测任务身份。
|
|
26
26
|
|
|
27
27
|
## 1. 检查本地修改
|
|
@@ -71,7 +71,7 @@ agent-infra-internal git-workflow commit --input {commit-operation.json}
|
|
|
71
71
|
}
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
taskless direct 省略 `taskRef`;
|
|
74
|
+
taskless direct 省略 `taskRef`;direct task-bound commit 使用 push delivery。core 统一负责 repository/worktree mutation lock、task lock(仅 task-bound)、路径和敏感文件、staged scope、HEAD/tree、branch/ref、commit、push、保护分支、warning 和幂等校验。
|
|
75
75
|
|
|
76
76
|
- 有明确修改时最多创建一个本地 commit。
|
|
77
77
|
- 无修改但需要交付本地领先的 HEAD 时只执行 push-only,不创建空 commit。
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"expected_action_pattern": "Commit"
|
|
19
19
|
},
|
|
20
20
|
"platform-sync": {
|
|
21
|
-
"when": "
|
|
21
|
+
"when": "pr_fact_bound",
|
|
22
22
|
"expected_pr_comment_marker": "<!-- sync-pr:{task-id}:summary -->",
|
|
23
23
|
"verify_in_labels_computed": true,
|
|
24
24
|
"verify_pr_comment_last_commit_matches_head": true,
|
|
@@ -5,17 +5,17 @@ Commit, push, result mapping, and task finalization use one `commit-operation.ex
|
|
|
5
5
|
## Entry modes
|
|
6
6
|
|
|
7
7
|
- `mode=direct`: explicit user invocation is the authorization. Task-bound direct may read task facts but does not require a delegation receipt; taskless direct is allowed only for `TASK_CONTEXT_NOT_FOUND` and skips task facts, review, task lock, checkpoint, and task.md finalization.
|
|
8
|
-
- `mode=orchestrated
|
|
8
|
+
- `mode=orchestrated` is removed: standalone commit is no longer a lifecycle delegation stage. This mode returns `ORCHESTRATED_COMMIT_REMOVED` without writing Git; the code stage closes through a local checkpoint.
|
|
9
9
|
|
|
10
10
|
## Shared order
|
|
11
11
|
|
|
12
12
|
1. Acquire the repository/worktree mutation lock; task-bound execution also acquires the task lock.
|
|
13
13
|
2. Validate the repository, current branch, explicit paths, sensitive paths, staged scope, expected HEAD/tree, remote, and full heads ref.
|
|
14
|
-
3. Validate
|
|
14
|
+
3. Validate direct-mode authorization.
|
|
15
15
|
4. Create at most one local commit; with no changes, allow push-only and never create an empty commit.
|
|
16
16
|
5. Return `COMMIT_AUTOPUSH_PROTECTED_BRANCH` on protected automatic push, or `COMMIT_PUSH_FAILED` on ordinary push failure, while retaining local facts.
|
|
17
17
|
6. Return one primary result: `committed`, `no_op`, `committed_with_warnings`, `failed`, or `blocked`.
|
|
18
18
|
|
|
19
19
|
## Retry boundary
|
|
20
20
|
|
|
21
|
-
Retries reread current HEAD, worktree, branch, and remote facts. A local commit that already exists is push-only and cannot produce a second commit. Taskless retries create no task record. Orchestration owns stage completion, sealing, and consumption of receipts; direct
|
|
21
|
+
Retries reread current HEAD, worktree, branch, and remote facts. A local commit that already exists is push-only and cannot produce a second commit. Taskless retries create no task record. Orchestration owns stage completion, sealing, and consumption of receipts; direct commits never fabricate them.
|
|
@@ -5,17 +5,17 @@ commit、push、结果映射和任务收尾使用同一个 `commit-operation.exe
|
|
|
5
5
|
## 入口模式
|
|
6
6
|
|
|
7
7
|
- `mode=direct`:用户显式调用授权。task-bound direct 可读取 task facts,但不要求 delegation receipt;taskless direct 只在 `TASK_CONTEXT_NOT_FOUND` 时允许,并跳过 task facts、review、task lock、checkpoint 和 task.md 收尾。
|
|
8
|
-
- `mode=orchestrated
|
|
8
|
+
- `mode=orchestrated` 已移除:独立 commit 不再是生命周期 delegation stage;调用该模式返回 `ORCHESTRATED_COMMIT_REMOVED`,不写 Git。生命周期 code 阶段完成后由 local checkpoint 直接收口。
|
|
9
9
|
|
|
10
10
|
## 共享执行顺序
|
|
11
11
|
|
|
12
12
|
1. 获取 repository/worktree mutation lock;task-bound 额外获取 task lock。
|
|
13
13
|
2. 验证 repository、当前 branch、明确 paths、敏感路径、staged scope、expected HEAD/tree、remote 和 full heads ref。
|
|
14
|
-
3.
|
|
14
|
+
3. 完成 direct 模式授权校验。
|
|
15
15
|
4. 最多创建一个本地 commit;无修改时只允许 push-only,不创建空 commit。
|
|
16
16
|
5. `main` / `master` 自动 push 返回 `COMMIT_AUTOPUSH_PROTECTED_BRANCH` warning;普通 push 失败返回 `COMMIT_PUSH_FAILED` warning,并保留本地事实。
|
|
17
17
|
6. 返回唯一主结果:`committed`、`no_op`、`committed_with_warnings`、`failed` 或 `blocked`。
|
|
18
18
|
|
|
19
19
|
## 重试边界
|
|
20
20
|
|
|
21
|
-
重跑重新读取当前 HEAD、worktree、branch 和 remote 事实。已有本地 commit 时只补 push,不创建第二个 commit;taskless
|
|
21
|
+
重跑重新读取当前 HEAD、worktree、branch 和 remote 事实。已有本地 commit 时只补 push,不创建第二个 commit;taskless 重跑不创建任何任务记录。生命周期 receipt 的 stage completion、seal 和 consume 由 orchestration core 负责;direct commit 不伪造生命周期 receipt。
|
|
@@ -14,6 +14,8 @@ Call one declarative intent. The internal core owns diff computation, repository
|
|
|
14
14
|
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {base-branch} --requirements
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
If `--base` is supplied, it must exactly match task.md's `delivery_base_ref`; the core uses that task-bound ref as the only diff evidence and never falls back to `main` or a repository default. The `in:` target is the intersection of the `labels.in` mapping and repository labels, and unrelated labels are preserved.
|
|
18
|
+
|
|
17
19
|
## Error Handling
|
|
18
20
|
|
|
19
21
|
Treat sync failures as warnings only. Do not block an already completed `git commit`.
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --in-labels from-diff --base {base-branch} --requirements
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
`--base`(如保留)必须与 task.md 的 `delivery_base_ref` 完全一致;core 以 task-bound base 作为唯一 diff evidence,不回退到 `main` 或仓库默认分支。`in:` target 只来自 `labels.in` 映射与仓库实际 labels 的交集,并保留其他 labels。
|
|
18
|
+
|
|
17
19
|
## 错误处理
|
|
18
20
|
|
|
19
21
|
同步失败只记为警告,不阻塞已完成的 `git commit`。
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Commit-stage PR Summary Synchronization
|
|
2
2
|
|
|
3
|
-
Run only when `{task-id}` is valid and task.md has a
|
|
3
|
+
Run only when `{task-id}` is valid and task.md has a `bound/verified` `pr_delivery_fact`.
|
|
4
4
|
|
|
5
|
-
1. Run `agent-infra-internal platform-pr summary-context {task-id}
|
|
6
|
-
2. Generate the plain summary body per `.agents/rules/pr-sync.md
|
|
7
|
-
3. Run `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --result no_op`. The commit path only synchronizes an existing PR summary and neither creates nor reuses a PR, so `no_op` explicitly represents the unchanged PR identity.
|
|
5
|
+
1. Run `agent-infra-internal platform-pr summary-context {task-id}` to obtain canonical inputs and report status; rebuild a stale/missing sidecar through the `change-report` flow for the current head.
|
|
6
|
+
2. Generate the plain summary body per `.agents/rules/pr-sync.md`, with exactly one `<!-- canonical-pr-change-report -->` placeholder, and write it to a temporary file.
|
|
7
|
+
3. Run `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json --result no_op`. The commit path only synchronizes an existing PR summary and neither creates nor reuses a PR, so `no_op` explicitly represents the unchanged PR identity.
|
|
8
8
|
|
|
9
9
|
Failure records a warning but never blocks or rolls back the completed commit. `no-op` maps to `summary skipped (no diff)`.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Commit 阶段 PR 摘要同步
|
|
2
2
|
|
|
3
|
-
仅当 `{task-id}` 有效且 `task.md`
|
|
3
|
+
仅当 `{task-id}` 有效且 `task.md` 存在 `bound/verified` 的 `pr_delivery_fact` 时执行;否则跳过。
|
|
4
4
|
|
|
5
|
-
1. 调用 `agent-infra-internal platform-pr summary-context {task-id}` 获取 canonical
|
|
6
|
-
2. 按 `.agents/rules/pr-sync.md`
|
|
7
|
-
3. 调用 `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --result no_op`。commit 路径只同步已有 PR 摘要,不创建或复用 PR,因此固定使用 `no_op` 表示 PR 身份未变化。
|
|
5
|
+
1. 调用 `agent-infra-internal platform-pr summary-context {task-id}` 获取 canonical 聚合输入和报告状态;sidecar stale/missing 时先按 `change-report` 流程重建当前 head 报告。
|
|
6
|
+
2. 按 `.agents/rules/pr-sync.md` 生成只含一次 `<!-- canonical-pr-change-report -->` 的纯摘要正文并写入临时文件。
|
|
7
|
+
3. 调用 `agent-infra-internal platform-pr summary-sync {task-id} --agent {standard-agent-token} --body-file {summary-body-file} --change-report-file .agents/workspace/active/{task-id}/pr-change-report.json --result no_op`。commit 路径只同步已有 PR 摘要,不创建或复用 PR,因此固定使用 `no_op` 表示 PR 身份未变化。
|
|
8
8
|
|
|
9
9
|
同步失败只记录 warning,不阻塞或回滚已经完成的 commit。`no-op` 回传 `summary skipped (no diff)`。
|
|
@@ -58,7 +58,7 @@ Prerequisites:
|
|
|
58
58
|
- [ ] all code committed
|
|
59
59
|
- [ ] all tests passed
|
|
60
60
|
- [ ] code review approved
|
|
61
|
-
- [ ] all workflow steps completed (for the `pr_tasks` list under each yaml `commit` step, decide whether to count them by the "PR path" rule: `prFlow=required` always counts; `prFlow=disabled` never counts; when absent, exclude only if `
|
|
61
|
+
- [ ] all workflow steps completed (for the `pr_tasks` list under each yaml `commit` step, decide whether to count them by the "PR path" rule: `prFlow=required` always counts; `prFlow=disabled` never counts; when absent, exclude only if `pr_delivery_fact.state=skipped`, otherwise count)
|
|
62
62
|
|
|
63
63
|
Required next-step commands (rendered by `prFlow`):
|
|
64
64
|
|
|
@@ -115,4 +115,4 @@ Next step - code review:
|
|
|
115
115
|
{next-step-commands}
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
> Note: beyond the cases above, if `
|
|
118
|
+
> Note: beyond the cases above, if a verified bound `pr_delivery_fact` exists in `task.md`, the commit skill must sync the PR summary via `reference/pr-summary-sync.md` before entering the verification gate.
|
|
@@ -58,7 +58,7 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
58
58
|
- [ ] 所有代码都已提交
|
|
59
59
|
- [ ] 所有测试通过
|
|
60
60
|
- [ ] 代码审查已通过
|
|
61
|
-
- [ ] 所有工作流步骤已完成(对 yaml `commit` 步骤的 `pr_tasks` 列表,按「走 PR 路径」判定是否计入:`prFlow=required` 始终计入;`prFlow=disabled` 不计入;缺省下仅当 `
|
|
61
|
+
- [ ] 所有工作流步骤已完成(对 yaml `commit` 步骤的 `pr_tasks` 列表,按「走 PR 路径」判定是否计入:`prFlow=required` 始终计入;`prFlow=disabled` 不计入;缺省下仅当 `pr_delivery_fact.state=skipped` 时不计入,否则计入)
|
|
62
62
|
|
|
63
63
|
必带下一步命令(按 `prFlow` 渲染):
|
|
64
64
|
|
|
@@ -115,4 +115,4 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
115
115
|
{next-step-commands}
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
> 注意:上述场景之外,只要 `task.md`
|
|
118
|
+
> 注意:上述场景之外,只要 `task.md` 中存在 verified `pr_delivery_fact`,commit 技能必须先按 `reference/pr-summary-sync.md` 同步 PR 摘要,再进入完成校验。
|
|
@@ -9,12 +9,15 @@ description: >
|
|
|
9
9
|
# Complete Manual Validation
|
|
10
10
|
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
|
+
Lifecycle events 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` or `validation-rerun`. Reuse the same values for started and completed.
|
|
13
|
+
|
|
12
14
|
|
|
13
15
|
## Boundary / Critical Rules
|
|
14
16
|
|
|
15
17
|
- This skill closes the manual-validation status in an existing PR summary comment; it does not create a parallel ordinary validation comment.
|
|
16
18
|
- It must write `manual-validation.md` or `manual-validation-r{N}.md` so later PR summary refreshes can reuse the validation result.
|
|
17
19
|
- If the `sync-pr` summary comment is missing, fail instead of creating a partial fallback summary.
|
|
20
|
+
- Before generating manual-validation artifact Markdown that will be synced to an Issue, read `.agents/rules/sync-content-generation.md` and follow its generator-side constraints; Issue sync remains transparent and does not parse or rewrite the body.
|
|
18
21
|
- After this skill runs, update `task.md` immediately.
|
|
19
22
|
|
|
20
23
|
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
@@ -37,7 +40,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
37
40
|
|
|
38
41
|
## Step Start: Write the started Marker
|
|
39
42
|
|
|
40
|
-
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} manual-validation.started --agent {standard-agent-token}` and record the returned `artifactContext`.
|
|
43
|
+
After resolving the artifact context and before this round's first artifact action, run `agent-infra-internal task-event {task-id} manual-validation.started --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code}` and record the returned `artifactContext`.
|
|
41
44
|
|
|
42
45
|
## Steps
|
|
43
46
|
|
|
@@ -57,7 +60,7 @@ complete-manual-validation [--task <ref> | -t <ref>] [{pr-ref}] {verification-su
|
|
|
57
60
|
|
|
58
61
|
Check:
|
|
59
62
|
- `.agents/workspace/active/{task-id}/task.md`
|
|
60
|
-
- a valid PR: prefer explicit `{pr-ref}`, otherwise read `
|
|
63
|
+
- a valid PR: prefer explicit `{pr-ref}`, otherwise read verified `pr_delivery_fact.identity.number` from task.md frontmatter
|
|
61
64
|
|
|
62
65
|
Stop if the task is missing, the validation summary is missing, or no valid PR can be resolved.
|
|
63
66
|
|
|
@@ -85,7 +88,7 @@ Before this step, read `reference/report-template.md`. Create `{manual-validatio
|
|
|
85
88
|
|
|
86
89
|
### 6. Update task.md
|
|
87
90
|
|
|
88
|
-
Run `agent-infra-internal task-event {task-id} manual-validation.completed --agent {standard-agent-token} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`. The core keeps `current_step` unchanged while atomically recording the implementation-notes link, metadata, and done log.
|
|
91
|
+
Run `agent-infra-internal task-event {task-id} manual-validation.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`. The core keeps `current_step` unchanged while atomically recording the implementation-notes link, metadata, and done log.
|
|
89
92
|
|
|
90
93
|
If the task has a valid `issue_number`, run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`, then `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {manual-validation-artifact} --agent {standard-agent-token}`.
|
|
91
94
|
|
|
@@ -108,7 +111,7 @@ Report:
|
|
|
108
111
|
- Artifact path
|
|
109
112
|
- PR summary sync result
|
|
110
113
|
- Current verification output
|
|
111
|
-
- Suggested next step: enter the final closing flow and run /complete-task {task-ref}
|
|
114
|
+
- Suggested next step: enter the final closing flow and run /complete-task --task {task-ref}
|
|
112
115
|
|
|
113
116
|
Before rendering the final output, read `.agents/rules/next-step-output.md` and append `Completed at: YYYY-MM-DD HH:mm:ss` as the absolute last line.
|
|
114
117
|
|
|
@@ -9,12 +9,15 @@ description: >
|
|
|
9
9
|
# 完成人工验证
|
|
10
10
|
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
|
+
生命周期事件必须携带显式触发信息:编排调用使用 `{trigger-initiator}=orchestrator`,否则使用 `model`;`{request-id}` 是本任务与本轮产物的稳定单行标识,`{reason-code}` 使用 `user-request` 或 `validation-rerun`;started 与 completed 使用同一组值。
|
|
13
|
+
|
|
12
14
|
|
|
13
15
|
## 行为边界 / 关键规则
|
|
14
16
|
|
|
15
17
|
- 本技能用于收尾已有 PR 摘要评论中的人工校验状态,不创建并行的普通验证留言。
|
|
16
18
|
- 必须写入 `manual-validation.md` 或 `manual-validation-r{N}.md`,让后续 PR 摘要刷新可复用人工验证结果。
|
|
17
19
|
- 找不到 `sync-pr` 摘要评论时失败,不创建部分摘要兜底。
|
|
20
|
+
- 生成会同步到 Issue 的人工验证 artifact Markdown 前,先读取 `.agents/rules/sync-content-generation.md` 并遵循其中的生成端约束;Issue 同步保持透明,不解析或改写正文。
|
|
18
21
|
- 执行本技能后必须立即更新 `task.md`。
|
|
19
22
|
|
|
20
23
|
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
@@ -37,7 +40,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
37
40
|
|
|
38
41
|
## 步骤开始:声明 started 事件
|
|
39
42
|
|
|
40
|
-
确认前置条件和产物上下文后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} manual-validation.started --agent {standard-agent-token}`,并以返回的 `artifactContext` 记录本轮身份。
|
|
43
|
+
确认前置条件和产物上下文后、本轮第一个产出动作之前执行 `agent-infra-internal task-event {task-id} manual-validation.started --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code}`,并以返回的 `artifactContext` 记录本轮身份。
|
|
41
44
|
|
|
42
45
|
## 执行步骤
|
|
43
46
|
|
|
@@ -57,7 +60,7 @@ complete-manual-validation [--task <ref> | -t <ref>] [{pr-ref}] {verification-su
|
|
|
57
60
|
|
|
58
61
|
检查:
|
|
59
62
|
- `.agents/workspace/active/{task-id}/task.md`
|
|
60
|
-
- 有效 PR:优先使用显式 `{pr-ref}`,否则读取 task.md frontmatter 的 `
|
|
63
|
+
- 有效 PR:优先使用显式 `{pr-ref}`,否则读取 task.md frontmatter 的 verified `pr_delivery_fact.identity.number`
|
|
61
64
|
|
|
62
65
|
如果任务不存在、验证说明缺失,或无法解析有效 PR,立即停止。
|
|
63
66
|
|
|
@@ -85,7 +88,7 @@ complete-manual-validation [--task <ref> | -t <ref>] [{pr-ref}] {verification-su
|
|
|
85
88
|
|
|
86
89
|
### 6. 更新 task.md
|
|
87
90
|
|
|
88
|
-
执行 `agent-infra-internal task-event {task-id} manual-validation.completed --agent {standard-agent-token} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`,由核心在保持 `current_step` 不变的同时原子登记实现备注链接、时间/版本和完成日志。
|
|
91
|
+
执行 `agent-infra-internal task-event {task-id} manual-validation.completed --agent {standard-agent-token} --initiator {trigger-initiator} --request-id {request-id} --reason-code {reason-code} --artifact {manual-validation-artifact} --summary-result "{summary-result}"`,由核心在保持 `current_step` 不变的同时原子登记实现备注链接、时间/版本和完成日志。
|
|
89
92
|
|
|
90
93
|
如任务存在有效 `issue_number`,调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`,再调用 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {manual-validation-artifact} --agent {standard-agent-token}`。
|
|
91
94
|
|
|
@@ -108,7 +111,7 @@ agent-infra-internal task-verify {task-id} manual-validation.completed --artifac
|
|
|
108
111
|
- 产物路径
|
|
109
112
|
- PR 摘要同步结果
|
|
110
113
|
- 当次完成校验输出
|
|
111
|
-
- 下一步建议:进入最终收尾流程,运行 /complete-task {task-ref}
|
|
114
|
+
- 下一步建议:进入最终收尾流程,运行 /complete-task --task {task-ref}
|
|
112
115
|
|
|
113
116
|
渲染最终输出前,先读取 `.agents/rules/next-step-output.md`,并在绝对最后一行追加 `Completed at: YYYY-MM-DD HH:mm:ss`。
|
|
114
117
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"stage_scope": ["analysis", "plan", "code"]
|
|
35
35
|
},
|
|
36
36
|
"platform-sync": {
|
|
37
|
-
"when": "
|
|
37
|
+
"when": "pr_fact_bound",
|
|
38
38
|
"expected_pr_comment_marker_key": "prSummary",
|
|
39
39
|
"expected_pr_comment_required_patterns": [
|
|
40
40
|
"^### ✅ Manual Validation Passed$"
|