CLAUDE LABJP
CODE — Claude Code ships a broad quality and reliability update with /rewind, stronger MCP resilience, and steadier OAuth handlingCODE — CPU and memory use drops during streaming and long sessions, keeping always-on automation stableADMIN — New org model restrictions let administrators control which models are availableMCP — Structured output, remote MCP, and session resume all get more reliableMODEL — Claude Fable 5 is generally available, with a 1M-token context window, always-on adaptive thinking, and 128K outputLINEUP — Opus 4.8, Sonnet 4.6, and Haiku 4.5 lead the lineup; pick the right one per taskCODE — Claude Code ships a broad quality and reliability update with /rewind, stronger MCP resilience, and steadier OAuth handlingCODE — CPU and memory use drops during streaming and long sessions, keeping always-on automation stableADMIN — New org model restrictions let administrators control which models are availableMCP — Structured output, remote MCP, and session resume all get more reliableMODEL — Claude Fable 5 is generally available, with a 1M-token context window, always-on adaptive thinking, and 128K outputLINEUP — Opus 4.8, Sonnet 4.6, and Haiku 4.5 lead the lineup; pick the right one per task
Articles/Claude Code
Claude Code/2026-05-05Advanced

Your Design Doc Quality Sets Claude Code's Speed Limit: Spec-First AI Development

The story of compressing 16 person-days into 2 hours isn't about how good the AI was — it's about how well the design doc prevented AI from having to think. Learn how to build specs that unlock Claude Code's true speed.

Claude Code168AI-driven developmentdesign docspecificationproductivity16software design

When I first heard "16 person-days of development finished in 2 hours," I assumed it was a story about how impressive Claude Code is. But the person who did it kept emphasizing something else entirely: "It wasn't that the AI was fast. It was that the design doc left nothing for the AI to decide."

That framing stuck with me. When you're building apps with AI assistance and things feel slower than they should, the bottleneck is almost always the same thing: the design document — or the lack of one.

This guide digs into how to write specs that let Claude Code operate at full speed, with a practical three-file system you can use immediately.

Why the Design Doc Sets the Speed Ceiling

AI coding agents like Claude Code are excellent at implementation and poor at judgment.

Judgment means: "Should I use this design or that one?" "How much error handling do we need here?" "How does this spec change fit with the existing architecture?" Answering those questions is the human's job. When Claude Code encounters ambiguity, it stops and asks.

Here's what happens when you hand Claude Code a vague spec:

AI: What format should the API error response use?
You: { error: string }
AI: Should network errors use the same format?
You: Yes
AI: Should auth errors include the status code?
You: Yes, 401
AI: What about 404 errors?
(continues)

That back-and-forth is what kills your speed. The case of 16 person-days becoming 2 hours involved a design doc of 3,500 lines across 20 sections — detailed enough that the AI almost never needed to make a judgment call. It could just implement.

Three Conditions for a Spec That Leaves Nothing to the AI

Condition 1: Every decision is recorded, including the reasoning

The most important thing to capture in a design doc is why you made each decision — not just what you decided.

Good:

## Authentication
 
Using JWT (reason: no session management needed in serverless environment)
Token expiry: 24 hours (reason: matches our mobile app usage patterns; 
  refresh tokens add implementation cost without proportional benefit)

Not good:

## Authentication
 
Implement JWT authentication

With the first version, the AI can make informed choices when it encounters edge cases around token expiry or exception handling. With the second, it asks you every time.

Condition 2: Out-of-scope items are explicitly listed

"What we are NOT building" is the most underrated section in any design doc.

## Out of Scope (not in this phase)
 
- Internationalization (post-MVP consideration)
- Social login (low priority)
- Email notifications (replaced by push notifications)
- Admin panel (CSV export is sufficient for now)

When "don't implement X" isn't stated, the AI may generate extra code for X "just in case" or stop to ask whether it should. Explicit exclusions eliminate that entirely.

Condition 3: File structure, components, and naming conventions are predefined

Defining the project's structure before implementation begins keeps the AI's output consistent across sessions.

## Directory Structure
 
src/
  components/    # React components (PascalCase)
  hooks/         # Custom hooks (use* prefix required)
  api/           # API call functions (camelCase)
  types/         # TypeScript types (PascalCase, .types.ts extension)
  utils/         # Utility functions (camelCase)
 
## Naming Conventions
 
- Components: UserCard.tsx (feature + component type)
- Hooks: useUserData.ts (use + feature name)
- API functions: fetchUserById.ts (verb + target + condition)

The Three-File System: DESIGN.md, TASK.md, DECISION.md

Working with Claude Code regularly, I've found that splitting design information across three separate files — each with a different purpose — works significantly better than one large document.

DESIGN.md: The System Design Document

The primary document covering what you're building and how. A solid baseline structure:

# Project Name
 
## Scope of this article
(1-2 paragraphs on the product's purpose and the problem it solves)
 
## User Stories
- User A can do X
- User B can do Y
 
## Tech Stack
(Frameworks and libraries with reasons for choosing them)
 
## Data Model
(Core entities and their relationships)
 
## API Design
(Endpoint list with request/response formats)
 
## State Management
(What state lives where)
 
## Error Handling
(Error classification and response strategy)
 
## Out of Scope
(What is explicitly not being built this phase)

TASK.md: The Implementation Breakdown

Where DESIGN.md answers "what to build," TASK.md answers "in what order and how to verify it's done."

The critical detail is a completion condition for each task:

## Tasks
 
### Phase 1: Foundation
- [ ] Project setup
  - Done when: `npm run dev` runs, ESLint/Prettier pass
- [ ] Auth API
  - Done when: /api/auth/login returns { token: string }, tests pass
  - Depends on: nothing
 
### Phase 2: Core Features
- [ ] User list page
  - Done when: /users shows DB users, error toast appears on failure
  - Depends on: Auth API

When completion conditions are explicit, the AI can judge for itself whether an implementation is finished — no check-in required.

DECISION.md: The Design Decision Log

A record of the judgment calls made during development. This is especially important in AI-assisted work, where the reasoning behind past decisions gets lost between sessions.

# Design Decisions
 
## 2026-04-15: Chose Zustand for state management
 
**Context**: Global state became necessary
**Options**: Context API / Redux / Zustand
**Decision**: Zustand
**Reasoning**:
- Redux is over-engineered for this project's scale
- Context API has performance concerns at this component depth
- Zustand has minimal boilerplate and low learning curve
**Future**: If the project grows significantly, revisit Redux

How to Hand Context to Claude Code

With the design docs ready, the way you open each Claude Code session matters.

Please read @DESIGN.md and @TASK.md.
We're implementing "Phase 1: Auth API" now.
Review the completion conditions, then begin implementation.
If you have any questions, list them all upfront before starting — 
don't pause mid-implementation to ask.

The instruction to ask all questions upfront is worth emphasizing. It changes the interaction from repeated interruptions into one focused clarification round, followed by uninterrupted implementation.

When Writing the Design Doc Feels Too Slow

"Doesn't spending hours on a design doc defeat the purpose?" Fair question. The first design doc does take time — sometimes several hours.

The fix: have Claude Code write the first draft.

I want to build an app that does [brief description].

Using the DESIGN.md template, draft a design document for this.
Mark anything you're unsure about as TBD — I'll fill those in.

The AI produces a draft. You review it and fill the TBDs. This approach is typically 3–4x faster than writing from scratch, and the quality is usually good enough to build on.

The Core Insight

Most of the slowness in Claude Code-assisted development traces back to the same cause: a spec that asks the AI to make decisions it shouldn't have to make.

AI agents are implementation machines, not judgment machines. When you take on the judgment work upfront — in the form of a thorough design doc — the AI can do what it actually does well, at full speed.

Start your next project with a DESIGN.md. The first one might cost you a couple of hours. Everything after that will be faster than you've seen before.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Claude Code2026-04-04
Claude Code /insights Command: Analyze Your Coding Habits and Boost Productivity
Use Claude Code's /insights command to analyze your session history, spot coding inefficiencies, and turn data-driven findings into real productivity gains.
Claude Code2026-03-21
Designing CLAUDE.md for Stable Output — Hierarchy, Sub-Agents, and External Memory
Learn how to structure CLAUDE.md with a 3-tier hierarchy, sub-agent workflows, and external memory to keep Claude Code's output consistent — with the practical lessons that actually moved the needle in real operation.
Claude Code2026-06-27
Will It Stay Light When You Run It Unattended? Observing and Capping Claude Code's Long-Session Memory
How to keep long, unattended Claude Code sessions from slowly getting heavier — with a tiny ps-based RSS sampler, a rolling-baseline watchdog, and session segmentation, shown with working scripts and a before/after comparison.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →