An evidence-and-approval harness for coding agents
Another take on the agent harness.
Writfold is for people running coding agents on real repositories. Your agent, such as Claude Code or Codex, stays the loop. Writfold sits underneath it: it keeps exact evidence, applies an edit only after a signed approval, in a worktree it owns, and records every step in a ledger.
The problem: agents act on context nobody verified, and leave edits nobody can review or replay. Tuft finds and retains exact evidence, Weft checks the plan, Splicery expresses the edit, and only Writfold applies it, in a Git worktree it owns.
Source-only previewv0.1.0-dev.1 · Rust · local-only · Linux x86_64 and WSL2 · a cooperating single-user trial runs end to end · what runs today
Runs today standalone or in the trialParts tested components exist, not yet connectedPlanned designed, not built
How the pieces fit
Know, conclude, change, record
Writfold does not replace the agent loop or the model. It is the layer the agent goes through for evidence it relies on and for every change it makes to your files. Today all four run together in a cooperating single-user trial.
Know / Tuft + Writfold
Exact, cited evidence
Tuft finds exact text in one pinned commit, and Writfold retains the matched bytes as citations bound by digest. A finding is not a proof, and a citation is not an approval.
Runs (trial)
Conclude / Weft
Check the plan
Weft checks a plan's claims against declared assumptions: each is entailed, refuted or still open. Approval can require named checks to be entailed. Weft's results are recorded as hypothetical and carry no permission to change anything.
Runs today
Change / Splicery + Writfold
Edit only where owned
Splicery expresses a byte-exact edit recipe and previews the candidate. Writfold applies it only in a Git worktree it created, under your signed approval and a current operator grant.
Runs (trial profile)
Record / Writfold
Evidence at every step
Each step is a record in a validated ledger, so a run can be reviewed afterwards and an interrupted apply recovered. Reuse by the next session is planned.
Runs (trial)
One edit, end to end
The six steps
Writfold is the owner: it alone holds the knowledge store and alone changes files. Weft and Splicery only read and propose. Weft and Splicery also run as standalone tools. All six steps run together in the cooperating single-user trial, on any Git repository.
Runs today standalone or in the trialParts tested components exist, not yet connectedPlanned designed, not built
01 / Writfold
Retain exact inputs
Keep the exact bytes of a file at a full commit id, bound as a citation by digest, so later edits cannot rewrite the evidence.
Runs (trial)
02 / Weft
Assess the claims
Check what the declared assumptions actually support: entailed, refuted or still open. A report citing evidence that was not retained is refused.
Runs today
03 / Splicery
Prepare an edit
Describe a byte-exact change and compute a candidate file. The original stays untouched.
Runs today
04 / Writfold
Approve that edit
You sign an approval bound to this exact prepared change, checked against a current operator grant and the context's policy.
Runs (trial)
05 / Writfold
Apply it
Writfold writes the approved change into its own Git worktree, after re-checking the file has not changed.
Runs (trial)
06 / Writfold
Record the outcome
A durable claim before the write and one recorded outcome after it. After an interrupted apply, recover decides the outcome from the file's exact bytes instead of applying the edit twice.
A small query language for exact evidence: find text or a bounded regex in one pinned commit, retain the hits as citations, and project a compact view under a token budget, with explicit omissions.
@h := find text "trial_blob(" in "crates/" at "<sha>";Today: writfold tuft run. Lives in the Writfold repository. Language
A source-only preview: there is no installer or release binary. Linux x86_64 with rustup; the pinned toolchain installs on first build. These are the commands from the Writfold README, at tag v0.1.0-dev.1.
# In a clone of https://github.com/writfold-dev/writfold
cargo build --release -p writfold
# Prepare, approve and apply one edit
export WRITFOLD_STATE=/tmp/writfold-trial
target/release/writfold trial init
target/release/writfold trial prepare --repo /path/to/repo --file src/lib.rs --recipe edit.spl
target/release/writfold trial approve <run>
target/release/writfold trial apply <run>
git -C "$WRITFOLD_STATE/worktrees/<run>" diff
# Find and cite exact evidence with Tuft
printf '@h := find text "trial_blob(" in "crates/" at "%s";\n@e := retain @h around lines 0;\n@v := project @e [path, line, binding, excerpt(max_chars: 72)] limit 6;\nemit @v budget_tokens 300;\n' "$(git rev-parse HEAD)" > q.tuft
target/release/writfold tuft run q.tuft --repo .
Your own checkout is never written: Writfold makes its own sparse worktree of the repository's HEAD, replays a Splicery recipe through the pinned kernel, and installs the result only after a signed approval and a current grant are verified. apply records a durable claim before it touches the file, and writfold trial recover <run> settles an interrupted apply. Splicery's examples/try/ has a recipe for a small Rust file; trial retain and approve --require CHECK are described in the trial profile. Weft and Splicery each have their own Try it: Weft, Splicery.
This is a cooperating single-user trial. It never writes your checkout, but nothing stops an agent's own shell from doing so, and it assumes nobody races it on its worktree. Search is exact text or a bounded regex; semantic and fuzzy search are deferred until the Omnigraph backend exists.
On any Git repository: retain exact evidence (or find it with Tuft), bind a Weft report, prepare a Splicery edit in Writfold's own sparse worktree, approve, apply and recover, every step in a durable, validated ledger. serve exposes show, retain and prepare; approval stays CLI-only. Every trial operation's p95 is under 0.5 s on a 100,000-file repository.
Proved over the shipped Rust: the ledger, grant, revocation, recovery-outcome, required-check and edit-flow decisions, plus Weft's set and verdict decisions and Splicery's edit rendering. How we know
Not yet
The hardened harness
No semantic or fuzzy search and no live knowledge service: Omnigraph is the target backend and Dolt the interim one, which now has a conditional single writer but no publication path yet. Not built either: named contexts, the hardened Worktrunk edit path, and a profile that stops an agent writing your checkout itself. No measured token win yet: in five pilots the Writfold or Tuft arm used between 1.7% and 16% more tokens than ordinary tools at equal correctness.
Next: the new commands over serve, and publication over the Dolt writer.
Writfold is a source-only preview; there is no installer or release binary. The Weft and Splicery pages show two worked examples with their exact source files, the commands that were run, and the results; each records the SHA-256 of the development binary used.