From 38588006d5d1d94b8118a9648c51004d0ed67f42 Mon Sep 17 00:00:00 2001 From: fujibee Date: Fri, 7 Aug 2026 14:46:38 -0700 Subject: [PATCH 1/2] feat(doctor): wire into the 9 per-type templates, the Windows dispatcher, and the plugin-path SKILL.md Two install paths deploy separate copies of the command reference, and both needed wiring: - ./install.sh deploys scripts/drivers/types//template.md per type (9 types; agmsg-app has no template -- it's spawnable=no, the desktop app's own identity, not a spawnable CLI type). - The Claude Code plugin-marketplace install path does not run install.sh at all -- it drops this repo's root SKILL.md straight into ~/.claude/plugins/cache/ as the deployed skill content. Missing this would have meant plugin-installed users never saw doctor mentioned anywhere. Found and reported mid-implementation, not assumed from the 9-template + dispatcher enumeration alone. Each of the 9 templates gets a bare `doctor` bullet in the post-join command summary and an argument-dispatch block, matching that template's own existing conventions (invocation prefix, "ask X" vs slash-command phrasing) rather than one copy-pasted block -- a template that doesn't match its own type's conventions can still pass CI. Every dispatch block documents bare `doctor` (no flags) as the normal form and --project/--type/--team/--redacted as optional narrowing, not the headline usage, since the default scope is already the whole installation. scripts/windows/dispatch.sh gets a `doctor` case that passes its argv straight through with no identity resolution -- doctor needs no TEAM/AGENT, and this dispatcher's own --project/--type/--team globals serve a different purpose (identity-resolution context for other commands) from doctor's same-named scope flags. Root SKILL.md gets one addition to its "Shell (any agent)" style command block, written in that file's own existing prose-comment style rather than the templates' numbered-dispatch style, per its own established shape. Confirmed via grep that no target already mentioned "doctor" before this change (no partial/stale reference risk), and verified the deployed artifact end-to-end after a real install.sh run into an isolated HOME: the Windows dispatcher's `doctor` case reaches the real doctor.sh and reports a clean, empty installation correctly. --- SKILL.md | 8 ++++++++ scripts/drivers/types/antigravity/template.md | 10 ++++++++++ scripts/drivers/types/claude-code/template.md | 10 ++++++++++ scripts/drivers/types/codex/template.md | 10 ++++++++++ scripts/drivers/types/copilot/template.md | 10 ++++++++++ scripts/drivers/types/cursor/template.md | 10 ++++++++++ scripts/drivers/types/gemini/template.md | 10 ++++++++++ scripts/drivers/types/grok-build/template.md | 10 ++++++++++ scripts/drivers/types/hermes/template.md | 10 ++++++++++ scripts/drivers/types/opencode/template.md | 10 ++++++++++ scripts/windows/dispatch.sh | 11 +++++++++++ tests/test_dispatch.bats | 16 ++++++++++++++++ 12 files changed, 125 insertions(+) diff --git a/SKILL.md b/SKILL.md index 404c7a4f..7f66d6c3 100644 --- a/SKILL.md +++ b/SKILL.md @@ -155,6 +155,14 @@ Do NOT manually edit config files. Always use join.sh. If the name was recently # --force tear down from the recorded placement, no message # --timeout N seconds to wait for graceful teardown (default 30) ~/.agents/skills/agmsg/scripts/despawn.sh [--force] [--timeout N] + +# Read-only health check: registrations, actas lock status, and delivery mode +# per (project, type). Default (no flags) covers the WHOLE installation — +# every team, project, and type — not just the current one; narrow with +# --project/--type/--team (combinable) only when asked to. Exit codes: 0 +# clean, 1 one or more warnings, 2 usage/resolution error. --redacted masks +# paths and names, safe to paste into a report. +~/.agents/skills/agmsg/scripts/doctor.sh [--project ] [--type ] [--team ] [--redacted] ``` ## Permission prompts (Claude Code) diff --git a/scripts/drivers/types/antigravity/template.md b/scripts/drivers/types/antigravity/template.md index 5d739460..2b1413e0 100644 --- a/scripts/drivers/types/antigravity/template.md +++ b/scripts/drivers/types/antigravity/template.md @@ -42,6 +42,7 @@ Four possible outputs: > - `$__SKILL_NAME__ send ` — send a message > - `$__SKILL_NAME__ team` — list team members > - `$__SKILL_NAME__ history` — message history + > - `$__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -133,6 +134,15 @@ If argument is "hook off" (legacy alias): 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/delivery.sh set off antigravity "$(pwd)"` 2. Tell the user: "Delivery mode set to 'off'." +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" antigravity` 2. Tell the user the result. diff --git a/scripts/drivers/types/claude-code/template.md b/scripts/drivers/types/claude-code/template.md index 748c8262..7e30f42c 100644 --- a/scripts/drivers/types/claude-code/template.md +++ b/scripts/drivers/types/claude-code/template.md @@ -46,6 +46,7 @@ Four possible outputs: > - `/__SKILL_NAME__ drop ` — remove a role from this project > - `/__SKILL_NAME__ spawn ` — launch a new agent in a tmux pane / terminal and have it actas > - `/__SKILL_NAME__ despawn ` — tear down a member you spawned (graceful, or `--force`) + > - `/__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -232,6 +233,15 @@ If argument is "version": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/version.sh` 2. Show the output — the installed version (git-describe provenance recorded at install time). +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" claude-code` 2. Tell the user the result. diff --git a/scripts/drivers/types/codex/template.md b/scripts/drivers/types/codex/template.md index e3527199..56d6842c 100644 --- a/scripts/drivers/types/codex/template.md +++ b/scripts/drivers/types/codex/template.md @@ -48,6 +48,7 @@ Four possible outputs: > - `$__SKILL_NAME__ send ` — send a message > - `$__SKILL_NAME__ team` — list team members > - `$__SKILL_NAME__ history` — message history + > - `$__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -167,6 +168,15 @@ If argument is "version": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/version.sh` 2. Show the output — the installed version (git-describe provenance recorded at install time). +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" codex` 2. Tell the user the result. diff --git a/scripts/drivers/types/copilot/template.md b/scripts/drivers/types/copilot/template.md index 9df689df..2f09ecda 100644 --- a/scripts/drivers/types/copilot/template.md +++ b/scripts/drivers/types/copilot/template.md @@ -42,6 +42,7 @@ Four possible outputs: > - `/__SKILL_NAME__ send ` — send a message > - `/__SKILL_NAME__ team` — list team members > - `/__SKILL_NAME__ history` — message history + > - `/__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -133,6 +134,15 @@ If argument is "hook off" (legacy alias): 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/delivery.sh set off copilot "$(pwd)"` 2. Tell the user: "Delivery mode set to 'off'." +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" copilot` 2. Tell the user the result. diff --git a/scripts/drivers/types/cursor/template.md b/scripts/drivers/types/cursor/template.md index 085764fa..66768f04 100644 --- a/scripts/drivers/types/cursor/template.md +++ b/scripts/drivers/types/cursor/template.md @@ -42,6 +42,7 @@ Four possible outputs: > - `$__SKILL_NAME__ send ` — send a message > - `$__SKILL_NAME__ team` — list team members > - `$__SKILL_NAME__ history` — message history + > - `$__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -136,6 +137,15 @@ If argument is "version": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/version.sh` 2. Show the output — the installed version (git-describe provenance recorded at install time). +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" cursor` 2. Tell the user the result. diff --git a/scripts/drivers/types/gemini/template.md b/scripts/drivers/types/gemini/template.md index a007beba..202223a6 100644 --- a/scripts/drivers/types/gemini/template.md +++ b/scripts/drivers/types/gemini/template.md @@ -42,6 +42,7 @@ Four possible outputs: > - `$__SKILL_NAME__ send ` — send a message > - `$__SKILL_NAME__ team` — list team members > - `$__SKILL_NAME__ history` — message history + > - `$__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -133,6 +134,15 @@ If argument is "hook off" (legacy alias): 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/delivery.sh set off gemini "$(pwd)"` 2. Tell the user: "Delivery mode set to 'off'." +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" gemini` 2. Tell the user the result. diff --git a/scripts/drivers/types/grok-build/template.md b/scripts/drivers/types/grok-build/template.md index 508a8f53..ec915157 100644 --- a/scripts/drivers/types/grok-build/template.md +++ b/scripts/drivers/types/grok-build/template.md @@ -42,6 +42,7 @@ Four possible outputs: > - `/__SKILL_NAME__ send ` — send a message > - `/__SKILL_NAME__ team` — list team members > - `/__SKILL_NAME__ history` — message history + > - `/__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -164,6 +165,15 @@ If argument is "hook off" (legacy alias): 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/delivery.sh set off grok-build "$(pwd)"` 2. Tell the user: "Delivery mode set to 'off'." +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" grok-build` 2. Tell the user the result. diff --git a/scripts/drivers/types/hermes/template.md b/scripts/drivers/types/hermes/template.md index 2f33f4de..4b125119 100644 --- a/scripts/drivers/types/hermes/template.md +++ b/scripts/drivers/types/hermes/template.md @@ -42,6 +42,7 @@ Four possible outputs: > - ask `send ` — send a message > - ask `team` — list team members > - ask `history` — message history + > - ask `doctor` — check registration/lock/delivery health across the installation 5. Hermes has no agmsg automatic delivery hook. Set manual delivery explicitly: `~/.agents/skills/__SKILL_NAME__/scripts/delivery.sh set off hermes "$(pwd)"` @@ -121,6 +122,15 @@ If argument is "hook off" (legacy alias): 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/delivery.sh set off hermes "$(pwd)"` 2. Tell the user: "Delivery mode set to 'off'." +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" hermes` 2. Tell the user the result. diff --git a/scripts/drivers/types/opencode/template.md b/scripts/drivers/types/opencode/template.md index bcaa13c8..a03a208c 100644 --- a/scripts/drivers/types/opencode/template.md +++ b/scripts/drivers/types/opencode/template.md @@ -42,6 +42,7 @@ Four possible outputs: > - `$__SKILL_NAME__ send ` — send a message > - `$__SKILL_NAME__ team` — list team members > - `$__SKILL_NAME__ history` — message history + > - `$__SKILL_NAME__ doctor` — check registration/lock/delivery health across the installation 5. **REQUIRED — Do NOT skip this step.** Ask the user to pick a delivery mode using exactly this prompt: @@ -161,6 +162,15 @@ If argument is "version": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/version.sh` 2. Show the output — the installed version (git-describe provenance recorded at install time). +If argument is "doctor" (no further args): +1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh` +2. Show the output to the user. Exit code: 0 = clean, 1 = one or more warnings (the output still shows everything -- show it in full), 2 = usage/resolution error. + +If argument starts with "doctor" followed by flags (e.g. "doctor --project /path/to/project"): +1. Pass the flags straight through: `~/.agents/skills/__SKILL_NAME__/scripts/doctor.sh ` +2. Supported flags, all optional and combinable: `--project `, `--type `, `--team `, `--redacted` (masks paths and names, safe to paste into a report). Only use these when the user explicitly asks to narrow the scope -- bare `doctor` (no flags) already covers the whole installation and is the normal way to run it. +3. Show the output to the user. + If argument is "reset": 1. Run: `~/.agents/skills/__SKILL_NAME__/scripts/reset.sh "$(pwd)" opencode` 2. Tell the user the result. diff --git a/scripts/windows/dispatch.sh b/scripts/windows/dispatch.sh index c61665c8..acd2fdac 100755 --- a/scripts/windows/dispatch.sh +++ b/scripts/windows/dispatch.sh @@ -32,6 +32,7 @@ commands: reset [agent] actas drop + doctor [--project ] [--type ] [--team ] [--redacted] EOF } @@ -280,6 +281,16 @@ case "$COMMAND" in echo " \$env:AGMSG_TEAM = '$team_name'; \$env:AGMSG_AGENT = '$name'" ;; + doctor) + # No identity resolution -- doctor.sh needs no TEAM/AGENT, and this + # dispatcher's own --project/--type/--team globals are for resolving + # identity context for OTHER commands, a different purpose from doctor's + # own same-named flags (which scope its report, not an identity). Passed + # straight through: whatever follows "doctor" on the command line is + # doctor.sh's own argv verbatim, exactly as documented in the templates. + run_script doctor.sh "$@" + ;; + *) echo "Unknown agmsg command: $COMMAND" >&2 usage diff --git a/tests/test_dispatch.bats b/tests/test_dispatch.bats index 3fdcd224..f0776eff 100644 --- a/tests/test_dispatch.bats +++ b/tests/test_dispatch.bats @@ -63,3 +63,19 @@ teardown() { [ "$status" -eq 0 ] [[ "$output" =~ "Delivery mode set to 'turn'" ]] } + +@test "dispatch: doctor needs no identity and covers the whole installation by default" { + # No --team/--agent (unlike every other command above) -- doctor.sh needs + # no identity, only its own flags, and the default scope is everything. + run bash "$SCRIPTS/windows/dispatch.sh" -- doctor + [ "$status" -eq 0 ] + [[ "$output" =~ "$PROJECT_ALICE" ]] + [[ "$output" =~ "$PROJECT_BOB" ]] +} + +@test "dispatch: doctor flags pass straight through, not through this dispatcher's own --project/--type globals" { + run bash "$SCRIPTS/windows/dispatch.sh" -- doctor --project "$PROJECT_ALICE" + [ "$status" -eq 0 ] + [[ "$output" =~ "$PROJECT_ALICE" ]] + [[ "$output" != *"$PROJECT_BOB"* ]] +} From 445e41275e565b177309482be42333c232b3da9e Mon Sep 17 00:00:00 2001 From: fujibee Date: Fri, 7 Aug 2026 14:54:00 -0700 Subject: [PATCH 2/2] fix(doctor): route "doctor" straight to doctor.sh, ahead of the identity/join gate co2's review of #660 caught a real placement bug: every template's (and root SKILL.md's) doctor dispatch lived inside the argument-handling section that comes AFTER the mandatory Identity gate -- whoami.sh first, and if not_joined=true, a full interactive join flow ("You MUST use join.sh") before ever reaching Execute. Two consequences: - On a fresh/empty installation, asking for "doctor" started first-time team setup instead of running the diagnostic. - On an installation where registration resolution itself is broken (whoami fails), doctor was permanently unreachable -- exactly the situation it exists to diagnose. Fixed by adding an explicit branch before the Identity section (before Step 1 in root SKILL.md) in all 10 documents: if the argument is "doctor", skip whoami.sh and the join flow entirely, go straight to the existing doctor dispatch under Execute, and stop. The Execute-section block itself is untouched -- this only changes precedence, not what doctor.sh gets called with. scripts/windows/dispatch.sh was not affected: its `doctor)` case already never calls resolve_identity (confirmed by re-reading the dispatch table, not just by the existing passing tests). Verified mechanically for all 10 (9 templates + SKILL.md): the new precedence note's line number is before the Identity/Step-1 heading's line number in every file, not just present somewhere in the document. --- SKILL.md | 2 ++ scripts/drivers/types/antigravity/template.md | 2 ++ scripts/drivers/types/claude-code/template.md | 2 ++ scripts/drivers/types/codex/template.md | 2 ++ scripts/drivers/types/copilot/template.md | 2 ++ scripts/drivers/types/cursor/template.md | 2 ++ scripts/drivers/types/gemini/template.md | 2 ++ scripts/drivers/types/grok-build/template.md | 2 ++ scripts/drivers/types/hermes/template.md | 2 ++ scripts/drivers/types/opencode/template.md | 2 ++ 10 files changed, 20 insertions(+) diff --git a/SKILL.md b/SKILL.md index 7f66d6c3..e753803d 100644 --- a/SKILL.md +++ b/SKILL.md @@ -32,6 +32,8 @@ fi After this runs once, `~/.agents/skills/agmsg/` is populated and you can skip Step 0 on future invocations. +**If the argument/intent is `doctor` (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow (Steps 1-2a). Go straight to the `doctor.sh` line under Step 2b and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through Steps 1-2a. + ### Step 1: Check identity ```bash diff --git a/scripts/drivers/types/antigravity/template.md b/scripts/drivers/types/antigravity/template.md index 2b1413e0..f491c405 100644 --- a/scripts/drivers/types/antigravity/template.md +++ b/scripts/drivers/types/antigravity/template.md @@ -7,6 +7,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `$__SKILL_NAME__` call in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/claude-code/template.md b/scripts/drivers/types/claude-code/template.md index 7e30f42c..a2a5ffc5 100644 --- a/scripts/drivers/types/claude-code/template.md +++ b/scripts/drivers/types/claude-code/template.md @@ -6,6 +6,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `/__SKILL_NAME__` call in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/codex/template.md b/scripts/drivers/types/codex/template.md index 56d6842c..74c4c880 100644 --- a/scripts/drivers/types/codex/template.md +++ b/scripts/drivers/types/codex/template.md @@ -7,6 +7,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Always single-quote the `bash -lc` payload; NEVER use a double-quoted wrapper with escaped inner quotes (e.g. `bash -lc "... \"$PWD\" ..."`) — PowerShell parses `\"` as a literal backslash that terminates the string, silently corrupting the command and dropping everything after it. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `$__SKILL_NAME__` call in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/copilot/template.md b/scripts/drivers/types/copilot/template.md index 2f09ecda..f8bb088b 100644 --- a/scripts/drivers/types/copilot/template.md +++ b/scripts/drivers/types/copilot/template.md @@ -7,6 +7,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `/__SKILL_NAME__` call in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/cursor/template.md b/scripts/drivers/types/cursor/template.md index 66768f04..5b1a4941 100644 --- a/scripts/drivers/types/cursor/template.md +++ b/scripts/drivers/types/cursor/template.md @@ -7,6 +7,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `$__SKILL_NAME__` call in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/gemini/template.md b/scripts/drivers/types/gemini/template.md index 202223a6..7c60d0b1 100644 --- a/scripts/drivers/types/gemini/template.md +++ b/scripts/drivers/types/gemini/template.md @@ -7,6 +7,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `$__SKILL_NAME__` call in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/grok-build/template.md b/scripts/drivers/types/grok-build/template.md index ec915157..0eef1cb2 100644 --- a/scripts/drivers/types/grok-build/template.md +++ b/scripts/drivers/types/grok-build/template.md @@ -7,6 +7,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `/__SKILL_NAME__` call in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/hermes/template.md b/scripts/drivers/types/hermes/template.md index 4b125119..ba88fd4a 100644 --- a/scripts/drivers/types/hermes/template.md +++ b/scripts/drivers/types/hermes/template.md @@ -7,6 +7,8 @@ Hermes Agent skill for agmsg cross-agent messaging. **IMPORTANT: Always use the **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `/__SKILL_NAME__` use in this session, skip to **Execute** below. diff --git a/scripts/drivers/types/opencode/template.md b/scripts/drivers/types/opencode/template.md index a03a208c..72afe37e 100644 --- a/scripts/drivers/types/opencode/template.md +++ b/scripts/drivers/types/opencode/template.md @@ -7,6 +7,8 @@ Agent messaging command. **IMPORTANT: Always use the provided scripts. NEVER dir **Shell requirement:** All agmsg scripts are Bash scripts. Always execute them via `bash`, never via PowerShell or cmd directly. If your default shell is not Bash (e.g. PowerShell on Windows), wrap every command with `bash -lc '...'`. Example: `bash -lc '~/.agents/skills/__SKILL_NAME__/scripts/send.sh myteam alice bob "hello"'`. Do NOT construct DB paths manually — the scripts handle path resolution internally. If you need to redirect storage, use `AGMSG_STORAGE_PATH` (the supported override). +**If the argument is "doctor" (with or without further flags): do NOT run whoami.sh, do NOT enter the join flow below. Go straight to the "doctor" entry under Execute and stop there.** `doctor` reports the health of the whole installation and exists specifically for when registration or delivery is broken — it must work even before you have an identity, so it never goes through the section below. + ## Identity If you already know your AGENT and TEAMS from a previous `$__SKILL_NAME__` call in this session, skip to **Execute** below.