You have been given a spec. The spec should be associated with several tickets that describe how to implement the spec.
An issue tracker should already have been provided for you. If not, tell the user to run /setup-matt-pocock-skills。
The goal is for the entire spec to be implemented on a singleintegration branch, with each ticket resolved in the way the issue tracker closes work.
These tickets are not a step-by-step checklist. They are atask graph, with blocking relationships between them. This means there is always a singlefrontier: the tickets that can be claimed immediately.
Communication with subagents should stay lean. Communication is mainly throughcontext pointers: pointing at the spec, tickets, research notes, and historical commits. There is no need to repeat information that the pointers already reach.
Implementer subagentsshould run in the background whenever possible for maximum concurrency.
Steps
-
Read the spec and tickets to understand the task graph.
-
(Optional) Use arecon subagentto do the recon work needed for the tickets: the relevant codebase files or external documentation. Make sure the recon subagent can save files: it should save Markdown notes outside the repository, in a directory all subsequent subagents can access. This letsimplementer subagentsfocus on implementing rather than recon.
-
Create the integration branch. If the issue tracker closes work via PR, or the user asks for a PR, open a draft PR after the first merge in step 5 (a branch with no commits on top of main cannot have a PR opened), and mark it as closing the corresponding spec and tickets.
-
Useimplementer subagentsto implement each ticket one by one, each working in its own worktree and its own branch. Each implementer subagent:
- Before starting, confirm that its worktree is based on the integration branch, and if not, reset it to that branch;
- Call the Skill tool and pass in
tddto build the ticket; - Before reporting completion, merge the top of the integration branch into its own branch.
-
Once animplementer subagentfinishes, use amerge subagentto merge its work into the integration branch.
-
If this changes thefrontierof claimable tickets, immediately start moreimplementer subagentsto handle the newly available tickets. This ensures maximum concurrency.
-
After all tickets are complete, call the Skill tool on the integration branch and pass in
code-review. Use aimplementer subagentto fix all issues raised by code review in one go. -
If a draft PR exists, mark it as ready for review. Otherwise, resolve the tickets one by one in the way the issue tracker closes work, and report the integration branch.
-
Clean up allimplementer subagentworktrees.