@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
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: watch-pr
|
|
3
|
+
description: "监控 PR 的 required checks 并在失败时自愈"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 监控 Pull Request
|
|
7
|
+
|
|
8
|
+
在 `create-pr` 之后持续监控 PR 的 required CI checks:全绿则引导合入,required check 失败则自动拉日志、本地修复并推送、重新轮询;达修复上限或属非代码层/不可定位失败则停止并向用户求助。平台专属命令集中在 `.agents/rules/pr-checks-commands.md`,本技能正文保持平台无关。
|
|
9
|
+
|
|
10
|
+
## 行为边界 / 关键规则
|
|
11
|
+
|
|
12
|
+
- 仅监控 + 自愈当前 PR 的 required checks;不做与失败 check 无关的改动。
|
|
13
|
+
- 自愈会修改业务代码并 `git push` 到 PR 分支,但**推送前必须本地跑通相关测试**;修复尝试有硬上限(默认 2);仅对可定位的代码层失败(lint / format / test / 类型 / 构建)自愈,非代码层(网络 / 权限 / 外部服务 / flaky)一律转求助出口。
|
|
14
|
+
- 求助出口是「产出后停止」语义:停止本轮、输出阻塞说明、等待用户主动触发,**不**中途提问。
|
|
15
|
+
- 裸数字 / `#NN` / `TASK-id` 入参一律按任务短号解析(见 `.agents/rules/task-short-id.md`);PR 号只走 `--pr <number>` / PR URL / 省略(当前分支),不复用裸数字语法。
|
|
16
|
+
- 执行本技能(任务锚定路径)后,必须更新 task.md。
|
|
17
|
+
|
|
18
|
+
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
19
|
+
|
|
20
|
+
## 任务入参短号别名
|
|
21
|
+
|
|
22
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
23
|
+
|
|
24
|
+
## 执行步骤
|
|
25
|
+
|
|
26
|
+
### 1. 解析入参
|
|
27
|
+
|
|
28
|
+
按以下确定性分支解析出目标 PR 号 `{pr#}` 与可选 `{task-id}`:
|
|
29
|
+
|
|
30
|
+
- 场景 A(省略入参):按 `.agents/rules/pr-checks-commands.md` 取当前分支的 PR 号;随后按下方「反查任务」确定 `{task-id}`。
|
|
31
|
+
- 场景 B(`#NN` / 裸数字 / `TASK-id`,**任务锚定主路径**):匹配 `^[#]?[0-9]+$` 时按「任务入参短号别名」解析为完整 `{task-id}`(解析失败直接透传退出码,不重写错误处理);`TASK-id` 直接采用。读 `.agents/workspace/active/{task-id}/task.md` 取 `pr_number` 作为 `{pr#}`;`pr_number` 为空时按「错误处理」提示先 `create-pr`,停止。
|
|
32
|
+
- 场景 C(`--pr <number>` 或 PR URL):直接取该 PR 号为 `{pr#}`;随后按「反查任务」确定 `{task-id}`。
|
|
33
|
+
- 反查任务(场景 A / C):在 `.agents/workspace/active/*/task.md` 中查找 `pr_number == {pr#}` 的任务;命中则取该 `{task-id}`(任务锚定);未命中则进入「仅监控」降级路径(无 `{task-id}`,跳过步骤 5/6)。
|
|
34
|
+
|
|
35
|
+
### 2. 监控 required checks
|
|
36
|
+
|
|
37
|
+
执行此步骤前,先读取 `reference/monitor-and-heal.md` 与 `.agents/rules/pr-checks-commands.md`。
|
|
38
|
+
|
|
39
|
+
按 `.agents/rules/pr-checks-commands.md` 的监控命令对 `{pr#}` 的 required checks 轮询(含总时长上限,默认 30 分钟),按 `reference/monitor-and-heal.md` 的「结果分类」分为「全绿」/「失败」/「挂起」三个场景,分别进入步骤 7 全绿出口、步骤 3 自愈、或步骤 4 求助。
|
|
40
|
+
|
|
41
|
+
### 3. 失败自愈循环
|
|
42
|
+
|
|
43
|
+
执行此步骤前,先读取 `reference/monitor-and-heal.md` 的「自愈决策树」与 `.agents/rules/pr-checks-commands.md` 的「解析失败 run id 并拉日志」。
|
|
44
|
+
|
|
45
|
+
对失败 check:先按规则确定性解析其失败 run 并拉取失败日志、判定失败类别;仅当属可定位的代码层失败时,本地最小化修复、运行对应测试通过后**暂存并提交本次修复再推送**(`git add` 仅相关文件 → 按 `.agents/rules/commit-and-pr.md` `git commit` → `git push` 到当前 PR 分支,并记录 commit SHA),再回到步骤 2 重新监控。修复尝试计数,达硬上限(默认 2)或 run 不可定位 → 转步骤 4。
|
|
46
|
+
|
|
47
|
+
### 4. 求助出口(产出后停止)
|
|
48
|
+
|
|
49
|
+
当自愈达上限、失败属非代码层、run id 不可定位、或步骤 2 挂起超时时,停止本轮并向用户汇总:阻塞原因、已尝试的修复(含每次修复 commit)、相关失败 job 与 run/log 链接(报告结构见 `reference/monitor-and-heal.md` 的「求助报告模板」)。**不**渲染下一步命令,等待用户裁定。随后在任务锚定路径下执行步骤 5/6 记录本轮结果。
|
|
50
|
+
|
|
51
|
+
### 5. 更新任务状态
|
|
52
|
+
|
|
53
|
+
> 仅任务锚定路径执行;「仅监控」降级路径跳过本步骤与步骤 6。
|
|
54
|
+
|
|
55
|
+
获取当前时间:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
date "+%Y-%m-%d %H:%M:%S%:z"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
62
|
+
- `assigned_to`:{当前代理}
|
|
63
|
+
- `updated_at`:{当前时间}
|
|
64
|
+
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
65
|
+
- **不改** `pr_status`(保持 `created`)与 `current_step`
|
|
66
|
+
- **追加**到 `## 活动日志`(不要覆盖之前的记录;`{N}` = 本任务已有 Watch PR 条目数 + 1):
|
|
67
|
+
```
|
|
68
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N})** by {agent} — {全绿:all required checks green / 阻塞:blocked: {简述}}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 6. 完成校验
|
|
72
|
+
|
|
73
|
+
> 仅任务锚定路径执行。
|
|
74
|
+
|
|
75
|
+
运行完成校验:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
node .agents/scripts/validate-artifact.js gate watch-pr .agents/workspace/active/{task-id} --format text
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
处理结果:
|
|
82
|
+
- 退出码 0(全部通过)-> 继续到「告知用户」步骤
|
|
83
|
+
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
84
|
+
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
85
|
+
|
|
86
|
+
将校验输出保留在回复中作为当次验证输出。没有当次校验输出,不得声明完成。
|
|
87
|
+
|
|
88
|
+
### 7. 告知用户
|
|
89
|
+
|
|
90
|
+
> 任务锚定路径仅在校验通过后执行本步骤。
|
|
91
|
+
|
|
92
|
+
> **重要**:以下「下一步」中列出的所有 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` 收尾行(成功、错误、早退等任何面向用户输出都适用,不限于校验通过的成功态)。
|
|
93
|
+
|
|
94
|
+
按场景输出:
|
|
95
|
+
- 「全绿」+ 任务锚定:说明所有 required checks 已通过、PR 可合入,并按下方模板渲染下一步(`{task-ref}` 替换为短号):
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
下一步 - 完成并归档任务:
|
|
99
|
+
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
100
|
+
- Gemini CLI:/agent-infra:complete-task {task-ref}
|
|
101
|
+
- Codex CLI:$complete-task {task-ref}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- 「全绿」+ 仅监控降级:说明 PR 可合入;本次无关联任务,请对相应任务运行 `complete-task`(无 `{task-ref}` 可渲染时不强行输出短号命令块)。
|
|
105
|
+
- 「阻塞」:仅输出步骤 4 的阻塞说明,不推荐下一步命令。
|
|
106
|
+
|
|
107
|
+
## 完成检查清单
|
|
108
|
+
|
|
109
|
+
- [ ] 解析出目标 PR(及可能的任务上下文)
|
|
110
|
+
- [ ] 完成 required checks 监控,得到全绿 / 阻塞结论
|
|
111
|
+
- [ ] 自愈仅限可定位的代码层失败,且推送前本地测试通过、未超修复上限
|
|
112
|
+
- [ ] 任务锚定路径:更新了 task.md 并追加 Watch PR 的 Activity Log
|
|
113
|
+
- [ ] 任务锚定路径:完成校验通过
|
|
114
|
+
- [ ] 向用户展示了所有 TUI 格式的下一步命令(全绿出口;阻塞出口不渲染下一步)
|
|
115
|
+
|
|
116
|
+
## 停止
|
|
117
|
+
|
|
118
|
+
完成检查清单后立即停止。全绿出口等待用户运行 `complete-task`;阻塞出口等待用户裁定。
|
|
119
|
+
|
|
120
|
+
## 注意事项
|
|
121
|
+
|
|
122
|
+
1. **前置条件**:PR 已存在(由 `create-pr` 创建或显式 `--pr` / 当前分支可定位)。
|
|
123
|
+
2. **裸数字恒为任务短号**:不要把裸数字当作 PR 号;PR 号用 `--pr <number>`。
|
|
124
|
+
3. **自愈安全**:推送前必须本地测试通过;非代码层 / 不可定位失败一律求助,不盲目重试。
|
|
125
|
+
4. **可多次运行**:watch-pr 可在一次任务生命周期多次运行,Round 计数按已有 Watch PR Activity Log 条目数递增。
|
|
126
|
+
|
|
127
|
+
## 错误处理
|
|
128
|
+
|
|
129
|
+
- 无法定位 PR(任务短号命中但 task.md 无 `pr_number`,且未传 `--pr`、当前分支也无 PR):提示「请先运行 `create-pr`,或用 `--pr <number>` 指定 PR」,停止。
|
|
130
|
+
- 平台 CLI 未认证或 API 不可用:提示需人工介入,停止。
|
|
131
|
+
- 短号解析失败:透传 `task-short-id.js` 的退出码与错误信息,不重写。
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "watch-pr",
|
|
3
|
+
"checks": {
|
|
4
|
+
"task-meta": {
|
|
5
|
+
"required_fields": [
|
|
6
|
+
"id",
|
|
7
|
+
"type",
|
|
8
|
+
"workflow",
|
|
9
|
+
"status",
|
|
10
|
+
"created_at",
|
|
11
|
+
"updated_at",
|
|
12
|
+
"agent_infra_version",
|
|
13
|
+
"current_step",
|
|
14
|
+
"assigned_to"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"activity-log": {
|
|
18
|
+
"expected_action_pattern": "(Watch PR|Watching PR) \\(Round \\d+\\)",
|
|
19
|
+
"freshness_minutes": 30
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Monitoring & Self-Heal Details
|
|
2
|
+
|
|
3
|
+
Platform-agnostic decision logic for `watch-pr` steps 2/3/4. The concrete platform commands (watch, resolve a failing run, pull logs, read the PR number) live in `.agents/rules/pr-checks-commands.md`; this file only describes platform-independent classification and decisions.
|
|
4
|
+
|
|
5
|
+
## Outcome Classification
|
|
6
|
+
|
|
7
|
+
After running the watch command from `.agents/rules/pr-checks-commands.md`, classify by its exit code into three buckets:
|
|
8
|
+
|
|
9
|
+
- All required checks passed → "all green" (SKILL step 7 green exit).
|
|
10
|
+
- At least one failed / errored → "failure" (SKILL step 3 self-heal).
|
|
11
|
+
- Still pending or the overall time cap was reached → "pending" (SKILL step 4 help exit).
|
|
12
|
+
|
|
13
|
+
## Self-Heal Decision Tree
|
|
14
|
+
|
|
15
|
+
For each failing check, decide "self-heal" vs "ask for help" in this order:
|
|
16
|
+
|
|
17
|
+
1. **Can the corresponding CI run be located** (per the rule's "Resolve a failing run id")? No → ask for help.
|
|
18
|
+
2. **Which layer is the failure?**
|
|
19
|
+
- Code layer (self-healable): lint / format / type check / unit or integration test assertions / build-compile errors — locatable to a specific file and cause in this repo from the logs.
|
|
20
|
+
- Non-code layer (not self-healable): network flakiness, permissions / tokens, external service outages, dependency-source failures, obvious flakiness (a re-run might go green but it was not introduced by this change) → ask for help.
|
|
21
|
+
3. **Has the fix cap been reached** (default 2 push-fixes)? Yes → ask for help.
|
|
22
|
+
4. When "locatable + code layer + under cap" holds, perform one self-heal:
|
|
23
|
+
- Before fixing, run `git status -s` to record the working tree and ensure only changes related to this failure are included.
|
|
24
|
+
- Locate and make a minimal fix per the logs (touch only code / tests / config related to that failure).
|
|
25
|
+
- Run the relevant tests: prefer the local command for the failing job; fall back to `npm run test:core` repo-wide. **Do not commit or push before tests pass.**
|
|
26
|
+
- After tests pass, publish the fix: per `.agents/rules/commit-and-pr.md` stage only the related files (`git add <paths>`, avoid `git add -A` pulling in unrelated changes) → create the fix commit (`git commit`) → `git push` to the current PR branch.
|
|
27
|
+
- Record the fix commit SHA, increment the fix count, and return to SKILL step 2 to re-watch.
|
|
28
|
+
- Never make unrelated "drive-by" optimizations; never loosen / skip the failing assertion to "make it green".
|
|
29
|
+
|
|
30
|
+
## Help Report Template
|
|
31
|
+
|
|
32
|
+
When entering the help exit, output the following fixed structure to the user (not written to any artifact file):
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
PR #{pr#} monitoring is blocked; manual intervention needed.
|
|
36
|
+
|
|
37
|
+
Blocker: {non-code layer / fix cap reached / run unlocatable / poll timeout}
|
|
38
|
+
Failing check: {name} (workflow: {workflow})
|
|
39
|
+
Failing run / logs: {run/job link}
|
|
40
|
+
Fixes attempted ({k} total):
|
|
41
|
+
- {commit summary}: {change summary} → still failing after re-watch
|
|
42
|
+
Suggestion: {upgrade platform CLI / check permissions / re-run external dependency / inspect logs manually, etc.}
|
|
43
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# 监控与自愈细则
|
|
2
|
+
|
|
3
|
+
`watch-pr` 步骤 2/3/4 的平台无关判定逻辑。具体平台命令(监控、解析失败 run、拉日志、读取 PR 号)见 `.agents/rules/pr-checks-commands.md`;本文件只描述与平台无关的分类与决策。
|
|
4
|
+
|
|
5
|
+
## 结果分类
|
|
6
|
+
|
|
7
|
+
按 `.agents/rules/pr-checks-commands.md` 的监控命令执行后,依其退出码归为三类:
|
|
8
|
+
|
|
9
|
+
- 全部 required checks 通过 → 「全绿」(SKILL 步骤 7 全绿出口)。
|
|
10
|
+
- 至少一个失败 / 出错 → 「失败」(SKILL 步骤 3 自愈)。
|
|
11
|
+
- 仍有 pending 或达到总时长上限 → 「挂起」(SKILL 步骤 4 求助)。
|
|
12
|
+
|
|
13
|
+
## 自愈决策树
|
|
14
|
+
|
|
15
|
+
对每个失败 check,按下列顺序判定「自愈」还是「求助」:
|
|
16
|
+
|
|
17
|
+
1. **能否定位到对应的 CI run**(按规则的「解析失败 run id」)?否 → 求助。
|
|
18
|
+
2. **失败属于哪一层**?
|
|
19
|
+
- 代码层(可自愈):lint / format / 类型检查 / 单元或集成测试断言 / 构建编译错误等,能从日志定位到本仓库具体文件与原因。
|
|
20
|
+
- 非代码层(不可自愈):网络抖动、权限 / 令牌、外部服务不可用、依赖源故障、明显的 flaky(重跑可能变绿但非本次改动引入)→ 求助。
|
|
21
|
+
3. **是否已达修复上限**(默认 2 次推送修复)?是 → 求助。
|
|
22
|
+
4. 满足「可定位 + 代码层 + 未达上限」时执行一次自愈:
|
|
23
|
+
- 自愈前先 `git status -s` 记录当前工作树,确保后续只纳入与本次失败相关的改动。
|
|
24
|
+
- 在本地按日志定位并最小化修复(只动与该失败相关的代码 / 测试 / 配置)。
|
|
25
|
+
- 运行对应测试:优先失败 job 对应的本地命令;仓库统一回退 `npm run test:core`。**测试通过前不得提交或推送。**
|
|
26
|
+
- 测试通过后发布修复:按 `.agents/rules/commit-and-pr.md` 仅暂存本次相关文件(`git add <相关路径>`,避免 `git add -A` 卷入无关改动)→ 创建修复 commit(`git commit`)→ `git push` 到当前 PR 分支。
|
|
27
|
+
- 记录本次修复的 commit SHA,修复计数 +1,回到 SKILL 步骤 2 重新监控。
|
|
28
|
+
- 绝不执行与失败无关的「顺手优化」;不放宽 / 跳过失败的断言来「修绿」。
|
|
29
|
+
|
|
30
|
+
## 求助报告模板
|
|
31
|
+
|
|
32
|
+
进入求助出口时,向用户输出以下固定结构(不写入产物文件):
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
PR #{pr#} 监控阻塞,需人工介入。
|
|
36
|
+
|
|
37
|
+
阻塞原因:{非代码层 / 达修复上限 / run 不可定位 / 轮询超时}
|
|
38
|
+
失败 check:{name}(workflow:{workflow})
|
|
39
|
+
失败 run / 日志:{run/job 链接}
|
|
40
|
+
已尝试的修复(共 {k} 次):
|
|
41
|
+
- {commit 简述}:{改动概述} → 重新监控后仍失败
|
|
42
|
+
建议:{升级平台 CLI / 检查权限 / 重跑外部依赖 / 人工查看日志 等}
|
|
43
|
+
```
|
|
@@ -7,13 +7,13 @@ status: open # open | in-progress | review | blocked | complet
|
|
|
7
7
|
created_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
8
8
|
updated_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
9
9
|
agent_infra_version: v0.0.0 # Current agent-infra version; refreshed by workflow commands
|
|
10
|
-
short_id: # Allocated by create-task / import-* in active window; kept as historical value after archival
|
|
11
10
|
priority: # Optional Issue field: Urgent | High | Medium | Low
|
|
12
11
|
effort: # Optional Issue field: High | Medium | Low
|
|
13
12
|
start_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
14
13
|
target_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
15
14
|
current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
|
|
16
15
|
assigned_to: # claude | codex | gemini | opencode | human
|
|
16
|
+
pr_status: pending # PR status: pending (default) | created (PR created) | skipped (explicitly skipped)
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# Task: [Title]
|
|
@@ -7,13 +7,13 @@ status: open # open | in-progress | review | blocked | complet
|
|
|
7
7
|
created_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
8
8
|
updated_at: YYYY-MM-DDTHH:mm:ss±HH:MM
|
|
9
9
|
agent_infra_version: v0.0.0 # 当前 agent-infra 版本;由工作流命令刷新
|
|
10
|
-
short_id: # 由 create-task / import-* 在 active 期内写入;归档后保留历史值
|
|
11
10
|
priority: # 可选 Issue 字段:Urgent | High | Medium | Low
|
|
12
11
|
effort: # 可选 Issue 字段:High | Medium | Low
|
|
13
12
|
start_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
14
13
|
target_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
15
14
|
current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
|
|
16
15
|
assigned_to: # claude | codex | gemini | opencode | human
|
|
16
|
+
pr_status: pending # PR 状态:pending(默认)| created(已创建 PR)| skipped(显式跳过)
|
|
17
17
|
---
|
|
18
18
|
|
|
19
19
|
# 任务:[标题]
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Bug-fix workflow
|
|
2
2
|
# Use this workflow when fixing a defect.
|
|
3
3
|
#
|
|
4
|
-
# Note: a step's `pr_tasks` list
|
|
5
|
-
# `.agents/.airc.json:
|
|
4
|
+
# Note: whether a step's `pr_tasks` list counts toward workflow progress follows the "PR path" rule:
|
|
5
|
+
# `.agents/.airc.json:prFlow="required"` always counts; `prFlow="disabled"` never counts;
|
|
6
|
+
# when the field is absent, exclude only if task.md's `pr_status=skipped`, otherwise count
|
|
7
|
+
# (see .agents/skills/complete-task/SKILL.md).
|
|
6
8
|
|
|
7
9
|
name: bug-fix
|
|
8
10
|
description: Workflow for diagnosing and fixing a defect.
|
|
@@ -139,7 +141,7 @@ steps:
|
|
|
139
141
|
rule: "Read the highest-round plan review artifact and confirm feedback is approved or handled"
|
|
140
142
|
- name: review-code
|
|
141
143
|
pattern: "review-code.md | review-code-r{N}.md"
|
|
142
|
-
rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Code
|
|
144
|
+
rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Review Code entry in task.md Activity Log"
|
|
143
145
|
outputs:
|
|
144
146
|
- name: code
|
|
145
147
|
pattern: "code.md | code-r{N}.md"
|
|
@@ -176,7 +178,7 @@ steps:
|
|
|
176
178
|
- Findings list, if any
|
|
177
179
|
|
|
178
180
|
- name: commit
|
|
179
|
-
description: Finalize the defect fix and create a pull request (the PR portion runs only
|
|
181
|
+
description: Finalize the defect fix and create a pull request (the PR portion runs only on the PR path).
|
|
180
182
|
recommended_agents:
|
|
181
183
|
- claude
|
|
182
184
|
- human
|
|
@@ -192,4 +194,4 @@ steps:
|
|
|
192
194
|
- Task workspace
|
|
193
195
|
outputs:
|
|
194
196
|
- Completed task workspace under .agents/workspace/completed/
|
|
195
|
-
- Pull request (only
|
|
197
|
+
- Pull request (only on the PR path)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# 缺陷修复工作流
|
|
2
2
|
# 修复缺陷时使用此工作流。
|
|
3
3
|
#
|
|
4
|
-
# 注:步骤中的 `pr_tasks`
|
|
5
|
-
#
|
|
4
|
+
# 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
|
|
5
|
+
# `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
|
|
6
|
+
# 字段缺省时仅当 task.md 的 `pr_status=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
|
|
6
7
|
|
|
7
8
|
name: bug-fix
|
|
8
9
|
description: 诊断和修复缺陷的工作流。
|
|
@@ -139,7 +140,7 @@ steps:
|
|
|
139
140
|
rule: "读取最高轮次的方案审查产物,确认方案已获通过或已处理反馈"
|
|
140
141
|
- name: review-code
|
|
141
142
|
pattern: "review-code.md | review-code-r{N}.md"
|
|
142
|
-
rule: "修复模式读取最高轮次的代码审查产物,并校验其与 task.md Activity Log 中最近一条 Code
|
|
143
|
+
rule: "修复模式读取最高轮次的代码审查产物,并校验其与 task.md Activity Log 中最近一条 Review Code 记录一致"
|
|
143
144
|
outputs:
|
|
144
145
|
- name: code
|
|
145
146
|
pattern: "code.md | code-r{N}.md"
|
|
@@ -176,7 +177,7 @@ steps:
|
|
|
176
177
|
- 问题列表(如有)
|
|
177
178
|
|
|
178
179
|
- name: commit
|
|
179
|
-
description: 最终确认缺陷修复并创建拉取请求(PR
|
|
180
|
+
description: 最终确认缺陷修复并创建拉取请求(PR 部分仅在走 PR 路径时执行)。
|
|
180
181
|
recommended_agents:
|
|
181
182
|
- claude
|
|
182
183
|
- human
|
|
@@ -192,4 +193,4 @@ steps:
|
|
|
192
193
|
- 任务文件
|
|
193
194
|
outputs:
|
|
194
195
|
- 已完成的任务文件(位于 .agents/workspace/completed/)
|
|
195
|
-
-
|
|
196
|
+
- 拉取请求(仅走 PR 路径时)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Feature development workflow
|
|
2
2
|
# Use this workflow when implementing a new feature.
|
|
3
3
|
#
|
|
4
|
-
# Note: a step's `pr_tasks` list
|
|
5
|
-
# `.agents/.airc.json:
|
|
4
|
+
# Note: whether a step's `pr_tasks` list counts toward workflow progress follows the "PR path" rule:
|
|
5
|
+
# `.agents/.airc.json:prFlow="required"` always counts; `prFlow="disabled"` never counts;
|
|
6
|
+
# when the field is absent, exclude only if task.md's `pr_status=skipped`, otherwise count
|
|
7
|
+
# (see .agents/skills/complete-task/SKILL.md).
|
|
6
8
|
|
|
7
9
|
name: feature-development
|
|
8
10
|
description: End-to-end workflow for developing a new feature.
|
|
@@ -139,7 +141,7 @@ steps:
|
|
|
139
141
|
rule: "Read the highest-round plan review artifact and confirm feedback is approved or handled"
|
|
140
142
|
- name: review-code
|
|
141
143
|
pattern: "review-code.md | review-code-r{N}.md"
|
|
142
|
-
rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Code
|
|
144
|
+
rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Review Code entry in task.md Activity Log"
|
|
143
145
|
outputs:
|
|
144
146
|
- name: code
|
|
145
147
|
pattern: "code.md | code-r{N}.md"
|
|
@@ -176,7 +178,7 @@ steps:
|
|
|
176
178
|
- Findings to fix
|
|
177
179
|
|
|
178
180
|
- name: commit
|
|
179
|
-
description: Finalize changes and create a pull request (the PR portion runs only
|
|
181
|
+
description: Finalize changes and create a pull request (the PR portion runs only on the PR path).
|
|
180
182
|
recommended_agents:
|
|
181
183
|
- claude
|
|
182
184
|
- human
|
|
@@ -192,4 +194,4 @@ steps:
|
|
|
192
194
|
- Task workspace
|
|
193
195
|
outputs:
|
|
194
196
|
- Completed task workspace under .agents/workspace/completed/
|
|
195
|
-
- Pull request (only
|
|
197
|
+
- Pull request (only on the PR path)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# 功能开发工作流
|
|
2
2
|
# 实现新功能时使用此工作流。
|
|
3
3
|
#
|
|
4
|
-
# 注:步骤中的 `pr_tasks`
|
|
5
|
-
#
|
|
4
|
+
# 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
|
|
5
|
+
# `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
|
|
6
|
+
# 字段缺省时仅当 task.md 的 `pr_status=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
|
|
6
7
|
|
|
7
8
|
name: feature-development
|
|
8
9
|
description: 开发新功能的端到端工作流。
|
|
@@ -139,7 +140,7 @@ steps:
|
|
|
139
140
|
rule: "读取最高轮次的方案审查产物,确认方案已获通过或已处理反馈"
|
|
140
141
|
- name: review-code
|
|
141
142
|
pattern: "review-code.md | review-code-r{N}.md"
|
|
142
|
-
rule: "修复模式读取最高轮次的代码审查产物,并校验其与 task.md Activity Log 中最近一条 Code
|
|
143
|
+
rule: "修复模式读取最高轮次的代码审查产物,并校验其与 task.md Activity Log 中最近一条 Review Code 记录一致"
|
|
143
144
|
outputs:
|
|
144
145
|
- name: code
|
|
145
146
|
pattern: "code.md | code-r{N}.md"
|
|
@@ -176,7 +177,7 @@ steps:
|
|
|
176
177
|
- 待修复问题列表
|
|
177
178
|
|
|
178
179
|
- name: commit
|
|
179
|
-
description: 最终确认变更并创建拉取请求(PR
|
|
180
|
+
description: 最终确认变更并创建拉取请求(PR 部分仅在走 PR 路径时执行)。
|
|
180
181
|
recommended_agents:
|
|
181
182
|
- claude
|
|
182
183
|
- human
|
|
@@ -192,4 +193,4 @@ steps:
|
|
|
192
193
|
- 任务文件
|
|
193
194
|
outputs:
|
|
194
195
|
- 已完成的任务文件(位于 .agents/workspace/completed/)
|
|
195
|
-
-
|
|
196
|
+
- 拉取请求(仅走 PR 路径时)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Refactoring workflow
|
|
2
2
|
# Use this workflow for code refactoring tasks.
|
|
3
3
|
#
|
|
4
|
-
# Note: a step's `pr_tasks` list
|
|
5
|
-
# `.agents/.airc.json:
|
|
4
|
+
# Note: whether a step's `pr_tasks` list counts toward workflow progress follows the "PR path" rule:
|
|
5
|
+
# `.agents/.airc.json:prFlow="required"` always counts; `prFlow="disabled"` never counts;
|
|
6
|
+
# when the field is absent, exclude only if task.md's `pr_status=skipped`, otherwise count
|
|
7
|
+
# (see .agents/skills/complete-task/SKILL.md).
|
|
6
8
|
|
|
7
9
|
name: refactoring
|
|
8
10
|
description: Safe and structured workflow for code refactoring.
|
|
@@ -141,7 +143,7 @@ steps:
|
|
|
141
143
|
rule: "Read the highest-round plan review artifact and confirm feedback is approved or handled"
|
|
142
144
|
- name: review-code
|
|
143
145
|
pattern: "review-code.md | review-code-r{N}.md"
|
|
144
|
-
rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Code
|
|
146
|
+
rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Review Code entry in task.md Activity Log"
|
|
145
147
|
outputs:
|
|
146
148
|
- name: code
|
|
147
149
|
pattern: "code.md | code-r{N}.md"
|
|
@@ -180,7 +182,7 @@ steps:
|
|
|
180
182
|
- Findings list, if any
|
|
181
183
|
|
|
182
184
|
- name: commit
|
|
183
|
-
description: Finalize the refactoring and create a pull request (the PR portion runs only
|
|
185
|
+
description: Finalize the refactoring and create a pull request (the PR portion runs only on the PR path).
|
|
184
186
|
recommended_agents:
|
|
185
187
|
- claude
|
|
186
188
|
- human
|
|
@@ -196,4 +198,4 @@ steps:
|
|
|
196
198
|
- Task workspace
|
|
197
199
|
outputs:
|
|
198
200
|
- Completed task workspace under .agents/workspace/completed/
|
|
199
|
-
- Pull request (only
|
|
201
|
+
- Pull request (only on the PR path)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# 重构工作流
|
|
2
2
|
# 代码重构任务时使用此工作流。
|
|
3
3
|
#
|
|
4
|
-
# 注:步骤中的 `pr_tasks`
|
|
5
|
-
#
|
|
4
|
+
# 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
|
|
5
|
+
# `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
|
|
6
|
+
# 字段缺省时仅当 task.md 的 `pr_status=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
|
|
6
7
|
|
|
7
8
|
name: refactoring
|
|
8
9
|
description: 安全且结构化的代码重构工作流。
|
|
@@ -141,7 +142,7 @@ steps:
|
|
|
141
142
|
rule: "读取最高轮次的方案审查产物,确认方案已获通过或已处理反馈"
|
|
142
143
|
- name: review-code
|
|
143
144
|
pattern: "review-code.md | review-code-r{N}.md"
|
|
144
|
-
rule: "修复模式读取最高轮次的代码审查产物,并校验其与 task.md Activity Log 中最近一条 Code
|
|
145
|
+
rule: "修复模式读取最高轮次的代码审查产物,并校验其与 task.md Activity Log 中最近一条 Review Code 记录一致"
|
|
145
146
|
outputs:
|
|
146
147
|
- name: code
|
|
147
148
|
pattern: "code.md | code-r{N}.md"
|
|
@@ -180,7 +181,7 @@ steps:
|
|
|
180
181
|
- 问题列表(如有)
|
|
181
182
|
|
|
182
183
|
- name: commit
|
|
183
|
-
description: 最终确认重构并创建拉取请求(PR
|
|
184
|
+
description: 最终确认重构并创建拉取请求(PR 部分仅在走 PR 路径时执行)。
|
|
184
185
|
recommended_agents:
|
|
185
186
|
- claude
|
|
186
187
|
- human
|
|
@@ -196,4 +197,4 @@ steps:
|
|
|
196
197
|
- 任务文件
|
|
197
198
|
outputs:
|
|
198
199
|
- 已完成的任务文件(位于 .agents/workspace/completed/)
|
|
199
|
-
-
|
|
200
|
+
- 拉取请求(仅走 PR 路径时)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Watch a PR's required checks and self-heal on failure"
|
|
3
|
+
agent: general
|
|
4
|
+
subtask: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Watch PR checks: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
Read and execute the watch-pr skill from `.agents/skills/watch-pr/SKILL.md`.
|
|
10
|
+
|
|
11
|
+
Follow all steps defined in the skill exactly.
|