11 / 87 · 02 AI-Augmented Test Design · Context Feeding Strategies← prev⊞ allnext →☰ Read as one page
3.2The Context Hierarchy
Not all context is equal. When your token budget is limited, prioritize ruthlessly:
Priority 1: The actual specification (OpenAPI schema, AC, Figma annotations)
Priority 2: Existing test patterns in the codebase (so AI matches style)
Priority 3: Domain constraints (business rules not in the spec)
Priority 4: Technical stack details (frameworks, helpers, fixtures)
Priority 5: Examples of good vs bad tests from prior reviews
Why this order? Priority 1 prevents hallucination (the AI tests what actually exists). Priority 2 prevents style drift (the AI writes tests your team recognizes). Priority 3 catches business logic that specs often omit. Priority 4 ensures the code compiles. Priority 5 is a bonus that improves quality over time.