How ModusBrain Works
ModusBrain adds a safe execution layer on top of the underlying RAG engine. While the base engine handles pulling knowledge from fragmented sources, structuring it, and keeping it current — ModusBrain compiles that knowledge into versioned operational skills that AI agents can execute with confidence gating, audit trails, and a closed feedback loop.“ModusBrain solved the hardest 70% — pulling scattered knowledge into a current, cited memory layer. ModusBrain adds the last 30%: compiling that memory into versioned, confidence-gated skills that agents can safely execute against, not just query.”
What ModusBrain Adds (vs. Base GBrain Engine)
Skill & Procedure Page Types
ModusBrain introduces two structured page types that don’t exist in plain GBrain:skill— A versioned, agent-executable procedure compiled from your existing brain pages. Skills have a draft/approved/superseded lifecycle and a confidence threshold.procedure— A structured reference document that describes a company process in a way that the compiler can extract structured policy rules from.
modusbrain-ops schema pack. Activate it with:
skill and procedure as first-class page types with enforced ## Facts, ## Policy, and ## Judgment sections that the compiler reads during opskill compile.
Versioned Skill Artifacts (v1 → v2 → v3)
Every compiled skill is stored as an immutable versioned artifact. Versions are never overwritten — only superseded. This is what makes audit trails trustworthy for compliance. Each skill version stores:- You run
modusbrain opskill compileagain (manual re-compile) - A conflict is resolved via
modusbrain opskill resolve(auto re-compile) - Enough human corrections accumulate (see below — the correction threshold)
Auto Re-Compile on Correction Threshold
The feedback loop is the most powerful part of the closed cycle. When a human records a correction, ModusBrain writes an evidence page underskills/corrections/. Once enough corrections accumulate for a skill (default: 2 corrections), the system automatically triggers a re-compilation — producing a new draft version that incorporates the corrected guidance.
- An evidence page is written to
skills/corrections/<slug>-correction-<n>.md - The correction count for the skill increments
- If count reaches the threshold,
compileSkill()is automatically called - A new draft version is created, incorporating all corrections as context
- The draft waits for human approval before agents can execute it
The correction threshold is configurable. The default of 2 is conservative by design — you want human review on high-stakes skills before re-compilation happens silently.
Operational Skills as the Living Company Map
Before ModusBrain, the base engine gave you a partial view of “how the company works” — you could search for policies, but there was no structured, machine-executable representation of procedures. ModusBrain fills this gap. Every compiled skill is:- Linked back to the source documents it was compiled from (provenance)
- Versioned so you can see how a procedure changed over time
- Auditable — you can see when agents executed it and what they decided
- Correctable — human feedback flows back into the next version