Validation and engine tooling for the memrepo format — including the Adherence Engine's gate runner: a hard-stop-and-retry enforcement mechanism that blocks a violating write before it lands and refuses to finish while a check is red, running entirely on your own machine against your own memrepo, no proxy or vendor server involved.
Nothing to install beyond cloning this repo once, plus whichever of bash/node your setup already needs (both are standard on any dev machine these hook recipes target). No npm-installable package — these are scripts you clone and reference by path from your AI tool's own hook config, not a library dependency.
- Clone this repo somewhere stable:
git clone https://github.com/OuterData/memrepo-tools ~/.outerbot/memrepo-tools, thencd ~/.outerbot/memrepo-tools && npm install(installsjs-yaml/minimatch, the only two runtime dependencies the gate runner and validator need). - Make sure your memrepo is cloned at
~/.outerbot/memrepo(seememrepo-specfor what a memrepo is and how outer.bot provisions one). - Add at least one
tier: gaterule to~/.outerbot/memrepo/projects/{your-project-slug}/rules.yaml:- id: no-console-log rule: "Never commit console.log statements to src/ -- use the logger module instead." tier: gate check: "! grep -rn 'console.log' src/" scope: ["src/**"] origin: "manual" on_fail: block
- Copy the relevant hook recipe for your tool from
hooks/— seehooks/README.mdfor the full per-tool coverage table (which capabilities each tool's recipe actually delivers; not every tool supports the full gate/retry ladder). - Ask your AI assistant to write a file under
src/containingconsole.log(...). It should be refused before the write lands, see the rule text, and correct itself.
That's the same path this repo's own Claude Code recipe was live-verified against — a real nested session, a real block, a real correction, a real drift-ledger.md entry on a forced non-convergent case. See the repo's commit history for the transcript-backed writeup.
Lints a memrepo's layout and frontmatter against memrepo-spec's SPEC.md. Collects every error in one pass rather than stopping at the first.
node ./validate/cli.js /path/to/your/memrepoExits 0 with no output-worthy errors and prints OK; exits 1 and lists every violation found otherwise.
gates/— the Adherence Engine's gate runner:pretooluse.js(blocks a violating write before it happens),stop.js(refuses to finish while a check is red, retries up toMEMREPO_GATE_MAX_PASSES, escalates non-convergence todrift-ledger.md),drift-ledger.js(the shared ledger +adherence-stats.jsonwriter — same format asouter.bot's server-side implementation, documented inmemrepo-spec's SPEC.md §9).hooks/— copy-paste hook recipes per AI tool (Claude Code, Cursor, Cline, Codex CLI, GitHub Copilot fully wired for gates; Continue/Aider proxy-mode-only; Devin Desktop unreachable today — seehooks/README.md's coverage table for exactly what each tool's recipe delivers).validate/— therules.yaml/briefing.md/manifest.yaml/skill frontmatter linter described above.engine/— a portable CLI proving the same scheduling plumbing works identically from GitHub Actions, GitLab CI, or a bare cron job (ci/has templates for all three). Its core extraction/folding logic (reading/inbox/, producing briefing/rules.yaml/skills updates) is a placeholder, not yet built. The two interop importers (engine/importers/) are real, working, one-way capture tools.
Built in a single pass (2026-07-10/11) alongside outer.bot's server-side Adherence Engine, then left with its gate runner unwired from any published recipe until 2026-07-23 — see that commit's message for the full story. memrepo validate and the gate runners are the load-bearing, real-tested pieces; engine/'s core loop is intentionally unfinished.