/fd3:split-to-tasks <path to the spec file>from fd3
Splits a specification file into task files organized by rollout gates, one task per worktree and one branch per pull request. Validates the spec before splitting.
Ships in fd3. 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.
The spec to split: $ARGUMENTS
If no path was given, ask which spec to split. If the path does not resolve, say so and stop.
The spec is read-only here. A defect you find in it — an element no work item builds, a work item that cites nothing — is a reason to stop and report it, never something to fix in passing, and not when the user offers to let you: an edit after the last verdict is one no pass has checked.
gcloud sequence, a console action) with no pull request. It exists when
the spec names a gate whose hand-run steps no repository carries — dependents or not: a final
gate nothing waits on still gets its task, or the rollout's last manual steps vanish from the
split. Its frontmatter
says repository: none and leaves branch empty — these fields are machine-read, so prose in
them breaks the reader — and its body closes with a ## Note saying why no pull request exists.
A declared gap the spec carries into the split is the second thing this shape holds (see
Precondition): the missing fact has an owner, and the task is how the split tracks it.
Both cases need hand-run steps that no repository carries. A phase's own verification rows are
not that — the repositories' checks run them — so a phase boundary gets no operational task
unless the spec names a gate outside its own verification.Splitting propagates the spec's defects into every task. A validation verdict in this
conversation settles the question. Otherwise the spec must carry all three: read its evidence
record from the bottom — the last verdict line in the file is the current one, position
decides and not the date — that line reads ready, it counts no blocked claim, and its count
equals wc -l on the spec.
A declared gap is work, not a stop. Validation records a gap the spec declares with an owner
and a placement as a deferred claim, and a ready verdict may carry any number of them: the
fact is unresolved and the spec names who resolves it. Each such gap gets an operational task
of its own, whose ## Note says what has to come back and from whom, and every task the gap
blocks from being written draws a depends-on edge onto it (step 3's authorship test). A
blocked claim is a gap nothing owns — it is not a declared gap, and it stops the split.
Anything short of that — a blocked claim, a count that does not match, a dated block
with no verdict line, no pass anywhere — is a stop before step 1. A dated heading over verified rows is not
a verdict. Validating is not this skill's work: on validate first the split ends with nothing
written and names the route — /fd3:build-spec <spec path>, which takes a finished spec straight to
validation. What lifts the stop is the user's answer, never your own — say what the record holds,
then ask, once, whether to validate first or split as-is, following
${CLAUDE_SKILL_DIR}/../../references/question-batching.md with validate first as the
recommendation. The message that ends the run says what the record held and which way the user
answered.
Never write a verdict. An evidence block, a verdict line or a validation status in the spec is
written by fd3:validate-spec alone — not by this skill, and not when the user asks it to, because a
verdict nothing validated is exactly what the precondition above would then trust. A spec that needs
repairing goes through the route above, and the split stops.
Show this checklist, marks updated and in full, at two points only: in the reply that carries a question batch (step 6's, a follow-up's) and in the closing report. Nowhere else — every other step starts with its tool call, not with the list:
- [ ] 1. Enumerate: work items, element codes, phases and gates, ownership, tickets
- [ ] 2. Cut along the boundaries
- [ ] 3. Draw the edges: authorship, never landing
- [ ] 4. Group tasks onto branches along the rollout gates, stack, fix the reading order
- [ ] 5. Check coverage
- [ ] 6. Put the judgment calls to the user, in one batch
- [ ] 7. Write the task files and report
Read the spec in full. List every work item from the per-repository section with the element
codes it names, every rollout phase with its gate marker, the ownership table with any landing
constraints, and the ticket identifiers. A fact the spec does not give you — a repository's
branch naming convention, the plausible blast radius of an item — is yours to look up yourself:
a direct command for a specific fact (git branch -r, a tracker query), Explore dispatched
into the repository when finding it takes searching. When a fact needs a dispatch rather than a
direct command, read ${CLAUDE_SKILL_DIR}/../../references/fact-routes.md first — it holds the
routes and the dispatch rules. Most splits need none. Never ask the user what you can read.
List the paths each repository protects, for step 2's fifth rule: its CODEOWNERS, its default
branch's protection rules where gh can read them, and any list of files its CLAUDE.md or
AGENTS.md says need the user's consent before an edit. Note which of them the spec's work items
touch.
Before naming a branch or recording a base, git fetch every repository the spec touches and record
what you fetched: the default branch, its origin/<default> commit, and whether the checkout's
current branch is behind it. The base you write into branch-base: is the ref the implementation
stage cuts worktrees from; a base derived from a week-old local ref is a worktree that starts from
the wrong commit, and nothing downstream re-derives it.
The last evidence block records the commit each repository was validated at, on its Checked at:
line; a block older than that line is measured from the commit that last changed the spec file. Where origin/<default>
has moved past it, the spec may describe code that is no longer there: intersect git diff --name-only <validated commit>..origin/<default> with the paths the spec cites. No hit, and the split goes on. A
hit clears when that path's diff leaves every claim the spec makes about it intact — its line pins,
the symbols and shapes it quotes — and the report names the path and what was checked. A pin whose
cited text is unchanged and only moved to other line numbers is intact: the tasks cite the lines
where that text now is, the spec stays as it is, and the report lists each moved pin, old and new
lines. Any other
hit is a stop before anything is written — name the paths the new commits changed and the route
/fd3:build-spec <spec path>; rebasing a branch or correcting the spec to follow is that route's
work, never this skill's.
Record each repository's absolute root path and write that path into repository:. A remote slug is
not a location: the next stage resolves it by guessing among the user's checkouts, and a feature
worked on in a second worktree is exactly where the guess goes wrong.
The spec is an input read at its absolute path, and where it happens to be committed decides
nothing. A spec written on a docs branch, on a feature branch, or in a repository the work never
touches still cuts its branches from each repository's default branch, or from a prerequisite
branch the spec itself names: a base is derived from the rollout and the stack, never from
git log on the spec file.
The raw material is the work items. Every task is a subset of them, and every item lands in exactly one task — unless a rule below cuts through the item itself, in which case it is split along that cut and the seam is named. Apply the boundaries in order — each is a rule with a reason, and the reason decides the edge cases:
phase: cleanup
in its frontmatter — cleanup is not a rollout phase, and a section reference in a machine-read
field breaks the reader.CODEOWNERS entry naming another team, a branch-protection or required-review rule, a
release manifest, the CI workflow definitions — waits on an approval the rest of the unit does
not. A listed path cuts only when its approval does differ: the same owners and reviewers as the
rest of the unit mean one review, and no cut. It is a delivery task like any other, with its own element and done criterion, on a branch
of its own, so one external approval never holds the whole landing unit. Step 1 lists which
paths these are; where the repository declares none, the rule finds nothing and costs nothing.
The approval it waits on is the pull request's review, never a precondition for writing the
code: no task ## Note asks the implementer to confirm before editing, because implementation
runs unattended and a pending confirmation there stops it mid-run. Where the repository's own
instructions require the user's consent before a path is edited at all, that consent joins the
step-6 batch; a path the user declines is a stop for the work items that need it, reported,
never a task left waiting on an answer.Within what survives the boundaries, prefer the smallest task that makes one verification row pass. Where one repository owns a whole behaviour, that yields a vertical slice — schema, endpoint and UI landing together. Where ownership or rollout forbids it, it degrades honestly into phase-ordered cuts. Never force a slice across a boundary the rules above drew.
A task that changes the type or shape of a shared identity or contract — a primary-key type, a wire format, a schema field — owns the ripple: propagation to every consumer, fixtures, seed data and test seeders included, either inside the task or explicitly handed to a named task. Another task that edits a file the ripple reaches has an edge onto the owner (step 3). A ripple nobody owns surfaces as a wall of type errors in whichever branch validates first, and gets fixed there twice.
Tickets never drive the split. Attach the spec's ticket identifiers to the tasks they describe, so pull requests and commit messages can cite them.
The spec is never a task's payload. No task, and no step inside one, commits, copies or moves the spec onto a work branch: the spec exists once, at the path this split read, every implementing agent reads it there, and a branch copy diverges from it at the first amendment. Committing the spec where it lives is a question the implementation stage asks before launch. A work item the spec lists for registering or publishing the spec itself gets no task: record it in the report under what the user still owes, and it counts as covered there.
The spec's session folder beside it (closing notes, question ledger, research), named the spec's
filename without .md, plus .session/ (spec/out.md → spec/out.session/), is git-ignored
working state, not part of the work: no task deletes, moves, commits or
de-links it, and the report owes nothing about it. Notes and research beside a spec from before
session folders (<spec-basename>.notes.md, <spec-basename>.research/) are the same working state.
Dependencies come from the spec's build order, and one test decides every edge you derive: authorship, not landing. An edge exists when a task cannot be written without another task's output, or when the spec itself binds the order:
Anything else that binds only landing is never an edge: the phase table's order between phases,
a gate the spec lets the code land before, a dependency that only gates verification. Phase order is the merge order
step 4 records in merge-after:; a gate that only verifies goes in the task's Done-when. An edge drawn
from landing strands work — across branches, a whole branch behind work it never uses; onto an
operational task, implementable work behind human hands, and a whole extra run pays for it.
Record each edge as a depends-on entry — a bare slug; the other task must land first — and name
what it shares in the dependent task's ## Note and in the report's table: the file, symbol or
migration, the change described, or for an order the spec binds its ordering sentence, quoted.
The frontmatter field stays a bare slug list, because prose in a machine-read field breaks the
reader. An edge you cannot name is sequencing by intuition: drop it. It buys nothing and costs the
implementation stage a serialisation, since tasks with no edge between them are implemented
concurrently.
Per repository, walk the spec's rollout table: the consecutive phases up to and including a gate
form one landing unit, and the unit's tasks share one branch:. Four overrides, none of them yours
to relax:
## Note the branch its output must land on.Branches in one repository stack only where step 3's test finds an edge between their tasks, or
where the spec states an environment order. Each branch starts from the latest earlier branch one of
its tasks has an edge onto — not merely the previous landing unit — and a branch with none starts
from the repository's default branch. A branch that builds on two earlier branches neither of which
builds on the other has no single base holding both: stack the later of the two on the earlier, so
one chain carries both, then base the branch on the later one, and name that extra stacking in the
report. The order the gates impose on landing is the merge order; it is not a base. Stacking on the
previous unit by habit cuts a branch from a base that lacks the files it needs whenever the unit in
between touched something else, and it chains the branch to whatever that unit waits on. Record
each branch's base in its tasks' branch-base: frontmatter field — the same value on every task of
the branch, and the field implementation reads; a base recorded only in the report is a base lost
with the conversation.
Record the merge order the same way, in the merge-after: field: the branches whose pull requests
must merge before this branch's may, because a phase boundary or gate in the rollout table stands
between them. An entry is a branch name, prefixed with its repository's absolute path and a colon
(/abs/repo-a:feat/ledger-api) when the branch lives in another repository — a branch name cannot
contain a colon, so the reading is unambiguous. A hold is transitive, and two already hold without
an entry: this branch's own stack chain, whose pull request it cannot merge before anyway, and a
branch carrying a task one of this branch's tasks has a depends-on edge onto. List what neither
reaches — every branch of an earlier landing unit the gate orders this one after, in every
repository — naming the last branch of a chain to hold behind the whole of it. The value is the
same on every task of the branch, [] where nothing more holds it, and empty on an operational
task. This field is the merge order's only record: implementation orders the pull requests from it,
and a hold stated in the report's prose or a task's ## Note is one it never sees.
The same test holds where a landing constraint has produced one branch per task: tasks applying the same change to disjoint targets are siblings — each off the default branch, no edge between them — however tempting a tidy sequence looks. A stack link is a serialisation the implementation stage pays for per branch: one validation wave each, regardless of diff size, so a chain of N one-file branches costs N full validation ladders.
A branch the spec names as a prerequisite that has not landed — an open pull request its work
builds on — is a base like any other: stack the branch that needs it on that branch, and record in
that branch's section of the report how far the base is behind origin/<default> and that the pull
request is retargeted once that one merges. It is a fact the spec settled, not a question.
Propose each branch's name following its repository's visible convention — existing branches show it; the name belongs to the group, not the task. A repository with no branches yet takes the convention of another repository the spec touches, and the report says whose it borrowed. One exception joins the step-6 batch: when the checkout already sits on a branch carrying implementation commits for this spec, whether the first landing unit reuses that branch or cuts fresh by the convention is the user's call — a user mid-feature may have chosen it deliberately. A branch that carries only the spec file itself is not that case — unless the spec names that branch as where its work lands, which makes reuse the spec's own answer: then the question joins the batch with reuse as the recommendation.
Then the size check: estimate each branch's aggregate diff from its tasks' citations. Past 80 changed files or 2000 changed lines, generated files excluded, a reviewer stops reading and starts skimming — but the grouping still follows the spec: warn, never subdivide. A breach goes into the report with a recommendation to revisit the spec's rollout table, because a branch structure the spec does not describe is a second source of truth about the rollout. The threshold is policy of this skill and never appears in the spec.
Then fix the reading order: a topological sort of the depends-on graph, ties broken by the
spec's phase-table order, then alphabetically by slug. This ordinal becomes the filename prefix in
step 7. It is a review order for a human walking the directory, not an execution constraint —
parallel threads have to interleave somewhere, and the truth about ordering stays in the
depends-on edges.
Before writing anything, check — and say in the report — that:
depends-on edge or merge-after, followed transitively — and
every merge-after entry names a branch some task builds;branch-base chain is rooted, acyclic, single-parent and identical on every task of a
branch. Its one root is the repository's default branch — or a prerequisite branch the spec names
as not yet landed (step 4) — or, where step 4 found the checkout
already sitting on a branch that carries implementation commits for this spec, that branch: the root is then
whatever the step-6 answer settles, so a chain rooted there is a question still pending, never a
coverage failure. Stopping on it would abort a split the user was never asked about.A stop here is a stop before any file exists. The message that ends the run says nothing was written, and what stopped it.
Put every judgment call to the user at once, following the batching protocol in
${CLAUDE_SKILL_DIR}/../../references/question-batching.md. The target directory is
<spec-dir>/tasks/ unless the invocation named one. It joins the batch whenever that directory
already holds task files at all — say whether they point at this spec (a re-split: replace them, or
write beside them) or at another one. Files from an earlier split of this same spec are the case
that looks safe and is not: implementation writes its statuses, worktree paths and notes into them,
and overwriting unasked destroys the only copy of that.
A branch convention no repository the spec touches shows is the user's; grouping the gates decided
and a size breach is a report with a recommendation, never a question — everything the rules above
already settled, report rather than ask. Three more things are never questions:
## Note of every task whose work it changes — a choice that binds only how a branch lands stays
in that branch's section. Only a choice the evidence leaves open joins the batch.One Markdown file per task, named <NNNN>-<slug>.md — a zero-padded four-digit ordinal from the
reading order of step 4, then the slug — in English regardless of the conversation's language.
The ordinal lives only in the filename: depends-on and every other reference carry the bare
slug, so a regeneration may renumber freely without breaking an edge. YAML frontmatter carries
the machine-readable fields; the body carries the brief.
The shape of each file is ${CLAUDE_SKILL_DIR}/../../references/task-template.md — read it
before writing the first one. Write each file with the Write tool. A heredoc puts the whole
body through a shell, where a guard hook may block it and an interrupted write leaves half a
file behind.
The body obeys the index card rule: the goal in the task's own words, pointers by element code and
section heading, nothing copied out of the spec — no contract prose, no schemas, no path:line
lists. The implementation agent reads those from the spec sections the pointers name.
Once every file is written, re-run step 5 mechanically over the files on disk — the written set is
what implementation reads, and a file that drifted from the plan shows only there.
node ${CLAUDE_PLUGIN_ROOT}/scripts/task-graph.mjs <tasks dir> does the graph half — cycles, edge
order, statuses, one branch-base and one merge-after per branch, holds that name a built branch
and close no loop, readable frontmatter — and prints every task's fields for the element and phase
checks, and under landing every branch's full merge order; any problems entry it prints is a file to fix before the
report.
Write the report to <spec-basename>.split.md beside the spec — never inside tasks/, where
a task-file glob trips over it — after that re-run, since its coverage statement is the re-run's
result. It carries one table (slug, repository, branch, phase, depends-on as the bare slugs the
frontmatter holds, elements); a ## Branches section with the creation order and stack chain per
repository and one ### <branch> subsection per branch holding every landing fact about it — its
base and how far that is behind origin/<default>, a draft pull request until a gate clears, a retarget once a prerequisite merges, a reuse the user answered, the
readings step 4 applied; where the files went; the coverage statement from step 5; every work item
split across tasks with its seam; any size-check warning; the verdict line this split was taken
against, quoted verbatim; and a ## Still owed section with anything the user still owes an
answer. In the conversation give the path and the same table — all six columns, elements
included — not the file.
The implementation stage reads that report's ## Branches and ## Still owed sections, so a
branch-level fact lives there once — except the base and the merge order, which live in the
branch-base: and merge-after: fields and nowhere else. A task's ## Note carries only what changes that task's
work, in the imperative — a shared file an edge names, a consent recorded, a decision that binds
it, where an operational task's output lands, and for a declared gap's task what has to come back
and from whom — because the conversation ends before
implementation starts. Never copy a branch's landing facts into its tasks' Notes: the implementing
agents neither cut branches nor open pull requests, and the same line in a dozen files is noise to
every one of them.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub grixu/cc-toolkit --plugin fd35 skills in this plugin
/grill-topicGrill the user relentlessly about a topic until its design tree is settled. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases./implement-tasksMass-implement a directory of task files on a dynamic workflow — dependency-ordered waves in isolated worktrees, batched per-repository validation (CI, then code review), human-in-the-loop only where a task demands it, and a push/PR proposal at the end. Use when the user wants split tasks implemented./validate-specValidate a spec for implementation readiness, backing every load-bearing claim with recorded evidence./write-specWrite a specification from a settled design understanding, given the closing-notes file that holds the ratified decisions.Other plugins' skills for the same job