/fx-dev:teamfrom fx-dev
Coordinates a multi-agent team to implement specs or multi-task features. Acts as a coordinator that delegates all implementation to sub-agents, runs development lifecycle steps automatically, and merges PRs autonomously until all approved work is complete.
Ships in fx-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Spawn a coordinated sub-agent team to implement a spec or multi-task feature. The main session (you) acts strictly as coordinator — no code, no commits, only delegation and quality control.
team is a wrapper around fx-dev:dev, and it is mostly additive. dev stops at the first PR boundary and never merges on its own; team does whatever needs doing, fully by itself, all the way through merge. It does not restate dev's lifecycle — it runs dev's steps for every change in scope.
dev (BLOCKING)Before you write the Scope Brief or spawn anyone, load fx-dev:dev (Skill tool: skill='fx-dev:dev') in its Lifecycle role. It is the single source of truth for the development workflow; everything below assumes you have it.
Do not spawn any agent until dev is loaded in this session. If you cannot say what dev's Step 4.5 requires, you have not loaded it — load it now.
Everything else — the Scope Brief, the Codex pre-PR review, reviewer and CI waits, the merge gates, the test-plan rules — is dev's and applies unchanged. What follows in this skill is only what is team-specific: worktrees, waves, parallelism, the wait ledger, autonomous merge, change-doc Status flips across multi-PR changes, and shutdown.
Observed: a team lead skipped loading dev, so it never saw dev's implementer spawn template or its pre-PR Codex step. It hand-wrote implementer prompts with no skill load and opened PRs that no Codex review had seen. A rule that lives only in a skill you did not load does not reach your teammates, so these two are restated here and gated at merge:
Every implementer spawn loads dev in its Implementer role. Use this template — the prompt begins with the skill load, and carries a handle, a size, and the Scope Brief:
Agent tool:
name: "impl-<change-or-task>" # REQUIRED — see STEP 3
model: "opus" # size: large — never downgrade an implementer
subagent_type: "general-purpose"
mode: "bypassPermissions"
prompt: "Load the dev skill (Skill tool: skill='fx-dev:dev') and act in its Implementer role, then:
[WORKTREE PREAMBLE FROM STEP 2.5.3 — when it runs alongside another implementer]
[PASTE THE STEP 0 SCOPE BRIEF VERBATIM HERE]
Your one job: implement [TASK] per [CHANGE DOC / SPEC PATH].
[PLAN / ACCEPTANCE CRITERIA]
- Stay inside the Scope Brief; if the job cannot be done within it,
deliver what is in scope, then stop and report
- Atomic conventional commits; no '#<number>' and no wave/phase
wording in any commit subject; never skip a test
- Report your commits and test results when done. Do NOT push,
run any reviewer (Codex included), open a PR, wait on CI, or
merge — the lead runs Codex on your branch, then pushes
- [THE CHANGE-DOC STATUS LINE FROM STEP 3 — final or non-final]
- Never sleep-poll a long-running tool or match its process by
pattern (dev references/background-waits.md)"
description: "Implement <task>"
Every PR passes dev Step 4.5 before it is pushed or opened — the local Codex review, converged, with the Scope Brief. You, the lead, run it — never an implementer, because review is never delegated (dev CRITICAL RULES). When an implementer reports done, run fx-dev:codex-review with the Scope Brief on its branch (from inside its worktree when it has one), record the findings in your ledger, hand blocking ones to an implementer as a fix list, and rerun per dev Step 4.5 until it converges. Only then push the branch and open the PR. A branch with no converged Codex pass does not get a PR.
Both are merge gates (rows 7 and 8 of the MANDATORY MERGE GATE CHECKLIST).
Sub-agents CANNOT spawn their own sub-agents. If you tell a teammate to "run the full SDLC," it will try to do implementation inline (instead of delegating to an implementer sub-agent), bloat its context window, and skip later steps like Copilot review. This has been observed in production.
Therefore: YOU (the coordinator) orchestrate each SDLC step per task. You spawn focused, single-purpose agents for each step and handle cross-cutting concerns (Copilot review, CI, merge gates) directly.
Never hand a teammate dev's Lifecycle role — the whole SDLC. Implementers load dev in its Implementer role, through the template above, and get ONE focused job.
gh issue view.Identify:
When the user's invocation is unambiguous — e.g. implement all pending changes fully, ship all of these, do everything in docs/changes/, a concrete list of PR numbers, or a single spec file — treat that as the authoritative scope and proceed immediately to Step 1. Do NOT pause to ask "should I do all 6 now or just wave 1 first to sanity-check?" Do NOT report failure to the Coder dashboard asking for scope confirmation when the user already gave it. Words like "all", "fully", "every", "the whole list" are explicit scope — honor them.
You can still split execution into waves internally. Wave-based execution (Wave 1: independent tasks in parallel; Wave 2: their dependents once unblocked; etc.) is the correct way to run a multi-PR team, and you should plan it that way. The rule is about not stopping to ask the user whether to do waves or which wave to start with — just plan the waves and execute them.
⛔ Waves are an INTERNAL execution concept — they MUST NEVER leak into a PR title (BLOCKING). A wave/phase/step number is not a PR or issue. A
#<number>in a PR title (#4,(#4),#123) looks like plain text in the title bar, but on squash-merge the title becomes the commit subject, where#Nauto-links to PR/issue #N in the repo. Writing(#4)to mean "wave 4" wrongly cross-links the merged commit (and PR) to whatever PR/issue #4 is — this has happened repeatedly and is exactly what we are stamping out. When you spawn implementers and when you author/verify titles before merge:
- No
#<number>in any PR title unless N is a real, existing PR/issue on the target repo that the PR actually references. Never pre-add a(#N)suffix — GitHub appends the real PR number at squash-merge time.- No "Wave N", "Phase N", "Step N", batch/iteration labels, or change-doc numbers in titles. They belong in the PR body only.
- Gate-check this before merge: if a PR title contains a stray
#Nor wave/phase wording, rename it withgh pr edit <N> --title "..."before merging. A squash merge bakes the title intomain's history — a wrong cross-link there is permanent. See thefx-dev:githubskill's "#<number>PR-Title Rule".
Reserve confirmation for genuine ambiguity only:
If you find yourself drafting a "before I burn that compute, one quick check…" message in response to a clearly-scoped instruction, stop. Delete the draft. Spawn the team.
Before spawning anything, write down the Scope Brief. It is what every teammate and every reviewer will be judged against, and it must carry the user's own framing — not your summary of it. Full definition: fx-dev/skills/dev/references/scope-contract.md.
### Scope Brief
- **Verbatim request:** "<the user's exact words, quoted, never paraphrased>"
- **Interpreted scope:** <tasks, change docs, specs in play>
- **Deliverable type:** <docs | code | spec | research | config | mixed>
- **Explicitly out of scope:** <what must NOT be touched or flagged, with reasons>
- **Size signal:** <narrow | normal | open-ended>
- **Known-and-accepted:** <deliberate states a reviewer would otherwise flag>
Every implementer prompt, every verify prompt, and every reviewer invocation MUST include this brief verbatim. A reviewer that does not know what was asked for reports the work the team deliberately did not do, and the coordinator pays for it in filtering time on every PR.
/team exists to run unattended for a long time, so duration, task count, PR count, and effort are NEVER reasons to stop. Working through an approved backlog is the job — do not check in between waves, and do not ask permission for the next approved task.
Stop and inform the user only when a task requires something the approved contract does not cover:
When that happens, finish every task that IS covered, then report what is blocked and why in two or three sentences. Never halt the whole run for one out-of-contract task.
This rule and the "do NOT pause to confirm scope" rule above are the same rule seen from two sides: the user's scope is authoritative — execute all of it without asking, and none of what lies outside it without asking.
As of Claude Code v2.1.178 there is no team-creation step, and the TeamCreate/TeamDelete tools no longer exist. A session has exactly one implicit team, scoped to that session, and it forms automatically the moment you spawn your first teammate via the Agent tool (you, the main session, are permanently the lead). There is nothing to name, nothing to provision, and nothing to tear down — cleanup is automatic when the session ends (see STEP 4).
TeamCreate — it was removed. Calling it (or waiting for it) is a bug.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 (in settings.json env or the environment). If teammates never appear when you spawn them, this is almost certainly unset — report it to the user rather than retrying.session- followed by the first 8 chars of the session ID, e.g. session-1a2b3c4d — at ~/.claude/teams/{session-team-name}/config.json and ~/.claude/tasks/{session-team-name}/. Claude Code writes and updates these automatically — never edit or pre-author them.Skip straight to STEP 2 and start defining tasks; the team springs into existence when you spawn the first implementer in STEP 3.
Use TaskCreate for every task identified in Step 0. Set up dependencies with TaskUpdate (addBlockedBy/addBlocks) so work proceeds in the correct order.
Task descriptions MUST include:
Why this step exists: isolation: "worktree" on the Agent tool does nothing for teammates — a spawned teammate runs as a full independent session in the lead's working directory, not in an isolated worktree (see STEP 3). Without real isolation, every concurrent implementer shares the coordinator's single working tree and git HEAD and they corrupt each other. The coordinator MUST pre-create one git worktree per implementer that will run concurrently, each on its own branch, and pin each teammate to its worktree via a prompt preamble.
Skip this step only if you will run implementers strictly one-at-a-time (fully sequential, never two implementers alive at once). In that single-writer case the shared tree is safe. The moment you want parallelism, this step is required.
Worktrees MUST live under the repo's own .claude/worktrees/ directory — this matches Claude Code's native worktree convention, keeps them inside the (writable) repo, and survives a read-only parent filesystem. NEVER put them in /tmp, $HOME, or a sibling path outside the repo.
cd <REPO_ROOT>
git fetch origin --quiet
mkdir -p .claude/worktrees
# one per implementer — name the worktree after the task/change, branch off origin/main
git worktree add .claude/worktrees/<slug> -b <branch> origin/main
# e.g. git worktree add .claude/worktrees/0004 -b refactor/0004-unified-config-service origin/main
Ensure .claude/worktrees/ is ignored before creating any (most projects already ignore .claude/, but verify — this one may not). A nested worktree dir otherwise shows up as untracked in the main repo and can get swept into an implementer's git add. Use the repo-local, untracked .git/info/exclude so this scaffolding never dirties the coordinator's working tree or risks landing in a feature PR — do NOT append to the tracked .gitignore:
git check-ignore .claude/worktrees/x >/dev/null 2>&1 || \
printf '\n# Claude Code team scaffolding (local only)\n.claude/worktrees/\n.claude/team/\n' >> .git/info/exclude
mkdir -p .claude/team/waits
.git/info/exclude is never committed, so there is nothing to clean up later and git status stays clean.
Symlink node_modules (and any other gitignored, install-only dir the toolchain needs) into each worktree so vitest/biome/tsc resolve — a fresh worktree has no node_modules:
ln -s <REPO_ROOT>/node_modules <REPO_ROOT>/.claude/worktrees/<slug>/node_modules
Spawn ONE cheap probe teammate (size small — see the size table in STEP 3) pinned to a worktree. Have it write a marker file in the worktree and confirm (a) the marker is absent in the main repo, (b) pwd/branch/toplevel are the worktree's, then clean up. Only proceed once it reports isolation OK. This catches a broken setup before any real code is written. (If the probe lands in the main repo, the workaround failed — stop and re-check paths.)
A confirmed gotcha: the teammate's shell cwd RESETS to the main repo root after EVERY bash command ("Shell cwd was reset to …"). That is exactly why the preamble below forces an absolute cd on every command — relative paths silently resolve against the MAIN repo, not the worktree.
Every implementer/verify/fix teammate that must operate in a worktree MUST have its spawn prompt START with this preamble (substitute the absolute path). An implementer's prompt opens with its one-line dev skill load (the template at the top of this skill), and the preamble follows immediately after it:
CRITICAL — WORKTREE ISOLATION. Your working directory is <ABS_WORKTREE_PATH>.
The shell cwd resets to the main repo after every command, so:
- Prefix EVERY bash command with `cd <ABS_WORKTREE_PATH> && `.
- Use ABSOLUTE paths (under <ABS_WORKTREE_PATH>/) for ALL file reads, writes, and edits.
- Pass `path: <ABS_WORKTREE_PATH>` to EVERY Glob and Grep call.
- Relative paths resolve to the MAIN repo, NOT your worktree — never rely on them.
Your branch <branch> is already created and checked out in this worktree; do NOT
create a new branch or run `git checkout`. Commit (and push, only if this prompt says to)
from inside the worktree.
Remember each (worktree path, branch, node_modules symlink) triple you created — STEP 4 must tear them all down.
You loaded fx-dev:dev as your first action (top of this skill). It is the single source of truth for the development workflow — do not duplicate its instructions here.
For each task (or group of parallel tasks), walk through the dev skill's SDLC steps yourself. For each step, decide:
gh command) → Do it yourself.dev in its Implementer role, through the template at the top of this skill.name (BLOCKING)Every single Agent tool call you make as the team coordinator — implementer, verify, fix, anything — MUST pass name. name is what makes a teammate addressable via SendMessage and visible in the team config's members[] array; omitting it produces an effectively anonymous worker you can't message or steer by name, defeating the point of /team.
Do NOT pass team_name. As of v2.1.178 the team_name input on the Agent tool is accepted but ignored (and the team_name field in hook payloads is deprecated). There is one implicit, session-scoped team; every Agent spawn joins it automatically. Passing team_name does nothing — drop it.
Agent tool:
name: "<short-descriptive-handle>" # ← REQUIRED, NO EXCEPTIONS
subagent_type: "general-purpose"
model: "<per the size table below>" # ← pick deliberately, do not default
isolation: "worktree" # NO-OP for teammates — see STEP 2.5; pre-create real worktrees instead
mode: "bypassPermissions"
prompt: "..."
run_in_background: true # usually — false in a headless session (see Waiting and reconciliation)
The name should be specific and human-readable so it's useful in logs and SendMessage (e.g., impl-0105A, verify-pr-371, fix-0106-types). One-shot generic names like agent1 are bad.
Self-check before EVERY Agent call: "Did I pass name? Did I pick a model size?" If either is missing, fix the call before sending it. This rule is non-negotiable.
Choose by the shape of the task, not by how important it feels. Sizes are named so this table survives model releases — map the size to whatever the Agent tool's model parameter currently offers.
| Size | model | Use for |
|---|---|---|
| large | opus | Implementer agents doing implementation. Fix agents on an undiagnosed bug. Anything requiring design judgment. |
| medium | sonnet | PR preparer. Browser verification. Fix agents handed an exact, specified patch. Mechanical work with a clear spec. |
| small | haiku | The worktree isolation probe (STEP 2.5.2). Pure inspection or summarisation with no judgment call. |
Implementers stay large. Do not "optimise" them downward. Implementation is judgment-heavy, and a weaker implementer that needs more iterations costs more than a stronger one that needs fewer — turn count, not per-turn price, is what dominates. A downgrade that adds two review rounds is a large net loss that looks like a saving.
Two constraints worth knowing rather than rediscovering:
Agent tool has no reasoning-effort parameter. Effort is inherited from the session (effortLevel / CLAUDE_EFFORT) and cannot be set per spawn. Size selects the model; it does not select how much the agent thinks.small carries a 200k context ceiling. For read-heavy roles that is a feature — it bounds context growth for free.Implementation steps (planning, coding, testing) → Spawn focused agents. For any implementer that will run concurrently with another, give it an isolated worktree via STEP 2.5 and start its prompt with the worktree preamble — do NOT rely on isolation: "worktree" (it's a no-op for teammates; see the prohibition above). Give each agent ONLY its specific job — the change doc path, spec path, plan, and acceptance criteria. Implementers get the template at the top of this skill (dev, Implementer role); planning and analysis agents load their own skills, as in dev Steps 2 and 3. Do NOT tell any agent to follow the full SDLC. Always pass name (see above).
When you spawn the implementer for the FINAL piece of a change, your prompt MUST include: "This is the final implementing PR for . In the same commit, flip **Status:** draft → **Status:** complete in docs/changes/<NNNN>-*.md AND flip status: draft → status: complete for that change's entry in docs/index.yml. Sync docs/index.md if present." For every NON-final implementer on the same change, your prompt MUST include: "Leave the change-doc **Status:** field and docs/index.yml entry untouched — the final PR flips them." This split prevents rebase-conflict storms across multi-PR changes and ensures the final PR carries the Status flip atomically.
⛔ Every spawn prompt that may open or edit a PR MUST carry the PR conventions block verbatim (BLOCKING). Load fx-dev:github BEFORE you author your first spawn prompt, and paste its "PR conventions block" into the prompt of every agent that might run gh pr create or gh pr edit — PR preparer, fix agent, anything. A convention that lives only in a skill nobody loads does not survive delegation: a spawned agent inherits your prompt, not your skills.
This is not hypothetical. In an observed run, all three implementers received the TITLE rule — because this skill restates it inline below and gates it at merge — and none received the BODY rule, which lives only in fx-dev:github. All three PRs shipped hard-wrapped bodies that render ragged on GitHub, while PRs prepared through fx-dev:pr-preparer in the same repo did not. Restating a rule here is what makes it propagate; anything you do not restate or gate, you will not get.
PR creation → Either do it yourself via gh pr create, or spawn a focused PR preparer agent (fx-dev:pr-preparer). Implementers do not open PRs (dev § Roles → Implementer). Open a PR only for a branch whose dev Step 4.5 Codex review has converged (the restated rule at the top of this skill). Load fx-dev:github skill first, and pass its PR conventions block into the prompt whenever you delegate. ⛔ Whoever creates the PR — you or an agent you spawned — the --title MUST be a conventional-commit subject — type(scope): description — matching the canonical regex ^(feat|fix|docs|refactor|chore|test|perf|build|ci|style|revert)(\(.+\))?!?: .+ (see the github skill's "Use Conventional Formats"). Do NOT write a prose title; running gh pr create directly does NOT exempt you from the conventional-commit rule. Verify the title against the regex before AND after creation. (Prose titles the coordinator wrote directly — bypassing pr-preparer — are exactly how non-conventional titles have slipped onto main.)
Review and CI steps (Copilot review, CodeRabbit review, CI monitoring, feedback resolution) → Handle these DIRECTLY as the coordinator. These are lightweight skill/command invocations that must not be delegated. Pass the STEP 0 Scope Brief into every reviewer invocation that accepts one, and apply it when triaging every reviewer that does not (Copilot and the CodeRabbit GitHub App accept nothing). A finding covered by the brief's out-of-scope list is recorded as deferred with the covering exclusion — never silently fixed, never silently dropped, and never a reason to widen a teammate's PR. Use each reviewer's waiter or read-only inspection first, classify and deduplicate findings under fx-dev:dev Step 2.5, then invoke feedback resolvers only for the classified disposition. Never let a resolver implement unclassified feedback or modify task trackers for deferred feedback.
⛔ Never block on a reviewer or CI wait — see Waiting and reconciliation below, which holds this coordinator's wait policy, including its one exception for headless sessions. In particular, never run gh pr checks --watch.
Merge gates → Always handle directly. See MANDATORY MERGE GATE CHECKLIST below.
Browser verification → Spawn a dedicated verify agent if the task has UI changes.
isolation: "worktree" flag does NOT work for teammates). Each implementer works in its own worktree on its own branch.⛔ You never sleep. You never poll. You never block. The rule, its rationale, and the ways a hand-rolled wait fails are in fx-dev/skills/dev/references/background-waits.md — read it once and apply it to every wait below.
Everything you wait on is backgrounded and notifies you. Reviewer waiters, CI waiters, and teammate agents all wake you on completion. That is your only scheduling mechanism.
All of the above assumes a host that can wake you. If this session is headless — your instructions say it is non-interactive, there is no user to reply mid-run, or ending your turn ends the process — nothing will: the notification arrives after the process is gone. Observed: a headless agent ended its turn to "be woken by the notification" and skipped every review and CI gate.
In a headless session, never end your turn while a teammate, reviewer, or CI wait is outstanding. Run every waiter in the foreground with a budget inside the tool's timeout and relaunch it on STATUS=PENDING; spawn teammates as foreground calls (several in one message run concurrently) and wait for them to return; and carry the run through its last merge and STEP 4 shutdown before replying. The exact mechanics are fx-dev/skills/dev/references/background-waits.md § Headless sessions. sleep polling stays forbidden, and the silence backstop below cannot fire after the process exits, so do not rely on it.
idle is not completed — silence is never progressA teammate reporting idle has STOPPED. It will not wake you. Only a completed teammate sends a completion notification. An idle one has ended its turn — parked awaiting input, or reporting progress mid-task — and sits indefinitely until SendMessage nudges it.
Reading an idle_notification as "still working, it will wake me when it lands" produces a mutual stall: you go quiet waiting for a completion that will never fire, while the teammate waits for a message you will never send. Neither side is blocked, nothing errors, nothing is logged, and the run just stops. Observed: a 49-minute stall in which the delegated work had finished within the first minute.
idle_notification and go idle yourself. Read it, then nudge or accept completion.ListAgents before waiting any longer. Any teammate showing idle that you believe is still working needs a message, not more patience.The no-polling rule binds every teammate you spawn, not just you (fx-dev/skills/dev/references/background-waits.md § The rule binds delegates too). Carry it into every implementer prompt that could wait on a long-running tool.
Keep .claude/team/waits/ledger.json — one row per tracked teammate and per tracked PR, recording its last known state and what you are waiting on for it. It exists so a wake is a cheap diff instead of a re-derivation of the whole run.
When any notification arrives — a waiter finished, a teammate finished, anything — do one batched pass:
Batch the inspection. One pass over all open PRs, not one gh call per PR per wake. While anything is in flight you get free wakes, so stall detection costs you no dedicated turns at all.
The only case reconcile-on-wake misses is everything going quiet at once. Guard it with a single long-interval ScheduleWakeup (~30 minutes) — not a sleep, which holds a turn open.
Every waiter has its own 900 s budget and always exits, so it will notify you well inside that window. The backstop should essentially never fire. Do not shorten it: a short interval is polling at full coordinator context wearing a different hat.
PENDING waiterSTATUS=PENDING means the reviewer or check is still running — not a verdict, not a failure. Relaunch it (backgrounded) if you still need that gate.
Prefer to have other work in flight while it runs. If you have other PRs to advance, do that and let the relaunched waiter notify you; that is strictly cheapest. Only when you have nothing else to do is it worth relaunching immediately and waiting on it alone.
BEFORE running gh pr merge on ANY PR — no matter how small — you MUST verify ALL of the following. This is non-negotiable. A single unmet condition means DO NOT MERGE.
| # | Gate | How to verify | Blocking? |
|---|---|---|---|
| 1 | Required CI checks green | gh pr checks <NUMBER> — every required non-CodeRabbit check must pass | YES |
| 2 | Copilot review RECEIVED and feedback RESOLVED | Invoke fx-dev:copilot-review skill — confirm 0 unresolved Copilot threads | YES |
| 2b | CodeRabbit reviewed or correctly degraded | Invoke fx-dev:coderabbit-review: prefer a passing check with received feedback resolved; if CodeRabbit rate-limits, report once, resolve what it already delivered (blocking findings fixed, every posted thread settled), and record skipped (rate-limited) without blocking | NO when rate-limited |
| 3 | Implementation matches spec/task | Read the diff and verify against requirements | YES |
| 4 | Spec task marked complete | Check via project-management skill | YES |
| 5 | PR description is clear | Read PR body | YES |
| 5b | PR title is clean AND conventional | Title (a) is a conventional-commit subject — run the canonical check from the fx-dev:github skill's "Use Conventional Formats" (a plain prose title with no type: prefix FAILS) — AND (b) has NO stray #<number> (only a real PR/issue ref) and NO wave/phase/step/change-doc number. Fix with gh pr edit <N> --title "type(scope): …" before merge — squash bakes the title into main | YES |
| 5c | PR body is NOT hard-wrapped | Run the canonical "Mechanical body check" from the fx-dev:github skill — it exempts lists, tables and code blocks, judges only prose, and exits 1 printing HARD-WRAPPED when prose clusters in the 60-100 column band. Do NOT substitute a sort -rn | head on line lengths: the longest lines are usually exempt ones, so it passes a body whose prose is entirely wrapped. Fix with gh pr edit <N> --body-file <file> and re-run before merging | YES |
| 6 | Browser verification completed | Spawn a verify agent if needed (see below) | YES |
| 7 | Codex pre-PR review converged on this change | Your own ledger shows that your dev Step 4.5 run — fx-dev:codex-review with the Scope Brief, run by you on this branch — converged before the branch was pushed and the PR opened, and any later fix delta was verified per dev Step 4.5. An implementer's claim to have run Codex does not count. No converged pass, no merge | YES |
| 8 | Every implementer spawn loaded dev in the Implementer role | Every implementer and fix agent behind this PR was spawned with the template at the top of this skill: its prompt began Load the dev skill (Skill tool: skill='fx-dev:dev') and act in its Implementer role. A hand-written prompt without that load means its work skipped dev's rules — have it redone or re-verified first | YES |
Codex runs LOCALLY first — and it is the ONLY local reviewer. You, the lead, run local Codex via the
fx-dev:codex-reviewskill on each implementer's branch before it is pushed (dev Step 4.5, restated at the top of this skill), passing the Scope Brief and recording findings in your ledger; implementers never run it, and Gate 7 checks your run converged. Notcodex review --base main— that CLI rejects--basetogether with a prompt, so the promptless form cannot carry the brief and reports the work the change deliberately did not do. Prefer it converged (fx-dev/skills/dev/references/scope-contract.md§ Convergence — no blocking finding left unresolved, not zero output). There is no local CodeRabbit pass; thecrCLI is not used. Gate 2b is the PR-level CodeRabbit review, which applies only when the GitHub App is configured — its waiter reportsSTATUS=NOT_CONFIGUREDotherwise, which is terminal and expected for most repos. If CodeRabbit rate-limits, resolve findings already received, recordskipped (rate-limited), and continue; never wait for its cooldown.
As coordinator, YOU handle reviewer waits directly — but you never block on them, except in a headless session, where you run them in the foreground and never end the turn with one outstanding (Waiting and reconciliation above). Launch every configured reviewer's waiter in ONE message, each redirecting to its own log, per fx-dev/skills/dev/references/background-waits.md. They run concurrently; a completion notification wakes you per reviewer.
Waiters exist for Copilot and CodeRabbit only, and those are the only two this workflow requests. Should some other automated reviewer the repo has configured post threads anyway, they still gate the merge and you settle them by hand (fx-dev/skills/dev/references/scope-contract.md § Injecting the brief into reviews) — a clean fx-dev:resolve-pr-feedback report does not cover them.
# ALL in one message, every one run_in_background: true.
# Each command creates the log dir itself: if it does not exist the REDIRECT fails
# before the waiter ever starts, so you get no STATUS line at all — the one failure
# the whole protocol exists to prevent. `mkdir -p` is idempotent; never rely on an
# earlier step having created it.
Bash: mkdir -p .claude/team/waits && bash <skill>/copilot-review/scripts/wait-for-copilot-review.sh <PR_NUMBER> \
> .claude/team/waits/copilot-<PR_NUMBER>.log 2>&1
Bash: mkdir -p .claude/team/waits && bash <skill>/coderabbit-review/scripts/wait-for-coderabbit-review.sh <PR_NUMBER> \
> .claude/team/waits/rabbit-<PR_NUMBER>.log 2>&1
Bash: mkdir -p .claude/team/waits && bash <skill>/dev/scripts/wait-for-ci-checks.sh <PR_NUMBER> \
> .claude/team/waits/ci-<PR_NUMBER>.log 2>&1
# On each notification: read the log, branch on its STATUS= line, classify
# findings in the ledger, THEN invoke that reviewer's resolver skill.
Apply fx-dev:dev Steps 2.5 and 6.1 as the canonical reviewer policy: maintain the coordinator-owned finding ledger, fix every blocking finding and only those (fx-dev/skills/dev/references/scope-contract.md § Blocking — the class name does not decide it; a reviewer-originated Material or Substantive entry blocks whatever its class), and rerun only reviewer state invalidated by the latest delta. Do not restart every reviewer after each push or seek zero suggestions. Settle all required threads within the bounded remediation rounds. If CodeRabbit reports a rate/quota limit or cooldown at any point, stop its loop immediately, report once, record skipped (rate-limited), and continue without waiting or escalating — after fixing the blocking findings it already delivered and settling every thread it already posted. The degradation waives only the passes that never ran (fx-dev:coderabbit-review, rate-limit rule), never work already on the PR. Copilot must still satisfy its mandatory review gate.
If CodeRabbit is not configured (its waiter reports STATUS=NOT_CONFIGURED, exit 3), report once and proceed — that status is terminal, so never retry or wait it out. Do not silently skip ordinary failures; the optional exception is specifically for CodeRabbit throttling.
For tasks with UI changes, spawn a dedicated verify agent:
Agent tool:
name: "verify-<pr-number>" # REQUIRED — addressable handle (do NOT pass team_name; it's ignored)
model: "sonnet" # size: medium — verification is mechanical
prompt: "Load the verify-web-change skill (Skill tool: skill='fx-dev:verify-web-change').
Verify PR #<NUMBER> on branch <branch-name>.
Check out the branch, start the dev server, and confirm the app loads without errors.
Report back whether verification passed or failed, with details of any errors."
description: "Verify PR #<NUMBER> in browser"
mode: "bypassPermissions"
Why this gate exists: CI does NOT catch runtime-only errors like circular dependencies, SSR failures, or broken module initialization.
If a "small" or "follow-up" PR: Same rules. No exceptions. PR size is NEVER a reason to skip merge gates.
The FINAL PR for a change document MUST mark the change complete IN that PR — NOT in a follow-up. A change doc still showing **Status:** draft after its last implementing PR merges is a bug; the docs lie about state and the index is out of sync with reality on main.
There are two places to flip:
docs/changes/<NNNN>-<slug>.md — flip the front-matter line **Status:** draft → **Status:** complete.docs/index.yml — flip status: draft → status: complete on that change's entry. Sync docs/index.md if the project keeps both.The implementer is responsible for the flip when they are shipping the final piece of a change. They MUST include the Status flip in their commits, so it lands in the same PR, and whoever opens that PR notes "this completes 0094" in its description.
The coordinator's job, BEFORE merging, is to verify the flip is in the PR's diff. Add this to your PR-inspection step (Gate 3 — implementation matches spec). If the flip is missing:
docs(changes): mark <NNNN> complete.This MUST NOT become a follow-up PR. Doing it post-merge means main spent some window in a wrong state, and the user sees a stale draft for every change you ship.
When a change decomposes into multiple PRs (e.g., 0090 split into 0090A and 0090B): only the LAST implementing PR flips Status. Earlier sub-PRs MUST leave Status as draft. The coordinator decides which PR is "last" — typically the final task in the change doc's task list. Tell THAT implementer explicitly in their spawn prompt to include the Status flip; tell every other implementer to leave Status alone (multi-PR rebases against a flipped Status field create spurious conflicts).
If you mis-identified which PR was last and you've already merged a sub-PR with Status: complete flipped early, the doc is wrong on main until the remaining PRs land — open a tiny corrective PR flipping it back to draft until the real final PR lands.
If a single PR is only a partial implementation of its change doc (more PRs to come), the PR MUST leave Status as draft. The Status flip rides only with the final piece.
When all tasks are complete and all PRs merged:
Verify all spec tasks are marked done (load fx-dev:project-management to check)
Verify every implemented change is status: complete on main — check both docs/changes/<NNNN>-*.md front-matter AND docs/index.yml. If any are still draft, you missed the pre-merge gate; open a corrective PR right now (the goal is the gate catches it pre-merge, but if it slipped, fix it before declaring done).
Send shutdown requests to all active teammates (refer to each by name); each teammate approves and exits gracefully
Tear down every worktree created in STEP 2.5. For each one, in order: remove the node_modules symlink first (so git worktree remove doesn't traverse into the shared deps), then git worktree remove --force <path>, then git worktree prune. Delete the branch with git branch -D <branch> only if it's unmerged/abandoned (a merged PR's branch is already gone from origin). Confirm git worktree list shows only the main repo and git status is clean before continuing.
rm -f <REPO_ROOT>/.claude/worktrees/<slug>/node_modules
git worktree remove --force <REPO_ROOT>/.claude/worktrees/<slug>
git worktree prune
git branch -D <branch> # only if unmerged/abandoned
Do NOT call TeamDelete — it was removed in v2.1.178. The team config directory is cleaned up automatically when the session ends; there is no manual teardown step. (The shared task list directory persists locally by design so resumed sessions keep their tasks — that's expected, not a leak.) Your only manual cleanup is the worktrees in step 4.
Report final summary to user
name to EVERY Agent call — implementer, verify, fix, anything. name is what makes the teammate addressable via SendMessage and visible in members[]; omitting it produces an anonymous worker you can't steer by name. No exceptions.team_name and NEVER call TeamCreate/TeamDelete — all three were removed/deprecated in v2.1.178. The team is implicit and session-scoped: it forms on the first Agent spawn and is cleaned up automatically on session exit. team_name on the Agent tool is accepted-but-ignored.isolation: "worktree" for a teammate — a teammate runs as a full session in the lead's working directory, so the flag is a no-op. For any implementers that run concurrently, pre-create real worktrees under .claude/worktrees/ and pin each via the prompt preamble (STEP 2.5). If you don't, run implementers strictly one-at-a-time. Always tear the worktrees down in STEP 4.Load the dev skill (Skill tool: skill='fx-dev:dev') and act in its Implementer role, and carries a handle, a size, and the Scope Brief. Never hand-write an implementer prompt without that loadfx-dev:github PR conventions block into every spawn prompt whose agent may open or edit a PR — load that skill before authoring your first prompt. A spawned agent inherits your prompt, not your skills; a rule you do not restate is a rule that does not reach it.fx-dev:copilot-review yourself. No exceptions.fx-dev:coderabbit-review; resolve feedback already received, then record skipped (rate-limited) and continue immediately if throttled.sleep, poll, or block on a wait (fx-dev/skills/dev/references/background-waits.md). Reconcile on the completion notification. The only timer permitted in a run is one long ScheduleWakeup silence backstop.fx-dev/skills/dev/references/background-waits.md § Headless sessions) and run through the last merge and shutdown before replying.model size to every Agent call — see the size table in STEP 3. Implementers are large; never downgrade them.fx-dev:project-management to verify task trackingStatus: draft still in the diff. The flip to complete rides in that PR, in both docs/changes/<NNNN>-*.md and docs/index.yml. If the implementer forgot, push a fix commit to their branch and wait for CI before merging. Do NOT defer to a follow-up PR. See PRE-MERGE: Change-Doc Status Flip above.If an implementer agent reports problems:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
multi-agent, coordination, implementation-workflow, team-lead
npx claudepluginhub fx/cc --plugin fx-dev25 skills in this plugin
/coderabbit-reviewExplicit-use only — invoke when the user explicitly names this skill, or when an active explicitly invoked workflow calls it. Handles CodeRabbit's PR-level review as an optional review adapter with Scope Brief triage and rate-limit degradation./codex-reviewExplicit-use only — invoke when the user explicitly names this skill, or when an active explicitly invoked workflow calls it. Runs a scoped one-shot Codex CLI branch review as an external review adapter./copilot-feedback-resolverExplicit-use only — invoke when the user explicitly names this skill, or when an active explicitly invoked workflow calls it. Processes and resolves existing GitHub Copilot review threads without creating PR-level comments.Other plugins' skills for the same job