Plan Before You Prompt: The AI-First Product Loop
In this lesson: plan hard before prompting, run the five-move loop, and ship small behind feature flags.
Top 3 takeaways
Plan hard before you prompt
Most AI builds go wrong because someone asked the model to invent the plan from a few words. How much AI speed you actually get depends on how well you plan first.
Run the five-move loop
Write a vision doc, a PRD, and a roadmap, prompt the agent, and then release and measure. What you learn in production feeds back into the next version, so the work keeps cycling.
Ship small behind feature flags
Deploy in small steps with an on-and-off flag so shipping the code and turning it on become two separate, reversible steps. Add instrumentation before you announce anything, since a dark launch with no measurement teaches you nothing.

Derek Peters
Professor, Gauntlet AI
Professor at Gauntlet AI; a product and program management leader with 30+ years of experience. Currently leads AI development and product structure at Calix. Began in telecommunications and electrical engineering before moving into network engineering, Python, full-stack development, and technical product work, and has led products from ideation through go-to-market. At Gauntlet he supports instruction, grading, and product management.
Lesson notes
A written walkthrough of the lecture, covering the patterns, the code, and the things that trip people up.
Why Planning Beats Typing
For decades, the bottleneck in software was turning decisions into code. AI has largely removed that bottleneck. Teams can now ship multiple features in the time it once took to build one, but only if their planning improves alongside their tooling.
The difference between vibe coding and building a real product is planning. Vibe coding asks the model to invent the plan. Strong teams define the plan first, then use AI to execute it. Most failed AI projects can be traced back to poor planning rather than poor implementation.
The Five-Step Loop
The workflow consists of five steps:
- Define the vision.
- Create the requirements.
- Build the roadmap.
- Execute with AI.
- Release, measure, and learn.
The final step loops back into the first. Production learnings inform the next vision, creating a continuous cycle of improvement.
For planning, use a frontier reasoning model such as Claude, GPT, or Gemini. For execution, use an agentic coding tool like Claude Code, Codex, or Cursor.
Cadence: A Working Example
Throughout the lesson, Derek uses a fictional product called Cadence, an AI-powered task manager that turns messy thoughts into prioritized action items.
The example is simple enough to understand quickly but complex enough to demonstrate real AI product challenges. Success is measured by a single outcome: whether users actually complete more of their planned tasks.
From Vision to PRD to Roadmap
The vision document defines why the product exists. The PRD defines what will be built. The roadmap defines when work happens.
Instead of asking AI to write these documents from scratch, have it interview you. Use prompts that force the model to ask questions, challenge assumptions, and clarify vague ideas.
The roadmap should prioritize work by risk and value, organized into Now, Next, and Later. Keep all planning artifacts in a version-controlled context file that AI can reference throughout development. Accurate context compounds; stale context creates problems.
Prompting Like a Tech Lead
Treat AI as an engineer, not a search engine. Your role is to provide direction.
Strong prompts contain four elements:
- Intent
- Context
- Rules
- Acceptance criteria
The most valuable habit is asking for a plan before asking for code. Review the plan, approve it, then move into implementation.
The operating rhythm is simple: plan, review, test, and refine. Small changes are easier to validate than large rewrites, and every line of generated code should still be reviewed by a human.
FAQ
What is the AI-First Product Loop? +
Why do most AI builds go wrong? +
How is the AI-First Product Loop different from vibe coding? +
Why write a vision doc and PRD before prompting? +
What is Cadence? +
Why release behind feature flags? +
What does being the tech lead mean here? +
What's next?
Keep building with the rest of Night School, or apply to Gauntlet — twelve weeks of technical intensity with the best AI engineers we can find.