Smart AI

This blog specializes in smart usages of Generative AI for professional use.

Document-Driven AI: Mastering "Context Anchoring" for Better Engineering
Published 17.3.2026 by Christian Gintenreiter

If you work with AI coding assistants long enough, you inevitably hit a wall. You start a session, build some great momentum, make a few architectural decisions, and write some solid code. But as the session drags on into day two or three, the AI starts making weird mistakes. It suggests patterns you explicitly rejected yesterday. It forgets the constraints of your database.

You find yourself in a vicious cycle: you're afraid to close the chat window because all your hard-earned context is trapped inside it, but keeping it open makes the AI's performance actively worse.

The solution to this isn't a bigger context window. It’s a shift in how we work: moving from Chat-Driven Development to Document-Driven AI.

Document-driven AI instead of transient chat

The 3 Cs Haven't Changed

Even with AI in the mix, software engineering relies on the same three pillars it always has: Context, Communication, and Collaboration.

A chat interface is a stream. It is transient, noisy, and chronological. It's great for ideation, but terrible for transporting state or knowledge. If you want to build durable software, you need artifacts. You need to externalize your decisions into a living document—a practice known as Context Anchoring.

This is the logical continuation of building a Shared Map before coding: while the map provides the initial vision and alignment, Context Anchoring ensures that the map remains accurate and authoritative as the implementation evolves.

How Context Anchoring Works

Context Anchoring means treating decision context as an external state. Instead of relying on the AI's chat history, you maintain a living markdown document alongside your code.

Effective anchoring relies on two distinct layers of context:

  1. The Priming Document (Project-Level): A relatively stable file that outlines the tech stack, overarching architecture, and coding conventions. It tells the AI: "Here is how we build things here."
  2. The Feature Document (Feature-Level): A rapidly evolving, short document (under 50 lines) that tracks the current state of a specific task. It contains decisions made, the reasoning behind them, rejected alternatives, active constraints, and open questions. It tells the AI: "Here is exactly where we are on this feature, and how we got here."

The Feature Document is essentially an "ADR in progress." While traditional Architecture Decision Records (ADRs) are often written after the fact, Context Anchoring brings that rigor into the development loop. As Rahul Garg explains, this also solves the collaboration problem: if your teammate picks up the work in a new AI session, the Feature Document ensures their AI doesn't re-propose the very abstractions you already rejected.

Context Anchoring through feature documents

The "Warm Start" Advantage

By keeping a Feature Document updated, you unlock the ability to close your chat sessions without anxiety.

When you sit down the next day, you simply open a fresh AI session and provide the Feature Document. Instead of spending 20 minutes re-explaining the constraints and re-litigating rejected libraries, the AI achieves full alignment in seconds. This is a "Warm Start."

Furthermore, it forces intellectual clarity. Summarizing why you chose a specific messaging queue forces you to articulate your reasoning, revealing gaps in your own logic that a messy chat would have hidden.

The Professional Shift: From Writer to Curator

AI hasn't eliminated the need for engineering rigor; it has made it more rewarding. The role of the engineer is shifting from being a pure Writer to a Curator.

  1. Ideation: Use the chat to explore, debate, and "slop around" with ideas.
  2. Crystallization: The moment a decision is made, extract it into an artifact.
  3. Persistence: Use that artifact to anchor every subsequent session.

This isn't new; we've known the value of ADRs, Design Docs, and meeting minutes for decades. But AI has made the "Organizational Amnesia" tax immediate. When human teams have different "pictures" in their heads, work slows down; when an AI has the wrong picture, it builds the wrong system at 100x speed.

Stop slopping around in endless chat windows. Anchor your context, and start building.


Sources

Title Link Date Type
Context Anchoring Martin Fowler / Rahul Garg March 17, 2026 Article