Repository navigation
Handoff Architecture Guide
A.I.M. solves the Amnesia Problem by ensuring that no technical progress is lost when an agent's context window fills. The system utilizes a dual-layered continuity approach: Executive Hand-off (Immediate Action) and Eternal Recall (Historical Context).
⚠️ Antigravity-Native Architecture: This pipeline has been fully adapted to operate within the Antigravity IDE. The legacytmux-based terminal splicing and raw JSON scraping have been replaced by a human-in-the-loop Export mechanism combined with zero-token Python parsing. See Reincarnation Map for the full step-by-step sequence.
When an agent reaches the 30% context threshold, the Operator initiates the Reincarnation Protocol by typing /reincarnate <Commander's Intent>.
The dying agent immediately halts and displays a mandatory Export prompt:
"
⚠️ Please click the Export button at the top of this chat window to download the transcript. Reply Proceed or Cancel."
Once the Operator clicks Export and replies Proceed, the agent executes python src/handoff_pulse_generator.py "<Intent>". This is a 100% zero-token Python pipeline that mechanically generates all continuity artifacts without spending LLM API tokens.
1.2 The Reincarnation Gameplan
The Python pipeline writes REINCARNATION_GAMEPLAN.md from the Commander's Intent parameter.
- Intent: Passing "Will" instead of "Memory."
- Content: Explicit, rigid directives for the next agent (e.g., "1. Fix the SQL trigger in Tier 5. 2. Verify with pytest. 3. Do not refactor the CLI.")
- Benefit: Bypasses the need for the new agent to analyze the previous agent's conversational drift.
Simultaneously, the pipeline creates CURRENT_PULSE.md.
- Function: Extracts the last 5 conversational turns from the exported transcript — the immediate technical "Edge" of the session.
-
Filtering: Pure Python string parsing on the exported
.mdfile. Zero API cost.
The full exported .md transcript is copied directly to continuity/LAST_SESSION_FLIGHT_RECORDER.md.
- Function: Complete, pristine forensic archive of the entire session.
- Usage: Only consulted when the Operator explicitly asks about a granular detail (a "NITH" — Needle In The Haystack) from the prior session.
While the new agent is born with a clean context, it retains access to the entire history of the project through the History Search System.
Every exported session transcript is simultaneously processed through two pipelines:
-
Pipeline 1 (Archive): Full raw transcript →
archive/raw/session_<timestamp>.md. -
Pipeline 2 (Engram DB): Row-by-row ingestion of all conversational turns into
history/session_engram.db(SQLite, columns:id, session_id, timestamp, role, content).
The cleaned session data is indexed in history/session_engram.db utilizing SQLite FTS5.
-
Command:
aim search <query> - Usage: The new agent only accesses this layer if the Gameplan explicitly requires historical context extraction (e.g., "Recall the regex used in the legacy parser from 3 sessions ago").
When the new agent boots in a fresh Antigravity chat window, it is governed by a strict Continuity Protocol defined in HANDOFF.md:
-
Read
GEMINI.md: Acknowledge core constraints and GitOps rules (auto-loaded via KI system). -
Read
continuity/REINCARNATION_GAMEPLAN.md: Ingest immediate executive directives (The "Will"). -
Read
continuity/CURRENT_PULSE.md: Locate the current technical edge (last 5 turns). -
(Optional) Read
continuity/LAST_SESSION_FLIGHT_RECORDER.md: Only if the Gameplan or Operator requires forensic recall.
This sequence ensures that the fresh agent achieves Epistemic Certainty before taking its first action.
- 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)