@fitlab-ai/agent-infra 0.9.10 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/README.zh-CN.md +13 -3
- package/bin/cli.ts +17 -4
- package/dist/bin/cli.js +19 -4
- package/dist/bin/internal-cli.js +50 -4
- package/dist/lib/agent-client.js +0 -1
- package/dist/lib/agent-clients/adapters/opencode-sandbox.js +0 -4
- package/dist/lib/agent-clients/adapters/traecli.js +7 -8
- package/dist/lib/agent-clients/config.js +14 -99
- package/dist/lib/agent-clients/reconcile.js +1 -11
- package/dist/lib/agent-clients/schema.js +5 -4
- package/dist/lib/agent-clients/tokens.js +5 -15
- package/dist/lib/decide.js +14 -30
- package/dist/lib/defaults.json +4 -0
- package/dist/lib/init.js +2 -2
- package/dist/lib/internal/release-workflow.js +0 -1
- package/dist/lib/internal/task-finalization.js +19 -9
- package/dist/lib/internal/task-ledger.js +8 -2
- package/dist/lib/internal/task-lifecycle.js +17 -93
- package/dist/lib/internal/task-orchestration.js +30 -216
- package/dist/lib/internal/task-validate.js +2 -1
- package/dist/lib/merge.js +205 -103
- package/dist/lib/process-data/normalize.js +2 -9
- package/dist/lib/run/host.js +46 -16
- package/dist/lib/sandbox/agent-client-reconciler.js +4 -12
- package/dist/lib/sandbox/commands/create.js +3 -3
- package/dist/lib/sandbox/commands/enter.js +18 -4
- package/dist/lib/sandbox/config.js +3 -12
- package/dist/lib/sandbox/control/executor.js +131 -39
- package/dist/lib/sandbox/control/lifecycle.js +29 -20
- package/dist/lib/sandbox/control/server.js +18 -16
- package/dist/lib/sandbox/mounts.js +3 -2
- package/dist/lib/sandbox/recovery.js +123 -22
- package/dist/lib/sandbox/workspace-identity.js +14 -0
- package/dist/lib/sandbox/workspace-view.js +8 -9
- package/dist/lib/self-update.js +278 -0
- package/dist/lib/server/protocol.js +5 -5
- package/dist/lib/task/activity-log.js +4 -1
- package/dist/lib/task/artifact-lifecycle.js +4 -2
- package/dist/lib/task/codex-orchestration.js +1 -1
- package/dist/lib/task/command-options.js +1 -3
- package/dist/lib/task/commands/cat.js +0 -5
- package/dist/lib/task/commands/decisions.js +76 -92
- package/dist/lib/task/commands/files.js +6 -6
- package/dist/lib/task/commands/grep.js +25 -61
- package/dist/lib/task/commands/issue-body.js +6 -6
- package/dist/lib/task/commands/log.js +25 -10
- package/dist/lib/task/commands/show.js +5 -6
- package/dist/lib/task/commands/status.js +8 -8
- package/dist/lib/task/commit-operation.js +21 -25
- package/dist/lib/task/commit-policy.js +1 -1
- package/dist/lib/task/control-authority.js +431 -0
- package/dist/lib/task/create.js +6 -1
- package/dist/lib/task/current-contract.js +35 -0
- package/dist/lib/task/decision-details.js +263 -0
- package/dist/lib/task/decision-intents.js +5 -2
- package/dist/lib/task/events.js +11 -5
- package/dist/lib/task/index.js +19 -20
- package/dist/lib/task/ledger-intents.js +8 -9
- package/dist/lib/task/ledger.js +13 -6
- package/dist/lib/task/lifecycle.js +16 -0
- package/dist/lib/task/orchestration.js +50 -13
- package/dist/lib/task/review-artifacts.js +31 -12
- package/dist/lib/task/review-finalization.js +19 -6
- package/dist/lib/task/verification-engine.js +38 -15
- package/dist/lib/task/verification-review.js +1 -1
- package/dist/lib/task/workspace-snapshot.js +5 -11
- package/dist/lib/task/write.js +11 -1
- package/dist/lib/update.js +6 -37
- package/dist/lib/version.js +5 -1
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-client.ts +0 -1
- package/lib/agent-clients/adapters/opencode-sandbox.ts +0 -5
- package/lib/agent-clients/adapters/traecli.ts +7 -8
- package/lib/agent-clients/config.ts +14 -144
- package/lib/agent-clients/reconcile.ts +1 -12
- package/lib/agent-clients/schema.ts +5 -4
- package/lib/agent-clients/tokens.ts +5 -18
- package/lib/decide.ts +12 -22
- package/lib/defaults.json +4 -0
- package/lib/init.ts +2 -2
- package/lib/internal/release-workflow.ts +0 -1
- package/lib/internal/task-finalization.ts +27 -13
- package/lib/internal/task-ledger.ts +8 -2
- package/lib/internal/task-lifecycle.ts +33 -76
- package/lib/internal/task-orchestration.ts +33 -190
- package/lib/internal/task-validate.ts +3 -2
- package/lib/merge.ts +236 -120
- package/lib/process-data/normalize.ts +2 -8
- package/lib/run/host.ts +63 -14
- package/lib/sandbox/agent-client-reconciler.ts +5 -15
- package/lib/sandbox/commands/create.ts +4 -4
- package/lib/sandbox/commands/enter.ts +24 -4
- package/lib/sandbox/config.ts +2 -14
- package/lib/sandbox/control/container-identity.ts +2 -2
- package/lib/sandbox/control/executor.ts +148 -51
- package/lib/sandbox/control/lifecycle.ts +34 -28
- package/lib/sandbox/control/protocol.ts +1 -3
- package/lib/sandbox/control/server.ts +15 -12
- package/lib/sandbox/control/state.ts +7 -7
- package/lib/sandbox/mounts.ts +4 -3
- package/lib/sandbox/recovery.ts +162 -34
- package/lib/sandbox/tools.ts +1 -1
- package/lib/sandbox/workspace-identity.ts +28 -0
- package/lib/sandbox/workspace-view.ts +14 -10
- package/lib/self-update.ts +341 -0
- package/lib/server/protocol.ts +5 -5
- package/lib/task/activity-log.ts +6 -1
- package/lib/task/artifact-lifecycle.ts +5 -3
- package/lib/task/codex-orchestration.ts +2 -1
- package/lib/task/command-options.ts +1 -2
- package/lib/task/commands/cat.ts +0 -4
- package/lib/task/commands/decisions.ts +80 -75
- package/lib/task/commands/files.ts +6 -6
- package/lib/task/commands/grep.ts +23 -51
- package/lib/task/commands/issue-body.ts +6 -6
- package/lib/task/commands/log.ts +22 -10
- package/lib/task/commands/show.ts +5 -6
- package/lib/task/commands/status.ts +8 -8
- package/lib/task/commit-operation.ts +25 -30
- package/lib/task/commit-policy.ts +1 -2
- package/lib/task/control-authority.ts +563 -0
- package/lib/task/create.ts +6 -1
- package/lib/task/current-contract.ts +49 -0
- package/lib/task/decision-details.ts +340 -0
- package/lib/task/decision-intents.ts +7 -2
- package/lib/task/events.ts +10 -5
- package/lib/task/index.ts +19 -20
- package/lib/task/ledger-intents.ts +6 -8
- package/lib/task/ledger.ts +17 -7
- package/lib/task/lifecycle.ts +20 -0
- package/lib/task/orchestration.ts +40 -15
- package/lib/task/review-artifacts.ts +53 -15
- package/lib/task/review-finalization.ts +33 -7
- package/lib/task/verification-engine.ts +33 -18
- package/lib/task/verification-review.ts +1 -1
- package/lib/task/workspace-snapshot.ts +4 -13
- package/lib/task/write.ts +20 -1
- package/lib/update.ts +6 -40
- package/lib/version.ts +6 -1
- package/package.json +1 -1
- package/templates/.agents/README.en.md +5 -3
- package/templates/.agents/README.zh-CN.md +5 -3
- package/templates/.agents/rules/compatibility-policy.en.md +5 -4
- package/templates/.agents/rules/compatibility-policy.zh-CN.md +5 -4
- package/templates/.agents/rules/create-issue.github.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
- package/templates/.agents/rules/human-decision-context.en.md +9 -7
- package/templates/.agents/rules/human-decision-context.zh-CN.md +9 -7
- package/templates/.agents/rules/issue-fields.github.en.md +1 -1
- package/templates/.agents/rules/issue-fields.github.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.en.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.github.en.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.github.en.md +1 -1
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +2 -2
- package/templates/.agents/rules/milestone-inference.github.en.md +1 -1
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +1 -1
- package/templates/.agents/rules/next-step-output.en.md +3 -3
- package/templates/.agents/rules/next-step-output.zh-CN.md +3 -3
- package/templates/.agents/rules/no-mid-flow-questions.en.md +1 -1
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +1 -1
- package/templates/.agents/rules/pr-sync.en.md +1 -1
- package/templates/.agents/rules/pr-sync.github.en.md +1 -1
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +1 -1
- package/templates/.agents/rules/pr-sync.zh-CN.md +1 -1
- package/templates/.agents/rules/release-commands.github.en.md +6 -0
- package/templates/.agents/rules/release-commands.github.zh-CN.md +6 -0
- package/templates/.agents/rules/review-handshake.en.md +1 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +1 -1
- package/templates/.agents/rules/task-management.en.md +1 -2
- package/templates/.agents/rules/task-management.zh-CN.md +1 -2
- package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/block-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/SKILL.en.md +27 -7
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +3 -4
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +5 -5
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +5 -5
- 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/create-pr/SKILL.en.md +5 -7
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +5 -7
- package/templates/.agents/skills/create-pr/reference/change-report.en.md +9 -4
- package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +9 -4
- package/templates/.agents/skills/create-pr/scripts/change-report.mjs +203 -0
- package/templates/.agents/skills/create-release-note/SKILL.en.md +5 -6
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +5 -6
- package/templates/.agents/skills/create-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/restore-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +5 -3
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +5 -3
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.en.md +2 -1
- package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +2 -1
- package/templates/.agents/skills/review-plan/SKILL.en.md +5 -3
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/review-plan/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +4 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +4 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +4 -0
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +4 -0
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +2 -2
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +140 -109
- package/templates/.agents/skills/watch-pr/SKILL.en.md +2 -2
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +2 -2
- package/templates/.agents/templates/task.en.md +1 -1
- package/templates/.agents/templates/task.zh-CN.md +1 -1
- package/templates/.claude/commands/analyze-task.en.md +1 -1
- package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.claude/commands/block-task.en.md +1 -1
- package/templates/.claude/commands/block-task.zh-CN.md +1 -1
- package/templates/.claude/commands/cancel-task.en.md +1 -1
- package/templates/.claude/commands/cancel-task.zh-CN.md +1 -1
- package/templates/.claude/commands/check-task.en.md +1 -1
- package/templates/.claude/commands/check-task.zh-CN.md +1 -1
- package/templates/.claude/commands/code-task.en.md +1 -1
- package/templates/.claude/commands/code-task.zh-CN.md +1 -1
- package/templates/.claude/commands/commit.en.md +1 -1
- package/templates/.claude/commands/commit.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-manual-validation.en.md +1 -1
- package/templates/.claude/commands/complete-manual-validation.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-task.en.md +1 -1
- package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
- package/templates/.claude/commands/create-pr.en.md +1 -1
- package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
- package/templates/.claude/commands/plan-task.en.md +1 -1
- package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
- package/templates/.claude/commands/review-analysis.en.md +1 -1
- package/templates/.claude/commands/review-analysis.zh-CN.md +1 -1
- package/templates/.claude/commands/review-code.en.md +1 -1
- package/templates/.claude/commands/review-code.zh-CN.md +1 -1
- package/templates/.claude/commands/review-plan.en.md +1 -1
- package/templates/.claude/commands/review-plan.zh-CN.md +1 -1
- package/templates/.claude/commands/run-manual-validation.en.md +1 -1
- package/templates/.claude/commands/run-manual-validation.zh-CN.md +1 -1
- package/templates/.claude/commands/run-task.en.md +1 -1
- package/templates/.claude/commands/run-task.zh-CN.md +1 -1
- package/templates/.claude/commands/watch-pr.en.md +1 -1
- package/templates/.claude/commands/watch-pr.zh-CN.md +1 -1
- package/templates/{.trae/skills → .traecli/commands}/update-agent-infra.en.md +0 -1
- package/templates/{.trae/skills → .traecli/commands}/update-agent-infra.zh-CN.md +0 -1
- package/dist/lib/builtin-tuis.js +0 -40
- package/lib/builtin-tuis.ts +0 -56
|
@@ -14,6 +14,12 @@ agent-infra-internal platform-release-notes context \
|
|
|
14
14
|
|
|
15
15
|
结果包含 `history`、`pullRequests`、`closingIssues` 和带规范化 `login` / `resolution` 的 commit `authors`。`status: no-op` 且错误码为 `PLATFORM_RELEASE_NOTES_UNSUPPORTED` 表示当前平台不支持远端发布说明能力。
|
|
16
16
|
|
|
17
|
+
### 身份安全边界
|
|
18
|
+
|
|
19
|
+
- 只有 `resolution` 为 `platform-user` 或 `platform-noreply` 且 `login` 非空的身份可以渲染为 `@login`。
|
|
20
|
+
- `resolution: unresolved` 的身份不得进入发布说明的贡献者列表;不得从 Name、邮箱、域名、品牌或同名平台账号推断 login,也不得替换成推测的个人或组织账号。
|
|
21
|
+
- 不得把未解析身份的邮箱或身份确认 TODO 写入可发布的 Release notes。需要调查时仅在发布流程外记录,不得产生平台 mention。
|
|
22
|
+
|
|
17
23
|
## Stage Release notes
|
|
18
24
|
|
|
19
25
|
```bash
|
|
@@ -82,7 +82,7 @@ When an executor judges an item to be a key design decision that needs human rul
|
|
|
82
82
|
- `severity` is always `decision`.
|
|
83
83
|
- `status` starts as `needs-human-decision`, so the existing gate blocks it.
|
|
84
84
|
- `evidence` points to the stable anchor `<artifact>#HD-N` (e.g. `plan-r2.md#HD-1`), not a drift-prone line number.
|
|
85
|
-
- A human records the ruling with `ai decide <
|
|
85
|
+
- A human records the ruling with `ai decide [--task <ref> | -t <ref>] (--item <ordinal|ledger-id> | -i <ordinal|ledger-id>) <decision>`; the command flips the target row to `human-decided` and points `evidence` to an independent `HDR-N` ruling record.
|
|
86
86
|
|
|
87
87
|
> Viewing, deciding, and typed verification share the `lib/task/ledger.ts` domain semantics; no second parser is maintained.
|
|
88
88
|
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
- `severity` 固定填 `decision`。
|
|
83
83
|
- `status` 初始填 `needs-human-decision`,因此会被现有 gate 阻塞。
|
|
84
84
|
- `evidence` 指向稳定锚点 `<artifact>#HD-N`(如 `plan-r2.md#HD-1`),不依赖易漂移的行号。
|
|
85
|
-
- 人工使用 `ai decide <
|
|
85
|
+
- 人工使用 `ai decide [--task <ref> | -t <ref>] (--item <序号|账本ID> | -i <序号|账本ID>) <裁决内容>` 记录裁定;命令把目标行翻为 `human-decided`,并让 `evidence` 指向独立 `HDR-N` 裁定记录。
|
|
86
86
|
|
|
87
87
|
> 查看、裁决与 typed verification 共用 `lib/task/ledger.ts` 的领域语义,不维护第二 parser。
|
|
88
88
|
|
|
@@ -23,9 +23,8 @@ Map user intent to the corresponding workflow command:
|
|
|
23
23
|
|
|
24
24
|
`--agent` values must converge on the standard AI collaborator tokens; OS usernames (e.g. `devuser`) and git usernames (e.g. a human name) are forbidden. The standard set (short tokens are the single source of truth for the activity log):
|
|
25
25
|
|
|
26
|
-
- AI short tokens: `claude` / `codex` / `antigravity` / `opencode` / `cursor`
|
|
26
|
+
- AI short tokens: `claude` / `codex` / `antigravity` / `opencode` / `cursor` / `traecli`
|
|
27
27
|
- Long-name mapping (normalized to the short token before writing): `claude-code` -> `claude`, `antigravity-cli` -> `antigravity`
|
|
28
|
-
- Historical `gemini` / `gemini-cli` remain read-only for `ai task log` rendering and are not writable
|
|
29
28
|
- Manual-step exception: no matter which agent is used, a human-made decision is always declared as `human`
|
|
30
29
|
|
|
31
30
|
The seven internal commands (`task-event` / `task-lifecycle` / `task-finalization` / `platform-issue` / `platform-comment` / `platform-pr` / `task-orchestration`) hard-validate `--agent` against a whitelist: they accept a short token, a long name, or `human`, and reject non-standard values with the matching `*_PAYLOAD_INVALID` error; long names are normalized to the short token before being persisted or forwarded. The `ai task log` renderer keeps unknown tokens grouped as `human` but appends a visible `(unknown)` marker.
|
|
@@ -23,9 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
`--agent` 取值必须收敛到标准 AI 合作者 token,禁止填入 OS 系统用户名(如 `devuser`)或 git 用户名(如 `季聿阶`)。标准集合(短名为活动日志唯一事实来源):
|
|
25
25
|
|
|
26
|
-
- AI 短名:`claude` / `codex` / `antigravity` / `opencode` / `cursor`
|
|
26
|
+
- AI 短名:`claude` / `codex` / `antigravity` / `opencode` / `cursor` / `traecli`
|
|
27
27
|
- 长名映射(写入前归一化为短名):`claude-code` → `claude`、`antigravity-cli` → `antigravity`
|
|
28
|
-
- 历史 `gemini` / `gemini-cli` 仅保留 `ai task log` 渲染兼容,不接受写入
|
|
29
28
|
- 人工步骤例外:无论使用哪个 Agent,只要是人做的决定,统一声明 `human`
|
|
30
29
|
|
|
31
30
|
七个内部命令(`task-event` / `task-lifecycle` / `task-finalization` / `platform-issue` / `platform-comment` / `platform-pr` / `task-orchestration`)对 `--agent` 做白名单硬校验:接受短名、长名或 `human`,非标准值返回对应 `*_PAYLOAD_INVALID` 错误;长名在落库/透传前归一化为短名。渲染端 `ai task log` 对无法识别的 token 保留 `human` 归类并附加 `(unknown)` 标记。
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Analyze Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to the completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
24
24
|
|
|
25
25
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first. Reading instruction files does not count as an external-state action or conclusion.
|
|
26
26
|
|
|
27
|
-
Run these commands and paste the raw output into
|
|
27
|
+
Run these commands and paste the raw output into this round's `## State Check` section:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -34,7 +34,7 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
34
34
|
|
|
35
35
|
## Task Context Resolution
|
|
36
36
|
|
|
37
|
-
> The entry point may omit the task ref
|
|
37
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
38
38
|
|
|
39
39
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
40
40
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 分析任务
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ description: >
|
|
|
24
24
|
|
|
25
25
|
在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -34,7 +34,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
34
34
|
|
|
35
35
|
## 任务上下文解析
|
|
36
36
|
|
|
37
|
-
>
|
|
37
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
38
38
|
|
|
39
39
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
40
40
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Block Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## Boundary / Critical Rules
|
|
@@ -26,7 +26,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
26
26
|
|
|
27
27
|
## Task Context Resolution
|
|
28
28
|
|
|
29
|
-
> The entry point may omit the task ref
|
|
29
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
30
30
|
|
|
31
31
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
32
32
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 标记任务阻塞
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## 行为边界 / 关键规则
|
|
@@ -26,7 +26,7 @@ description: >
|
|
|
26
26
|
|
|
27
27
|
## 任务上下文解析
|
|
28
28
|
|
|
29
|
-
>
|
|
29
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
30
30
|
|
|
31
31
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
32
32
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Cancel Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## Boundary / Critical Rules
|
|
@@ -20,7 +20,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
20
20
|
|
|
21
21
|
## Task Context Resolution
|
|
22
22
|
|
|
23
|
-
> The entry point may omit the task ref
|
|
23
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
24
24
|
|
|
25
25
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
26
26
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 取消任务
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## 行为边界 / 关键规则
|
|
@@ -20,7 +20,7 @@ description: >
|
|
|
20
20
|
|
|
21
21
|
## 任务上下文解析
|
|
22
22
|
|
|
23
|
-
>
|
|
23
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
24
24
|
|
|
25
25
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
26
26
|
|
|
@@ -15,7 +15,7 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
## Task Context Resolution
|
|
17
17
|
|
|
18
|
-
> The entry point may omit the task ref
|
|
18
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
19
19
|
|
|
20
20
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ description: >
|
|
|
26
26
|
Run the deterministic CLI to collect every mechanical fact, and use its stdout as the factual base of your report:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
ai task status {task-id}
|
|
29
|
+
ai task status --task {task-id}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
The command resolves the task across the active, blocked, and completed directories and prints five sections: the task header (`id`, short id, title), `Metadata` (frontmatter fields), `Artifacts` (files grouped by workflow stage), `Git` (branch match, uncommitted count, ahead/behind), and `Platform` (Issue/PR state). Treat that output as authoritative -- do not re-derive any of it by hand.
|
|
@@ -15,7 +15,7 @@ description: >
|
|
|
15
15
|
|
|
16
16
|
## 任务上下文解析
|
|
17
17
|
|
|
18
|
-
>
|
|
18
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
19
19
|
|
|
20
20
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ description: >
|
|
|
26
26
|
运行确定性 CLI 收集全部机械数据,并以其 stdout 作为状态报告的事实基底:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
ai task status {task-id}
|
|
29
|
+
ai task status --task {task-id}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
该命令会跨 active、blocked、completed 三目录解析任务,并输出五段:任务头(`id`、短号、标题)、`Metadata`(frontmatter 字段)、`Artifacts`(按工作流阶段分组的产物)、`Git`(分支匹配、未提交数、ahead/behind)、`Platform`(Issue/PR 状态)。把该输出视为权威事实 —— 不要再手工复述其中任何内容。
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Dismiss Code Scanning Alert
|
|
9
|
-
> `--agent` values
|
|
9
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Dismiss the specified Code Scanning (CodeQL) alert and record a justified reason.
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 关闭 Code Scanning 告警
|
|
9
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
9
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
关闭指定的 Code Scanning(CodeQL)告警并记录合理的关闭理由。
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Dismiss Dependabot Alert
|
|
9
|
-
> `--agent` values
|
|
9
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Dismiss the specified Dependabot security alert and record a justified reason.
|
|
@@ -6,7 +6,7 @@ description: >
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 关闭 Dependabot 告警
|
|
9
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
9
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
关闭指定的 Dependabot 安全告警并记录合理的关闭理由。
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Code Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
If the entry operands contain `--orchestrated`, bind `{execution-flag}` to `--orchestrated` and forward it unchanged to the completed event; otherwise bind it to an empty value. Never infer it from `orchestration.json`, environment variables, or prior artifacts.
|
|
13
13
|
|
|
@@ -29,7 +29,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
29
29
|
|
|
30
30
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first.
|
|
31
31
|
|
|
32
|
-
Run these commands and paste the raw output into
|
|
32
|
+
Run these commands and paste the raw output into this round's `## State Check` section:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -37,7 +37,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
37
37
|
|
|
38
38
|
## Task Context Resolution
|
|
39
39
|
|
|
40
|
-
> The entry point may omit the task ref
|
|
40
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
41
41
|
|
|
42
42
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
43
43
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 编码任务
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
若入口业务操作数包含 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated` 并原样转发给 completed 事件;否则绑定为空。不得从 `orchestration.json`、环境变量或历史产物推断该标记。
|
|
13
13
|
|
|
@@ -42,7 +42,7 @@ description: >
|
|
|
42
42
|
|
|
43
43
|
在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -52,7 +52,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
52
52
|
|
|
53
53
|
## 任务上下文解析
|
|
54
54
|
|
|
55
|
-
>
|
|
55
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
56
56
|
|
|
57
57
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
58
58
|
|
|
@@ -7,15 +7,15 @@ description: >
|
|
|
7
7
|
|
|
8
8
|
# Commit code
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
> See the collaborator token convention in `.agents/rules/task-management.md` for valid `--agent` values.
|
|
11
11
|
|
|
12
|
-
Create a Git commit without overwriting local work, and update the associated task
|
|
12
|
+
Create a Git commit without overwriting local work, and update the associated task state when needed.
|
|
13
13
|
|
|
14
14
|
The commit core returns one primary result: `committed`, `no_op`, `committed_with_warnings`, `failed`, or `blocked`, with structured `warnings`. A push failure or protected-branch policy never rolls back a local commit.
|
|
15
15
|
|
|
16
16
|
## Task context
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. First call `agent-infra-internal task-context resolve {task-scope}`.
|
|
19
19
|
|
|
20
20
|
- An explicit task-resolution failure stops the operation.
|
|
21
21
|
- Without an explicit task scope, only `TASK_CONTEXT_NOT_FOUND` may enter taskless direct mode; detached HEAD, malformed candidates, and multiple matches fail closed.
|
|
@@ -33,7 +33,7 @@ git status --short
|
|
|
33
33
|
git diff
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Respect existing user changes
|
|
36
|
+
Respect existing user changes. If the planned work conflicts with them, stop and record the blocking reason according to the no-mid-flow-questions rule.
|
|
37
37
|
|
|
38
38
|
## 2. Update copyright years
|
|
39
39
|
|
|
@@ -47,12 +47,30 @@ Review status, diff, and recent history. Use an imperative Conventional Commit m
|
|
|
47
47
|
|
|
48
48
|
Read `reference/commit-orchestration.md` before this step.
|
|
49
49
|
|
|
50
|
-
Write the message, explicit paths, expected HEAD/tree, task scope, agent, mode, and
|
|
50
|
+
Write the message, explicit paths, expected HEAD/tree, task scope, agent, mode, and required push policy to a temporary JSON file, then call:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
53
|
agent-infra-internal git-workflow commit --input {commit-operation.json}
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
Example:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"taskRef": "TASK-YYYYMMDD-HHMMSS",
|
|
61
|
+
"agent": "codex",
|
|
62
|
+
"mode": "direct",
|
|
63
|
+
"paths": ["lib/example.ts", "tests/example.test.ts"],
|
|
64
|
+
"message": "fix(core): validate example input",
|
|
65
|
+
"expectedHead": "{HEAD}",
|
|
66
|
+
"expectedTree": "{TREE}",
|
|
67
|
+
"push": {
|
|
68
|
+
"remote": "origin",
|
|
69
|
+
"refs": ["refs/heads/{branch}"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
56
74
|
Taskless direct mode omits `taskRef`; orchestrated mode must pass `taskRef`, `agent`, and `mode: "orchestrated"`. The core owns repository/worktree mutation locking, task locking when bound, path and sensitive-file checks, staged scope, HEAD/tree, branch/ref, commit, push, protected-branch policy, warnings, and idempotency.
|
|
57
75
|
|
|
58
76
|
- Create at most one local commit for explicit changes.
|
|
@@ -63,7 +81,9 @@ Taskless direct mode omits `taskRef`; orchestrated mode must pass `taskRef`, `ag
|
|
|
63
81
|
|
|
64
82
|
## 5. Finish task and platform synchronization
|
|
65
83
|
|
|
66
|
-
Continue task synchronization
|
|
84
|
+
Continue task synchronization from the core-returned task result for task-bound operations; taskless operations skip task verification and platform synchronization.
|
|
85
|
+
|
|
86
|
+
When the task has an associated Issue or PR, follow `reference/issue-metadata-sync.md`, `reference/pr-summary-sync.md`, and the platform rules. The commit path passes `--result no_op` to summary-sync because it only synchronizes an existing PR identity. Synchronization failures are warnings and do not roll back the local commit.
|
|
67
87
|
|
|
68
88
|
After task-bound finalization, run:
|
|
69
89
|
|
|
@@ -76,7 +96,7 @@ Do not claim task finalization without fresh verification output.
|
|
|
76
96
|
|
|
77
97
|
## 6. Render the next step
|
|
78
98
|
|
|
79
|
-
|
|
99
|
+
Before rendering the next step, read `.agents/rules/next-step-output.md` and call the unified helper exactly once based on the latest task and PR state. A failed push keeps the task active and reports only diagnostics; a final commit routes to `create-pr` or `complete-task` according to `prFlow`.
|
|
80
100
|
|
|
81
101
|
## Notes
|
|
82
102
|
|
|
@@ -15,7 +15,7 @@ commit core 只返回一个主结果:`committed`、`no_op`、`committed_with_w
|
|
|
15
15
|
|
|
16
16
|
## 任务上下文
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。先调用 `agent-infra-internal task-context resolve {task-scope}`。
|
|
19
19
|
|
|
20
20
|
- 显式 task scope 解析失败时停止。
|
|
21
21
|
- 未显式指定 task scope 时,只有 `TASK_CONTEXT_NOT_FOUND` 可进入 taskless direct;detached HEAD、损坏候选或多匹配必须 fail closed。
|
|
@@ -47,7 +47,7 @@ git diff
|
|
|
47
47
|
|
|
48
48
|
执行本步骤前读取 `reference/commit-orchestration.md`。
|
|
49
49
|
|
|
50
|
-
将 message、明确 paths、expected HEAD/tree、task scope、agent、mode
|
|
50
|
+
将 message、明确 paths、expected HEAD/tree、task scope、agent、mode 和必填 push policy 写入临时 JSON,然后调用:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
53
|
agent-infra-internal git-workflow commit --input {commit-operation.json}
|
|
@@ -66,8 +66,7 @@ agent-infra-internal git-workflow commit --input {commit-operation.json}
|
|
|
66
66
|
"expectedTree": "{TREE}",
|
|
67
67
|
"push": {
|
|
68
68
|
"remote": "origin",
|
|
69
|
-
"refs": ["refs/heads/{branch}"]
|
|
70
|
-
"automatic": true
|
|
69
|
+
"refs": ["refs/heads/{branch}"]
|
|
71
70
|
}
|
|
72
71
|
}
|
|
73
72
|
```
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Complete Manual Validation
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## Boundary / Critical Rules
|
|
@@ -23,7 +23,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
23
23
|
|
|
24
24
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first. Reading instruction files does not count as an external-state action or conclusion.
|
|
25
25
|
|
|
26
|
-
Run these commands and paste the raw output into
|
|
26
|
+
Run these commands and paste the raw output into this round's `## State Check` section:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -31,7 +31,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
31
31
|
|
|
32
32
|
## Task Context Resolution
|
|
33
33
|
|
|
34
|
-
> The entry point may omit the task ref
|
|
34
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
35
35
|
|
|
36
36
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
37
37
|
|
|
@@ -46,10 +46,10 @@ After resolving the artifact context and before this round's first artifact acti
|
|
|
46
46
|
Input:
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
|
-
complete-manual-validation
|
|
49
|
+
complete-manual-validation [--task <ref> | -t <ref>] [{pr-ref}] {verification-summary}
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
-
|
|
52
|
+
- The task scope may be omitted; explicit scope accepts only `--task <ref>` or `-t <ref>`.
|
|
53
53
|
- `{pr-ref}` is optional and accepts `#NN`, `NN`, or a full PR URL.
|
|
54
54
|
- `{verification-summary}` is required. If it is missing, stop and ask for a validation summary; do not write an artifact or update the PR.
|
|
55
55
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 完成人工验证
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## 行为边界 / 关键规则
|
|
@@ -23,7 +23,7 @@ description: >
|
|
|
23
23
|
|
|
24
24
|
在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -31,7 +31,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
31
31
|
|
|
32
32
|
## 任务上下文解析
|
|
33
33
|
|
|
34
|
-
>
|
|
34
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
35
35
|
|
|
36
36
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
37
37
|
|
|
@@ -46,10 +46,10 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
46
46
|
输入格式:
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
|
-
complete-manual-validation
|
|
49
|
+
complete-manual-validation [--task <ref> | -t <ref>] [{pr-ref}] {verification-summary}
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
-
|
|
52
|
+
- task scope 可省略;显式 scope 只接受 `--task <ref>` 或 `-t <ref>`。
|
|
53
53
|
- `{pr-ref}` 可选,支持 `#NN`、`NN` 或完整 PR URL。
|
|
54
54
|
- `{verification-summary}` 必填。若缺失,立即停止并提示补充验证说明;不写产物、不更新 PR。
|
|
55
55
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Complete Task
|
|
10
|
-
> `--agent` values
|
|
10
|
+
> `--agent` values are defined in `.agents/rules/task-management.md` under “Collaborator Token Specification”.
|
|
11
11
|
|
|
12
12
|
Host finalization uses receipt v2 with an immutable `receiptId`, monotonic `revision`, and canonical warnings. Lifecycle/identity/required-PR hard failures return `result: failed|blocked`; after lifecycle succeeds, comment, peripheral verification, and other sync failures return `result: completed_with_warnings` and six-field warnings, retrying only receipt-pending steps.
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
24
24
|
|
|
25
25
|
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first. Reading instruction files does not count as an external-state action or conclusion.
|
|
26
26
|
|
|
27
|
-
Run these commands and paste the raw output into
|
|
27
|
+
Run these commands and paste the raw output into this round's `## State Check` section:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -34,7 +34,7 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
34
34
|
|
|
35
35
|
## Task Context Resolution
|
|
36
36
|
|
|
37
|
-
> The entry point may omit the task ref
|
|
37
|
+
> The entry point may omit the task ref; explicit task scope accepts only `--task <ref>` or `-t <ref>`, and positional task refs are not interpreted. Preserve every other business operand, then call `agent-infra-internal task-context resolve {task-scope}` where `{task-scope}` is empty or one task flag. Read only `taskId` from the structured result and bind `{task-id}` to the full `TASK-YYYYMMDD-HHMMSS` for downstream commands. Pass through resolution failures without scanning tasks locally.
|
|
38
38
|
|
|
39
39
|
> Resolve the task reference, then confirm that the task is in a state or directory supported by this skill and that `task.md` exists; if it cannot be located, handle it as a missing task and stop.
|
|
40
40
|
|
|
@@ -7,7 +7,7 @@ description: >
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 完成任务
|
|
10
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token
|
|
10
|
+
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
11
11
|
|
|
12
12
|
宿主 finalization 使用 receipt v2(不可变 `receiptId`、单调 `revision` 和 canonical warnings)。生命周期/身份/required PR 等硬失败返回 `result: failed|blocked`;生命周期完成后,评论、外围验证和其他同步失败返回 `result: completed_with_warnings` 及六字段 warning,并仅重试 receipt 中的 pending step。
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ description: >
|
|
|
24
24
|
|
|
25
25
|
在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
运行以下命令,并把原文粘贴到本轮产物的 `## 状态核对` 段:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
agent-infra-internal task-snapshot {task-id} --format text
|
|
@@ -34,7 +34,7 @@ agent-infra-internal task-snapshot {task-id} --format text
|
|
|
34
34
|
|
|
35
35
|
## 任务上下文解析
|
|
36
36
|
|
|
37
|
-
>
|
|
37
|
+
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
|
|
38
38
|
|
|
39
39
|
> 解析任务引用,并确认任务位于本技能支持的状态或目录且存在 `task.md`;无法定位时按未找到任务处理并停止。
|
|
40
40
|
|