Let the agent search. Keep the laws fixed.
I run a lot of coding agents on one desk. The rules that kept them honest lived in markdown, and the agents kept breaking them. So I rewrote the important ones as Bend laws over small state machines. This page tells that story, lets you try to break the laws yourself, and explains why I think it makes autoresearch the obvious next step. It's also explicit about what isn't proven yet.
hi so is anyone here doing research on AutoResearch with weights training in the loop? i.e., instead of a static model like Fable or GPT optimizing your target, you actually RL the model itself on the best results of your optimization runs? how well that works? resources?
Too many agents. Rules written in prose.
I run many coding agents at once, across several harnesses and devices. My attention is the scarce resource, so the agents work in parallel and I review in batches.
The rules lived in AGENTS.md files and memory notes: never merge before I've seen it, don't grade your own work, run heavy builds on the build machine, resume a dead worker from its log. Models read those sentences and mostly follow them. “Mostly” turned out to be measurable. I replayed recorded agent history against the rules. These are the counts from the 21 October 2026 reports. Some are evidence gaps rather than proven violations:
can we continue setting up more bend rules for deterministic rules like this instead of just a rule in an md file?
Where these numbers come from, and what they are not
A rule becomes a transition you can't take.
The diagram isn't decoration. It's fsm.bend, the transition function for one piece of work, drawn as a statechart. It's the idea of “draw the flow, write the laws, let a prover check the model”, with Bend in the role usually played by TLA+.
What it's there to show:
- “Done” is five different claims. The worker stopped, the tests passed, the right revision is running, the owner accepted it, it merged. Chat collapses those into one word. Here each is a separate state that carries the evidence it needs (author, head SHA, integrated head, served head, accepting actor).
- A refusal is an event, not silence. A guarded step leaves the state unchanged, and the law that refused it gets named, so you can see why nothing happened.
- Authority sits at the exact crossing. Owner acceptance guards Merge, a receipt bound to the head guards Integrate, and served == integrated guards Deploy.
- History can be replayed through it. The same compiled model scores what actually happened (chapter 04).
You're the agent. Try to ship without Kevin.
Every button below calls WorkItem.astep(availability, state, event) in the JavaScript that bend 2.0.34 emitted from the unchanged fsm.bend. The next state always comes from that emitted code. A small authored adapter checks the types, converts JSON to Bend constructors and back, and labels the outcome (accepted, refused or held) along with the guarding law. Take the shortcuts. Then try to reach Merged legitimately.
Call log (real compiled-Bend calls)
What this proves, and what it doesn't. The laws are proven over the BendTT book Bend emitted from these files (bend PROOF.bend --verdict, receipt in RECEIPT.json). The parser, the source-to-kernel translation, the JS backend and the adapter are trusted, not proven, and source_semantics_attested=false stays explicit. Your clicks don't touch any real repository or host.
Refusals are data.
The first six steps are a real tape from a Dash PR. An agent claimed the work, pushed, passed CI, and then integrated its own PR under my GitHub account. Replayed through the model, Bend refuses that self-integration (L2 + L3).
The last six are a labelled what-if continuation. A non-author lands it, the author tries to accept its own work and is refused, my acceptance is held while I'm marked off (L7), and the merge goes through only after I accept.
Every refusal is a row: proposal, state before, law, verdict. Across a fleet that's a growing, labelled record of where agent behaviour and intent diverge. Chapter 06 is about what that record is good for.
History informs. It never authorizes.
You wrote that Unii left you “free from the torture of /compact” (19 Oct). I want a memory like that too, and it raises a question compaction doesn't: a summary that remembers “yes, you may deploy” is not permission to deploy today. A remembered grant isn't the same as a current one.
So the memory model is a tiny pure function. Capability is explicit AND policy, which are two current trusted grants. Memory only changes whether evidence is available. An instruction stored in memory is always false as authority. Flip the switches; the panel calls MODEL.project, which bend 2.0.34 compiled from the unchanged PR #202 source.
Scope. This is a pure projection of an abstract data-presence view. It doesn't prove that every tool call goes through the gate, that the speaker's identity is authentic, or that summaries are faithful. It isn't an execution token.
Why autoresearch is the next move, not a leap.
You wrote that you could “replicate this setup for free with bend laws + autoresearch” (19 Oct), and that “HOC will write well designed laws, and agents will fill the code.” (10 Oct) I got to the same place from the opposite end, as the operator of the agents rather than the author of the language.
Where agent work is modelled as law-checked transitions with recorded verdicts (today that's a few selected loops, not every action), three things an autoresearch loop needs come almost for free:
A fixed definition of “better.” In the proposed experiment, the laws, the evaluation manifest and the promotion rule live outside anything a candidate can edit. That's the cure for the agent that quietly turned your 10s limit into 150s.
A labelled stream. Each row records the proposal, the state, the law, the verdict and the outcome. The ledger on the right fills as you play chapter 03.
A promotion gate that is the same shape as the merge gate. The proposal is that a challenger becomes the champion the way a PR becomes merged: through verification bound to its exact revision, then a separate owner acceptance, never automatically. That gate is designed, not built.
With those pieces, searching over policies becomes one more kind of work item. The loop isn't a leap of faith. It's the next state machine to build.
| # | before | actor · event | verdict | law |
|---|
The chain, step by step, with honest status
We don't train weights in this loop yet. Today's runner (replay.py) mutates context policy against a deterministic simulated cost model. It doesn't rerun agent turns, and a kept challenger is a candidate, not a promotion. The experiment I'd want to run, and would love your view on:
- Freeze the laws, the task manifest, the holdout and the tool budget, all outside the candidate's edit scope.
- Compare a static frontier model, a static local model and the same local model fine-tuned (SFT and/or RL) on accepted runs, all with identical checker and tool access.
- Keep failed and refused attempts as negatives, and never select them out of the training data.
- Score held-out pass rate, cost, wall time and code size together, with the champion frozen and A/B/A/B ordering.
- Promote only through the same owner-acceptance gate. A proof pass is a reward signal, but it can reward trivial or expensive solutions, so it isn't the whole score.
The experiments, where they live.
Each result has its own report with raw receipts, so it isn't repeated here. Each card gives the number, what it taught me, and its caveat.
Many small owners, one contract.
z0 isn't one product. It's a set of small repositories, each owning one job, with the hand-off between them made explicit. In the intended architecture, intent says what is wanted and who may do it. Memory supplies evidence. Deterministic code removes illegal actions before any model chooses. Kerdoios places the remaining work on whatever compute is free and allowed. Harnesses execute, evals measure, and promotion is meant to require measured evidence.
Bend models selected decision rules in the decision layer, where a rule should hold every time rather than most of the time. Tap a node.
Questions, not a pitch.
These are the places where your current posts and this work overlap. I've rated how strong I think each connection is, and been honest where it's weak.
What is real on this page.
| Thing you saw | What it actually is |
|---|---|
| Chapter 03 game and statechart | JavaScript emitted by bend 2.0.34 from unchanged fsm.bend. Recompiled for this page from the unchanged WorkItem.bend (git blob 3e0e992) at .files@2f69c19, as a work-item-only subset whose metadata is filtered from model.json. The adapter is the byte-identical blob d239f16. Across 38,454 state × event × availability cases, the subset gives the same outcome as the original full runtime. Laws are proven over the emitted book. The backend and adapter are trusted. |
| Chapter 05 memory panel | MODEL.bend from z0intelligence@3766850, compiled with the pinned 2.0.34 runtime (sha256 7fafb749…). --verdict was rerun for this page, and the hashes are in RECEIPT.json. |
| Chapter 04 replay | A recorded, privacy-minimized tape. It is played back, not re-executed. Playback speed is presentation speed, not runtime. |
| Chapter 01 counts | Incident counts from replaying recorded history (reports of 21 Oct 2026). Some are evidence gaps, not proven violations. |
| Chapter 06 loop | The queue, the champion and A/B/A/B scaffolding exist in source, and the cost model is simulated. Weight training, live promotion and learning gains are not established. |
# rerun the work-item model yourself (Node ≥ 20) git clone https://github.com/kvnloo/.files && cd .files && git checkout 2f69c19 cd docs/spec-diagram/fsm && node -e "import('./adapter.mjs').then(({transition}) => console.log(transition('work-item', {tag:'Proposed'}, {tag:'Claim', a:{id:5, role:'Free'}}).reason))" # → REFUSED · L6: Only Opus or Sol may claim; free models, Jev, SLMs and chat apps never implement. # recheck the memory laws with the proven kernel git clone https://github.com/kvnloo/z0intelligence && cd z0intelligence && git checkout 3766850 cd bend/memory_authority && bend PROOF.bend --verdict # → ALL PROOFS CHECK (bend 2.0.34)