Repository navigation
Layered Engram Architecture
🔴 STATUS: TARGET ARCHITECTURE (DECAPITATED). This document maps the advanced features for Tier 4 Knowledge Distribution. Currently, in
aim-antigravity, the underlying Daemons (aim watch) and DataJack Swarm plugins (aim exchange) are broken/missing (Issues #42 and #49). This document serves as the target blueprint for rebuilding them in the Antigravity native environment.
A.I.M. is driving toward two advanced knowledge-distribution features that are seemingly at odds:
-
The Decentralized DataJack Registry (Phase 38):
.engramcartridges should be immutable, mathematically hashed SQLite binaries shared via a peer-to-peer network. This requires the file to be static. - Self-Upgrading Engrams (Live IDE Polling): Tier 5 Autonomic Hooks should scrape GitHub and forums to inject new bug fixes into the local knowledge base. This requires the file to be highly mutable.
If local background hooks mutate the shared .engram files, they break the cryptographic hash, destroying the swarm and fragmenting the community's knowledge base.
To resolve this, Tier 4 Deep Memory must adopt a Layered RAG Architecture—operating much like Docker image layers or Linux package managers (LTS core + daily security patches).
- Generated via the DataJack
aim bakeworkflow. - Contains the vast bulk of foundational documentation (e.g.,
django-v5-core.engram). - Read-Only: Once generated, this local SQLite table/file cannot be modified by the local workspace.
- Decentralized: Because it is static, its hash is permanent, making it perfect for seeding to the decentralized registry.
- Managed by the Tier 5 Autonomic processor (formerly the
aim watchdaemon). - When the processor scrapes new solutions from GitHub, it does not insert them into the core cartridge.
- Instead, it inserts the vectorized data into a highly mutable, local-only SQLite table called
live_deltas(or writes them to a designatedsynapse/live_feed/text directory).
When the active AI agent executes an explicit memory recall (e.g., via the retrieval tools), the script queries both layers simultaneously:
- It searches the
live_deltastable. - It searches the read-only Base Cartridges. If a conflict or duplicate topic exists, the Live Delta takes precedence, effectively "patching" the outdated knowledge in the Base Cartridge at runtime.
This layered approach naturally creates an open-source lifecycle for knowledge:
-
The Daily Grind: 1,000 operators run the autonomic loops locally. Over 6 months, their
live_deltasdatabases fill up with hundreds of new bug fixes. -
The Minting: A community maintainer decides it is time for an official release. They execute a merge sequence:
aim bake --merge-deltas django-v5.1.engram -
The Fusion: The script takes the old immutable base, merges all the proven solutions from the
live_deltastable, and mints a brand-new, officially hashed.engramfile. -
The Reset: The new cartridge is distributed. Users load it via DataJack injection, which automatically wipes their local
live_deltastable clean to begin the cycle anew.
- Update
src/forensic_utils.pyand the database schema to isolate core data from live delta data. - Modify
src/retriever.pyto prioritizelive_deltasresults over core results in the final FTS5/Vector ranking algorithm when the DataJack modules are eventually ported.
- 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)