Spec-Driven Context Engineering
Stop context rot. Ship with the GSD Method.
The longer you run an AI coding session, the worse it gets. Not because the model is bad. Because the context window is a landfill.
Every back-and-forth message, every failed attempt, every "actually, change that back" fills up 200,000 tokens of working memory. The model isn't forgetting. It's remembering too much - and most of it is noise.
After about 45 minutes of active editing, most sessions have what researchers call context rot: the model starts contradicting itself, re-introducing bugs it already fixed, and losing track of the architecture it helped design. The window is full. The signal is gone.
**The GSD Method separates coordination from execution.**
The Orchestrator is a thin agent. It holds the architecture, the plan, and nothing else - maybe 15-20% of its context window. Its only job is figuring out what needs to be built and writing specs.
The Executors are short-lived subagents. Each one spawns with a completely fresh 200k token context. Each one gets a razor-sharp spec. Each one exits when the task is done. No accumulated noise. No conflicting history.
**The secret is the spec file.**
A `PROJECT_CONTEXT.md` that contains exactly what the executor needs: the relevant interfaces, the expected output, the constraints. Nothing else. No chat history. No 45 minutes of "wait, I meant..."
The executor reads it, does the work, and exits clean.
Structure your repo with local markdown context files. Keep them close to the code they describe. The orchestrator manages them. The executors consume them. Context rot dies on arrival.
The result: 40% less rework. Because every subagent starts from truth.