Context engineering · Coding agents

Give a coding agent your team's context, and it writes your team's code

Claude Code knows how to program. It doesn't know why your system is shaped the way it is, which decisions are settled, or which mistakes already hurt you. I built a knowledge layer that tells it, and proved the difference with blind tests on real tickets.

The Vault

A memory my agents and I keep together

1 · Collect

Pull requests, design decisions, tickets, meeting notes, and agent sessions land as source files that are never edited.

2 · Compile nightly

A model turns them into linked pages. Plain code writes the files and checks that every citation resolves.

3 · Load the smallest map

A session starts from a short index and opens deeper pages only when the task needs them.

4 · Rules at the edit

When an agent edits a file that a team rule covers, the rule is handed to it right then.

97% leaner startup context: agents get a map, not the pages

13k lines of Python, 900+ tests

The proof

Same tickets, same models, context on and off

Each run started from the commit before the original work, with a snapshot of the Vault from that day and the answer removed. Blind judges scored every change against an answer key and 1,277 real review comments.

Setup (24 runs each)Accepted changesBlocker / major bugs$ per accepted changeAvg minutes
Opus, no Vault113 / 6$7.7912.8
Opus + Vault160 / 0$4.129.1
Sonnet, no Vault73 / 13$4.7010.5
Sonnet + Vault81 / 9$3.318.2

0 of 8 → 9 of 16

Runs that pushed back on a ticket asking for a tool that already existed.

3.4 → 4.0

Fit with the codebase, the score that moved most (out of 5, Opus).

The ontology pipeline

File knowledge where it's needed, not where it was learned

Knowledge tends to be filed where it was learned, so a rule learned on one project never reaches the other repositories it applies to. I solved it at the system level with the first four steps of Jessica Talisman's ontology pipeline.

1 · Vocabulary

One ID and one sourced definition per term. A concept needs two pages about it before it counts.

2 · Metadata

Every page says what it's mainly about and, where it matters, when it applies. Checked on every write.

3 · Taxonomy

Repositories roll up to teams and platform groups, so a rule for a group reaches every repository in it.

4 · Thesaurus

Alternate names and known name collisions, so search finds a page by whatever name you use.

95% vs 76%

Agents read the right rule before their first edit, with the pipeline vs without, on rules filed far from the code they govern. Steps 5 and 6, a formal ontology and a knowledge graph, are skipped by design: the reader is a model reading prose.

Rules at the edit

Deliver the rule at the moment it applies

A written rule only helps if the agent has it at the right moment. Each rule now arrives the moment the agent edits a file it covers, and agents correct course mid-edit.

0 → 6

of 8 implementations done to standard

0 → 5

of 8 accepted as is

Dogfooding

I measure my own tooling the same way

What did the agent see?

A report reads my session logs back and shows what context each session was actually given: searches, hits, pages opened, and rules delivered.

What happened next?

Each session links to the changes it produced and to any later fix on the same lines, so quality is measured, not assumed.

When inefficiencies arise, test and correct

A blind test flagged a workflow step that doubled cost without improving results. Cutting it halved the cost.

Let's compare notes

Want your coding agents to write your team's code?

I'm always up for comparing notes on context for coding agents and knowledge systems that keep up.