The Context Degradation Problem
Claude Code is incredibly powerful when working with a fresh context window. But as the context fills up, quality degrades:| Context Usage | Quality | Claude’s State |
|---|---|---|
| 0-30% | PEAK | Thorough, comprehensive |
| 30-50% | GOOD | Confident, solid work |
| 50-70% | DEGRADING | Efficiency mode begins |
| 70%+ | POOR | Rushed, minimal |
The GSD Solution
GSD solves context rot through three mechanisms:1. Structured Context Files
Every GSD project maintains a set of carefully designed context files that give Claude exactly what it needs, when it needs it:| File | What it does | Size Limit |
|---|---|---|
PROJECT.md | Project vision, always loaded | ~500 lines |
REQUIREMENTS.md | Scoped v1/v2 requirements with phase traceability | ~1000 lines |
ROADMAP.md | Where you’re going, what’s done | ~800 lines |
STATE.md | Decisions, blockers, position — memory across sessions | ~300 lines |
research/ | Ecosystem knowledge (stack, features, architecture, pitfalls) | ~2000 lines total |
PLAN.md | Atomic task with XML structure, verification steps | ~200 lines |
SUMMARY.md | What happened, what changed, committed to history | ~300 lines |
CONTEXT.md | Your implementation preferences from discuss-phase | ~400 lines |
Size limits are based on where Claude’s quality degrades. Stay under these limits, get consistent excellence.
2. Multi-Agent Architecture
The orchestrator never does heavy lifting. It spawns specialized agents, waits, integrates results:3. Atomic Task Scoping
Plans are sized to complete within ~50% context (not 80%). Each plan contains 2-3 tasks maximum.| Task Complexity | Tasks/Plan | Context/Task | Total |
|---|---|---|---|
| Simple (CRUD, config) | 3 | ~10-15% | ~30-45% |
| Complex (auth, payments) | 2 | ~20-30% | ~40-50% |
| Very complex (migrations) | 1-2 | ~30-40% | ~30-50% |
The File Structure
When you run/gsd:new-project, GSD creates:
Context Assembly Strategy
Different agents load different combinations:Planner Context (15-20%)
Executor Context (20-30%)
Verifier Context (10-15%)
Selective History Loading
GSD doesn’t load every prior phase. It uses a two-step digest strategy:Generate digest index
Create lightweight summaries of all completed phases:Output:
tech_stack, decisions, patterns, affects for each phaseScore relevance
For the current phase, score each prior phase by:
- affects overlap — Does it touch same subsystems?
- provides dependency — Does current phase need what it created?
- patterns — Are its patterns applicable?
Result: You get relevant historical context without loading 20+ SUMMARY files into every agent.
Size Enforcement
GSD includes built-in size checks:Best Practices
Clear between phases
Run
/clear in Claude Code between major commands. Each subagent gets a fresh 200K window — your main session should too.Use /gsd:resume-work
Starting a new session? Don’t manually re-read files.
/gsd:resume-work loads exactly what you need.Keep PROJECT.md focused
It’s loaded into EVERY agent. Keep it concise: vision, constraints, core decisions.
Archive completed milestones
/gsd:complete-milestone moves completed work to MILESTONES.md, keeping ROADMAP.md lean.Why It Works
Context engineering is the difference between: Without GSD:- Main session at 80-90% context after 2 hours
- Claude starts abbreviating, skipping steps
- “I’ll be more concise now” (quality death)
- Manual context management (copy-paste hell)
- Main session stays 30-40% even after full phase
- Heavy work happens in fresh 200K subagent contexts
- Consistent quality from first task to last
- Automatic context assembly and cleanup
Next Steps
Multi-Agent Orchestration
Learn how GSD coordinates specialized agents
Workflow Stages
Understand the 5-stage development cycle