Implement Spec

作者 mattpocockb0618bc436ad无许可证收录于 2026年10月8日更新于 2026年10月8日

Implement the result of /to-spec and /to-tickets in code.

AI 生成的概览

在单一集成分支上,用并行子代理按规格与工单实现代码。

功能
该技能接收一份规格及其关联工单,这些工单构成带阻塞关系的任务图,并在一个集成分支上推进实现。它使用探索子代理收集代码库或文档笔记,使用实现子代理在各自的工作树和分支上开发,并使用合并子代理合并已完成的工作。最后在集成分支上运行代码审查、修复问题、按问题跟踪器的方式关闭工单并清理工作树。
适用场景
适用于规格及其工单已经产出、需要将整个规格实现为代码的场景。也适合问题跟踪器通过工单或拉取请求关闭工作、并希望并行使用子代理实现的流程。
运行要求
需要提供规格与关联工单,以及一个问题跟踪器;若缺少跟踪器,会提示用户运行设置命令。依赖子代理、git 工作树与分支,以及用于 tdd 和 code-review 的 Skill 工具。不附带脚本。

You have been provided a spec. This spec should have tickets associated with it, describing how to implement the spec.

The issue tracker should have been provided to you. If not, tell the user to run /setup-matt-pocock-skills.

The goal is the entire spec implemented on a single integration branch, with every ticket resolved the way the issue tracker closes work.

The tickets are not a list of steps. They are a task graph with blocking relationships between them. This means there is always a frontier of tickets which are ready to be grabbed.

Communication to and from subagents should be sparse. Communicate primarily through context pointers: to the spec, tickets, research notes, and previous commits. Don't duplicate information already available via pointers.

Implementer subagents should be run in the background where possible for maximum concurrency.

Steps

  1. Read the spec and tickets to understand the task graph.

  2. (optional) Use an exploration subagent to conduct any exploration required by the tickets - relevant codebase files or external documentation. Ensure the exploration subagent can save files - it should save its markdown notes in a directory outside the repo, accessible by all future subagents. This lets implementer subagents focus on implementation rather than exploration.

  3. Create the integration branch. If the issue tracker closes work through PRs, or the user asks for one, open a draft PR after the first merge in step 5 (a branch with no commits ahead of main can't open one), marked as closing the spec and tickets.

  4. Use implementer subagents to implement each ticket, each in its own worktree on its own branch. Each implementer subagent:

    • confirms its worktree is based on the integration branch before starting, and resets onto it if not;
    • calls the Skill tool with tdd to build the ticket;
    • merges the integration branch tip into its own branch before reporting done
  5. Once an implementer subagent completes, merge its work to the integration branch with a merger subagent.

  6. If this changes the frontier of available tickets, kick off more implementer subagents to work on the new tickets. This allows for maximum concurrency.

  7. Once all tickets are complete, call the Skill tool with code-review on the integration branch. Fix all issues raised by the code review in a single implementer subagent.

  8. If a draft PR exists, mark it ready for review. Otherwise, resolve each ticket the way the issue tracker closes work, and report the integration branch.

  9. Clean up all implementer subagent worktrees.

来源与署名

来源:mattpocock/skills位于skills/engineering/implement-spec提交b0618bc

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架