SmartInfer Lab. Research Note

Protozoa · Early Experiments

Verified Software Generation: The First Protozoa Experiments

SmartInfer Lab

Two case studies GPT‑5.4 Verified outcomes

Abstract

Large language models can write plausible code, but plausible is not the same as correct, and a single generated file is a long way from a working, tested piece of software. Protozoa is a system that treats generation, verification, and iteration as one process: it works from a specification, produces a complete runnable project, checks that project against an automated test suite, and — when a check fails — revises the software under explicit acceptance conditions and verifies it again.

This note reports the first two end‑to‑end experiments run through Protozoa as the platform matures: AI Thread Vault, a local search tool for personal AI chat history, and Pong Arcade, a browser game. Both were generated, tested, and shown to run. The two systems differ deliberately — a command‑line library in Python and an interactive graphical application in TypeScript — so that the results speak to more than a single domain.

The central result is not that a model can emit code. It is that a defect a human noticed while playing the generated game was turned into an explicit regression condition, shown to fail on the flawed version, repaired under that condition, and then shown to pass alongside the full existing test suite. That episode is the clearest early evidence that verification‑guided iteration catches and fixes real problems rather than merely producing more code. Notably, in‑run automatic repair was light — the game's initial build passed all 11 components with zero verification failures, and the hardening phase repaired four — so what these runs demonstrate is verification‑guided iteration under human direction, not dense autonomous self‑correction.

We report verified outcomes for both experiments — committed suite results, the defect‑to‑repair episode, and attempt and verification‑failure counts where the build record was retained — and we are careful to separate what these two runs demonstrate from what the platform is designed to do but did not fully exercise here. Token, cost, and timing figures are deliberately not reported: the early runs did not instrument per‑run model usage reliably, and we do not report numbers we cannot verify. Two experiments do not establish general superiority; they establish a working method and a baseline to improve from.

01Why this matters

The gap in practice is rarely “can a model produce code for this task.” It is the distance between a confident‑looking draft and software you would actually ship: software that builds, that passes tests, that behaves correctly at the edges, and that stays correct when it is changed later. Most of the effort — and most of the risk — lives in that gap.

Protozoa's stance is that verification is not a step that happens after generation; it is part of generation. A generated system is not considered done because it looks complete. It is considered done when it satisfies its checks, and a change is not accepted because it looks reasonable but because it keeps every prior check passing while satisfying a new one. This is an old idea from disciplined software engineering — specify, test, and only then trust — applied to autonomous generation.

The practical consequence is that the output of Protozoa is meant to be evidence‑backed. For each system we can say not only “here is the code” but “here is the specification it was built to, here are the checks it passes, and here is the record of how it got there.” The two experiments below are the first tests of whether that method produces real, working software across genuinely different kinds of program.

02What Protozoa does

At a capability level, and independent of how it is implemented, Protozoa can:

The rest of this note reports what happened when this capability set was applied to two concrete systems.

03Experimental setup

We selected two target systems that stress different parts of the method:

For each experiment we report verified outcomes: whether the software builds and its tests pass; for the game, whether it runs and is playable in a browser; the specific defect‑to‑repair episode where one occurred; and, where the build record was retained, the number of attempts and verification failures. We deliberately do not report token, cost, cache, or timing figures for these runs — see the note on measurement at the end of this report.

Both reported experiments used GPT‑5.4; model‑tier routing was not evaluated here.

04Experiment 1 — AI Thread Vault

What it is. A local, offline search vault for AI conversation history. It reads the export files that chat tools produce, normalizes them into a common thread‑and‑message model, stores them in SQLite with a full‑text index, and lets the user search, read, export, and count conversations from the command line. Nothing leaves the machine; the tool never calls an AI service.

What was produced. Protozoa generated the full project — roughly 555 lines of Python across 12 files, including the importers, the storage layer, the search query, and the command‑line interface — together with an acceptance suite of five end‑to‑end tests.

Verification. The five acceptance tests each drive the real command‑line interface with small fixtures under a blocked network, exercising the genuine import‑to‑search round trip rather than mocking it: JSONL import and search, Markdown import and search, statistics after import, role fidelity (the assistant role must not collapse onto the user role), and Gemini import and search. The generated system passes all five. The per‑attempt trace for this run was not retained, so we do not report an attempts‑to‑pass count for it.

Iteration. Two capabilities were added after the initial generation, each introduced by first writing a failing acceptance test and then producing the code that makes it pass: a Gemini importer (mapping Gemini's export roles into the common model) and a fidelity fix for a case where an earlier version collapsed the assistant role onto the user role. Both are covered by the committed test suite.

AI Thread Vault is the more sequential of the two systems and served as a first proof that the method produces a coherent, testable, multi‑format tool end to end.

05Experiment 2 — Pong Arcade, and the side‑wall episode

What it is. A colorful browser Pong with a deterministic game core. The player faces a fallible computer opponent by default, with a local two‑player mode available. The rules — serving, paddle movement, ball physics, collisions, scoring, win conditions, and three opponent difficulty levels — live in a core that is deterministic for a given seed and is unit‑tested in isolation, separate from the rendering and input layers.

What was produced. Protozoa generated the full game — roughly 744 lines of TypeScript across five modules — plus a regression test suite of 21 tests encoding the game's rules. The initial build passed cleanly: 11 components, 11 attempts, zero verification failures — every part passed its checks on the first attempt. The production build succeeds, the test suite passes, and the game runs and is playable in Google Chrome.

Pong was not produced in a single shot. Like real software, it took three distinct passes: the initial generation, a hardening phase, and — days later — a separate pass to fix a specific defect. That third pass is the heart of this note.

Hardening. The hardening phase made three concrete, test-encoded changes: paddle returns impart spin from paddle motion, with the impact offset on the paddle controlling the return angle and a small speed-up per return; the opponent became fallible and difficulty-ordered, its reaction lag, aim error, and paddle speed scaling deterministically with the selected level; and serves vary in angle and starting height in a seed-reproducible way. Across the hardening iterations, 4 verification failures were repaired — all in ball physics, the same behavioral surface where the human-reported side-wall defect later appeared.

The defect. While playing the generated game, a human noticed that on steep returns the ball would collapse toward the side wall and rattle rather than bouncing cleanly back into play. This is exactly the kind of behavioral bug that looks fine in the code and only appears in motion.

The regression condition. Rather than eyeball a fix, the feedback was turned into an explicit, measurable condition: after every paddle return, the ball's horizontal speed must stay at least half of its total speed — meaning the return can never deflect so steeply that the ball crawls down the wall. This condition was written as a test that sweeps returns across the whole face of the paddle.

The side‑wall regression · worst‑case horizontal‑speed ratio

Before repair (v0.2)

0.481

✗ fails — below the 0.5 floor

After repair (v0.3)

0.500

✓ passes — at the floor

The regression condition requires every paddle return to keep at least half of the ball's speed horizontal. It fails on the flawed version and passes on the repair, while the full existing test suite stays green.

Failure on the flawed version. Run against the pre‑fix version, the condition fails: the worst‑case horizontal‑speed ratio measured 0.481, below the 0.5 floor. The regression condition genuinely reproduces the reported defect.

Bounded repair. Protozoa then repaired the collision behavior under that condition — capping the return angle so the ball always makes real horizontal progress — while every one of the game's existing checks had to keep passing.

Verified result. On the repaired version, the same condition passes: the worst‑case ratio measures 0.500, exactly at the floor, and the full existing test suite remains green. The defect metric moved from 0.481 to 0.500, the game still builds, and it still plays in the browser.

A defect a person felt while playing became a precise condition, that condition was shown to fail on the broken software, a bounded change was made under it, and the software was then shown to satisfy both the new condition and everything it already guaranteed. The verification carried the correctness, not a hopeful edit.

06Results and analysis

Verified outcomes
AI Thread VaultPong Arcade
DomainPython CLI + full‑text searchTypeScript / Canvas browser game
Size~555 lines, 12 files~744 lines, 5 modules
Verification5/5 acceptance tests pass21/21 tests pass; build passes; runs in Chrome
Attempts / verification failuresper‑run trace not retainedinitial build: 11 attempts, 0 failures; hardening: 4 failures repaired
ModelGPT‑5.4GPT‑5.4
Iteration2 capabilities added test‑firstgenerate → harden → patch; repair 0.481 → 0.500

What the numbers show

Both systems verify. The generated software builds and passes its automated checks in both experiments, and the game additionally runs and is playable in a browser. Verification is not decorative here; the side‑wall episode shows it failing on a real defect and then passing on the repair.

Where the iteration actually happened. In‑run automatic repair was light: Pong's initial build passed with zero verification failures, and the hardening phase repaired four. Most iteration was human‑in‑the‑loop — re‑running hardening passes and reporting the side‑wall defect — followed by bounded, verified repair. We report this plainly rather than implying a dense autonomous repair loop the traces do not show; on these two builds, the verification machinery's value was catching and encoding human‑observed defects, not rescuing failing generations.

Scaling. Protozoa can execute independent work concurrently, although these two experiments were substantially dependency‑bound — the work formed mostly sequential chains, so the available concurrency was largely untapped. Where future builds parallelize, wall‑clock time can be reduced by adding compute.

Cross‑domain. The method produced coherent, verified software in two quite different settings — a data‑and‑search command‑line tool and a real‑time graphical game — which is more informative than two variations on one kind of program.

07What these early experiments suggest

Taken together, and stated as capabilities the platform exhibits rather than as general guarantees, the experiments suggest that Protozoa can:

We describe the repair behavior as verification‑guided repair under explicit gates, not as fully autonomous self‑repair: the defect was reported by a person, and the repair succeeded because it was constrained by an explicit condition and the existing suite.

08Limitations

These are early results and should be read as such.

09Where this is going

Several directions follow naturally, and we state them as intent and planned evaluation rather than as claims about these two runs:

10Reproducibility and notes

The two generated systems are public:

Each repository contains the committed code and test suites behind the figures cited above. The verification claims — that the tests pass, that the game builds and runs in Chrome, and the before‑and‑after measurement of the side‑wall regression (0.481 → 0.500) — are reproducible from those repositories.

A note on measurement. Token, cost, cache, and timing figures are deliberately omitted from this note. The early runs did not instrument per‑run model usage reliably, and we do not report numbers we cannot verify from the committed repositories and retained build records. Where a build record was not retained — the Vault run's per‑attempt trace — we say so rather than estimating. Complete, auditable per‑run evidence capture is ongoing work.