Skip to main content

Module in_place

Module in_place 

Source
Expand description

In-place runs: speccoder run --in-place works on speccoder/<feature> in the person’s own checkout instead of a separate worktree — the way to run features whose spec git ignores (a worktree holds only commits).

What the worktree gave, replaced:

  • a clean checkout before the run, and the person’s branch never touched: the run switches to speccoder/<feature> and back;
  • an intent the run cannot read differently later: every intent, judge and context file — git-ignored ones included — is hashed when the run starts (the manifest) and re-checked before every task and every tick; only the engine’s own one-byte tick and convergence append change it;
  • a checkout nobody else changes: HEAD, the branch and a clean tree are re-checked before every task and tick (the checkout guard).

Evidence is committed before the tick: a gitignored tasks.md is never in a commit, so its tick is local, and the commit says so (Tick: local).

Structs§

Committed
What committing a task in place did.
InPlaceError
Why an in-place run refuses or stops.
Session
An in-place run in progress: written before the checkout is switched, removed after it is switched back.

Enums§

Original
The branch the person was on.

Constants§

FILE
The session record in a project’s state directory.

Functions§

diff
The paths that differ between two manifests, with how.
intent_digest
SHA-256 over the intent files except the task lists (files named tasks_file, whose task lines the commits pin one by one with Task-Line:): what the verdict commits name (Intent-Digest:), so a later reader can tell the spec, plan or constitution changed — not a tick or a convergence round.
is_tick
Whether after is before with exactly one byte changed, from a space to x/X (the engine’s tick).
manifest
The manifest of project: every intent, judge and context file, ignored ones included, minus runtime state.
return_checkout
run --in-place --return: saves what an interrupted run left, switches back to the person’s branch, removes the record. No model call.
return_in_place
run --in-place --return for the project at path, with the state in state.
session_at
The project’s in-place session, if one is open or was left by a run that died: what status and the TUI show.
session_elsewhere
A worktree-mode run of a feature that an in-place session holds: the branch is checked out in the person’s checkout, so it is refused.