Skip to main content
β€œMake AI work for you, not the other way around. Sovereign Intelligence through GitOps, AIOps, and Ansible.”
πŸ“– Official Live Documentation:

🎯 What is DSOM?

Deep State of Mind (DSOM) is a metacognitive governance framework that transforms any AI (Gemini, Claude, Copilot, ChatGPT) into a disciplined Cognitive Digital Twin, an AI agent that thinks and operates like your Senior Systems Architect. It solves three critical AI problems:

πŸ›οΈ The Three Pillars (v6.1)

Every project built on this skeleton operates under three non-negotiable pillars:
The core loop:
AI Proposes β†’ Git Records β†’ Executor Runs β†’ AI Verifies

The Three Hard Rules

  1. AI never runs commands directly on remote nodes. It writes execution scripts/playbooks. You run them.
  2. No manual edits to production servers. If it’s not committed to Git, it doesn’t exist.
  3. Every execution is idempotent. Safe to re-run at any time.

πŸ”Œ Execution Modularity & The Windows WSL2 Bridge

While Ansible is the default Executor for infrastructure projects, the Third Pillar is fully modular based on your project domain:
  • Infrastructure: ansible-playbook
  • Data Science / Python: uv run
  • Web Development: npm run / node
  • Documentation: pandoc / latex
The Ansible Legacy: While the Executor is modular, DSOM is fundamentally rooted in IT Operations. Ansible is woven into the DNA of this framework. The governance ledgers (such as GITOPS-AIOPS-ANSIBLE-STRATEGY.md) intentionally retain Ansible as their namesake because it represents the ultimate standard of idempotency, declarative state, and absolute control. Even when executing uv or node, the Third Pillar operates entirely on the philosophical foundation of Ansible.
The Windows WSL2 Bridge: For projects running purely on Windows 11 without a dedicated Linux jumphost, WSL2 (Ubuntu/AlmaLinux) must be configured as your local Control Node. This β€œExecution Bridge” ensures humans and AI agents can seamlessly leverage standard Linux tooling (Ansible, Make, Bash) natively within the Windows environment without architectural friction.

πŸ€– Agent Registry & The Dual AGENTS.md Architecture

DSOM maintains two synchronised AGENTS.md files to serve both project-aware AI agents and external platform agents (e.g., Google Jules, Cursor, GitHub Copilot) that scan repository roots by default.
Tip: Keep both AGENTS.md files synchronised. The root gateway is the first read; the .agents/AGENTS.md is the complete read. This dual-file pattern ensures DSOM governance is immediately discoverable by any AI tool without requiring custom configuration.

πŸš€ Quick Start: Using This as Your Project Template

Prerequisites

Step 1, Clone and Reset

πŸ—οΈ Scaffolding a New Project? If you are migrating the highly customised AI skills and Sovereign Engine from this repo to a brand new one, you MUST follow the DSOM Project Cloning Guide first to ensure no cognitive capabilities are lost.

Step 2, Initialise the Brain

This creates your .agents/brain/ directory with:
  • task.md, What to do right now
  • walkthrough.md, Session history and Mental Anchors
  • implementation_plan.md, Project roadmap

Step 3, Fill in Your Project Identity Card ⚠️ CRITICAL

This is the most important step. Open and fill in every [PLACEHOLDER]:
Fill in:
  • [YOUR_PROJECT_NAME], e.g., my-kafka-pipeline
  • [T1] Command Centre path on your Windows/Mac
  • [T2] Dev Bridge path (WSL2/VM)
  • [T3/T4] Production host, user, UID, path
  • Security doctrine, who runs as root vs. which UID for apps
  • Mental Anchor Β§8, set to "Fresh project. Phase 1 pending."
⚠️ The AI will NOT operate properly until this file is filled in. audit-pre-flight.sh checks for unfilled placeholders and will warn you.

Step 4, Set Up Ansible Baseline (Infrastructure Projects)

Step 5, Run the Pre-Flight Audit

Everything should show [PASS] or [OK]. Fix any [FAIL] before continuing.

Step 6, Brief Your AI (The Cognitive Handshake)

Generate the context manifest and upload it to your AI:
Then upload the generated sod_manifest_YYYY-MM-DD.txt to your AI and say:
β€œInitialise DSOM Protocol. Read the uploaded manifest. Summarise the current Mental Anchor and confirm the 4-Tier environment map from the AI-COGNITIVE-TWIN-PROTOCOL.md section. State: β€˜Sovereign State Synchronised’ when ready.”
Your AI is now operational as a Cognitive Digital Twin.

πŸ›οΈ The Sovereign Workspace v2 (OKF + Palace + Skills)

New in v10.0: The DSOM brain has evolved to a spatial memory architecture, the Sovereign Markdown Palace. This approach is pioneered by and originated from the MemPalace project (milla-jovovich/mempalace).

What Is the Palace?

The Palace gives your AI organised, fast, spatial recall across months of project history, without reading entire session logs. It works as a second layer alongside the existing walkthrough.md (The Drawer).
Each Room has a closet.md, a distilled, high-density knowledge summary the AI reads instead of scanning hundreds of lines.

Open Knowledge Format (OKF) Integration

The DSOM Spatial Memory Palace and Skill Library are standardised on Google Cloud’s Open Knowledge Format (OKF v0.1 & v0.2). By using YAML frontmatter metadata and progressive disclosure directory routers (index.md), DSOM achieves a 98%+ token compression ratio, allowing AI agents to query knowledge in ~50 tokens per file instead of reading massive, unformatted code files. Read the full OKF-ADOPTION-GUIDE.md to adopt OKF across your repository.

Palace Quick Start

🧩 Known Gap: The Reasoning Problem

Research Finding (2026-04-08): DSOM solves state persistence effectively (via the Sovereign Palace), but there is one gap: live reasoning capture.
Six months of daily AI use generates millions of tokens of conversation. Every decision, every debugging session, and every tradeoff debate is often lost when the chat session ends. ⚠️ The gap: DSOM does not automatically capture why decisions were made, only what was decided. The reasoning lives in the chat window, not in Git. The fix (Decision Log Protocol): At key decisions, immediately ask the AI:
πŸ“– Full analysis: RESEARCH-REASONING-GAP.md

🎭 Sovereign Persona Injection

A core feature of the DSOM protocol is the ability to make the AI inherently act as your true Cognitive Digital Twin. You can inject your own identity, linguistic DNA, and operational constraints into the AI’s core engine. When you define your Persona Profile, the AI will automatically adopt your tone, your constraints (e.g. β€œFOSS only”, β€œAnsible-first”), and your exact architectural philosophies across every chat session.

πŸ› οΈ AI Agent Skills & Automation

DSOM enables your Cognitive Twin to autonomously self-heal, scaffold, and execute complex workflows through OKF-compliant AI Agent Skills. We currently host a suite of 17 specialised skills (including dsom-project-cloner, dsom-bootstrap, okf-frontmatter-injector, and persona-injector).

⚑ DSOM Onboarding & Cloning Automation

If you want to integrate the deep-state-of-mind architecture into an entirely new or existing repository, you no longer have to manually copy files. We have engineered robust AI skills (dsom-bootstrap and dsom-project-cloner) and cross-platform onboarding scripts that handle the integration cleanly.

πŸ“… Daily Operating Rituals

Full ritual guides: SOD-RITUAL.md | EOD-RITUAL.md

⚑ Mid-Day Checkpoint (Continuous Save)

If you are stepping away from the keyboard or want to sync state mid-task, you do not need to perform a full EOD ritual. Run the Checkpoint Ritual to systematically auto-commit and push your state cleanly.

πŸŒ… Start of Day (SOD)

If using Palace v1.0, you only need to run the automated SOD Palace script. This automatically pulls from Git, runs the audit pre-flight, verifies the Palace registry, and generates your reanimation manifest.
Optional, scan before sharing:
Step 4, Brief Your AI (The Cognitive Handshake) Option A, Upload manifest to AI chat, then say:
β€œInitialise DSOM Protocol v6.1. Read the uploaded manifest. Summarise the Mental Anchor and confirm the 4-Tier environment map. State: β€˜Sovereign State Synchronised’ when ready.”
Option B, If you have yesterday’s Hibernation Notes, use the SOD Reanimation Prompt (see SOD-RITUAL.md Step 4b):
Step 5, AI confirms readiness, you begin work.

πŸ› οΈ During Active Work


πŸŒ™ End of Day (EOD)

Step 1, Context Consolidation (Ask your AI)
β€œWe are ending the session. Update .agents/brain/task.md, mark completed [x], set tomorrow’s targets [ ]. Update .agents/brain/walkthrough.md with today’s Mental Anchor.”
Step 1b, Hibernation Notes Export (Run this in your AI chat, copy verbatim)
Save the output as .agents/brain/hibernation-notes-YYYY-MM-DD.txt or to your notebook. Step 2, EOD Mechanical Save (Cross-Platform Palace Sync)
(This automatically verifies brain artifacts, updates Palace rooms mapping, commits modified artifacts safely, and pushes your state. After running, you may be prompted to review your new palace_update_proposal_YYYY-MM-DD.md.) Step 3, Privacy Scan (if you generated an anomaly manifest)
Step 4, T2 Sync (pull on WSL2 if EOD was pushed from Windows)

πŸ”„ The Day-to-Day Continuity Loop


πŸ—‚οΈ Repository Structure

The ⭐ AI-COGNITIVE-TWIN-PROTOCOL.md is the most important file. Without it filled in, the AI has no project context.

🧠 The AI Brain, Understanding the Four Artifacts

The Mental Anchor is the most critical entry in walkthrough.md. It is the exact logical stopping point of the last session, the sentence that allows a brand new AI session to resume exactly where you left off, in under 3 prompts.

πŸ”€ Session Handover (Moving to a New AI)

When switching AI models, chat windows, or accounts, use the Sovereign Handover Prompt to export all context: Copy from REANIMATION-PROMPT-TEMPLATE.md β†’ Prompt Variant 2: Session Handover. Paste it into the old AI session first to get a full memory dump, then load the dump into the new AI session along with your manifest.

πŸ› οΈ Tools Reference

Windows users: All .sh scripts have a .ps1 PowerShell equivalent.

πŸ“‹ The 6-Step Boot Checklist (New Project)

Once Step 6 is complete, the AI knows:
  • βœ… Your 4-Tier environment (T1 β†’ T4)
  • βœ… Your security doctrine (who runs as root, who runs as UID X)
  • βœ… Your Git commit convention
  • βœ… Your production identity and isolation rules
  • βœ… The current Mental Anchor (last known state)
  • βœ… All governance laws and hard rules

πŸ“š Key Documents (The Governance Ledgers)


πŸ€– Supported AI Providers

This framework is provider-agnostic. Tested and configured for:

πŸ—ΊοΈ Roadmap

  • v4.1, Brain artifacts and Root-Aware scripts
  • v5.2, ITIL 4 alignment, Privacy Guardian, Multi-agent protocols
  • v6.0, GitOps + AIOps + Ansible three-pillar model, Cognitive Twin Protocol template, Git Ritual tool
  • v6.1, Ansible baseline playbooks, human handover, Google Antigravity integration
  • v6.2, Ansible roles/common, 19-node Elastic fabric hardened (v9.8.0)
  • v10.0.0-palace, πŸ›οΈ Sovereign Markdown Palace v1.0: spatial memory, palace-sync, 8 Rooms backfilled
  • v10.3.0-bootstrap, πŸš€ DSOM Bootstrapping baseline adoption, governance restructuring, and OKF v0.1 compliance
  • v10.3.1-skills, πŸ› οΈ AI Skills Automation: Added 17 Sovereign AI skills including dsom-project-cloner and dsom-bootstrap
  • v10.4.0-governance, πŸ›‘οΈ Token Efficiency Framework: Byte-capped execution, zero-global memory maps, and Android Termux FUSE benchmarking
  • v11.0, Local LLM support (Ollama) for offline Sovereign AI

🀝 Contributing

All contributions must follow the DSOM standards:
  • Atomic commits: type(scope): description [Phase/vX.X]
  • All PRs must include a walkthrough.md update
  • UK English only in all documentation
  • No secrets in any committed file
  • Triple-Ledger Mandate: Major updates must sync README.md, CHANGELOG.md, and HISTORY.md
See ../CONTRIBUTING.md for full guidelines.

πŸ‘€ Authors

  • Lead Architect: Harisfazillah Jamel, 35+ years ICT & Open Source Leadership
  • AI Partners: Google Gemini, Google Antigravity, Anthropic Claude
  • Framework: Built for the LinuxMalaysia Open Source Community

πŸ“„ License

Licensed under GNU General Public License v3.0. See ../LICENSE for details. At Your Own Risk: Shared for educational purposes. The author is not liable for data loss or AI hallucinations. Validate your own Cognitive Twins.

Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-08-21 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0