On my current, live commercial project, I ran a small study to measure the ratio of lines across specification, specification-driven tests, and runtime code.
| Lines | ×runtime | |
|---|---|---|
| Spec (including TDD tests) | 60 278 | ×3.72 |
| Runtime | 16 198 | ×1.00 |
| Total | 76 476 | ×4.72 |
In this case, the spec was generated through brainstorming with the obra/superpowers AI framework, and the tests through its TDD skills.
In the end, the actual source files (spec, including TDD tests) come to 60 000 lines; and if you add the runtime code — by now seemingly nominal, “the new assembler” — it comes to 76 000.
The picture keeps coming into sharper focus: the main locus of intellectual effort (as far as line count lets us judge) is becoming the specifications — including the specifying tests, which trace back to TDD. The generated runtime code we barely even look at anymore.