For prd.md、spec.md and the actual .scratch/<feature>/issues/ implementation tickets (the three input types can be combined arbitrarily) to do concurrent implementation orchestration, the manifest's input.kind: prd-spec-input. Each ticket is a unique execution unit; the PRD, spec, and multiple tickets are each independent and are not merged into a single execution unit. When the user has only a single implementation goal, use the direct-task boundary: directly call /implement, without creating TeamCreate or AgentTeam. File conflicts are handled via CONFLICT escalation (only this skill has it).
Prerequisite: the target project uses .scratch/<feature>/issues/ to store tickets;/implement is provided by mattpocock/skills , and must be installed beforehand.
Common mechanisms—manifest, frontier scheduling, context hygiene, CONFLICT escalation, terminal-state events, independent verification, fail-closed—have their only source in references/agent-team-protocol.md, and this skill only defines the input boundaries and steps. The team uses native TeamCreate to create a AgentTeam: the main Agent is the sole coordinator, dispatcher, unlocker, and independent verifier; members share the team context, and unlocking successors is always performed by the main Agent.
Steps
-
Input assessment: read the existing
prd.md、spec.mdand.scratch/<feature>/issues/under each ticket's original text,Status:、Blocked by:/dependsOn, acceptance criteria, verify command, and evidence path; fabricated tickets do not enter the DAG. Check that ticket IDs are unique, dependencies exist and are acyclic, and the tracker is writable; mark tickets with uncertain scope. Record the project path, Git branch, workspace baseline (modified/untracked/staged), andprotectedPaths. Completion criterion: the DAG is valid, and the baseline and protection boundaries have been recorded. -
PRD/spec merge: when both exist, merge scope, acceptance criteria, non-goals, and constraints item by item. For conflicting items, output a matrix (source, conflict content, impact, options) and a recommended plan; when there are no conflicts, output the merge assessment and gaps. Completion criterion: the merge result and recommendation have been presented to the user.
-
Confirmation gate: when there are no implementation tickets, only complete the input assessment and stop. When there are tickets, display the manifest fields item by item (input sources, merge result, ticket DAG,
maxConcurrency、protectedPaths, evidence paths,maxRepairRounds), and wait for user confirmation. Before confirmation, do not create a team, do not start sub agents, and do not modify the tracker or workspace; only after confirmation create one nativeAgentTeamand persist the manifest to disk. Completion criterion: explicit user confirmation. -
Frontier dispatch: each round, dispatch all tickets on the frontier (dependencies verified
resolved) concurrently up to themaxConcurrencylimit. The prompt follows context hygiene and contains only the ticket ID, tracker file path,protectedPaths, verify command, evidence conventions, terminal-state format, and a one-line goal summary; the ticket's original text is Read by the teammate itself. Each teammate only calls/implement, and only handles the current ticket; file conflicts during execution go through CONFLICT escalation. Completion criterion: the entire frontier for this round has been dispatched. -
Independent verification: after a teammate reports a terminal state, the main Agent independently verifies per the protocol (the commit exists and belongs to the current ticket, the Git baseline and
protectedPathsare not polluted, the verification command/evidence can be reviewed, and the tracker has been written backStatus: resolved), and only after verification passes is the successor unlocked. Failures propagate only along dependent descendantsblocked, while independent branches continue. Completion criteria: all final states in this round are verified and written back to the tracker.
- Wrap-up: after all tickets reach a final state, reclaim completed team tasks and generate according to protocol
evidenceDir/report.mdfull details; in the conversation output only a summary table (ticket / status / commit / one-line conclusion) plus the report path. Do not restart completed tickets. Completion criteria: report.md is written to disk and the summary table has been output.
References
- Common protocol (manifest fields, frontier, context hygiene, CONFLICT, final state, verification, fail-closed):
references/agent-team-protocol.md