Two Contracts for Autonomous Code Change (PDF, 21 pages, opens in a new tab)
On post-merge review, machine-authored fixes, and the engineering discipline of refusing to believe yourself
Matt Liotta · Parslee Labs
A closed loop writes code, merges it, then reads its own merges back. Two roles decide whether that is safe: one is not allowed to believe what it is told, the other is not allowed to trust itself.
How it opens
Somewhere in your pipeline there is probably a machine that writes code, or one that reviews it, or one that will do both by the end of the year. The interesting engineering is not in getting the model to produce a patch — that part is nearly free now. It is in everything you build around it so that a patch can be trusted, and so that when it can't be, the system says so out loud instead of quietly shipping.
What is inside
- Part One
The question CI cannot ask
Why a suite written by the author inherits the author's blind spots, and why the trigger is a merge event rather than a person.
- Part Two
The Observer — the contract about epistemics
Read the outcome before the narrative, and never let step two revise step one. Six mechanisms, each a consequence of that contract.
- Part Three
The Improver — the contract about authority
Every capability listed next to the fence around it. Refusal as a first-class outcome, and an oracle the improver cannot edit.
- Part Four
The interlock, and the closing loop
The thing the Improver cannot check about itself is exactly what the Observer reads. If you read nothing else, read this.
- Part Five
The transferable list
Fourteen principles, and three to start on this week. None require our stack.
- post-merge code review
- autonomous code change
- LLM-as-judge self-preference
- reward hacking
- agent sandboxing
- AI code review
ScopeThis describes two roles of a four-role subsystem, as they were built and operated at Rev 1.0. It is a design brief, not an evaluation: there is no benchmark here and no claim that these contracts outperform an alternative. Internal names, file references and vendor specifics are stripped by design — nothing in it requires Parslee tooling to adopt.
Cited work
- Sharma et al. — Towards Understanding Sycophancy in Language Models · ICLR 2024
- Panickssery et al. — LLM Evaluators Recognize and Favor Their Own Generations · NeurIPS 2024
- Smith et al. — Is the Cure Worse Than the Disease? Overfitting in Automated Program Repair · ESEC/FSE 2015
- Baker et al. — Monitoring Reasoning Models for Misbehavior and the Risks of Promoting Obfuscation · 2025
Cite this brief: Two Contracts for Autonomous Code Change
@techreport{parslee-two-contracts-autonomous-code-change,
title = {Two Contracts for Autonomous Code Change},
author = {Matt Liotta},
year = {2026},
month = {August},
institution = {Parslee Labs},
type = {Engineering Design Brief},
note = {Rev 1.0},
url = {https://parslee.ai/briefs/two-contracts-autonomous-code-change.pdf}
}