C² Method5 min read
Context governance: the needle on the compass
The power of a contextbase is not how much it holds. It is how much of the work it governs.
I thought my contextbase was strong because it was big.
Sixteen months of building with agents had left 6,126 documents in one repository. About 9 million words of plans, briefs, decisions and lessons, sitting beside 6,014 source files. I drew it as a graph to show it off. Then I asked the graph a question I had never asked: how much of that code does any of this context actually govern?
The answer was about a tenth. That number changed what I think a contextbase is for.
The power of a contextbase is not how much it holds. It is how much of the work it governs.
Volume measures the wrong thing
Counting context is natural. Every session ends with a brief. Every review leaves a file. The folder grows, and growth feels like progress.
Most of that growth is a record of what happened. It is useful the week it is written and rarely read again. In my repository, 67% of those records are referred to by nothing at all. No other document points at them. No agent is ever sent to them.
So I stopped asking how much context I had. I started asking where it sits and what it points at.
Four kinds of memory
Memory is not one thing. A 2023 paper from Princeton, Cognitive Architectures for Language Agents, divides an agent's memory into working memory and 3 long-term memories — episodic, semantic and procedural. I have used those 4 as a compass for a while, because a compass is easier to hold in your head than a taxonomy.
| Direction | Memory | The question | In a C² repository |
|---|---|---|---|
| North | Working | What is in flight right now? | Active prompt briefs and tasks |
| East | Episodic | What happened? | Session briefs, reviews, finished work |
| South | Semantic | What is true? | Requirements, decisions, patterns, gotchas |
| West | Procedural | How do I do things here? | Runbooks, skills, the Router |
The compass tells you where a piece of context sits. That is all it tells you. A pattern document and the code it was written about can share a repository for a year without anything saying that one binds the other.
That gap is the whole problem.
Governance is the needle
Governance is not a fifth direction. It is the needle.
The 4 directions are where memory sits. The needle is what points a specific piece of South or West at a specific piece of work. This decision binds that code. This runbook is how that job gets done.
A pattern that says how every server function must authenticate governs those functions. A decision that fixes an identifier format governs every table that carries one. Take the needle away and South and West are a library — true, well written, and optional.
Stuart Leo
Without the needle, South and West are a library. With it, they are law.
Volume mostly measures East. A brain gets powerful when East is turned into South and West, and South and West are pointed at the work.
Declare it, don't guess it
Whether a document governs a piece of code should not be a guess. So the document says so, in its own frontmatter:
governs:
- server/functions/**
- shared/types/organization.ts
Until a document declares, governance can be inferred. A South or West document that names a file, or the folder a file sits in, is taken to govern it. Inference gives any repository a number on day one, and that is how I measured mine.
It is only a proxy. The rules that matter most often apply by scope and name no file at all, and inference cannot see them. Declaring is how the number becomes honest.
The needle fills North
Here is the part that makes this more than a scorecard.
North is working memory — what an agent holds at the moment it acts. It is small, and what goes into it decides what gets built. If the contextbase knows which documents govern a file, an agent about to change that file can be handed exactly those documents, most specific first.
Today I maintain that routing by hand. I write pointers into a Router file and hope the agent follows them. When the Router gets too big, the agent stops following. Declared governance computes the route from the context itself.
A graph you can look at is a picture. A graph that decides what an agent reads before it writes is part of the factory.
Four numbers
One number invites gaming. Four describe a brain, and each is a reading of the compass.
| Number | The question | On the compass |
|---|---|---|
| Coverage | What share of the work is governed? | How far South and West reach |
| Dark code | What does nothing govern? | Where the needle points at nothing |
| Compounding rate | How much experience became knowledge? | East turned into South and West |
| Dead context | What is never recalled? | East that never returns to North |
The Princeton paper describes the third one from the agent's side — reflecting on episodic memory to produce new semantic knowledge. Compounding is that step, done by a team, on purpose.
What my own repository showed
One production monorepo, measured on 22 November 2026. Governance was inferred, because I had declared nothing yet.
- Some document names 42% of source files. A South or West document names 10%.
- 32% of source files are named only by records of past work. Nothing durable speaks for them.
- Counting a file as governed when a durable document names its folder, coverage is 47%. The other 53% is dark code.
- A year ago South and West named 18% of the code that existed then. Today it is 10%. The code grew faster than the governance.
- In the last 90 days I wrote 791 records of what happened and 275 documents about what is true or how to work.
I had guessed that a repository drifts over time from little context and much code toward much context and little code. By volume it does not. Context and code grew together.
By governance, the guess survives as a goal. In a healthy repository coverage rises and dark code falls. Mine has been going the other way, and I would not have known without the numbers.
What I have not worked out
This is version 1, and it has holes.
- Specificity. A document claiming to govern everything would read as full coverage. A document that governs 20 files should count for more than one that governs 2,000. I have not written that rule.
- Promotion. Compounding rate needs a definition of when a record has become knowledge. A new decision that cites the briefs it came from is the obvious signal. It is untested.
- Staleness. A document that governed code a year ago may not describe it now. The needle should weaken when the code changes and the document does not.
- One repository. Every figure above is a single data point — mine.
Start with one document
You do not need the graph to begin. Pick the pattern or decision you most wish your agents would read. Add 3 lines of governs: to it, naming the code it binds. Then, the next time an agent touches that code, hand it that document first.
That is one needle. Coverage is what you get when you keep adding them.
The tool that draws the brain and reports the 4 numbers is in the C² kit. Every run also writes a worklist: the documents ready to declare, the darkest folders, and the files I keep relearning. A skill in the kit works that list with an agent, one document at a time. Start here: see what a contextbase is, why not to draw the graph on day one, or read the method.
Part of the C² Method. Start with the method
Put this in your repo
The C² Method is free and open. Point your agent at the kit and get started in minutes.