Skip to main content
Glama

Why Mizan? (The 5-Second Empirical Proof)

Running 3 to 5 AI coding agents in parallel creates terminal chaos, silent token burn, skill prefix bloat, and exposed localhost dashboards. Mizan (inspired by Ma'at balance, Al-Mizan fair measure, and Japanese Kaizen continuous improvement) restores calm, deterministic control from one single source of truth.

Metric (Measured on Real Sessions)

Before Mizan

With Mizan

Impact

Installed Skills per Agent

1,247 / 1,265

6 – 11

Eliminates silent prompt-prefix bloat

Estimated Fixed Prefix Tokens

50,644+ tok

278 – 2,986 tok

~94% prefix reduction (target < 15k)

Weekly OS Health & Skill ROI Audit

Manual / ad-hoc

0 LLM tokens

Automated Windows Task Scheduler

Localhost Dashboard Security

Open 127.0.0.1

401 + 403 Guards

Blocks DNS Rebinding & CSRF attacks

New Venture Triad Bootstrap

Hours of setup

< 1 second (23 files)

Platform + Social + Partnerships wired


Related MCP server: agent-session

Live Action Center (The Aperture Control Plane)

A zero-dependency Node 24 local & remote control plane (127.0.0.1:4321) built on a Headless State + Layout Plugin Registry architecture:

  • Per-Project Isolated Cockpit (Operate): Focuses on one project at a time with active-only tasks (ops/boards/<slug>.json, completed items archived behind a toggle), Live Agent Screen (real-time logs + Pause / Resume / tree-Terminate / direct stdin or directive input), and 1-Click Quick Actions (Proceed, Approve & Proceed, Submit, or auto-extracted choices) whenever an agent pauses.

  • Interactive Multi-Model Space (Arena): Talk 1-on-1 or compare 2–4 models side-by-side (Claude Code, Codex CLI, OpenCode $0, Ollama $0) via live SSE streaming, protected by Quota Guard, with Promote Winner -> Project Task.

  • Zero-Noise Blocker Detection & Auto-Discovery: Combines ops/session-hook.mjs (Claude Code hooks), a Stall Watchdog, and Live Session Auto-Discovery (Antigravity + Claude Code transcripts) so blocked or silent agents surface immediately in the NEEDS ATTENTION banner.

  • Bilingual EN / Egyptian Arabic (RTL) + BiDi Fix: Instant toggle between English and Egyptian founder-friendly Arabic with <bdi dir="auto"> / unicode-bidi: plaintext isolation for mixed code/Arabic logs.

  • One-Command Auto-Connect (hub-mcp/connect.mjs): Automatically wires brain-hub into Claude Code, OpenCode, Codex, and Cursor without manual JSON edits (node hub-mcp/connect.mjs --dry-run).

  • Remote Streamable HTTP MCP (/mcp): Bearer-authenticated endpoint restricted to 5 safe Control-Plane tools (zero shell execution) for ChatGPT & Claude Mobile via Cloudflare Tunnel or Tailscale Funnel.

  • Searchable knowledge/ Playbooks + Unified ops/ACTIVITY-LOG.jsonl: Curated Browser, Mobile (Android USB ADB / Wi-Fi Wireless Debugging / iOS), and Token-Optimal playbooks indexed in hub-mcp SQLite FTS5 with zero prefix-token increase.

  • Invalidated-on-Edit Verification Receipts & AGENTS.md Bloat Linter: Every Verify Diff run stamps a SHA-256 git-tree receipt (PASS automatically flips to STALE if any file is edited afterward). Built-in linter warns when AGENTS.md/CLAUDE.md exceeds 150 lines or contains auto-generated directory trees.

  • Worktree Isolation, 10-Port Blocks & 3-Gram Loop Circuit Breaker: Parallel workers launch in .mizan-worktrees/<id> with deterministic 10-port blocks (MIZAN_PORT=4400, 4410...), exFAT/WSL /mnt/c I/O guards, and a Circuit Breaker that kills workers on repeated errors, 3-gram action loops, or runtime cap.

  • Fail-Closed Federated Privacy Distiller (ops/distill-lesson.mjs + ops/feed-sync.mjs): Zero-dependency 7-stage deterministic sanitizer (hard 16 KB cap, zero --force bypass flags, compiled secret regexes + Shannon entropy scanner, OS/WSL path & username stripping, prompt-injection & Base64/shell-pipe rejection) with built-in Node 24 Ed25519 signing/verification and 5 signed starter lessons in feed/lessons/.

  • Dynamic Drop-In Layout Plugins (action-center/plugins/): Auto-discovered via GET /api/plugins (atc-grid.js Air-Traffic Ops multi-project radar + tiling-split.js 2x2 live agent panes).

  • Worktree Merge UI, Setup Wizard, mizan CLI & Air-Gapped Docker: Merge/discard .mizan-worktrees/* from the browser, onboard fresh installs via the Setup Wizard, run node bin/mizan.mjs start|connect|sync-feed|distill|test, or deploy air-gapped with Dockerfile, docker-compose.yml, and ops/POLICY.example.json.


Architecture

One local source of truth propagates rules, lessons (<= 30 cap), and fleet identity across all 5 agents, while hub-mcp exposes 4 read/write primitives over stdio only (zero network exposure).

flowchart TD
    Founder["Founder / Tech Lead"] --> AC["Mizan Action Center (127.0.0.1:4321)\nHost/Origin Guard + Bearer Auth + Tailscale"]

    subgraph Core["Single Source of Truth (~/.claude/brain)"]
        OPS["ops/ Live Control Bus\nFLEET-STATUS.json | BROADCAST.md\nDECISION-QUEUE.json | health-snapshot.json"]
        RULES["Rules & Memory\nAGENTS-CORE.md | LESSONS.md (<=30)\nMODEL-REGISTRY.json | active-projects.md"]
        MCP["hub-mcp/ (stdio-only, Node 24 SQLite FTS5)\nbrain_search_lessons | brain_search_components\nbrain_get_ops_state | brain_log_decision"]
    end

    AC <-->|"Live JSON State & Decisions"| OPS
    MCP <-->|"Zero-Network stdio JSON-RPC"| Fleet

    subgraph Fleet["5-Agent Coding Fleet (Desktop Apps + CLIs)"]
        AGY["Antigravity\nLead + Browser + MCP"]
        CC["Claude Code\nDeep Refactors + --worktree"]
        CDX["Codex CLI/App\nIndependent Review + Tests"]
        OC["OpenCode Free Tier\n$0 Boilerplate (Verify-Gated)"]
        CUR["Cursor Entry Plan\nTight Quota (yellow-conserve)"]
    end

    RULES -->|"05-APPLY-BRAIN.sh (Copy, No Symlinks)"| Fleet
    OPS <--> Fleet

Bounded 3-Layer Self-Healing (Kaizen Loop)

flowchart LR
    F["Anomaly / CI Fail / Stall"] --> L1["Layer 1: Deterministic Guard (0 Tokens)\noxlint | gitleaks | check:rls | pnpm audit"]
    L1 --> L2["Layer 2: Bounded Recovery (Max 2 Tries)\nquiet-run error tail -> recipe -> verify"]
    L2 -->|Green| L3["Layer 3: Sandboxed Kaizen\n1-sentence lesson -> LESSONS.md (<=30)"]
    L2 -->|Still Failing| ESC["Hard Stop -> ops/DECISION-QUEUE.json\nExact logs + 1 recommendation"]

60-Second Zero-AI Quickstart (Fresh Windows 11 PC)

Bootstrap a brand-new machine without needing any AI installed first:

# 1. Clone and run the PowerShell 5.1-safe zero-AI bootstrapper
git clone https://github.com/csa7mdm/Brain.git "$env:USERPROFILE\.claude\brain"
cd "$env:USERPROFILE\.claude\brain"
powershell -ExecutionPolicy Bypass -File .\bootstrap.ps1 -InstallAgents

# 2. Start the hardened Action Center (token auto-generated in ops/.ac-token)
node .\action-center\server.mjs

# 3. Connect the 4-tool stdio Hub MCP (Claude Code example)
claude mcp add brain-hub -- node "$env:USERPROFILE\.claude\brain\hub-mcp\index.mjs"

# 4. Bootstrap a new Three-Workspace Venture Triad in < 1 second
python .\06-VENTURE-OS\new-venture.py my-venture --domain="Developer Tools" --region="Global"

macOS & Linux Quickstart (Node 24+)

git clone https://github.com/csa7mdm/mizan.git ~/.claude/brain && cd ~/.claude/brain
bash ./bootstrap.sh --connect --sync-feed
node ./action-center/server.mjs

Core Modules

Module

Path

Purpose

Hardened Action Center

action-center/

Live web UI (Host/Origin guard, Bearer auth, Tailscale mobile mode, Broadcast bus, Decision Queue).

4-Tool Local Hub MCP

hub-mcp/

Zero-dep stdio MCP server using Node 24 node:sqlite FTS5 over lessons, shared components, and ops state.

5-Agent Fleet Sync

05-APPLY-BRAIN.sh, 07-VERIFY.sh

Propagates rules, identity headers, and <= 30-line Cursor thin rule across all 5 agents.

Venture Triad Engine

06-VENTURE-OS/

new-venture.py, brain-doctor.py, parameterized Platform + Social + Partnerships templates, static guards (check:rls, check:em-dash, check:portability).

Weekly Kaizen Audit

scripts/weekly-health.py

0-token scheduled audit: 5-agent prefix budget, 30d Skill ROI, live opencode models deprecation probe, portfolio pulse.

NotebookLM Exporter

scripts/export-notebooklm-pack.py

Compiles lessons, decisions, wiki, and weekly health into a clean NotebookLM source pack for Audio Overviews & Mind Maps.

Zero-AI Bootstrapper

bootstrap.ps1

Installs minimum prerequisites (winget), optional CLI agents, syncs fleet, and registers Windows Task Scheduler.


Mizan OSS vs. Mizan Enterprise (Open-Core Roadmap)

Capability

Mizan OSS (Community / Solo)

Mizan Enterprise (AAA Corporate)

5-Agent Fleet Sync & Pre-Flight Gate

Included

Included

Hardened Local Action Center + Tailscale

Included

Included + SSO / SAML / RBAC

4-Tool stdio Hub MCP (SQLite FTS5)

Included

Team-Shared Postgres/Vector Hub

Weekly 0-Token Health & Skill ROI Audit

Included

Org-Wide Telemetry & FinOps Spend Caps

Static Security & RLS Guards

Included

Policy-as-Code + Immutable Audit Trails

Deployment & Compliance

Local-First (Windows/Mac/Linux)

Air-Gapped / On-Prem + SOC 2 / ISO 27001 Readiness


Full Documentation Wiki

All 8 architecture, security, operations, and extraction guides live in docs/wiki/:

  1. 01 — Architecture & 5-Agent Fleet

  2. 02 — Zero-AI Quickstart (Windows 11)

  3. 03 — Action Center & Hardened Mobile Control

  4. 04 — 4-Tool Local Hub MCP Server

  5. 05 — Venture Triad & Zero-Cost Static Guards

  6. 06 — Token Discipline, Kaizen & Skill ROI

  7. 07 — Security & Threat Model

  8. 08 — Private-to-Public OSS & Enterprise Extraction Guide


GitHub SEO Topics (Copy to Repo Settings)

multi-agent-orchestration · ai-coding-agents · claude-code · codex-cli · opencode · cursor-rules · mcp-server · sqlite-fts5 · local-first · developer-productivity · agent-control-plane · indie-hacker

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Lets multiple AI agents and parallel coding sessions share one memory and task ledger, so they can claim work instead of duplicating it, resume each other's handoffs and reasoning, and use credentials without ever seeing the keys. Connects assistants such as Claude Code, Codex, Cursor, Gemini, ChatGPT and custom agents over MCP, backed by a single local SQLite file or a self-hosted Postgres hub.
      41
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Universal session & handoff layer for AI coding agents: shared task, decision, blocker and test state, checkpoints, and deterministic handoff between Claude Code, Codex, OpenCode, Cursor, Cline, pi and omp. Local SQLite, git-aware, 25 tools + 7 resources over stdio or streamable-http.
      26
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables external MCP clients like Claude Desktop, Claude Code, Cursor and Zed to hand work to a local crew of AI agents that plan, write, check and fix code in a folder, while also acting as an MCP client that can use their tools. Runs locally with user-supplied keys, approval-gated commands, diffable and undoable runs.
      AGPL 3.0
    • A
      license
      C
      quality
      B
      maintenance
      A local SQLite-backed MCP server that gives AI coding agents persistent cross-session memory and invariants, Turn-0 workspace grounding with spin-loop and output-defect guards, and two-phase-commit staging so file edits are audited and applied atomically. It also exposes AST symbol/call-graph search, bounded page memory, and workspace document retrieval, letting agents work safely across sessions without any cloud dependency.
      39
      317 npm
      3
      MIT