implement-spec

作者: mattpocock

在代码中实现 /to-spec 和 /to-tickets 的结果。

npx skills add https://github.com/mattpocock/skills --skill implement-spec

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.

Start every subagent with a fresh context window.

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 a fresh implementer subagent for 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 fresh 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 的更多技能

ask-matt
mattpocock
询问哪种技能
communicationresearchproductivity
chief-of-staff
mattpocock
通过协调子代理,在单次会话中推进长期目标。
productivityproject-managementcommunication
claude-handoff
mattpocock
将当前对话移交给一个全新的后台代理,该代理会立即接手工作。
codebase-design
mattpocock
用于设计深度模块的共享词汇。当用户想要设计或改进模块接口、寻找深化机会、决定接缝位置、使代码更易测试或便于AI导航,或当其他技能需要深度模块词汇时使用。
designdevelopmentcode-review
code-review
mattpocock
审查自某个固定点(提交、分支、标签或合并基准)以来的变更,从两个维度进行——标准(代码是否遵循该仓库记录的编码标准?)和规范(代码是否符合原始问题/产品需求文档的要求?)。通过并行子代理运行两项审查,并并排报告结果。当用户希望审查某个分支、拉取请求、进行中的变更,或要求“从X开始审查”时使用。
testingdevelopmentcode-review
design-an-interface
mattpocock
使用并行子代理为一个模块生成多个截然不同的界面设计。当用户想要设计API、探索界面选项、比较模块形态或提到“设计两次”时使用。
developmentdesignapi
diagnosing-bugs
mattpocock
诊断循环,用于处理顽固错误和性能回归。当用户说“诊断/调试这个”,或报告某些东西损坏、抛出异常、失败或缓慢时使用。
testingdevelopmentcode-review
domain-modeling
mattpocock
构建并完善项目的领域模型。当用户希望确定领域术语或通用语言、记录架构决策,或其他技能需要维护领域模型时使用。
designdevelopmentdocument