# Context Engineering

> Static vs Dynamic Context for efficient token economy.

- **Category**: Agentic AI
- **Subcategory**: SDLC
- **Canonical URL**: https://designpattern.fyi/patterns/context_engineering/

---

## Description
**Problem**: Passing entire codebases into every prompt is financially unviable, dilutes the model's signal, and leads to expensive token burn with poor results.
**Solution**: Explicitly separate context into static (always loaded rules and memory) and dynamic (on-demand retrieved documents and skills). This ensures the agent receives dense, high-signal information only when necessary.
**Source**: Osmani, A., Saboo, S., & Kartakis, S. (May 2026). *The New SDLC With Vibe Coding*. Google.



## Use Cases
- Scaling AI to navigate large, complex repositories.
- Managing agent memory across long-lived development sessions.
- Optimizing token economy for production-grade coding agents.






## Trade-offs


### Advantages

- Significantly lowers ongoing API costs.

- Improves output quality by reducing prompt bloat.




### Considerations & Drawbacks

- Requires dedicated engineering effort to design retrieval mechanisms.

- Overkill for tiny, disposable prototype scripts.

- Not suitable for tasks that require no domain-specific knowledge or persistent state.







---
**Reference**: [Original Source](https://www.kaggle.com/whitepaper-the-new-SDLC-with-vibe-coding)

