Skip to content

πŸ›οΈ PALACE-BUILD-STORY: How the Sovereign Markdown Palace Was Built

"Sovereignty through Spatial Awareness. Recall through Structured Reflection." β€” DSOM Palace Protocol v1.0

Version: v1.0 | Date: 2026-04-08 | Tag: v10.0.0-palace


1. 🧩 The Problem We Were Solving

Before the Palace, the DSOM brain had a flat file problem.

The AI's memory was stored in a single, growing walkthrough.md file. As sessions accumulated over months, this file grew to hundreds of lines. The AI was forced to scan the entire document to find relevant context β€” causing:

  • Context Decay: The AI would miss older architectural decisions buried deep in the log.
  • Attention Drift: With 300+ lines loaded, the AI's effective recall of early context dropped sharply.
  • Linear Retrieval: There was no way to jump directly to "what do we know about Ansible" β€” you had to read everything.

The task.md, walkthrough.md, and implementation_plan.md structure (the "Drawer") was excellent for persistence, but weak for retrieval.


2. πŸ’‘ The Inspiration: MemPalace

The solution came from the MemPalace concept β€” inspired by the ancient Method of Loci technique where Greek orators memorised entire speeches by mentally placing ideas in rooms of an imaginary building.

The DSOM adaptation: store everything in Git (the Drawer), then organise it spatially (the Palace).

  • The Drawer (walkthrough.md) = temporal (time-ordered, verbatim, persistent)
  • The Palace (wings/) = semantic (meaning-ordered, distilled, fast retrieval)

Neither replaces the other. They work in tandem β€” Dual-Mode Persistence.


3. πŸ—οΈ The Architecture We Designed

The Palace is a 5-layer directory hierarchy inside .agents/brain/:

.agents/brain/wings/
└── wing_dsom_core/               # Wing (Domain)
    β”œβ”€β”€ hall_facts/               # Hall (Memory Type: Immutable Laws)
    β”‚   β”œβ”€β”€ room_clean_architecture/closet.md
    β”‚   β”œβ”€β”€ room_crisp_strategy/closet.md
    β”‚   β”œβ”€β”€ room_dsom_protocol/closet.md
    β”‚   └── room_tooling/closet.md
    β”œβ”€β”€ hall_events/              # Hall (Memory Type: Chronological Milestones)
    β”‚   β”œβ”€β”€ room_sovereign_fabric_v9_8/closet.md
    β”‚   β”œβ”€β”€ room_brain_artifacts/closet.md
    β”‚   └── room_ledger/closet.md
    └── hall_discoveries/         # Hall (Memory Type: Breakthroughs & Misc)
        └── room_uncategorised/closet.md

Each closet.md is a distilled, high-density knowledge summary β€” what the AI actually needs to know, without reading 300 lines of raw session logs.


4. πŸ› οΈ The Tools We Built

palace-sync.sh / palace-sync.ps1 (v1.0) β€” The Bridge

The core automation tool. It reads the git commit history and maps every commit to the correct Palace Room based on the file path changed.

Two modes:

  • EOD Batch: Reads commits since the last sync marker. Generates a lean palace_update_proposal_YYYY-MM-DD.md.
  • --backfill: Reads the ENTIRE git history from Day 0. Generates a comprehensive Palace population proposal covering all historical commits.

Path-to-Room mapping logic:

File Pattern Target Room
docs/ hall_facts/room_dsom_protocol
tools/ hall_facts/room_tooling
playbooks/, roles/, inventory/ hall_events/room_sovereign_fabric
.agents/brain/ hall_events/room_brain_artifacts
CHANGELOG.md, HISTORY.md hall_events/room_ledger
README.md, SUMMARY.md hall_facts/room_dsom_protocol

hibernation.sh / hibernation.ps1 (upgraded to v2.1)

Added Step 7: Palace Spatial Reflection β€” automatically runs palace-sync before the Sovereign Save, ensuring the Brain never lags behind the code.

reanimate.sh / reanimate.ps1 (upgraded to v2.2/v2.1)

Added Section [14]: Palace Registry β€” the SOD manifest now includes the full Palace Registry, giving the AI instant spatial awareness on every session start without needing to ask.


5. πŸ“… The Build Timeline

Date Action Commit
2026-04-08 Designed the Palace Architecture and hierarchy Session start
2026-04-08 Created palace_registry.md and all initial closets 2437b2d
2026-04-08 Added Ingestion Loop and Git Reflection Mandate to Protocol ce7f4f4
2026-04-08 Created palace-sync.sh and palace-sync.ps1 v1.0 52fcdae
2026-04-08 Upgraded hibernation.sh β†’ v2.1, reanimate.sh β†’ v2.2 52fcdae
2026-04-08 Ran palace-sync.sh --backfill β€” backfilled 6 Palace Rooms from full git history Linux
2026-04-08 Created 4 new closets (tooling, brain_artifacts, ledger, uncategorised) 7dacb6e
2026-04-08 Updated palace_registry.md β€” 8 Rooms, Quick-Reference table 7dacb6e
2026-04-08 Upgraded hibernation.ps1 β†’ v2.1, reanimate.ps1 β†’ v2.1 d7f6eca
2026-04-08 Committed sync marker and backfill proposal 5839cdc
2026-04-08 Tagged v10.0.0-palace on GitHub Tag
2026-04-08 Created playbooks/dsom/sod-palace.yml + eod-palace.yml β€” Ansible ritual automation feat(ansible)

6. βœ… The Result

The Sovereign Markdown Palace v1.0 is a living, sovereign, version-controlled, AI-readable spatial memory system that:

  1. Requires zero proprietary infrastructure β€” just plain Markdown files in Git.
  2. Backtracks years of history in minutes using palace-sync --backfill.
  3. Automatically updates every EOD via hibernation.sh.
  4. Loads instantly at SOD via Section [14] of the reanimation manifest.
  5. Follows the Plain Markdown Mandate β€” human-legible, AI-indexable, Git-versioned.

7. πŸ”— Key Reference Documents

Document Purpose
docs/DIGITAL-SOVEREIGNTY-OPERATIONAL-MODEL-PALACE.md Full Palace Protocol specification
.agents/brain/palace_registry.md Live Room index with Quick-Reference table
tools/palace-sync.sh Primary sync tool (Bash)
tools/palace-sync.ps1 Sync tool (PowerShell parity)
docs/HOWTO-PALACE-ONBOARDING.md First-time setup guide
docs/HOWTO-MIGRATE-TO-PALACE.md Migration guide for existing DSOM users

Build Story recorded by: Cognitive Digital Twin (Google Antigravity) Lead Architect: Harisfazillah Jamel (LinuxMalaysia) Protocol: DSOM v6.1 + Palace v1.0 | Tag: v10.0.0-palace


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