In Chapter 4: Research & Discovery, our "Scout" agents mapped out the territory. We know what libraries to use and where the code should live.
But knowing what to build is very different from knowing how to build it.
If you tell a builder "Build me a house," you get a mess. If you give them a precise set of blueprints with step-by-step instructions, you get a home.
In Get-Shit-Done (GSD), we don't send vague requests to the coder. We send The Plan.
There is a famous internet meme where a drawing tutorial shows two steps:
This is exactly how most AI coding assistants fail. You say "Create a login page," and the AI tries to write the database schema, the API, the styling, and the validation logic all in one giant, broken response. It tries to "draw the rest of the owl" in one go.
PLAN.md (The Recipe)GSD introduces the concept of an Executable Prompt.
We create a specific file (e.g., 01-01-PLAN.md) that acts like a recipe card. It breaks a big feature down into tiny, atomic steps.
Crucially, The Plan is written for the AI, not for you.
When the Execution Agent (who we will meet in the next chapter) reads this file, it doesn't have to "think" about architecture. It just follows the instructions, line by line.
A Plan isn't just a bulleted list. It is a strictly formatted file that acts as a computer program for the AI.
It starts with Frontmatter (metadata at the top).
Example: The Top of a Plan
---
phase: 01-foundation
plan: 01
type: execute
wave: 1
autonomous: true
files_modified: [src/app/page.tsx]
---
Explanation:
phase & plan: ID numbers so we keep track of order.wave: This is coolโif two plans have wave: 1, the system can run them at the same time because it knows they don't conflict.autonomous: true means "Run this whole thing without bugging the human."Before cooking, you need ingredients. The Plan lists exactly which files the AI needs to read to understand the task.
Example: Context Section
<context>
@.planning/PROJECT.md
@.planning/research/STACK.md
@src/components/Button.tsx
</context>
Explanation: This prevents "Context Rot." We don't dump the whole codebase into the AI's brain. We only give it the specific files relevant to this specific plan.
This is the most important part. We use XML tags to define tasks. Why XML? because AI models are very good at parsing strictly open/closed tags. It prevents them from skipping steps.
Each task has three critical components:
Example: An Atomic Task
<task type="auto">
<name>Create Hero Section</name>
<files>src/components/Hero.tsx</files>
<action>
Create a functional component exporting 'Hero'.
Use the <h1> style from @theme.ts.
</action>
<verify>npm run test src/components/Hero.test.tsx</verify>
</task>
Explanation:
How does this file get created? The Planner Agent (from Chapter 3) creates it for the Executor Agent to consume.
How does GSD ensure these plans are high quality? It uses a strict Template and Logic within the Planner agent.
phase-prompt.md)The system doesn't let the Planner improvise the format. It forces the Planner to fill out a template.
<!-- Simplified Template -->
<objective>
[What this plan accomplishes]
</objective>
<tasks>
<task type="auto">
<name>[Task Name]</name>
<files>[Files to touch]</files>
<action>[Instructions]</action>
<verify>[Verification command]</verify>
</task>
</tasks>
Explanation: By feeding this template to the Planner Agent, we guarantee that the output is always machine-readable.
The Planner is smart. It looks at all the tasks you need and figures out what can be done in parallel.
Simplified Logic inside gsd-planner:
# Pseudo-code for Wave Calculation
for plan in all_plans:
if plan.depends_on is empty:
plan.wave = 1 # Run immediately!
else:
# Run after the thing it depends on
plan.wave = max(dependency.wave) + 1
Explanation: This creates "Waves."
must_haves)How do we know the plan actually solves the user's problem? The Planner works backward from the goal.
Example from gsd-planner output:
must_haves:
truths:
- "User can see the 'Sign Up' button"
artifacts:
- path: "src/components/SignUp.tsx"
provides: "The UI component"
Explanation: This section is used later by the Verifier. It says: "I don't care if you wrote code. If the 'Sign Up' button isn't visible on the screen, the plan failed."
When you are learning to code with AI, the biggest source of pain is loops of doom:
The Plan (Executable Prompt) fixes this by:
<files>.<verify>) before it writes the code.PLAN.md before any code is written. If the plan looks wrong, you change the plan, not the code.In this chapter, we learned:
PLAN.md is an "Executable Prompt"โa program for the AI to follow.We have the Research, and now we have the Plan. It is finally time to let the builders into the construction site.
Next Chapter: Execution Engine
Generated by Code IQ