Artifact Level: L2 (Analysis)
Rule Reference: Rule 1, Rule 8, Rule 18, .agents/AGENTS.md
Status: Active Baseline, foundational doctrine for all DSOM projects.
Abstract
By enforcing Zero-Global Memory, the DSOM framework resolves the most critical structural failure in standard LLM deployments: the AI’s memory is ephemeral, vendor-locked, and unauditable. With this architectural mandate, all project knowledge, operational state, and session context live exclusively in a Git repository, never inside the AI agent itself. The AI becomes a stateless, replaceable reasoning engine. The repository becomes the brain.1. The Core Problem: Ephemeral AI Memory
Standard LLM deployments suffer from three compounding memory failures:1.1 Session Wipeout
Every chat session is isolated. When a session closes, the AI loses all accumulated context: server names, IP schemes, design decisions, in-progress task states, and personal preferences. The next session starts from zero.1.2 Vendor Lock-in
When project memory accumulates inside a proprietary AI tool (e.g., saved chats, project instructions stored in the vendor’s cloud), migrating to a different model or provider requires re-teaching everything from scratch. The institutional knowledge is trapped.1.3 No Audit Trail
There is no way to ask: “What did the AI know on 14 July, and who told it that?” Memory changes are invisible and unversioned. This is catastrophic for regulated or security-sensitive operational environments.2. The DSOM Solution: Git as the Brain
Zero-Global Memory resolves all three failures by a single architectural constraint:The AI is forbidden from acting as the source of truth. The Git repository is.Every piece of operational knowledge the AI needs must exist as a committed file in the repository before the AI can act on it. If it is not in Git, it does not exist.
3. The Mechanics: How Memory Is Structured
3.1 The Sovereign Markdown Palace
Memory is not stored as a flat list of notes. It is structured into a spatial architecture, the Sovereign Markdown Palace, organised into hierarchical rooms:closet.md contains a bounded, single-topic knowledge unit (OKF-compliant). The AI navigates this structure deterministically, it does not search, it reads from a declared address.
3.2 Active Context Manifest
The AI never loads the entire.agents/brain/ directory. Instead, it reads only the files declared in active_context_manifest.md at the start of each session:
palace_update_proposal files in the baseline repository alone contain 120,466 tokens, loading them wholesale would consume the entire context window before any work begins.
3.3 The Episodic Resume Protocol (Rule 18)
At the end of every significant workflow, the AI generates a[DSOM EPISODIC RECORD] block, a compact serialisation of the session’s cognitive state. This record is saved by the human operator and used to reanimate the next session precisely where the last one ended:
3.4 The Cognitive Flow Map
To fully visualize how the AI navigates this Zero-Global Memory structure during a session, the following relational matrix dictates the strict path of context ingestion: Relational Matrix:AGENTS.md: The absolute cognitive entry point. Governs the format and behavioural constraints for every subsequent file.active_context_manifest.md: The Session Bootloader. Directs the AI to selectively load task, walkthrough, and spatial memory indices without flooding tokens.palace_registry.md: The Spatial Map. Indexes all knowledge rooms (closets), preventing the need for the AI to “search” the filesystem blindly.task.md&walkthrough.md: The short-term action queue and episodic memory anchor, functioning together to serialize the precise state of execution.
4. Operational Procedures
4.1 Start-of-Day (SOD), Memory Reanimation
4.2 During Session, Memory Writes
Every decision, discovery, or architectural change made during a session must be committed to the appropriate location before the session ends:4.3 End-of-Day (EOD), Memory Serialisation
5. Why This Architecture Survives AI Model Changes
Because all memory is in Git, not in the AI:6. The Token Efficiency Connection
Zero-Global Memory directly enables the DSOM token efficiency gains (96.23% reduction) because:- Bounded loads, only declared files are ever loaded; no speculative reads.
- OKF frontmatter routing, the
topics:tag on everySKILL.mdmeans skill discovery costs ~375 tokens instead of ~14,400 tokens (full bodies). - 4,000-token gate, the
dsom-token-calculatorskill enforces a circuit breaker, preventing any single file from flooding the context window. - Archival isolation, massive palace proposal files (30,000–55,000 tokens each) are permanently excluded from active context via
active_context_manifest.md.
7. Governance Rules (AGENTS.md)
8. Anti-Patterns That Violate Zero-Global Memory
SOURCES
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-19 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0