@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
|
@@ -41,6 +41,24 @@ assert.match(content, /^name: code-task$/m); // 正向断言已足够
|
|
|
41
41
|
|
|
42
42
|
## 项目级测试策略
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
请为本仓库填写以下各项,记录选定行为及其边界,以便贡献者一致地选择并验证测试。
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
### 1. 测试命令
|
|
47
|
+
|
|
48
|
+
> TODO: 记录完整测试命令,以及开发期间使用的可选快速命令。
|
|
49
|
+
|
|
50
|
+
### 2. 测试目录或层级
|
|
51
|
+
|
|
52
|
+
> TODO: 记录测试目录或层级,以及选择对应目录或层级的规则。
|
|
53
|
+
|
|
54
|
+
### 3. 覆盖率
|
|
55
|
+
|
|
56
|
+
> TODO: 记录覆盖率采集方式、阈值,以及覆盖率是否阻塞变更。
|
|
57
|
+
|
|
58
|
+
### 4. 持续集成
|
|
59
|
+
|
|
60
|
+
> TODO: 记录运行测试的 CI 检查,以及哪些检查属于阻塞项或信息项。
|
|
61
|
+
|
|
62
|
+
### 5. 报告服务
|
|
63
|
+
|
|
64
|
+
> TODO: 记录外部报告服务、徽章或构件,以及它们是否影响验收。
|
|
@@ -11,7 +11,7 @@ description: >
|
|
|
11
11
|
## Boundary / Critical Rules
|
|
12
12
|
|
|
13
13
|
- This skill only outputs a requirements analysis document (`analysis.md` or `analysis-r{N}.md`) and does not modify any business code
|
|
14
|
-
- Base the analysis strictly on the existing requirements, context, and source information in `task.md`
|
|
14
|
+
- Base the analysis strictly on the existing task input, requirements, context, and source information in `task.md`
|
|
15
15
|
- After executing this skill, you **must** immediately update task status in task.md
|
|
16
16
|
|
|
17
17
|
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
@@ -56,6 +56,7 @@ Run `agent-infra-internal task-artifact {task-id} inspect --family analysis`. Co
|
|
|
56
56
|
### 3. Read Task Context
|
|
57
57
|
|
|
58
58
|
Read `task.md` carefully to understand:
|
|
59
|
+
- sources, facts and evidence, constraints, decision states, acceptance criteria, and open questions captured under `## Task Input` (fall back compatibly when the section is absent)
|
|
59
60
|
- task title, description, and requirement list
|
|
60
61
|
- context information (Issue, PR, branch, alert numbers, etc.)
|
|
61
62
|
- currently known affected files and constraints
|
|
@@ -89,6 +90,8 @@ Runs after Step 0 state check and Step 3 (questioning is an external-state actio
|
|
|
89
90
|
- no answer carried → restate `pending_question` and take Scenario B early-exit below (do not increase `question_count`).
|
|
90
91
|
|
|
91
92
|
**4.3 Sufficiency judgment** (objective checklist; any gap hit means insufficient):
|
|
93
|
+
- first aggregate `## Task Input`, description, context, requirements, and remote sources; an analysis-owned `## Requirements` section being unpopulated is not by itself insufficient;
|
|
94
|
+
- goals, scope, constraints, or acceptance criteria already recorded in task input count as provided and must not be asked again;
|
|
92
95
|
- description/requirements empty, or a single sentence with no verifiable acceptance criteria;
|
|
93
96
|
- missing goal or impact scope (unclear what to change / who is affected);
|
|
94
97
|
- requirement items contradict each other, or key terms are undefined and block analysis.
|
|
@@ -227,9 +230,11 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
227
230
|
|
|
228
231
|
> Execute this step only after the verification gate passes.
|
|
229
232
|
|
|
230
|
-
>
|
|
233
|
+
> 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}`.
|
|
231
234
|
|
|
232
235
|
Output format:
|
|
236
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill review-analysis --task-ref {task-ref}`.
|
|
237
|
+
|
|
233
238
|
```
|
|
234
239
|
Analysis complete for task {task-id}.
|
|
235
240
|
|
|
@@ -242,9 +247,7 @@ Output file:
|
|
|
242
247
|
- Analysis report: .agents/workspace/active/{task-id}/{analysis-artifact}
|
|
243
248
|
|
|
244
249
|
Next step - review the analysis:
|
|
245
|
-
|
|
246
|
-
- Gemini CLI: /{{project}}:review-analysis {task-ref}
|
|
247
|
-
- Codex CLI: $review-analysis {task-ref}
|
|
250
|
+
{next-step-commands}
|
|
248
251
|
```
|
|
249
252
|
|
|
250
253
|
## Completion Checklist
|
|
@@ -256,7 +259,7 @@ Next step - review the analysis:
|
|
|
256
259
|
- [ ] Updated `assigned_to` in task.md
|
|
257
260
|
- [ ] Appended an Activity Log entry to task.md
|
|
258
261
|
- [ ] Marked requirement-analysis as complete in workflow progress
|
|
259
|
-
- [ ]
|
|
262
|
+
- [ ] Rendered the selected next-step commands through the shared helper
|
|
260
263
|
- [ ] **Did not modify any business code**
|
|
261
264
|
|
|
262
265
|
## STOP
|
|
@@ -11,7 +11,7 @@ description: >
|
|
|
11
11
|
## 行为边界 / 关键规则
|
|
12
12
|
|
|
13
13
|
- 本技能仅产出需求分析文档(`analysis.md` 或 `analysis-r{N}.md`)—— 不修改任何业务代码
|
|
14
|
-
- 严格基于 `task.md`
|
|
14
|
+
- 严格基于 `task.md` 中已有的任务输入、需求、上下文和来源信息展开分析
|
|
15
15
|
- 执行本技能后,你**必须**立即更新 task.md 中的任务状态
|
|
16
16
|
|
|
17
17
|
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
@@ -59,6 +59,7 @@ agent-infra-internal task-event {task-id} analyze.started --agent {agent}
|
|
|
59
59
|
### 3. 阅读任务上下文
|
|
60
60
|
|
|
61
61
|
仔细阅读 `task.md` 以理解:
|
|
62
|
+
- `## 任务输入` 中已捕获的来源、事实与证据、约束、决策状态、验收标准和未决事项(栏目不存在时兼容回退)
|
|
62
63
|
- 任务标题、描述和需求列表
|
|
63
64
|
- 上下文信息(Issue、PR、分支、告警编号等)
|
|
64
65
|
- 当前已知的受影响文件和约束
|
|
@@ -92,6 +93,8 @@ agent-infra-internal task-event {task-id} analyze.started --agent {agent}
|
|
|
92
93
|
- 未携带答案 → 复述 `pending_question`,按下文场景 B 提问早退(不增加 `question_count`)。
|
|
93
94
|
|
|
94
95
|
**4.3 充分性判定**(客观清单,命中任一缺口即判为不足):
|
|
96
|
+
- 先聚合 `## 任务输入`、描述、上下文、需求及远端来源;分析阶段尚未填写 `## 需求` 本身不构成不足;
|
|
97
|
+
- 已在任务输入中记录的目标、范围、约束或验收标准视为已提供,不得重复询问;
|
|
95
98
|
- 描述/需求为空,或仅一句话且无可验证的验收标准;
|
|
96
99
|
- 缺少目标或受影响范围(不知道要改什么 / 影响谁);
|
|
97
100
|
- 需求条目自相矛盾,或关键名词未定义而无法分析。
|
|
@@ -226,9 +229,11 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
226
229
|
|
|
227
230
|
> 仅在校验通过后执行本步骤。
|
|
228
231
|
|
|
229
|
-
>
|
|
232
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
230
233
|
|
|
231
234
|
输出格式:
|
|
235
|
+
使用 `agent-infra-internal agent-client next-steps --skill review-analysis --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
236
|
+
|
|
232
237
|
```
|
|
233
238
|
任务 {task-id} 分析完成。
|
|
234
239
|
|
|
@@ -241,9 +246,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
241
246
|
- 分析报告:.agents/workspace/active/{task-id}/{analysis-artifact}
|
|
242
247
|
|
|
243
248
|
下一步 - 审查需求分析:
|
|
244
|
-
|
|
245
|
-
- Gemini CLI:/{{project}}:review-analysis {task-ref}
|
|
246
|
-
- Codex CLI:$review-analysis {task-ref}
|
|
249
|
+
{next-step-commands}
|
|
247
250
|
```
|
|
248
251
|
|
|
249
252
|
## 完成检查清单
|
|
@@ -255,7 +258,7 @@ agent-infra-internal task-verify {task-id} analyze.completed --artifact {analysi
|
|
|
255
258
|
- [ ] 更新了 task.md 中的 `assigned_to`
|
|
256
259
|
- [ ] 追加了 Activity Log 条目到 task.md
|
|
257
260
|
- [ ] 在工作流进度中标记了 requirement-analysis 为已完成
|
|
258
|
-
- [ ]
|
|
261
|
+
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
259
262
|
- [ ] **没有修改任何业务代码**
|
|
260
263
|
|
|
261
264
|
## 停止
|
|
@@ -95,11 +95,13 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
95
95
|
|
|
96
96
|
> Execute this step only after the verification gate passes.
|
|
97
97
|
|
|
98
|
-
>
|
|
98
|
+
> 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}`.
|
|
99
99
|
|
|
100
100
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after "Archived to" and before "To unblock" in the output below — only when BOTH (1) `.agents/.airc.json` has a `sandbox` field and (2) task.md's `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the task.md you already loaded (the task has moved to blocked/, so read it from `.agents/workspace/blocked/{task-id}/task.md`). This block is independent of "Next step" semantics.
|
|
101
101
|
|
|
102
102
|
Output format:
|
|
103
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}`.
|
|
104
|
+
|
|
103
105
|
```
|
|
104
106
|
Task {task-id} marked as blocked.
|
|
105
107
|
|
|
@@ -116,9 +118,7 @@ To unblock when the issue is resolved:
|
|
|
116
118
|
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{activation note}"
|
|
117
119
|
|
|
118
120
|
Next step - check task status after unblocking:
|
|
119
|
-
|
|
120
|
-
- Gemini CLI: /{{project}}:check-task {task-ref}
|
|
121
|
-
- Codex CLI: $check-task {task-ref}
|
|
121
|
+
{next-step-commands}
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
|
|
@@ -96,11 +96,13 @@ agent-infra-internal task-verify {task-id} block-task.completed --format text
|
|
|
96
96
|
|
|
97
97
|
> 仅在校验通过后执行本步骤。
|
|
98
98
|
|
|
99
|
-
>
|
|
99
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
100
100
|
|
|
101
101
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「归档路径」之后、「解除阻塞时执行」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取已读入的 task.md 的 `branch` 值(任务此时已移动到 blocked/,从 `.agents/workspace/blocked/{task-id}/task.md` 读取)。该块独立于「下一步」语义。
|
|
102
102
|
|
|
103
103
|
输出格式:
|
|
104
|
+
使用 `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
105
|
+
|
|
104
106
|
```
|
|
105
107
|
任务 {task-id} 已标记为阻塞。
|
|
106
108
|
|
|
@@ -117,9 +119,7 @@ ai sandbox rm {branch}
|
|
|
117
119
|
agent-infra-internal task-lifecycle {task-id} activate --agent {agent} --note "{恢复说明}"
|
|
118
120
|
|
|
119
121
|
下一步 - 检查任务状态(解除阻塞后):
|
|
120
|
-
|
|
121
|
-
- Gemini CLI:/{{project}}:check-task {task-ref}
|
|
122
|
-
- Codex CLI:$check-task {task-ref}
|
|
122
|
+
{next-step-commands}
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
|
|
@@ -102,11 +102,13 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
102
102
|
|
|
103
103
|
> Execute this step only after the verification gate passes.
|
|
104
104
|
|
|
105
|
-
>
|
|
105
|
+
> 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}`.
|
|
106
106
|
|
|
107
107
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after "Target path" and before "Next step" in the output below — only when BOTH (1) `.agents/.airc.json` has a `sandbox` field and (2) task.md's `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the task.md you already loaded (the task has moved to completed/, so read it from `.agents/workspace/completed/{task-id}/task.md`). This block is independent of "Next steps" semantics.
|
|
108
108
|
|
|
109
109
|
Output format:
|
|
110
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}`.
|
|
111
|
+
|
|
110
112
|
```
|
|
111
113
|
Task {task-id} cancelled; task directory moved to completed/.
|
|
112
114
|
|
|
@@ -120,9 +122,7 @@ Optional: clean up this task's sandbox
|
|
|
120
122
|
ai sandbox rm {branch}
|
|
121
123
|
|
|
122
124
|
Next step - inspect the moved task:
|
|
123
|
-
|
|
124
|
-
- Gemini CLI: /{{project}}:check-task {task-ref}
|
|
125
|
-
- Codex CLI: $check-task {task-ref}
|
|
125
|
+
{next-step-commands}
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
|
|
@@ -101,11 +101,13 @@ agent-infra-internal task-verify {task-id} cancel-task.completed --format text
|
|
|
101
101
|
|
|
102
102
|
> 仅在校验通过后执行本步骤。
|
|
103
103
|
|
|
104
|
-
>
|
|
104
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
105
105
|
|
|
106
106
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「目标路径」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取已读入的 task.md 的 `branch` 值(任务此时已移动到 completed/,从 `.agents/workspace/completed/{task-id}/task.md` 读取)。该块独立于「下一步」语义。
|
|
107
107
|
|
|
108
108
|
输出格式:
|
|
109
|
+
使用 `agent-infra-internal agent-client next-steps --skill check-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
110
|
+
|
|
109
111
|
```
|
|
110
112
|
任务 {task-id} 已取消,任务目录已转移到 completed/。
|
|
111
113
|
|
|
@@ -119,9 +121,7 @@ agent-infra-internal task-verify {task-id} cancel-task.completed --format text
|
|
|
119
121
|
ai sandbox rm {branch}
|
|
120
122
|
|
|
121
123
|
下一步 - 查看已转移任务:
|
|
122
|
-
|
|
123
|
-
- Gemini CLI:/{{project}}:check-task {task-ref}
|
|
124
|
-
- Codex CLI:$check-task {task-ref}
|
|
124
|
+
{next-step-commands}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
|
|
@@ -132,7 +132,7 @@ ai sandbox rm {branch}
|
|
|
132
132
|
- [ ] 已将任务目录移动到 `.agents/workspace/completed/`
|
|
133
133
|
- [ ] 已在存在 Issue 时完成 Issue 同步
|
|
134
134
|
- [ ] 已运行 gate 校验并通过
|
|
135
|
-
- [ ]
|
|
135
|
+
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
136
136
|
|
|
137
137
|
## 注意事项
|
|
138
138
|
|
|
@@ -59,7 +59,7 @@ Workflow progress:
|
|
|
59
59
|
|
|
60
60
|
### 3. Recommend Next Action
|
|
61
61
|
|
|
62
|
-
Recommend the appropriate next skill based on the current workflow state.
|
|
62
|
+
Recommend the appropriate next skill based on the current workflow state.
|
|
63
63
|
|
|
64
64
|
> **⚠️ CONDITION CHECK — you must choose the single matching row in the table below based on `status`, `current_step`, the latest artifacts, and the latest review result:**
|
|
65
65
|
>
|
|
@@ -77,21 +77,21 @@ Recommend the appropriate next skill based on the current workflow state. You mu
|
|
|
77
77
|
>
|
|
78
78
|
> **Important: if the latest review report contains any issue at all, do not use the corresponding review-passed row. Use the corresponding has-issues row instead.**
|
|
79
79
|
>
|
|
80
|
-
> Before rendering the final output, read `.agents/rules/next-step-output.md
|
|
81
|
-
|
|
82
|
-
| Current State |
|
|
83
|
-
|
|
84
|
-
| Analysis Complete |
|
|
85
|
-
| Analysis Review Passed |
|
|
86
|
-
| Analysis Review Has Issues |
|
|
87
|
-
| Plan Complete |
|
|
88
|
-
| Plan Review Passed |
|
|
89
|
-
| Plan Review Has Issues |
|
|
90
|
-
| Code Complete |
|
|
91
|
-
| Code Review Passed |
|
|
92
|
-
| Code Review Has Issues |
|
|
93
|
-
| Task Blocked |
|
|
94
|
-
| Task Completed |
|
|
80
|
+
> Before rendering the final output, read `.agents/rules/next-step-output.md`. After selecting an actionable row, invoke `agent-infra-internal agent-client next-steps --skill {next-skill} [--task-ref {task-ref}]` exactly once and render stdout verbatim as `{next-step-commands}`. Do not invoke the helper for `Task Blocked` or `Task Completed`. Append the `Completed at` trailing line last.
|
|
81
|
+
|
|
82
|
+
| Current State | next skill | task ref |
|
|
83
|
+
|----------------------------|-------------------|----------|
|
|
84
|
+
| Analysis Complete | `review-analysis` | required |
|
|
85
|
+
| Analysis Review Passed | `plan-task` | required |
|
|
86
|
+
| Analysis Review Has Issues | `analyze-task` | required |
|
|
87
|
+
| Plan Complete | `review-plan` | required |
|
|
88
|
+
| Plan Review Passed | `code-task` | required |
|
|
89
|
+
| Plan Review Has Issues | `plan-task` | required |
|
|
90
|
+
| Code Complete | `review-code` | required |
|
|
91
|
+
| Code Review Passed | `commit` | omitted |
|
|
92
|
+
| Code Review Has Issues | `code-task` | required |
|
|
93
|
+
| Task Blocked | — | — |
|
|
94
|
+
| Task Completed | — | — |
|
|
95
95
|
|
|
96
96
|
## Notes
|
|
97
97
|
|
|
@@ -59,7 +59,7 @@ ai task status {task-id}
|
|
|
59
59
|
|
|
60
60
|
### 3. 建议下一步操作
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
根据当前工作流状态,建议合适的下一个技能:
|
|
63
63
|
|
|
64
64
|
> **⚠️ 条件判断 — 你必须先根据 `status`、`current_step`、最新产物和最新审查结果,选择下表中唯一匹配的一行:**
|
|
65
65
|
>
|
|
@@ -77,21 +77,21 @@ ai task status {task-id}
|
|
|
77
77
|
>
|
|
78
78
|
> **特别注意:只要最新审查报告中存在任何问题,就不能使用对应「审查通过」行。必须改用对应「审查有问题」行。**
|
|
79
79
|
>
|
|
80
|
-
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md`
|
|
81
|
-
|
|
82
|
-
| 当前状态 |
|
|
83
|
-
|
|
84
|
-
| 分析完成 |
|
|
85
|
-
| 需求分析审查通过 |
|
|
86
|
-
| 需求分析审查有问题 |
|
|
87
|
-
| 计划完成 |
|
|
88
|
-
| 技术方案审查通过 |
|
|
89
|
-
| 技术方案审查有问题 |
|
|
90
|
-
| 实现完成 |
|
|
91
|
-
| 代码审查通过 |
|
|
92
|
-
| 代码审查有问题 |
|
|
93
|
-
| 任务被阻塞 |
|
|
94
|
-
| 任务已完成 |
|
|
80
|
+
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md`。选中可执行行后只调用一次 `agent-infra-internal agent-client next-steps --skill {next-skill} [--task-ref {task-ref}]`,将 stdout 原样输出为 `{next-step-commands}`;`任务被阻塞` 与 `任务已完成` 不调用 helper。最后追加 `Completed at` 收尾行。
|
|
81
|
+
|
|
82
|
+
| 当前状态 | next skill | task ref |
|
|
83
|
+
|--------------------|-------------------|----------|
|
|
84
|
+
| 分析完成 | `review-analysis` | required |
|
|
85
|
+
| 需求分析审查通过 | `plan-task` | required |
|
|
86
|
+
| 需求分析审查有问题 | `analyze-task` | required |
|
|
87
|
+
| 计划完成 | `review-plan` | required |
|
|
88
|
+
| 技术方案审查通过 | `code-task` | required |
|
|
89
|
+
| 技术方案审查有问题 | `plan-task` | required |
|
|
90
|
+
| 实现完成 | `review-code` | required |
|
|
91
|
+
| 代码审查通过 | `commit` | omitted |
|
|
92
|
+
| 代码审查有问题 | `code-task` | required |
|
|
93
|
+
| 任务被阻塞 | — | — |
|
|
94
|
+
| 任务已完成 | — | — |
|
|
95
95
|
|
|
96
96
|
## 注意事项
|
|
97
97
|
|
|
@@ -89,10 +89,12 @@ Only `status=applied|no-op` means local archival completed. If the API dismissal
|
|
|
89
89
|
|
|
90
90
|
### 8. Inform User
|
|
91
91
|
|
|
92
|
-
>
|
|
92
|
+
> 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}`.
|
|
93
93
|
|
|
94
94
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after the "Note:" line and before "Next step" in the output below — only when ALL of (1) `.agents/.airc.json` has a `sandbox` field, (2) step 7 located a related task by the alert number, and (3) that related task's task.md `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the related task.md located in step 7. This block is independent of "Next step" semantics.
|
|
95
95
|
|
|
96
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
97
|
+
|
|
96
98
|
```
|
|
97
99
|
Code Scanning alert #{alert-number} dismissed.
|
|
98
100
|
|
|
@@ -111,9 +113,7 @@ Optional: clean up this task's sandbox
|
|
|
111
113
|
ai sandbox rm {branch}
|
|
112
114
|
|
|
113
115
|
Next step - complete and archive the task if a related task exists:
|
|
114
|
-
|
|
115
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
116
|
-
- Codex CLI: $complete-task {task-ref}
|
|
116
|
+
{next-step-commands}
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
## Notes
|
|
@@ -89,10 +89,12 @@ agent-infra-internal task-lifecycle {task-id} close-codescan --agent {agent} \
|
|
|
89
89
|
|
|
90
90
|
### 8. 告知用户
|
|
91
91
|
|
|
92
|
-
>
|
|
92
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
93
93
|
|
|
94
94
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) 第 7 步按告警号定位到了关联任务、(3) 该关联任务 task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「注意:…」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取第 7 步定位到的关联任务 task.md 的 `branch` 值。该块独立于「下一步」语义。
|
|
95
95
|
|
|
96
|
+
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
97
|
+
|
|
96
98
|
```
|
|
97
99
|
Code Scanning 告警 #{alert-number} 已关闭。
|
|
98
100
|
|
|
@@ -111,9 +113,7 @@ Code Scanning 告警 #{alert-number} 已关闭。
|
|
|
111
113
|
ai sandbox rm {branch}
|
|
112
114
|
|
|
113
115
|
下一步 - 完成并归档任务(如有关联任务):
|
|
114
|
-
|
|
115
|
-
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
116
|
-
- Codex CLI:$complete-task {task-ref}
|
|
116
|
+
{next-step-commands}
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
## 注意事项
|
|
@@ -97,10 +97,12 @@ Only `status=applied|no-op` means local archival completed. If the API dismissal
|
|
|
97
97
|
|
|
98
98
|
### 8. Inform User
|
|
99
99
|
|
|
100
|
-
>
|
|
100
|
+
> 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}`.
|
|
101
101
|
|
|
102
102
|
> **Optional sandbox-cleanup hint (gated)**: Render the "Optional: clean up this task's sandbox" block — placed after the "Note:" line and before "Next step" in the output below — only when ALL of (1) `.agents/.airc.json` has a `sandbox` field, (2) step 7 located a related task by the alert number, and (3) that related task's task.md `branch` field exists and is not `main` / `master`; otherwise omit the whole block. `{branch}` is the `branch` value from the related task.md located in step 7. This block is independent of "Next step" semantics.
|
|
103
103
|
|
|
104
|
+
Populate `{next-step-commands}` for this scenario by running `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}`.
|
|
105
|
+
|
|
104
106
|
```
|
|
105
107
|
Security alert #{alert-number} dismissed.
|
|
106
108
|
|
|
@@ -119,9 +121,7 @@ Optional: clean up this task's sandbox
|
|
|
119
121
|
ai sandbox rm {branch}
|
|
120
122
|
|
|
121
123
|
Next step - complete and archive the task if a related task exists:
|
|
122
|
-
|
|
123
|
-
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
124
|
-
- Codex CLI: $complete-task {task-ref}
|
|
124
|
+
{next-step-commands}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
## Notes
|
|
@@ -97,10 +97,12 @@ agent-infra-internal task-lifecycle {task-id} close-dependabot --agent {agent} \
|
|
|
97
97
|
|
|
98
98
|
### 8. 告知用户
|
|
99
99
|
|
|
100
|
-
>
|
|
100
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,仅为已选场景调用统一 helper,并将 stdout 填入 `{next-step-commands}`。
|
|
101
101
|
|
|
102
102
|
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) 第 7 步按告警号定位到了关联任务、(3) 该关联任务 task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「注意:…」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取第 7 步定位到的关联任务 task.md 的 `branch` 值。该块独立于「下一步」语义。
|
|
103
103
|
|
|
104
|
+
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
|
|
105
|
+
|
|
104
106
|
```
|
|
105
107
|
安全告警 #{alert-number} 已关闭。
|
|
106
108
|
|
|
@@ -119,9 +121,7 @@ agent-infra-internal task-lifecycle {task-id} close-dependabot --agent {agent} \
|
|
|
119
121
|
ai sandbox rm {branch}
|
|
120
122
|
|
|
121
123
|
下一步 - 完成并归档任务(如有关联任务):
|
|
122
|
-
|
|
123
|
-
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
124
|
-
- Codex CLI:$complete-task {task-ref}
|
|
124
|
+
{next-step-commands}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
## 注意事项
|
|
@@ -122,6 +122,6 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
122
122
|
|
|
123
123
|
### 12. Tell the User
|
|
124
124
|
|
|
125
|
-
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and
|
|
125
|
+
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and render the selected next-step commands through the shared helper.
|
|
126
126
|
|
|
127
127
|
> Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the "Next steps" commands as the current task's short id `NN` (see that file for lookup and fallback), while other `{task-id}` placeholders (report titles, paths) keep the full TASK-id form; (2) append the `Completed at` line as the very last line of the user-facing output (this applies to every user-facing output — success, error, and early-return paths alike, not only the success path).
|
|
@@ -178,7 +178,7 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
178
178
|
|
|
179
179
|
> 仅在校验通过后执行本步骤。
|
|
180
180
|
|
|
181
|
-
>
|
|
181
|
+
> 渲染下一步前先读取 `.agents/rules/next-step-output.md`,并按 `reference/output-template.md` 或 `reference/fix-mode.md` 的已选场景调用统一 helper。
|
|
182
182
|
|
|
183
183
|
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令的 `{task-ref}` 渲染为当前任务短号 `NN`(取值与回退见该文件),其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式;(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
184
184
|
|
|
@@ -188,7 +188,7 @@ agent-infra-internal task-verify {task-id} code.completed --artifact {code-artif
|
|
|
188
188
|
- [ ] 已创建 `{code-artifact}`
|
|
189
189
|
- [ ] 所有必需测试通过
|
|
190
190
|
- [ ] 已更新 task.md 并追加 Activity Log
|
|
191
|
-
- [ ]
|
|
191
|
+
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
192
192
|
|
|
193
193
|
## 停止
|
|
194
194
|
|
|
@@ -51,13 +51,11 @@ Before writing the code report, run the project's **core subset** as final verif
|
|
|
51
51
|
|
|
52
52
|
Decision rules:
|
|
53
53
|
1. always recommend re-review as the default next step, regardless of the severity of fixed issues
|
|
54
|
-
2. direct commit may be
|
|
55
|
-
3.
|
|
54
|
+
2. direct commit may be selected only when all issues are resolved and the changes are clearly low risk
|
|
55
|
+
3. do not select direct commit while any `Blocker` or `Major` remains unresolved
|
|
56
|
+
4. render only the selected branch and invoke the helper exactly once
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
- never present direct commit as the only next step — re-review must always be the primary recommendation
|
|
59
|
-
|
|
60
|
-
Required output template:
|
|
58
|
+
For the default branch, populate `{next-step-commands}` by running `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}`:
|
|
61
59
|
|
|
62
60
|
```text
|
|
63
61
|
Task {task-id} fix completed.
|
|
@@ -71,15 +69,15 @@ Fix status:
|
|
|
71
69
|
- Review input: {review-artifact}
|
|
72
70
|
- Code artifact: {code-artifact}
|
|
73
71
|
|
|
74
|
-
Next step -
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
Next step - review again:
|
|
73
|
+
{next-step-commands}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Only when the direct-commit branch satisfies the rules above and is selected, populate `{next-step-commands}` by running `agent-infra-internal agent-client next-steps --skill commit`, then replace the ending with:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
Next step - commit directly:
|
|
80
|
+
{next-step-commands}
|
|
83
81
|
```
|
|
84
82
|
|
|
85
83
|
## Notes
|
|
@@ -88,5 +86,5 @@ Next step - re-review or commit:
|
|
|
88
86
|
2. **No auto-commit**: do not run `git commit`
|
|
89
87
|
3. **Scope discipline**: verify each reviewed issue one by one — fix it if it holds, rebut it if it does not; do not expand to issues the review did not list
|
|
90
88
|
4. **Disagreement handling**: record any disagreement in the report
|
|
91
|
-
5. **Re-review**:
|
|
89
|
+
5. **Re-review**: recommend `review-code` as the default next step after fix mode
|
|
92
90
|
6. **Consistency**: the latest review artifact, Activity Log entry, and code report must reference the same round
|
|
@@ -51,13 +51,11 @@ manual-validation 项不在修复范围。处理规则:
|
|
|
51
51
|
|
|
52
52
|
判断规则:
|
|
53
53
|
1. 始终将重新审查作为默认推荐的下一步,无论本轮修复了哪个级别的问题
|
|
54
|
-
2.
|
|
55
|
-
3. 如果仍有任何 `Blocker` 或 `Major`
|
|
54
|
+
2. 直接提交仅可作为已选分支,且仅在所有问题均已解决且改动明显低风险时
|
|
55
|
+
3. 如果仍有任何 `Blocker` 或 `Major` 未解决,不要选择直接提交
|
|
56
|
+
4. 只渲染已选分支,且只调用一次 helper
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
- 绝对不要把直接提交写成唯一下一步——重新审查必须始终作为首要推荐
|
|
59
|
-
|
|
60
|
-
必用输出模板:
|
|
58
|
+
默认分支使用 `agent-infra-internal agent-client next-steps --skill review-code --task-ref {task-ref}` 生成 `{next-step-commands}`:
|
|
61
59
|
|
|
62
60
|
```text
|
|
63
61
|
任务 {task-id} 修复完成。
|
|
@@ -71,15 +69,15 @@ manual-validation 项不在修复范围。处理规则:
|
|
|
71
69
|
- 审查输入:{review-artifact}
|
|
72
70
|
- 修复产物:{code-artifact}
|
|
73
71
|
|
|
74
|
-
下一步 -
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
下一步 - 重新审查:
|
|
73
|
+
{next-step-commands}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
仅当直接提交分支满足上述条件并被选中时,改用 `agent-infra-internal agent-client next-steps --skill commit` 生成 `{next-step-commands}`,并将末尾替换为:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
下一步 - 直接提交:
|
|
80
|
+
{next-step-commands}
|
|
83
81
|
```
|
|
84
82
|
|
|
85
83
|
## 注意事项
|
|
@@ -88,5 +86,5 @@ manual-validation 项不在修复范围。处理规则:
|
|
|
88
86
|
2. **禁止自动提交**:不要执行 `git commit`
|
|
89
87
|
3. **范围约束**:逐条核实审查列出的问题,成立则修复、不成立则反驳;不扩大到审查未列出的问题
|
|
90
88
|
4. **分歧处理**:如果不同意审查意见,要在报告里明确记录
|
|
91
|
-
5.
|
|
89
|
+
5. **重新审查**:修复后默认推荐执行 `review-code`
|
|
92
90
|
6. **一致性**:最新审查产物、Activity Log 记录和修复报告必须引用同一轮次
|