pub fn discover_plugin_roots(project_root: &Path) -> Vec<PluginRoot>Expand description
Discover every plugin under <project_root>/.claude/plugins/.
Why: the single scan point agents::discover_plugin_agents,
skills::discover_plugin_skills, and the namespaced-name resolvers in
both submodules all build on.
What: each immediate subdirectory of .claude/plugins/ is one plugin
root, resolved via load_plugin_root. A missing/unreadable
.claude/plugins/ directory yields an empty list (never an error — a
project simply using no plugins is the common case, mirroring
agents::discover_agents’s missing-dir handling). Non-directory entries
are skipped. Sorted by resolved name.
Test: tests::discover_plugin_roots_missing_dir_is_empty,
tests::discover_plugin_roots_finds_subdirs,
tests::discover_plugin_roots_honors_manifest_name_override.