Claude Community Event

Solving Context Rot

Spec-driven development with GSD for Claude Code

Arsalan Shakil · AI Research Engineer @ F-Secure · Helsinki
01 / 15
about me

Arsalan Shakil

Arsalan Shakil — LinkedIn profile Arsalan Shakil — About
02 / 15
the problem we all hit

What is Context Rot?

Tokens at the front of the context window are more effective than tokens at the end. The longer you use Claude in a single session, its efficiency decreases.

  • Token bloat — 40+ messages in, Claude gets slower and less precise
  • Lost decisions — what you decided earlier gets buried and forgotten
  • No specification — "build me X" gives Claude nothing to verify against
  • No verification loop — code is generated but nobody confirms it works
Performance by Input Length — shows quality degradation as context grows

Claude Code has autocompact, but we can do better. GSD gives each task a fresh 200k context via subagent orchestration.

03 / 15
~1:00
the approach

GSD: Context Engineering for Claude Code

An open-source system (12.8k ★) that adds spec-driven development and multi-agent orchestration to Claude Code via slash commands.

📐

Structured Specs

XML task plans with built-in verification — Claude never guesses

🧠

Context Files

PROJECT.md, STATE.md, REQUIREMENTS.md keep Claude oriented across sessions

🤖

Subagent Architecture

Each task runs in a fresh 200k context — your main window stays lean

Auto-Verification

Built-in checks at every step — plans, execution, and UAT

04 / 15
~2:00
getting started

Install in 30 seconds

# Install — choose runtime + scope interactively
npx get-shit-done-cc@latest

# Or non-interactive
npx get-shit-done-cc --claude --global

# Verify inside Claude Code
/gsd:help

Works with Claude Code, OpenCode, and Gemini CLI. Mac, Windows, Linux.

💡 Best with claude --dangerously-skip-permissions — GSD automates many small commands; approving each one defeats the purpose.

05 / 15
~2:45
the workflow — your new muscle memory

The Core Loop

new-project
discuss
plan
execute
verify
repeat

Five commands that take you from idea to shipped, verified code. Each step feeds the next — decisions compound, context stays fresh.

  • /gsd:new-project — describes the what and why
  • /gsd:discuss-phase — captures the how you want it
  • /gsd:plan-phase — creates atomic, verifiable tasks
  • /gsd:execute-phase — builds it with fresh context
  • /gsd:verify-work — confirms it actually works
  • /gsd:complete-milestone — archives, tags, ships

Each step creates files that the next step reads. That's the context engineering — Claude is never starting cold.

06 / 15
~3:15
step 1 + 2 — understanding before building

Initialize & Discuss

① /gsd:new-project

One command extracts everything Claude needs.

  • Questions — asks until it fully understands your idea, goals, constraints, edge cases
  • Research — spawns 4 parallel agents to investigate the domain
  • Requirements — extracts what's v1, v2, and out-of-scope
  • Roadmap — creates phases you approve before any code

Creates: PROJECT.md (big picture — vision, values, requirements), ROADMAP.md (tactical — exact phases + tasks), STATE.md (living doc — progress, metrics, session handoff)

💡 These are living documents — validated requirements get marked as verified as you go.

② /gsd:discuss-phase N

The most underrated step. Shapes implementation before any code is written.

  • Visual features → asks about layout, density, interactions, empty states
  • APIs / CLIs → response format, flags, error handling, verbosity
  • Content systems → structure, tone, depth, flow
  • Organization → grouping, naming, exceptions

Creates: {phase}-CONTEXT.md — feeds into research + planning

Skip → defaults. Use it → your exact vision.

07 / 15
~4:15
step 3 — research, plan, verify before writing a line

Plan Phase — Research → XML Tasks → Verification

What happens

  1. Research — 4 parallel agents investigate stack, features, architecture, and pitfalls
  2. Plan — creates 2–3 atomic task plans in XML, each small enough for one fresh context window
  3. Verify — checker agent validates plans against requirements, loops until they pass

Creates: {phase}-RESEARCH.md, {phase}-{N}-PLAN.md

XML task structure

<task type="auto">
  <n>Create login endpoint</n>
  <files>src/api/auth/route.ts</files>
  <action>
    Use jose for JWT.
    Validate against users table.
  </action>
  <verify>curl POST → 200</verify>
  <done>Cookie set on success</done>
</task>

Each plan is a dense XML prompt — max 3 tasks — small enough for one fresh 200k context window. Verification criteria built in.

08 / 15
~5:15
steps 4 + 5 — build it, then prove it works

Execute & Verify

④ /gsd:execute-phase N

Walk away. Come back to completed work.

  • Plans run in waves — parallel where independent, sequential when dependent
  • Fresh 200k context per plan — each subagent starts clean, zero accumulated garbage
  • Atomic git commit per task — every task is one surgical, meaningful commit
  • Auto-checks against goals — codebase verified after each wave completes
abc123f feat(03-01): add email confirmation
def456g feat(03-02): implement password hashing
hij789k feat(03-03): create registration endpoint

⑤ /gsd:verify-work N

Tests pass — but does it actually work?

  • Extracts testable deliverables — what you should be able to do now
  • Walks you through each one — "Can you log in with email?" Yes/no
  • Auto-diagnoses failures — spawns debug agents to find root causes
  • Creates fix plans — re-run execute to apply verified fixes

If needed, execution pauses mid-build to ask you to verify something manually. After your thumbs up, it creates a summary file and commits.

09 / 15
~6:15
why the loop works — architecture + context engineering

Under the Hood

Multi-agent orchestration

Every stage: thin orchestrator spawns specialized agents, waits, integrates.

StageAgents
Research4× parallel (stack, features, arch, pitfalls)
PlanningPlanner → checker → loop until pass
ExecutionN× parallel executors (fresh 200k each)
VerificationVerifier + debuggers

Main context stays at 30–40%. The work happens in subagents.

The .planning/ directory

.planning directory structure showing phases, plans, summaries, research, and context files
10 / 15
~7:15
things you can apply today

Efficiency Tips

11 / 15
~8:00
the difference

Ad-hoc Prompting vs Structured Workflow

❌ Unstructured

"build me a SaaS app"
→ 50 messages of clarification
→ context window at 95%
→ quality degrades per message
→ no git history, no tests
→ works until it doesn't
vs

✅ With GSD

/gsd:new-project → describe idea
→ structured research + roadmap
→ fresh 200k context per task
→ atomic commits, auto-verification
→ main window at 30-40%
→ reliable at any scale
12 / 15
~8:45
tl;dr

Key Takeaways

13 / 15
~9:15
escape hatches + configuration

Quick Mode & Configuration

⚡ /gsd:quick

For tasks that don't need the full loop. Same quality agents, skips research + verification.

/gsd:quick
> "Add dark mode toggle to settings"
# → plans, executes, commits

Use for: bug fixes, config changes, one-off tasks.

⚙ Model profiles

ProfilePlanExecVerify
qualityOpusOpusSonnet
balancedOpusSonnetSonnet
budgetSonnetSonnetHaiku
/gsd:set-profile budget

Session management: /gsd:pause-work + /gsd:resume-work

14 / 15
~9:45
try it yourself

Claude Code is powerful.
Context engineering
makes it reliable.

come say Hi :D

15 / 15
~10:00