In Chapter 5: The Plan (Executable Prompt), we acted like Architects. We drew up a precise blueprint (PLAN.md) detailing exactly what files to create and how to verify them.
But a blueprint is just paper. It doesn't build the house.
In this chapter, we meet the Execution Engine. If the Planner is the Architect, the Execution Engine is the Senior Developer you hired to actually write the code. It takes the plan, sits down at the keyboard, and works through the night until the job is done.
If you have used ChatGPT or Claude for coding, you know the pain:
Get-Shit-Done (GSD) uses an Execution Engine that treats coding like a factory line, not a chat session.
It follows a strict loop:
It turns "I hope this works" into "I know this works because we verified it step-by-step."
The Engine doesn't try to build the whole app at once. It reads the <task> tags from your PLAN.md and executes them one by one.
Analogy: Imagine building a Lego set. You don't dump all 5,000 pieces on the floor and try to build the roof and the basement at the same time. You follow the booklet: "Bag 1: The Foundation." "Bag 2: The Walls."
The Execution Engine opens "Bag 1," builds it, checks that it's sturdy, and then moves to "Bag 2."
This is the "Senior Developer" part. Sometimes, the plan has a minor mistake. Maybe we forgot to install a library.
A Junior Developer (basic AI) would stop and cry, "Error: Library not found!"
The GSD Execution Engine has Deviation Rules. It is allowed to fix small problems automatically.
When the Engine finishes, it doesn't just say "Done." It writes a report called SUMMARY.md.
This file lists:
This ensures the next time we plan, we know exactly what happened here.
You trigger the engine with a command like /gsd:execute-phase. Here is what happens inside the machine:
Let's look at the code that powers this logic. The Execution Engine is primarily defined in the gsd-executor agent definition.
The agent isn't just chatting; it's following a script in its system prompt. It looks for the PLAN.md and iterates through tasks.
# Simplified Logic in gsd-executor
load_plan()
for task in plan.tasks:
if task.type == "checkpoint":
stop_and_ask_user()
else:
execute_code(task.files, task.instructions)
verify_work(task.verification_cmd)
git_commit(task.name)
Explanation: This loop ensures we never move to Task 2 until Task 1 is verified and saved.
How does the AI know when to fix bugs vs. when to stop? We explicitly program it in the system prompt (agents/gsd-executor.md).
<deviation_rules>
**RULE 1: Auto-fix bugs**
Trigger: Syntax errors, logic errors.
Action: Fix immediately. Track in Summary.
**RULE 4: Ask about architectural changes**
Trigger: Changing database schema, switching frameworks.
Action: STOP. Ask User.
</deviation_rules>
Explanation: This text is fed to the AI. It acts as the "Company Policy." It gives the AI permission to be helpful but prevents it from going rogue.
This is unique to GSD. Most AI tools just write files. GSD commits them to your version control history instantly.
# Inside the task_commit_protocol step
# 1. Check what changed
git status --short
# 2. Add ONLY the files for this task
git add src/components/Login.tsx
# 3. Save with a specific message
git commit -m "feat(01-01): implement login component"
Explanation: By running these commands after every single task, we create a "Save Point." If the power goes out, or the AI hallucinates in Task 5, Task 1 through 4 are safe in Git.
Finally, the engine compiles its work into SUMMARY.md. This isn't just for you; it's for the next agent (the Planner for the next phase).
# Phase 01 Plan 01: Login Summary
## Accomplishments
- Created Login UI
- Connected to Supabase
## Deviations
- **Rule 3 Fix:** Installed missing 'zod' library for validation.
Explanation: When the Planner starts Phase 2, it reads this. It sees "Oh, they installed zod, so I can use that in the next phase!"
Without an Execution Engine, using AI for code feels like herding cats. You spend more time copy-pasting code and fixing import errors than actually building.
With the Execution Engine:
SUMMARY.md automatically, so you never forget what you built.In this chapter, we learned:
PLAN.md into code.We've mentioned "Commits" and "Git" a lot in this chapter. It is the safety net that makes this whole system possible. Let's dive deeper into how GSD handles version control.
Next Chapter: Atomic Git Integration
Generated by Code IQ