#+TITLE: Flight Plan: Sovereign Brain Recovery
#+AUTHOR: Gemini CLI
#+DATE: 2026-04-01
#+FILETAGS: :psf:recovery:build:
#+STARTUP: content

* Overview
Rigorous recovery of the =opencortex= kernel after a series of failed build loops.

* Phase A: Purge & Reset (The Scientist)
** TODO 1. Hard Git Reset
- Action: =git reset --hard= and =git clean -fd= in =~/memex/projects/opencortex=.
- Verification: =git status= must be clean.

** TODO 2. Nuke Lisp & Quicklisp Caches
- Action: Delete =~/.cache/common-lisp/= and =~/.local/share/opencortex/quicklisp/cache/=.
- Verification: Directories must not exist.

** TODO 3. Verify Secure Environment
- Action: Check =~/.local/share/opencortex/.env=.
- Verification: Confirm =MEMEX_DIR= and =OPENROUTER_API_KEY= are correct.

* Phase B: Restoration (The Coder)
** TODO 4. Restore Literate Source
- Action: Ensure =docs/README.org= contains the modular kernel logic.
- Verification: Tangle the file and confirm =src/core.lisp= exists.

* Phase C: Verification (The Tester)
** TODO 5. Foreground Boot Test
- Action: Run daemon in foreground.
- Verification: Confirm "Daemon Listening" and skill jailing.

** TODO 6. Live Handshake
- Action: =emacs --batch= stimulus test.
- Verification: Confirm LLM response in log.
