Skip to main content

docs/EOD-RITUAL.md

“Rest is not the end unless the memory is lost. To hibernate is to prepare for rebirth.” Standard: DSOM For My AI Protocol v6.1 + Palace v1.0 | GitOps · AIOps · Ansible

🏛️ 1. The Philosophy of Hibernation

The End-of-Day (EOD) is the Sovereign Save, the critical point where the day’s work is crystallised, committed to Git, and preserved so that the next session can begin without loss. The EOD is where the GitOps loop closes:
The EOD Ritual assumes you are tired. It is designed for a fatigued human with high cognitive load. Every step is explicit, safe, and guided. Nothing is assumed. Remember: If it is not in Git, it does not exist.

🔄 2. The EOD Workflow, Step by Step

🧠 Step 1, Context Consolidation (AI → Human Review)

Before running any tools, ask the AI to help prepare the brain artifacts: Ask the AI:
“We are ending the session. Update .agents/brain/task.md, mark all completed items [x], set tomorrow’s SOD targets as [ ]. Then update .agents/brain/walkthrough.md with today’s Mental Anchor. What did we accomplish and where exactly do we resume tomorrow?”
AI will produce:
  • Updated task.md, reflects today’s completions and tomorrow’s first actions
  • Updated walkthrough.md, new Session Anchor entry with:
    • Accomplished: What was done today (the What)
    • Why: The architectural reasoning (the Why)
    • Mental Anchor: One sentence, exact state and where to resume
Verify before saving:
  • Does the Mental Anchor describe the exact stopping point?
  • Are tomorrow’s SOD tasks clear?
  • Is nothing left vague?

� Step 1b, Hibernation Notes Export (Human Memory Backup)

Run this prompt in your AI session before closing the chat. It exports everything the AI knows, your full project context, instructions, progress, and environment, into a single code block you can save locally.
[!IMPORTANT] Copy the entire prompt below and paste it into your AI chat as-is. Do not paraphrase it.
Copy this prompt verbatim:
After you receive the output:
  1. Copy the entire code block
  2. Save it as .agents/brain/hibernation-notes-YYYY-MM-DD.txt
  3. Or paste into your physical/digital notebook as an offline backup
Why this matters: This export is your insurance policy. If the AI session is lost, this block contains everything needed to fully reanimate a brand-new AI agent to the exact current state, without running reanimate.sh.

�💤 Step 2, Hibernation Safety Check (T1 or T2)

Run the hibernation script, it checks for dirty state before you sleep:
Note (v2.1): hibernation.sh and hibernation.ps1 now automatically run palace-sync.sh/.ps1 as Step 7: Palace Spatial Reflection, generating the update proposal without a separate command.
What it checks:
  1. task.md has been updated today
  2. walkthrough.md has a new Session Anchor
  3. ✅ No uncommitted changes in docs/ or src/
  4. ✅ No dangling Ansible playbook outputs uncommitted
  5. ⚠️ Displays tomorrow’s SOD targets clearly
  6. Palace Spatial Reflection, palace-sync.sh runs and generates palace_update_proposal_YYYY-MM-DD.md
If any check fails, fix it before sleeping.
If you are on T2, use this instead of Steps 2–5. It runs all checks, palace sync, selective staging, commit, and push in a single command.
What it runs automatically: Skip palace-sync if already run by hibernation.sh:
After the playbook, Manual steps (always required):
  1. Review palace_update_proposal_YYYY-MM-DD.md with your AI
  2. Update relevant closets in .agents/brain/wings/
  3. Commit closet updates: git add .agents/brain/ && git commit -m "chore(palace): update closets"
T1 (Windows): Steps 2–5 remain manual. hibernation.ps1 v2.1 handles palace-sync automatically.

🔐 Step 3, Privacy Scan (Before Sharing Any Manifest)

If you generated a sod_manifest_YYYY-MM-DD.txt today, scan it before sharing:
Scans for: IPv4 addresses, emails, API keys, AWS keys, GitHub tokens, PEM private keys, Linux home paths.

🔄 Step 4, Sovereign Save: EOD Git Ritual (T1: Windows PowerShell)

Commit all changes with a structured, semantic commit message:
The git-ritual EOD process:
  1. Shows current Git status and last 5 commits
  2. You select commit type: feat, fix, docs, chore, refactor, ci
  3. You provide scope, description, and optional Phase/version tag
  4. Builds commit message: type(scope): description [Phase/vX.X]
  5. Confirms before committing and pushing
Direct push (if you know the message):
Why semantic commits? Every future AI session reads git log. Meaningful messages = better context recovery next SOD.

🔃 Step 5, T2 Sync (WSL2 Pull After T1 Push)

After pushing from T1, ensure T2 is synchronised:
Or use the git-ritual SOD pull on T2:
Why: T1 (Windows) and T2 (WSL2) must always be at the same commit. Never let them drift.

📌 Step 6, Set Tomorrow’s Mental Anchor (Human Action)

Before closing your terminal, write this in your physical notebook or digital notes:
This is your offline backup in case your brain has its own context decay overnight.

✅ 3. EOD Completion Checklist

DO NOT SLEEP until all items are checked.

🛑 4. EOD Stop Conditions (INCOMPLETE States)

The EOD is INCOMPLETE until all STOP CONDITIONS are resolved.

🧠 5. The Mental Anchor, Standard Format

Every walkthrough.md Session Anchor must follow this format:
Example:


Standard: DSOM For My AI Protocol v6.1 + Palace v1.0 | Harisfazillah Jamel | LinuxMalaysia This is the baseline EOD template for all projects built on this skeleton. Last Updated: 2026-04-08 | Version: v6.1 + Palace v1.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