fix(agent-help): wire skills metas and correct 'plugin skills' command labels#379
fix(agent-help): wire skills metas and correct 'plugin skills' command labels#379christso wants to merge 1 commit into
Conversation
…untime path The skills subcommand metas (skillsListMeta/skillsAddMeta/skillsRemoveMeta) were defined but not wired into agent-help's allCommands array, so AI agents had no way to discover them. Their `command` fields also incorrectly read 'plugin skills *' while the actual runtime path is 'skills *' (skillsCmd is registered as a top-level group, not under pluginCmd). Same drift affected the JSON envelope's `command` field and the in-error hint strings. - Add skills metas to allCommands in src/cli/agent-help.ts - Rename meta `command` values from 'plugin skills X' to 'skills X' - Rewrite handler json-envelopes and ambiguity-hint strings to use 'skills X' - Update agent-help.test.ts to cover the three new entries Closes #371
Deploying allagents with
|
| Latest commit: |
810faa8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1780f833.allagents.pages.dev |
| Branch Preview URL: | https://fix-371-agent-help.allagents.pages.dev |
Code Review: ✅ APPROVE (with one non-blocking suggestion)CorrectnessBoth defects from #371 are addressed:
All 16 CLAUDE.md compliance
Verification gateAll four checks from the issue are covered. Non-blocking suggestion (follow-up)The issue's Implementation notes explicitly recommended:
This guardrail is not in this PR — the new tests only assert the metadata array has 16 entries and contains the three new ones, which would still pass if a future meta drifted from its registered command (i.e., the exact class of bug being fixed here). Consider a follow-up |
|
Superseded by #380 (skill rename) which landed first and includes all of this PR's changes (metas wired into agent-help + corrected command labels) under the new singular form. |
Summary
Fixes two related defects in the
--agent-helpsurface for theskillssubcommand group:skillsListMeta,skillsAddMeta, andskillsRemoveMetawere defined insrc/cli/metadata/plugin-skills.tsbut never imported bysrc/cli/agent-help.ts, so AI agents could not discover theskills list / add / removecommands at all.commandfield was labeled'plugin skills *', but the runtime command path is'skills *'becauseskillsCmdis registered as a top-level group insrc/cli/index.ts. Same drift was present in the--jsonenvelopes and the--pluginambiguity-hint strings inside the handlers.Changes
src/cli/agent-help.ts: import and addskillsListMeta,skillsAddMeta,skillsRemoveMetatoallCommands.src/cli/metadata/plugin-skills.ts: renamecommandvalues to'skills *'. Updatedexamples:entries to match.src/cli/commands/plugin-skills.ts: update everyjsonOutput({ ..., command: 'plugin skills X' ... })and the in-message hint strings to use the runtime path.tests/unit/cli/agent-help.test.ts: include the three new metas in the test fixture and bump expected count from 13 → 16.Test plan
bun run buildsucceedsbun test— 1191 pass / 0 failallagents --agent-help | jq -e '.commands | map(.command) | contains(["skills list", "skills add", "skills remove"])'→trueallagents --agent-help "skills list" | jq -e '.command == "skills list"'→true(and same foradd/remove)allagents --json skills list | jq -e '.command == "skills list"'→truegrep "'plugin skills " src/cli/metadata/plugin-skills.ts→ no matchesCloses #371