docs/tools/HOWTO-BUILD-SOVEREIGN-BOOK.md
Standard: DSOM For My AI Protocol v6.1 | Archival Persistence
Tool: build_sovereign_book.sh | Version: v3.11 | Platform: Linux / WSL2 (T2)
1. Purpose
build_sovereign_book is the High-Fidelity Archiver for the DSOM ecosystem. It collapses the entire repository’s Markdown documentation and brain artifacts into a single, professionally typeset PDF book using Pandoc and LuaLaTeX.
Use it to:
- Generate an immutable off-site backup of the “Sovereign Brain”.
- Audit the repository for “Untracked” artifacts missing from
SUMMARY.md. - Produce a readable, versioned PDF manual with a Table of Contents.
- Automatically commit and archive the build artifact into the Git ledger.
tools/build_sovereign_book.sh
2. Prerequisites
2.1 Installing Dependencies
Ubuntu/Debian:3. Usage
3.1 Standard Build
4. Build Engine Logic (The 8 Pillars)
- High-Res Timestamps: Embeds
YYYYMMDD_HHMMinto the filename. - Fail-Safe Traps: Uses Bash traps to ensure
build_tmp/is purged even on failure. - OS-Aware: Automatically detects DNF vs APT environments.
- Table Flattening: Normalizes complex Markdown tables for PDF display.
- Artifact Discovery: Scans the folder and warns if files are missing from
SUMMARY.md. - LuaLaTeX Power: Supports Noto Color Emoji internally for status indicators.
- Header Isolation: Protects the build from LaTeX syntax errors in raw Markdown.
- Atomic Ritual: Commits the PDF and updates
HISTORY.mdautomatically.
5. Reading the Output & Status Codes
6. Security Advisory
[!WARNING]
The generated PDF contains your entire project brain.
- If your project is Private, keep the PDF private.
- If you move the PDF outside the repository, treat it as a Sensitive document.
7. Related Documents
Standard: DSOM For My AI Protocol v6.1 | Harisfazillah Jamel | LinuxMalaysia Document Version: v1.0 | Created: 2026-04-08
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-04 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0