Skip to content

doctor and build --target claude never run claude plugin validate; doctor ignores enabled: false in claude plugin list --json #476

Description

@ScriptedAlchemy

Problem

Only agent-bundle validate --artifact invokes the installed Claude validator (packages/agent-bundle/src/api.ts:593validateClaudePlugin). The other two Claude-target paths do not:

  • agent-bundle build --target claude runs no host validation at all. A bundle that Claude Code will load with a component silently dropped (unknown hook event, unparseable skill frontmatter — both warnings Claude tolerates at load time) builds green unless the author separately runs validate --artifact.
  • agent-bundle doctor runs only the local pinned-schema check (validateClaudePluginFiles, src/install/doctor.tsAB7320) and claude --plugin-dir <bundle> plugin list --json (doctor.ts:1284). It never runs claude plugin validate, even though the docs position that command as the pre-publish check (plugins-reference-1.mdCLI commands reference › plugin validate, L1212–1242).

A second, smaller gap in the same inventory code: publicHostInventory (doctor.ts:874-893) records every claude plugin list --json row as state: 'installed' and never reads the row's enabled boolean, so a plugin the user disabled (claude plugin disable) is reported as an installed, current copy. (errors[] is #464.)

Proposed

  • doctor --host claude: after the pinned-schema pass, run the same validateClaudePlugin (plugin.json + marketplace.json runs, --json on ≥2.1.259, see fix(claude): validate plugin.json and marketplace.json explicitly; read the --json report on 2.1.259+ #474) against the bundle root and the installed cache copy, and surface its AB6019AB6022 diagnostics in the doctor report. Doctor is read-only; claude plugin validate is offline and read-only.
  • build --target claude: opt-in --host-validation (or run it when claude is on PATH and print the skip as AB6019 otherwise), so the CI build gate can fail on a Claude finding without a second command.
  • Read enabled in publicHostInventory and report enabled: false rows as a distinct state (or at least mention it in the entry label).

Evidence

  • plugins-reference-1.mdplugin validate (L1212–1242): exit codes, --strict, --json (≥2.1.259), report shape.
  • plugins-reference-1.mdplugin list (L1137–1160): --json rows; --plugin-dir plugins are listed only when the flag precedes the subcommand (which doctor already does at doctor.ts:1284).
  • plugin-marketplaces-0.mdValidate a plugin or a directory without a manifest › Read the validation results (L1406–1416): frontmatter parse errors and invalid hooks/hooks.json make a session load the plugin without that component.
  • discover-plugins-0.mdInstall plugins (L322–327): claude plugin install from the shell takes effect at the next session start or /reload-plugins.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthost-integrationAgent host capabilities, projection, discovery, and lifecycle

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions