Repository navigation
The Master Schema
This document is the definitive architectural map for the A.I.M. platform operating within the Antigravity IDE environment. It defines the modular components of the brain and the protocols that ensure continuity and sovereignty.
- Role: Lean Orchestrator & Cognitive Baseline.
- Function: It is an explicit Table of Contents. Instead of holding massive walls of text, it directs the agent to query the Engram DB or local Knowledge Items (KIs) for technical policies.
- Cognitive Guardrails: It permanently encodes the Operator's rules, the GitOps mandate, and the "Token-Saver" conciseness mandate.
- Function: Dynamic, file-based Slash Workflows within the IDE.
-
/init: Bootstraps a fresh project, running health checks and establishing foundational Knowledge Items. -
/sync: Idempotently updates theaim_operator_profileandaim_project_architectureas the project evolves, abandoning the monolithic CLI TUI menus of the past.
The human brain does not hold every memory simultaneously. A.I.M. mirrors this biology using a 5-Tier layout to establish Epistemic Certainty without destroying the LLM context window.
Mechanism: GEMINI.md (injected as user_rules).
Function: 3-to-4 strict mandates that are injected on literally every API call. It contains the GitOps rules and the pointer to the boot sequence.
Mechanism: HANDOFF.md -> CURRENT_PULSE.md.
Function: Generated fresh by the /reincarnate checkpoint process. Holds the Commander's intent and the last 5 turns of conversation to provide immediate situational awareness. Discarded at the end of the session.
Mechanism: ~/.gemini/antigravity/knowledge/.
Function: Persists across sessions. Provides localized, immediate structural rules like the Operator's identity and specific architectural choices for the specific codebase.
Mechanism: Local SQLite Databases (archive/engram.db).
Function: Uses a Hybrid RAG engine (Nomic Vector Embeddings + FTS5 Lexical matching). It does NOT exist in active context. The agent must explicitly use aim search to recall data.
Mechanism: Python Scripts & Hooks (src/*.py).
Function: Pure, deterministic background processors that handle data extraction, file watching, and database generation. We do not ask the LLM to waste expensive tokens acting as a "super memory machine" when flat python code can do it for free ("Breathing").
The Tier 5 Autonomic Nervous system uses predefined Python pipelines to refine chat history into static knowledge.
-
The Harvester (
hooks/session_summarizer.py): Strips JSON tool noise and extracts a lean "Signal Skeleton" (ARC Report). -
The Proposer (
src/memory_proposer.py): Squashes hourly logs into structured Add/Remove deltas. -
Daily Distillation (
src/daily_refiner.py): Consolidates Tier 2 proposals into a single Daily State. -
Weekly Arc (
src/weekly_consolidator.py): Synthesizes Daily proposals. -
The Apex Proposer (
src/monthly_archivist.py): Fuses everything into architectural axioms.
- Role: Sovereign Mirror.
- Function: Mirroring of Daily Logs, Core Memory, and Raw Transcripts to an external Obsidian vault for 100% human-readable recovery.
A.I.M. maintains technical continuity through a dual-mode ingestion engine within src/bootstrap_brain.py.
-
Scope:
GEMINI.md,core/MEMORY.md, and all files inantigravity.wiki/. - Logic: These files are Synchronized. Every time a session starts, background hooks check timestamps and update the Engram DB automatically if a human touched the files.
-
Scope: Everything dropped into the
foundry/folder. - Logic: This is an Onramp. Once indexed, the knowledge is permanently persistent in Tier 4 Deep Memory.
- Role: IDE Tool Integration.
-
Function: A built-in
fastmcpserver (src/mcp_server.py) exposes the A.I.M. Engram DB natively to agents.
- Role: Binary Conflict Resolution.
-
Function: SQLite databases (
engram.db) break git diffs. A.I.M. translates the database into deterministic.jsonlfiles (archive/sync/) during GitOps so memory changes can be peer-reviewed in GitHub PRs before merging.
Every functional change MUST be governed by the TDD lifecycle. No code enters the src/ directory without empirical verification.
-
aim bug <description>: Creates a structured GitHub Issue via theghCLI. -
aim fix <id>: Checks out a clean Git branch (fix/issue-<id>).
-
The Rule: AI agents are strictly forbidden from executing raw
git push origin main. Every deployment must be atomic, originating from a uniquefixbranch, and packaged usingaim push "Prefix: msg"to enforce correct SemVer prefixes.
- Atomic Architecture (The KISS Manifesto)
- Origin Story
- The Logic Of A.I.M.
- The A.I.M. Handbook (Operator's Manual)
- The Swarm Post Office (Comms Interface)
- The Master Schema
- Waterfall Memory Architecture
- Technical Specification
- Script Map (Core Codebase Map)
- Brain Map (Memory Architecture)
- A.I.M. Prompt Injection Map
- AI Prompt Ledger
- Onboarding Identity Map
- Handoff Architecture Guide
- Reincarnation Map
- TUI Map (Cockpit UI Logic)
- The Global Chalkboard (Concept: Document Data Bus)
- Remote Fleet Architecture (Concept: The Phantom Keyboard)
- The Eureka Protocol (Concept: Live Context Pruning)
- The Sovereign Swarm (Concept: BitTorrent DataJack)
- The Decoupled Brain (Concept: Obsidian Transport Layer)
- Obsidian Bridge Architecture
- Layered Engram Architecture
- The Pragmatic Feature Manifesto
- The Cascading Memory Engine
- Hybrid RAG (Semantic + Lexical)
- Cognitive Routing
- The DataJack Protocol
- Runbook Engram Creation
- The GitOps Bridge
- Feature Quarantine Daemon
- The 30 Percent Rule
- TUI Handoff Report
- The Universal Skills Framework
- Vibe Coding Pipelines (Automated Agentic Assembly)
- Cartridge Farming Ecosystem
- Design Future Architectures
- The Collective Cortex (Vision: SETI@home for AI)
- Sovereign Swarm (P2P) (Architecture: P2P DataJack)
- Eureka Protocol & Synapses (Protocol: Synthetic Data Factory)