Expand description
Isolation and checkpoints.
speccoder works in a git worktree on speccoder/<feature> under its own
state directory, so the user’s checkout is never touched. A checkpoint is a
git tree object of the whole working tree (tracked and untracked, not
ignored), written through a temporary index: HEAD, the index and refs never
move. Restoring a checkpoint rewrites only the paths that differ.
Structs§
- Artifacts
- Spec Kit paths a worktree must contain.
- Change
- One changed path (repository-relative).
- Checkpoint
- A snapshot of a working tree: a git tree object id.
- Refusal
- Why speccoder will not work in a worktree here.
- Worktree
- A worktree speccoder works in.
Enums§
- Change
Kind - What happened to a path between two checkpoints.
Functions§
- checkpoint
- Snapshots the working tree of
dir.tmpholds the temporary index (inside speccoder’s state directory). - diff
- Paths that differ from
fromtoto. - ensure_
lane - A fresh lane worktree for
laneoffeature, started atstart(the feature branch’s tip). A lane left behind is replaced: lanes are speccoder’s scratch space; their work reaches the feature branch only by merging. - ensure_
worktree - Creates or reuses the worktree for
feature. - files
- Every file path in a checkpoint.
- lane_
branch - The branch of a lane: one task of
featurerun in parallel. - patch
- The textual diff between two checkpoints, without context lines.
- project_
state_ dir - A project’s directory under the state dir: per git repository when the project is in one (shared by its worktrees), else per canonical path.
- remove_
lane - Removes
lane’s worktree and branch, if there are any. - repo_
state_ dir - A repository’s directory under the state dir, keyed by its canonical common git directory (shared by all of its worktrees).
- require_
clean - Refuses when the working tree has any uncommitted change (for in-place mode).
- restore
- Makes the working tree of
direqual totarget: differing paths are rewritten from the checkpoint, paths the checkpoint lacks are removed. HEAD, the index and refs are not touched. Returns what changed. - state_
dir - speccoder’s state directory:
$SPECCODER_STATE_DIR, else$XDG_STATE_HOME/speccoder, else~/.local/state/speccoder.