DSOM State Sync Skill
Purpose
This skill allows AI agents to manually execute the Semantic Compaction process outside of the standard GitHub Actions PR workflow. It analyzes a provided diff file and uses an LLM to condense and append significant architectural changes into the project's compressed memory tier (.agents/brain/current_state.dsom).
Prerequisites
- Python &
uv: Theuvpackage manager must be available on the system. - Gemini API Key (Optional): The environment variable
GEMINI_API_KEYorGOOGLE_API_KEYcan be set in the executing terminal to leverage the Gemini AI API for compaction. If neither credential is set, the system automatically falls back to a zero-API local Semantic Compaction engine. - Diff File: A valid Git diff file or text file containing changes must be prepared.
Execution Flow
When tasked with running the state sync locally, execute the following terminal command (ensure you replace <diff_file> with the actual path to your diff):
uv run --with requests==2.34.2 --with pyyaml==6.0.3 .github/scripts/action_update_dsom.py <diff_file> .agents/brain/current_state.dsom
Execution Rules
- Never write the API key to disk: If the API key is not present in the environment, instruct the human operator to export it manually in their terminal session before proceeding.
- Review before execution: Generate the diff file locally first (e.g.,
git diff > local.diff) and verify its contents to prevent bloating the compaction prompt with irrelevant artifact changes. - Verify Timestamp: After successful execution, check
.agents/brain/current_state.dsomto ensure thetimestampin the OKF frontmatter was correctly updated.
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-27 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0