Spec-driven development: Reproduce a project from specs alone

Claude Code recreated archlint in 20 minutes using only specifications

Ran an experiment: can you reproduce a project if you give AI only specifications without source code?

Setup

  • Original project: archlint - a Go architecture analysis tool
  • Input: 10 specifications (Markdown + PlantUML), totaling 73 KB.
  • Claude Code received an empty directory and specs
  • Executor: Claude Code, started in an empty directory and implemented the project from scratch.

Specs covered all the basics: module init, Makefile, data model, Go-analyzer, Cobra CLI, collect/trace commands, tracer library, tracelint, and integration tests.

Time

~20 minutes from empty directory to working project.

Results

Final assessment of the cloned repository:

  • Structural identity: 100%
  • Cloning success: 85.5%
  • Semantic equivalence: ~75%
  • Mutations: 23 (3 critical, 8 medium, 12 minor)

Interesting detail: the clone turned out shorter than the original - 1,845 lines of Go vs 2,159 (-14.5%) with the same number of .go files (13).

Mutations that actually matter

Three “critical” mutations - exactly the places where the specification leaves room for interpretation (i.e., for creativity you didn’t order):

  1. Sequence diagram building: changed the algorithm for forming calls in the diagram (logic for call stack and write conditions).
  2. Tracerlint: clone considers deprecated Exit() call acceptable, while the original does not.
  3. GoAnalyzer: added baseDir and modulePath fields - AI “improved” the model because the specs didn’t explicitly define the analyzer’s responsibility boundary (what to store inside, what to compute outside).

Takeaway

  1. Spec-driven development works as a mechanism for reproducing the “functional core”. 73 KB of specifications was enough to quickly restore structure and core functionality.
  2. Critical deviations occur where the specification describes “what should be” but doesn’t define “how to verify it”. For such places you need:
    • precise rules (invariants),
    • input/output examples,
    • golden tests (byte-by-byte/structural comparison),
    • prohibition on “model extension” without an explicit spec item.

In short: AI can clone a project from specs quickly. But if there’s a gap in the specs - it will definitely squeeze in some “engineering optimization”. Sometimes useful. In critical places - usually not.

Clone repository: mshogin/archlint-reproduction

Built with Hugo
Theme Stack designed by Jimmy