📜 Audit Pre-Flight (audit-pre-flight.sh)
"Trust, but Verify." - The physical reality check before the AI wakes up.
1. 🏛️ Purpose
Version: v4.1 (Root Aware) Description: Enforces synchronization between the physical environment, Git state, and the AI's "External Brain" before starting a development session.
2. 🛡️ Safety Mechanisms
| Mechanism | Status | Description |
|---|---|---|
| Zero-Global Pattern | ✅ Enforced | Uses local variables for pathing. |
| Exit-on-Error | ✅ Active | set -e flag prevents zombie execution. |
| Root-Aware | ✅ Active | Auto-detects git root via git rev-parse. |
3. ⚙️ Usage
./tools/audit-pre-flight.sh
4. 🧠 Logic Flow (The Algorithm)
- Brain Check: Verifies existence of
task.mdandwalkthrough.mdin.agents/brain/. - Git Drift Check: Compares local
HEADvs remote@{u}. Warns if out of sync. - Environment Discovery: Detects project type (PHP/Node/Python) based on manifest files (
composer.json, etc.). - Governance Check: Ensures
AI-MASTER-PROTOCOL.mdandREADME.mdare present.
5. 📝 Extracted Comments
"Enforces synchronization between the physical environment, Git state, and the AI's 'External Brain' before starting a development session."
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