Skip to main content

System Architecture

GOTCHA framework, tool manifest, agent system documentation.

AAOS — ALAI Agent Operating System

Executive Summary AAOS is the enforcement runtime for the ALAI agent system. It turns optional pr...

Overview

System Architecture Overview This book documents the GOTCHA framework, tool manifest, and agent s...

GOTCHA Framework

Last Verified: 2026-02-17 | Owner: John GOTCHA Framework Ovaj sistem koristi GOTCHA — 6-layer a...

Tool Manifest

Last Verified: 2026-02-17 | Owner: John Tools Manifest CHECK THIS BEFORE CREATING NEW TOOLS. If...

Agent System Guide

Last Verified: 2026-02-17 | Owner: John Agent System Guide — Consolidated Last Updated: 2026-02...

Agent Laws

Last Verified: 2026-02-17 | Owner: John Zakoni Agenata — BasicAS Group Svaki agent u sistemu MO...

GOTCHA Framework & System Handbook

John — System Handbook (On-Demand Reference) Load this when you need infrastructure details, CLI ...

Agent System Guide (Consolidated)

Agent System Guide — Consolidated ⚠️ SUPERSEDED / STALE (flagged 2026-08-15, MC #106953): This p...

Infrastructure Overview

Runbook: Local Infrastructure Platform: Mac Studio M3 Ultra, 96GB RAM, macOS Services: Docker con...

AI Model & RAG Architecture

AI Model & RAG Architecture Pregled svih AI modela i RAG (Retrieval-Augmented Generation) kompon...

Petter Graff Architecture — 90-Day Roadmap

System Architecture — After Petter Graff Roadmap Datum: 2026-02-23  |  MC Tasks: #1840–#1852  |  ...

Chain Runner Architecture (Pi Agent Patterns)

Chain Runner Architecture MC Task #1902 — Pi Agent Patterns Author: Petter Graff (Software Archit...

ALAI Orchestration Architecture — Virtual Companies + Pi Agent Pipeline

ALAI Orchestration Architecture — Virtual Companies + Pi Agent Pipeline System Overview ALAI kori...

Virtual Company System — Deep Analysis & Improvements

ALAI Virtual Company System — Deep Analysis & Improvements Date: 2026-03-21 Team: Petter Graff (A...

Virtual Company Architecture — Overview & Board Evaluation

Overview ALAI operates a multi-company virtual organization where 16 specialized AI agent teams h...

AI Factory Map

AI Factory Map Last Updated: 2026-05-27 (AI Factory / P2P reliability update) Purpose: Single-pag...

Mehanik Phase 2 — Pre-Dispatch Gate System

Mehanik Phase 2 — Pre-Dispatch Gate System Status: LIVE since 2026-04-25 (MC #9231 deploy) Refere...

AI Factory v2 — Phase 0 Backbone

AI Factory v2 — Phase 0 Backbone Author: ALAI Version: 2026-04-27 Status: COMPLETE Executive Sum...

AI Factory v2 — Phase 1 Token Economics

AI Factory v2 — Phase 1 Token Economics Created: 2026-04-27 Phase: Phase 1 (Token Economics Wiri...

AI Factory v2 — Phase 2 Capability Cleanup

AI Factory v2 — Phase 2 Capability Cleanup Author: ALAI Date: 2026-04-28 Status: Complete Parent ...

youtube-learning v2 — FORGE Pipeline

# youtube-learning v2 — FORGE Pipeline **Status:** Active (side-by-side with v1) **Author:** A...

AI Factory Pipeline — Gate Matrix & Dispatch Flow

ALAI AI Factory Pipeline — Gate Matrix & Dispatch Flow Status: Spec for MC #10536 (parent #10612 ...

AI Factory Pipeline — Gate Matrix & Dispatch Flow

ALAI AI Factory Pipeline — Gate Matrix & Dispatch Flow Status: Spec for MC #10536 (parent #10612 ...

AI Factory Pipeline — Gate Matrix & Dispatch Flow

ALAI AI Factory Pipeline — Gate Matrix & Dispatch Flow Status: Spec for MC #10536 (parent #10612 ...

AI Factory Audit 2026-05-14 — Connection Map

AI Factory Audit 2026-05-14 — Connection Map Audited: 2026-05-14, 8 zones (5 core + 3 follow-up) ...

ADR-026 pi-orchestrator reactivation (supersedes ADR-025) — 2026-05-14

Why This Matters On 2026-05-14 at 10:14:41, pi-orchestrator successfully picked up and claimed ta...

pi-orch Mini-Verifier — local-LLM closure gate (MC #100608)

pi-orch Mini-Verifier — Local-LLM Closure Gate MC: #100608 | Owner: AgentForge | Status: WARN_MO...

Evidence-SSoT Phase 0 — Knowledge Propagation Infrastructure (2026-05-15)

Evidence-SSoT Phase 0 — Knowledge Propagation Infrastructure (2026-05-15) Problem (CEO trigger 20...

Reality Anchor Doctrine v1

$(cat /tmp/evidence-100822/page-content.md | jq -Rs .)

Reality Anchor Doctrine v1 (Final)

Reality Anchor Doctrine v1 Published: 2026-05-15 Authority: CEO directive 2026-05-15 → Petter Gra...

LightRAG Tuning — cosine_threshold 0.5, related_chunk_number 10

LightRAG Tuning — cosine_threshold 0.5, related_chunk_number 10 (2026-05-12) Status: LIVE Date S...

ZAKON Phase A FU-1: Evidence Field Migration (approver → agent)

ZAKON Phase A FU-1: Evidence Field Migration (approver → agent) MC: #100390 (Subtask 3) Date: 20...

Opus Cost Guard Hook (2026-05-17)

Opus Cost Guard Hook (2026-05-17) MC: #101140 (AI Factory T-3 Priority 2) Parent: Reality Anchor...

Schema Stub Gate + Claim Schema Injector (MC #101065)

Schema Stub Gate + Claim Schema Injector (MC #101065) MC: #101065 (Deterministic Session Compile...

mc.js Force Approval Queue (MC #100818)

mc.js Force Approval Queue (MC #100818) MC: #100818 (Reality Anchor P1.1 — Remove --force bypass...

4 Deterministic Probes (MCs #101133-#101136)

4 Deterministic Probes (MCs #101133-#101136) Parent MC: #101065 (Deterministic Session Compiler ...

Attack J Security Fix (MC #101149)

Attack J Security Fix (MC #101149) MC: #101149 (Attack J — evidence-ledger writer identity spoof...

John+AI Factory Unified Fix - 2026-05-17 Session

John + AI Factory Unified Fix — 2026-05-17 Session Date: 2026-05-17 Session ID: (recorded in ses...

Claude Code Multi-Session Isolation

Claude Code Multi-Session Isolation**Status:** Production (all 7 P0 resources verified SAFE) **D...

Multi-Session Isolation — Phase 3 P1 Sweep

Phase 3 — P1 Isolation Sweep + P2 Mini-Probe Log**Owner:** CodeCraft (Petter Graff lead)**Date:**...

Multi-Session Isolation — T10-quad Validation

T10-quad Validation Report — Phase 3 P1 Isolation Sweep**Owner:** Proveo (Angie Jones)**Date:** 2...

ALAI AI System — Operating Picture 2026-05-18 (CEO Audit)

ALAI AI System — Operating Picture 2026-05-18 Date: 2026-05-18 Architect: Petter Graff Status: VA...

Cost Ceiling Doctrine — UserPromptSubmit Main-Session Gate

Cost Ceiling Doctrine — UserPromptSubmit Main-Session Gate Status: DRAFT — Awaiting Skillforge Bo...

Reality Anchor — Probe Daemons and Watchdog

Reality Anchor — Probe Daemons and Watchdog Status: DRAFT (MC #101450, 2026-05-19) Author: FlowFo...

ALAI AI System — v2.0 Operating Picture & Master Roadmap

ALAI AI System — v2.0 Operating Picture & Master Roadmap Date: 2026-05-19 Architect: Petter Graff...

Claude Builder Durable Runner Triage

Claude Builder Durable Runner Triage Date: 2026-05-19 MC: #101542 Verdict durable-runner.db is he...

ZAKON 12 RAG Context Injection Hook

ZAKON 12 RAG Context Injection Hook MC: #101494 Task: [MC-B05] ZAKON #12 PreToolUse[Task] hook wi...

Email MC Linkage Fix

Email MC Linkage Fix MC: #101510 Task: [MC-C1-1] Fix email→MC linkage daemon Book: System Archite...

Discover JS Routing Subcommand

Discover JS Routing Subcommand MC: #101511 Task: [MC-C1-2] discover.js routing subcommand — fix f...

PI Orchestrator Route Expand

PI Orchestrator Route Expand MC: #101512 Task: [MC-C4-1] PI-orchestrator route_eligibility expand...

MC Backlog TTL Policy

MC Backlog TTL Policy MC: #101513 Task: [MC-C2-1] MC backlog TTL policy + auto-pause/auto-close B...

Session Spend Ladder

Session Spend Ladder MC: #101526 Task: [MC-C2-2] Session-spend ladder Book: System Architecture C...

Skill Registry Rebuild

Skill Registry Rebuild MC: #101527 Task: [MC-C3-2] Skill registry rebuild — 96 dirs vs 1 row Book...

MCP Cleanup 2026 05

MCP Cleanup 2026 05 MC: #101528 Task: [MC-C3-3] MCP cleanup — 5 dormant servers Book: System Arch...

CEO Daily Digest

CEO Daily Digest MC: #101529 Task: [MC-C5-1] CEO escalation hook + Slack digest Book: System Arch...

Specialist Mapping Cleanup 2026 05

Specialist Mapping Cleanup 2026 05 MC: #101540 Task: [MC-C1-3] specialist-mapping cleanup — 13 or...

TLDR Daemon Verify

TLDR Daemon Verify MC: #101541 Task: [MC-C1-4] TLDR daemon verify path + reload Book: System Arch...

Cost Guard Grace Period Fix

Cost Guard Grace Period Fix MC: #101467 Task: [T-A-02b-r1] Cost guard polish — RunAtLoad grace Bo...

Reality Anchor P3

Reality Anchor P3 MC: #100885 Task: P3.2 integration test task Book: System Architecture Canonica...

FORGE Route Gate MC101641

FORGE Route Gate MC101641 MC #101641 implements forge-route-gate.sh, a Claude Code PreToolUse:Tas...

FORGE Dispatch Wrapper MC101640

FORGE Dispatch Wrapper MC101640 MC #101640 provides forge-dispatch.js, a local FORGE dispatcher f...

MEMORY.md compact index contract — MC #101645

MC #101645 — MEMORY.md compact index contract Status: implemented locally with deterministic line...

MC #101646 — Memory/vector store decommission sweep

MC #101646 — Memory/vector store decommission sweep Verdict: PARTIAL/BLOCKED. Safe cleanup comple...

MC 101647 — AutoCoder archive + durable executor HTTP consolidation

MC #101647 — AutoCoder archive + durable executor HTTP consolidation Verdict: PASS_WITH_SCOPE_NOT...

MC 101648 Agent Mapping Cleanup

MC 101648 Agent Mapping Cleanup Verdict: PASS Date: 2026-05-21 Task: [P3-2] Delete 23-32 unmapped...

MC 101649 Tools Directory Governance

MC 101649 Tools Directory Governance Verdict: PARTIAL / BLOCKED Date: 2026-05-21 Task: [P3-3] Too...

Killswitch Gate — PreToolUse + UserPromptSubmit

Killswitch Gate — PreToolUse + UserPromptSubmit Comprehensive token burn prevention via fa...

ALAI 4-Team Restructure — Dispatch Flow, FORGE Routing, MEMORY.md Contract

ALAI 4-Team Restructure — Dispatch Flow, FORGE Routing, MEMORY.md Contract MC task: #101653 Statu...

JSONL Evidence Ledger Schema — Anti-Hallucination V2

JSONL Evidence Ledger Schema — Anti-Hallucination V2 Component: JSONL append-only evidence ledger...

ALAI Companies × Products × File-System Catalog v1.0-draft

ALAI Companies × Products × File-System Catalog Status: v1.1 validated projection, MC #107249, 20...

ADR-027 — P2P Agent Mesh Activation

ADR — P2P Agent Communication Pattern Evaluation MC: #101959 Author: John Date: 2026-05-24 Source...

Agentic Engineering → ALAI AI Factory Roadmap (2026-05-26)

Agentic Engineering → ALAI AI Factory Roadmap Date: 2026-05-26 Source video: https://www.youtube....

AI Factory Workflow — AI Factory MVP smoke workflow docs-only validation

AI Factory Workflow — AI Factory MVP smoke workflow docs-only validation Created: 2026-05-26T13:5...

AI Factory V2 — Workflow Templates and Status Pages

AI Factory V2 — Workflow Templates and Status Pages Standard internal templates for AI Factory wo...

AI Factory V2 — P2P Verifier Metrics and Quality Report

AI Factory V2 WP3 — P2P Verifier Metrics and Quality Report Generated: 2026-05-26T15:28:35.483Z S...

AI Factory V2 — Screen-Recordable Internal Demo Scenario

AI Factory V2 — Screen-Recordable Internal Demo Scenario Purpose: show the CEO thesis as an inter...

Company Mesh Auto-Responder Reliability Repair — MC 102104

MC #102104 — Company Mesh responder reliability repair Generated: 2026-05-26 Owner: john Scope: r...

AI Factory Workflow — AI Factory V3 internal productization: operator console for intake, workflow status, evidence packages, and P2P quality metrics

AI Factory Workflow — AI Factory V3 internal productization: operator console for intake, workflo...

AI Factory V3 Operator Console Plan — MC 102226

AI Factory V3 — Internal Operator Console Plan Generated: 2026-05-26 Parent MC: #102225 Plan/spec...

AI Factory V3 Operator Console — Implementation Status

AI Factory V3 Operator Console — Implementation Status Generated: 2026-05-26 Parent MC: #102225 P...

Disk & Memory Health Alarms — What Fires, Where It Lands, How to Test

Disk & Memory Health Alarms — What Fires, Where It Lands, How to Test Why This System Exists On 2...

SEO Readiness Portal — Real Audit Engine (2026-06-02)

SEO Readiness Portal — Real Audit Engine (2026-06-02) Status: DEPLOYED to production Scope: MC...

System Remediation 2026-06-04 (Library, Companies, Hooks, Agents)

System Remediation — 2026-06-04 (Library, Companies, Hooks, Agents) Author: John (AI Director) · ...

P2P Pairing Skills — CC sender + peer responder (MC #102988)

ALAI Company Mesh — P2P Pairing Skills (CC sender + peer responder) Built: MC #102988 (responder ...

Diff-only reviewer context contract (token discipline)

Diff-only reviewer context contract (token discipline) Book: System Architecture Status: Implemen...

Hook-file existence guard (settings.json ↔ disk integrity) — MC #103640

Hook-file existence guard (settings.json ↔ disk integrity) Book: System Architecture Status: Impl...

Cost logger over-count fix (cumulative re-sum) — MC #103671

Cost logger over-count fix (cumulative re-sum → idempotent per-session) Book: System Architecture...

LumisCare entity scrub (CareSafety/VCC/VCU/vivacare → LumisCare) — MC #103616

LumisCare entity scrub — CareSafetyInnovations/VCC/VCU/vivacare → LumisCare Book: System Architec...

Email-Reactor fail-closed fix — classifier failure / partner mail no longer auto-archived (MC #103815)

Incident / Root Cause ~/system/daemons/email-agent.js was FAIL-OPEN. When Ollama classification f...

RAG Flywheel Source-Priority and Curated Seed

RAG Flywheel Source-Priority and Curated Seed MC Task: #103899 Status: Complete, Proveo-validate...

ALAI Self-Healing Architecture

ALAI Self-Healing Architecture Document Date: 2026-06-19 Coverage Audit: MC #103940 light...

MC #104005 — GOTCHA Gate Degating (Code/System Tasks)

MC #104005 — GOTCHA Gate Degating for Code/System Tasks Date: 2026-06-19 Parent: #104003 (AI-Syst...

P0.7 Intake Classifier Decision — null-route backfill (MC 104025) 2026-06-21

SummaryP0.7 intake-classifier (MC #104025) ran a deterministic dry-run on 237 null-route open tas...

P0.7 Intake Classifier — null-route decision (MC 104025) 2026-06-21

DecisionNo bulk-apply. 237 null-route tasks, 140 = email noise, 8 auto-routeable. Lever exhausted...

Anthropic Outage Resilience — 529 Auto-Fallback Runbook

Anthropic Outage Resilience — 529 Auto-Fallback Runbook MC: #104217 T5 Owner: Skillforge Date: 20...

MC #7346 — ZAKON #16 --yolo CEO Decision Persistence

MC #7346 — ZAKON #16 --yolo CEO Decision Persistence Status PASS — CEO --yolo authorization decis...

FORGE Multi-Model Verify Fleet — Pilot (MC #105018)

FORGE Multi-Model Verify Fleet — Pilot Report MC #105018 | Date: 2026-07-09 | Status: PARTIAL COM...

FORGE Verify Stress Test — 20 slučajeva (MC #105104)

FORGE Stress Test — Executive Summary MC #105104 | 2026-07-09 Objective Statistically validate pi...

mini-verifier default switch na qwen2.5:7b (MC #105107)

Mini-Verifier Switch Report — MC #105107 Date: 2026-07-09 Agent: AgentForge (Georgi Gerganov cont...

Bilko MC #105109 — stranded commit e7986b47 verdict

Bilko stranded commit e7986b47 — verdict (MC #105109) Question Commit e7986b47 on branch fix/stri...

mini-verifier prompt tuning — size tolerance + retry-on-empty (MC #105113)

Mini-Verifier Prompt Tuning — MC #105113 Date: 2026-07-09 Agent: CodeCraft Task: Fix two mini-ver...

mini-verifier canary — dnevni known-answer monitoring (MC #105136)

MC #105136 — mini-verifier canary in auto-verify-regression — Canary Report Scope Extended ~/syst...

CC Verifier Sidecar and Ready Gate — Observe Rollout (MC #105472)

CC Verifier Sidecar and Ready Gate — Observe Rollout (MC #105472) Current state The persistent CC...

Disk hygiene after 2026-07-13 build drain — MC #105584

Disk hygiene after 2026-07-13 build drain — MC #105584 Book: System Architecture Status: Complete...

Session Supervisor — Observe Rollout and Operations (MC #105577)

Session Supervisor — Observe Rollout and Operations (MC #105577) Purpose and status The session s...

Central Exact-Revision Verifier Ready Gate — Architecture and Operations (MC #105594)

Central Exact-Revision Verifier ready Gate Runbook — MC #105594 WP1 Status: publish-ready local d...

Cross-Platform Advisory AI PR Reviewer — Architecture and Operations (MC #105620)

Cross-platform AI PR reviewer — shared core and adapters (WP1) MC: #105621 Parent: #105620 State:...

PI Orchestrator — Discipline Fixes & Restart Runbook (MC #105648)

PI Orchestrator — 4 discipline fixa (MC #105648, 2026-07-14) Kontekst: 3 incidenta istog dana tok...

Storage cleanup 80%→76% + system git 50G bomb defuse (filter-repo) — MC #105751

Agent ID: john-main-session-7f7c5187 Verdict: PASS Task: MC #105751 — Disk cleanup (CEO odobrio s...

Bilko Cloud HR full UAT sweep — IMAMO/NEMAMO/NE RADI mapa (6 agenata) — MC #105765

Agent ID: john-synthesis-105765 Verdict: COMPLETE (6/6 dimenzija, 91 nalaz: 32 works / 20 missing...

Azure DevOps Service Hook PR Reviewer — R4 Local Candidate (MC #105847)

Azure DevOps Service Hook PR Reviewer — R4 Local Candidate (MC #105847) Status Accepted local can...

Azure DevOps Service Hook Reviewer — R10 Local Candidate (MC #105993)

Azure DevOps Service Hook Reviewer — R10 Local Candidate (MC #105993) Status: Accepted local exa...

Azure DevOps Ingress Drift Gate — R1 Local Candidate (MC #106024)

Azure DevOps ingress drift gate — R1 local candidate (MC #106024) Status: exact-SHA local candida...

mc.js force-pending Auto-Expiry Sweep (MC #105894)

mc.js force-pending Auto-Expiry Sweep (MC #105894) MC: #105894 Parent system: mc.js Force Approv...

RAG Outbox SQLite — Single-Writer Topology, Checkpoint Discipline & Integrity Watchdog (MC #106047)

RAG Outbox SQLite — Single-Writer Topology, Checkpoint Discipline & Integrity Watchdog Status: AC...

ALAI Frontend Engineering Spec v1 — Build, Auth, Cache, i18n, CSP, CI Gate (MC #106089)

ALAI Frontend Engineering Spec v1 Document ID: ALAI-FE-ENG-001 Version: 1.0 Date: 2026-07-20 Stat...

Frontend PR Review Checklist v1 (MC #106089)

Frontend PR Review Checklist v1 Source spec: ~/system/docs/published/alai-frontend-engineering-sp...

Frontend CI Gate v1 (MC #106089)

Frontend CI Gate v1 Source spec: ~/system/docs/published/alai-frontend-engineering-spec-v1-106089...

TLDR Actionizer — Security Exemption for the Flood Cap (MC #106196)

TLDR Actionizer — Security Exemption for the Flood Cap (MC #106196) Status: Shipped 2026-07-22 · ...

ALAI Alarm/Notification Source Audit — 2026-07-22 (MC #100785)

ALAI Alarm/Notification Source Audit — 2026-07-22 Agent: sentinel-tester MC Task: #100785 (redo —...

Silent-Alarm Remediation Wave — MC #100785 follow-ups (#106201-106204)

Silent-Alarm Remediation Wave — MC #100785 follow-ups (2026-07-23) Fixes for the silent/blind-spo...

QA Review — SnowIT MC #9257 CTA Prefill (MC #9267)

QA Review #9267 — SnowIT MC #9257 Scope: completed task #9257, "Vizu: snowit.ba followup — usluge...

QA Review — MC #9658 reviewing #9655

QA Review — MC #9658 reviewing source task #9655 Date: 2026-07-28 Reviewer: John / pi-orchestrato...

QA Review MC #9659 reviewing #9652

QA Review — MC #9659 reviewing source task #9652 Date: 2026-07-28 Reviewer: John / pi-orchestrato...

QA Review — MC #8793 / Target MC #8323

QA Review — MC #8793 / target MC #8323 Date: 2026-07-28 Reviewer: John / Proveo infrastructure sp...

pi-orch HTTP Route Restoration — RCA & Runbook (MC #100591)

pi-orch HTTP Route Restoration — RCA & Runbook (MC #100591, parent #100588) Servis: orchestrator-...

Fusion Harness — Scoped Run Ledger & Safe Workflow Spine

Fusion Harness — Scoped Run Ledger & Safe Workflow Spine MC lineage: #107024 ledger → #107039 fre...

ALAI AI System Inspekcija 2026-08-13 — MC #107132

SINTEZA — ALAI AI SYSTEM INSPEKCIJA MC #107132 | 2026-08-13 | Naručilac: Alem Basic (CEO) | Sinte...

BookStack task lifecycle enforcement — ANVIL Claude Code

BookStack task lifecycle enforcement — ANVIL Claude Code Status: IMPLEMENTED / live verification ...

ALAI Opinion MC task plan — 2026-08-23

ALAI opinion findings → Mission Control execution plan Date: 2026-08-23 Opinion source: /Users/ma...

IndyDevDan smart prompting + Software Factory Lite — MC #900165

IndyDevDan smart prompting + Software Factory Lite — Pi and Claude Code Date: 2026-08-23 MC: #900...

LightRAG retrieval-quality recovery — MC #900176

LightRAG retrieval-quality recovery — MC #900176 Status: LIVE PATCHED / guarded rollout; agent ro...

LightRAG G1 complete blue-green rebuild — MC #900195

LightRAG G1 complete blue/green rebuild — MC #900195 Status: BLOCKED / wave 004 completed but tru...

MC #900209 — done kapije popravka + qa19 block (2026-08-24)

MC #900209 — Popravka done kapija + qa19 nazad na block (2026-08-24 CEO nalog) Kontekst: qa19 enf...

MC 900252 — Zatvaranje v2 DoD po tipu + rezanje kapija (2026-08-26)

MC #900252 — Zatvaranje v2: DoD po tipu + rezanje kapija (start 2026-08-26) CEO ODLUKE 2026-08-2...