Skip to content

Playbook: Large Tasks ​

Objective ​

Deliver a body of work that does not fit one trustworthy Claude Code session — by splitting into sequenced, verifiable slices with durable handoffs — without losing architectural coherence or accumulating half-wrong context.

When to use ​

Estimates exceed ~one focused session; the plan has >~8 steps; multiple packages/domains; or prior attempts ended in stuck loops. For a single bounded feature, prefer Add a Feature. For greenfield product arcs, MVP Build already encodes slicing.

Inputs required ​

  • A written goal and non-goals (spec or ADR-backed).
  • Inventory of subsystems touched.
  • Definition of "slice done" (gates + human check).
  • Branch strategy (stacked PRs vs long-lived branch with frequent merges from main).

Step-by-step process ​

1. Decompose before any implementation session ​

text
Given goal <goal> and constraints <list>, propose a decomposition.

Rules:
- Each slice is verifiable end-to-end or with a clear intermediate proof
- Each slice fits one session (roughly: ≤~10 files or one subsystem seam)
- Dependencies between slices are explicit (DAG)
- Identify the riskiest slice and whether it should go first
- Flag decisions that are human-owned before slice 1

Do not write code. Output a numbered slice list with: goal, allowlist hint,
verification, and prerequisites.

You edit the DAG. Agents often propose horizontal layers ("do all DB first") — invert toward vertical or seam-based slices that prove something.

2. Write slice contracts into the repo ​

Durable > chat. Example:

markdown
## Slice 3 — Extract proration pure function
- Spec: specs/012-billing-proration.md §Algorithm
- Allowlist: src/domain/billing/proration.ts, *.test.ts
- Prerequisites: Slice 2 merged
- Verification: `npm test -- proration` + examples from spec
- Out of scope: HTTP, Stripe, migrations
- Handoff: update specs/012/STATUS.md

Keep status in-repo (specs/.../STATUS.md or PLAN.md) so a fresh session doesn't need the old transcript. See Docs as Memory.

3. One slice per session — fresh context ​

text
Read CLAUDE.md, specs/<id>.md, and specs/<id>/STATUS.md.
Implement ONLY slice <n> as contracted.

Questions-first if the contract is ambiguous — stop and ask.
Plan mode if the slice touches >3 files.
When done: evidence (commands + output), update STATUS.md handoff section,
list discovered follow-ups without implementing them.

Do not continue to slice N+1 in the same session after a messy N. Context pollution is the failure mode this playbook exists to prevent.

4. Handoff note (minimum template) ​

markdown
## Handoff — slice <n>
- Done: <bullets>
- Not done / out of scope discoveries: <bullets>
- Files touched: <paths>
- Verify with: <commands you ran + results summary>
- Open questions: <for human>
- Next slice: <n+1> prerequisites satisfied? yes/no

5. Integration checkpoints ​

Every K slices (or before any user-visible release):

CheckpointAction
Merge from mainResolve conflicts deliberately — don't let the agent "make it compile" across domains unsupervised
Full make checkNot only the slice's targeted test
Spec syncKeeping Specs Alive
Architecture skimNo parallel modules; map still true — Navigability
Demo pathHuman exercises the thickest vertical path so far

6. Parallelism (optional, constrained) ​

Parallel slices only if allowlists cannot overlap and contracts don't share undecided decisions. Otherwise serialize. See Coordination. Prefer one human integrating over three agents racing.

Human review points ​

  1. Decomposition DAG — yours.
  2. Riskiest-slice ordering — yours.
  3. Each slice acceptance — human verify before N+1.
  4. Integration checkpoints — you run the thick path.
  5. Stop/kill criteria — if two slices in a row need Recovery, pause and replan the remaining DAG.

Expected artifacts ​

Slice list in-repo · STATUS/handoffs · stacked or sequential PRs · green gates per slice · integration notes · updated specs/ADRs for decisions made along the way.

Common failures ​

SymptomRoot causeEarly detectionFix
Mega-session "almost done" for daysRefused to sliceContext thrash; contradictory editsHard reset; write DAG; one slice/session
Slices green, whole system wrongHorizontal slicingNo vertical proofReorder; add integration checkpoint
Handoff only in chatNext session re-derives wrongSTATUS.md missingRequire STATUS update in slice DoD
Parallel agents conflictOverlapping allowlistsMerge hellSerialize; shrink allowlists
Late architecture change invalidates early slicesDeferred human decisionDecision appears mid-epicPull What Not to Delegate decisions to the front; ADR

Recovery strategy ​

Thrashing on slice N: context reset, shrink allowlist, or split N into N.a/N.b. If the DAG was wrong: freeze implementation, rewrite remaining contracts, obsolete STATUS entries explicitly. Catastrophic branch: Recovery, then resume from last verified slice tag.

Acceptance criteria ​

  • [ ] Work split into session-sized slices with a DAG
  • [ ] Each merged slice has verification evidence and STATUS handoff
  • [ ] No slice N+1 started on a failed or unverified N
  • [ ] Integration checkpoints run on the real thick path
  • [ ] Human-owned decisions resolved before slices that depend on them
  • [ ] Final behavior matches the governing spec/ADR set

A field manual for AI-native software engineering.