Implement Spec

mattpocock/skills/skills/in-progress/implement-spec

作者 mattpocockc55ee46073ed无许可证280K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Implement a specification in code.

AI 生成的概览

通过协调子代理完成工单并提交拉取请求,将规格说明实现为代码。

功能
该技能把一份规格说明及其关联工单转化为单个拉取请求,在一个分支上实现整个规格。它把工单视为带阻塞关系的任务图,跟踪可领取工单的前沿,并在各自的工作树和分支上派发实现子代理,再通过合并子代理合并其成果。它还会在 PR 分支上运行代码审查、修复发现的问题、将 PR 标记为可供审查,并清理所有工作树。
适用场景
当你已有规格说明及关联工单,并希望把整个规格实现为一个 PR,而不是按顺序逐步执行时使用。它适合可跨独立工单并行、且工单之间存在阻塞依赖的工作。
运行要求
需要一份带关联工单的规格说明、支持分支和工作树的代码仓库,以及创建草稿拉取请求和运行代码审查命令的能力。它依赖可在后台运行、并能把 Markdown 笔记保存到仓库之外的子代理。它不附带脚本,唯一文件是代理配置。

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

The goal is a PR which implements the entire spec on a single branch.

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. Read enough 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 a branch, and a draft PR. The PR should be marked as 'closing' the spec issue and tickets.

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

  5. Once an implementer subagent completes, merge its work to the PR 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, run /code-review on the PR branch. Fix all issues raised by the code review in a single implementer subagent.

  8. Mark the PR as ready for review.

  9. Clean up all implementer subagent worktrees.

来源与署名

来源:mattpocock/skills位于skills/in-progress/implement-spec提交c55ee46

许可证: 无许可证

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

举报或申请下架