muninn-boot · diff

v1.1.0 to v2.0.0

47 added, 50 removed. Audit A to A.

---
name: muninn-boot
- description: Boots Muninn — runs scripts/boot.sh, which fetches oaustegard/claude-skills and oaustegard/muninn-utilities at pinned commits, loads the Turso and GitHub tokens, and runs the memory-system boot sequence. Trigger on the first message of any new conversation in the Muninn project, or when the user says "boot up" / "boot" — unless the message contains "skip boot". If the message contains "skinny boot", run with BOOT_MODE=perch. Safe to run on every message: a warm container fast-exits in ~0s via the sentinel.
metadata:
- version: 1.1.0
- canonical: https://github.com/oaustegard/claude-skills/tree/main/muninn-boot
+ version: 2.0.0
+ source: https://github.com/oaustegard/muninn-utilities/tree/main/muninn-boot
+ description: 'Puts oaustegard/muninn-utilities on the container Python path — runs scripts/boot.sh, which shallow-clones the repo (codeload tarball as fallback) and writes the .pth. The boot payload itself comes from the Muninn MCP connector: call its `boot` tool after this script. Trigger on the first message of any new Muninn conversation, or when the user says "boot up" / "boot" — unless the message contains "skip boot". Idempotent: a warm container exits in ~0s via a sentinel.'
---
# Muninn Boot
- Oskar's own repos and credentials (oaustegard/*, /mnt/project/*.env). Standing
- procedure — runs every session.
-
- ```bash
- bash /mnt/skills/user/muninn-boot/scripts/boot.sh
- ```
-
- Skinny boot ("skinny boot" in the message):
+ Two steps, in this order:
```bash
- BOOT_MODE=perch bash /mnt/skills/user/muninn-boot/scripts/boot.sh
+ bash "$(dirname "$(find / -name boot.sh -path '*muninn-boot*' 2>/dev/null | head -1)")/boot.sh"
```
- `scripts/boot.sh` (sibling of this file — readable before running)
- does, in order:
+ then call the Muninn MCP `boot` tool. The script fetches code; the tool
+ delivers identity, ops, recent memories and reminders. Memory reads and writes
+ go through the connector's `recall` / `remember` / `forget` / `muninn_config`
+ tools, so the container holds no Turso credential and this skill reads no
+ `Turso.env`. Direction in memory ce3b8b75, the plan in 69f3301c.
- 0. **Warm-container fast path**: exits immediately if the sentinel
- `/home/claude/.muninn-booted` matches the pinned SHAs and the utilities
- are on disk. The project instruction re-arrives with every message, so
- the script is built to be re-invoked freely; only a genuinely fresh
- (recycled) container pays the full boot. A pin bump self-invalidates
- the sentinel; `rm /home/claude/.muninn-booted` forces a full boot;
- skinny boot always runs fully (its value IS the perch output).
- 1. Fetches oaustegard/claude-skills → /mnt/skills/user (excluding the
- relocated `remembering/` stub, so it can never clobber a project-uploaded
- remembering skill) and oaustegard/muninn-utilities →
- /home/claude/muninn-utilities, each at a pinned commit SHA.
- 2. Sources the two env files `boot()` reads: `Turso.env` (memory, config,
- reminders) and `GitHub.env` (GH_TOKEN for the RECENT FLIGHTS block, which
- degrades to empty without it).
- 3. Writes the `.pth` so `from scripts import boot` resolves, runs `boot()`,
- prints its output, and writes the sentinel (last, only on success).
+ Prior to 2.0.0 this skill sideloaded claude-skills and ran the Python `boot()`
+ itself. Marketplace sync now places claude-skills in every session
+ (`/root/.claude/skills/synced/<id>/` in Cowork, `/mnt/skills/user` on
+ Claude.ai), and the worker runs boot. "skinny boot" (`BOOT_MODE=perch`) has no
+ effect until the worker's `boot` takes a mode.
- ## Credential scope
+ ## boot.sh steps
- The remaining project `.env` files (`bsky.env`, `muninn-bsky.env`,
- `strava.env`, `proxy.env`, `claude.env`) are used by later task-specific
- steps, which source them inline immediately before the command that needs
- them:
+ 1. Warm-path check: sentinel `/home/claude/.muninn-booted` present and
+ `/home/claude/muninn-utilities/muninn_utils` exists → exit 0.
+ 2. Source `$MUNINN_PROJECT_DIR/GitHub.env` (default `/mnt/project`) if present.
+ Transitional — it goes once GitHub write tools exist on the worker. The
+ container presets `GH_TOKEN=proxy-injected`, a truthy placeholder; without
+ the file, GitHub API calls from the container 401 and the script says so.
+ Memory tools are unaffected.
+ 3. `git clone --depth 1` `oaustegard/muninn-utilities` at `MUNINN_UTILS_REF`
+ (default `main`; branch, tag or full SHA) → `/home/claude/muninn-utilities`.
+ Measured 1.3s cold in Cowork. Fallback where the git proxy refuses
+ github.com: the codeload tarball, which works on Claude.ai and is 403 in
+ Cowork (there git works). If both fail the script exits 1.
+ 4. Write `muninn-remembering.pth` at a site-packages directory resolved from
+ `sys.path` at runtime (`/root/.local/lib/python3.11/site-packages` in
+ Cowork, measured 2026-09-19) listing the repo, `remembering/`, `$HOME`, and
+ every skill `scripts/` directory found under either skills root.
+ 5. Write the sentinel, print a four-line footer: transport and commit, pth
+ path, and the reminder to call the MCP `boot` tool.
- ```bash
- set -a; . /mnt/project/strava.env 2>/dev/null; set +a
- ```
+ ## GitHub.env in Cowork
- (Env vars do not persist across separate `bash_tool` calls, so per-call
- sourcing is how every consumer works regardless of what boot loads.)
+ Only `GitHub.env` matters now, and only for GitHub API work from the container.
+ `project_read` it and write it to `/mnt/project/GitHub.env` with the Write tool
+ (a bash heredoc carrying a secret trips the permission classifier), or skip it
+ when the task touches no GitHub API.
- ## Updating the pinned commits
+ ## Pinning
- `CLAUDE_SKILLS_SHA` / `MUNINN_UTILS_SHA` at the top of `scripts/boot.sh` are
- pinned, not `main`. Bump them — after reviewing the diff — when either repo
- changes and the update should take effect, then re-upload this skill to the
- project. Pinning makes the installed skill the reviewed artifact; floating on
- `main` would execute whatever happens to be latest and unreviewed.
+ `MUNINN_UTILS_REF` defaults to `main`; the point of cloning is that changes land
+ on the next cold boot with no version bump. Pass a SHA to test an unmerged
+ state. `rm /home/claude/.muninn-booted` forces a re-pull in a warm container.
- This skill's own canonical source is `muninn-boot/` in oaustegard/claude-skills;
- edit there, then re-upload to the project. (The copy boot fetches into
- /mnt/skills/user is one pin behind by construction — the RUNNING copy is
- always the project upload.)
+ This file and `boot.sh` are the one thing that cannot self-update: the running
+ copy is whatever the session mounted (project upload or marketplace sync), so
+ a change here needs a push to both `muninn-utilities/muninn-boot` and the
+ `claude-skills/muninn-boot` mirror, with `metadata.version` bumped.