Extreme AI Programming · Chapter 4
The Second Punch-Card Era
Early computers ran on stacks of punched cards fed into a reader. Today's agent setups work the same way: markdown files, instruction documents, skills, rules and system prompts, long blocks of text written by a human and fed wholesale to a machine that reads them top to bottom.
Different cards, different reader, same primitive interface.
When the industry started using AI seriously, the first problem we hit was that we had no clean way to give the agent context, so we reached for the simplest format that could work, and Markdown won.
How a context window works
Look at what happens under the hood of an agent session, and every approach so far fails for the same reason: it treats the context window as a place to dump everything that might be relevant, rather than as something engineered for a job.
Models are stateless. Every time you send a message, the model receives the whole conversation so far, the system prompt, tool definitions, and every previous turn, and reads from the top before producing a single token. Anything that looks like memory is the harness writing state back into the next request.
In practice, that means every irrelevant rule, every contradictory instruction, and every abandoned debugging trail still in the conversation is re-read on every turn, weighing on the relevance signal in the part that actually counts. With agents increasingly billed by usage, you now pay for that debris on every turn. Every token either strengthens or weakens the instruction.
Even when the context is assembled with discipline, the question remains: how does the agent find the right things to include? Here, the current tooling shows its second limit. For the rules and decisions that govern a codebase, most agents still rely on grep, or more precisely ripgrep, as their primary retrieval mechanism. Some harnesses add language servers or semantic indexes for the code itself, but those do little for a team's decisions, which still sit in loose text files. Grep finds files by matching a regular expression, and the agent then reads whole files into the window. The first step is deterministic but brittle: the same pattern returns the same files every time, but rename a concept or reach for a synonym and the right file silently fails to match, and even a match surfaces a whole file rather than the passage that matters. The second step is where the non-determinism enters: the agent guesses which matches to read, and how many. It is throwing a net into the ocean and hoping, across two oceans at once: the codebase and the rules meant to govern it. We cannot trust a brittle search followed by a guess to assemble a deterministic context, and as a profession, we haven't yet given the agent anything better to retrieve.
Why Markdown is not the final answer
The use of Markdown for context has gone through three stages.
The first was a single instruction file per repository. Anthropic's Claude Code reads CLAUDE.md. Copilot reads its own file, Cursor reads another, all the same essential idea. For a short while, it works. Then it grows. Each session adds a rule, a clarification, a line about an edge case that bit someone last Tuesday, and no session removes anything. After a few months, a two-thousand-line file is unremarkable, and the agent's window fills with instructions before it has begun thinking about the problem.
The second was to break the single file into many smaller ones and load them selectively. The collection got the cute name “skills”: a folder of Markdown documents covering architecture, standards, security posture, whatever seemed worth telling the agent. A skill, today, is a lightly structured Markdown document in a folder, pulled into the window when something decides it might be relevant. Bloat doesn't go away by spreading it across more files. It magnifies. And the files drift: a rule says the team handles login with its own self-hosted session store three months after the team moved sign-in to Okta; the agent reads it, writes the wrong code confidently, and nobody can trace where the offending instruction came from because it is buried in one of hundreds of overlapping, forgotten documents.
The third was to move the files out of the codebase and into a separate repo or a wiki. That makes review and access control easier, but moving the files doesn't change how they behave. A wiki fills up with half-relevant pages as fast as a folder does, and the rules still change on a different schedule than the code they describe, so they go stale just as they did in the old place.
The easiest prompt in the world, at the end of a session, is "update the skills to reflect what we just did," and I wonder how often anyone reviews that update before it becomes the next instruction the next agent reads.
From documents to a database
The fourth evolution does not start with a new file format. It starts with a different idea of what we are trying to maintain. A team's instructions to its agents are no longer a pile of passive documents.
They are a knowledge graph of what the team has decided. Architectural choices, conventions, security stances, the reason a service ended up split into three, each connected to the others: this decision made because of that one, this rule dependent on that constraint, this convention in tension with another. A flat file collapses those relationships into a paragraph that may or may not survive the next merge. A wiki does the same in a friendlier wrapper. Neither can tell what is connected to what.
The answer is a map of decisions that feeds the agent the right context when it needs it. The decisions and rules a team needs the agent to act on stop being lines of text in overlapping files and become objects in their own right, with identity, ownership, history, and explicit relationships to each other and to the code. Retrieval becomes a precise question with a precise answer rather than a net thrown into the ocean, and context becomes the smallest set of things that actually matter for the task. What that looks like when you actually build it is the subject of Part Three.
All of the technology this needs is available today, and at Mindset AI it has been the most fundamental shift in how our whole team gets value from coding agents.