Choosing the First Architecture by Its Future: Probe-Based Skeleton Selection for Multi-Checkpoint Coding Agents

When a coding agent must build a program and then keep extending it as requirements change, the first architecture it writes decides much of what follows. SlopCodeBench makes the damage visible. The benchmark gives agents a sequence of evolving command-line and API contracts and asks them to extend their own code at each step. The best agents pass only about 14.8% of checkpoints. Structural erosion grows in 77% of trajectories and verbosity in 75.5%, and asking the model to "write clean code" does not stop the decline. We read this as a cold-start failure more than a refinement failure. The agent commits to one structure from a blank page, and every later repair loop then patches around that choice.

Research on creative cold starts in human-computer interaction points to a different way to begin. People freeze when asked to generate from nothing, but they do well when they can recognize and critique candidates. Found-object browsing (Experiments in Objet Trouvé Browsing), preference-guided exploration with branching history (FontCraft), and editable code skeletons (ChatScratch) all replace "generate the right thing" with "pick well among several things." We propose to give autonomous agents the same move. At the first checkpoint the agent writes several structurally different skeletons. It then chooses among them by how cheaply each absorbs a set of self-generated hypothetical future requirements, rather than by how well each passes today's tests.

Core Claim

The claim is that the right selection signal at the cold start is extension cost under plausible change, and that selecting on it reduces erosion and raises checkpoint pass rate on SlopCodeBench more than three alternatives given the same token budget: selecting on current tests, selecting on static code-quality metrics, or refactoring between checkpoints.

Concretely, from the first specification alone, the agent drafts $K$ skeletons. These are module layouts, core data types, and function signatures with thin implementations. It also drafts $M$ "probe" requirements, which are plausible next features written only from the first specification. For each skeleton $s$ and probe $p$, a cheap sub-agent tries to implement $p$ on top of $s$. We record whether the result passes the current tests, the diff size $\Delta(s,p)$ in changed lines, and the number of files touched. The agent keeps the skeleton with the smallest mean extension cost among those that pass the current tests. It also keeps the runner-up as a retractable branch, borrowing FontCraft's idea of a history the user can return to. If a real later checkpoint forces an extension on the chosen skeleton whose diff exceeds a threshold, the agent re-scores the branch and may switch to it.

The new element is using simulated futures as the selection criterion for initial structure. Nothing in the file does this. SlopCodeBench measures erosion but proposes no remedy. The evolutionary tree search in A2DEPT keeps populations of programs but scores them on present objective value for a fixed task. That paper's documented "partial migration" failure, where a data-structure change in one function breaks the functions that call it, is exactly the cross-module cost our probes are meant to expose early.

Research Program

The work has three parts.

Skeleton generation for diversity. Skeletons are generated under explicit structural constraints, for example "state held in one central object" versus "a pipeline of pure functions" versus "a plugin registry." We do this because sampling at temperature tends to produce near-duplicates. This choice follows the fixation result in Formulating or Fixating, which found that list-style presentation of examples leads people into shallow hill-climbing. We measure skeleton diversity by the overlap of their module graphs and report it.

Probe generation, with a guard against leakage. Probes are written without any access to later checkpoints. We then measure their semantic overlap with the true future checkpoints, so we can report how much of any gain depends on the probes actually anticipating the real future.

Selection and branching. The selection rule scores skeletons by extension cost, and the branch-switching rule described above handles checkpoints where the chosen skeleton turns out to fit badly.

The whole method is a wrapper around an existing agent scaffold. The inner edit, test, and repair loop is left unchanged, so any effect can be attributed to the initial structure and the branching.

Baselines

Unmodified agent. The naive reference point is the same agent scaffold and model run on SlopCodeBench as-is. The strongest reported number on this benchmark in the file is the SlopCodeBench authors' best agent at about 14.8% checkpoint pass rate, with erosion rising in 77% of trajectories (SlopCodeBench). We will re-run our own base agent rather than compare against that figure directly, because models and scaffolds differ.

Quality-aware prompting plus upfront planning. The existing prompting remedy is SlopCodeBench's quality-aware prompting, extended with an explicit "design the architecture before coding" instruction. The file reports that this remedy reduced initial verbosity but did not prevent erosion and slightly lowered correctness. No numerical value for it was found on Lacuna, so we re-run it ourselves.

Best-of-$K$ on current signals. This is the strongest competitor and the ablation that isolates our key ingredient. It uses the same $K$ skeletons, but selects by current-checkpoint test pass rate or by SlopCodeBench's own erosion and verbosity metrics computed on the skeleton itself. It spends the saved probe budget on extra repair rounds. If probe-based selection does not beat this, then diversity alone explains any gain.

Between-checkpoint refactoring. A dedicated refactor pass runs after each checkpoint, with the budget matched to our probe cost. No reported result for this was found on Lacuna.

Fairness and the success bar. Every condition uses the same model, the same 36 problems and 196 checkpoints, at least five seeds, and the same total token budget including probe cost. Tuning for $K$, $M$, and the switching threshold is done only on a held-out split of problems. Beating a baseline means a higher mean checkpoint pass rate together with lower final erosion, under a paired test across problems, at equal tokens.

Why not just…?

Why not just prompt the agent to plan a clean architecture first? SlopCodeBench already reports that quality-aware prompting fails to stop erosion. CodeTransOcean finds that chain-of-thought can hurt global structure in code, because models reason line by line. A single upfront plan still commits to one structure from a blank page. The planning baseline tests this directly.

Why not just take best-of-$K$ skeletons scored by tests or lint metrics? This is the real threat, since diversity alone might explain most of the effect. The matched best-of-$K$ ablation settles it. Our hypothesis predicts that current-signal scores correlate weakly with erosion at later checkpoints, while probe extension cost correlates strongly. We will report both correlations.

Why not just refactor between checkpoints or add more repair rounds? Evidence from the file says more iterations plateau. Self-debugging on CodeTransOcean went from 48.57% to 52.57% over three rounds, and VERINA reached only about 20% proof success after 64 rounds. Refactoring is still a plausible remedy. If it matches our method at equal cost, we will report that, and we will test the combination, since the two approaches are complementary rather than exclusive.

Proposed Experiments

Main comparison. The main table compares checkpoint pass rate, final erosion, and verbosity growth per checkpoint across all conditions. We report these for two model strengths, to see whether the effect shrinks for stronger models.

Decisive check on the mechanism. We replace the self-generated probes with three alternatives. The first is random unrelated feature requests, which should remove the benefit. The second is oracle probes paraphrased from the true next checkpoints, which gives an upper bound. The third is the self-generated probes themselves, with their measured overlap with the real future reported. If random probes perform as well as self-generated ones, the method reduces to diversity plus extra compute, and the claim fails.

Test of the branching rule. We turn off switching to the retained runner-up skeleton and measure how often switching happens and whether it pays off after the switch.

Transfer. A small test on A2DEPT-style full-system algorithm evolution checks whether probe-selected data structures reduce the partial-migration type errors that paper reports.