Day to day

Split work into slices

Split a large plan into slices that several agents build at once, then what the join, a failed slice and the shared caps do.

Added in 2.6

Build a large plan in parallel by naming its slices. Each slice becomes a work item of its own, and Kraft joins the results before review.

Decide whether to slice

Slice only when each part makes sense on its own, with its own tests and its own verification loop, like a smaller work item.

Every slice is a child item with its own worktree, setup, implementer and review, so for smaller independent tasks one implementer using sub-agents has far less overhead.

Write the slices

Write a ## Slices section in the plan, one bullet per slice:

## Slices

- **Slice 1: Parser.** Tasks 1-3.
- **Slice 2: CLI verb.** Tasks 4, 6.

Slices must be independent: each starts from the same commit and none may rely on another's work. A task in no slice is shared groundwork. It is built first, in the item's own worktree, with tests and review, so every slice starts from tested groundwork.

A plan with fewer than two slices, more than max_slices (6 by default, set in policy.yaml), a task in two slices, or a [DONE] task in a slice is refused, and the plan gate says why. A plan with no ## Slices section runs as one item, as before.

Approve the split

When the plan is approved, Kraft adds the split to the chain revision itself. The revision gate then asks you, since it shows the slices and the nodes they cover.

Approving it wraps the implementation and the nodes right after it in a group. Those nodes run again on the combined code after the group.

While the slices run

At the group the item files one child item per slice, each in its own worktree and branch, and waits. It holds no slot while it waits.

Each child is an ordinary item: you can see, retry, skip, steer, pause or drop it by its own ID. One child failing or needing you doesn't stop the others. max_concurrent_slices in policy.yaml caps how many of one item's children run at once.

The join

When every child has ended, the item takes a slot again and replays each completed child's commits onto its own branch, in slice order. Verification, review and the merge request then run once, on the combined code. A dropped child is left out. If every child was dropped, the item stops.

When the item's library has the task resolve_join_conflict (kraft-default ships one), a conflict goes first to that agent, which replays the slice with the steps you would be given. Kraft goes on only when every commit of the slice is then on the branch. Otherwise it puts the branch back and stops the item for you, with the exact steps.

If Kraft restarts, or you pause the item, while that agent works, the agent gets a fresh turn when the item resumes, unless the slice was already whole on the branch: then Kraft goes on. It gets one such fresh turn. If it is cut short again, the item stops for you with the steps.

Kraft doesn't commit what that agent leaves behind, as it does after other agents. Before it checks the slice, it deletes the files the agent left that git neither tracks nor ignores, such as a .orig, and names them in a join_leftovers_removed event and in the work brief. An uncommitted change to a tracked file is never deleted: it may be part of the resolution, so the item stops for you.

Send the plan back, or drop a slice

If the plan is sent back to the plan node, the slices are filed again as new children, from the plan as it then stands. A rejection after the join is fixed on the combined code by one agent and forks nothing.

A parent whose children were all dropped stops. Rewind it to the plan with kraft item retry ID --path plan, or abandon it. Archiving a parent archives its children with it.

Slices and caps

The dollar and token caps of the item cover the item and all its children together. When they run out, the child whose launch found it spent stops, the item stops with it, and its other children pause.

Raising the parent's cap with kraft item raise-budget raises it for its children and retries the ones it stopped. A time cap that stops the item pauses its children. Pausing the item pauses them, and resuming it wakes the ones it paused.

Copyright © 2026