@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
|
@@ -15,7 +15,7 @@ description: "取消不再需要的任务并转移"
|
|
|
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
|
### 1. 验证任务存在
|
|
@@ -56,7 +56,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
56
56
|
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
57
57
|
- **追加**到 `## Activity Log`(不要覆盖之前记录):
|
|
58
58
|
```
|
|
59
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **
|
|
59
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task** by {agent} — {一行取消原因}
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
### 4. 转移任务
|
|
@@ -118,7 +118,9 @@ node .agents/scripts/validate-artifact.js gate cancel-task .agents/workspace/com
|
|
|
118
118
|
|
|
119
119
|
> 仅在校验通过后执行本步骤。
|
|
120
120
|
|
|
121
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
121
|
+
> **重要**:以下「下一步」中列出的所有 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` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
122
|
+
|
|
123
|
+
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「目标路径」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取已读入的 task.md 的 `branch` 值(任务此时已移动到 completed/,从 `.agents/workspace/completed/{task-id}/task.md` 读取)。该块独立于「下一步」语义。
|
|
122
124
|
|
|
123
125
|
输出格式:
|
|
124
126
|
```
|
|
@@ -128,10 +130,15 @@ node .agents/scripts/validate-artifact.js gate cancel-task .agents/workspace/com
|
|
|
128
130
|
状态标签:{status-label 或 skipped}
|
|
129
131
|
目标路径:.agents/workspace/completed/{task-id}/
|
|
130
132
|
|
|
133
|
+
可选:清理本任务的沙箱
|
|
134
|
+
(任务已归档,沙箱容器和 per-branch 配置目录不会自动回收。如果不再需要可执行:)
|
|
135
|
+
|
|
136
|
+
ai sandbox rm {branch}
|
|
137
|
+
|
|
131
138
|
下一步 - 查看已转移任务:
|
|
132
|
-
- Claude Code / OpenCode:/check-task {task-
|
|
133
|
-
- Gemini CLI:/{{project}}:check-task {task-
|
|
134
|
-
- Codex CLI:$check-task {task-
|
|
139
|
+
- Claude Code / OpenCode:/check-task {task-ref}
|
|
140
|
+
- Gemini CLI:/{{project}}:check-task {task-ref}
|
|
141
|
+
- Codex CLI:$check-task {task-ref}
|
|
135
142
|
```
|
|
136
143
|
|
|
137
144
|
|
|
@@ -12,7 +12,7 @@ description: "Check a task's current status and progress"
|
|
|
12
12
|
|
|
13
13
|
## Task id short ref
|
|
14
14
|
|
|
15
|
-
> If `{task-id}`
|
|
15
|
+
> 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.
|
|
16
16
|
|
|
17
17
|
## Steps
|
|
18
18
|
|
|
@@ -55,7 +55,7 @@ For versioned artifacts (`analysis`, `review-analysis`, `plan`, `review-plan`, `
|
|
|
55
55
|
Format the status report with a clear structure and status indicators:
|
|
56
56
|
|
|
57
57
|
```
|
|
58
|
-
Task status: {task-id}
|
|
58
|
+
Task status: {task-id} (short id {task-ref})
|
|
59
59
|
=======================
|
|
60
60
|
|
|
61
61
|
Basic info:
|
|
@@ -124,18 +124,20 @@ Recommend the appropriate next skill based on the current workflow state. You mu
|
|
|
124
124
|
> - `current_step = code-review` and the latest code review artifact exists, but any `Blocker`, `Major`, or `Minor` issue remains, or the verdict is not a clean approval -> choose "Code Review Has Issues"
|
|
125
125
|
>
|
|
126
126
|
> **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.**
|
|
127
|
+
>
|
|
128
|
+
> Before rendering the final output, read `.agents/rules/next-step-output.md` and apply both of its rules: (1) render `{task-ref}` in the table commands below 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).
|
|
127
129
|
|
|
128
130
|
| Current State | Claude Code / OpenCode | Gemini CLI | Codex CLI |
|
|
129
131
|
|----------------------------|-----------------------------------------------------|------------------------------------------|-----------------------------------------------------|
|
|
130
|
-
| Analysis Complete | `/review-analysis {task-
|
|
131
|
-
| Analysis Review Passed | `/plan-task {task-
|
|
132
|
-
| Analysis Review Has Issues | `/analyze-task {task-
|
|
133
|
-
| Plan Complete | `/review-plan {task-
|
|
134
|
-
| Plan Review Passed | `/code-task {task-
|
|
135
|
-
| Plan Review Has Issues | `/plan-task {task-
|
|
136
|
-
| Code Complete | `/review-code {task-
|
|
132
|
+
| Analysis Complete | `/review-analysis {task-ref}` | `/{{project}}:review-analysis {task-ref}` | `$review-analysis {task-ref}` |
|
|
133
|
+
| Analysis Review Passed | `/plan-task {task-ref}` | `/{{project}}:plan-task {task-ref}` | `$plan-task {task-ref}` |
|
|
134
|
+
| Analysis Review Has Issues | `/analyze-task {task-ref}` | `/{{project}}:analyze-task {task-ref}` | `$analyze-task {task-ref}` |
|
|
135
|
+
| Plan Complete | `/review-plan {task-ref}` | `/{{project}}:review-plan {task-ref}` | `$review-plan {task-ref}` |
|
|
136
|
+
| Plan Review Passed | `/code-task {task-ref}` | `/{{project}}:code-task {task-ref}` | `$code-task {task-ref}` |
|
|
137
|
+
| Plan Review Has Issues | `/plan-task {task-ref}` | `/{{project}}:plan-task {task-ref}` | `$plan-task {task-ref}` |
|
|
138
|
+
| Code Complete | `/review-code {task-ref}` | `/{{project}}:review-code {task-ref}` | `$review-code {task-ref}` |
|
|
137
139
|
| Code Review Passed | `/commit` | `/{{project}}:commit` | `$commit` |
|
|
138
|
-
| Code Review Has Issues | `/code-task {task-
|
|
140
|
+
| Code Review Has Issues | `/code-task {task-ref}` | `/{{project}}:code-task {task-ref}` | `$code-task {task-ref}` |
|
|
139
141
|
| Task Blocked | Unblock the task or provide the missing information | — | Unblock the task or provide the missing information |
|
|
140
142
|
| Task Completed | No action needed | — | No action needed |
|
|
141
143
|
|
|
@@ -12,7 +12,7 @@ description: "查看任务的当前状态和进度"
|
|
|
12
12
|
|
|
13
13
|
## 任务入参短号别名
|
|
14
14
|
|
|
15
|
-
> 如果 `{task-id}`
|
|
15
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
16
16
|
|
|
17
17
|
## 执行步骤
|
|
18
18
|
### 1. 查找任务
|
|
@@ -54,7 +54,7 @@ description: "查看任务的当前状态和进度"
|
|
|
54
54
|
以清晰的结构和状态指示器格式化输出:
|
|
55
55
|
|
|
56
56
|
```
|
|
57
|
-
任务状态:{task-id}
|
|
57
|
+
任务状态:{task-id}(短号 {task-ref})
|
|
58
58
|
=======================
|
|
59
59
|
|
|
60
60
|
基本信息:
|
|
@@ -123,18 +123,20 @@ description: "查看任务的当前状态和进度"
|
|
|
123
123
|
> - `current_step = code-review` 且最新代码审查产物存在,但仍有任何 `Blocker`、`Major` 或 `Minor` 问题,或结论不是无问题通过 → 选择「代码审查有问题」
|
|
124
124
|
>
|
|
125
125
|
> **特别注意:只要最新审查报告中存在任何问题,就不能使用对应「审查通过」行。必须改用对应「审查有问题」行。**
|
|
126
|
+
>
|
|
127
|
+
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 下方表格中命令的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id);(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
126
128
|
|
|
127
129
|
| 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
|
|
128
130
|
|--------------------|------------------------------|------------------------------------------|------------------------------|
|
|
129
|
-
| 分析完成 | `/review-analysis {task-
|
|
130
|
-
| 需求分析审查通过 | `/plan-task {task-
|
|
131
|
-
| 需求分析审查有问题 | `/analyze-task {task-
|
|
132
|
-
| 计划完成 | `/review-plan {task-
|
|
133
|
-
| 技术方案审查通过 | `/code-task {task-
|
|
134
|
-
| 技术方案审查有问题 | `/plan-task {task-
|
|
135
|
-
| 实现完成 | `/review-code {task-
|
|
131
|
+
| 分析完成 | `/review-analysis {task-ref}` | `/agent-infra:review-analysis {task-ref}` | `$review-analysis {task-ref}` |
|
|
132
|
+
| 需求分析审查通过 | `/plan-task {task-ref}` | `/agent-infra:plan-task {task-ref}` | `$plan-task {task-ref}` |
|
|
133
|
+
| 需求分析审查有问题 | `/analyze-task {task-ref}` | `/agent-infra:analyze-task {task-ref}` | `$analyze-task {task-ref}` |
|
|
134
|
+
| 计划完成 | `/review-plan {task-ref}` | `/agent-infra:review-plan {task-ref}` | `$review-plan {task-ref}` |
|
|
135
|
+
| 技术方案审查通过 | `/code-task {task-ref}` | `/agent-infra:code-task {task-ref}` | `$code-task {task-ref}` |
|
|
136
|
+
| 技术方案审查有问题 | `/plan-task {task-ref}` | `/agent-infra:plan-task {task-ref}` | `$plan-task {task-ref}` |
|
|
137
|
+
| 实现完成 | `/review-code {task-ref}` | `/agent-infra:review-code {task-ref}` | `$review-code {task-ref}` |
|
|
136
138
|
| 代码审查通过 | `/commit` | `/agent-infra:commit` | `$commit` |
|
|
137
|
-
| 代码审查有问题 | `/code-task {task-
|
|
139
|
+
| 代码审查有问题 | `/code-task {task-ref}` | `/agent-infra:code-task {task-ref}` | `$code-task {task-ref}` |
|
|
138
140
|
| 任务被阻塞 | 解除阻塞或提供所需信息 | — | 解除阻塞或提供所需信息 |
|
|
139
141
|
| 任务已完成 | 无需操作 | — | 无需操作 |
|
|
140
142
|
|
|
@@ -9,7 +9,7 @@ Dismiss the specified Code Scanning (CodeQL) alert and record a justified reason
|
|
|
9
9
|
|
|
10
10
|
## Task id short ref
|
|
11
11
|
|
|
12
|
-
> If `{task-id}`
|
|
12
|
+
> 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.
|
|
13
13
|
|
|
14
14
|
## Execution Flow
|
|
15
15
|
|
|
@@ -82,7 +82,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
82
82
|
- Add the dismissal record to task.md
|
|
83
83
|
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
84
84
|
```
|
|
85
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **
|
|
85
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
|
|
86
86
|
```
|
|
87
87
|
- Archive the task
|
|
88
88
|
- **Release short id** (after the archive `mv` succeeded; the script is idempotent):
|
|
@@ -93,7 +93,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
93
93
|
|
|
94
94
|
### 8. Inform User
|
|
95
95
|
|
|
96
|
-
> **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).
|
|
96
|
+
> **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).
|
|
97
|
+
|
|
98
|
+
> **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.
|
|
97
99
|
|
|
98
100
|
```
|
|
99
101
|
Code Scanning alert #{alert-number} dismissed.
|
|
@@ -107,10 +109,15 @@ View: {html_url}
|
|
|
107
109
|
|
|
108
110
|
Note: it can be reopened on the platform if necessary.
|
|
109
111
|
|
|
112
|
+
Optional: clean up this task's sandbox
|
|
113
|
+
(The related task's sandbox container and per-branch config directory are not reclaimed automatically. Run this if you no longer need them:)
|
|
114
|
+
|
|
115
|
+
ai sandbox rm {branch}
|
|
116
|
+
|
|
110
117
|
Next step - complete and archive the task if a related task exists:
|
|
111
|
-
- Claude Code / OpenCode: /complete-task {task-
|
|
112
|
-
- Gemini CLI: /{{project}}:complete-task {task-
|
|
113
|
-
- Codex CLI: $complete-task {task-
|
|
118
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
119
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
120
|
+
- Codex CLI: $complete-task {task-ref}
|
|
114
121
|
```
|
|
115
122
|
|
|
116
123
|
## Notes
|
|
@@ -9,7 +9,7 @@ description: "关闭 Code Scanning 告警并记录理由"
|
|
|
9
9
|
|
|
10
10
|
## 任务入参短号别名
|
|
11
11
|
|
|
12
|
-
> 如果 `{task-id}`
|
|
12
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
13
13
|
|
|
14
14
|
## 执行流程
|
|
15
15
|
|
|
@@ -82,7 +82,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
82
82
|
- 添加关闭记录到 task.md
|
|
83
83
|
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
84
84
|
```
|
|
85
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **
|
|
85
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan** by {agent} — Code Scanning alert #{alert-number} dismissed: {reason}
|
|
86
86
|
```
|
|
87
87
|
- 归档任务
|
|
88
88
|
- **释放短号**(归档目录已 mv 成功,再 release;脚本幂等):
|
|
@@ -93,7 +93,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
93
93
|
|
|
94
94
|
### 8. 告知用户
|
|
95
95
|
|
|
96
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
96
|
+
> **重要**:以下「下一步」中列出的所有 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` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
97
|
+
|
|
98
|
+
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) 第 7 步按告警号定位到了关联任务、(3) 该关联任务 task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「注意:…」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取第 7 步定位到的关联任务 task.md 的 `branch` 值。该块独立于「下一步」语义。
|
|
97
99
|
|
|
98
100
|
```
|
|
99
101
|
Code Scanning 告警 #{alert-number} 已关闭。
|
|
@@ -107,10 +109,15 @@ Code Scanning 告警 #{alert-number} 已关闭。
|
|
|
107
109
|
|
|
108
110
|
注意:如有需要,可在 平台上重新打开。
|
|
109
111
|
|
|
112
|
+
可选:清理本任务的沙箱
|
|
113
|
+
(关联任务的沙箱容器和 per-branch 配置目录不会自动回收。如果不再需要可执行:)
|
|
114
|
+
|
|
115
|
+
ai sandbox rm {branch}
|
|
116
|
+
|
|
110
117
|
下一步 - 完成并归档任务(如有关联任务):
|
|
111
|
-
- Claude Code / OpenCode:/complete-task {task-
|
|
112
|
-
- Gemini CLI:/agent-infra:complete-task {task-
|
|
113
|
-
- Codex CLI:$complete-task {task-
|
|
118
|
+
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
119
|
+
- Gemini CLI:/agent-infra:complete-task {task-ref}
|
|
120
|
+
- Codex CLI:$complete-task {task-ref}
|
|
114
121
|
```
|
|
115
122
|
|
|
116
123
|
## 注意事项
|
|
@@ -9,7 +9,7 @@ Dismiss the specified Dependabot security alert and record a justified reason.
|
|
|
9
9
|
|
|
10
10
|
## Task id short ref
|
|
11
11
|
|
|
12
|
-
> If `{task-id}`
|
|
12
|
+
> 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.
|
|
13
13
|
|
|
14
14
|
## Execution Flow
|
|
15
15
|
|
|
@@ -90,7 +90,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
90
90
|
- Add the dismissal record to task.md
|
|
91
91
|
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
92
92
|
```
|
|
93
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **
|
|
93
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Dependabot** by {agent} — Dependabot alert #{alert-number} dismissed: {reason}
|
|
94
94
|
```
|
|
95
95
|
- Archive the task
|
|
96
96
|
- **Release short id** (after the archive `mv` succeeded; the script is idempotent):
|
|
@@ -101,7 +101,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
101
101
|
|
|
102
102
|
### 8. Inform User
|
|
103
103
|
|
|
104
|
-
> **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).
|
|
104
|
+
> **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).
|
|
105
|
+
|
|
106
|
+
> **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.
|
|
105
107
|
|
|
106
108
|
```
|
|
107
109
|
Security alert #{alert-number} dismissed.
|
|
@@ -115,10 +117,15 @@ View: {alert-url}
|
|
|
115
117
|
|
|
116
118
|
Note: it can be reopened on the platform if necessary.
|
|
117
119
|
|
|
120
|
+
Optional: clean up this task's sandbox
|
|
121
|
+
(The related task's sandbox container and per-branch config directory are not reclaimed automatically. Run this if you no longer need them:)
|
|
122
|
+
|
|
123
|
+
ai sandbox rm {branch}
|
|
124
|
+
|
|
118
125
|
Next step - complete and archive the task if a related task exists:
|
|
119
|
-
- Claude Code / OpenCode: /complete-task {task-
|
|
120
|
-
- Gemini CLI: /{{project}}:complete-task {task-
|
|
121
|
-
- Codex CLI: $complete-task {task-
|
|
126
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
127
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
128
|
+
- Codex CLI: $complete-task {task-ref}
|
|
122
129
|
```
|
|
123
130
|
|
|
124
131
|
## Notes
|
|
@@ -9,7 +9,7 @@ description: "关闭 Dependabot 安全告警并记录理由"
|
|
|
9
9
|
|
|
10
10
|
## 任务入参短号别名
|
|
11
11
|
|
|
12
|
-
> 如果 `{task-id}`
|
|
12
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
13
13
|
|
|
14
14
|
## 执行流程
|
|
15
15
|
|
|
@@ -90,7 +90,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
90
90
|
- 添加关闭记录到 task.md
|
|
91
91
|
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
92
92
|
```
|
|
93
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **
|
|
93
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Dependabot** by {agent} — Dependabot alert #{alert-number} dismissed: {reason}
|
|
94
94
|
```
|
|
95
95
|
- 归档任务
|
|
96
96
|
- **释放短号**(归档目录已 mv 成功,再 release;脚本幂等):
|
|
@@ -101,7 +101,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
101
101
|
|
|
102
102
|
### 8. 告知用户
|
|
103
103
|
|
|
104
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
104
|
+
> **重要**:以下「下一步」中列出的所有 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` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
105
|
+
|
|
106
|
+
> **可选沙箱清理提示(门控渲染)**:仅当同时满足 (1) `.agents/.airc.json` 存在 `sandbox` 字段、(2) 第 7 步按告警号定位到了关联任务、(3) 该关联任务 task.md 的 `branch` 字段存在且不是 `main` / `master` 时,才渲染下方输出中「注意:…」之后、「下一步」之前的「可选:清理本任务的沙箱」块;任一不满足则整段省略。`{branch}` 取第 7 步定位到的关联任务 task.md 的 `branch` 值。该块独立于「下一步」语义。
|
|
105
107
|
|
|
106
108
|
```
|
|
107
109
|
安全告警 #{alert-number} 已关闭。
|
|
@@ -115,10 +117,15 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
115
117
|
|
|
116
118
|
注意:如有需要,可在平台侧重新打开。
|
|
117
119
|
|
|
120
|
+
可选:清理本任务的沙箱
|
|
121
|
+
(关联任务的沙箱容器和 per-branch 配置目录不会自动回收。如果不再需要可执行:)
|
|
122
|
+
|
|
123
|
+
ai sandbox rm {branch}
|
|
124
|
+
|
|
118
125
|
下一步 - 完成并归档任务(如有关联任务):
|
|
119
|
-
- Claude Code / OpenCode:/complete-task {task-
|
|
120
|
-
- Gemini CLI:/agent-infra:complete-task {task-
|
|
121
|
-
- Codex CLI:$complete-task {task-
|
|
126
|
+
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
127
|
+
- Gemini CLI:/agent-infra:complete-task {task-ref}
|
|
128
|
+
- Codex CLI:$complete-task {task-ref}
|
|
122
129
|
```
|
|
123
130
|
|
|
124
131
|
## 注意事项
|
|
@@ -10,7 +10,7 @@ Implement the approved plan and produce `code.md` or `code-r{N}.md`. This skill
|
|
|
10
10
|
## Boundary / Critical Rules
|
|
11
11
|
|
|
12
12
|
- Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
|
|
13
|
-
- Fix mode
|
|
13
|
+
- Fix mode verifies each finding of the latest `review-code` one by one: fix it if it holds, or rebut it and record it under unresolved if it is unfounded/hallucinated; do not expand to issues the review did not list; env-blocked items are out of scope
|
|
14
14
|
- Never auto-run `git add` or `git commit`
|
|
15
15
|
- Create a new code artifact for each round and never overwrite an older one
|
|
16
16
|
- After executing this skill, you **must** immediately update task.md
|
|
@@ -31,7 +31,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
31
31
|
|
|
32
32
|
## Task id short ref
|
|
33
33
|
|
|
34
|
-
> If `{task-id}`
|
|
34
|
+
> 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.
|
|
35
35
|
|
|
36
36
|
## Steps
|
|
37
37
|
|
|
@@ -45,7 +45,9 @@ Read `reference/branch-management.md`, ensure the current branch matches the tas
|
|
|
45
45
|
|
|
46
46
|
### 3. Narrow the Milestone
|
|
47
47
|
|
|
48
|
-
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`
|
|
48
|
+
**Mandatory; do not skip.** If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md` first (upstream + permission detection), then `.agents/rules/milestone-inference.md` Phase 2 for `code-task` to narrow the Issue milestone. If `has_triage=false`, keep the existing milestone.
|
|
49
|
+
|
|
50
|
+
> If this step is skipped or the Issue milestone is still a release line `X.Y.x` afterward, the step-11 `validate-artifact` gate will block the `code-task` round via `verify_milestone_specific` and require narrowing to a specific version (e.g. `0.7.1`) before proceeding.
|
|
49
51
|
|
|
50
52
|
### 4. Determine Mode and Round
|
|
51
53
|
|
|
@@ -102,8 +104,8 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
102
104
|
|
|
103
105
|
Set `current_step` to `code`, refresh task metadata, and append one Activity Log entry:
|
|
104
106
|
|
|
105
|
-
- initial implementation: `Code (Round {N})`
|
|
106
|
-
- fix mode: `Code (Round {N}, fix for {review-artifact})`
|
|
107
|
+
- initial implementation: `Code Task (Round {N})`
|
|
108
|
+
- fix mode: `Code Task (Round {N}, fix for {review-artifact})`
|
|
107
109
|
|
|
108
110
|
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, then:
|
|
109
111
|
- Set `status: in-progress` according to issue-sync.md
|
|
@@ -118,4 +120,6 @@ node .agents/scripts/validate-artifact.js gate code-task .agents/workspace/activ
|
|
|
118
120
|
|
|
119
121
|
### 12. Tell the User
|
|
120
122
|
|
|
121
|
-
Use `reference/output-template.md` and show all TUI command formats.
|
|
123
|
+
Use `reference/output-template.md` (or `reference/fix-mode.md` in fix mode) and show all TUI command formats.
|
|
124
|
+
|
|
125
|
+
> 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).
|
|
@@ -10,7 +10,7 @@ description: "根据技术方案编码任务并输出报告"
|
|
|
10
10
|
## 行为边界 / 关键规则
|
|
11
11
|
|
|
12
12
|
- 严格遵循最新方案产物:`plan.md` 或 `plan-r{N}.md`
|
|
13
|
-
-
|
|
13
|
+
- 修复模式逐条核实最新 `review-code` 的发现:成立则修复,判定为不成立/幻觉则在报告中反驳并记入 unresolved;不擅自扩大到审查未列出的问题;env-blocked 项不在修复范围
|
|
14
14
|
- 绝不自动执行 `git add` 或 `git commit`
|
|
15
15
|
- 每轮实现都创建新的实现产物,不覆盖旧文件
|
|
16
16
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
@@ -27,6 +27,7 @@ description: "根据技术方案编码任务并输出报告"
|
|
|
27
27
|
| 「先写代码再补测试更高效」 | 后补测试常沦为对实现的镜像;目标驱动应先定义可验证用例再让它通过。 |
|
|
28
28
|
| 「方案这里不合理,顺手改更好」 | 偏离 `{plan-artifact}` 必须在报告中记录原因;有异议先停下确认,不擅自改方向。 |
|
|
29
29
|
| 「测试过了,顺便提交一下」 | 本技能绝不执行 `git add`/`git commit`,提交是用户显式发起的独立步骤。 |
|
|
30
|
+
| 「审查既然写了,照着改就行」 | 审查可能基于错误 `file:line` 或幻觉;动手前先 Read/Grep 核实,成立才修,不成立就反驳并记入 unresolved,不盲从。 |
|
|
30
31
|
|
|
31
32
|
## 第 0 步:状态核对(执行前硬约束)
|
|
32
33
|
|
|
@@ -44,7 +45,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
44
45
|
|
|
45
46
|
## 任务入参短号别名
|
|
46
47
|
|
|
47
|
-
> 如果 `{task-id}`
|
|
48
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
48
49
|
|
|
49
50
|
## 执行步骤
|
|
50
51
|
### 1. 验证前置条件
|
|
@@ -70,7 +71,9 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
70
71
|
|
|
71
72
|
### 3. 收窄里程碑
|
|
72
73
|
|
|
73
|
-
如果 task.md 中存在有效的 `issue_number`,执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测;再读取 `.agents/rules/milestone-inference.md`,按其中的「阶段 2:`code-task`」收窄 Issue milestone;如果 `has_triage=false`,则保持原 milestone 不变。
|
|
74
|
+
**必须执行,不得跳过。** 如果 task.md 中存在有效的 `issue_number`,执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测;再读取 `.agents/rules/milestone-inference.md`,按其中的「阶段 2:`code-task`」收窄 Issue milestone;如果 `has_triage=false`,则保持原 milestone 不变。
|
|
75
|
+
|
|
76
|
+
> 若此步骤被跳过或收窄后 Issue milestone 仍为 `X.Y.x` 版本线,步骤 11 的 `validate-artifact` gate 会通过 `verify_milestone_specific` 截停本轮 `code-task`,要求重新收窄到具体版本(如 `0.7.1`)后再继续。
|
|
74
77
|
|
|
75
78
|
### 4. 确定模式与轮次
|
|
76
79
|
|
|
@@ -149,8 +152,8 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
149
152
|
- 审查 `## 需求` 段落,仅把本轮已由代码实现且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
|
|
150
153
|
- 记录 Round `{code-round}` 的 `{code-artifact}`
|
|
151
154
|
- 追加:
|
|
152
|
-
- 初次实现:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {code-artifact}`
|
|
153
|
-
- 修复模式:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code (Round {N}, fix for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues[, skipped {n} env-blocked] → {code-artifact}`
|
|
155
|
+
- 初次实现:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Task (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {code-artifact}`
|
|
156
|
+
- 修复模式:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Task (Round {N}, fix for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues[, skipped {n} env-blocked] → {code-artifact}`
|
|
154
157
|
|
|
155
158
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续;执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测):
|
|
156
159
|
- 按 issue-sync.md 设置 `status: in-progress`
|
|
@@ -176,7 +179,9 @@ node .agents/scripts/validate-artifact.js gate code-task .agents/workspace/activ
|
|
|
176
179
|
|
|
177
180
|
> 仅在校验通过后执行本步骤。
|
|
178
181
|
|
|
179
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。输出格式见 `reference/output-template.md`。
|
|
182
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。输出格式见 `reference/output-template.md`;修复模式输出见 `reference/fix-mode.md`。
|
|
183
|
+
|
|
184
|
+
> 渲染最终输出前先读取 `.agents/rules/next-step-output.md` 并落实其两类规则:(1) 「下一步」命令的 `{task-ref}` 渲染为当前任务短号 `#NN`(取值与回退见该文件),其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式;(2) 在面向用户输出的绝对最后一行追加 `Completed at` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
180
185
|
|
|
181
186
|
## 完成检查清单
|
|
182
187
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "Code \\(Round \\d+(?:, fix for review-code(?:-r\\d+)?\\.md)?\\)",
|
|
35
|
+
"expected_action_pattern": "(Code Task|Code) \\(Round \\d+(?:, fix for review-code(?:-r\\d+)?\\.md)?\\)",
|
|
36
36
|
"freshness_minutes": 30
|
|
37
37
|
},
|
|
38
38
|
"platform-sync": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"verify_issue_type": true,
|
|
45
45
|
"verify_issue_fields": false,
|
|
46
46
|
"verify_milestone": true,
|
|
47
|
+
"verify_milestone_specific": true,
|
|
47
48
|
"expected_status_label_key": "inProgress",
|
|
48
49
|
"expected_comment_marker_key": "artifact"
|
|
49
50
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "Code \\(Round \\d+(?:, fix for review-code(?:-r\\d+)?\\.md)?\\)",
|
|
35
|
+
"expected_action_pattern": "(Code Task|Code) \\(Round \\d+(?:, fix for review-code(?:-r\\d+)?\\.md)?\\)",
|
|
36
36
|
"freshness_minutes": 30
|
|
37
37
|
},
|
|
38
38
|
"platform-sync": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"verify_issue_type": true,
|
|
45
45
|
"verify_issue_fields": false,
|
|
46
46
|
"verify_milestone": true,
|
|
47
|
+
"verify_milestone_specific": true,
|
|
47
48
|
"expected_status_label_key": "inProgress",
|
|
48
49
|
"expected_comment_marker_key": "artifact"
|
|
49
50
|
}
|
|
@@ -4,6 +4,11 @@ Read this file before changing code during fix mode.
|
|
|
4
4
|
|
|
5
5
|
## Plan the Fixes
|
|
6
6
|
|
|
7
|
+
**Verify each finding first (mandatory before editing)**: for every finding in `{review-artifact}`, Read/Grep the cited `file:line` and the corresponding `git diff` to confirm the issue is real:
|
|
8
|
+
- Holds → include it in the classification and fixes below
|
|
9
|
+
- Unfounded / based on a wrong `file:line` / hallucinated → do not change code; give a counter-argument in the report's `## Per-Finding Verification` section and record it under unresolved issues
|
|
10
|
+
- Do not expand fixes to issues the review did not list
|
|
11
|
+
|
|
7
12
|
Classify and prioritize work:
|
|
8
13
|
1. **Blockers first**
|
|
9
14
|
2. **Then major issues**
|
|
@@ -18,7 +23,7 @@ Detailed priority rules:
|
|
|
18
23
|
- Blockers must all be fixed before anything else
|
|
19
24
|
- Major issues should all be fixed in the same pass unless a blocker prevents progress
|
|
20
25
|
- Minor issues are optional only after Blockers and Majors are resolved
|
|
21
|
-
- If you disagree with a finding,
|
|
26
|
+
- If you disagree with a finding, or judge it hallucinated after verification, do not silently skip it; give a counter-argument in the report's `## Per-Finding Verification` section and record it under unresolved issues
|
|
22
27
|
|
|
23
28
|
### Meta-category: env-blocked
|
|
24
29
|
|
|
@@ -66,9 +71,9 @@ Fix status:
|
|
|
66
71
|
|
|
67
72
|
Next step - re-review or commit:
|
|
68
73
|
- Re-review (always recommended):
|
|
69
|
-
- Claude Code / OpenCode: /review-code {task-
|
|
70
|
-
- Gemini CLI: /agent-infra:review-code {task-
|
|
71
|
-
- Codex CLI: $review-code {task-
|
|
74
|
+
- Claude Code / OpenCode: /review-code {task-ref}
|
|
75
|
+
- Gemini CLI: /agent-infra:review-code {task-ref}
|
|
76
|
+
- Codex CLI: $review-code {task-ref}
|
|
72
77
|
- Commit directly (optional; only when all issues are resolved and changes are low risk):
|
|
73
78
|
- Claude Code / OpenCode: /commit
|
|
74
79
|
- Gemini CLI: /agent-infra:commit
|
|
@@ -79,7 +84,7 @@ Next step - re-review or commit:
|
|
|
79
84
|
|
|
80
85
|
1. **Prerequisite**: a code review artifact must exist (`review-code.md` or `review-code-r{N}.md`)
|
|
81
86
|
2. **No auto-commit**: do not run `git commit`
|
|
82
|
-
3. **Scope discipline**:
|
|
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
|
|
83
88
|
4. **Disagreement handling**: record any disagreement in the report
|
|
84
89
|
5. **Re-review**: always recommend `review-code` as the default next step after fix mode
|
|
85
90
|
6. **Consistency**: the latest review artifact, Activity Log entry, and code report must reference the same round
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## 规划修复
|
|
6
6
|
|
|
7
|
+
**先逐条核实(动手前必做)**:对 `{review-artifact}` 的每一条发现,先 Read/Grep 其引用的 `file:line` 与对应 `git diff`,确认问题真实存在:
|
|
8
|
+
- 成立 → 纳入下方分类与修复
|
|
9
|
+
- 不成立 / 基于错误 `file:line` / 幻觉 → 不改代码,在报告 `## 对审查发现的逐条核实` 给出反证,并记入 unresolved issues
|
|
10
|
+
- 不擅自把修复扩大到审查未列出的问题
|
|
11
|
+
|
|
7
12
|
按以下顺序分类并确定优先级:
|
|
8
13
|
1. **先处理 Blocker**
|
|
9
14
|
2. **再处理 Major**
|
|
@@ -18,7 +23,7 @@
|
|
|
18
23
|
- 所有 Blocker 都必须最先修完
|
|
19
24
|
- 只要没有被 Blocker 阻塞,所有 Major 都应在同一轮一并修复
|
|
20
25
|
- 只有在 Blocker 和 Major 都解决后,Minor 才是可选项
|
|
21
|
-
-
|
|
26
|
+
- 如果你不同意某条审查意见,或核实后判定为幻觉,不要静默跳过,而是在报告 `## 对审查发现的逐条核实` 给出反证并记录到 unresolved issues
|
|
22
27
|
|
|
23
28
|
### 元类目:env-blocked
|
|
24
29
|
|
|
@@ -66,9 +71,9 @@ env-blocked 项不在修复范围。处理规则:
|
|
|
66
71
|
|
|
67
72
|
下一步 - 重新审查或提交:
|
|
68
73
|
- 重新审查(始终推荐):
|
|
69
|
-
- Claude Code / OpenCode:/review-code {task-
|
|
70
|
-
- Gemini CLI:/agent-infra:review-code {task-
|
|
71
|
-
- Codex CLI:$review-code {task-
|
|
74
|
+
- Claude Code / OpenCode:/review-code {task-ref}
|
|
75
|
+
- Gemini CLI:/agent-infra:review-code {task-ref}
|
|
76
|
+
- Codex CLI:$review-code {task-ref}
|
|
72
77
|
- 直接提交(可选;仅在所有问题已解决且风险可控时):
|
|
73
78
|
- Claude Code / OpenCode:/commit
|
|
74
79
|
- Gemini CLI:/agent-infra:commit
|
|
@@ -79,7 +84,7 @@ env-blocked 项不在修复范围。处理规则:
|
|
|
79
84
|
|
|
80
85
|
1. **前置条件**:必须存在代码审查产物(`review-code.md` 或 `review-code-r{N}.md`)
|
|
81
86
|
2. **禁止自动提交**:不要执行 `git commit`
|
|
82
|
-
3.
|
|
87
|
+
3. **范围约束**:逐条核实审查列出的问题,成立则修复、不成立则反驳;不扩大到审查未列出的问题
|
|
83
88
|
4. **分歧处理**:如果不同意审查意见,要在报告里明确记录
|
|
84
89
|
5. **重新审查**:修复后始终推荐执行 `review-code`
|
|
85
90
|
6. **一致性**:最新审查产物、Activity Log 记录和修复报告必须引用同一轮次
|
|
@@ -14,7 +14,7 @@ Output files:
|
|
|
14
14
|
- Code report: .agents/workspace/active/{task-id}/{code-artifact}
|
|
15
15
|
|
|
16
16
|
Next step - code review:
|
|
17
|
-
- Claude Code / OpenCode: /review-code {task-
|
|
18
|
-
- Gemini CLI: /{{project}}:review-code {task-
|
|
19
|
-
- Codex CLI: $review-code {task-
|
|
17
|
+
- Claude Code / OpenCode: /review-code {task-ref}
|
|
18
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
19
|
+
- Codex CLI: $review-code {task-ref}
|
|
20
20
|
```
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- 实现报告:.agents/workspace/active/{task-id}/{code-artifact}
|
|
15
15
|
|
|
16
16
|
下一步 - 代码审查:
|
|
17
|
-
- Claude Code / OpenCode:/review-code {task-
|
|
18
|
-
- Gemini CLI:/agent-infra:review-code {task-
|
|
19
|
-
- Codex CLI:$review-code {task-
|
|
17
|
+
- Claude Code / OpenCode:/review-code {task-ref}
|
|
18
|
+
- Gemini CLI:/agent-infra:review-code {task-ref}
|
|
19
|
+
- Codex CLI:$review-code {task-ref}
|
|
20
20
|
```
|