@fitlab-ai/agent-infra 0.9.0 → 0.9.2
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 +22 -5
- package/README.zh-CN.md +21 -5
- package/bin/cli.ts +12 -0
- package/dist/bin/cli.js +14 -0
- package/dist/bin/internal-cli.js +20 -0
- package/dist/lib/agent-client.js +163 -0
- package/dist/lib/agent-clients/adapter.js +294 -0
- package/dist/lib/agent-clients/adapters/claude-code.js +62 -0
- package/dist/lib/agent-clients/adapters/codex-sandbox.js +210 -0
- package/dist/lib/agent-clients/adapters/codex.js +54 -0
- package/dist/lib/agent-clients/adapters/gemini-cli.js +64 -0
- package/dist/lib/agent-clients/adapters/index.js +20 -0
- package/dist/lib/agent-clients/adapters/opencode.js +64 -0
- package/dist/lib/agent-clients/config.js +177 -0
- package/dist/lib/agent-clients/custom-tuis.js +99 -0
- package/dist/lib/agent-clients/invocation.js +9 -0
- package/dist/lib/agent-clients/next-steps.js +38 -0
- package/dist/lib/agent-clients/project-assets.js +45 -0
- package/dist/lib/agent-clients/reconcile.js +235 -0
- package/dist/lib/agent-clients/registry.js +72 -0
- package/dist/lib/agent-clients/schema.js +57 -0
- package/dist/lib/agent-clients/types.js +29 -0
- package/dist/lib/builtin-tuis.js +9 -14
- package/dist/lib/defaults.json +85 -73
- package/dist/lib/git/review-snapshot.js +25 -10
- package/dist/lib/git/reviewed-commit-equivalence.js +110 -0
- package/dist/lib/init.js +47 -91
- package/dist/lib/internal/agent-client.js +117 -0
- package/dist/lib/internal/git-workflow.js +1 -1
- package/dist/lib/internal/platform-release-notes.js +53 -0
- package/dist/lib/internal/release-workflow.js +175 -17
- package/dist/lib/internal/task-orchestration.js +151 -0
- package/dist/lib/internal/task-review.js +65 -0
- package/dist/lib/merge.js +2 -1
- package/dist/lib/platform/adapters.js +38 -1
- package/dist/lib/platform/change-request-git-evidence.js +113 -0
- package/dist/lib/platform/github-release-notes.js +96 -0
- package/dist/lib/platform/issues.js +4 -2
- package/dist/lib/platform/merged-pr-equivalence.js +84 -0
- package/dist/lib/platform/pr-checks.js +43 -15
- package/dist/lib/platform/pull-requests.js +113 -7
- package/dist/lib/platform/release-notes.js +143 -0
- package/dist/lib/platform/releases.js +1 -1
- package/dist/lib/platform/verification-required.js +31 -9
- package/dist/lib/prompt.js +15 -3
- package/dist/lib/release/channels.js +4 -1
- package/dist/lib/release/workflow.js +4 -2
- package/dist/lib/remove-dir.js +25 -0
- package/dist/lib/run/tui.js +8 -2
- package/dist/lib/sandbox/agent-client-reconciler.js +234 -0
- package/dist/lib/sandbox/build-proxy.js +63 -0
- package/dist/lib/sandbox/clipboard/linux.js +2 -1
- package/dist/lib/sandbox/commands/create.js +133 -189
- package/dist/lib/sandbox/commands/enter.js +17 -1
- package/dist/lib/sandbox/commands/prune.js +2 -2
- package/dist/lib/sandbox/commands/rebuild.js +24 -7
- package/dist/lib/sandbox/commands/rm.js +3 -2
- package/dist/lib/sandbox/config.js +21 -4
- package/dist/lib/sandbox/constants.js +3 -0
- package/dist/lib/sandbox/dockerfile.js +2 -1
- package/dist/lib/sandbox/image-build.js +2 -1
- package/dist/lib/sandbox/managed-fs.js +10 -5
- package/dist/lib/sandbox/recovery.js +52 -36
- package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +24 -3
- package/dist/lib/sandbox/runtimes/base.dockerfile +8 -1
- package/dist/lib/sandbox/runtimes/java17.dockerfile +8 -1
- package/dist/lib/sandbox/runtimes/java21.dockerfile +8 -1
- package/dist/lib/sandbox/runtimes/node20.dockerfile +8 -1
- package/dist/lib/sandbox/runtimes/node22.dockerfile +8 -1
- package/dist/lib/sandbox/runtimes/python3.dockerfile +8 -1
- package/dist/lib/sandbox/shell.js +3 -2
- package/dist/lib/sandbox/tool-types.js +8 -0
- package/dist/lib/sandbox/tools.js +2 -126
- package/dist/lib/task/artifact-lifecycle.js +1 -49
- package/dist/lib/task/commands/decisions.js +50 -20
- package/dist/lib/task/commands/issue-body.js +10 -5
- package/dist/lib/task/delegation-receipts.js +107 -0
- package/dist/lib/task/events.js +101 -2
- package/dist/lib/task/issue-form.js +2 -0
- package/dist/lib/task/orchestration.js +420 -0
- package/dist/lib/task/review-artifacts.js +143 -59
- package/dist/lib/task/review-finalization.js +166 -0
- package/dist/lib/task/review-fingerprint.js +13 -0
- package/dist/lib/task/verification-checks.js +2 -1
- package/dist/lib/task/verification-engine.js +168 -23
- package/dist/lib/task/verification-review.js +1 -1
- package/dist/lib/task/verification.js +4 -2
- package/dist/lib/task/workspace-snapshot.js +34 -0
- package/dist/lib/update.js +42 -161
- package/lib/agent-client.ts +214 -0
- package/lib/agent-clients/adapter.ts +461 -0
- package/lib/agent-clients/adapters/claude-code.ts +70 -0
- package/lib/agent-clients/adapters/codex-sandbox.ts +245 -0
- package/lib/agent-clients/adapters/codex.ts +58 -0
- package/lib/agent-clients/adapters/gemini-cli.ts +65 -0
- package/lib/agent-clients/adapters/index.ts +27 -0
- package/lib/agent-clients/adapters/opencode.ts +66 -0
- package/lib/agent-clients/config.ts +278 -0
- package/lib/agent-clients/custom-tuis.ts +149 -0
- package/lib/agent-clients/invocation.ts +19 -0
- package/lib/agent-clients/next-steps.ts +72 -0
- package/lib/agent-clients/project-assets.ts +96 -0
- package/lib/agent-clients/reconcile.ts +324 -0
- package/lib/agent-clients/registry.ts +144 -0
- package/lib/agent-clients/schema.ts +62 -0
- package/lib/agent-clients/types.ts +78 -0
- package/lib/benchmark/schemas/v1.0.0/case-manifest.schema.json +120 -0
- package/lib/benchmark/schemas/v1.0.0/common.schema.json +109 -0
- package/lib/benchmark/schemas/v1.0.0/grader-result.schema.json +160 -0
- package/lib/benchmark/schemas/v1.0.0/run-manifest.schema.json +122 -0
- package/lib/benchmark/schemas/v1.0.0/subject.schema.json +227 -0
- package/lib/builtin-tuis.ts +16 -15
- package/lib/defaults.json +24 -12
- package/lib/git/review-snapshot.ts +39 -9
- package/lib/git/reviewed-commit-equivalence.ts +135 -0
- package/lib/init.ts +53 -121
- package/lib/internal/agent-client.ts +131 -0
- package/lib/internal/git-workflow.ts +1 -1
- package/lib/internal/platform-release-notes.ts +55 -0
- package/lib/internal/release-workflow.ts +172 -18
- package/lib/internal/task-orchestration.ts +132 -0
- package/lib/internal/task-review.ts +65 -0
- package/lib/merge.ts +2 -1
- package/lib/platform/adapters.ts +142 -3
- package/lib/platform/change-request-git-evidence.ts +159 -0
- package/lib/platform/github-release-notes.ts +132 -0
- package/lib/platform/issues.ts +6 -4
- package/lib/platform/merged-pr-equivalence.ts +107 -0
- package/lib/platform/pr-checks.ts +57 -28
- package/lib/platform/pull-requests.ts +140 -25
- package/lib/platform/release-notes.ts +167 -0
- package/lib/platform/releases.ts +1 -1
- package/lib/platform/verification-required.ts +37 -9
- package/lib/prompt.ts +16 -3
- package/lib/release/channels.ts +4 -1
- package/lib/release/workflow.ts +4 -3
- package/lib/remove-dir.ts +28 -0
- package/lib/run/tui.ts +9 -1
- package/lib/sandbox/agent-client-reconciler.ts +378 -0
- package/lib/sandbox/build-proxy.ts +94 -0
- package/lib/sandbox/clipboard/linux.ts +2 -1
- package/lib/sandbox/commands/create.ts +188 -203
- package/lib/sandbox/commands/enter.ts +23 -1
- package/lib/sandbox/commands/prune.ts +2 -2
- package/lib/sandbox/commands/rebuild.ts +29 -7
- package/lib/sandbox/commands/rm.ts +3 -2
- package/lib/sandbox/config.ts +31 -4
- package/lib/sandbox/constants.ts +6 -0
- package/lib/sandbox/dockerfile.ts +2 -1
- package/lib/sandbox/image-build.ts +4 -1
- package/lib/sandbox/managed-fs.ts +18 -5
- package/lib/sandbox/recovery.ts +98 -67
- package/lib/sandbox/runtimes/ai-tools.dockerfile +24 -3
- package/lib/sandbox/runtimes/base.dockerfile +8 -1
- package/lib/sandbox/runtimes/java17.dockerfile +8 -1
- package/lib/sandbox/runtimes/java21.dockerfile +8 -1
- package/lib/sandbox/runtimes/node20.dockerfile +8 -1
- package/lib/sandbox/runtimes/node22.dockerfile +8 -1
- package/lib/sandbox/runtimes/python3.dockerfile +8 -1
- package/lib/sandbox/shell.ts +4 -2
- package/lib/sandbox/tool-types.ts +143 -0
- package/lib/sandbox/tools.ts +5 -157
- package/lib/task/artifact-lifecycle.ts +1 -38
- package/lib/task/commands/decisions.ts +53 -20
- package/lib/task/commands/issue-body.ts +10 -5
- package/lib/task/delegation-receipts.ts +170 -0
- package/lib/task/events.ts +111 -3
- package/lib/task/issue-form.ts +4 -0
- package/lib/task/orchestration.ts +543 -0
- package/lib/task/review-artifacts.ts +201 -69
- package/lib/task/review-finalization.ts +275 -0
- package/lib/task/review-fingerprint.ts +15 -1
- package/lib/task/verification-checks.ts +2 -1
- package/lib/task/verification-engine.ts +190 -25
- package/lib/task/verification-review.ts +2 -0
- package/lib/task/verification.ts +6 -3
- package/lib/task/workspace-snapshot.ts +36 -0
- package/lib/update.ts +48 -184
- package/package.json +2 -2
- package/templates/.agents/README.en.md +21 -20
- package/templates/.agents/README.zh-CN.md +21 -20
- package/templates/.agents/hooks/lifecycle-delegation.js +64 -0
- package/templates/.agents/rules/README.en.md +2 -0
- package/templates/.agents/rules/README.zh-CN.md +2 -0
- package/templates/.agents/rules/commit-and-pr.en.md +1 -0
- package/templates/.agents/rules/commit-and-pr.zh-CN.md +1 -0
- package/templates/.agents/rules/human-decision-context.en.md +14 -12
- package/templates/.agents/rules/human-decision-context.zh-CN.md +14 -12
- package/templates/.agents/rules/lifecycle-orchestration.en.md +21 -0
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +21 -0
- package/templates/.agents/rules/next-step-output.en.md +16 -0
- package/templates/.agents/rules/next-step-output.zh-CN.md +16 -0
- package/templates/.agents/rules/no-mid-flow-questions.en.md +2 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +2 -0
- package/templates/.agents/rules/release-commands.en.md +2 -2
- package/templates/.agents/rules/release-commands.github.en.md +15 -39
- package/templates/.agents/rules/release-commands.github.zh-CN.md +14 -38
- package/templates/.agents/rules/release-commands.zh-CN.md +2 -2
- package/templates/.agents/rules/review-handshake.en.md +4 -3
- package/templates/.agents/rules/review-handshake.zh-CN.md +4 -3
- package/templates/.agents/rules/review-method.en.md +113 -0
- package/templates/.agents/rules/review-method.zh-CN.md +98 -0
- package/templates/.agents/rules/testing-discipline.en.md +20 -2
- package/templates/.agents/rules/testing-discipline.zh-CN.md +20 -2
- package/templates/.agents/skills/analyze-task/SKILL.en.md +9 -6
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +9 -6
- package/templates/.agents/skills/block-task/SKILL.en.md +4 -4
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/cancel-task/SKILL.en.md +4 -4
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/check-task/SKILL.en.md +16 -16
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +16 -16
- package/templates/.agents/skills/close-codescan/SKILL.en.md +4 -4
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +4 -4
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/code-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +14 -16
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +14 -16
- package/templates/.agents/skills/code-task/reference/output-template.en.md +3 -3
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/SKILL.en.md +11 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +11 -1
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +24 -28
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +24 -28
- package/templates/.agents/skills/complete-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/complete-task/config/verify.en.json +0 -1
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +0 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +10 -10
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +10 -10
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +3 -3
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +3 -3
- package/templates/.agents/skills/create-release-note/SKILL.en.md +17 -38
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +16 -37
- package/templates/.agents/skills/create-task/SKILL.en.md +15 -11
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +15 -11
- package/templates/.agents/skills/create-task/reference/context-capture.en.md +29 -0
- package/templates/.agents/skills/create-task/reference/context-capture.zh-CN.md +29 -0
- package/templates/.agents/skills/import-codescan/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-issue/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/init-labels/SKILL.en.md +4 -4
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/init-milestones/SKILL.en.md +4 -4
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/plan-task/SKILL.en.md +5 -5
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/refine-title/SKILL.en.md +1 -1
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/release/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +13 -2
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +14 -3
- package/templates/.agents/skills/review-analysis/config/verify.en.json +6 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +6 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +13 -15
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +13 -15
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +51 -5
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +52 -6
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +25 -22
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +25 -22
- package/templates/.agents/skills/review-code/SKILL.en.md +28 -8
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +28 -8
- package/templates/.agents/skills/review-code/config/verify.en.json +7 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +7 -0
- package/templates/.agents/skills/review-code/reference/concurrency-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/concurrency-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-code/reference/cross-platform-risks.en.md +27 -0
- package/templates/.agents/skills/review-code/reference/cross-platform-risks.zh-CN.md +27 -0
- package/templates/.agents/skills/review-code/reference/documentation-antipatterns.en.md +13 -0
- package/templates/.agents/skills/review-code/reference/documentation-antipatterns.zh-CN.md +13 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +22 -24
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +22 -24
- package/templates/.agents/skills/review-code/reference/report-template.en.md +54 -7
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +54 -7
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +29 -24
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +29 -24
- package/templates/.agents/skills/review-code/reference/security-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/security-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +13 -2
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +14 -3
- package/templates/.agents/skills/review-plan/config/verify.en.json +6 -0
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +6 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +13 -15
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +13 -15
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +61 -5
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +61 -5
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +21 -24
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +21 -24
- package/templates/.agents/skills/run-task/SKILL.en.md +22 -0
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +22 -0
- package/templates/.agents/skills/run-task/config/verify.en.json +9 -0
- package/templates/.agents/skills/run-task/config/verify.zh-CN.json +9 -0
- package/templates/.agents/skills/test/SKILL.en.md +4 -4
- package/templates/.agents/skills/test/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/test-integration/SKILL.en.md +4 -4
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +5 -5
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +647 -203
- package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +4 -4
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/watch-pr/SKILL.en.md +8 -8
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +8 -8
- package/templates/.agents/templates/task.en.md +18 -0
- package/templates/.agents/templates/task.zh-CN.md +18 -0
- package/templates/.claude/agents/agent-infra-lifecycle-executor.en.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-executor.zh-CN.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-reviewer.en.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-reviewer.zh-CN.md +6 -0
- package/templates/.claude/commands/run-task.en.md +8 -0
- package/templates/.claude/commands/run-task.zh-CN.md +8 -0
- package/templates/.claude/settings.json +24 -0
- package/templates/.codex/agents/agent-infra-lifecycle-executor.en.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-executor.zh-CN.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-reviewer.en.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-reviewer.zh-CN.toml +3 -0
- package/templates/.gemini/commands/_project_/run-task.en.toml +8 -0
- package/templates/.gemini/commands/_project_/run-task.zh-CN.toml +8 -0
- package/templates/.opencode/commands/run-task.en.md +11 -0
- package/templates/.opencode/commands/run-task.zh-CN.md +11 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
When reporting that implementation is complete, use the following standard format:
|
|
4
4
|
|
|
5
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}`.
|
|
6
|
+
|
|
5
7
|
```text
|
|
6
8
|
Task {task-id} code implementation complete.
|
|
7
9
|
|
|
@@ -14,7 +16,5 @@ Output files:
|
|
|
14
16
|
- Code report: .agents/workspace/active/{task-id}/{code-artifact}
|
|
15
17
|
|
|
16
18
|
Next step - code review:
|
|
17
|
-
|
|
18
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
19
|
-
- Codex CLI: $review-code {task-ref}
|
|
19
|
+
{next-step-commands}
|
|
20
20
|
```
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
向用户汇报实现完成时,使用以下标准格式:
|
|
4
4
|
|
|
5
|
+
使用 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
6
|
+
|
|
5
7
|
```text
|
|
6
8
|
任务 {task-id} 实现完成。
|
|
7
9
|
|
|
@@ -14,7 +16,5 @@
|
|
|
14
16
|
- 实现报告:.agents/workspace/active/{task-id}/{code-artifact}
|
|
15
17
|
|
|
16
18
|
下一步 - 代码审查:
|
|
17
|
-
|
|
18
|
-
- Gemini CLI:/{{project}}:review-code {task-ref}
|
|
19
|
-
- Codex CLI:$review-code {task-ref}
|
|
19
|
+
{next-step-commands}
|
|
20
20
|
```
|
|
@@ -11,6 +11,8 @@ Create a Git commit without overwriting user work and update the related task st
|
|
|
11
11
|
|
|
12
12
|
When updating related `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
13
13
|
|
|
14
|
+
Direct invocation still requires explicit user authorization. For an active orchestration run, only its unconsumed one-use `commitAuthorization` is equivalent authorization for this round; orchestration core must consume it after success, and every other commit gate remains unchanged.
|
|
15
|
+
|
|
14
16
|
## Common Rationalizations and Rebuttals
|
|
15
17
|
|
|
16
18
|
| Rationalization | Rebuttal |
|
|
@@ -98,7 +100,7 @@ date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
|
98
100
|
|
|
99
101
|
> The full five-case status matrix, prerequisite checks, and multi-TUI next-step commands live in `reference/task-status-update.md`. Read `reference/task-status-update.md` before updating task state.
|
|
100
102
|
|
|
101
|
-
>
|
|
103
|
+
> Before rendering next steps, read `.agents/rules/next-step-output.md` and invoke the shared helper for the scenario selected from `reference/task-status-update.md`.
|
|
102
104
|
|
|
103
105
|
Append the Commit Activity Log entry and choose exactly one next-step case:
|
|
104
106
|
- open PR and successful push -> `watch-pr {task-ref}`; this takes precedence over the final-commit `prFlow` route
|
|
@@ -142,6 +144,14 @@ Handle the result as follows:
|
|
|
142
144
|
|
|
143
145
|
Keep the gate output in your reply as fresh evidence. Do not claim completion without output from this run.
|
|
144
146
|
|
|
147
|
+
After the gate passes, declare the orchestrated commit stage complete. This command is a no-op when no active orchestration run exists, so the direct commit path remains unchanged:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
agent-infra-internal task-orchestration {task-id} stage-completed --agent {agent}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Stop if the command fails; a run without the full receipt lifecycle must not be marked completed.
|
|
154
|
+
|
|
145
155
|
## Notes
|
|
146
156
|
|
|
147
157
|
- Never commit secrets such as `.env`, credentials, or keys
|
|
@@ -11,6 +11,8 @@ description: >
|
|
|
11
11
|
|
|
12
12
|
更新关联 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
13
13
|
|
|
14
|
+
直接调用仍要求用户显式授权。若存在 active orchestration run,只有未消费的一次性 `commitAuthorization` 可作为本轮等价授权;提交成功后必须由 orchestration core 消费,其他提交门禁保持不变。
|
|
15
|
+
|
|
14
16
|
## 常见违规借口与反驳
|
|
15
17
|
|
|
16
18
|
| 借口 | 反驳 |
|
|
@@ -98,7 +100,7 @@ date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
|
98
100
|
|
|
99
101
|
> 完整的 5 种状态分支、前置条件检查和多 TUI 下一步命令见 `reference/task-status-update.md`。更新任务状态前,先读取 `reference/task-status-update.md`。
|
|
100
102
|
|
|
101
|
-
>
|
|
103
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,并按 `reference/task-status-update.md` 的已选场景调用统一 helper。
|
|
102
104
|
|
|
103
105
|
追加 Commit 的 Activity Log,并且只能选择一个下一步分支:
|
|
104
106
|
- 已有开放 PR 且 push 成功 -> `watch-pr {task-ref}`;该分支优先于最终提交的 `prFlow` 路由
|
|
@@ -142,6 +144,14 @@ agent-infra-internal task-verify {task-id} commit.completed --format text
|
|
|
142
144
|
|
|
143
145
|
将校验输出保留在回复中作为当次验证输出。没有当次校验输出,不得声明完成。
|
|
144
146
|
|
|
147
|
+
校验通过后,声明编排中的 commit 阶段已完成;无 active orchestration run 时该命令为 no-op,不改变直接提交路径:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
agent-infra-internal task-orchestration {task-id} stage-completed --agent {agent}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
命令失败时停止,不得把缺少完整 receipt 生命周期的 run 标记为完成。
|
|
154
|
+
|
|
145
155
|
## 注意事项
|
|
146
156
|
|
|
147
157
|
- 不要提交 `.env`、凭据、密钥等敏感文件
|
|
@@ -30,11 +30,11 @@ This field is the only baseline for the `complete-task` `post-review-commit` gat
|
|
|
30
30
|
|
|
31
31
|
After a new commit or the restricted push-only path is successfully pushed to an existing open PR, the only next step is to watch required checks for the new head:
|
|
32
32
|
|
|
33
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}`.
|
|
34
|
+
|
|
33
35
|
```text
|
|
34
36
|
Next step - watch PR checks:
|
|
35
|
-
|
|
36
|
-
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
37
|
-
- Codex CLI: $watch-pr {task-ref}
|
|
37
|
+
{next-step-commands}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
If push fails, keep the task active and preserve local HEAD; show diagnostics and manual push guidance only, never `watch-pr` or `complete-task`. This scenario takes precedence over the final `prFlow` route below.
|
|
@@ -50,20 +50,20 @@ This scenario ends the run before `git commit` and does not enter the successful
|
|
|
50
50
|
|
|
51
51
|
Full re-review commands:
|
|
52
52
|
|
|
53
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}`.
|
|
54
|
+
|
|
53
55
|
```text
|
|
54
56
|
Next step - re-run code review:
|
|
55
|
-
|
|
56
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
57
|
-
- Codex CLI: $review-code {task-ref}
|
|
57
|
+
{next-step-commands}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Full staging-only retry commands:
|
|
61
61
|
|
|
62
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}`.
|
|
63
|
+
|
|
62
64
|
```text
|
|
63
65
|
Next step - fix staging and retry commit:
|
|
64
|
-
|
|
65
|
-
- Gemini CLI: /{{project}}:commit {task-ref}
|
|
66
|
-
- Codex CLI: $commit {task-ref}
|
|
66
|
+
{next-step-commands}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Before selecting the next step, verify:
|
|
@@ -97,34 +97,30 @@ Required next-step commands (rendered by `prFlow`):
|
|
|
97
97
|
|
|
98
98
|
`prFlow="disabled"` -> single option "complete directly":
|
|
99
99
|
|
|
100
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
101
|
+
|
|
100
102
|
```text
|
|
101
103
|
Next step - complete and archive the task:
|
|
102
|
-
|
|
103
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
104
|
-
- Codex CLI: $complete-task {task-ref}
|
|
104
|
+
{next-step-commands}
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
`prFlow="required"` -> single option "go through the PR flow":
|
|
108
108
|
|
|
109
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`.
|
|
110
|
+
|
|
109
111
|
```text
|
|
110
112
|
Next step - create Pull Request:
|
|
111
|
-
|
|
112
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
113
|
-
- Codex CLI: $create-pr {task-ref}
|
|
113
|
+
{next-step-commands}
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
field absent ->
|
|
116
|
+
field absent -> choose one path, then invoke the helper exactly once:
|
|
117
|
+
|
|
118
|
+
- PR flow: `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`
|
|
119
|
+
- Complete directly: `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`
|
|
117
120
|
|
|
118
121
|
```text
|
|
119
|
-
Next step -
|
|
120
|
-
|
|
121
|
-
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
122
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
123
|
-
- Codex CLI: $create-pr {task-ref}
|
|
124
|
-
- Complete directly (no PR):
|
|
125
|
-
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
126
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
127
|
-
- Codex CLI: $complete-task {task-ref}
|
|
122
|
+
Next step - {selected path}:
|
|
123
|
+
{next-step-commands}
|
|
128
124
|
```
|
|
129
125
|
|
|
130
126
|
### Case 2: More Work Remains
|
|
@@ -145,11 +141,11 @@ If this commit hands work over to code review:
|
|
|
145
141
|
|
|
146
142
|
Required next-step commands:
|
|
147
143
|
|
|
144
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}`.
|
|
145
|
+
|
|
148
146
|
```text
|
|
149
147
|
Next step - code review:
|
|
150
|
-
|
|
151
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
152
|
-
- Codex CLI: $review-code {task-ref}
|
|
148
|
+
{next-step-commands}
|
|
153
149
|
```
|
|
154
150
|
|
|
155
151
|
> Note: beyond the cases above, if `task.md` contains a valid `pr_number`, the commit skill must sync the PR summary via `reference/pr-summary-sync.md` before entering the verification gate.
|
|
@@ -30,11 +30,11 @@ last_reviewed_commit: {new_head}
|
|
|
30
30
|
|
|
31
31
|
新 commit 或受限 push-only 场景成功推送到已有开放 PR 后,唯一下一步是监控新 head 的 required checks:
|
|
32
32
|
|
|
33
|
+
使用 `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
34
|
+
|
|
33
35
|
```text
|
|
34
36
|
下一步 - 监控 PR 检查:
|
|
35
|
-
|
|
36
|
-
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
37
|
-
- Codex CLI: $watch-pr {task-ref}
|
|
37
|
+
{next-step-commands}
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推送提示;不得渲染 `watch-pr` 或 `complete-task`。该场景优先于下方 `prFlow` 终态路由。
|
|
@@ -50,20 +50,20 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
50
50
|
|
|
51
51
|
重新审查的完整命令:
|
|
52
52
|
|
|
53
|
+
使用 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
54
|
+
|
|
53
55
|
```text
|
|
54
56
|
下一步 - 重新代码审查:
|
|
55
|
-
|
|
56
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
57
|
-
- Codex CLI: $review-code {task-ref}
|
|
57
|
+
{next-step-commands}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
仅修正暂存的完整命令:
|
|
61
61
|
|
|
62
|
+
使用 `agent-infra-internal agent-client next-steps --skill commit --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
63
|
+
|
|
62
64
|
```text
|
|
63
65
|
下一步 - 修正暂存后重新提交:
|
|
64
|
-
|
|
65
|
-
- Gemini CLI: /{{project}}:commit {task-ref}
|
|
66
|
-
- Codex CLI: $commit {task-ref}
|
|
66
|
+
{next-step-commands}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
在决定下一步之前,先确认:
|
|
@@ -97,34 +97,30 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
97
97
|
|
|
98
98
|
`prFlow="disabled"` → 单选「直接完成」:
|
|
99
99
|
|
|
100
|
+
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
101
|
+
|
|
100
102
|
```text
|
|
101
103
|
下一步 - 完成并归档任务:
|
|
102
|
-
|
|
103
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
104
|
-
- Codex CLI: $complete-task {task-ref}
|
|
104
|
+
{next-step-commands}
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
`prFlow="required"` → 单选「走 PR 流程」:
|
|
108
108
|
|
|
109
|
+
使用 `agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
110
|
+
|
|
109
111
|
```text
|
|
110
112
|
下一步 - 创建 Pull Request:
|
|
111
|
-
|
|
112
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
113
|
-
- Codex CLI: $create-pr {task-ref}
|
|
113
|
+
{next-step-commands}
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
字段缺省 →
|
|
116
|
+
字段缺省 → 二选一。选定路径后只运行一次 helper:
|
|
117
|
+
|
|
118
|
+
- 走 PR 流程:`agent-infra-internal agent-client next-steps --skill create-pr --task-ref {task-ref}`
|
|
119
|
+
- 直接完成:`agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`
|
|
117
120
|
|
|
118
121
|
```text
|
|
119
|
-
下一步 -
|
|
120
|
-
|
|
121
|
-
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
122
|
-
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
123
|
-
- Codex CLI: $create-pr {task-ref}
|
|
124
|
-
- 直接完成(无 PR):
|
|
125
|
-
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
126
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
127
|
-
- Codex CLI: $complete-task {task-ref}
|
|
122
|
+
下一步 - {已选路径}:
|
|
123
|
+
{next-step-commands}
|
|
128
124
|
```
|
|
129
125
|
|
|
130
126
|
### 场景 2:还有后续工作
|
|
@@ -145,11 +141,11 @@ push 失败时保留任务 active 与本地 HEAD,只展示诊断和人工推
|
|
|
145
141
|
|
|
146
142
|
必带下一步命令:
|
|
147
143
|
|
|
144
|
+
使用 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
145
|
+
|
|
148
146
|
```text
|
|
149
147
|
下一步 - 代码审查:
|
|
150
|
-
|
|
151
|
-
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
152
|
-
- Codex CLI: $review-code {task-ref}
|
|
148
|
+
{next-step-commands}
|
|
153
149
|
```
|
|
154
150
|
|
|
155
151
|
> 注意:上述场景之外,只要 `task.md` 中存在有效 `pr_number`,commit 技能必须先按 `reference/pr-summary-sync.md` 同步 PR 摘要,再进入完成校验。
|
|
@@ -87,7 +87,7 @@ Before marking complete, verify ALL of these:
|
|
|
87
87
|
- [ ] Code has been reviewed (`review-code.md` or `review-code-r{N}.md` exists, and the latest review verdict is Approved; or review was done externally)
|
|
88
88
|
- [ ] Code has been committed (no uncommitted changes related to this task)
|
|
89
89
|
- [ ] Tests are passing
|
|
90
|
-
- [ ] The disagreement ledger has no unclosed disagreements
|
|
90
|
+
- [ ] The disagreement ledger has no unclosed disagreements or un-re-reviewed post-review commits; on a bound-PR path local HEAD, `last_reviewed_commit`, and PR head either match strictly, or a merged squash has complete platform snapshot and remote Git equivalence evidence and current Git credentials can read the evidence refs; without a valid PR, a single-parent local rewrite is content-equivalent to `last_reviewed_commit` and has no later protected commits
|
|
91
91
|
|
|
92
92
|
> **⚠️ Prerequisite Branch Check — you must decide whether to continue or stop before proceeding:**
|
|
93
93
|
>
|
|
@@ -146,9 +146,9 @@ After platform writes succeed and before moving the directory or releasing the s
|
|
|
146
146
|
agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
This event runs `review-ledger`, `post-review-commit`,
|
|
149
|
+
This event runs `review-ledger`, `post-review-commit`, then `platform-sync-preflight`. On any non-zero exit (fail/blocked), keep the task active, derive the stable code/target from the gate result, record it through `task-warning ... add --step complete-task ...`, and stop. For a review/head mismatch, rerun `commit` or `review-code`; never fall back to the review baseline.
|
|
150
150
|
|
|
151
|
-
`--force` does not lift this hard gate: close ledger disagreements
|
|
151
|
+
`--force` does not lift this hard gate: close ledger disagreements; re-review or exempt post-review commits, use the platform adapter's authoritative snapshot and remote refs for the bound change request (PR/MR) to prove a content-equivalent single-parent squash merge in an isolated temporary repository, or, without a valid change request, prove from local Git objects that the only protected commit is a content-equivalent single-parent rewrite with no later protected commits; then pass platform preflight. An unsupported adapter capability, missing required platform facts, Git objects, topology, or content evidence, or current Git credentials that cannot read the remote evidence refs fails closed. The platform adapter supplies normalized required-checks state, which remains enforced before merge by branch protection / rulesets and the `review-code` / `watch-pr` routes.
|
|
152
152
|
|
|
153
153
|
### 6. Apply the Local Lifecycle Intent and Verify the Move
|
|
154
154
|
|
|
@@ -86,7 +86,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
86
86
|
- [ ] 代码已审查(`review-code.md` 或 `review-code-r{N}.md` 存在,且最新审查结论为 Approved;或已在外部完成审查)
|
|
87
87
|
- [ ] 代码已提交(没有与此任务相关的未提交变更)
|
|
88
88
|
- [ ] 测试通过
|
|
89
|
-
- [ ] 审查分歧账本无未关闭分歧、无未复审的 post-review
|
|
89
|
+
- [ ] 审查分歧账本无未关闭分歧、无未复审的 post-review 提交;绑定 PR 路径中本地 HEAD、`last_reviewed_commit`、PR head 严格一致,或已合并 squash 的平台快照与远端 Git 等价证据完整且当前 Git 凭据可读取证据 refs;无有效 PR 路径中本地单父重写与 `last_reviewed_commit` 内容等价且之后无受保护提交
|
|
90
90
|
|
|
91
91
|
> **⚠️ 前置条件分支判断 — 你必须先判断“继续”还是“停止”:**
|
|
92
92
|
>
|
|
@@ -145,9 +145,9 @@ agent-infra-internal task-warning {task-id} add --step complete-task --severity
|
|
|
145
145
|
agent-infra-internal task-verify {task-id} complete-task.preflight --format text
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
该事件依次执行 `review-ledger`、`post-review-commit`、`
|
|
148
|
+
该事件依次执行 `review-ledger`、`post-review-commit`、`platform-sync-preflight`。任一退出码非 0(fail/blocked)时,任务必须继续留在 active;从 gate 结果取稳定 code/target,通过 `task-warning ... add --step complete-task ...` 落账后停止。若审查基线或 head 不一致,必须先重新 `commit` / `review-code`;不得回退审查基线。
|
|
149
149
|
|
|
150
|
-
`--force`
|
|
150
|
+
`--force` 不解除本硬门禁:未关闭分歧必须先在账本闭合,未复审提交必须重新审查、具备有效豁免,或由平台适配器为绑定的变更请求(PR/MR)提供权威合并快照与远端 refs,并在隔离临时仓库中证明单父 squash merge 等价,或在无有效变更请求时由本地 Git 对象证明唯一受保护提交是内容等价的单父重写且之后无受保护提交;平台 preflight 必须通过。适配器不支持所需能力,平台事实、Git 对象、拓扑、内容证据缺失,或当前 Git 凭据不能读取远端证据 refs 时 fail closed。required checks 由平台适配器提供规范化状态,并在合并前通过分支保护 / ruleset 以及 `review-code` / `watch-pr` 路由承担。
|
|
151
151
|
|
|
152
152
|
### 6. 执行本地生命周期意图并验证转移
|
|
153
153
|
|
|
@@ -31,12 +31,12 @@ Branch on the result:
|
|
|
31
31
|
- absent / `"required"` -> continue to Step 1 below
|
|
32
32
|
- `"disabled"` -> output the message below and **stop immediately**. Do not run any subsequent numbered step, do not trigger any PR-creation command, do not modify `pr_number` / `pr_status` in `task.md`, and do not publish a PR summary comment:
|
|
33
33
|
|
|
34
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
35
|
+
|
|
34
36
|
```
|
|
35
37
|
This project does not enable the PR flow (`.agents/.airc.json` sets `prFlow: "disabled"`).
|
|
36
38
|
No Pull Request is required; run instead:
|
|
37
|
-
|
|
38
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
39
|
-
- Codex CLI: $complete-task {task-ref}
|
|
39
|
+
{next-step-commands}
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
### 1. Parse Command Arguments
|
|
@@ -105,24 +105,24 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
105
105
|
|
|
106
106
|
> Execute this step only after the verification gate passes.
|
|
107
107
|
|
|
108
|
-
>
|
|
108
|
+
> Before rendering next steps, read `.agents/rules/next-step-output.md`, invoke the shared helper only for the selected scenario, and insert its stdout at `{next-step-commands}`.
|
|
109
109
|
|
|
110
110
|
Explain the created PR URL, summarize metadata sync and summary-comment results, and recommend watching the PR's checks next (render `{task-ref}` as the short id `NN` per `.agents/rules/next-step-output.md`):
|
|
111
111
|
|
|
112
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}`.
|
|
113
|
+
|
|
112
114
|
```
|
|
113
115
|
Next step - Watch PR checks (auto self-heal until required checks are green):
|
|
114
|
-
|
|
115
|
-
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
116
|
-
- Codex CLI: $watch-pr {task-ref}
|
|
116
|
+
{next-step-commands}
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
Alternatively, to skip active monitoring and attempt completion immediately, use `complete-task`; its required-checks hard gate still fails closed for pending/failed checks or head mismatch:
|
|
120
120
|
|
|
121
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
122
|
+
|
|
121
123
|
```
|
|
122
124
|
Next step (alternative) - Skip active monitoring and attempt completion:
|
|
123
|
-
|
|
124
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
125
|
-
- Codex CLI: $complete-task {task-ref}
|
|
125
|
+
{next-step-commands}
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
`watch-pr` is the primary path. The alternative `complete-task` block skips active polling only; it never skips required checks and does not guarantee immediate archival.
|
|
@@ -31,12 +31,12 @@ description: >
|
|
|
31
31
|
- 缺省 / `"required"` → 继续到下方第 1 步
|
|
32
32
|
- `"disabled"` → 输出以下消息后**立即停止**,不要执行任何后续编号步骤、不要触发任何 PR 创建命令、不要修改 `task.md` 的 `pr_number` / `pr_status`、不要发布 PR 摘要评论:
|
|
33
33
|
|
|
34
|
+
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
35
|
+
|
|
34
36
|
```
|
|
35
37
|
当前项目未启用 PR 流程(`.agents/.airc.json` 中 `prFlow: "disabled"`)。
|
|
36
38
|
无需创建 Pull Request,请直接运行:
|
|
37
|
-
|
|
38
|
-
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
39
|
-
- Codex CLI:$complete-task {task-ref}
|
|
39
|
+
{next-step-commands}
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
### 1. 解析命令参数
|
|
@@ -105,24 +105,24 @@ agent-infra-internal task-verify {task-id} create-pr.completed --format text
|
|
|
105
105
|
|
|
106
106
|
> 仅在校验通过后执行本步骤。
|
|
107
107
|
|
|
108
|
-
>
|
|
108
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
109
109
|
|
|
110
110
|
说明 PR URL、元数据同步结果、摘要评论结果,并推荐下一步进入 PR 监控(按 `.agents/rules/next-step-output.md` 把 `{task-ref}` 渲染为短号 `NN`):
|
|
111
111
|
|
|
112
|
+
使用 `agent-infra-internal agent-client next-steps --skill watch-pr --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
113
|
+
|
|
112
114
|
```
|
|
113
115
|
下一步 - 监控 PR 检查(required checks 全绿前自动自愈):
|
|
114
|
-
|
|
115
|
-
- Gemini CLI:/{{project}}:watch-pr {task-ref}
|
|
116
|
-
- Codex CLI:$watch-pr {task-ref}
|
|
116
|
+
{next-step-commands}
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
或者,若想跳过主动监控并立即尝试完成,改用 `complete-task`;其 required-checks 硬门禁仍会对 pending/failed/head mismatch fail-closed:
|
|
120
120
|
|
|
121
|
+
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
122
|
+
|
|
121
123
|
```
|
|
122
124
|
下一步(备选)- 跳过主动监控并尝试完成:
|
|
123
|
-
|
|
124
|
-
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
125
|
-
- Codex CLI:$complete-task {task-ref}
|
|
125
|
+
{next-step-commands}
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
`watch-pr` 为主路径;上面的 `complete-task` 备选块只跳过主动轮询,不跳过 required checks,也不保证立即归档。
|
|
@@ -66,10 +66,10 @@ Create the PR with the create-PR command template in `.agents/rules/issue-pr-com
|
|
|
66
66
|
|
|
67
67
|
Final user output should include this follow-up path:
|
|
68
68
|
|
|
69
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
70
|
+
|
|
69
71
|
```text
|
|
70
72
|
Next steps:
|
|
71
73
|
- complete the task after the workflow truly finishes:
|
|
72
|
-
|
|
73
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
74
|
-
- Codex CLI: $complete-task {task-ref}
|
|
74
|
+
{next-step-commands}
|
|
75
75
|
```
|
|
@@ -66,10 +66,10 @@ Milestone 规则:
|
|
|
66
66
|
|
|
67
67
|
最终用户输出应包含以下后续路径:
|
|
68
68
|
|
|
69
|
+
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
70
|
+
|
|
69
71
|
```text
|
|
70
72
|
Next steps:
|
|
71
73
|
- complete the task after the workflow truly finishes:
|
|
72
|
-
|
|
73
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
74
|
-
- Codex CLI: $complete-task {task-ref}
|
|
74
|
+
{next-step-commands}
|
|
75
75
|
```
|
|
@@ -35,12 +35,14 @@ git rev-parse v<prev-version>
|
|
|
35
35
|
|
|
36
36
|
### 3. Reference Historical Release Notes Format and Categories
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Load one typed release-note context, then use a predefined complete category list:
|
|
39
39
|
|
|
40
40
|
Read `.agents/rules/release-commands.md` before this step.
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
43
|
+
agent-infra-internal platform-release-notes context \
|
|
44
|
+
--from-tag "v<prev-version>" --to-tag "v<version>" \
|
|
45
|
+
--branch "<base-branch>" --history-limit 3
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
**Part B: Complete Category List**
|
|
@@ -58,38 +60,11 @@ Read `.agents/rules/release-commands.md` before this step.
|
|
|
58
60
|
|
|
59
61
|
### 4. Collect Merged PRs and Contributors
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
# Get tag dates
|
|
65
|
-
git log v<prev-version> --format=%aI -1
|
|
66
|
-
git log v<version> --format=%aI -1
|
|
67
|
-
|
|
68
|
-
# Get merged PRs in range by following the merged-PR query command in `.agents/rules/release-commands.md`
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Also collect direct commits without PRs:
|
|
72
|
-
```bash
|
|
73
|
-
git log v<prev-version>..v<version> --format="%H %s" --no-merges
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Collect collaborative contributors from commit `Co-authored-by` trailers:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
git log v<prev-version>..v<version> \
|
|
80
|
-
--no-merges \
|
|
81
|
-
--format='%(trailers:key=Co-authored-by,valueonly,unfold)' \
|
|
82
|
-
| grep -v '^$' | sort | uniq -c | sort -rn
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Each output line is `Name <email>` and `uniq -c` provides the number of commits where that identity appeared as a co-author within the range.
|
|
63
|
+
Use `pullRequests` and `commits` from Step 3. Each commit's `authors` are normalized platform facts containing the git author and co-authors; the skill does not interpret raw platform fields or email rules.
|
|
86
64
|
|
|
87
65
|
### 5. Collect Related Issues
|
|
88
66
|
|
|
89
|
-
|
|
90
|
-
- Match patterns: `Closes #N`, `Fixes #N`, `Resolves #N` (case-insensitive)
|
|
91
|
-
|
|
92
|
-
Read linked Issues by following `.agents/rules/release-commands.md`.
|
|
67
|
+
Use each PR's `closingIssues` from Step 3. Do not parse platform-specific reference syntax in this generic skill.
|
|
93
68
|
|
|
94
69
|
### 6. Classify Changes
|
|
95
70
|
|
|
@@ -130,14 +105,13 @@ If no historical release notes exist, use the following default Markdown format:
|
|
|
130
105
|
3. Description: Use PR title, remove `type(scope):` prefix, capitalize first letter
|
|
131
106
|
4. **Contributor collection**:
|
|
132
107
|
- **Data sources**:
|
|
133
|
-
- PR authors
|
|
134
|
-
- Commit co-authors from
|
|
135
|
-
- Issue reporters from
|
|
108
|
+
- PR authors from the typed context
|
|
109
|
+
- Commit co-authors from the typed context's commit `authors`
|
|
110
|
+
- Issue reporters from typed `closingIssues[].author`
|
|
136
111
|
- **Contribution count**: `PR count + co-authored commit count` for the same identity, merged across both sources
|
|
137
112
|
- **Name -> `@login` mapping**:
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
- Otherwise use a Name heuristic: take the first token before a space and lowercase it, for example `Claude Opus 4.6 (1M context)` -> `@claude`, `Codex` -> `@codex`, `Gemini` -> `@gemini`
|
|
113
|
+
- For `platform-user` or `platform-noreply`, use the lowercased `login`
|
|
114
|
+
- Only for `unresolved`, use the Name heuristic: take the first token before a space and lowercase it
|
|
141
115
|
- If the login already appears in the PR author list, merge counts into that login so `Claude` and `@claude` do not become separate entries
|
|
142
116
|
- Merge all Name variants that map to the same login before counting and sorting; for example, `Claude` and `Claude Opus 4.6 (1M context)` should both collapse into `@claude`
|
|
143
117
|
- Preserve bot identities as-is, for example `dependabot[bot]`
|
|
@@ -170,7 +144,12 @@ NOTES_FILE="$(mktemp "${TMPDIR:-/tmp}/agent-infra-release-notes.XXXXXX")"
|
|
|
170
144
|
|
|
171
145
|
Write the notes content to `$NOTES_FILE`.
|
|
172
146
|
|
|
173
|
-
9.2
|
|
147
|
+
9.2 Call the typed publish intent (use `$NOTES_FILE` for `{notes-file}`); it updates an existing Release or creates a missing one:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
agent-infra-internal platform-release-notes publish \
|
|
151
|
+
--tag "v<version>" --title "v<version>" --notes-file "$NOTES_FILE"
|
|
152
|
+
```
|
|
174
153
|
|
|
175
154
|
9.3 Remove the temp file whether publishing succeeds or fails:
|
|
176
155
|
|