# Skeleton Coding: Program Structure as a Specification for Agents

arXiv: https://arxiv.org/abs/2610.38214 · HTML: https://mlsanity.com/paper/2610.38214/

## Key facts

- No citing papers in the map yet (data through 24 Nov 2026).
- Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use.
- Builds on 22 of its 51 references that are in the map.
- Submitted 28 Oct 2026.

## Placed in

- LLM agents and tool use / [Software engineering coding agents](https://mlsanity.com/agents/software-engineering-coding-agents/)

## Builds on (most cited first, 22 of 22)

- [MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework](https://mlsanity.com/paper/2308.00352/) (2023)
- [CodeT: Code Generation with Generated Tests](https://mlsanity.com/paper/2207.10397/) (2022)
- [Synchromesh: Reliable code generation from pre-trained language models](https://mlsanity.com/paper/2201.11227/) (2022)
- [CodePlan: Repository-level Coding using LLMs and Planning](https://mlsanity.com/paper/2309.12499/) (2023)
- [Self-planning Code Generation with Large Language Models](https://mlsanity.com/paper/2303.06689/) (2023)
- [SpecRover: Code Intent Extraction via LLMs](https://mlsanity.com/paper/2408.02232/) (2024)
- [ProgramBench: Can Language Models Rebuild Programs From Scratch?](https://mlsanity.com/paper/2605.03546/) (2026)
- [Clover: Closed-Loop Verifiable Code Generation](https://mlsanity.com/paper/2310.17807/) (2023)
- [Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?](https://mlsanity.com/paper/2310.01831/) (2023)
- [Parsel: Algorithmic Reasoning with Language Models by Composing Decompositions](https://mlsanity.com/paper/2212.10561/) (2022)
- [Is In-Context Learning in Large Language Models Bayesian? A Martingale Perspective](https://mlsanity.com/paper/2406.00793/) (2024)
- [Verus: Verifying Rust Programs using Linear Ghost Types (extended version)](https://mlsanity.com/paper/2303.05491/) (2023)
- [AutoVerus: Automated Proof Generation for Rust Code](https://mlsanity.com/paper/2409.13082/) (2024)
- [Interactive Code Generation via Test-Driven User-Intent Formalization](https://mlsanity.com/paper/2208.05950/) (2022)
- [LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluation](https://mlsanity.com/paper/2404.10100/) (2024)
- [AlphaVerus: Bootstrapping Formally Verified Code Generation through Self-Improving Translation and Treefinement](https://mlsanity.com/paper/2412.06176/) (2024)
- [SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks](https://mlsanity.com/paper/2603.24755/) (2026)
- [A benchmark for vericoding: formally verified program synthesis](https://mlsanity.com/paper/2509.22908/) (2025)
- [RPG: A Repository Planning Graph for Unified and Scalable Codebase Generation](https://mlsanity.com/paper/2509.16198/) (2025)
- [The Teaching Dimension of Linear Learners](https://mlsanity.com/paper/1512.02181/) (2015)
- [SpecFirst: Behavioral Specification Elicitation as a First-Class Step in Agent-Based Program Synthesis from Scratch](https://mlsanity.com/paper/2607.27167/) (2026)
- [Design Docs Are All You Need: An AI-native Machine-Learning Performance Tool](https://mlsanity.com/paper/2609.05364/) (2026)

## Abstract (arXiv)

Coding agents are typically provided end-to-end behavioral specifications that the code they produce should satisfy, such as tests and input-output examples. How many such specifications must users provide, and which ones, for the agent to implement a program that fulfills their intent? We argue that this cannot be determined a priori, because it depends on the structure of the implementation, which is left to the agent to decide. An agent first commits to a structure - that is, a decomposition into data types, modules, and functions - which fixes a class of candidate programs; behavioral specifications then select a program within that class. A set of tests that suffices for one structure may leave another underdetermined, requiring different edge cases or exponentially more examples. Since the structure is chosen by the agent, users cannot ensure their specification is complete without reverse-engineering such structure from thousands of lines of generated code. To address this issue, we introduce Skeleton Coding, a process in which humans jointly specify the structure in high-level, code-like format, alongside behavioral specifications for the desired outcome. Theoretically, we model AI-assisted coding as a control problem, and show that skeletons can reduce exponentially the number of tests users must supply to steer an agent toward an acceptable program. Empirically, across four models and three benchmarks, the best-performing skeleton specifications reduce mean test error by 48.4% relative to the best end-to-end behavioral specifications. Even when the agent can query a complete reference implementation, adding a skeleton reduces mean test error relatively by up to 27%. Skeletons also narrow the average gap between small and large models by about 52.4% while lowering implementation cost by 15-26x, and reduce code erosion by 24.7% on average.
