βMake AI work for you, not the other way around. Sovereign Intelligence through GitOps, AIOps, and Ansible.βπ Official Live Documentation:
- GitHub Pages: https://linuxmalaysia.github.io/deep-state-of-mind-for-my-ai/
- GitBook: https://malaysia-open-source-community.gitbook.io/deep-state-of-mind-dsom-protocol-for-my-ai
- Read the Docs: https://deep-state-of-mind-for-my-ai.readthedocs.io/en/latest/
π― 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:AI Proposes β Git Records β Executor Runs β AI Verifies
The Three Hard Rules
- AI never runs commands directly on remote nodes. It writes execution scripts/playbooks. You run them.
- No manual edits to production servers. If itβs not committed to Git, it doesnβt exist.
- 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 asThe 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.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 executinguvornode, the Third Pillar operates entirely on the philosophical foundation of Ansible.
π€ Agent Registry & The Dual AGENTS.md Architecture
DSOM maintains two synchronisedAGENTS.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 bothAGENTS.mdfiles synchronised. The root gateway is the first read; the.agents/AGENTS.mdis 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
.agents/brain/ directory with:
task.md, What to do right nowwalkthrough.md, Session history and Mental Anchorsimplementation_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]:
[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
[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: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 existingwalkthrough.md (The Drawer).
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:
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 (includingdsom-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.β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):
π οΈ During Active Work
π End of Day (EOD)
Step 1, Context Consolidation (Ask your AI)βWe are ending the session. UpdateStep 1b, Hibernation Notes Export (Run this in your AI chat, copy verbatim).agents/brain/task.md, mark completed[x], set tomorrowβs targets[ ]. Update.agents/brain/walkthrough.mdwith todayβs Mental Anchor.β
.agents/brain/hibernation-notes-YYYY-MM-DD.txt or to your notebook.
Step 2, EOD Mechanical Save (Cross-Platform Palace Sync)
palace_update_proposal_YYYY-MM-DD.md.)
Step 3, Privacy Scan (if you generated an anomaly manifest)
π The Day-to-Day Continuity Loop
ποΈ Repository Structure
β 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 fromREANIMATION-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)
- β 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-cloneranddsom-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.mdupdate - UK English only in all documentation
- No secrets in any committed file
- Triple-Ledger Mandate: Major updates must sync
README.md,CHANGELOG.md, andHISTORY.md
../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