Entry Point 21: This document governs the automated compilation of standard Markdown documents indocs/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)
- On GitHub, navigate to Settings -> Developer settings -> Personal access tokens -> Fine-grained tokens.
- Set Repository access to
Only select repositories-> select<OWNER>/<DOCS_REPO>. - Set Permissions -> Repository permissions -> Contents:
Read and write. - Generate the token.
Step 2: Configure Repository Secret
- In the source repository, go to Settings -> Secrets and variables -> Actions.
- Click New repository secret.
- Name:
DOCS_REPO_TOKEN. - 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:docs/ in the main repo and re-run dry-run before pushing.
SOURCES
- tools/build_mintlify_mdx.py: Automated MD-to-MDX compiler and
docs.jsontree generator. - scripts/sync_docs.py: Hardened sync script enforcing Guards A–E.
- .github/workflows/sync-docs.yml: Automated GitHub Actions deployment pipeline.
- Mintlify Official Documentation: Reference specification for Mintlify docs hosting and MDX components.
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