fix(coord-send): drop the ~/.claude fallback in the skill's own script path

A Bash tool call never has CLAUDE_PLUGIN_ROOT set as a real shell variable --
only the skill's own markdown rendering resolves that bare token -- so the
${CLAUDE_PLUGIN_ROOT:-$HOME/.claude} fallback silently won every time the
engine line was actually executed, routing through whatever the operator's
personal ~/.claude/scripts/coord-send.sh happened to be instead of the
plugin's own bundled script. Same defect class board.sh was already fixed
for; coord-send still had it. Reported live by org-ops (2026-07-31): a
--fyi send hit an old deployed copy lacking the flag.

coord-selftest.sh grows three checks (156 -> 159) pinning the SKILL.md
engine line and ruling the fallback out entirely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJMJanRHkUhEf9EYxMpbM5
This commit is contained in:
Kjell Tore Guttormsen 2026-07-31 18:22:44 +02:00
commit 34f263cf28
2 changed files with 32 additions and 5 deletions

View file

@ -37,11 +37,17 @@ Coordination content is also private: it never belongs on a public surface.
## The engine
Resolve the script path portably — this one expression is correct both when the
skill runs bundled inside the plugin and when the scripts are installed as
personal scripts under `~/.claude/scripts/`:
CSEND="${CLAUDE_PLUGIN_ROOT}/scripts/coord-send.sh"
CSEND="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}/scripts/coord-send.sh"
There is no deployed copy anywhere else and no fallback path. A Bash tool call
never has `CLAUDE_PLUGIN_ROOT` set as a real shell variable — only this
skill's own rendering resolves the token — so a `${CLAUDE_PLUGIN_ROOT:-$HOME/.claude}`
fallback silently wins every time the line above is actually executed,
routing through whatever the operator's personal `~/.claude/scripts/` copy
happens to be instead of the plugin's own bundled script. That copy is real
and intentional (the operator's own terminal aliases point at it) but it is
updated on its own schedule, so it can be stale. If this fails to resolve,
the fix is this expression — never a restored fallback.
Interface (body comes from a quoted heredoc so nothing in it is shell-expanded):