Implement with subagents
Keep orchestration and implementation ownership separate: the controller
schedules, and one implementation subagent owns each independent work item
through completion. Keep changes that cannot validate apart in one item, accept
its task-scoped commit before advancing, and return failed acceptance evidence
to that same owner rather than repairing it in the controller or reassigning it.
Check The Prerequisite
Review mode has no external skill dependency. Implementation mode requires the
implement skill from Matt Pocock's skill set,
which is not bundled with this repository. Install it with
npx skills add mattpocock/skills, selecting implement, tdd, and
code-review as required by the current upstream contract. Never install it
implicitly.
Select the mode
- Use
review only when the user asks to assess supplied orchestration without
running it.
- Use
implement when the user asks to execute the supplied tickets or plan
tasks.
Review procedure
- Inspect only the repository and supplied orchestration state that the user
permits. Do not start a subagent, edit files, create a commit, or contact a
remote service.
- Assess queue atomicity, dependency order, implementation ownership,
task-scoped acceptance, repair ownership, and controller mutation boundaries.
Treat an already accepted item as complete rather than assigning it again.
- Report the next orchestration action, or that no action is needed, with the
evidence and any unresolved acceptance gap. Stop before the implementation
procedure.
Implementation procedure
- Read the repository instructions and inspect the current branch and worktree.
Preserve unrelated changes. Stop before delegation when a task-scoped commit
cannot be produced safely from the current state.
- Resolve and read the installed
implement skill. Treat it as a required
dependency. If it is unavailable, stop before making changes. Report that it
comes from mattpocock/skills, provide
npx skills add mattpocock/skills, and state that the user must select
implement, tdd, and code-review. Never install them implicitly or
reproduce the procedure from memory.
- Build a dependency-ordered queue. Keep an unsplit request and its checklist
in one work item; group supplied items only when they cannot validate in
separate behavior-preserving commits.
- Process one item at a time. Record
HEAD and the pre-existing worktree state
before each item; accept the preceding item before starting the next.
- Select the portable Solver role and map it to the
runtime's implementation-capable subagent type. Record the portable role and
actual runtime selection when the environment exposes it. Spawn one owner.
Do not implement any part of the item in the controller. If an implementation
slot is temporarily unavailable, wait for capacity. If subagents cannot be
started, stop and report the blocker rather than falling back to controller
implementation.
- Give that owner a decision-complete packet containing:
- the exact ticket or plan task and its acceptance criteria;
- the relevant specification and repository instructions;
- exclusive ownership of that work item on the current branch;
- the pre-existing worktree state that must be preserved;
- an instruction to invoke the installed
implement skill; and
- an instruction to return the commit, the evidence required by the installed
implement skill's current finish contract, and any unresolved blocker.
- Wait for that owner before starting another. Do not split its implementation
across agents. If the result is incomplete, dirty, uncommitted, or fails a
required check, return the evidence to the same owner. Stop on a material
blocker it cannot resolve within the supplied contract.
- Independently accept the item before advancing; an owner's report is not
acceptance evidence. Verify:
- verify
HEAD advanced by at least one task-scoped commit;
- inspect the complete commit range and diff from the recorded
HEAD to the
current HEAD for the work item's acceptance criteria and scope;
- inspect the returned command, complete result, tested revision, and relevant
input and environment identity;
- reuse a requested check only when its complete evidence shows success,
the relevant environment remains unchanged, and neither the user nor
repository requires a fresh independent run. Also require either the tested
revision to equal current
HEAD, or current HEAD to be a descendant of
the tested revision whose independently inspected diff leaves the check's
relevant inputs unchanged;
- repeat each affected check when its evidence is missing, failed, tied to an
unexplained older revision, affected by a changed relevant input, or subject
to an explicit freshness or independent-run requirement;
- confirm the returned evidence satisfies the installed
implement skill's
current finish contract; and
- verify the task-owned diff is empty relative to the recorded pre-existing
state.
- After every repair, repeat the independent commit and diff inspection, then
reassess the evidence under step 8. Reuse only checks whose relevant inputs
and environment remain unchanged across the inspected descendant diff; repeat
affected checks. An unexplained older revision is stale evidence.
After the last accepted item, run any final user- or repository-required
verification. If a later action changes files, return them to their owner for
validation and commit.
Ownership boundaries
- Keep remote mutations with the controller unless the user explicitly grants
a different owner and repository instructions permit it.
- Reuse the owning subagent for review repairs and follow-up checks; do not pay a
second context-transfer cost for the same item.
- Use read-only helpers only when the owner needs genuinely independent
discovery. They do not edit, commit, or replace the implementation owner.
- Never absorb another item's edits or pre-existing user changes into the
current owner's commit.
Finish gate
In review, finish only after reporting the non-mutating assessment, its
evidence, and any acceptance gap without starting implementation. In
implement, finish only when every queued item has a task-scoped, reviewed,
verified commit, the final worktree matches the recorded pre-existing state,
and no owner-reported blocker remains. Report the item-to-commit mapping and the
final validation result. Otherwise finish blocked and name the first incomplete
gate.
1---
2name: implement-with-subagents
3description: Use when implementing or reviewing the orchestration of supplied tickets or plan tasks through separate implementation subagents, including queue atomicity, task-scoped commit acceptance, and repair ownership.
4compatibility: "Review mode has no external skill dependency. Implementation mode requires Matt Pocock's separately installed `implement` workflow; its current contract also invokes `tdd` and `code-review`."
5disable-model-invocation: true
6metadata:
7 source: https://skillmd.com/skills/chrisbanes/implement-with-subagents
8---
9
10# Implement with subagents
11
12Keep orchestration and implementation ownership separate: the controller
13schedules, and one implementation subagent owns each independent work item
14through completion. Keep changes that cannot validate apart in one item, accept
15its task-scoped commit before advancing, and return failed acceptance evidence
16to that same owner rather than repairing it in the controller or reassigning it.
17
18## Check The Prerequisite
19
20Review mode has no external skill dependency. Implementation mode requires the
21`implement` skill from [Matt Pocock's skill set](https://github.com/mattpocock/skills),
22which is not bundled with this repository. Install it with
23`npx skills add mattpocock/skills`, selecting `implement`, `tdd`, and
24`code-review` as required by the current upstream contract. Never install it
25implicitly.
26
27## Select the mode
28
29- Use `review` only when the user asks to assess supplied orchestration without
30 running it.
31- Use `implement` when the user asks to execute the supplied tickets or plan
32 tasks.
33
34## Review procedure
35
361. Inspect only the repository and supplied orchestration state that the user
37 permits. Do not start a subagent, edit files, create a commit, or contact a
38 remote service.
392. Assess queue atomicity, dependency order, implementation ownership,
40 task-scoped acceptance, repair ownership, and controller mutation boundaries.
41 Treat an already accepted item as complete rather than assigning it again.
423. Report the next orchestration action, or that no action is needed, with the
43 evidence and any unresolved acceptance gap. Stop before the implementation
44 procedure.
45
46## Implementation procedure
47
481. Read the repository instructions and inspect the current branch and worktree.
49 Preserve unrelated changes. Stop before delegation when a task-scoped commit
50 cannot be produced safely from the current state.
512. Resolve and read the installed `implement` skill. Treat it as a required
52 dependency. If it is unavailable, stop before making changes. Report that it
53 comes from `mattpocock/skills`, provide
54 `npx skills add mattpocock/skills`, and state that the user must select
55 `implement`, `tdd`, and `code-review`. Never install them implicitly or
56 reproduce the procedure from memory.
573. Build a dependency-ordered queue. Keep an unsplit request and its checklist
58 in one work item; group supplied items only when they cannot validate in
59 separate behavior-preserving commits.
604. Process one item at a time. Record `HEAD` and the pre-existing worktree state
61 before each item; accept the preceding item before starting the next.
625. Select the portable **Solver** role and map it to the
63 runtime's implementation-capable subagent type. Record the portable role and
64 actual runtime selection when the environment exposes it. Spawn one owner.
65 Do not implement any part of the item in the controller. If an implementation
66 slot is temporarily unavailable, wait for capacity. If subagents cannot be
67 started, stop and report the blocker rather than falling back to controller
68 implementation.
696. Give that owner a decision-complete packet containing:
70 - the exact ticket or plan task and its acceptance criteria;
71 - the relevant specification and repository instructions;
72 - exclusive ownership of that work item on the current branch;
73 - the pre-existing worktree state that must be preserved;
74 - an instruction to invoke the installed `implement` skill; and
75 - an instruction to return the commit, the evidence required by the installed
76 `implement` skill's current finish contract, and any unresolved blocker.
777. Wait for that owner before starting another. Do not split its implementation
78 across agents. If the result is incomplete, dirty, uncommitted, or fails a
79 required check, return the evidence to the same owner. Stop on a material
80 blocker it cannot resolve within the supplied contract.
818. Independently accept the item before advancing; an owner's report is not
82 acceptance evidence. Verify:
83 - verify `HEAD` advanced by at least one task-scoped commit;
84 - inspect the complete commit range and diff from the recorded `HEAD` to the
85 current `HEAD` for the work item's acceptance criteria and scope;
86 - inspect the returned command, complete result, tested revision, and relevant
87 input and environment identity;
88 - reuse a requested check only when its complete evidence shows success,
89 the relevant environment remains unchanged, and neither the user nor
90 repository requires a fresh independent run. Also require either the tested
91 revision to equal current `HEAD`, or current `HEAD` to be a descendant of
92 the tested revision whose independently inspected diff leaves the check's
93 relevant inputs unchanged;
94 - repeat each affected check when its evidence is missing, failed, tied to an
95 unexplained older revision, affected by a changed relevant input, or subject
96 to an explicit freshness or independent-run requirement;
97 - confirm the returned evidence satisfies the installed `implement` skill's
98 current finish contract; and
99 - verify the task-owned diff is empty relative to the recorded pre-existing
100 state.
1019. After every repair, repeat the independent commit and diff inspection, then
102 reassess the evidence under step 8. Reuse only checks whose relevant inputs
103 and environment remain unchanged across the inspected descendant diff; repeat
104 affected checks. An unexplained older revision is stale evidence.
105 After the last accepted item, run any final user- or repository-required
106 verification. If a later action changes files, return them to their owner for
107 validation and commit.
108
109## Ownership boundaries
110
111- Keep remote mutations with the controller unless the user explicitly grants
112 a different owner and repository instructions permit it.
113- Reuse the owning subagent for review repairs and follow-up checks; do not pay a
114 second context-transfer cost for the same item.
115- Use read-only helpers only when the owner needs genuinely independent
116 discovery. They do not edit, commit, or replace the implementation owner.
117- Never absorb another item's edits or pre-existing user changes into the
118 current owner's commit.
119
120## Finish gate
121
122In `review`, finish only after reporting the non-mutating assessment, its
123evidence, and any acceptance gap without starting implementation. In
124`implement`, finish only when every queued item has a task-scoped, reviewed,
125verified commit, the final worktree matches the recorded pre-existing state,
126and no owner-reported blocker remains. Report the item-to-commit mapping and the
127final validation result. Otherwise finish blocked and name the first incomplete
128gate.