Context Management: The New Core Skill
Decide what AI needs to know, what to omit, and when to reset context.
The quality of AI coding output depends on prompt quality, and prompt quality depends on context quality. The same model behaves very differently depending on what information it receives.
Context Window as Working Memory
| Item | Human short-term memory | AI context window |
|---|---|---|
| Capacity | Small and attention-bound | Thousands to millions of tokens |
| Forgetting | Distraction and fatigue | Information outside the window does not exist |
| Degradation | Tiredness, multitasking | Noise, buried constraints, stale assumptions |
| Support | Notes and documentation | CLAUDE.md, project files, summaries |
Core constraint
AI reasons only from the information in context. Many complaints that "the agent ignored our rule" mean the rule was never in the active context.
Context Budget
관찰 기반 모델
This is an explanatory budget model, not a token calculation formula.
Three Context Layers
Five-Minute Session Kickoff
### Goal
- Fix partial refund behavior in the payment cancellation API and pass tests.
### Current context
- Files: `src/payment/cancel.ts`, `src/payment/cancel.test.ts`
- Rules: money uses Decimal; time is KST.
### Constraints
- Keep existing API response shape.
- Wrap failures in AppError.
### Validation
- Existing tests pass.
- Partial refund rule for 12-24 hours is covered.This small structure usually beats dumping an entire directory into context.
CLAUDE.md as Onboarding Document
Weak:
- Write clean code.
- Follow SOLID.
- Add tests.These are generic. Strong project context is specific:
## Stack
- Next.js App Router, React, TypeScript
- PostgreSQL + Prisma
- Auth: session-based JWT
## API rules
- Route Handlers return NextResponse.
- User-facing errors use i18n keys.
- Money is Decimal, not number.If a new teammate would need to know it on day one, the agent probably needs it too.
Signals of Context Overload
- The agent forgets a rule agreed earlier.
- Responses become scattered or inconsistent.
- It misses explicit instructions in the latest prompt.
- It changes style without reason.
- It keeps solving the wrong problem.
When this happens, use /compact, summarize decisions, or start a new session with a clean context
package.
64k Output Changes the Old Habit
Large outputs make "split everything into tiny prompts" less necessary. You still need to manage input context carefully, but larger coherent changes can often be requested and reviewed together:
| Old habit | Current strategy |
|---|---|
| Generate one function at a time | Ask for a module-level change |
| Split by file | Group related files for consistency |
| Ask for code only | Ask for code, tests, and docs together |
| Carry a long chat forever | Summarize, compact, or restart deliberately |
Next
Read Redefining Technical Debt to understand how AI-readable structure changes maintenance cost.