@fitlab-ai/agent-infra 0.7.1 → 0.7.3
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 +7 -1
- package/README.zh-CN.md +9 -3
- package/bin/cli.ts +11 -0
- package/dist/bin/cli.js +12 -0
- package/dist/lib/defaults.json +0 -1
- package/dist/lib/init.js +0 -3
- package/dist/lib/sandbox/commands/create.js +10 -2
- package/dist/lib/sandbox/commands/enter.js +17 -18
- package/dist/lib/sandbox/commands/list-running.js +56 -32
- package/dist/lib/sandbox/commands/ls.js +27 -24
- package/dist/lib/sandbox/commands/start.js +36 -0
- package/dist/lib/sandbox/index.js +15 -3
- package/dist/lib/sandbox/task-resolver.js +1 -1
- package/dist/lib/sandbox/tools.js +1 -1
- package/dist/lib/table.js +38 -0
- package/dist/lib/task/commands/ls.js +122 -0
- package/dist/lib/task/commands/show.js +135 -0
- package/dist/lib/task/frontmatter.js +32 -0
- package/dist/lib/task/index.js +41 -0
- package/dist/lib/task/short-id.js +90 -0
- package/dist/lib/update.js +25 -8
- package/lib/defaults.json +0 -1
- package/lib/init.ts +0 -10
- package/lib/sandbox/commands/create.ts +11 -2
- package/lib/sandbox/commands/enter.ts +40 -20
- package/lib/sandbox/commands/list-running.ts +65 -37
- package/lib/sandbox/commands/ls.ts +35 -27
- package/lib/sandbox/commands/start.ts +61 -0
- package/lib/sandbox/index.ts +15 -3
- package/lib/sandbox/task-resolver.ts +1 -1
- package/lib/sandbox/tools.ts +1 -1
- package/lib/table.ts +44 -0
- package/lib/task/commands/ls.ts +138 -0
- package/lib/task/commands/show.ts +139 -0
- package/lib/task/frontmatter.ts +30 -0
- package/lib/task/index.ts +44 -0
- package/lib/task/short-id.ts +107 -0
- package/lib/update.ts +28 -10
- package/package.json +1 -1
- package/templates/.agents/hooks/auto-resume.sh +104 -0
- 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/milestone-inference.github.en.md +4 -1
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -1
- package/templates/.agents/rules/next-step-output.en.md +62 -0
- package/templates/.agents/rules/next-step-output.zh-CN.md +62 -0
- package/templates/.agents/rules/pr-checks-commands.en.md +5 -0
- package/templates/.agents/rules/pr-checks-commands.github.en.md +62 -0
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +62 -0
- package/templates/.agents/rules/pr-checks-commands.zh-CN.md +5 -0
- package/templates/.agents/rules/pr-sync.github.en.md +7 -0
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +7 -0
- package/templates/.agents/rules/task-short-id.en.md +54 -62
- package/templates/.agents/rules/task-short-id.zh-CN.md +35 -54
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +17 -0
- package/templates/.agents/scripts/task-short-id.js +32 -189
- package/templates/.agents/skills/analyze-task/SKILL.en.md +10 -12
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +10 -12
- package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -1
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/block-task/SKILL.en.md +13 -6
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +13 -6
- package/templates/.agents/skills/block-task/config/verify.json +1 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +13 -6
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +13 -6
- package/templates/.agents/skills/cancel-task/config/verify.json +1 -1
- package/templates/.agents/skills/check-task/SKILL.en.md +12 -10
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +12 -10
- package/templates/.agents/skills/close-codescan/SKILL.en.md +13 -6
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +13 -6
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +13 -6
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +13 -6
- package/templates/.agents/skills/code-task/SKILL.en.md +10 -6
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +11 -6
- package/templates/.agents/skills/code-task/config/verify.en.json +2 -1
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +2 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +10 -5
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +10 -5
- 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/code-task/reference/report-template.en.md +8 -0
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +8 -0
- package/templates/.agents/skills/commit/SKILL.en.md +3 -4
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +3 -4
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +37 -29
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +37 -29
- package/templates/.agents/skills/complete-task/SKILL.en.md +41 -4
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +41 -4
- package/templates/.agents/skills/complete-task/config/verify.en.json +1 -1
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +20 -11
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +20 -11
- package/templates/.agents/skills/create-pr/config/verify.json +2 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +2 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +2 -1
- 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-task/SKILL.en.md +17 -17
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +17 -17
- package/templates/.agents/skills/create-task/config/verify.json +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +8 -8
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/import-codescan/config/verify.json +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +8 -8
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/import-dependabot/config/verify.json +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +7 -7
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +7 -7
- package/templates/.agents/skills/plan-task/SKILL.en.md +10 -12
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +10 -12
- package/templates/.agents/skills/plan-task/config/verify.en.json +1 -1
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +1 -1
- 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 +4 -2
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +4 -2
- package/templates/.agents/skills/review-analysis/config/verify.en.json +3 -2
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +3 -2
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +15 -15
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +15 -15
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +7 -1
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +7 -1
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +2 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +2 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +5 -2
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -2
- package/templates/.agents/skills/review-code/config/verify.en.json +3 -2
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +3 -2
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +9 -9
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +9 -9
- package/templates/.agents/skills/review-code/reference/report-template.en.md +7 -1
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +7 -1
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +2 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +2 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +4 -2
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +4 -2
- package/templates/.agents/skills/review-plan/config/verify.en.json +3 -2
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +3 -2
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +15 -15
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +15 -15
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +7 -1
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +7 -1
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +2 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +2 -0
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +0 -1
- package/templates/.agents/skills/watch-pr/SKILL.en.md +131 -0
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +131 -0
- package/templates/.agents/skills/watch-pr/config/verify.json +22 -0
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +43 -0
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +43 -0
- package/templates/.agents/templates/task.en.md +1 -1
- package/templates/.agents/templates/task.zh-CN.md +1 -1
- package/templates/.agents/workflows/bug-fix.en.yaml +7 -5
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +6 -5
- package/templates/.agents/workflows/feature-development.en.yaml +7 -5
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +6 -5
- package/templates/.agents/workflows/refactoring.en.yaml +7 -5
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +6 -5
- package/templates/.claude/commands/watch-pr.en.md +8 -0
- package/templates/.claude/commands/watch-pr.zh-CN.md +8 -0
- package/templates/.claude/settings.json +11 -0
- package/templates/.gemini/commands/_project_/watch-pr.en.toml +8 -0
- package/templates/.gemini/commands/_project_/watch-pr.zh-CN.toml +8 -0
- package/templates/.opencode/commands/watch-pr.en.md +11 -0
- package/templates/.opencode/commands/watch-pr.zh-CN.md +11 -0
|
@@ -9,7 +9,8 @@ Read this file before creating or updating the single reviewer-facing PR summary
|
|
|
9
9
|
- Generate or update the `<!-- sync-pr:{task-id}:summary -->` comment with the canonical template from `.agents/rules/pr-sync.md`
|
|
10
10
|
- When a matching summary comment already exists, PATCH only when the body changed; otherwise skip the write
|
|
11
11
|
- In this skill, summary sync failures follow the existing `create-pr` error handling and must not roll back an already-created PR
|
|
12
|
+
- Populate the "Manual Verification Required" section per the aggregation rules in `.agents/rules/pr-sync.md` (sources: plan assumptions/open questions, review-code "Environment-Blocked Findings"/"Self-Doubt"); write the explicit placeholder when there are none
|
|
12
13
|
|
|
13
14
|
## Result Reporting
|
|
14
15
|
|
|
15
|
-
Reuse the normalized result string from `.agents/rules/pr-sync.md` in this skill's user output or `PR
|
|
16
|
+
Reuse the normalized result string from `.agents/rules/pr-sync.md` in this skill's user output or `Create PR` Activity Log.
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
- 按 `.agents/rules/pr-sync.md` 中的唯一权威模板生成或更新 `<!-- sync-pr:{task-id}:summary -->` 评论
|
|
10
10
|
- PR 已存在同标记评论时,只在正文变化时 PATCH;否则跳过写入
|
|
11
11
|
- 本 skill 中,摘要同步失败沿用 `create-pr` 的现有错误处理,不回滚已经创建的 PR
|
|
12
|
+
- 按 `.agents/rules/pr-sync.md` 的聚合规则填充「需人工校验」段落(来源:plan 假设/未决问题、review-code 环境性遗留/自我质疑);无事项时写显式占位
|
|
12
13
|
|
|
13
14
|
## 结果回传
|
|
14
15
|
|
|
15
|
-
将 `.agents/rules/pr-sync.md` 中的结果回传字符串用于当前 skill 的用户输出或 `PR
|
|
16
|
+
将 `.agents/rules/pr-sync.md` 中的结果回传字符串用于当前 skill 的用户输出或 `Create PR` Activity Log 复用。
|
|
@@ -69,7 +69,7 @@ Final user output should include this follow-up path:
|
|
|
69
69
|
```text
|
|
70
70
|
Next steps:
|
|
71
71
|
- complete the task after the workflow truly finishes:
|
|
72
|
-
- Claude Code / OpenCode: /complete-task {task-
|
|
73
|
-
- Gemini CLI: /agent-infra:complete-task {task-
|
|
74
|
-
- Codex CLI: $complete-task {task-
|
|
72
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
73
|
+
- Gemini CLI: /agent-infra:complete-task {task-ref}
|
|
74
|
+
- Codex CLI: $complete-task {task-ref}
|
|
75
75
|
```
|
|
@@ -69,7 +69,7 @@ Milestone 规则:
|
|
|
69
69
|
```text
|
|
70
70
|
Next steps:
|
|
71
71
|
- complete the task after the workflow truly finishes:
|
|
72
|
-
- Claude Code / OpenCode: /complete-task {task-
|
|
73
|
-
- Gemini CLI: /agent-infra:complete-task {task-
|
|
74
|
-
- Codex CLI: $complete-task {task-
|
|
72
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
73
|
+
- Gemini CLI: /agent-infra:complete-task {task-ref}
|
|
74
|
+
- Codex CLI: $complete-task {task-ref}
|
|
75
75
|
```
|
|
@@ -24,7 +24,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
24
24
|
|
|
25
25
|
## Task id short ref
|
|
26
26
|
|
|
27
|
-
> If `{task-id}`
|
|
27
|
+
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
28
28
|
|
|
29
29
|
## Steps
|
|
30
30
|
|
|
@@ -109,12 +109,12 @@ Update `.agents/workspace/active/{task-id}/task.md`:
|
|
|
109
109
|
- `## Context` -> `- **Branch**:`: update it to the generated branch name
|
|
110
110
|
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
111
111
|
```
|
|
112
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Task
|
|
112
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create Task** by {agent} — Task created from description
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
### 4. Cascade Issue Creation via `.agents/rules/create-issue.md`
|
|
116
116
|
|
|
117
|
-
After task.md is written and `Task
|
|
117
|
+
After task.md is written and `Create Task` is recorded, read `.agents/rules/create-issue.md` first and follow the steps it describes to create an Issue.
|
|
118
118
|
|
|
119
119
|
The rule's content is determined by the configured code platform:
|
|
120
120
|
- A platform that supports Issue creation: contains the full flow for auth detection, template detection, label/type/milestone inference, the create-Issue call, and writing back to `task.md`
|
|
@@ -130,7 +130,7 @@ Handle the result:
|
|
|
130
130
|
|
|
131
131
|
### 5. Verification Gate
|
|
132
132
|
|
|
133
|
-
**Allocate short id first** (
|
|
133
|
+
**Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
136
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -155,14 +155,14 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
155
155
|
|
|
156
156
|
> Execute this step only after the verification gate passes.
|
|
157
157
|
|
|
158
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
158
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id `#NN` (falling back to the full TASK-id when unallocated or released); (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).
|
|
159
159
|
|
|
160
160
|
Scenario A: when an Issue was created, output:
|
|
161
161
|
```
|
|
162
162
|
Task created and Issue creation cascaded successfully.
|
|
163
163
|
|
|
164
164
|
Task information:
|
|
165
|
-
- Task ID: {task-id}
|
|
165
|
+
- Task ID: {task-id} (short id {task-ref})
|
|
166
166
|
- Title: {title}
|
|
167
167
|
- Type: {type}
|
|
168
168
|
- Workflow: {workflow}
|
|
@@ -172,9 +172,9 @@ Output file:
|
|
|
172
172
|
- Task file: .agents/workspace/active/{task-id}/task.md
|
|
173
173
|
|
|
174
174
|
Next step - run requirements analysis:
|
|
175
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
176
|
-
- Gemini CLI: /{{project}}:analyze-task {task-
|
|
177
|
-
- Codex CLI: $analyze-task {task-
|
|
175
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
176
|
+
- Gemini CLI: /{{project}}:analyze-task {task-ref}
|
|
177
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
Scenario B: when no Issue was created, output:
|
|
@@ -182,7 +182,7 @@ Scenario B: when no Issue was created, output:
|
|
|
182
182
|
Task created.
|
|
183
183
|
|
|
184
184
|
Task information:
|
|
185
|
-
- Task ID: {task-id}
|
|
185
|
+
- Task ID: {task-id} (short id {task-ref})
|
|
186
186
|
- Title: {title}
|
|
187
187
|
- Type: {type}
|
|
188
188
|
- Workflow: {workflow}
|
|
@@ -191,9 +191,9 @@ Output file:
|
|
|
191
191
|
- Task file: .agents/workspace/active/{task-id}/task.md
|
|
192
192
|
|
|
193
193
|
Next step - run requirements analysis:
|
|
194
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
195
|
-
- Gemini CLI: /{{project}}:analyze-task {task-
|
|
196
|
-
- Codex CLI: $analyze-task {task-
|
|
194
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
195
|
+
- Gemini CLI: /{{project}}:analyze-task {task-ref}
|
|
196
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
197
197
|
```
|
|
198
198
|
|
|
199
199
|
Scenario C: when Issue creation failed, output:
|
|
@@ -201,7 +201,7 @@ Scenario C: when Issue creation failed, output:
|
|
|
201
201
|
Task created, but cascade Issue creation failed.
|
|
202
202
|
|
|
203
203
|
Task information:
|
|
204
|
-
- Task ID: {task-id}
|
|
204
|
+
- Task ID: {task-id} (short id {task-ref})
|
|
205
205
|
- Title: {title}
|
|
206
206
|
- Type: {type}
|
|
207
207
|
- Workflow: {workflow}
|
|
@@ -215,9 +215,9 @@ Output file:
|
|
|
215
215
|
- Task file: .agents/workspace/active/{task-id}/task.md
|
|
216
216
|
|
|
217
217
|
Next step - run requirements analysis:
|
|
218
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
219
|
-
- Gemini CLI: /{{project}}:analyze-task {task-
|
|
220
|
-
- Codex CLI: $analyze-task {task-
|
|
218
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
219
|
+
- Gemini CLI: /{{project}}:analyze-task {task-ref}
|
|
220
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
221
221
|
|
|
222
222
|
For later platform sync: after fixing auth / network / template issues, manually run the Issue creation flow in `.agents/rules/create-issue.md` for this task; or manually create/find an Issue and write `issue_number` into task.md so later skills can take over cascade sync.
|
|
223
223
|
```
|
|
@@ -24,7 +24,7 @@ description: "根据自然语言描述创建任务"
|
|
|
24
24
|
|
|
25
25
|
## 任务入参短号别名
|
|
26
26
|
|
|
27
|
-
> 如果 `{task-id}`
|
|
27
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
28
28
|
|
|
29
29
|
## 执行步骤
|
|
30
30
|
### 1. 解析用户描述
|
|
@@ -108,12 +108,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
108
108
|
- `## 上下文` 中的 `- **分支**:`:更新为生成的分支名
|
|
109
109
|
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
110
110
|
```
|
|
111
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Task
|
|
111
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create Task** by {agent} — Task created from description
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
### 4. 按 `.agents/rules/create-issue.md` 级联创建 Issue
|
|
115
115
|
|
|
116
|
-
在 task.md 落盘并记录 `Task
|
|
116
|
+
在 task.md 落盘并记录 `Create Task` 后,先读取 `.agents/rules/create-issue.md` 并按其中描述的步骤执行 Issue 创建。
|
|
117
117
|
|
|
118
118
|
规则文件由当前配置的代码平台决定其内容:
|
|
119
119
|
- 支持 Issue 创建的平台:包含完整的认证检测、模板检测、label/Issue Type/milestone 推断、Issue 创建调用、`task.md` 回写流程
|
|
@@ -129,7 +129,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
129
129
|
|
|
130
130
|
### 5. 完成校验
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
**先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
135
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -154,14 +154,14 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
154
154
|
|
|
155
155
|
> 仅在校验通过后执行本步骤。
|
|
156
156
|
|
|
157
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
157
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
158
158
|
|
|
159
159
|
场景 A:已创建 Issue 时输出:
|
|
160
160
|
```
|
|
161
161
|
任务已创建,并已级联创建 Issue。
|
|
162
162
|
|
|
163
163
|
任务信息:
|
|
164
|
-
- 任务 ID:{task-id}
|
|
164
|
+
- 任务 ID:{task-id}(短号 {task-ref})
|
|
165
165
|
- 标题:{title}
|
|
166
166
|
- 类型:{type}
|
|
167
167
|
- 工作流:{workflow}
|
|
@@ -171,9 +171,9 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
171
171
|
- 任务文件:.agents/workspace/active/{task-id}/task.md
|
|
172
172
|
|
|
173
173
|
下一步 - 执行需求分析:
|
|
174
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
175
|
-
- Gemini CLI:/{{project}}:analyze-task {task-
|
|
176
|
-
- Codex CLI:$analyze-task {task-
|
|
174
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
175
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
176
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
场景 B:未创建 Issue 时输出:
|
|
@@ -181,7 +181,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
181
181
|
任务已创建。
|
|
182
182
|
|
|
183
183
|
任务信息:
|
|
184
|
-
- 任务 ID:{task-id}
|
|
184
|
+
- 任务 ID:{task-id}(短号 {task-ref})
|
|
185
185
|
- 标题:{title}
|
|
186
186
|
- 类型:{type}
|
|
187
187
|
- 工作流:{workflow}
|
|
@@ -190,9 +190,9 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
190
190
|
- 任务文件:.agents/workspace/active/{task-id}/task.md
|
|
191
191
|
|
|
192
192
|
下一步 - 执行需求分析:
|
|
193
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
194
|
-
- Gemini CLI:/{{project}}:analyze-task {task-
|
|
195
|
-
- Codex CLI:$analyze-task {task-
|
|
193
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
194
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
195
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
场景 C:Issue 创建失败时输出:
|
|
@@ -200,7 +200,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
200
200
|
任务已创建,但 Issue 级联创建失败。
|
|
201
201
|
|
|
202
202
|
任务信息:
|
|
203
|
-
- 任务 ID:{task-id}
|
|
203
|
+
- 任务 ID:{task-id}(短号 {task-ref})
|
|
204
204
|
- 标题:{title}
|
|
205
205
|
- 类型:{type}
|
|
206
206
|
- 工作流:{workflow}
|
|
@@ -214,9 +214,9 @@ Issue 创建失败:
|
|
|
214
214
|
- 任务文件:.agents/workspace/active/{task-id}/task.md
|
|
215
215
|
|
|
216
216
|
下一步 - 执行需求分析:
|
|
217
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
218
|
-
- Gemini CLI:/{{project}}:analyze-task {task-
|
|
219
|
-
- Codex CLI:$analyze-task {task-
|
|
217
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
218
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
219
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
220
220
|
|
|
221
221
|
后续如需平台同步:修复认证/网络/模板问题后,可按 `.agents/rules/create-issue.md` 对当前任务手动执行一次 Issue 创建;或手动创建/查找 Issue,并把 `issue_number` 写入 task.md,后续技能会接管级联同步。
|
|
222
222
|
```
|
|
@@ -15,7 +15,7 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
|
|
|
15
15
|
|
|
16
16
|
## Task id short ref
|
|
17
17
|
|
|
18
|
-
> If `{task-id}`
|
|
18
|
+
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
20
|
## Execution Flow
|
|
21
21
|
|
|
@@ -57,12 +57,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
57
57
|
Update task.md: `current_step` -> `requirement-analysis`.
|
|
58
58
|
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
59
59
|
```
|
|
60
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import
|
|
60
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Codescan** by {agent} — Code Scanning alert #{alert-number} imported
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
### 4. Verification Gate
|
|
64
64
|
|
|
65
|
-
**Allocate short id first** (
|
|
65
|
+
**Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
68
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -87,7 +87,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
87
87
|
|
|
88
88
|
> Execute this step only after the verification gate passes.
|
|
89
89
|
|
|
90
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
90
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id `#NN` (falling back to the full TASK-id when unallocated or released); (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).
|
|
91
91
|
|
|
92
92
|
```
|
|
93
93
|
Code Scanning alert #{alert-number} imported.
|
|
@@ -98,12 +98,12 @@ Alert information:
|
|
|
98
98
|
- Location: {file-path}:{line-number}
|
|
99
99
|
|
|
100
100
|
Task information:
|
|
101
|
-
- Task ID: {task-id}
|
|
101
|
+
- Task ID: {task-id} (short id {task-ref})
|
|
102
102
|
|
|
103
103
|
Next step:
|
|
104
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
105
|
-
- Gemini CLI: /{{project}}:analyze-task {task-
|
|
106
|
-
- Codex CLI: $analyze-task {task-
|
|
104
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
105
|
+
- Gemini CLI: /{{project}}:analyze-task {task-ref}
|
|
106
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
|
|
@@ -15,7 +15,7 @@ description: "导入 Code Scanning 告警并创建修复任务"
|
|
|
15
15
|
|
|
16
16
|
## 任务入参短号别名
|
|
17
17
|
|
|
18
|
-
> 如果 `{task-id}`
|
|
18
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
20
|
## 执行流程
|
|
21
21
|
|
|
@@ -57,12 +57,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
57
57
|
更新 task.md:`current_step` -> `requirement-analysis`。
|
|
58
58
|
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
59
59
|
```
|
|
60
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import
|
|
60
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Codescan** by {agent} — Code Scanning alert #{alert-number} imported
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
### 4. 完成校验
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
**先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
68
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -87,7 +87,7 @@ node .agents/scripts/validate-artifact.js gate import-codescan .agents/workspace
|
|
|
87
87
|
|
|
88
88
|
> 仅在校验通过后执行本步骤。
|
|
89
89
|
|
|
90
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
90
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
91
91
|
|
|
92
92
|
```
|
|
93
93
|
Code Scanning 告警 #{alert-number} 已导入。
|
|
@@ -98,12 +98,12 @@ Code Scanning 告警 #{alert-number} 已导入。
|
|
|
98
98
|
- 位置:{file-path}:{line-number}
|
|
99
99
|
|
|
100
100
|
任务信息:
|
|
101
|
-
- 任务 ID:{task-id}
|
|
101
|
+
- 任务 ID:{task-id}(短号 {task-ref})
|
|
102
102
|
|
|
103
103
|
下一步:
|
|
104
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
105
|
-
- Gemini CLI:/agent-infra:analyze-task {task-
|
|
106
|
-
- Codex CLI:$analyze-task {task-
|
|
104
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
105
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
106
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
|
|
@@ -15,7 +15,7 @@ Import the specified Dependabot security alert and create a remediation task.
|
|
|
15
15
|
|
|
16
16
|
## Task id short ref
|
|
17
17
|
|
|
18
|
-
> If `{task-id}`
|
|
18
|
+
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
20
|
## Execution Flow
|
|
21
21
|
|
|
@@ -58,12 +58,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
58
58
|
Update task.md: `current_step` -> `requirement-analysis`.
|
|
59
59
|
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
60
60
|
```
|
|
61
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot
|
|
61
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot** by {agent} — Dependabot alert #{alert-number} imported
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
### 4. Verification Gate
|
|
65
65
|
|
|
66
|
-
**Allocate short id first** (
|
|
66
|
+
**Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -88,7 +88,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
88
88
|
|
|
89
89
|
> Execute this step only after the verification gate passes.
|
|
90
90
|
|
|
91
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
91
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id `#NN` (falling back to the full TASK-id when unallocated or released); (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).
|
|
92
92
|
|
|
93
93
|
```
|
|
94
94
|
Security alert #{alert-number} imported.
|
|
@@ -99,15 +99,15 @@ Vulnerability information:
|
|
|
99
99
|
- Affected package: {package-name}
|
|
100
100
|
|
|
101
101
|
Task information:
|
|
102
|
-
- Task ID: {task-id}
|
|
102
|
+
- Task ID: {task-id} (short id {task-ref})
|
|
103
103
|
|
|
104
104
|
Output file:
|
|
105
105
|
- Task file: .agents/workspace/active/{task-id}/task.md
|
|
106
106
|
|
|
107
107
|
Next step:
|
|
108
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
109
|
-
- Gemini CLI: /{{project}}:analyze-task {task-
|
|
110
|
-
- Codex CLI: $analyze-task {task-
|
|
108
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
109
|
+
- Gemini CLI: /{{project}}:analyze-task {task-ref}
|
|
110
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
|
|
@@ -15,7 +15,7 @@ description: "导入 Dependabot 安全告警并创建修复任务"
|
|
|
15
15
|
|
|
16
16
|
## 任务入参短号别名
|
|
17
17
|
|
|
18
|
-
> 如果 `{task-id}`
|
|
18
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
20
|
## 执行流程
|
|
21
21
|
|
|
@@ -58,12 +58,12 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
58
58
|
更新 task.md:`current_step` -> `requirement-analysis`。
|
|
59
59
|
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
60
60
|
```
|
|
61
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot
|
|
61
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot** by {agent} — Dependabot alert #{alert-number} imported
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
### 4. 完成校验
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
**先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -88,7 +88,7 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
|
|
|
88
88
|
|
|
89
89
|
> 仅在校验通过后执行本步骤。
|
|
90
90
|
|
|
91
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
91
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
92
92
|
|
|
93
93
|
```
|
|
94
94
|
安全告警 #{alert-number} 已导入。
|
|
@@ -99,15 +99,15 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
|
|
|
99
99
|
- 受影响包:{package-name}
|
|
100
100
|
|
|
101
101
|
任务信息:
|
|
102
|
-
- 任务 ID:{task-id}
|
|
102
|
+
- 任务 ID:{task-id}(短号 {task-ref})
|
|
103
103
|
|
|
104
104
|
产出文件:
|
|
105
105
|
- 任务文件:.agents/workspace/active/{task-id}/task.md
|
|
106
106
|
|
|
107
107
|
下一步:
|
|
108
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
109
|
-
- Gemini CLI:/agent-infra:analyze-task {task-
|
|
110
|
-
- Codex CLI:$analyze-task {task-
|
|
108
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
109
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
110
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
|
|
@@ -15,7 +15,7 @@ Import the specified Issue and create a task. Argument: issue number.
|
|
|
15
15
|
|
|
16
16
|
## Task id short ref
|
|
17
17
|
|
|
18
|
-
> If `{task-id}`
|
|
18
|
+
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
20
|
## Execution Flow
|
|
21
21
|
|
|
@@ -123,7 +123,7 @@ If task.md contains a valid `issue_number`, perform these sync actions (skip and
|
|
|
123
123
|
|
|
124
124
|
### 7. Verification Gate
|
|
125
125
|
|
|
126
|
-
**Allocate short id first** (
|
|
126
|
+
**Allocate short id first** (ensures the registry entry is allocated; the validation gate will read it):
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -148,13 +148,13 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
148
148
|
|
|
149
149
|
> Execute this step only after the verification gate passes.
|
|
150
150
|
|
|
151
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
151
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name). 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 short id `#NN` (falling back to the full TASK-id when unallocated or released); (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).
|
|
152
152
|
|
|
153
153
|
```
|
|
154
154
|
Issue #{number} imported.
|
|
155
155
|
|
|
156
156
|
Task information:
|
|
157
|
-
- Task ID: {task-id}
|
|
157
|
+
- Task ID: {task-id} (short id {task-ref})
|
|
158
158
|
- Title: {title}
|
|
159
159
|
- Workflow: {workflow}
|
|
160
160
|
|
|
@@ -162,9 +162,9 @@ Output file:
|
|
|
162
162
|
- Task file: .agents/workspace/active/{task-id}/task.md
|
|
163
163
|
|
|
164
164
|
Next step - run requirements analysis:
|
|
165
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
166
|
-
- Gemini CLI: /{{project}}:analyze-task {task-
|
|
167
|
-
- Codex CLI: $analyze-task {task-
|
|
165
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
166
|
+
- Gemini CLI: /{{project}}:analyze-task {task-ref}
|
|
167
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
|
|
@@ -15,7 +15,7 @@ description: "从 Issue 导入并创建任务"
|
|
|
15
15
|
|
|
16
16
|
## 任务入参短号别名
|
|
17
17
|
|
|
18
|
-
> 如果 `{task-id}`
|
|
18
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
20
|
## 执行流程
|
|
21
21
|
|
|
@@ -123,7 +123,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
123
123
|
|
|
124
124
|
### 7. 完成校验
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
**先调用短号分配**(保证注册表 entry 已分配;完成校验阶段会读取):
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
@@ -148,13 +148,13 @@ node .agents/scripts/validate-artifact.js gate import-issue .agents/workspace/ac
|
|
|
148
148
|
|
|
149
149
|
> 仅在校验通过后执行本步骤。
|
|
150
150
|
|
|
151
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
151
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染最终输出前,先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令把 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
152
152
|
|
|
153
153
|
```
|
|
154
154
|
Issue #{number} 已导入。
|
|
155
155
|
|
|
156
156
|
任务信息:
|
|
157
|
-
- 任务 ID:{task-id}
|
|
157
|
+
- 任务 ID:{task-id}(短号 {task-ref})
|
|
158
158
|
- 标题:{title}
|
|
159
159
|
- 工作流:{workflow}
|
|
160
160
|
|
|
@@ -162,9 +162,9 @@ Issue #{number} 已导入。
|
|
|
162
162
|
- 任务文件:.agents/workspace/active/{task-id}/task.md
|
|
163
163
|
|
|
164
164
|
下一步 - 执行需求分析:
|
|
165
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
166
|
-
- Gemini CLI:/agent-infra:analyze-task {task-
|
|
167
|
-
- Codex CLI:$analyze-task {task-
|
|
165
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
166
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
167
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
|