Expand description
Shared save primitive for capture / commit / checkpoint / ready auto-capture.
CLI verbs become thin shells that build a SavePlan and call
execute_save. Repo keeps atomic tree/state mutation; this module owns
the composition of preflight-adjacent routing, Heddle snapshot, and
optional Git-overlay write-through.
Structs§
- Capture
Agent Report - Capture
Attribution - Attribution resolved lazily after capture’s non-mutating safety checks.
- Capture
Diagnostics - Capture
Options - Fully-resolved inputs for the normal local capture operation.
- Capture
Principal Report - Capture
Profile - Capture-specific timings owned by the operation implementation.
- Capture
Report - Final semantic report returned by the capture seam.
- Commit
GitIndex Plan - Pure commit index plan for internal Git projection writes.
- Save
Plan - Inputs for
execute_save. Attribution is resolved by the caller so CLI env/harness/agent precedence stays at the embedding surface. - Save
Report - Result of a successful save.
Enums§
- GitScope
- How far a save should write through into Git (Git-overlay only).
- Save
Verb - Public CLI / facade verb that requested the save.
Functions§
- capture
- Capture the current worktree as one synchronous local operation.
- commit_
next_ action_ from_ trust - Next-action after a git-projection commit from verification facts only.
- commit_
scope_ text - Human scope line for git-projection commit text mode.
- complete_
current_ thread_ manual_ resolution - Complete a captured manual resolution and return its contextual land action.
- execute_
save - Execute a save: optional Heddle snapshot + optional Git checkpoint write-through.
- plan_
commit_ git_ index - Plan commit scope from staged + extra worktree paths and
--all. - plan_
commit_ git_ index_ only - Index-only plan: commit staged paths, preserve all extras.
- plan_
creates_ new_ state - Whether this plan should create a new Heddle state (vs reusing HEAD).
- plan_
git_ scope - Pure routing helper: which Git write-through scope a verb should use.
- plan_
writes_ git_ checkpoint - Whether this plan should perform a Git-overlay write-through.
- recover_
published_ git_ checkpoint - Finish the metadata/oplog half of a checkpoint whose Git ref was already
published before a crash. Returns
Nonewhen no matching published intent exists, so callers can continue with their own recovery policy. - split_
git_ extra_ paths - Split
unstaged:/untracked:prefixed extra paths from status rows. - staged_
commit_ summary - Annotate a commit summary when staged-only commit leaves extras behind.
- tree_
leaf_ name - Leaf path component for Git index → Heddle tree entry names.