From idea to feature plan: a throwaway prototype, plan mode, then the build
Product discovery with an AI coding agent: start from the problem and an appetite, prototype on a throwaway route with mock data and real components, write the plan in two halves (proposal, then build) with measurement before launch, and slice the build into releases behind switches, shadow mode before enforcement, destructive steps last. Real examples from SpaceCare.
By Federico Blundo
Prototype first, plan second, build last
With an AI coding agent, a clickable prototype costs about what a sketch used to. So before any real code, I ask Claude for a throwaway prototype I can click, then a plan that ships the idea in small releases I can switch off.
Marty Cagan's description of prototypes fits this workflow well:
"The primary purpose of prototyping is to help discover a successful solution." - Marty Cagan, SVPG, The Purpose of Prototypes
He adds that these tools "are generally not for building actual products". The same holds for code an agent writes in five minutes to answer one question. It answers the question, then it goes in the bin.
Step 1: Start from the problem and an appetite
A real example. Users reported that their eye "skipped" the row of section tabs on creators' websites. The outcome I wanted was simple: visitors notice the tabs and use them.
Teresa Torres' opportunity solution tree is a good frame for this step: start from the outcome, map the opportunities, and only then generate solutions and the experiments that test them.
"An opportunity solution tree is a simple way of visually representing the paths you might take to reach a desired outcome." - Teresa Torres, Product Talk
The second question is how much the problem is worth. Basecamp's Shape Up calls this the appetite. In its words, "You can think of the appetite as a time budget for a standard team size". A tab row that people skip is worth an afternoon of exploration, not a redesign.
Step 2: Prototype on a throwaway route
The prompt I use is short and specific about what the prototype is not:
Before implementing, give me a high-fidelity prototype in localhost.
- A client-only route under app/proto/<name>, never committed.
- Mock data only: no fetches, no database, no auth.
- Reuse the real design components so the comparison is honest.
- Show the current version next to 3-5 candidate treatments, each inside
a mock of the real page around it.
- Hardcode the copy; skip translations.
Then send me the URL and the open decisions, each with your recommendation.For the tab row, the prototype stacked the current strip against several treatments. Each sat inside a mock of the surrounding page: the carousel above, search below, the first result card.
The question was visual weight in context, not the strip in isolation. A theme bar at the top switched palette, font and dark mode, so every candidate was checked against every creator's settings, not just the one it was drawn for.
The file starts by saying what it is, so nobody mistakes it for product code:
/**
* THROWAWAY PROTOTYPE - hub tab strip visibility.
*
* Users reported that the eye "skips" the section tab row on the hub. This
* page stacks the current strip against candidate treatments, each inside a
* mock of the surrounding hub chrome, so the comparison is about visual
* weight in context rather than the strip in isolation.
*
* Nothing here is wired to real data. Delete once a direction is picked.
*/
const VARIANTS = [
{ id: "current", title: "Current strip" },
{ id: "a", title: "A - Hierarchy only" },
// ...one entry per candidate treatment
];My pricing page prototype carries the same warning in its header: hardcoded English copy, no translations, no auth, no checkout wiring, "for localhost preview only and must not ship."
Shape Up describes two low-fidelity tools for this stage. A breadboard has "all the components and wiring of a real device but no industrial design". A fat marker sketch is made "with such broad strokes that adding detail is difficult or impossible."
A coded prototype is higher fidelity than both. The discipline is the same: answer one question, then throw it away.
Prototypes are not committed by default. The prototype folder in my checkout holds 5,758 lines across 14 files; the only parts in git are a few labs kept on purpose.
When a direction is picked, the route is deleted before the real implementation is committed. Old prototypes move to an archive folder outside the repository, in case a later question needs them.
Step 3: Write the plan in two halves
Once a direction is picked, I switch Claude Code into plan mode. It researches the code without changing anything, writes a plan to a file, and asks how to proceed.
"When the plan is ready, Claude presents it and asks how to proceed." - Anthropic, Claude Code permission modes
The options include "No, keep planning", and Ctrl+G opens the plan in your editor so you can change it directly. I edit plans more often than I reject them.
My bigger plans have two halves, because they serve two readers.
The proposal is for product review. It says what the feature is, who it is for and what was cut.
My plan for a page that helps creators get inspired by examples was framed around three creator profiles. It recorded what review removed, down to "There is no detail page." A reviewer can argue with a proposal without reading a single file path.
The build plan is for the agent. It lists the files, the database migration and the sequence, one pull request per step.
It also has a section that is easy to skip and expensive to forget: measurement before launch, not after. The analytics events that will tell you whether the feature worked are part of the plan, with names, so they ship with the first release instead of a week later.
Every plan ends with open decisions, each with a recommendation. That turns my review into a list of answers instead of a meeting.
Step 4: Slice the build into releases you can switch off
The plan's last job is the order of work. Mine follow four rules, all borrowed from teams that ship continuously.
One pull request per step, each from a fresh main. A recent plan to simplify SpaceCare's pricing and AI limits came out as nine pull requests. 3 out of 9 were independent, so they could run at the same time in separate git worktrees.
Risky paths ship switched off. Pete Hodgson's article on feature toggles describes the pattern.
"Release Toggles allow incomplete and un-tested codepaths to be shipped to production as latent code which may never be turned on." - Pete Hodgson, Feature Toggles
When I moved video processing from the browser to the server, the whole feature shipped behind a flag that defaulted to off. The original upload was always the fallback, so nothing could break while it was being switched on.
Shadow before enforce. The pricing plan introduced one AI budget per account to replace several separate limits. Rather than switching it on, the first release ran it in shadow mode: it metered every AI call and blocked nothing.
type BudgetMode = "off" | "shadow" | "enforce";
function mode(): BudgetMode {
// A platform setting, with an environment override for emergencies.
return (process.env.AI_BUDGET_MODE as BudgetMode) ?? settings.aiBudgetMode;
}
export async function checkBudget(accountId: string, cost: number) {
const over = (await spent(accountId)) + cost > allowance(accountId);
if (!over) return { allowed: true };
if (mode() === "shadow") {
log("ai_budget_shadow_block", { accountId, cost }); // record, don't block
return { allowed: true };
}
return { allowed: mode() !== "enforce" };
}In the plan, enforcement came one release later, after about a week of shadow data. Before flipping production, it required a read-only query of what each account would have been blocked on. Shadow mode also stays in the code as the emergency off switch.
Martin Fowler calls the general idea a dark launch. It is done "to assess the additional load and performance impacts upon the system before making a public announcement of the new capability."
Destructive steps last. Code stops reading a table in one release; the table is dropped in a later one. If the first release has to be rolled back, the data is still there.
| Release | What ships | How it stays safe |
|---|---|---|
| 1 | Copy changes on the pricing page | Text only |
| 2 | Remove a retired feature's code | Its tables stay |
| 3 | Drop that feature's tables | Only after release 2 is in production |
| 4 | Fix the billing period calculation | Small, independent |
| 5 | Meter AI usage in shadow mode | Logs, blocks nothing |
| 6 | Enforce the budget, add the usage meter | After about a week of shadow data |
| 7-8 | Fold older credits in, clean up | Old paths removed last |
| 9 | Drop the old tables | Destructive, so it goes last |
Step 5: Merge stacked pull requests without re-running everything
Small releases often stack: release 6 builds on release 5. When the base merges, the next one needs rebasing, and in principle its whole test suite should run again. My end-to-end suite takes about half an hour, so I prove instead that nothing changed:
# 1. Rebase the stacked branch onto main after its base squash-merged
git rebase --onto origin/main <old-base-tip>
# 2. Prove the rebased tree is identical to the one that was tested
git diff --stat <tested-tip> HEAD # must print nothing
# 3. Merge exactly the commit you checked
gh pr merge <number> --squash --match-head-commit <full-40-char-sha>An empty diff means the local end-to-end results still apply, and the pull request description says so. The merge then waits only on the fast checks.
What went wrong
- Prototypes live only in their worktree. They are untracked, so removing a finished worktree silently deletes them too. My cleanup routine now copies any
app/proto/folder to the archive before a worktree is removed. - Real names in mock data. One prototype's mock was copied from a real creator's website, real section names included. That is fine on localhost and a problem the moment a screenshot leaves the laptop. Invent mock data from the start.
- A safe step flagged as destructive. The production deploy blocks any pending migration that drops something unless I explicitly allow it. Swapping a foreign key drops a constraint, so a harmless migration tripped the gate. The rule now is to read the migration preview in the deploy summary before allowing it, never to allow by reflex.
Copy this: from idea to plan
- Write the problem and the outcome in one sentence each, and set an appetite.
- Ask for a throwaway prototype: client-only route, mock data, real components, variants in context, never committed.
- Review the prototype by clicking, then answer its open decisions.
- Plan in two halves: proposal for review, build plan for the agent, analytics events defined before launch.
- One pull request per step, each from a fresh main; independent steps in parallel worktrees.
- Risky paths behind a flag that defaults to off; shadow mode before enforcement; destructive steps last.
- Delete or archive the prototype before the real code is committed.
Sources
- Marty Cagan, SVPG (2025), The Purpose of Prototypes
- Teresa Torres, Product Talk, Opportunity Solution Trees
- Ryan Singer, Shape Up: Set Boundaries and Find the Elements
- Claude Code docs, Choose a permission mode (plan mode)
- Pete Hodgson, martinfowler.com, Feature Toggles (aka Feature Flags)
- Martin Fowler (2020), Dark Launching
About the author
Federico Blundo
AI Product Manager | NHS CEP | Toptal | Ex-Bain
AI product manager and founder of SpaceCare, a creator platform I build hands-on with AI coding agents. Before that I led product at 0-to-1 startups, scale-ups and public companies, including B2B SaaS at Fresha and B2C at lastminute.com, and ran transformation projects at Bain & Company.