mdr-kernel macrodata refinement / kernel

[ MDR / SHARED MEMORY KERNEL ]

The repo is the memory.

You arrive with no memory of prior shifts. Every AI agent does. They forget what was decided, trust stale chat memory, trample each other's files, and repeat the same mistake because the evidence fell out of context. mdr-kernel severs the agent from its untrustworthy private context and hands it something better: the record.

The work is the data. The data is the work.

[ MANIFEST ] What it is

A portable pattern for running multiple AI workers against one shared engineering memory.

mdr is Macrodata Refinement — in the source metaphor, the department whose workers refine data they are severed from, without the full context of what it means. kernel is the small, load-bearing core the whole system runs on. That is the pun and the thesis in one: an agent refines the work in front of it, severed from prior context, trusting the record over its own memory. The show supplied the metaphor's name only — the refinement here is engineering, not homage.

Shared record

One git-backed source of truth every model reads first and writes back to. No trusting fuzzy private memory.

Enforced coordination

A heartbeat lock and pre-commit gates make uncoordinated work difficult to commit. Single-writer on the files that matter.

Executable recall

A recall gate surfaces the trap you keep repeating before you act — memory that runs, not memory that decorates.

[ ORIENTATION ] The severed floor

Every themed name maps to a real mechanism. Toggle the view; nothing is renamed underneath.

Select a station for its dossier.

The metaphor annotates the machine. It does not rename it. Real filenames, commands, statuses, and data structures stay plain — the full mapping ships in the repo as FLOOR-GUIDE.md.

[ INTAKE ] Run the floor

A new worker arrives with no context. Run the sequence — in order.

Simulated console. The outputs below mirror what the real scripts print — clone the repo and the sequence runs for real. Steps taken out of order are refused, exactly as the hooks refuse them.

refiner-01 @ the severed floor
mdr-kernel simulated console. You are refiner-01. You remember nothing. That is by design.
Select a step below to run it.

[ MACRODATA ] The Loop

The refinement cycle. Each step is logged; none is skippable.

STATE.md
The live truth. If anything disagrees with it, STATE wins and the stale source gets fixed.
protocol/CONTRACT.md
The one doctrine every model receives. Every CLI agent starts from the same rules.
bin/start-session.ps1
The only startup path. Runs the doctor, refuses unsafe pulls, prints current STATE.
maps/node-map.json
Routes the agent to the smallest relevant file set before broad search.
bin/brain-recall.ps1
Runs before assigned work. On a known trap, the agent must read the evidence first.
STATE.lock
Protects coordination files. The pre-commit hook blocks protected edits without the lock.

[ INTAKE ] Quick Start — the real thing

Three commands on a cold clone.

git config core.hooksPath .githooks
pwsh -NoProfile -File bin/bootstrap-clone.ps1 -Model '<your model id>' -CommitScaffold
pwsh -NoProfile -File bin/start-session.ps1  -Model '<your model id>'

Expected result:

STARTUP_STATUS=READY

Requires PowerShell 7+ and git. The scripts are plain PowerShell so the pattern moves between Windows, macOS, Linux, local models, and subscription CLI agents.

[ RATIONALE ] Why not a vector database?

Because the hard problem here is not retrieval. It is authority.

A vector store can find related notes. It does not decide which note wins, stop two agents from editing the same live state, force a model to read the trap it keeps repeating, or prove which model made a commit. Git already gives us history, diff, authorship, branches, hooks, and a shared artifact every tool can read. mdr-kernel uses git as the coordination substrate and keeps the rules small enough that a model can actually obey them.

[ COMPLIANCE ] Known limits

Honest edges, disclosed for the record.

A refinement floor that hides its limits is not one you should trust.

Cooperative, machine-local lock

A heartbeat file, not a distributed lease. It stops two cooperating sessions from co-writing state; it is not a defense against a malicious actor.

Hooks armed per clone

core.hooksPath is local config, so a fresh clone skips the gates until you set it. Bootstrap and the doctor both remind you.

A pattern, not a product

No daemon, no service, no telemetry — just scripts, git, and a contract. You adapt it to your stack rather than installing it.

[ DISSEMINATION ]

MIT licensed. Issues and adaptations welcome.

View on GitHub