install.sh: probe for mempalace wake-up protocol, warn if missing
The mempalace skill is only useful if an agent loads its wake-up
protocol at session start. Without ~/.config/opencode/instructions/
mempalace.md, the skill is reachable but never auto-runs — agents
forget to search before answering and to write a diary at wind-down.
The failure mode is silent: no error, no warning, just gradual
memory degradation.
install.sh now probes for the file after its regular installation
steps and prints an actionable warning if missing:
! Wake-up protocol NOT installed at /path/to/.../mempalace.md
Without it, the mempalace skill is loadable but never auto-
runs at session start. Install via the skillset repo:
git clone .../skillset.git ~/skillset
cd ~/skillset && ./deploy-skills.sh --bootstrap
(if skillset is already cloned, just run the --bootstrap step)
If the file is present: prints a matching success line. If the host
doesn't even have ~/.config/opencode/, the check is skipped entirely
(non-opencode machine → no warning to display).
README Prerequisites gains a 4th bullet pointing at skillset's
--bootstrap as the canonical source for the wake-up protocol, so
anyone reading the docs without running install.sh also learns
about the dependency.
The wake-up file is shipped by skillset, not this toolkit. Rationale:
the file bootstraps the 'mempalace' skill (which lives in skillset)
and applies to any harness, not just opencode-plus-toolkit machines.
Cross-referenced via the skillset gitea URL in both the installer
message and the README.
Smoke-tested present + missing scenarios on the reference box —
cleanly detects both, does not hard-fail on missing.
This commit is contained in:
+32
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user