liveBook · Manning

Regeneration test

As explained in Spec-Driven Development

A regeneration test checks whether regenerating an implementation from the same specification reproduces the same behavior.

A regeneration test checks whether a specification captures enough intent to constrain an agent’s implementation. Discard the implementation and ask the agent to regenerate it from the same specification; changed behavior signals possible underspecification. section 3.5.3

Use the result to improve the specification, not to ratify generated code:

  • If behavior differs, enrich the specification through better dialogue, richer capture, standing construction constraints, and deterministic verification. section 3.5.3

How Spec-Driven Development covers it

How deep it goes
Defines a discard-and-regenerate check, interprets changed behavior as underspecification, and prescribes improving specification fidelity.
Examples
Discards an implementation, regenerates it from the same specification, and checks whether behavior changes.
What it assumes
Assumes a specification guides implementation changes and an agent can regenerate the implementation from it.
What you can do after
Diagnose underspecification by regenerating an implementation from the same specification and checking whether behavior changes.
How it connects
Connects specification fidelity and control authority with spec-first change and deterministic verification.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spec-Driven Development. The section links point to the parts of the book it draws on.