implement-issues
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplement Issues
实现Issues
Turn a set of GitHub issues into open PRs via parallel, worktree-isolated lanes.
One lane per issue: its own worktree, its own branch, its own PR. This skill
orchestrates and composes , , and — it never merges.
Hand-off to / for shepherding and merge.
branchcommitprbabysit-prbabysit-pr --merge通过并行的、工作树隔离的任务分支,将一组GitHub Issues转换为已打开的PR。
每个Issues对应一个任务分支:独立的工作树、独立的分支、独立的PR。该技能
编排并组合、和能力——从不执行合并。
如需后续跟进和合并,请转交 / 处理。
branchcommitprbabysit-prbabysit-pr --mergeInvocation
调用方式
- — implement exactly these issues.
/implement-issues #12 #14 #17 - (bare) — triage the backlog (
/implement-issues), prefer self-contained, file-disjoint issues, propose a set and confirm before spawning any lane.gh issue list - — run one lane at a time (still one worktree/branch/PR each).
--sequential
- —— 精准实现指定编号的Issues。
/implement-issues #12 #14 #17 - (无参数)—— 分类处理积压任务(执行
/implement-issues),优先选择 独立无依赖、文件无重叠的Issues,在启动任何任务分支前,先提议一组任务并确认。gh issue list - —— 依次运行每个任务分支(每个分支仍拥有独立的工作树/分支/PR)。
--sequential
Inputs & readiness
输入与准备工作
- Load repo context first. At start, from the target repo checkout root,
read and/or
AGENTS.mdif present. Precedence:CLAUDE.mdis authoritative when both exist — do not also apply conflictingAGENTS.mdinstructions; if only one exists, use that file; if both conflict in a blocking way, stop and ask. Record which filename is authoritative (e.g.CLAUDE.mdorAGENTS.md) and treat its house standards, operating agreement, and standing constraints as binding for every lane. Pass that chosen filename into each lane prompt so lanes do not re-pick. See theCLAUDE.mdskill's Per-repo agent context section for the expected file shape. Missing the file is fine — fall back to chat instructions andstand-generalskills.stand-* - Take issues from the args, or select from favouring self-contained and file-disjoint work.
gh issue list - Every issue must carry an AI Implementation Prompt comment (per the skill). Missing it means the issue is not fan-out-ready — write one first, or run that issue as a single lane yourself. Do not hand a bare issue to a sub-agent.
issue - Reproduce against current before implementing — specs can be stale. If the reported problem no longer exists, report back rather than fabricating a change.
main
- 先加载仓库上下文。启动时,从目标仓库的 checkout 根目录读取和/或
AGENTS.md(如果存在)。优先级规则:当两个文件同时存在时,CLAUDE.md具有权威性——请勿应用AGENTS.md中与之冲突的指令;若仅存在其中一个文件,则使用该文件;若两个文件存在阻塞性冲突,请停止操作并询问用户。记录哪个文件具有权威性(例如CLAUDE.md或AGENTS.md),并将其包含的编码规范、操作协议和既定约束视为所有任务分支必须遵守的规则。将选定的文件名传入每个任务分支的提示语中,避免分支重复选择文件。关于文件的预期格式,请参考CLAUDE.md技能中的每个仓库的代理上下文部分。若文件不存在也无需担心——可回退至聊天指令和stand-general系列技能。stand-* - 从参数中获取Issues,或从中选择优先处理独立无依赖、文件无重叠的任务。
gh issue list - 每个Issue 必须包含AI实现提示评论(遵循技能规范)。若缺少该评论,则表示该Issue 不具备拆分执行的条件——请先编写该评论,或自行单独处理该Issue。请勿将未准备好的Issue交给子代理(sub-agent)处理。
issue - 在实现前基于当前分支复现问题——需求规格可能已过时。若报告的问题已不存在,请反馈给用户,而非强行修改代码。
main
Conflict grouping
冲突分组
- Build a file-overlap matrix from each issue's declared file targets.
- Disjoint file sets → run in parallel lanes.
- Overlapping file sets → sequence them, or bundle into a single lane only when the issues genuinely must share files.
- Cap at ~10 lanes — beyond that, batch across sessions.
- 根据每个Issue声明的目标文件构建文件重叠矩阵。
- 无重叠的文件集 → 以并行方式运行任务分支。
- 有重叠的文件集 → 按顺序执行,或仅当Issues确实必须共享文件时,才将其合并到同一个任务分支中。
- 任务分支数量上限为约10个——超出该数量时,分批次处理。
Lane claiming
任务分支占用
Before spawning, claim each lane — assign the issue to yourself and/or add a
working label. This prevents a second session from opening a duplicate PR for the
same issue (a race that has bitten this workflow before).
在启动任务分支前,占用每个分支——将Issue分配给自己和/或添加"处理中"标签。这可避免另一个会话为同一个Issue打开重复的PR(此前该工作流曾遇到过此类竞态问题)。
Per lane
每个任务分支的处理流程
- Orchestrator creates the worktree per the convention: a sibling directory, branch
branch -wcut from a freshly fetchedtype/NN-slug. Never place a worktree underorigin/main— lint configs commonly exclude that path and will silently scan nothing..claude/ - Sub-agent prompt is pointers, not content. Instruct the lane to:
- Work only inside the lane worktree path the orchestrator created.
- Read issue #N and its AI Implementation Prompt comment.
- From the lane worktree root (absolute path), read the authoritative
context file the parent already chose (or
AGENTS.md) when present. Do not resolve context from the parent checkout or any other directory; do not re-pick between the two files. Treat its standards/constraints/contract as binding; follow applicableCLAUDE.mdskills.stand-* - Run the full lint and full test suite before every commit — never a subset.
- Use the skill, then the
commitskill withpr.Closes #N - Never merge. Report the PR URL on completion.
- Orchestrator verifies each PR exists once the lane reports done.
- 编排器按照约定创建工作树:在同级目录中创建分支
branch -w,分支基于刚拉取的type/NN-slug。切勿将工作树放置在origin/main目录下——代码检查配置通常会排除该路径,导致扫描无结果。.claude/ - 子代理提示语为指向性内容,而非具体细节。向任务分支下达以下指令:
- 仅在编排器创建的任务分支工作树路径内工作。
- 查看Issue #N及其AI实现提示评论。
- 从任务分支工作树的根目录(绝对路径)读取父级已选定的权威上下文文件(或
AGENTS.md,如果存在)。请勿从父级checkout目录或其他目录解析上下文;请勿重新选择两个文件中的一个。将该文件中的规范/约束/协议视为必须遵守的规则;遵循适用的CLAUDE.md技能。stand-* - 在每次提交前运行完整的代码检查和完整的测试套件——绝不执行子集检查。
- 使用技能,然后使用
commit技能并添加pr标识。Closes #N - 绝不合并。完成后报告PR的URL。
- 编排器在任务分支报告完成后,验证每个PR是否存在。
Guardrails
防护规则
- Signing pre-flight before spawning. Confirm commit signing works now — a locked signing key must be surfaced to the user before you go AFK, not discovered mid-run.
- A lane that cannot stay green STOPS and reports. Never weaken or delete tests, never open a knowingly broken PR.
- Final report lists every PR URL and every blocked lane with the reason.
- 启动前确认签名功能正常。先确认提交签名功能当前可正常工作——若签名密钥锁定,必须在开始执行前告知用户,而非在执行过程中才发现问题。
- 若任务分支无法保持测试通过状态,则停止并报告。绝不能弱化或删除测试,绝不能打开明知有问题的PR。
- 最终报告需列出所有PR的URL以及所有阻塞的任务分支及其原因。
Hand-off
转交后续处理
Shepherding and merging are not this skill. Once PRs are open, hand off to
(drive to merge-ready) or .
babysit-prbabysit-pr --mergeSee also : the interactive routing entry point that composes this
skill with . It does not auto-invoke either.
backlogbabysit-pr跟进和合并不属于本技能的职责范围。PR打开后,请转交(推动PR达到可合并状态)或处理。
babysit-prbabysit-pr --merge另请参考:这是一个交互式路由入口,可将本技能与组合使用,但不会自动调用其中任何一个。
backlogbabysit-prHarness mechanics (Claude Code)
底层机制(Claude Code)
- Run lanes as background sub-agents so the main thread stays free.
- Model per lane by risk:
- docs / config / mechanical →
sonnet - logic / refactor / security / auth / CI-touching →
opus - never for code.
haiku - An explicit user instruction overrides these defaults.
- docs / config / mechanical →
- Elsewhere (harnesses without sub-agent spawning): run the lanes sequentially using the same worktree-per-lane layout.
- 将任务分支作为后台子代理运行,使主线程保持空闲。
- 根据风险为每个任务分支选择模型:
- 文档/配置/机械性修改 → 使用模型
sonnet - 逻辑重构/安全/认证/涉及CI的修改 → 使用模型
opus - 绝不为代码任务使用模型。
haiku - 用户的明确指令可覆盖上述默认规则。
- 文档/配置/机械性修改 → 使用
- 其他场景(不支持子代理启动的底层框架):使用相同的"每个任务分支对应一个工作树"布局,按顺序运行任务分支。