Skip to main content

Quick-Reference Cards

All 16 patterns at a glance. Each card shows the pattern's intent, key signals, difficulty, and keywords.

Chapter 1Foundation

1.1Beginner

Convention File

Make implicit project rules explicit in a file the agent always reads, so it follows your standards without being told each time.

Signals

  • You find yourself typing the same correction in multiple agent sessions
  • Agent output passes tests but fails code review for style violations
  • New team members (and agents) make the same mistakes repeatedly
CLAUDE.mdconventionsproject rulescoding standards
1.2Beginner

Safety Net

Establish automated checks (tests, types, linting) as guardrails so agent mistakes get caught immediately, not in production.

Signals

  • You discover agent-introduced bugs during manual testing
  • The agent's changes pass initial review but break in CI
  • You're afraid to let the agent modify shared utilities
testinglintingtype checkingguardrails
1.3Advanced

Memory Layer

Use persistent context files to maintain project knowledge across sessions, eliminating repetitive re-explanation.

Signals

  • You spend the first 10+ minutes of each session re-explaining context
  • The agent re-discovers the same gotcha you encountered two sessions ago
  • Multi-session projects lose momentum because continuity is lost
memorypersistent contextsession continuityauto-memory
1.4Advanced

Agent-Friendly Architecture

Organize code with clear boundaries, named modules, and explicit interfaces so agents can navigate and modify it confidently.

Signals

  • The agent frequently imports from the wrong module or abstraction layer
  • You have to tell the agent "no, use the one in `/lib/payments`, not `/utils/stripe`"
  • Agent-generated code works but violates your intended architecture
architecturecode organizationmodule boundariesinterfaces

Chapter 2Context

2.1Intermediate

Context Priming

Front-load the most relevant files and decisions before making a request, so the agent starts from understanding rather than guessing.

Signals

  • Agent output is structurally correct but uses the wrong patterns, types, or conventions
  • You frequently say "no, look at how we do it in X"
  • The agent asks basic questions about your codebase that could be answered by reading a file
contextprimingfront-loadingfiles
2.2Intermediate

Scope Fence

Explicitly constrain the agent's working area to prevent drift into unrelated code, keeping changes focused and reviewable.

Signals

  • Code reviews reveal agent changes to files you didn't expect to be modified
  • Diffs are consistently 3-5x larger than the task warranted
  • The agent "helpfully" refactors code adjacent to what you asked for
scopeconstraintsboundariesdrift
2.3Intermediate

Progressive Disclosure

Reveal project complexity incrementally instead of dumping everything at once, avoiding context overload.

Signals

  • The agent's output touches systems you didn't ask it to modify
  • You provide 10+ files of context for a task that should need 2-3
  • The agent tries to "account for" every system it can see, even irrelevant ones
progressive disclosureincremental contextcomplexity managementcontext window
2.4Beginner

Anchor Point

Reference specific files, functions, and line numbers to ground the agent in concrete code rather than abstract descriptions.

Signals

  • The agent asks "which file should I look at?" — you should have told it
  • The agent modifies the wrong file or function and you have to redirect
  • Your requests use words like "the thing that handles X" instead of naming it
anchorspecific referencesfile pathsfunction names

Chapter 3Task

3.1Intermediate

Vertical Slice

Break features into thin end-to-end slices rather than horizontal layers, giving the agent complete context for each piece.

Signals

  • The agent builds infrastructure that can't be tested until other layers are done
  • Integration at the end reveals mismatches between layers the agent built separately
  • Long conversations where the agent loses context about what it built earlier
vertical slicetask decompositionend-to-endfeature slicing
3.2Beginner

Checkpoint Loop

Work in small cycles of do-then-verify instead of one big request, catching drift early before it compounds.

Signals

  • You frequently discover multiple interconnected errors in agent output
  • Reviewing agent changes takes longer than making them yourself would have
  • Errors in early code cascade into later code, requiring extensive rework
checkpointincrementalverifyiterate
3.3Advanced

Scaffold First

Have the agent build types, interfaces, and structure before filling in implementation, establishing constraints that guide the rest.

Signals

  • The agent creates data transformation layers to bridge inconsistent shapes
  • Function signatures change as the agent discovers what it actually needs mid-implementation
  • Type definitions are scattered across implementation files instead of centralized
scaffoldtypes firstinterfacesstructure
3.4Advanced

Parallel Fan-Out

Split independent subtasks across concurrent agent sessions to multiply throughput without multiplying errors.

Signals

  • You have 3+ independent tasks that follow the same pattern
  • You're building them one at a time and each feels repetitive
  • The tasks share types or interfaces but don't share implementation logic
parallelconcurrentfan-outmulti-session

Chapter 4Steering

4.1Intermediate

Test-First Steering

Write failing tests first so the agent has a concrete, verifiable target instead of an ambiguous description.

Signals

  • Agent output is structurally correct but uses wrong values, types, or behavior
  • You find yourself writing detailed prose descriptions of exact return shapes
  • The agent makes reasonable but wrong assumptions about edge cases
TDDtest-firstfailing testsspecification
4.2Beginner

Example-Driven Spec

Show the desired output shape rather than describing it abstractly, reducing interpretation error.

Signals

  • Agent output has the right logic but wrong data shape, naming, or format
  • You find yourself writing long descriptions of what the output should look like
  • The agent asks clarifying questions about format, structure, or naming conventions
examplesspecificationoutput shapeconcrete
4.3Intermediate

Negative Space

Define what the agent should NOT do, because constraints eliminate more bad output than instructions produce good output.

Signals

  • Agent output is technically impressive but over-engineered for the task
  • You think "I didn't ask for that" when reviewing agent changes
  • The agent installs dependencies or creates abstractions unprompted
negative spaceconstraintsdon'tsboundaries
4.4Intermediate

Constraint Over Instruction

Specify boundaries and invariants rather than step-by-step procedures, giving the agent room to find good solutions within your guardrails.

Signals

  • You write detailed step-by-step instructions and the agent follows them literally, missing edge cases
  • The agent's solution works but you can see a better approach it didn't consider
  • You care more about what the code *does* than how it's structured internally
constraintsinvariantsboundariesdeclarative