# playbook.md - Procedural Memory (SOPs) _This file is for self-optimization. It stores learned workflows, fixed bugs, and optimized patterns to prevent repeating mistakes and speed up execution._ ## 🛠️ Learned Workflows & Fixes _Add new entries here when a complex task is solved or a bug is squashed._ ### 🟢 [2026-03-18] Gateway Service Conflict - **Issue:** Duplicate gateway-like service errors between `gateway`, `watchdog`, and `update` services. - **Fix:** Remove `watchdog.timer/service`. Use `gateway.service` as the single source of truth. - **Rule:** Do not install external watchdogs. Use the gateway's native `Restart=always` policy. ### 🟢 [2026-03-18] Rootless Docker Connectivity - **Issue:** Gateway cannot reach Docker daemon in rootless mode. - **Fix:** Explicitly set `DOCKER_HOST=unix:///run/user/1001/docker.sock` in the gateway service environment. - **Rule:** Always check `/run/user//docker.sock` for rootless Linux environments. ### 🟢 [2026-03-18] Autonomous Cognitive Hierarchy - **Issue:** Agent asking for approval for safe, local tasks (Approval Fatigue). - **Fix:** Implement `SYSTEM.md` with a 3-layer Law of Precedence and an "Autonomy Zone" in `EMPIRE.md`. - **Rule:** Always run the "Autonomy Filter" before pinging Bruno. If it's internal/non-destructive, execute immediately. ### 🟢 [2026-03-22] Post-Restart Proactive Notification (The "Anti-Ghosting" Rule) - **Issue:** Agent fails to proactively reach out to Bruno after a gateway restart or interruption, leaving him in the dark. - **Fix:** Added "Post-Restart Protocol" to `AGENTS.md`. - **Mandatory Logic:** Every session start/resume must check for a recent "Restart" or "Update" event. If found, the very first action MUST be a proactive confirmation message to Bruno. - **Rule:** Never wait for Bruno to ping first after a restart. The silence ends the moment I am back online. ## 🚀 Optimized Patterns - **Sprint Mode:** For complex tasks, create a `TASK_PLAN.md` (DAG) first. - **Reflexion:** Perform a "Red-Team" critique before finalizing any major code or strategy.