diff --git a/README.md b/README.md index dad227d..e243484 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ See [`ARCHITECTURE.md`](ARCHITECTURE.md) §6 for the full upstream roadmap. - [MemPalace](https://github.com/MemPalace/mempalace) CLI v3.3.3+ — **see [Installing mempalace itself](#installing-mempalace-itself-prerequisite) below if you haven't already**. - Python 3 (stdlib `sqlite3` only — no extra deps) - [opencode](https://github.com/anomalyco/opencode) with an active session DB at `~/.local/share/opencode/opencode.db` *(only needed for `mempalace-session`)* +- The mempalace **wake-up protocol** at `~/.config/opencode/instructions/mempalace.md` — without it, opencode loads the mempalace skill but never auto-runs it at session start, so most of mempalace's value is forfeited silently. Shipped by the [skillset repo](https://gitea.jordbo.se/joakimp/skillset); deploy via `./deploy-skills.sh --bootstrap` once per machine. `mempalace-toolkit/install.sh` probes for this file and warns if it's missing. ### Installing mempalace itself (prerequisite) diff --git a/install.sh b/install.sh index 02edb43..04e9c28 100755 --- a/install.sh +++ b/install.sh @@ -156,6 +156,36 @@ check_path() { esac } +# ── Verify the mempalace wake-up protocol is reachable ── +# The mempalace skill is only useful if the agent actually loads its +# wake-up protocol at session start. Opencode loads that from +# ~/.config/opencode/instructions/mempalace.md. Without this file, the +# skill is available but never auto-runs, and most of mempalace's value +# (search-before-speak, wind-down diary) is forfeited silently. +# +# The file is owned by the skillset repo, not this one — pointing users +# at skillset if they haven't run it there. Opencode-only: we skip this +# check if ~/.config/opencode doesn't exist (non-opencode host). +check_wake_up_protocol() { + local opencode_config="$HOME/.config/opencode" + [[ -d "$opencode_config" ]] || return 0 # not an opencode box → nothing to warn about + + local instr="$opencode_config/instructions/mempalace.md" + if [[ -e "$instr" ]]; then + ok "Wake-up protocol detected: $instr" + return 0 + fi + + warn "Wake-up protocol NOT installed at $instr" + printf ' Without it, the mempalace skill is loadable but never auto-runs\n' + printf ' at session start. Agents forget to search before answering and to\n' + printf ' write a diary entry at wind-down. Install via the skillset repo:\n' + printf ' git clone ssh://git@gitea.jordbo.se:2222/joakimp/skillset.git ~/skillset\n' + printf ' cd ~/skillset && ./deploy-skills.sh --bootstrap\n' + printf ' (if skillset is already cloned, just run the --bootstrap step)\n' + return 0 +} + do_install() { echo echo "mempalace-toolkit installer" @@ -173,6 +203,8 @@ do_install() { echo check_path echo + check_wake_up_protocol + echo ok "Done." echo echo "Next: ./bin/mempalace-session --dry-run"