The C² Method · the brain
C² gives whatever you are building a brain.
An app, a website or a whole repository. Most agent tools give it a memory, which is a record of what happened. A brain also knows what is true, and knows which of its rules bind which code. C² keeps all 3 in git beside the code, and the brain grows with every session.
Memory is not a brain
- Memory
- What happened. Session briefs, reviews, finished work. It is useful the week it is written, and most of it is never read again.
- Knowledge
- What is true and how to work here. Requirements, decisions, patterns, gotchas and runbooks. This is memory that someone turned into a rule.
- Governance
- Which rule binds which code. A pattern that says it governs a folder is handed to the agent before the agent changes that folder. Without this, knowledge is a library nobody has to visit.
I call the third one the needle. The full argument, and what I found when I measured my own repository, is in Context governance: the needle on the compass.
It grows with every action
- 01 · You build
- A session changes code, working from a brief that sits under a requirements document.
- 02 · It remembers
- The session ends with a brief: what changed, what was learned, what is next. That is memory.
- 03 · It learns
- When a lesson repeats, it becomes a pattern, a gotcha or a decision. That is knowledge.
- 04 · It governs
- The new document says which code it binds. The next agent to touch that code reads it first.
Each loop leaves the brain a little larger and a little more in charge. In both examples below you can press play and watch it happen, month by month.
Example 1 · an app ecosystem
Harbor: 5 apps, an API and shared code around one brain
Click Compass to see the needle. The blue and green lines are documents that govern code. The red files are dark. Then press play and watch 14 months of work build the brain one month at a time.
- 704 documents
- 512 records of what happened, 156 statements of what is true, 19 on how to work, 17 in flight.
- 998 code files
- Across 5 apps, an API, 2 shared packages, workers and scripts.
- 87.6% coverage
- The share of code that a pattern, a decision, a gotcha or a runbook has declared it governs.
- 12.4% dark code
- The newest work. It was built and briefed, and nobody has yet written down what was learned.
Example 2 · one app
Fieldbook: a single app and its brain
Click src in the folder list to open the app and see its features. Then click Close the gap: the list starts with the 2 dark features and the session briefs a rule for each could be written from.
- 227 documents
- 170 records of what happened, 47 statements of what is true, 6 on how to work, 4 in flight.
- 310 code files
- One source folder with 8 features, plus tests and release scripts.
- 76.1% coverage
- Eight features. Six have a pattern that governs them.
- 23.9% dark code
- Export and settings, the 2 newest features. The worklist names them first.
Once you can see it, you can close the gap
A real repository will have gaps these 2 do not. Mine did. The first time I saw my own brain drawn, I could see where the context reached the code and where it stopped, and I was able to start closing the gap.
The tool gives you the same starting point. It writes a worklist beside the drawing: the documents ready to declare what they govern, the folders nothing governs yet, and the files you keep relearning. A skill in the kit works through that list with your agent, one document at a time.
Draw your own
One command, in any repository
Clone the kit, install its one dependency, and point it at your repository. It reads the files and the git history, and writes a single HTML page you can open offline.
git clone https://github.com/waymakerone/c2method cd c2method/brain && npm install node brain.mjs /path/to/your/repo