Back/Engineering/Claude/Claude
AdvancedEngineering

How to Build a Functional Greenfield Prototype in One Shot Using Claude Opus 4.8

Build a new prototype in one pass, then test the working surface before making narrow follow-up changes.

How to Build a Functional Greenfield Prototype in One Shot Using Claude Opus 4.8

01:35 to 04:02: Claire tests a one-shot greenfield build, then finds that follow-up edits and existing-code edges need tighter scope and direct preview checks.

Before you start

What you need

  • A bounded feature brief
  • A new or isolated codebase
  • A preview environment and test cases

What you’ll make

A functional prototype that demonstrates the primary path and exposes the assumptions behind the one-shot build.

Tools used

Step by step

The workflow

Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.

5 steps

Step01

Define a Complex Feature

Outline the complete architecture and functionality for a new feature you want to build from scratch. Provide specific instructions, as more detail leads to a better one-shot build.

Example prompt
Describe the user, primary action, data, empty state, error state, and finish condition.
Step02

Initiate in Claude Code

In the Claude Code environment, give Claude Opus 4.8 a single, detailed prompt. Specify the complete architecture and functionality for the prototype you want it to build in one shot.

Example prompt
Create a fresh branch, use the existing stack, and build only the described feature.
Step03

Allow Autonomous Coding

Allow the model to enter its planning mode and then autonomously code the feature. For a complex task, this process can take around 20 minutes to complete.

Example prompt
Run the app and complete the primary path plus the named edge states before stopping.
Step04

Deploy and Test the Initial Build

After the code is generated, push it to a preview branch or another testing environment. Verify that the feature is live and works as expected from the one-shot build.

Example prompt
Deploy a preview tied to the commit and report the exact test URL and sample data.
Step05

Proceed with Caution for Iteration

Use caution when asking the model to make iterative changes or fix bugs on the initial code. It may introduce new bugs or hallucinate fixes when asked to iterate on the one-shot build.

Example prompt
Limit this correction to the observed preview failure and rerun the same reproduction steps.

What good looks like

  • The primary path works in the preview
  • Data and edge states match the brief
  • Follow-up changes stay limited to the named surface

Build your next product with ChatPRD

Turn an idea into a PRD, user stories, and a plan.

Try ChatPRD free

After the steps

Runbook notes

How to recover when the loop fails and where human judgment helps.

Recover

If it goes sideways

The prompt leaves product behavior undefined
Add actors, actions, states, and acceptance examples before building.
The preview hides a broken edge case
Test empty, error, repeated, and mobile states directly.
A follow-up change damages unrelated code
Name the exact component and expected unchanged behavior before editing.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready