RREWORK
← All frameworks
Innovation

Prototype, Validate, Then Rebuild

Use AI to prove the idea quickly, then earn production quality through review.

Difficulty
Moderate
Time to result
~weeks to results
Steps
6
Confidence
98%

This framework separates discovering the right product from producing the right code. A designer or product manager first uses AI without excessive restraint to create a functioning prototype on an isolated branch, deploy it to a beta environment, and test the actual interaction with real or realistic data. Once stakeholders confirm that the product idea works, the implementation passes through an explicit production gate. A senior developer evaluates its architecture, security, performance, and maintainability without treating the generated code as precious. They may approve it, refactor it, or throw it away while retaining the validated design, HTML, and CSS. This preserves AI’s speed during discovery while preventing prototype shortcuts from becoming permanent technical debt.

Origin

Extracted from REWORK, where David Heinemeier Hansson described the production rule developed while building Basecamp 5 with AI-assisted designers and programmers.

Core principles

  • 01Treat generated code as an expendable prototype.
  • 02Validate the experience before optimizing the implementation.
  • 03Never equate working software with production-ready software.
  • 04Use experienced reviewers to protect architecture, security, and performance.
  • 05Preserve the validated idea even when discarding its code.

How to run it

  1. 1

    Make the idea work

    Use AI to create a functioning version of the proposed feature without prematurely optimizing its internal implementation. Keep the work isolated from production.

    Pro tip Focus prompts on proving the user experience and solving the intended problem.

    Watch out Do not interpret successful execution as evidence that the code is safe or maintainable.

  2. 2

    Put it on a beta

    Run the prototype on a branch and deploy it where stakeholders can interact with it using realistic data and workflows.

    Pro tip Test the real flow rather than relying on static mockups or screenshots.

    Watch out Keep prototype access controlled if the implementation has not received security review.

  3. 3

    Validate the product concept

    Show the working feature to product leaders and a broader group of internal users. Decide whether the interaction, scope, and design are genuinely worth retaining.

    Pro tip Capture what users value independently from how the prototype happened to implement it.

    Watch out Do not polish code for an idea that has not yet survived experiential validation.

  4. 4

    Apply the production gate

    Have a senior programmer review changes to production languages such as Ruby and JavaScript. Evaluate performance, security, architectural fit, and future maintainability.

    Pro tip Invite the reviewer to assess the implementation from first principles rather than merely correcting visible defects.

    Watch out A feature that works can still puncture the architecture or fail under real production data.

  5. 5

    Rewrite without attachment

    Discard any generated implementation that fails the production gate, while preserving the validated concept and usable presentation layers. Build a production-quality implementation around what was learned.

    Pro tip Start a clean AI session or rewrite manually when incremental repair enters a prompt loop.

    Watch out Trying to rescue every generated line can cost more than rebuilding the feature cleanly.

  6. 6

    Merge the reviewed version

    Integrate only after the replacement or revised implementation meets normal engineering standards. Treat the rapid prototype as discovery work, not as the default merge candidate.

    Pro tip Verify the final version with tests and representative production data.

    Watch out Retrofitting quality after merging is usually harder than enforcing it before the merge.

In the wild

Basecamp 5 designer-led feature development

Designers used AI to make features work, deployed them to beta servers, and tested them with company stakeholders. When generated Ruby or JavaScript threatened performance, security, or architecture, senior programmers could discard that implementation while retaining the proven concept, HTML, and CSS.

→ The team reached validated designs faster without accepting every generated implementation into the production codebase.

AI-assisted customer workflow prototype

A product manager prompts a working customer-approval flow on a branch and lets support staff test it with synthetic accounts. Reviewers approve the interaction but find repeated database queries and weak authorization checks, so an experienced engineer rebuilds the backend while preserving the interface.

→ The team ships a validated workflow without carrying prototype security and performance defects into production.

Common mistakes

Merging because it works

A working prototype may still destroy performance, violate security boundaries, or create incoherent architecture. Functional output is only the validation artifact, not the production-quality verdict.

Becoming attached to generated code

Treating token-generated code like carefully handcrafted work encourages teams to rescue bad implementations. Preserve the learning and discard the residue when rebuilding is cleaner.

Repairing an endless prompt loop

Repeatedly asking AI to fix one regression while creating several others can become more expensive and less reliable than restarting from a sound design.

Is it for you?

Best for

It is best for teams using AI to let designers, product managers, or junior developers explore features rapidly.

Not ideal for

It is not ideal for trivial, well-understood changes already implemented directly by an experienced developer.

From the transcript

“Whatever you need to do, just make it work, run it on a branch, get it on a beta, show it to Jason, show it…”

David · 07:05

“You cannot just take that output and then shove it straight into the code base and then expect that always going to be well.”

David · 07:05

“What the AI has produced works, but it would destroy performance, it would puncture the architecture, it would have security issues or any of the…”

David · 07:51

From the episode

AI Challenges in Software Development

→