Tech4Biz Wiki

Specification completeness and LLM-generated backend code

A controlled six-run study: the same model and prompt, with only the completeness of the input changed.

Paper
Author Yasha Khandelwal
Year 2026
Type Controlled study with evidence pack
DOI 10.5281/zenodo.21853680
Artifacts GitHub

Specification Completeness, Not Model Capability, Determines the Reliability of LLM-Generated Backend Code.

Method

One AI model (Claude Opus 5, through Claude Code) was asked to build the same backend module six times, with the same prompt, a 30-minute budget and a fresh session each time. The only variable was the input: the relevant sections of a real requirements specification, or a completed specification kit.

Results

Run Input Tests passing at stop Invented business decisions
A1 Requirements specification 67 7
A2 Requirements specification 0 8 or more
A3 Requirements specification 0 8 or more
B1 Completed specification kit 81 0
B2 Completed specification kit 57 0
B3 Completed specification kit 104 0

Across eight decision points registered in advance, the three specification runs behaved differently on six, from identical input. The three kit runs behaved identically on all eight, and each refused the one deliberately unresolved question with an explicit error instead of inventing an answer.

Limitations stated by the author

Sources