SuperAPI AI Directory

implement-spec

General & other

View repository

Updated 10-15 23:42

About this skill

You have been given a spec. This spec should have tickets associated with it that describe how to implement it.

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

The goal is to implement the entire spec on a single integration branch and resolve each ticket the way the issue tracker closes work.

Tickets are not a checklist of steps, but a task graphthat contains blocking relationships. This means there is always a frontier。

Communication with subagents should be concise. Communicate mainly via context pointers : point to the spec, tickets, research notes, and previous commits. Do not repeat information that the pointers already provide.

Where possible,implementer subagents should run in the background for maximum concurrency.

Steps

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

  2. (Optional) Use a exploration subagent to complete the exploration needed for the tickets, i.e. relevant codebase files or external documentation. Make sure the exploration subagent can save files: it should save Markdown notes to a directory outside the repo that all subsequent subagents can access. This way implementer subagents can focus on implementation without having to repeat the exploration.

  3. Create an integration branch. If the issue tracker closes work via PRs, or the user asks for a PR, open a draft PR after the first merge in step 5 (a branch that is not ahead of main cannot open a PR), and mark that it will close the spec and tickets.

  1. Use implementer subagents to implement each ticket, with each subagent working in its own worktree and branch. Each implementer subagent:

    • Before starting, confirm its worktree is based on the integration branch; if not, reset it onto it;
    • Call the Skill tool and specify tdd to build the ticket;
    • Before reporting completion, merge the tip of the integration branch into its own branch
  2. Each implementer subagent after completion, use a merger subagent to merge its work into the integration branch.

  3. If this changes the frontierof available tickets, start more implementer subagents to handle the new tickets. This achieves maximum concurrency.

  4. After all tickets are complete, call the Skill tool on the integration branch and specify code-review. In a single implementer subagent fix all issues raised by the code review.

  5. 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.

  6. Clean up all implementer subagent worktrees.