watch-pr

Solid

监控 PR 的 required checks 并在失败时自愈。 当需要监控 PR 的 required checks 并在失败时自愈时使用。

AI & Automation 83 stars 5 forks Updated today MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 监控 Pull Request 在 `create-pr` 之后持续监控 PR 的 required CI checks:全绿则引导合入,required check 失败则自动拉日志、本地修复并推送、重新轮询;达修复上限或属非代码层/不可定位失败则停止并向用户求助。平台专属命令集中在 `.agents/rules/pr-checks-commands.md`,本技能正文保持平台无关。 ## 行为边界 / 关键规则 - 仅监控 + 自愈当前 PR 的 required checks;不做与失败 check 无关的改动。 - 自愈通过 Git workflow intent 发布修复,但**发布前必须本地跑通相关测试**;修复上限与代码层分类授权不变。 - 求助出口是「产出后停止」语义:停止本轮、输出阻塞说明、等待用户主动触发,**不**中途提问。 - 裸数字 / `NN` / `TASK-id` 入参一律按任务短号解析(见 `.agents/rules/task-short-id.md`);PR 号只走 `--pr <number>` / PR URL / 省略(当前分支),不复用裸数字语法。 - 执行本技能(任务锚定路径)后,必须更新 task.md。 版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。 ## 任务上下文解析 > 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。 ## 步骤开始:写入 started 标记 确认前置条件后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`): ``` - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N}) [started]** by {agent} — started ``` `ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。 ## 执行步骤 ### 1. 解析入参 按以下确定性分支解析出目标 PR 号 `{pr#}` 与可选 `{task-id}`: - 场景 A(省略入参):从当前分支反查 active task;定位后读取其 `pr_number`。 - 场景 B(省略 task ref、旧位置 task ref 或 `--task/-t`,**任务锚定主路径**):按「任务上下文解析」取得完整 `{tas...

Details

Author
fitlab-ai
Repository
fitlab-ai/agent-infra
Created
4 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category