Repository navigation
Feature Quarantine Daemon
⚠️ STATUS: CONCEPTUAL ARCHITECTURE (BLEEDING EDGE) This document outlines a highly advanced context-management architecture designed to act as a "Non-Destructive Garbage Collector" for LLM memory arrays. We believe this pattern sits at the absolute cutting edge of agentic systems, and we are open-sourcing it for free.
As of early 2026, managing "Context Rot" is the primary bottleneck for autonomous agents.
-
The Industry Solution: Commercial tools like Claude Code and Roo Code rely on manual user intervention. They provide a
/rewindcommand, forcing the human to realize they are in a rabbit hole and manually delete the conversation history. Once deleted, the data is gone forever. - The Academic Solution: Research frameworks like TC-RAG use "State Pops" to rewind context when the AI detects its own logical contradictions.
The Missing Link: No framework currently handles User-Side Thrashing (human flip-flopping) autonomously while maintaining Forensic Data Safety.
A.I.M. solves this via the Quarantine Daemon.
When an operator changes their mind during a build, it devastates the LLM's context window.
The "Flip-Flop" Scenario:
- User: "Add a red button."
- AI: Writes code for a red button.
- User: "Actually, make it blue."
- AI: Rewrites code for a blue button.
- User: "Nevermind, just delete the button completely."
- AI: Deletes the button code.
In a standard agentic CLI, the active context window is now poisoned with 6 turns of useless, contradictory logic and obsolete code blocks. The LLM continues to pay massive API token costs to "remember" a button that no longer exists, increasing the risk of future hallucinations.
The Quarantine Daemon operates as a background Python hook that intercepts the raw JSON chat array and performs a Soft Delete.
The daemon monitors the user's prompts for "Reversion Semantics" (e.g., "revert that", "nevermind", "actually go back to"). When detected, it identifies that a logical side-quest has just been invalidated.
Instead of forcing the LLM to write a response acknowledging the reversion, the daemon programmatically steps in. It calculates the exact conversational turn where the side-quest began, and physically slices those JSON blocks out of the active terminal session's memory array.
Silent deletion is dangerous. If the user later decides, "Wait, what was the hex code for that blue button we tried earlier?", the data must be retrievable.
The daemon does not delete the excised JSON. Instead, it appends the raw JSON blocks to a local graveyard file: continuity/private/PRUNED_GRAVEYARD.jsonl.
To prevent the human operator or the LLM from getting confused by the sudden jump in conversation, the daemon replaces the excised turns with a single, ultra-compressed synthetic marker:
[SYSTEM NOTE: The previous 6 turns regarding the button UI were quarantined by the daemon to prevent context bloat. To restore this data, run 'aim unprune'.]
By implementing the Quarantine Daemon, A.I.M. achieves two previously mutually exclusive goals:
- Zero Context Weight: The AI's active token payload drops instantly. It stops hallucinating based on dead-end code blocks.
-
100% Forensic Fidelity: The operator loses absolutely nothing. If an old idea becomes relevant again, the
aim unprunecommand instantly stitches the quarantined JSON back into the active array.
It is a perfectly safe, automated garbage collection system for human logic.
- 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)