@fitlab-ai/agent-infra 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.ts +12 -1
- package/dist/bin/cli.js +13 -1
- package/dist/lib/builtin-tuis.js +45 -0
- package/dist/lib/defaults.json +3 -0
- package/dist/lib/init.js +62 -23
- package/dist/lib/prompt.js +49 -1
- package/dist/lib/sandbox/commands/create.js +10 -2
- package/dist/lib/sandbox/commands/enter.js +8 -7
- package/dist/lib/sandbox/commands/list-running.js +62 -28
- package/dist/lib/sandbox/commands/ls.js +20 -22
- package/dist/lib/sandbox/commands/rebuild.js +3 -11
- package/dist/lib/sandbox/commands/rm.js +2 -0
- package/dist/lib/sandbox/image-prune.js +18 -0
- package/dist/lib/sandbox/index.js +7 -3
- package/dist/lib/sandbox/task-resolver.js +18 -0
- package/dist/lib/sandbox/tools.js +1 -1
- package/dist/lib/table.js +29 -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 +80 -0
- package/dist/lib/update.js +59 -18
- package/lib/builtin-tuis.ts +55 -0
- package/lib/defaults.json +3 -0
- package/lib/init.ts +87 -35
- package/lib/prompt.ts +54 -1
- package/lib/sandbox/commands/create.ts +11 -2
- package/lib/sandbox/commands/enter.ts +8 -7
- package/lib/sandbox/commands/list-running.ts +70 -31
- package/lib/sandbox/commands/ls.ts +25 -25
- package/lib/sandbox/commands/rebuild.ts +3 -12
- package/lib/sandbox/commands/rm.ts +3 -0
- package/lib/sandbox/image-prune.ts +23 -0
- package/lib/sandbox/index.ts +7 -3
- package/lib/sandbox/task-resolver.ts +23 -1
- package/lib/sandbox/tools.ts +1 -1
- package/lib/table.ts +32 -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 +97 -0
- package/lib/update.ts +71 -30
- package/package.json +1 -1
- package/templates/.agents/README.en.md +32 -0
- package/templates/.agents/README.zh-CN.md +32 -0
- package/templates/.agents/hooks/auto-resume.sh +87 -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 +59 -0
- package/templates/.agents/rules/next-step-output.zh-CN.md +59 -0
- package/templates/.agents/rules/task-short-id.en.md +133 -0
- package/templates/.agents/rules/task-short-id.zh-CN.md +105 -0
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +17 -0
- package/templates/.agents/scripts/task-short-id.js +556 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +13 -11
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +13 -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 +17 -5
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +17 -6
- package/templates/.agents/skills/block-task/config/verify.json +1 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +17 -5
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +17 -6
- package/templates/.agents/skills/cancel-task/config/verify.json +1 -1
- package/templates/.agents/skills/check-task/SKILL.en.md +15 -9
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +15 -10
- package/templates/.agents/skills/close-codescan/SKILL.en.md +16 -5
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +16 -5
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +16 -5
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +16 -5
- package/templates/.agents/skills/code-task/SKILL.en.md +13 -5
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +14 -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 +5 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +5 -1
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +9 -9
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +9 -9
- package/templates/.agents/skills/complete-task/SKILL.en.md +17 -1
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +17 -2
- 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 +9 -5
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +9 -5
- package/templates/.agents/skills/create-pr/config/verify.json +2 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -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 +29 -15
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +29 -16
- package/templates/.agents/skills/create-task/config/verify.json +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +20 -6
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +20 -6
- package/templates/.agents/skills/import-codescan/config/verify.json +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +20 -6
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +20 -6
- package/templates/.agents/skills/import-dependabot/config/verify.json +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +19 -5
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +19 -5
- package/templates/.agents/skills/plan-task/SKILL.en.md +13 -11
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +13 -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 +12 -0
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +12 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +7 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +7 -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 +8 -1
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +8 -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 +7 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +7 -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/SKILL.en.md +1 -0
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +112 -21
- package/templates/.agents/workflows/bug-fix.en.yaml +1 -1
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/feature-development.en.yaml +1 -1
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/refactoring.en.yaml +1 -1
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
- package/templates/.claude/settings.json +11 -0
|
@@ -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
|
|
|
@@ -42,8 +43,11 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
42
43
|
|
|
43
44
|
状态核对完成前,禁止任何关于外部状态的断言(例如“代码没变”“测试已通过”“没有其他引用”),包括思考阶段。本门禁只提供结构下限;逐条证据配对和真实性仍需按报告模板与审查要求核对。
|
|
44
45
|
|
|
45
|
-
##
|
|
46
|
+
## 任务入参短号别名
|
|
47
|
+
|
|
48
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
46
49
|
|
|
50
|
+
## 执行步骤
|
|
47
51
|
### 1. 验证前置条件
|
|
48
52
|
|
|
49
53
|
先检查:
|
|
@@ -67,7 +71,9 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
67
71
|
|
|
68
72
|
### 3. 收窄里程碑
|
|
69
73
|
|
|
70
|
-
如果 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`)后再继续。
|
|
71
77
|
|
|
72
78
|
### 4. 确定模式与轮次
|
|
73
79
|
|
|
@@ -146,8 +152,8 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
146
152
|
- 审查 `## 需求` 段落,仅把本轮已由代码实现且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
|
|
147
153
|
- 记录 Round `{code-round}` 的 `{code-artifact}`
|
|
148
154
|
- 追加:
|
|
149
|
-
- 初次实现:`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {code-artifact}`
|
|
150
|
-
- 修复模式:`- {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}`
|
|
151
157
|
|
|
152
158
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续;执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测):
|
|
153
159
|
- 按 issue-sync.md 设置 `status: in-progress`
|
|
@@ -173,7 +179,9 @@ node .agents/scripts/validate-artifact.js gate code-task .agents/workspace/activ
|
|
|
173
179
|
|
|
174
180
|
> 仅在校验通过后执行本步骤。
|
|
175
181
|
|
|
176
|
-
> **重要**:以下「下一步」中列出的所有 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
|
+
> 渲染「下一步」命令时,`{task-ref}` 为当前任务短号 `#NN`(取值与回退见 `.agents/rules/next-step-output.md`,渲染前先读取)。其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式。
|
|
177
185
|
|
|
178
186
|
## 完成检查清单
|
|
179
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
|
```
|
|
@@ -62,6 +62,14 @@ $ {command}
|
|
|
62
62
|
|
|
63
63
|
{describe any deviation from the approved plan}
|
|
64
64
|
|
|
65
|
+
## Per-Finding Verification
|
|
66
|
+
|
|
67
|
+
> Fix mode only; for an initial implementation write "(initial implementation this round, no review findings)". Read/Grep-verify each finding of the previous `review-code` before acting on it.
|
|
68
|
+
|
|
69
|
+
| Finding | Reproduced? | Disposition (fix / rebut) |
|
|
70
|
+
|------|----------|----------------------|
|
|
71
|
+
| {finding} | {yes/no, with file:line or command} | {fix note, or counter-argument + recorded under unresolved} |
|
|
72
|
+
|
|
65
73
|
## Items for Review
|
|
66
74
|
|
|
67
75
|
**Focus areas for reviewers**:
|
|
@@ -62,6 +62,14 @@ $ {command}
|
|
|
62
62
|
|
|
63
63
|
{describe any deviation from the approved plan}
|
|
64
64
|
|
|
65
|
+
## 对审查发现的逐条核实
|
|
66
|
+
|
|
67
|
+
> 仅修复模式填写;初次实现写「(本轮为初次实现,无审查发现)」。对上一轮 `review-code` 的每条发现先 Read/Grep 核实再处置。
|
|
68
|
+
|
|
69
|
+
| 发现 | 是否复现 | 处置(修复 / 反驳) |
|
|
70
|
+
|------|----------|----------------------|
|
|
71
|
+
| {finding} | {是/否,附 file:line 或命令} | {修复说明,或反证 + 记入 unresolved} |
|
|
72
|
+
|
|
65
73
|
## 供审查关注的内容
|
|
66
74
|
|
|
67
75
|
**建议审查者重点关注**:
|
|
@@ -17,6 +17,10 @@ When updating related `task.md` frontmatter, read `.agents/rules/version-stamp.m
|
|
|
17
17
|
| "`git add -A` is faster." | `git add -A` and `git add .` are forbidden; stage only explicitly listed files to avoid including unrelated changes. |
|
|
18
18
|
| "This file has a copyright header, but the year can wait." | If you changed it, update the copyright year using `date +%Y`; this is a hard pre-commit check. |
|
|
19
19
|
|
|
20
|
+
## Task id short ref
|
|
21
|
+
|
|
22
|
+
> 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.
|
|
23
|
+
|
|
20
24
|
## 1. Check Local Modifications (CRITICAL)
|
|
21
25
|
|
|
22
26
|
Before any edit, inspect:
|
|
@@ -54,7 +58,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
54
58
|
|
|
55
59
|
> The full four-case status matrix, prerequisite checks, and multi-TUI next-step commands live in `reference/task-status-update.md`. Read `reference/task-status-update.md` before updating task state.
|
|
56
60
|
|
|
57
|
-
> **IMPORTANT**: When showing the next step, output every TUI command format in full and directly use the standard template from `reference/task-status-update.md`. 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).
|
|
61
|
+
> **IMPORTANT**: When showing the next step, output every TUI command format in full and directly use the standard template from `reference/task-status-update.md`. 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 "Next steps" commands, read `.agents/rules/next-step-output.md` and use its short-id snippet to render `{task-ref}` in the commands as the short id `#NN` (falling back to the full TASK-id when unallocated or released).
|
|
58
62
|
|
|
59
63
|
Append the Commit Activity Log entry and choose exactly one next-step case:
|
|
60
64
|
- final commit -> `complete-task {task-id}`
|
|
@@ -17,6 +17,10 @@ description: "提交当前变更到 Git"
|
|
|
17
17
|
| 「`git add -A` 更省事」 | 禁止 `git add -A`/`git add .`;只暂存明确列出的文件,避免带入无关改动。 |
|
|
18
18
|
| 「改了带版权头的文件,年份先不动」 | 改了就更新版权年份(动态取 `date +%Y`),这是提交前的硬性检查。 |
|
|
19
19
|
|
|
20
|
+
## 任务入参短号别名
|
|
21
|
+
|
|
22
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
23
|
+
|
|
20
24
|
## 1. 检查本地修改(关键)
|
|
21
25
|
|
|
22
26
|
在任何编辑前先检查:
|
|
@@ -54,7 +58,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
54
58
|
|
|
55
59
|
> 完整的 4 种状态分支、前置条件检查和多 TUI 下一步命令见 `reference/task-status-update.md`。更新任务状态前,先读取 `reference/task-status-update.md`。
|
|
56
60
|
|
|
57
|
-
> **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md` 中对应场景的标准模板。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
61
|
+
> **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md` 中对应场景的标准模板。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
|
|
58
62
|
|
|
59
63
|
追加 Commit 的 Activity Log,并且只能选择一个下一步分支:
|
|
60
64
|
- 最终提交 -> `complete-task {task-id}`
|
|
@@ -50,9 +50,9 @@ Required next-step commands:
|
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
52
|
Next step - complete and archive the task:
|
|
53
|
-
- Claude Code / OpenCode: /complete-task {task-
|
|
54
|
-
- Gemini CLI: /agent-infra:complete-task {task-
|
|
55
|
-
- Codex CLI: $complete-task {task-
|
|
53
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
54
|
+
- Gemini CLI: /agent-infra:complete-task {task-ref}
|
|
55
|
+
- Codex CLI: $complete-task {task-ref}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Case 2: More Work Remains
|
|
@@ -75,9 +75,9 @@ Required next-step commands:
|
|
|
75
75
|
|
|
76
76
|
```text
|
|
77
77
|
Next step - code review:
|
|
78
|
-
- Claude Code / OpenCode: /review-code {task-
|
|
79
|
-
- Gemini CLI: /agent-infra:review-code {task-
|
|
80
|
-
- Codex CLI: $review-code {task-
|
|
78
|
+
- Claude Code / OpenCode: /review-code {task-ref}
|
|
79
|
+
- Gemini CLI: /agent-infra:review-code {task-ref}
|
|
80
|
+
- Codex CLI: $review-code {task-ref}
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
### Case 4: Ready for PR
|
|
@@ -91,9 +91,9 @@ Required next-step commands:
|
|
|
91
91
|
|
|
92
92
|
```text
|
|
93
93
|
Next step - create Pull Request:
|
|
94
|
-
- Claude Code / OpenCode: /create-pr {task-
|
|
95
|
-
- Gemini CLI: /agent-infra:create-pr {task-
|
|
96
|
-
- Codex CLI: $create-pr {task-
|
|
94
|
+
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
95
|
+
- Gemini CLI: /agent-infra:create-pr {task-ref}
|
|
96
|
+
- Codex CLI: $create-pr {task-ref}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
> Note: beyond the four cases, if `task.md` contains a valid `pr_number`, the commit skill must sync the PR summary via `reference/pr-summary-sync.md` before entering the verification gate.
|
|
@@ -50,9 +50,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
52
|
下一步 - 完成并归档任务:
|
|
53
|
-
- Claude Code / OpenCode: /complete-task {task-
|
|
54
|
-
- Gemini CLI: /agent-infra:complete-task {task-
|
|
55
|
-
- Codex CLI: $complete-task {task-
|
|
53
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
54
|
+
- Gemini CLI: /agent-infra:complete-task {task-ref}
|
|
55
|
+
- Codex CLI: $complete-task {task-ref}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### 场景 2:还有后续工作
|
|
@@ -75,9 +75,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
75
75
|
|
|
76
76
|
```text
|
|
77
77
|
下一步 - 代码审查:
|
|
78
|
-
- Claude Code / OpenCode: /review-code {task-
|
|
79
|
-
- Gemini CLI: /agent-infra:review-code {task-
|
|
80
|
-
- Codex CLI: $review-code {task-
|
|
78
|
+
- Claude Code / OpenCode: /review-code {task-ref}
|
|
79
|
+
- Gemini CLI: /agent-infra:review-code {task-ref}
|
|
80
|
+
- Codex CLI: $review-code {task-ref}
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
### 场景 4:准备创建 PR
|
|
@@ -91,9 +91,9 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
91
91
|
|
|
92
92
|
```text
|
|
93
93
|
下一步 - 创建 Pull Request:
|
|
94
|
-
- Claude Code / OpenCode: /create-pr {task-
|
|
95
|
-
- Gemini CLI: /agent-infra:create-pr {task-
|
|
96
|
-
- Codex CLI: $create-pr {task-
|
|
94
|
+
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
95
|
+
- Gemini CLI: /agent-infra:create-pr {task-ref}
|
|
96
|
+
- Codex CLI: $create-pr {task-ref}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
> 注意:四个场景之外,只要 `task.md` 中存在有效 `pr_number`,commit 技能必须先按 `reference/pr-summary-sync.md` 同步 PR 摘要,再进入完成校验。
|
|
@@ -26,6 +26,10 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
26
26
|
|
|
27
27
|
Before the state check is complete, do not make external-state assertions such as "the code is unchanged", "tests passed", or "there are no other references", including in reasoning. This gate is only a structural floor; evidence pairing and authenticity still require the report template and review discipline.
|
|
28
28
|
|
|
29
|
+
## Task id short ref
|
|
30
|
+
|
|
31
|
+
> 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.
|
|
32
|
+
|
|
29
33
|
## Steps
|
|
30
34
|
|
|
31
35
|
### 1. Verify Task Exists
|
|
@@ -85,7 +89,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
|
|
|
85
89
|
- Verify and check off all items in `## Completion Checklist` (change `- [ ]` to `- [x]`)
|
|
86
90
|
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
87
91
|
```
|
|
88
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **
|
|
92
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Task** by {agent} — Task moved to completed/
|
|
89
93
|
```
|
|
90
94
|
|
|
91
95
|
### 4. Move Task
|
|
@@ -119,6 +123,12 @@ If a valid `issue_number` exists:
|
|
|
119
123
|
|
|
120
124
|
### 7. Verification Gate
|
|
121
125
|
|
|
126
|
+
**Release short id** (after the directory has already been moved; the script is idempotent and returns 0 even if the task isn't registered):
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
node .agents/scripts/task-short-id.js release "$task_id" || true
|
|
130
|
+
```
|
|
131
|
+
|
|
122
132
|
Run the verification gate to confirm the task artifact and sync state are valid:
|
|
123
133
|
|
|
124
134
|
```bash
|
|
@@ -136,6 +146,8 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
136
146
|
|
|
137
147
|
> Execute this step only after the verification gate passes.
|
|
138
148
|
|
|
149
|
+
> The completion timestamp line (the last line of the whole output) uses `date "+%Y-%m-%d %H:%M:%S"` (local timezone, no offset) and always sits at the very end of the output for at-a-glance scanning across windows. This skill renders no "Next steps" commands but still prints the line.
|
|
150
|
+
|
|
139
151
|
Output format:
|
|
140
152
|
```
|
|
141
153
|
Task {task-id} completed; task directory moved to completed/.
|
|
@@ -147,8 +159,12 @@ Task info:
|
|
|
147
159
|
|
|
148
160
|
Deliverables:
|
|
149
161
|
- {List of key outputs: files modified, tests added, etc.}
|
|
162
|
+
|
|
163
|
+
Completed at: {completion-time}
|
|
150
164
|
```
|
|
151
165
|
|
|
166
|
+
|
|
167
|
+
|
|
152
168
|
## Completion Checklist
|
|
153
169
|
|
|
154
170
|
- [ ] Verified all workflow steps are complete
|
|
@@ -26,8 +26,11 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
26
26
|
|
|
27
27
|
状态核对完成前,禁止任何关于外部状态的断言(例如“代码没变”“测试已通过”“没有其他引用”),包括思考阶段。本门禁只提供结构下限;逐条证据配对和真实性仍需按报告模板与审查要求核对。
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## 任务入参短号别名
|
|
30
|
+
|
|
31
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
30
32
|
|
|
33
|
+
## 执行步骤
|
|
31
34
|
### 1. 验证任务存在
|
|
32
35
|
|
|
33
36
|
检查任务是否存在于 `.agents/workspace/active/{task-id}/`。
|
|
@@ -85,7 +88,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
85
88
|
- 逐项验证并勾选 `## 完成检查清单` 中的所有条目(将 `- [ ]` 改为 `- [x]`)
|
|
86
89
|
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
87
90
|
```
|
|
88
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **
|
|
91
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Task** by {agent} — Task moved to completed/
|
|
89
92
|
```
|
|
90
93
|
|
|
91
94
|
### 4. 转移任务
|
|
@@ -119,6 +122,12 @@ ls .agents/workspace/completed/{task-id}/task.md
|
|
|
119
122
|
|
|
120
123
|
### 7. 完成校验
|
|
121
124
|
|
|
125
|
+
**释放短号**(先 `mv` 目录已成功,再 release;脚本幂等,未在注册表也返回 0):
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
node .agents/scripts/task-short-id.js release "$task_id" || true
|
|
129
|
+
```
|
|
130
|
+
|
|
122
131
|
运行完成校验,确认任务产物和同步状态符合规范:
|
|
123
132
|
|
|
124
133
|
```bash
|
|
@@ -136,6 +145,8 @@ node .agents/scripts/validate-artifact.js gate complete-task .agents/workspace/c
|
|
|
136
145
|
|
|
137
146
|
> 仅在校验通过后执行本步骤。
|
|
138
147
|
|
|
148
|
+
> 完成时间收尾行(整段输出的最后一行)取值 `date "+%Y-%m-%d %H:%M:%S"`(本地时区、不带偏移),固定放在输出的绝对末尾,便于多窗口扫视。本 skill 不渲染「下一步」命令,但仍统一打印该收尾行。
|
|
149
|
+
|
|
139
150
|
输出格式:
|
|
140
151
|
```
|
|
141
152
|
任务 {task-id} 已完成,任务目录已转移到 completed/。
|
|
@@ -147,8 +158,12 @@ node .agents/scripts/validate-artifact.js gate complete-task .agents/workspace/c
|
|
|
147
158
|
|
|
148
159
|
交付物:
|
|
149
160
|
- {关键产出列表:修改的文件、添加的测试等}
|
|
161
|
+
|
|
162
|
+
Completed at: {completion-time}
|
|
150
163
|
```
|
|
151
164
|
|
|
165
|
+
|
|
166
|
+
|
|
152
167
|
## 完成检查清单
|
|
153
168
|
|
|
154
169
|
- [ ] 验证了所有工作流步骤已完成
|
|
@@ -11,6 +11,10 @@ Create a Pull Request and, when task-related, sync the essential metadata and re
|
|
|
11
11
|
|
|
12
12
|
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
13
13
|
|
|
14
|
+
## Task id short ref
|
|
15
|
+
|
|
16
|
+
> 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.
|
|
17
|
+
|
|
14
18
|
## Execution Flow
|
|
15
19
|
|
|
16
20
|
### Pre-gate: Project-level PR Flow Check
|
|
@@ -24,9 +28,9 @@ Branch on the result:
|
|
|
24
28
|
```
|
|
25
29
|
This project does not enable the PR flow (`.agents/.airc.json` sets `requiresPullRequest: false`).
|
|
26
30
|
No Pull Request is required; run instead:
|
|
27
|
-
- Claude Code / OpenCode: /complete-task {task-
|
|
28
|
-
- Gemini CLI: /agent-infra:complete-task {task-
|
|
29
|
-
- Codex CLI: $complete-task {task-
|
|
31
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
32
|
+
- Gemini CLI: /agent-infra:complete-task {task-ref}
|
|
33
|
+
- Codex CLI: $complete-task {task-ref}
|
|
30
34
|
```
|
|
31
35
|
|
|
32
36
|
### 1. Parse Command Arguments
|
|
@@ -92,7 +96,7 @@ Get the current time:
|
|
|
92
96
|
date "+%Y-%m-%d %H:%M:%S%:z"
|
|
93
97
|
```
|
|
94
98
|
|
|
95
|
-
If `{task-id}` is available, update task.md with `pr_number`, `updated_at`, `agent_infra_version`, and append the PR
|
|
99
|
+
If `{task-id}` is available, update task.md with `pr_number`, `updated_at`, `agent_infra_version`, and append the Create PR Activity Log entry including metadata-sync and summary results.
|
|
96
100
|
|
|
97
101
|
### 9. Verification Gate
|
|
98
102
|
|
|
@@ -113,7 +117,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
113
117
|
|
|
114
118
|
> Execute this step only after the verification gate passes.
|
|
115
119
|
|
|
116
|
-
> **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).
|
|
120
|
+
> **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 "Next steps" commands, read `.agents/rules/next-step-output.md` and use its short-id snippet to render `{task-ref}` in the commands as the short id `#NN` (falling back to the full TASK-id when unallocated or released).
|
|
117
121
|
|
|
118
122
|
Explain the created PR URL, summarize metadata sync and summary-comment results, and recommend `complete-task {task-id}` once the workflow is truly done.
|
|
119
123
|
|
|
@@ -11,6 +11,10 @@ description: "创建 Pull Request 到目标分支"
|
|
|
11
11
|
|
|
12
12
|
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
13
13
|
|
|
14
|
+
## 任务入参短号别名
|
|
15
|
+
|
|
16
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
17
|
+
|
|
14
18
|
## 执行流程
|
|
15
19
|
|
|
16
20
|
### 前置门控:项目级 PR 流程检查
|
|
@@ -24,9 +28,9 @@ description: "创建 Pull Request 到目标分支"
|
|
|
24
28
|
```
|
|
25
29
|
当前项目未启用 PR 流程(`.agents/.airc.json` 中 `requiresPullRequest: false`)。
|
|
26
30
|
无需创建 Pull Request,请直接运行:
|
|
27
|
-
- Claude Code / OpenCode:/complete-task {task-
|
|
28
|
-
- Gemini CLI:/agent-infra:complete-task {task-
|
|
29
|
-
- Codex CLI:$complete-task {task-
|
|
31
|
+
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
32
|
+
- Gemini CLI:/agent-infra:complete-task {task-ref}
|
|
33
|
+
- Codex CLI:$complete-task {task-ref}
|
|
30
34
|
```
|
|
31
35
|
|
|
32
36
|
### 1. 解析命令参数
|
|
@@ -92,7 +96,7 @@ description: "创建 Pull Request 到目标分支"
|
|
|
92
96
|
date "+%Y-%m-%d %H:%M:%S%:z"
|
|
93
97
|
```
|
|
94
98
|
|
|
95
|
-
如果获取到了 `{task-id}`,更新 task.md 的 `pr_number`、`updated_at`、`agent_infra_version`,并追加 PR
|
|
99
|
+
如果获取到了 `{task-id}`,更新 task.md 的 `pr_number`、`updated_at`、`agent_infra_version`,并追加 Create PR 的 Activity Log,记录元数据同步和摘要发布结果。
|
|
96
100
|
|
|
97
101
|
### 9. 完成校验
|
|
98
102
|
|
|
@@ -113,7 +117,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
113
117
|
|
|
114
118
|
> 仅在校验通过后执行本步骤。
|
|
115
119
|
|
|
116
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
120
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。 渲染「下一步」命令前,先读取 `.agents/rules/next-step-output.md`,按其取短号片段把命令中的 `{task-ref}` 渲染为短号 `#NN`(未分配/已释放时回退完整 TASK-id)。
|
|
117
121
|
|
|
118
122
|
说明 PR URL、元数据同步结果、摘要评论结果,并在工作流真正完成后推荐执行 `complete-task {task-id}`。
|
|
119
123
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"activity-log": {
|
|
18
|
-
"expected_action_pattern": "PR Created",
|
|
18
|
+
"expected_action_pattern": "(Create PR|PR Created)",
|
|
19
19
|
"freshness_minutes": 30
|
|
20
20
|
},
|
|
21
21
|
"platform-sync": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"verify_pr_assignee": true,
|
|
27
27
|
"verify_issue_fields": true,
|
|
28
28
|
"verify_milestone": true,
|
|
29
|
+
"verify_milestone_specific": true,
|
|
29
30
|
"expected_pr_comment_marker_key": "prSummary"
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -12,4 +12,4 @@ Read this file before creating or updating the single reviewer-facing PR summary
|
|
|
12
12
|
|
|
13
13
|
## Result Reporting
|
|
14
14
|
|
|
15
|
-
Reuse the normalized result string from `.agents/rules/pr-sync.md` in this skill's user output or `PR
|
|
15
|
+
Reuse the normalized result string from `.agents/rules/pr-sync.md` in this skill's user output or `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
|
```
|