@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
|
@@ -39,8 +39,8 @@ After prerequisites pass and before this round's first artifact action, append a
|
|
|
39
39
|
|
|
40
40
|
Resolve the target PR number `{pr#}` and an optional `{task-id}` via these deterministic branches:
|
|
41
41
|
|
|
42
|
-
- Scenario A (argument omitted): reverse-lookup the active task from the current branch, then read its `
|
|
43
|
-
- Scenario B (omitted task ref or `--task/-t`, **task-anchored primary path**): resolve the full `{task-id}` via "Task Context Resolution" and read `.agents/workspace/active/{task-id}/task.md` for `
|
|
42
|
+
- Scenario A (argument omitted): reverse-lookup the active task from the current branch, then read its verified `pr_delivery_fact.identity.number`.
|
|
43
|
+
- Scenario B (omitted task ref or `--task/-t`, **task-anchored primary path**): resolve the full `{task-id}` via "Task Context Resolution" and read `.agents/workspace/active/{task-id}/task.md` for verified `pr_delivery_fact.identity.number` as `{pr#}`; if the fact is unbound, follow "Error Handling" to prompt running `create-pr` first, then stop.
|
|
44
44
|
- Scenario C (`--pr <number>` or a PR URL): use that PR number directly as `{pr#}`; then determine `{task-id}` via "Reverse-lookup task".
|
|
45
45
|
- Reverse-lookup task (scenarios A / C): use task context/query capabilities to find the unique active task bound to `{pr#}`. If none exists, stop and request binding first; the typed checks intent does not create a second taskless state machine.
|
|
46
46
|
|
|
@@ -48,13 +48,13 @@ Resolve the target PR number `{pr#}` and an optional `{task-id}` via these deter
|
|
|
48
48
|
|
|
49
49
|
Before running this step, read `reference/monitor-and-heal.md` and `.agents/rules/pr-checks-commands.md`.
|
|
50
50
|
|
|
51
|
-
Initialize `repairCommits=[]` and `rebaseAttempts=0`.
|
|
51
|
+
Initialize `repairCommits=[]` and `rebaseAttempts=0`. Before readiness in every round, run `platform-pr summary-context`, rebuild the task-bound `pr-change-report.json` for the authoritative PR head using the shared PR change-report contract, and refresh the single summary with a body containing one `<!-- canonical-pr-change-report -->` placeholder via `summary-sync --change-report-file ... --result no_op --strict`. `--strict` preserves report or summary refresh failures as `failed/blocked` instead of treating warnings as success. A report or summary refresh failure must not enter the ready/complete exit; use step 4. After the refresh, run `agent-infra-internal platform-checks watch {task-id} --interval-seconds 30 --deadline-seconds 1800`, then route only by `readiness.state`: `ready` to step 7, `conflicting|checks-failed` to step 3, and `pending|timed-out|cancelled` to step 4.
|
|
52
52
|
|
|
53
53
|
### 3. Self-Heal Loop
|
|
54
54
|
|
|
55
55
|
Before running this step, read the "Self-Heal Decision Tree" of `reference/monitor-and-heal.md` and "Resolve a Failing Run id and Pull Logs" of `.agents/rules/pr-checks-commands.md`.
|
|
56
56
|
|
|
57
|
-
For `checks-failed`, minimally fix a locatable code-layer failure, test, and publish through the existing commit/push intents. For `conflicting`, follow the reference's same-repository, clean-tree, head/base identity, rebase, full-test, and `git-workflow push-rebased` exact-lease flow, capped at two attempts. Append only remotely verified SHAs,
|
|
57
|
+
For `checks-failed`, minimally fix a locatable code-layer failure, test, and publish through the existing commit/push intents. For `conflicting`, follow the reference's same-repository, clean-tree, head/base identity, rebase, full-test, and `git-workflow push-rebased` exact-lease flow, capped at two attempts. Append only remotely verified SHAs; after any external push, self-heal commit, or rebase changes the head, refresh the report and summary before watching the new head again; any failed safety check goes to step 4.
|
|
58
58
|
|
|
59
59
|
### 4. Help Exit (Produce-Then-Stop)
|
|
60
60
|
|
|
@@ -74,7 +74,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
|
|
|
74
74
|
- `assigned_to`: {current agent}
|
|
75
75
|
- `updated_at`: {current time}
|
|
76
76
|
- `agent_infra_version`: per `.agents/rules/version-stamp.md`
|
|
77
|
-
- **Do not change** `
|
|
77
|
+
- **Do not change** `pr_delivery_fact` or `current_step`
|
|
78
78
|
- **Append** to `## Activity Log` (do not overwrite prior entries; `{N}` = number of existing Watch PR entries for this task + 1):
|
|
79
79
|
```
|
|
80
80
|
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N})** by {agent} — {success: PR ready, repair commits: {k} [{SHA summary}] / blocked: blocked: {summary}}
|
|
@@ -148,6 +148,6 @@ Stop immediately after the checklist. The green exit waits for the user to run `
|
|
|
148
148
|
|
|
149
149
|
## Error Handling
|
|
150
150
|
|
|
151
|
-
- Cannot locate a PR (task short id resolves but task.md has no `
|
|
151
|
+
- Cannot locate a PR (task short id resolves but task.md has no verified bound `pr_delivery_fact`, and no `--pr` was passed and the current branch has no PR): prompt "Run `create-pr` first, or specify the PR with `--pr <number>`", then stop.
|
|
152
152
|
- Platform CLI not authenticated or API unavailable: prompt that manual intervention is needed, then stop.
|
|
153
153
|
- Short-id resolution failure: pass through `task-short-id.js`'s exit code and error message; do not rewrite it.
|
|
@@ -39,8 +39,8 @@ description: >
|
|
|
39
39
|
|
|
40
40
|
按以下确定性分支解析出目标 PR 号 `{pr#}` 与可选 `{task-id}`:
|
|
41
41
|
|
|
42
|
-
- 场景 A(省略入参):从当前分支反查 active task;定位后读取其 `
|
|
43
|
-
- 场景 B(省略 task ref 或 `--task/-t`,**任务锚定主路径**):按「任务上下文解析」取得完整 `{task-id}`。读 `.agents/workspace/active/{task-id}/task.md` 取 `
|
|
42
|
+
- 场景 A(省略入参):从当前分支反查 active task;定位后读取其 verified `pr_delivery_fact.identity.number`。
|
|
43
|
+
- 场景 B(省略 task ref 或 `--task/-t`,**任务锚定主路径**):按「任务上下文解析」取得完整 `{task-id}`。读 `.agents/workspace/active/{task-id}/task.md` 取 verified `pr_delivery_fact.identity.number` 作为 `{pr#}`;fact 未绑定时按「错误处理」提示先 `create-pr`,停止。
|
|
44
44
|
- 场景 C(`--pr <number>` 或 PR URL):直接取该 PR 号为 `{pr#}`;随后按「反查任务」确定 `{task-id}`。
|
|
45
45
|
- 反查任务(场景 A / C):通过任务上下文/任务查询取得与 `{pr#}` 唯一绑定的 active task。未命中时停止并提示先绑定 PR;typed checks intent 不建立第二套无任务状态机。
|
|
46
46
|
|
|
@@ -48,13 +48,13 @@ description: >
|
|
|
48
48
|
|
|
49
49
|
执行此步骤前,先读取 `reference/monitor-and-heal.md` 与 `.agents/rules/pr-checks-commands.md`。
|
|
50
50
|
|
|
51
|
-
进入本轮时初始化 `repairCommits=[]` 与 `rebaseAttempts=0
|
|
51
|
+
进入本轮时初始化 `repairCommits=[]` 与 `rebaseAttempts=0`。每轮 readiness 前先调用 `platform-pr summary-context`,按共享 PR change-report contract 以当前权威 PR head 重建任务绑定的 `pr-change-report.json`,再用含唯一 `<!-- canonical-pr-change-report -->` 占位符的正文调用 `summary-sync --change-report-file ... --result no_op --strict` 刷新同一条摘要。`--strict` 将报告或摘要刷新失败保留为 `failed/blocked`,不得把 warning 当作成功;刷新失败时不得进入 ready/complete 出口,按步骤 4 记录阻塞。刷新完成后调用 `agent-infra-internal platform-checks watch {task-id} --interval-seconds 30 --deadline-seconds 1800`,只按结构化 `readiness.state` 分流:`ready` 进入步骤 7,`conflicting` 或 `checks-failed` 进入步骤 3,`pending|timed-out|cancelled` 进入步骤 4。
|
|
52
52
|
|
|
53
53
|
### 3. 自愈循环
|
|
54
54
|
|
|
55
55
|
执行此步骤前,先读取 `reference/monitor-and-heal.md` 的「自愈决策树」与 `.agents/rules/pr-checks-commands.md` 的「解析失败 run id 并拉日志」。
|
|
56
56
|
|
|
57
|
-
`checks-failed` 只对可定位代码层失败做最小修复和测试,再用既有 commit/push intent 发布。`conflicting` 严格执行 reference 的同仓库、干净工作树、head/base 身份、rebase、完整测试与 `git-workflow push-rebased` 精确 lease 流程;上限 2 次。仅记录远端复核成功的 SHA
|
|
57
|
+
`checks-failed` 只对可定位代码层失败做最小修复和测试,再用既有 commit/push intent 发布。`conflicting` 严格执行 reference 的同仓库、干净工作树、head/base 身份、rebase、完整测试与 `git-workflow push-rebased` 精确 lease 流程;上限 2 次。仅记录远端复核成功的 SHA;任何外部 push、自愈 commit 或 rebase 改变 head 后,先按本轮报告→摘要顺序刷新,再重新监控新 head;任一安全检查失败转步骤 4。
|
|
58
58
|
|
|
59
59
|
### 4. 求助出口(产出后停止)
|
|
60
60
|
|
|
@@ -74,7 +74,7 @@ date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
|
74
74
|
- `assigned_to`:{当前代理}
|
|
75
75
|
- `updated_at`:{当前时间}
|
|
76
76
|
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
77
|
-
- **不改** `
|
|
77
|
+
- **不改** `pr_delivery_fact` 与 `current_step`
|
|
78
78
|
- **追加**到 `## 活动日志`(不要覆盖之前的记录;`{N}` = 本任务已有 Watch PR 条目数 + 1):
|
|
79
79
|
```
|
|
80
80
|
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N})** by {agent} — {成功:PR ready, repair commits: {k} [{sha 摘要}] / 阻塞:blocked: {简述}}
|
|
@@ -148,6 +148,6 @@ agent-infra-internal task-verify {task-id} watch-pr.completed --format text
|
|
|
148
148
|
|
|
149
149
|
## 错误处理
|
|
150
150
|
|
|
151
|
-
- 无法定位 PR(任务短号命中但 task.md 无 `
|
|
151
|
+
- 无法定位 PR(任务短号命中但 task.md 无 verified bound `pr_delivery_fact`,且未传 `--pr`、当前分支也无 PR):提示「请先运行 `create-pr`,或用 `--pr <number>` 指定 PR」,停止。
|
|
152
152
|
- 平台 CLI 未认证或 API 不可用:提示需人工介入,停止。
|
|
153
153
|
- 短号解析失败:透传 `task-short-id.js` 的退出码与错误信息,不重写。
|
|
@@ -11,6 +11,12 @@ After the watch command, route by structured `readiness.state`:
|
|
|
11
11
|
- `conflicting`: the platform explicitly reports a head/base conflict → rebase healing in SKILL step 3.
|
|
12
12
|
- `pending|timed-out|cancelled`: no reliable success fact exists → SKILL step 4.
|
|
13
13
|
|
|
14
|
+
## Summary Refresh Boundary
|
|
15
|
+
|
|
16
|
+
Before readiness in every round, and after an external push, self-heal commit, or successful rebase changes the PR head, rerun `summary-context` → mechanical report and six-check precheck → `platform-pr change-report` → `summary-sync --change-report-file ... --result no_op --strict` with exactly one `<!-- canonical-pr-change-report -->` placeholder. `--strict` preserves report or summary refresh failures as `failed/blocked` so warnings cannot reach the ready/complete route. The core revalidates the sidecar against the authoritative PR snapshot, task-intent digest, and complete patch; missing, stale, invalid, bypassed, or raced publication must not continue to a ready/complete route and must enter the help exit with a warning.
|
|
17
|
+
|
|
18
|
+
When rebuilding the precheck, each of the six `rationale` fields must state the corresponding high-level finding and include at least one path, line range, and concise `detail` as evidence. `change-composition` must describe where responsibilities are concentrated; compatibility, legacy-path, redundancy, and scope checks must state their actual results separately, without reused generic boilerplate. Use the deployed skill's language for rationales and evidence details; Chinese skill deployments must use Chinese.
|
|
19
|
+
|
|
14
20
|
## Self-Heal Decision Tree
|
|
15
21
|
|
|
16
22
|
```text
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
- `conflicting`:平台明确当前 head 与 base 冲突 → SKILL 步骤 3 的 rebase 自愈。
|
|
12
12
|
- `pending|timed-out|cancelled`:mergeability/checks 未形成可靠成功事实 → SKILL 步骤 4。
|
|
13
13
|
|
|
14
|
+
## 摘要刷新边界
|
|
15
|
+
|
|
16
|
+
每轮 readiness 之前,以及外部 push、自愈 commit 或 rebase 成功改变 PR head 之后,必须重新执行 `summary-context` → 机械报告与六项 precheck → `platform-pr change-report` → 含一次 `<!-- canonical-pr-change-report -->` 的 `summary-sync --change-report-file ... --result no_op --strict`。`--strict` 将报告或摘要刷新失败保留为 `failed/blocked`,不允许 warning 穿透到 ready/complete 路由。core 以权威 PR snapshot、任务意图 digest 和完整 patch 重新校验 sidecar;报告缺失、stale、invalid、占位符绕过或发布竞态时,不得继续 ready/complete 路由,转入求助出口并登记 warning。
|
|
17
|
+
|
|
18
|
+
每轮重建 precheck 时,六项 `rationale` 都必须是对应检查的实际高层结论,并各带至少一条路径、行号和简短 `detail` 证据;`change-composition` 要说明职责集中位置,兼容、旧路径、冗余和范围检查要分别说明实际结果,禁止复用泛化套话。理由和证据详情遵循当前已部署技能的语言,中文技能必须使用中文。
|
|
19
|
+
|
|
14
20
|
## 自愈决策树
|
|
15
21
|
|
|
16
22
|
```text
|
|
@@ -13,7 +13,11 @@ start_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
|
13
13
|
target_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
14
14
|
current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
|
|
15
15
|
assigned_to: # claude | codex | antigravity | opencode | human
|
|
16
|
-
|
|
16
|
+
pr_delivery_fact: '{"version":1,"state":"unbound","reason":"initial"}'
|
|
17
|
+
delivery_remote: origin # Git remote used to deliver the task branch
|
|
18
|
+
delivery_base_ref: main # Target branch for the task PR
|
|
19
|
+
checkpoint_commit: # Most recent local checkpoint commit
|
|
20
|
+
delivery_remote_head: # Most recent successfully delivered task branch SHA
|
|
17
21
|
---
|
|
18
22
|
|
|
19
23
|
# Task: [Title]
|
|
@@ -92,7 +96,24 @@ pr_status: pending # PR status: pending (default) | created (PR crea
|
|
|
92
96
|
<!-- Workflow degradation, platform sync failures, permission gaps, and related events. Keep the header when empty. -->
|
|
93
97
|
|
|
94
98
|
| id | time | step | severity | code | status | target | message | action | resolved_at | resolution |
|
|
95
|
-
|
|
99
|
+
|----|------|------|----------|------|--------|---------|--------|-------------|------------|------------|
|
|
100
|
+
|
|
101
|
+
## Rework Intent
|
|
102
|
+
|
|
103
|
+
| intent_id | finding_id | source_artifact | source_sha256 | target | status | declared_at | consumed_at |
|
|
104
|
+
|-----------|------------|----------------|---------------|--------|--------|-------------|-------------|
|
|
105
|
+
|
|
106
|
+
## Artifact Invalidation
|
|
107
|
+
|
|
108
|
+
### Operations
|
|
109
|
+
|
|
110
|
+
| operation_id | source_family | source_artifact | source_round | source_sha256 | status | processed | total | created_at | updated_at | completed_at | error |
|
|
111
|
+
|--------------|---------------|-----------------|--------------|---------------|--------|-----------|-------|------------|------------|--------------|-------|
|
|
112
|
+
|
|
113
|
+
### Targets
|
|
114
|
+
|
|
115
|
+
| target_id | operation_id | target_kind | target_family | target_artifact | target_round | target_sha256 | status | reason_code | updated_at |
|
|
116
|
+
|-----------|--------------|-------------|---------------|-----------------|--------------|---------------|--------|-------------|------------|
|
|
96
117
|
|
|
97
118
|
## Activity Log
|
|
98
119
|
|
|
@@ -13,7 +13,11 @@ start_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
|
13
13
|
target_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
14
14
|
current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
|
|
15
15
|
assigned_to: # claude | codex | antigravity | opencode | human
|
|
16
|
-
|
|
16
|
+
pr_delivery_fact: '{"version":1,"state":"unbound","reason":"initial"}'
|
|
17
|
+
delivery_remote: origin # 任务分支交付使用的 Git remote
|
|
18
|
+
delivery_base_ref: main # 任务 PR 的目标分支
|
|
19
|
+
checkpoint_commit: # 最近一次本地 checkpoint commit
|
|
20
|
+
delivery_remote_head: # 最近一次成功交付到 remote 的任务分支 SHA
|
|
17
21
|
---
|
|
18
22
|
|
|
19
23
|
# 任务:[标题]
|
|
@@ -92,7 +96,24 @@ pr_status: pending # PR 状态:pending(默认)| created(已
|
|
|
92
96
|
<!-- 工作流降级、平台同步失败、权限不足等需要后续注意的事件写入此段。无告警时保留表头即可。 -->
|
|
93
97
|
|
|
94
98
|
| id | time | step | severity | code | status | target | message | action | resolved_at | resolution |
|
|
95
|
-
|
|
99
|
+
|----|------|------|----------|------|--------|---------|--------|-------------|------------|------------|
|
|
100
|
+
|
|
101
|
+
## 返工意图
|
|
102
|
+
|
|
103
|
+
| intent_id | finding_id | source_artifact | source_sha256 | target | status | declared_at | consumed_at |
|
|
104
|
+
|-----------|------------|----------------|---------------|--------|--------|-------------|-------------|
|
|
105
|
+
|
|
106
|
+
## 产物失效记录
|
|
107
|
+
|
|
108
|
+
### Operations
|
|
109
|
+
|
|
110
|
+
| operation_id | source_family | source_artifact | source_round | source_sha256 | status | processed | total | created_at | updated_at | completed_at | error |
|
|
111
|
+
|--------------|---------------|-----------------|--------------|---------------|--------|-----------|-------|------------|------------|--------------|-------|
|
|
112
|
+
|
|
113
|
+
### Targets
|
|
114
|
+
|
|
115
|
+
| target_id | operation_id | target_kind | target_family | target_artifact | target_round | target_sha256 | status | reason_code | updated_at |
|
|
116
|
+
|-----------|--------------|-------------|---------------|-----------------|--------------|---------------|--------|-------------|------------|
|
|
96
117
|
|
|
97
118
|
## 活动日志
|
|
98
119
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Note: whether a step's `pr_tasks` list counts toward workflow progress follows the "PR path" rule:
|
|
5
5
|
# `.agents/.airc.json:prFlow="required"` always counts; `prFlow="disabled"` never counts;
|
|
6
|
-
# when the field is absent, exclude only if task.md's `
|
|
6
|
+
# when the field is absent, exclude only if task.md's `pr_delivery_fact.state=skipped`, otherwise count
|
|
7
7
|
# (see .agents/skills/complete-task/SKILL.md).
|
|
8
8
|
|
|
9
9
|
name: bug-fix
|
|
@@ -126,6 +126,7 @@ steps:
|
|
|
126
126
|
- Add a regression test that fails without the fix
|
|
127
127
|
- Fix findings from the latest code-review artifact when in fix mode
|
|
128
128
|
- Verify existing tests still pass
|
|
129
|
+
- Create a local checkpoint commit after tests pass
|
|
129
130
|
- Ensure code follows project conventions
|
|
130
131
|
inputs:
|
|
131
132
|
- Approved fix plan
|
|
@@ -177,21 +178,21 @@ steps:
|
|
|
177
178
|
- Code review report
|
|
178
179
|
- Findings list, if any
|
|
179
180
|
|
|
180
|
-
- name:
|
|
181
|
-
description:
|
|
181
|
+
- name: delivery
|
|
182
|
+
description: Deliver the approved checkpoint as a pull request, then complete the task after merge and final gates.
|
|
182
183
|
recommended_agents:
|
|
183
184
|
- claude
|
|
184
185
|
- human
|
|
185
186
|
tasks:
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
- Move the task to completed
|
|
187
|
+
- Verify the current HEAD still equals the approved checkpoint
|
|
188
|
+
- Confirm the task-bound delivery remote and base branch remain valid
|
|
189
|
+
- Move the task to completed after PR merge and final gates
|
|
189
190
|
pr_tasks:
|
|
190
191
|
- Create a pull request with a defect-fix description
|
|
191
192
|
- Link the PR to the defect report Issue
|
|
192
193
|
inputs:
|
|
193
|
-
-
|
|
194
|
+
- Approved local checkpoint
|
|
194
195
|
- Task workspace
|
|
195
196
|
outputs:
|
|
196
|
-
- Completed task workspace under .agents/workspace/completed/
|
|
197
197
|
- Pull request (only on the PR path)
|
|
198
|
+
- Completed task workspace under .agents/workspace/completed/ after merge and final gates
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
|
|
5
5
|
# `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
|
|
6
|
-
# 字段缺省时仅当 task.md 的 `
|
|
6
|
+
# 字段缺省时仅当 task.md 的 `pr_delivery_fact.state=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
|
|
7
7
|
|
|
8
8
|
name: bug-fix
|
|
9
9
|
description: 诊断和修复缺陷的工作流。
|
|
@@ -125,6 +125,7 @@ steps:
|
|
|
125
125
|
- 添加在没有修复时会失败的回归测试
|
|
126
126
|
- 修复最新 code-review 产物中要求处理的问题(如处于修复模式)
|
|
127
127
|
- 验证现有测试仍然通过
|
|
128
|
+
- 测试通过后创建本地 checkpoint commit
|
|
128
129
|
- 确保代码遵循项目规范
|
|
129
130
|
inputs:
|
|
130
131
|
- 已通过审查的修复方案
|
|
@@ -176,21 +177,21 @@ steps:
|
|
|
176
177
|
- 代码审查报告
|
|
177
178
|
- 问题列表(如有)
|
|
178
179
|
|
|
179
|
-
- name:
|
|
180
|
-
description:
|
|
180
|
+
- name: delivery
|
|
181
|
+
description: 将已审查的 checkpoint 交付为 PR,并在合并及最终门禁通过后完成任务。
|
|
181
182
|
recommended_agents:
|
|
182
183
|
- claude
|
|
183
184
|
- human
|
|
184
185
|
tasks:
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
186
|
+
- 验证当前 HEAD 仍等于已审查的 checkpoint
|
|
187
|
+
- 确认任务绑定的交付 remote 和目标分支仍有效
|
|
188
|
+
- 在 PR 合并及最终门禁通过后将任务移至已完成
|
|
188
189
|
pr_tasks:
|
|
189
190
|
- 创建包含缺陷修复描述的拉取请求
|
|
190
191
|
- 将 PR 关联到缺陷报告 Issue
|
|
191
192
|
inputs:
|
|
192
|
-
-
|
|
193
|
+
- 已审查的本地 checkpoint
|
|
193
194
|
- 任务文件
|
|
194
195
|
outputs:
|
|
195
|
-
- 已完成的任务文件(位于 .agents/workspace/completed/)
|
|
196
196
|
- 拉取请求(仅走 PR 路径时)
|
|
197
|
+
- 已完成的任务文件(PR 合并和最终门禁通过后)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Note: whether a step's `pr_tasks` list counts toward workflow progress follows the "PR path" rule:
|
|
5
5
|
# `.agents/.airc.json:prFlow="required"` always counts; `prFlow="disabled"` never counts;
|
|
6
|
-
# when the field is absent, exclude only if task.md's `
|
|
6
|
+
# when the field is absent, exclude only if task.md's `pr_delivery_fact.state=skipped`, otherwise count
|
|
7
7
|
# (see .agents/skills/complete-task/SKILL.md).
|
|
8
8
|
|
|
9
9
|
name: feature-development
|
|
@@ -126,6 +126,7 @@ steps:
|
|
|
126
126
|
- Write unit tests
|
|
127
127
|
- Write integration tests when applicable
|
|
128
128
|
- Fix findings from the latest code-review artifact when in fix mode
|
|
129
|
+
- Create a local checkpoint commit after tests pass
|
|
129
130
|
- Ensure code follows project conventions
|
|
130
131
|
inputs:
|
|
131
132
|
- Approved technical design
|
|
@@ -177,21 +178,21 @@ steps:
|
|
|
177
178
|
- Code review report
|
|
178
179
|
- Findings to fix
|
|
179
180
|
|
|
180
|
-
- name:
|
|
181
|
-
description:
|
|
181
|
+
- name: delivery
|
|
182
|
+
description: Deliver the approved checkpoint as a pull request, then complete the task after merge and final gates.
|
|
182
183
|
recommended_agents:
|
|
183
184
|
- claude
|
|
184
185
|
- human
|
|
185
186
|
tasks:
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
- Move the task to completed
|
|
187
|
+
- Verify the current HEAD still equals the approved checkpoint
|
|
188
|
+
- Confirm the task-bound delivery remote and base branch remain valid
|
|
189
|
+
- Move the task to completed after PR merge and final gates
|
|
189
190
|
pr_tasks:
|
|
190
191
|
- Create a pull request with an appropriate description
|
|
191
192
|
- Link the PR to the related Issue
|
|
192
193
|
inputs:
|
|
193
|
-
-
|
|
194
|
+
- Approved local checkpoint
|
|
194
195
|
- Task workspace
|
|
195
196
|
outputs:
|
|
196
|
-
- Completed task workspace under .agents/workspace/completed/
|
|
197
197
|
- Pull request (only on the PR path)
|
|
198
|
+
- Completed task workspace under .agents/workspace/completed/ after merge and final gates
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
|
|
5
5
|
# `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
|
|
6
|
-
# 字段缺省时仅当 task.md 的 `
|
|
6
|
+
# 字段缺省时仅当 task.md 的 `pr_delivery_fact.state=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
|
|
7
7
|
|
|
8
8
|
name: feature-development
|
|
9
9
|
description: 开发新功能的端到端工作流。
|
|
@@ -125,6 +125,7 @@ steps:
|
|
|
125
125
|
- 编写单元测试
|
|
126
126
|
- 编写集成测试(如适用)
|
|
127
127
|
- 修复最新 code-review 产物中要求处理的问题(如处于修复模式)
|
|
128
|
+
- 测试通过后创建本地 checkpoint commit
|
|
128
129
|
- 确保代码遵循项目规范
|
|
129
130
|
inputs:
|
|
130
131
|
- 已通过审查的技术设计
|
|
@@ -176,21 +177,21 @@ steps:
|
|
|
176
177
|
- 代码审查报告
|
|
177
178
|
- 待修复问题列表
|
|
178
179
|
|
|
179
|
-
- name:
|
|
180
|
-
description:
|
|
180
|
+
- name: delivery
|
|
181
|
+
description: 将已审查的 checkpoint 交付为 PR,并在合并及最终门禁通过后完成任务。
|
|
181
182
|
recommended_agents:
|
|
182
183
|
- claude
|
|
183
184
|
- human
|
|
184
185
|
tasks:
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
186
|
+
- 验证当前 HEAD 仍等于已审查的 checkpoint
|
|
187
|
+
- 确认任务绑定的交付 remote 和目标分支仍有效
|
|
188
|
+
- 在 PR 合并及最终门禁通过后将任务移至已完成
|
|
188
189
|
pr_tasks:
|
|
189
190
|
- 创建包含适当描述的拉取请求
|
|
190
191
|
- 将 PR 关联到相关 Issue
|
|
191
192
|
inputs:
|
|
192
|
-
-
|
|
193
|
+
- 已审查的本地 checkpoint
|
|
193
194
|
- 任务文件
|
|
194
195
|
outputs:
|
|
195
|
-
- 已完成的任务文件(位于 .agents/workspace/completed/)
|
|
196
196
|
- 拉取请求(仅走 PR 路径时)
|
|
197
|
+
- 已完成的任务文件(PR 合并和最终门禁通过后)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Note: whether a step's `pr_tasks` list counts toward workflow progress follows the "PR path" rule:
|
|
5
5
|
# `.agents/.airc.json:prFlow="required"` always counts; `prFlow="disabled"` never counts;
|
|
6
|
-
# when the field is absent, exclude only if task.md's `
|
|
6
|
+
# when the field is absent, exclude only if task.md's `pr_delivery_fact.state=skipped`, otherwise count
|
|
7
7
|
# (see .agents/skills/complete-task/SKILL.md).
|
|
8
8
|
|
|
9
9
|
name: refactoring
|
|
@@ -128,6 +128,7 @@ steps:
|
|
|
128
128
|
- Verify tests after each step
|
|
129
129
|
- Fix findings from the latest code-review artifact when in fix mode
|
|
130
130
|
- Update affected docs or comments
|
|
131
|
+
- Create a local checkpoint commit after tests pass
|
|
131
132
|
- Ensure code follows project conventions
|
|
132
133
|
inputs:
|
|
133
134
|
- Approved refactoring plan
|
|
@@ -181,21 +182,21 @@ steps:
|
|
|
181
182
|
- Code review report
|
|
182
183
|
- Findings list, if any
|
|
183
184
|
|
|
184
|
-
- name:
|
|
185
|
-
description:
|
|
185
|
+
- name: delivery
|
|
186
|
+
description: Deliver the approved checkpoint as a pull request, then complete the task after merge and final gates.
|
|
186
187
|
recommended_agents:
|
|
187
188
|
- claude
|
|
188
189
|
- human
|
|
189
190
|
tasks:
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
- Move the task to completed
|
|
191
|
+
- Verify the current HEAD still equals the approved checkpoint
|
|
192
|
+
- Confirm the task-bound delivery remote and base branch remain valid
|
|
193
|
+
- Move the task to completed after PR merge and final gates
|
|
193
194
|
pr_tasks:
|
|
194
195
|
- Create a pull request with detailed changes
|
|
195
196
|
- Link the PR to the related Issue
|
|
196
197
|
inputs:
|
|
197
|
-
-
|
|
198
|
+
- Approved local checkpoint
|
|
198
199
|
- Task workspace
|
|
199
200
|
outputs:
|
|
200
|
-
- Completed task workspace under .agents/workspace/completed/
|
|
201
201
|
- Pull request (only on the PR path)
|
|
202
|
+
- Completed task workspace under .agents/workspace/completed/ after merge and final gates
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
#
|
|
4
4
|
# 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
|
|
5
5
|
# `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
|
|
6
|
-
# 字段缺省时仅当 task.md 的 `
|
|
6
|
+
# 字段缺省时仅当 task.md 的 `pr_delivery_fact.state=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
|
|
7
7
|
|
|
8
8
|
name: refactoring
|
|
9
9
|
description: 安全且结构化的代码重构工作流。
|
|
@@ -127,6 +127,7 @@ steps:
|
|
|
127
127
|
- 每步后验证测试通过
|
|
128
128
|
- 修复最新 code-review 产物中要求处理的问题(如处于修复模式)
|
|
129
129
|
- 更新受影响的文档或注释
|
|
130
|
+
- 测试通过后创建本地 checkpoint commit
|
|
130
131
|
- 确保代码遵循项目规范
|
|
131
132
|
inputs:
|
|
132
133
|
- 已通过审查的重构计划
|
|
@@ -180,21 +181,21 @@ steps:
|
|
|
180
181
|
- 代码审查报告
|
|
181
182
|
- 问题列表(如有)
|
|
182
183
|
|
|
183
|
-
- name:
|
|
184
|
-
description:
|
|
184
|
+
- name: delivery
|
|
185
|
+
description: 将已审查的 checkpoint 交付为 PR,并在合并及最终门禁通过后完成任务。
|
|
185
186
|
recommended_agents:
|
|
186
187
|
- claude
|
|
187
188
|
- human
|
|
188
189
|
tasks:
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
190
|
+
- 验证当前 HEAD 仍等于已审查的 checkpoint
|
|
191
|
+
- 确认任务绑定的交付 remote 和目标分支仍有效
|
|
192
|
+
- 在 PR 合并及最终门禁通过后将任务移至已完成
|
|
192
193
|
pr_tasks:
|
|
193
194
|
- 创建包含详细变更描述的拉取请求
|
|
194
195
|
- 将 PR 关联到相关 Issue
|
|
195
196
|
inputs:
|
|
196
|
-
-
|
|
197
|
+
- 已审查的本地 checkpoint
|
|
197
198
|
- 任务文件
|
|
198
199
|
outputs:
|
|
199
|
-
- 已完成的任务文件(位于 .agents/workspace/completed/)
|
|
200
200
|
- 拉取请求(仅走 PR 路径时)
|
|
201
|
+
- 已完成的任务文件(PR 合并和最终门禁通过后)
|
|
@@ -20,36 +20,17 @@ jobs:
|
|
|
20
20
|
- name: Checkout base branch
|
|
21
21
|
uses: actions/checkout@v7
|
|
22
22
|
|
|
23
|
+
- name: Set up Node.js
|
|
24
|
+
uses: actions/setup-node@v7
|
|
25
|
+
with:
|
|
26
|
+
node-version: 22.9.0
|
|
27
|
+
|
|
23
28
|
- name: Sync in-labels
|
|
24
29
|
env:
|
|
25
30
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
31
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--paginate --jq '.[].filename' | jq -Rn '[inputs]')
|
|
30
|
-
|
|
31
|
-
should_labels=$(jq -rn \
|
|
32
|
-
--argjson files "$changed_files" \
|
|
33
|
-
--argjson mapping "$(jq '.labels.in // {}' .agents/.airc.json)" \
|
|
34
|
-
'$mapping
|
|
35
|
-
| to_entries
|
|
36
|
-
| map(select(.value | any(. as $prefix | $files | any(startswith($prefix)))))
|
|
37
|
-
| map("in: " + .key)
|
|
38
|
-
| .[]?')
|
|
39
|
-
|
|
40
|
-
set -- \
|
|
41
|
-
--repo "$GITHUB_REPOSITORY" \
|
|
42
|
-
--pr "$PR_NUMBER" \
|
|
43
|
-
--prefix "in: "
|
|
44
|
-
|
|
45
|
-
while IFS= read -r label; do
|
|
46
|
-
[ -z "$label" ] && continue
|
|
47
|
-
set -- "$@" --target "$label"
|
|
48
|
-
done <<EOF
|
|
49
|
-
$should_labels
|
|
50
|
-
EOF
|
|
51
|
-
|
|
52
|
-
.github/scripts/sync-labels-to-set.sh "$@"
|
|
32
|
+
AGENT_INFRA_VERSION: 0.9.13-alpha.0
|
|
33
|
+
run: npm exec --yes --package="@fitlab-ai/agent-infra@$AGENT_INFRA_VERSION" -- agent-infra-internal platform-pr sync-in-labels --pr "$PR_NUMBER" --cwd "$GITHUB_WORKSPACE"
|
|
53
34
|
|
|
54
35
|
- name: Assign PR creator if unassigned
|
|
55
36
|
env:
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Issue Creation
|
|
2
|
-
|
|
3
|
-
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
4
|
-
|
|
5
|
-
After `create-task` writes task.md, create and initialize the Issue through declarative internal intents:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
|
|
9
|
-
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} --status waiting-for-triage --assignees current --milestone initial --issue-type --fields
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
The core reads only persisted task identity, title, type, description, and requirements, and reuses deterministic `ai task issue-body` rendering. It owns template selection, upstream/capabilities, duplicate prevention, POST outcome boundaries, response validation, and atomic `issue_number` binding.
|
|
13
|
-
|
|
14
|
-
`planned|applied|no-op|degraded` exit 0, `failed` exits 1, and `blocked` exits 2. Callers must not fall back to direct `gh issue` or GraphQL orchestration.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Issue 创建
|
|
2
|
-
|
|
3
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
4
|
-
|
|
5
|
-
当 `create-task` 完成本地 `task.md` 落盘后,通过声明式内部命令创建 Issue:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
agent-infra-internal platform-issue create {task-id} --agent {standard-agent-token}
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
命令只从已落盘 task.md 读取身份、标题、类型、描述与需求,并复用 `ai task issue-body` 的确定性正文渲染。它负责模板选择、upstream/capability、已有绑定检查、非幂等 POST 边界、响应身份校验及通过任务写入内核回写 `issue_number`。
|
|
12
|
-
|
|
13
|
-
创建后的初始元数据使用同一适配层同步:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
agent-infra-internal platform-issue sync {task-id} --agent {standard-agent-token} \
|
|
17
|
-
--status waiting-for-triage --assignees current --milestone initial --issue-type --fields
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## 结果处理
|
|
21
|
-
|
|
22
|
-
- `planned|applied|no-op|degraded`:exit 0;调用方按 operations 继续评论同步。
|
|
23
|
-
- `failed`:exit 1;调用方登记 `ISSUE_CREATE_FAILED` warning,不伪造绑定。
|
|
24
|
-
- `blocked`:exit 2;认证、网络或创建 outcome 不确定,调用方保留远端 identity 证据并停止盲目重试。
|
|
25
|
-
- 已绑定有效 Issue 时只验证绑定并返回 no-op,绝不重复创建。
|
|
26
|
-
|
|
27
|
-
自定义或空平台返回 no-op/degraded;调用方不得回退到直接 `gh issue` 或 GraphQL 编排。
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# PR Platform Intents
|
|
2
|
-
|
|
3
|
-
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
4
|
-
|
|
5
|
-
PR lookup, creation, binding, and metadata synchronization go through typed internal intents. Skills decide branches and write titles/bodies; they do not assemble platform commands.
|
|
6
|
-
|
|
7
|
-
## Inspect
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
agent-infra-internal platform-pr inspect {task-id}
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Create or recover
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
agent-infra-internal platform-pr create {task-id} \
|
|
17
|
-
--agent {standard-agent-token} --base {target-branch} --head {current-branch} \
|
|
18
|
-
--title-file {title-file} --body-file {body-file}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
The core performs exact upstream/head/base lookup. One match is reused, zero creates, and multiple matches fail closed. Unknown create outcomes are reconciled by exact identity. `--dry-run` returns only the plan.
|
|
22
|
-
|
|
23
|
-
## Bind and synchronize
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
agent-infra-internal platform-pr bind {task-id} --pr {pr-number} --agent {standard-agent-token}
|
|
27
|
-
|
|
28
|
-
agent-infra-internal platform-pr sync {task-id} \
|
|
29
|
-
--agent {standard-agent-token} --metadata --closing-issue
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Conflicting bindings do not change `task.md`. Metadata comes from the linked Issue, permission-bound items degrade independently, and an already-created PR is never rolled back.
|
|
33
|
-
|
|
34
|
-
Statuses `planned|applied|no-op|degraded` exit 0, `failed` exits 1, and `blocked` exits 2.
|