context-engine
Installation
SKILL.md
Context Engine - AI Agent Context Management
Context Engine provides production-grade patterns for managing what AI agents know, remember, and retrieve. It covers the full lifecycle: ingestion of project knowledge, optimal packing of context windows, persistent memory across sessions, and retrieval-augmented generation for large codebases. The difference between a useful agent and a hallucinating one is context management.
Core Capabilities
- Context window architecture — token budget allocation plus greedy, tiered, and adaptive-compression packing strategies.
- Memory architecture — three-layer model (working / session / knowledge base), promotion protocol, and staleness detection.
- Code retrieval — file-level, chunk-level (RAG), and dependency-aware retrieval with code chunking and embedding guidance.
- Knowledge graph construction — codebase graph schema (nodes + edges) and graph queries that resolve agent questions.
- Window optimization patterns — sliding window with anchors, progressive summarization, selective tool-result caching.
- Memory tool & context editing — file-backed persistent memory across sessions, plus context compaction (evict stale tool outputs, summarize-and-replace history) to keep a long loop from exhausting the window.
- Long-context strategies — when to use a 1M-token window vs. RAG vs. a hybrid agent loop, budget allocation across a big window, and position/attention effects.
- Multi-agent context sharing — shared context bus and a five-element handoff protocol.