Agents write. Strust verifies.
Strust runs existing software and its AI-written replacement in paired execution, then keeps the first changed behavior as evidence.
At Branch B-17, the reference returns SKIP_WRITE while the candidate returns WRITE_FALLBACK. Strust returns MATCH / DIVERGE / INCONCLUSIVE against the declared contract.
- Reference
- SKIP_WRITE
- Candidate
- WRITE_FALLBACK
The contract stays fixed while the code changes.
Strust runs existing software and its AI-written replacement against one approved behavioral boundary.
The writer cannot grade its own rewrite.
Candidate generation stays separate from the reference, comparison policy, and evidence history.
- Writer owns
- Candidate code
- Verifier owns
- Truth boundary
- Reviewer gets
- Finding and evidence
- Verifier
Pin the contract
Approve the reference, inputs, runtime assumptions, observations, and comparison policy.
- Runner
Execute the pair
Run the existing system and candidate rewrite under the same declared conditions.
- Comparator
Find the origin
Stop at the earliest contract-relevant difference, before downstream effects obscure it.
- Evidence store
Retain the evidence
Return a replayable finding to the coding agent and a reviewable decision to the owner.
One changed decision. Two useful views.
Agent view isolates the next patch. Reviewer view translates the evidence into impact and a human decision.
This controlled example illustrates the intended loop; the paper states which arithmetic is reproducible and which historical execution artifacts are unavailable.
First divergence: Branch action
Batch branch B-17 / null-account path
Cause isolated. Patch the changed branch and rerun.
IF ACCOUNT-ID = SPACES
NEXT SENTENCE
ELSE PERFORM WRITE-CLAIM
END-IF
if (accountId == null) {
writeFallback(claim);
} else { writeClaim(claim); }
batch.advance();
- NULLAccount inputNULLEQUIVALENT
- TRUEGuard B-17TRUEEQUIVALENT
- SKIP_WRITEBranch actionWRITE_FALLBACKORIGIN
- 0Rows emitted1CHANGED
- UNCHANGEDBatch countINCREMENTEDCHANGED
The first changed decision is Branch action: the source returns SKIP_WRITE while Java calls writeFallback.
Compilation can pass while behavior moves.
COBOL is the first executable reference. Fixed-width data and runtime assumptions make it an unforgiving test lane.
The literal is padded to the field width. The branch matches.
The value is compared with a shorter string. The branch changes.
Field width is behavior.
- Reference
- PRIORITY
- Candidate
- Branch skipped
- Capture source behavior as the approved reference
- Compare only contract-relevant observations
- Keep accepted cases for every later change
Open evaluation protocol
A benchmark for behavior, not syntax.
SemaMig-Bench runs held-out workloads against the executable source and native Java candidate. Contract-relevant observations agree, or the task does not pass.
Read benchmark PDF- Task unit
- Paired execution
- Pass condition
- Behavioral agreement
- Evidence
- Reviewable finding
COBOL reference and native Java candidate
Declared observations match under the contract
Per-task verdict, comparison output, and failure context
Bring the rewrite you cannot afford to get wrong.
Tell us what is changing and what behavior must stay the same.