Use when decomposing a feature, PRD, or grilled spec into tasks. Produces vertical slices (end-to-end behavior, never layers), every one buildable without a human decision, written as a draft plan for tbv/task-tree.json.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Slice Planning?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/restierecon-slice-planning)
---
name: slice-planning
description: Use when decomposing a feature, PRD, or grilled spec into tasks. Produces vertical slices (end-to-end behavior, never layers), every one buildable without a human decision, written as a draft plan for tbv/task-tree.json.
---
# Slice Planning
Decompose by BEHAVIOR, never by layer. A slice is a tracer bullet: the thinnest
end-to-end path that makes one piece of user-visible behavior real.
## Every slice must satisfy all three
1. Named "Actor can [do something]" — if you can't name it this way, it's not a slice.
Write its `so_that` in the same breath: the reason the actor wants it, in the
actor's words, never the implementation ("so that I don't lose my draft", not
"so that we persist to localStorage"). Title plus `so_that` is the user story the
slice ships as; a slice whose `so_that` you can only state as "so that the system
works" has no user-visible value and is probably a layer, not a slice. The
user-story skill has the format and Gherkin criteria when a story needs work.
2. Touches every layer that behavior needs (DB + API + UI + tests as applicable)
3. Testable and demonstrable with NO other slice complete
## Anti-pattern (reject your own plan if you see this)
No horizontal slicing — never "create the tables", then "build the endpoints",
then "build the UI". That illusion of parallel completeness produces fragile,
unintegrated output. One vertical slice at a time.
## Sizing
A slice the Builder can finish inside its budget (≤ 10 builder/reviewer/auditor invocations, including review
rounds). If acceptance criteria exceed ~7 items, split the slice. Other split signals:
the title needs an "and" to describe it (that's two slices); it touches two or more
independent subsystems (e.g. billing and notifications); you can't state its
acceptance criteria in 3 bullets without hand-waving.
## Map dependencies before sizing
Before writing slice boundaries, sketch what depends on what (schema → API → UI is
the common shape, but not the only one). Order slices bottom-up along that graph —
this is what `depends_on` should encode, not just "did it get planned first."
## Instrumentation
If the slice adds a new I/O or external-call path (network, queue, subprocess,
third-party API) that will run in production, add an explicit acceptance criterion
for it: "logs one `<event>` event with the request ID, outcome and duration"
(observability skill). Observability is not an afterthought slice — it ships with the
behavior it observes.
The same slice carries a criterion for what happens when that call fails: "when
<dependency> is down or slow, <user-visible outcome>" (resilience skill). If the grill
didn't settle that outcome, it is an OPEN QUESTION, not a guess.
A slice that adds a config value or secret carries a criterion like "startup fails
with an error naming `<VARIABLE>` when it is unset" (deploy-readiness skill).
A slice that stores, exports or deletes personal data, or adds an admin or permission
action, carries the criteria the grill settled for it: which action writes which audit
event, and what erasure and retention remove (audit-and-privacy skill).
## UI slices
A slice that renders any part of an approved UI contract (ui-prototype skill) sets
`"ui_contract": "tbv/ui/<feature-slug>/contract.md"`; every other slice sets
`"ui_contract": null`. Its acceptance criteria name the contract states it delivers
(loading, empty, error, ...) — a state no slice claims is a gap in the plan. A UI
slice whose contract a human hasn't approved (`ui-approval.sh check`) can't be drafted: return it
to /grill.
## Every slice is autonomous
There is no human-in-the-loop slice type. The grill settles every decision a human
would want — ambiguous requirements, UX calls, schema choices that are expensive to
reverse, money, deletion of user data, refactor targets — before planning starts. If a
slice still needs one of those decisions, don't write it: return the question to
/grill. Note one-way doors (from the grill's ADRs) so the Director can route those
slices to the top model and the Tier 2 second opinion.
## Ordering
Walking-skeleton first: the earliest slices should produce a deployable end-to-end
spine (one trivial behavior through every layer), then flesh out behavior by value.
Record dependencies explicitly; the Director schedules slices in dependency order.
## Classify for parallel dispatch
`depends_on` isn't just "must come after" — it's what makes a slice eligible for
concurrent git-worktree dispatch (see the global protocol's Parallel Slice Dispatch).
For each pair of slices, decide:
- **Safe to parallelize** — genuinely independent: different files, no shared schema
or contract. Leave `depends_on` empty between them.
- **Must be sequential** — one changes shared state the other reads (a migration,
a schema the other's queries assume). Add the edge to `depends_on`.
- **Needs coordination, not sequencing** — both consume the same API contract or
schema but could otherwise run concurrently. Don't force a false dependency edge;
instead plan a contract-defining slice first (types/interfaces/schema only), then
let the consumers depend on *that*, not on each other.
Getting this wrong either serializes work that could have run concurrently, or lets
two slices race on files neither one's `depends_on` protected.
## Output
Normally run by the `planner` agent, which writes the slices as a JSON array to
tbv/plan-draft.json; the Director copies approved slices into
tbv/task-tree.json. Slice shape:
{ "id": "S00n", "title": "Actor can ...", "so_that": "...", "feature": "cart",
"status": "todo", "depends_on": [], "auditor_triggers": [], "ui_contract": null, "acceptance_criteria": ["..."],
"contract": {"tests": ["tests/x"], "budget": 300},
"verify": "the command or demo that proves the criteria", "retry_count": 0,
"risk": {"dimensions": {"blast_radius": 1, "reversibility": 1, "security": 0, "complexity": 1, "uncertainty": 1},
"rationale": "...", "hazards": [], "ruled_out": {},
"scope": {"change": "...", "files": ["src/x/*", "tests/x/*"], "unchanged": ["..."], "regressions": []},
"rollback": "...", "safeguards": []},
"gates": {"self_review": null, "automated": null, "reviewer": null, "auditor": null, "risk": null} }
`risk` is the slice's risk assessment (risk-gate skill has the rubric): it decides the
controls and autonomy the slice gets, and `scope` is the minimum necessary change the
builder must stay inside. A slice whose honest rating comes out critical is worth a
second look: splitting off the destructive part often leaves most of the work low.
`feature` names the FEATURES.md entry the slice belongs to (codebase-map skill → Feature
map). A slice that starts a new feature adds its entry, so it lists `FEATURES.md` in
`risk.scope.files`; check-plan.sh fails a feature that is neither mapped nor added.
`contract` is what the build is held to. `tests` names the files or directories the
slice's acceptance tests live in (plain paths, no globs, inside `risk.scope.files`): the
tester writes them failing, `contract.sh lock` records their hash, and from then on the
gate fails if a builder changes one. `budget` caps the changed lines outside those
tests — set it at about twice an honest estimate, so it stops a runaway diff without
squeezing a normal one. A slice no test can prove (docs, config) says
`"contract": "none: <reason>"` — never omitted. Never write `contract.locked`;
contract.sh does.
`auditor_triggers` lists every trust boundary the slice's behavior crosses, from: auth,
sessions, data-access, user-input, file-uploads, secrets, dependencies, external-calls,
llm-tools — `[]` when it crosses none. It decides two things: the auditor gate runs, and
the builder's brief must name the harden-diff skill (guard.sh blocks the spawn
otherwise). When unsure whether a boundary is crossed, list it.
A gate value is null (not yet run), a verdict, or "skip: <reason>" (e.g. auditor on a
slice with no trigger) — never omitted, never a bare "skip".
`~/.tbv/scripts/check-plan.sh` validates this shape mechanically (fields, title form, auditor_triggers vocabulary,
every `depends_on` resolving to the draft, task-tree.json or stories.md, no cycles, a
valid `risk` with every hazard its wording suggests declared or ruled out) and prints
each slice's risk class and controls;
the Director runs it before copying a draft.
A `depends_on` ID that names a slice absent from task-tree.json is satisfied — merged
slices are harvested into tbv/stories.md and pruned. Check stories.md before assuming
a missing ID is a typo.
Then present the plan as a table (id · title · depends on) for confirmation
before any building starts.