Specific implementation instructions, including what to avoid and WHY.
✅ Good: "Create POST endpoint accepting {email, password}, validates using bcrypt against User table, returns JWT in httpOnly cookie with 15-min expiry. Use jose library (not jsonwebtoken - CommonJS issues with Edge runtime)."
❌ Bad: "Add authentication", "Make login work"
<verify>
How to prove the task is complete.
✅ Good: npm test passes, curl -X POST /api/auth/login returns 200 with Set-Cookie header
❌ Bad: "It works", "Looks good"
<done>
Acceptance criteria — measurable state of completion.
Automation-first rule: If AI CAN do it via CLI/API, AI MUST do it. Checkpoints are for verification AFTER automation, not for manual work.
Task Sizing
Context Budget Rules
Small task: <10% context budget, 1-2 files, local scope
Medium task: 10-20% budget, 3-5 files, single subsystem
Large task (SPLIT THIS): >20% budget, many files, crosses boundaries
Split Signals
Split into multiple plans when:
3 tasks in a plan
5 files per task
Multiple subsystems touched
Mixed concerns (API + UI + database in one plan)
Estimating Context Per Task
Task Pattern
Typical Context
CRUD endpoint
5-10%
Component with state
10-15%
Integration with external API
15-20%
Complex business logic
15-25%
Database schema + migrations
10-15%
Dependency Graph
Building Dependencies
Identify shared resources (files, types, APIs)
Determine creation order (types before implementations)
Group independent work into same wave
Sequential dependencies go to later waves
Wave Assignment
Wave 1: Foundation (types, schemas, utilities)
Wave 2: Core implementations
Wave 3: Integration and validation
Vertical Slices vs Horizontal Layers
Prefer vertical slices: Each plan delivers a complete feature path.
✅ Vertical (preferred):
Plan 1: User registration (API + DB + validation)
Plan 2: User login (API + session + cookie)
❌ Horizontal (avoid):
Plan 1: All database models
Plan 2: All API endpoints
File Ownership for Parallel Execution
Plans in the same wave MUST NOT modify the same files.