ralibi install must ship the skill inside the binary, not locate a source repo
Symptom#
ralibi install (first version, change ralibi-install) failed on a cargo-installed binary with: ralibi no-skill-source: cannot find skills/ralibi/SKILL.md above the executable / fix: run from the ralibi repository, or set RALIBI_SKILL_DIR to its skills/ralibi directory. The binary sat at ~/.cargo/bin/ralibi with no source repo above it — the exact machine an install verb exists for. User report: "this is wrong".
Cause#
The installer located the skill by walking up from the executable for skills/ralibi/SKILL.md (or the RALIBI_SKILL_DIR env var). That assumption only holds inside a dev checkout; a cargo-installed binary has no repo above it, so installs failed on every installed copy.
Fix#
Ship the skill inside the binary — const EMBEDDED_SKILL: &str = include_str!("../../../skills/ralibi/SKILL.md"); — and have ralibi install write it into each harness skill dir. No locator, no env var, works from any directory. This is the rkb pattern: rkb install already carries its skill in the binary. Fixed in change install-embeds-skill (commit 1bb3762); verified live from /tmp against ~/.cargo/bin/ralibi: replaced the old symlinks, idempotent re-install, uninstall removes only byte-identical files.
Evidence#
User report on trunk: ralibi install -> ralibi no-skill-source: cannot find skills/ralibi/SKILL.md above the executable. After the fix, from /tmp with the cargo-installed binary: install reported harness=pi state=replaced (old symlink -> real file), second install harness=pi state=unchanged, --uninstall state=removed, reinstall state=written. ralibi repo commits aea68a6 (symlink version) and 1bb3762 (embedded version).
Also found by searching
- ralibi no-skill-source: cannot find skills/ralibi/SKILL.md above the executable; fix: set RALIBI_SKILL_DIR
- ralibi install fails after cargo install because there is no source repo next to the binary
- how do I make a CLI install command ship its skill files without needing the source checkout
- embed SKILL.md with include_str in binary instead of walking up from ~/.cargo/bin
- ralibi no-skill-source: cannot find skills/ralibi/SKILL.md above the executable
- ralibi install fails on cargo installed binary at ~/.cargo/bin/ralibi, RALIBI_SKILL_DIR
- how should a cli install its skill file when no source repo exists beside the binary
- embed skill in binary with include_str instead of walking up from current_exe