Managing Specification. Not code: A feasibility study of Graph -> Contract -> Code Deployment and Maintenance · Henry Yeung, The Chinese University of Hong Kong · arXiv, December 1, 2026
One author tests managing the spec instead of the code
Yeung turned a 374-rule board game rulebook into a typed graph, generated per-module contracts from it by script with no model tokens, and had separate coder agents write each module from its contract alone. With interface nodes in the graph, cloud coders passed 113 of 116 rule tests. An open-weight model, DeepSeek V4 Flash, passed 103 after a repair loop. The same model working conventionally from the rulebook, without graph or contracts, passed 0 without the interface names and 87 with them. For four rule changes, patching from the contract diff matched a reference solution in all four, using 7k to 22k input tokens against about 126k for uploading all the source, which also matched all four. Regenerating whole modules matched only two and rewrote 800 to 2,100 lines per change.
The paper is careful about scope. Every cell is a single run, the tests come from the same rulebook as the graph, and on a second, smaller test bed the token advantage shrank to about three times with no accuracy gain. It states: "Contract diffs are longer than source diffs, so our claim is that they are logically addressable, not that they are smaller."
Why it matters: For rule-dense code, this is a small worked example of a spec-first change process: a rule change names the modules it touches, and only the contract diff goes to the model. It also shows where that process failed. Regenerating whole modules from the spec was unreliable, and patching was the approach that worked.