What Codee3 does to a repository
Seven steps. Six of them are automatic, and the one that is yours is the one no tool can do for you. Nothing here asks you to change how you write code.
One repository, seven steps
- src/
- docs/
- README.md
- package.json
- Yours
Your repository, before anything
A working codebase with documentation somewhere in it. No prerequisites, no framework requirement, no minimum size.
- Automatic
One command
Installation is additive. It writes new files beside your tree and never overwrites an existing one.
- Automatic
The structure appears
Five spine documents covering the recurring roles, a navigation hub as the entry point, and an empty domain tree waiting for your subjects.
- Automatic
Your agents are pointed at it
A small redirect block is written into each detected tool’s own instruction file. Your existing content in those files is left exactly as it was, and the block is delimited so you can delete it.
- Yours
You write down what is true
This is the part that is yours, and it is the part that matters. Codee3 does not read your source code and does not generate your knowledge — a governed layer full of confident, unverified generated prose would be worse than no layer at all. Start with one domain and one decision.
- Yours
The guards go into CI
Three lines in a workflow file. The checks are zero-dependency Node scripts — no account, no token, no network call, nothing transmitted.
- Yours
From then on, it is just the repository
Knowledge changes in a pull request, beside the code it describes, reviewed by the same people. The guards fail the build if the structure breaks. There is nothing to log into and nothing running when you are not.
The command, in full
Codee3 is a scaffolder. It writes 69 files into the target repository and wires 12 npm scripts into package.json. It is non-destructive: it never overwrites a file that already exists.
npm install
npm run brain:init -- /absolute/path/to/your/repoWhat lands is plain Markdown and zero-dependency Node scripts. They live in your repository and are version-controlled alongside your code, which means they are reviewable in a pull request like anything else.
- src/
- components/
- index.ts
- docs/
- architecture.md
- README.md
- package.json
- .ai/
- 00_NAVIGATION.md
- PROJECT-BRAIN.md
- DECISIONS-LEDGER.md
- CURRENT-REALITY.md
- CHANGELOG-DELTA.md
- EXECUTION-QUEUE.md
- domains/
- 00_INDEX.md
- AGENTS.md
- tools/brain/
The additions sit alongside the existing tree. Installation is additive and never overwrites an existing file.
Scaffolded scalable-brain filing system into /path/to/your/repo (brain kit v0.2.2) created (69): + .ai/00_NAVIGATION.md + .ai/CHANGELOG-DELTA.md + .ai/CURRENT-REALITY.md + .ai/DECISIONS-LEDGER.md + .ai/EXECUTION-QUEUE.md + .ai/PROJECT-BRAIN.md + .ai/domains/00_INDEX.md + .ai/domains/example/00_INDEX.md + .ai/domains/example/01_OVERVIEW.md + .cursor/rules/brain-routing.mdc + AGENTS.md + tools/brain/... (57 files: guards, engines, CLIs) wired into package.json: brain:status, brain:check:no-versioning, brain:check:structure, brain:check:skills-router, brain:check:references, brain:check:record, brain:check, brain:refs:radius, brain:adopt, brain:skills, brain:version, brain:check:updates, brain:upgrade agent tools detected: Cursor → connect the brain to them so it works no matter which one you run: `npm run brain:adopt` (preview — shows exactly what it would add) `npm run brain:adopt -- --apply` (wire them; only adds a removable redirect block)Five spine documents and a tree of domains
The governed .ai/ directory sits alongside your existing code rather than reorganising your source tree. Inside it are a navigation hub, a tree of domains, and five spine documents that between them hold decisions, reality and sequence.
PROJECT-BRAIN.mdCANONICAL- the operating laws
CURRENT-REALITY.mdWITNESS- what is actually built, with evidence
DECISIONS-LEDGER.mdCANONICAL- locked decisions with stable IDs
EXECUTION-QUEUE.mdCANONICAL- sequenced work with explicit readiness
CHANGELOG-DELTA.mdWITNESS- append-only history
Authority classes and verified dates
Every document in the governed directory carries a plain-text header declaring its epistemic status. Two fields do the work: what kind of document this is, and when somebody last confirmed it.
# Payment Processing Strategy
- Authority-Class:
- CANONICAL
- Verified-At:
- 2023-10-15
Verified-At records when a document was last confirmed. That makes staleness visible and inspectable to a reader or an agent. It does not prove the document’s content is still correct — a date is evidence of attention, not of accuracy.
The four authority classes
- CANONICAL
- locked local law; constrains everything below it
- WITNESS
- what is actually true now, with evidence
- DERIVED
- indexes and routing; link upward, never redefine canon
- ABSTRACTED
- domain overviews and leaves
Index-first reading
Agents are routed through indexes: read a folder’s 00_INDEX.md, find the relevant domain, then open the one leaf document the task needs.
Bulk-reading a whole domain is discouraged at every step of that route. The point is that per-turn context cost stays roughly flat as the repository grows, rather than rising with it.
Pointing the tools you already use at one source
brain:adopt detects which AI coding tools the repository uses and writes a small, removable redirect block into each tool’s own instruction file. It previews every change first, is idempotent, and never overwrites the rest of the file.
- Tool
- Codex
- File
AGENTS.md- Purpose
- The root instruction file read by Codex and, increasingly, by other tools that adopted the same convention.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- Claude Code
- File
CLAUDE.md- Purpose
- Project memory, loaded at session start.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- Gemini CLI
- File
GEMINI.md- Purpose
- Project instructions for the Gemini CLI.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- GitHub Copilot
- File
.github/copilot-instructions.md- Purpose
- Repository-wide custom instructions in VS Code.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- Cursor
- File
.cursor/rules/brain.mdc- Purpose
- A rule file in the current `.cursor/rules` format, rather than the superseded single-file convention.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- Windsurf
- File
.windsurf/rules/brain.md- Purpose
- Workspace rules.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- Cline
- File
.clinerules/brain.md- Purpose
- Project rules directory.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- Continue
- File
.continue/rules/brain.md- Purpose
- Project rules directory.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- JetBrains Junie
- File
.junie/guidelines.md- Purpose
- Project guidelines read by Junie inside JetBrains IDEs.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
- Tool
- Zed
- File
.rules- Purpose
- Zed’s project rules file.
- Points at
.ai/00_NAVIGATION.md
The block written into AGENTS.md
<!-- codee3:begin — removable. Delete this block to detach this tool. -->
Read `.ai/00_NAVIGATION.md` before anything else. It is the entry point to this
repository's governed knowledge.
- Route through indexes. Read a folder's `00_INDEX.md`, then open the one leaf
you need. Do not bulk-read `.ai/`.
- Every governed document declares `Authority-Class` and `Verified-At`.
- On conflict, CANONICAL wins. DERIVED documents link upward and never redefine
canon.
<!-- codee3:end -->Illustrative shape of the block. The exact wording is written by `brain:adopt`, which previews every change before applying it and never overwrites the rest of the file.
This points every tool at the governed .ai/ directory instead of forking into per-tool copies. It does not make different agents reason identically — it gives them shared governed grounding to reason from.
Five checks, wired into CI
Five zero-dependency guards run under npm run brain:check. Each one exits non-zero when its invariant is violated, which is what lets any CI system fail the build on it. They check the shape, naming, reference and decision-record integrity of the governed directory — not the factual accuracy of its prose.
brain:check:no-versioningfails on versioned names in the brain (v2, api-v2, FooV2, mk2)
brain:check:structureevery folder holding documents must have an index; no two siblings share NN_ prefix; warns if index has no Authority-Class
brain:check:skills-routervalidates the skill-routing contract
brain:check:referencesregistry declares each canonical fact, its path, rename history. Surviving mentions of retired names fail the build (reference-drift guard)
brain:check:recordguards the decision record itself: fails if DECISIONS-LEDGER.md is missing, unreadable, truncated or carries two records under one id, or if an agent surface presents a decision the ledger does not contain or shows superseded text as current
codee3 / brain:check:no-versioningFailed— 3 versioned reference(s) in .aiViolations reported by brain:check:no-versioning: path, matched pattern, and offending name Path Rule Name .ai/domains/payments/00_INDEX.md:1 [v<n>] v2 .ai/domains/payments/00_INDEX.md:5 [<name>-v<n>] i-v2 The brain owns change — rename to a timeless name; record the evolution in CHANGELOG-DELTA.md.
codee3 / brain:check:structurePassed— every document folder is indexedcodee3 / brain:check:skills-routerPassed— routing contract validcodee3 / brain:check:referencesPassed— no retired names still referencedcodee3 / brain:check:recordPassed— decision record intact
brain:check exited 1 — 1 of 5 guards failed
A summary regenerated from your own files
brain:status emits a read-only summary of the governed directory. It is faithful — it equals its sources — and deterministic: the same files produce byte-identical output, with no clock and no randomness involved.
It stores nothing and owns nothing. A --json flag emits the same content for machines, under the codee3.repository-intelligence schema.
Codee3 · Your Repository Brain A living project brain your AI agents can use — regenerated from your repository, owns nothing. ────────────────────────────────────────────────────────────────────────── ● HEALTHY — Your brain is in good shape; nothing needs attention. 9 documents tracked · 0 loose ends Brain health ✓ Every document's origin is tracked ✓ No contradictions left unresolved ✓ Generated summaries stay labelled and current ✓ No loose ends dropped silently ✓ Only the right files can define the truth What you own — active now ✓ Repository Intelligence your repository explains itself in one glance ✓ Brain health guards no-versioning, structure, skills routing, references & the decision record stay correct ✓ Agent adoption connect the brain to every AI tool you use ✓ Skills router route work to the right on-demand skill ✓ Reference blast-radius see what a change touches before you make it ✓ Brain version the kit release this brain is running ✓ Update check know when a newer kit release is available ✓ Upgrade the brain adopt a newer kit release non-destructively Also included — the full reference discipline (advanced, opt-in) · Advanced governance the full self-governing discipline — advanced, opt-in for teams that want it What needs attention ✓ Nothing. Your brain is healthy — every check is green. This is a read-only summary, generated fresh from your own files — not a second copy to maintain. Prefer machine-readable output? Run `npm run brain:status -- --json`. ✗ ACTION REQUIRED — 1 issue(s) to fix before relying on the brain. 12 documents tracked · 0 loose ends Brain health ✓ Every document's origin is tracked ✓ No contradictions left unresolved ✗ Generated summaries stay labelled and current — 1 to look at ✓ No loose ends dropped silently ✓ Only the right files can define the truth What needs attention ✗ Teach: projection carries no `Verified-At:` — its staleness is not detectableEverything in the box
The complete list, with the status of each claim stated beside it rather than assumed.
Non-destructive scaffolding (brain:init)
Writes 69 files into your repository and wires 12 npm scripts into package.json. Never overwrites existing files.
Agent surface adoption (brain:adopt)
Detects ten supported AI coding tools and writes a removable redirect block into their instruction files, pointing them all at the .ai/ brain.
Structural guards (brain:check)
Five zero-dependency CI-ready checks that fail your build on versioned names, missing indexes, broken references, invalid routing, and a decision record that is missing, corrupt, or contradicted by what an agent surface shows.
Reference blast-radius (brain:refs:radius)
Given a canonical fact, returns every document that references it, so you can fix renames everywhere in one pass.
Repository Intelligence (brain:status)
A read-only, faithful, and deterministic summary of the brain's health. Regenerated from your files, owns nothing. Supports --json output.
Skills routing (brain:skills)
Measures the per-repository context cost of your skills, loading them only when an agent actually triggers them.
Version and updates
Cached update check for release information at most once per 24 hours. Sends no repository content or telemetry. Non-destructive upgrade command.
Advanced governance layer
Executable authority chains, supersession rules, the five obligations as executable checks, and a structural-change compiler.
What you author yourself
Codee3 installs the structure, the routing and the structural guards. It does not author your knowledge for you.
After installation you have a structurally healthy but empty corpus, marked throughout with (replace me) placeholders. You — with your agents — fill it in.
What the product gives knowledge is a governed place to live, and a mechanical way to stop that place from structurally deteriorating. The knowledge itself is your organisation’s; the discipline and the structural enforcement are the product.
What Codee3 does not do
- It does not author your knowledge.
- It does not read or interpret your source code.
- It does not detect semantic drift, and nothing compares documentation against implementation.
- There is no hosted service, no federation and no cloud component.
Privacy and network posture
Stated plainly, because a governance tool that is vague about its own behaviour has already lost the argument.
The product
Codee3 operates offline. It requires no network connection to work. There is no account, no activation, no licence server and no telemetry. The one network request is an optional cached update check for release information, at most once per 24 hours, sending no repository content and no Codee3 telemetry payload, and failing quietly when there is no connection.
This website
This website stores only what you deliberately submit. It does not use analytics tracking scripts.