Plan AX: Context Engineering — Feed the Right Context, Get It Right the First Time
Document project memory → spec first → give enough relevant files → iterative feedback → verify & commit
- Time
- 1-3 hours / task
- Cost
- Low
- Difficulty
- Advanced
Best for
Steps
Build project memory
20-40 min (one-time investment)Claude Code + you
Use CLAUDE.md / AGENTS.md to capture architecture conventions, common commands, code style and the 'gotchas to avoid', so every session starts from the same understanding. Project memory is the persistent context you feed the AI — write once, benefit for the long run.
💡Only write what's high-frequency: directory layout, build/test commands, dependency constraints, and traps you've hit; keep it lean and iterable rather than a long document nobody maintains.
Spec first
10-20 minClaude Code / Claude
Write the inputs, outputs and acceptance criteria up front, and have the AI propose a plan before writing code; if it doesn't meet the spec, rework. The spec is the most important part of the context — it decides what the AI should and shouldn't build.
💡Put 'when X happens, then Y' into the spec; ask the AI to restate your requirements to confirm alignment before it starts.
Feed enough relevant files
10-20 minClaude Code
Use @file references to bring the relevant code, interfaces and docs into context, bounding the change scope so the AI doesn't improvise. Enough context plus a clear boundary is the key to getting it right the first time.
💡Feed only the files directly involved (interfaces, data structures, call sites) rather than dumping the whole repo; pointing the AI at the right files to read itself also works.
Iterative feedback
30-60 minClaude Code / Claude
Feed the error message, reproduction steps, and expected vs. actual output back together, so the AI fixes within the correct context. The more complete the feedback, the less the AI has to guess and the sharper the fix.
💡Paste the raw error log plus a minimal reproduction; saying 'expected vs. actual' beats just saying 'it doesn't work'.
Verify and commit
20-30 minGit + tests
Run tests, review the diff, confirm the change fits the architecture constraints, then commit in small steps. Verification turns the AI's correctness into your certainty.
💡Scan the diff for unexpected changes before committing; commit every verifiable unit so rollbacks are easy and bugs localize fast.
Retrospect and update memory
10-20 minClaude Code + you
Write the traps you hit and the conventions you added back into CLAUDE.md / AGENTS.md, so the next session starts from a higher baseline. Context engineering compounds: each update makes the AI understand your codebase a little better.
💡Have the AI extract the takeaways from the conversation and append them to the project memory; keep entries short and actionable so they don't rot.
Tools involved
Pitfalls to avoid
Letting the AI loose without constraints
Too much, too messy context
Judging output without the reasoning
Never accumulating project memory
Related Workflows
Plan G: AI Coding Workflow (Requirements to Delivery)
Clarify requirements → technical plan → scaffold → incremental coding → test & debug → review & commit
- Time:
- 1-4 hours / feature
- Cost:
- Medium
- Difficulty:
- Advanced
Plan AY: From Vibe Prototype to Viable Product — Pre-Launch Polish Checklist
Lock down requirements → make it testable → error handling → performance → maintainability → documentation
- Time:
- 0.5-2 days
- Cost:
- Medium
- Difficulty:
- Advanced
Plan AZ: AI Coding Security & Testing Checkup — Mandatory Before Shipping
Input validation → secret management → dependency audit → automated tests → review checklist
- Time:
- 1-2 hours / delivery
- Cost:
- Low
- Difficulty:
- Advanced