Intent SystemsIntent Systems

Context Engineering

The practice of structuring and delivering the right context to AI agents so they can reason effectively about complex systems.

Why Context Engineering Matters

AI models are remarkably capable. GPT-4, Claude, Gemini — they can write code, reason about architecture, and refactor complex systems. But they share a fundamental limitation: they don't know your codebase.

Every AI coding session starts in a dark room. The model has general programming knowledge but zero understanding of your specific system — the naming conventions, the implicit contracts between services, the architectural decisions made three years ago that still shape every new feature.

Context Engineering is the discipline of solving this problem systematically rather than ad hoc.

The Problem It Solves

Most teams "do context" by manually stuffing information into prompts. Copy-paste a file, write a paragraph of explanation, hope the model picks up on the right patterns. This works for simple tasks but collapses at scale:

  • It doesn't compound. The context you assembled for Monday's task is gone by Tuesday.
  • It doesn't transfer. What one engineer figures out about prompting stays in their head.
  • It doesn't scale. Complex tasks need context from multiple parts of the system simultaneously.

Context Engineering replaces this manual approach with structured, persistent, machine-readable context that lives alongside your code.

How It Works in Practice

A well-engineered context system typically includes:

  1. Hierarchical documentation — Context organized at multiple levels (repo, module, component) so agents can progressively load what they need
  2. Intent declarations — Explicit statements about what each part of the system is for, not just what it does
  3. Relationship mapping — How components connect, depend on, and communicate with each other
  4. Decision records — Why things are built the way they are, so agents don't unknowingly violate architectural constraints

The key insight is that context should be structured for machines, not just readable by humans. Traditional documentation is written for human consumption — narrative, implicit, full of assumed knowledge. Context Engineering produces artifacts that AI agents can parse, navigate, and act on.

Context Engineering vs. Traditional Documentation

Traditional docs explain how to use a system. Context Engineering explains how to work on a system. The audience is different (AI agents and new contributors vs. end users), the format is different (structured, declarative vs. narrative), and the maintenance model is different (automated, CI-integrated vs. manual, often stale).

Getting Started

The simplest entry point is adding AGENTS.md files to key directories in your codebase. Each file declares the intent, boundaries, and patterns of that area. AI agents that support these files (Cursor, Claude Code, Copilot) will automatically read them when working in those directories.

From there, you can layer on more sophisticated approaches: Intent Nodes for hierarchical context, Progressive Disclosure for efficient token usage, and automated maintenance through CI pipelines.