Skip to main content

docs/tools/HOWTO-PALACE-SYNC.md

Standard: DSOM For My AI Protocol v6.1 | Palace v1.0 | Core Engine Tools: palace-sync.ps1, palace-sync.sh Platforms: Windows Native (T1), Linux/WSL2 (T2)

1. Purpose

palace-sync is the Spatial Parser of the Sovereign Markdown Palace. It bridges the gap between raw Git commits and high-density cognitive closets. By analyzing the path of changed files in git, it automatically maps updates to the correct “Room” in the Palace hierarchy. Use it to:
  • Automatically categorize git history since the last sync.
  • Generate a Palace Update Proposal for AI review.
  • Perform a full-history backfill to populate a new Palace from scratch.
  • Maintain the spatial integrity of the wings/ directory.
Location:
  • tools/palace-sync.ps1 (Windows)
  • tools/palace-sync.sh (Linux/WSL2)

2. Prerequisites


3. Usage

3.1 Incremental Sync (EOD Fashion)

Analyzes commits since the date stored in .palace-sync-marker. Used during every End-of-Day ritual.

3.2 Full History Backfill

Scans the entire git history from the first commit. Essential for onboarding an existing repository into the Palace architecture.

4. Reading the Output & Status Codes


5. Implementation Logic (Path Mapping)

The tool uses regex patterns to map files to Rooms:

Standard: DSOM For My AI Protocol v6.1 | Palace v1.0 | Harisfazillah Jamel 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