DSOM Bootstrapping Guide (Agent-Readable)
ATTENTION AI AGENT: You have been asked by the user to read this file. Follow these explicit instructions to copy and merge the required intelligence, tools, and documentation from the permanent baseline repository into your current environment.
1. Context & Baseline
- Permanent Baseline Path:
d:\Users\LinuxMalaysia\Projects\deep-state-of-mind-for-my-ai - Your Mission: Replicate the structural intelligence of the baseline project into your current workspace.
2. Phase 0: Skill Initialization (Crucial First Step)
Before copying the entire workspace, you must first endow yourself with the bootstrap skill so you understand the DSOM protocol permanently.
1. Create the directory .agents/skills/dsom-bootstrap/ in your current workspace if it does not exist.
2. Copy the file [BASELINE_PATH]\.agents\skills\dsom-bootstrap\SKILL.md into your local .agents/skills/dsom-bootstrap/ directory.
3. Workspace Assessment
After acquiring the skill, analyze the current workspace to determine if it is a NEW project (mostly empty, no existing .agents or tools) or an EXISTING project (already has code, tools/, or docs/).
4. Execution Path: NEW Project
If this is a new project, execute a direct replication:
- Copy Intelligence (
.agents/):- Recursively copy
[BASELINE_PATH]\.agentsto the current workspace root. - Sanitization: Clear out any old session data by emptying
.agents/brain/checkpoint_summary.txt,.agents/brain/task.md, and.agents/brain/walkthrough.md. Leaveindex.mdintact.
- Recursively copy
- Copy Toolchain (
tools/):- Recursively copy
[BASELINE_PATH]\toolsto the current workspace.
- Recursively copy
- Copy Documentation (
docs/):- Recursively copy
[BASELINE_PATH]\docs\toolsto the current workspace. - Recursively copy
[BASELINE_PATH]\docs\governanceto the current workspace.
- Recursively copy
- Finalise: Initialise a new
sod_manifest_YYYY-MM-DD.txtusing thereanimatescript in the newly copiedtools/directory.
5. Execution Path: EXISTING Project
If this is an existing project, you must adopt and merge gracefully to avoid destructive overwrites:
- Merge Intelligence (
.agents/):- If
.agents/does not exist, copy it fully. - If it exists, merge the contents. Copy missing
skills/and ensure the Constitution (AGENTS.md) is adopted (appended or intelligently merged with existing rules).
- If
- Merge Toolchain (
tools/):- Copy all DSOM ritual scripts (
sod-palace.*,eod-palace.*,reanimate.*,palace-sync.*,diagnostic.*). - If there are existing scripts in
tools/with the same name, compare their contents and merge updates carefully, preserving any project-specific logic.
- Copy all DSOM ritual scripts (
- Merge Documentation (
docs/tools/):- Copy missing blueprint markdown files from the baseline to ensure the AI's self-healing capabilities work for the DSOM scripts.
- Adopt/Merge Governance (
docs/governance/):- Check for the existence of
docs/governance/. - If it does not exist, copy it from the baseline.
- If it does exist, read the existing markdown files. Intelligently merge the DSOM governance standards (like OKF enforcement, logging protocols) into the existing project documentation without deleting the project's native governance files.
- Check for the existence of
6. Post-Execution Checklist
After executing the relevant path (New or Existing):
- Run .\tools\diagnostic.ps1 (or .sh) to verify the workspace health.
- Inform the user that the DSOM framework has been successfully bootstrapped.
7. Token Performance Verification (Mandatory)
After bootstrapping, every new DSOM project must verify its token health baseline. This prevents context window collapse as the project grows.
Step 7a — Skill token audit:
uv run --with tiktoken .agents/skills/dsom-token-calculator/scripts/calculate-tokens.py .agents/skills/
Expected: all files [OK], zero [BLOCKED].
Step 7b — Verify all skills have topics: tags:
Get-ChildItem -Recurse -Path ".agents/skills" -Filter "SKILL.md" | ForEach-Object {
$content = Get-Content $_.FullName -Raw
$hasTopics = $content -match "(?m)^topics:"
[PSCustomObject]@{ Skill = $_.Directory.Name; Topics = if($hasTopics){"YES"}else{"MISSING"} }
} | Format-Table -AutoSize
All must return YES. If any return MISSING, the OKF Import Mandate (Rule 6) has been violated.
Step 7c — Initialise active context manifest:
Edit .agents/brain/active_context_manifest.md to declare your project's active session files and explicitly exclude any archival brain files exceeding 4,000 tokens.
Reference: docs/governance/DSOM-TOKEN-PERFORMANCE-PLAYBOOK.md
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-19 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0
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