Chapter 3

Build in parts

Start with phase 1 and execute the implementation plan phase by phase with a clear loop: PRD, PLAN mode, implementation, validation, and report.

The loop for each phase

By this point, you should already have an implementation plan split into phases. The goal of this chapter is simple: show the loop you repeat starting with phase 1 and moving phase by phase until the full plan is complete.

Do not take the whole plan and ask the agent to build everything at once, and do not pick a random phase just because it looks easier. You start with phase 1. When phase 1 is done with validation and a report, go back to the implementation plan, pick phase 2, and repeat. Then phase 3, and so on.

  1. Open the implementation plan and focus only on phase 1 or the next unfinished phase
  2. Review and refine that phase before execution
  3. Ask the agent to create the PRD for that phase
  4. Switch the tool to PLAN mode
  5. Ask for an execution and validation plan based on that PRD
  6. Return to normal mode and implement the phase
  7. Test and validate against the PRD
  8. Generate the phase report, mark the phase complete, and move to the next one
Main rule:

Always in order. First phase 1. Then phase 2. Then phase 3. One phase at a time. When a phase is done, it needs a PRD, implementation, validation, and a report before you open the next one.


1. Read the implementation plan, review the phase, and create the PRD

The first step in the loop is to open the implementation plan and take phase 1. In later cycles, always take the next unfinished phase. Before writing any code, check whether that phase is clear enough. If it is vague, too large, or missing testable criteria, refine it first.

Then ask the agent to turn that phase into a specific PRD. The PRD is the execution document for the phase: what is included, what is excluded, how it should work, and how you will validate it. Once phase 1 is closed, you repeat exactly the same process for phase 2, and so on.

Prompt to analyze the current phase and generate the PRD
I want to execute phase [PHASE_NAME] from the implementation plan.

If this is the first cycle, start with phase 1.
If phase 1 is already done, use the next unfinished phase.

Before writing any code, read:
- PLAN.md
- README.md
- AGENTS.md or CLAUDE.md

TASK
Analyze phase [PHASE_NAME] from the implementation plan, refine anything vague, and create a PRD for that phase.

Create this file:
- docs/prd/[PHASE_FILE].md

The PRD must be in English and include:
- Goal
- Scope
- Out of scope
- User flow
- UI states
- Technical notes
- Acceptance criteria
- Manual validation
- Risks / open questions

IMPORTANT RULES
- focus on a single phase
- do not invent scope outside the implementation plan
- if the phase is too large, point that out before proceeding
- do not implement anything yet
- generate only the final PRD content

2. Switch to PLAN mode

Once the PRD is ready, do not ask for code yet. First, switch the tool to PLAN mode and ask for a plan to execute and validate the current phase.

This forces the agent to think before acting: which files it will touch, which order makes sense, what the risks are, and how to prove the phase is complete. You do this for phase 1, then repeat it for phase 2, and keep going until the implementation plan is done.

Prompt to use in PLAN mode
I am now going to execute phase [PHASE_NAME].

I am following the implementation plan one phase at a time.

Read these files:
- PLAN.md
- README.md
- AGENTS.md or CLAUDE.md
- docs/prd/[PHASE_FILE].md

I am switching the tool to PLAN mode.

TASK
Create an execution and validation plan for this phase.

The plan must include:
- implementation sequence
- files likely to be changed
- technical risks
- how to validate locally
- PRD criteria that must be checked at the end

IMPORTANT RULES
- do not implement yet
- keep the plan small and executable
- use the PRD as the main source of truth for this phase
- if the PRD is vague, point that out before proceeding

3. Execute, test, and validate

Only after the PRD and the phase plan are ready should implementation begin. At that point you already have clearer scope, criteria, and validation, which reduces invented scope a lot.

The focus is still one phase only. Do not mix two phases in the same cycle. Close the current one first, then move forward.

Example execution request

"Implement phase [PHASE_NAME] following the PRD docs/prd/[PHASE_FILE].md. Follow the rules in AGENTS.md (or CLAUDE.md). Show me how to validate that the result satisfies the PRD."

Practical note:

If this phase uses fetch() from the browser to Deezer, the CORS problem will likely appear. Treat that as a phase risk and resolve it inside the loop before closing validation.


4. Generate the report and move to the next phase

When the phase is implemented and validated locally, close the cycle with a report. That report becomes project memory: what was built, what changed, how it was validated, and what remains open.

After that, go back to the implementation plan and repeat exactly the same loop for the next unfinished phase. That is how you move from phase 1 all the way to the last phase without losing clarity.

Prompt to generate the phase report
Phase [PHASE_NAME] has been implemented and validated locally.

After this report, I will mark this phase as complete and move to the next unfinished phase in the implementation plan.

Use these files as context:
- PLAN.md
- README.md
- AGENTS.md or CLAUDE.md
- docs/prd/[PHASE_FILE].md

TASK
Create this file:
- reports/[PHASE_SLUG]-report.md

The report must be in English and include:
- summary of what was implemented
- files created or changed
- technical decisions made
- how the phase was validated
- PRD criteria that were satisfied
- problems found and how they were resolved
- pending work or limitations for the next phase

IMPORTANT RULES
- write objectively
- do not invent results that did not happen
- if something in the PRD was not completed, make that explicit
- generate only the final report content
✓ Phase closure:

Before moving on, confirm four things: the PRD exists, the phase was implemented, validation passed, and the report was saved. If that is true, go back to the implementation plan and repeat the loop for the next phase.

Before leaving this chapter

Save your work in Git before moving on. This gives you progress checkpoints, history, and safe rollback points.

git add .
git commit -m "[summarize what changed in this chapter]"
git push

Replace the commit message with a short, real summary of what changed in this chapter.

Chapter 3

0 of 3 checkpoints

Complete all checkpoints to unlock the next chapter.

Next up: Publish
Back to overview

Want to go deeper?

Articles

Community

Ask, answer, get unstuck

Use this space to ask questions about the session, share examples, and help other people understand the topic.