…her, 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/<type>/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.
Wires
doctor(default = whole install,--project/--type/--team/--redacted) into the command reference every install path deploys.doctoritself already shipped (#654); this PR is purely wiring, no behavior changes todoctor.sh.Addresses part of #267.
Why 11 files, not 9 or 10
There are two separate install paths, each deploying its own copy of the command reference, and both needed wiring:
./install.shdeploysscripts/drivers/types/<type>/template.md, one per agent type — 9 files (agmsg-apphas no template; it'sspawnable=no, the desktop app's own identity, not a spawnable CLI type, so it's correctly excluded, not a 10th type I missed).install.shat all — it drops this repo's rootSKILL.mdstraight into~/.claude/plugins/cache/as the deployed skill content (seeSKILL.md's own Step 0 comment). This is a 10th file, easy to miss by only looking atinstall.sh's deployment tree.Plus
scripts/windows/dispatch.sh(the one dispatch/router file in the repo, confirmed viatests/test_dispatch.batsas its regression coverage) — 11th file.Checklist — please verify all 11 are present and non-trivially changed:
scripts/drivers/types/antigravity/template.mdscripts/drivers/types/claude-code/template.mdscripts/drivers/types/codex/template.mdscripts/drivers/types/copilot/template.mdscripts/drivers/types/cursor/template.mdscripts/drivers/types/gemini/template.mdscripts/drivers/types/grok-build/template.mdscripts/drivers/types/hermes/template.mdscripts/drivers/types/opencode/template.mdscripts/windows/dispatch.shSKILL.md(repo root — the plugin-path deployed copy, not a per-type template)Mechanical check used while writing this:
grep -c doctor <file>on all 11 before/after — every target went from 0 mentions to a non-zero count; no target already mentioneddoctorbeforehand (no partial/stale-reference risk).What each file gets
The 9 templates: a bare
doctorbullet in the post-join command summary, plus an argument-dispatch block. Each matches that template's own existing conventions (invocation prefix —/__SKILL_NAME__vs$__SKILL_NAME__; hermes's natural-language "ask X" phrasing instead of a slash form) rather than one block copy-pasted into all nine — a template that doesn't match its own type's conventions can still pass CI silently.Every dispatch block documents bare
doctor(no flags) as the normal form, with--project/--type/--team/--redacteddescribed as optional narrowing — not the headline usage — since the default scope is already the whole installation.scripts/windows/dispatch.sh: adoctorcase that passes its argv straight through, with no identity resolution.doctorneeds noTEAM/AGENT, and this dispatcher's own--project/--type/--teamglobals serve a different purpose (identity-resolution context for other commands) thandoctor's own same-named scope flags — conflating them would silently change what a Windows user's--project/--typemeant depending on which subcommand followed. Two new tests intests/test_dispatch.batscover: no-identity-needed default scan, and flags passing through untouched by the dispatcher's own globals.SKILL.md(root): one addition to the "Shell (any agent)" command block, written in that section's own existing prose-comment style, not the templates' numbered-dispatch style — it's a different kind of document (a distributed end-product, not a per-type instruction template), so it follows its own existing shape rather than the templates'.Testing
bats tests/test_doctor.bats— 35 ok, 0 not ok (unchanged from feat(doctor): default to the whole installation, filter with --project/--type/--team #654; doctor.sh itself is untouched by this PR).bats tests/test_dispatch.bats— 8 ok, 0 not ok (6 pre-existing + 2 new for thedoctorcase).bats tests/test_delivery.bats— adjacent suite, all green.install.shinto an isolatedHOME, confirmed the deployedclaude-code/template.mdmentionsdoctorand the deployedscripts/windows/dispatch.shroutes-- doctorto the realdoctor.sh, reporting a clean empty installation end-to-end.