Skip to main content
Entry Point 21: This document governs the automated compilation of standard Markdown documents in docs/ and skills in .agents/skills/ into Mintlify MDX (docs-source/) and their deterministic, one-way synchronization to downstream docs repositories (e.g. linuxmalaysia/my-knowledge-brain) powering harisfazillah.mintlify.site.

1. Architectural Philosophy & Zero-Bloat Invariant

In modern multi-agent systems and sovereign software engineering, documentation must maintain a single authoritative source of truth. Authoring documentation directly inside hosted CMS tools, web editors, or downstream deployment repositories creates context drift, merge conflicts, and accidental knowledge destruction. The Deep State of Mind (DSOM) protocol resolves this through Automated MD-to-MDX Compilation and One-Way GitOps Synchronization:

2. The 5 Non-Negotiable Safety Guards (A–E)

The sync pipeline (scripts/sync_docs.py) executes five sequential verification gates. If any guard fails, the process immediately exits non-zero before touching the downstream repository:

3. Reusable Implementation Prompt for Any AI Coding Assistant

To instantiate this identical architecture on any other repository or client project, provide the following prompt to an AI coding assistant (Google Antigravity, Claude Code, Cursor, GitHub Copilot):

4. Setup & Operational Runbook

Step 1: Create Fine-Grained Personal Access Token (PAT)

  1. On GitHub, navigate to Settings -> Developer settings -> Personal access tokens -> Fine-grained tokens.
  2. Set Repository access to Only select repositories -> select <OWNER>/<DOCS_REPO>.
  3. Set Permissions -> Repository permissions -> Contents: Read and write.
  4. Generate the token.

Step 2: Configure Repository Secret

  1. In the source repository, go to Settings -> Secrets and variables -> Actions.
  2. Click New repository secret.
  3. Name: DOCS_REPO_TOKEN.
  4. Value: <fine-grained-pat>.

Step 3: Local Dry-Run Testing

Before pushing major documentation reorganizations, verify the sync locally:

Step 4: Disaster Recovery & Rollback

If an errant commit is pushed downstream:
Fix the source issue in docs/ in the main repo and re-run dry-run before pushing.

SOURCES


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