Goal
Plan and implement plugin way discovery per ADR-133 (Proposed). Plugins that ship a ways/ directory are currently invisible to the ways system; this makes them discoverable alongside project-local and global ways.
Background
ADR-133 was salvaged from the discarded feat/plugin-way-discovery exploration (PR #76, closed) and re-filed as Proposed. The design is sound and its load-bearing assumption — claude plugin list --json returning id/enabled/installPath/lastUpdated — is verified current (2026-06). What it lacks is a fresh implementation against today's ways-cli, since the original branch's code predated several refactors.
Design (per ADR-133)
Hybrid: resolve once at session start, scan many.
SessionStart hook runs claude plugin list --json, filters to enabled == true, checks for $installPath/ways/, dedups by latest lastUpdated, writes $SESSION_DIR/plugin-ways.json.
ways scan reads the manifest and adds plugin dirs as a third candidate source, between project-local and global (precedence: project > plugin > global).
- Corpus generation reads the same manifest so semantic matching covers plugin ways.
- Plugin way IDs namespaced
plugin:{id}/... to avoid collisions.
- Plugin macros follow the project-macro trust model (disabled by default).
Why this shape
ways scan runs on every prompt and tool-use, so per-invocation claude plugin list --json (~100-200ms) is a non-starter — hence resolve-once-at-session-start. Reading the manifest is cheap; the CLI is the stable public interface, avoiding coupling to Claude Code's internal plugin storage.
Planning tasks (this issue)
References
Goal
Plan and implement plugin way discovery per ADR-133 (Proposed). Plugins that ship a
ways/directory are currently invisible to the ways system; this makes them discoverable alongside project-local and global ways.Background
ADR-133 was salvaged from the discarded
feat/plugin-way-discoveryexploration (PR #76, closed) and re-filed as Proposed. The design is sound and its load-bearing assumption —claude plugin list --jsonreturningid/enabled/installPath/lastUpdated— is verified current (2026-06). What it lacks is a fresh implementation against today's ways-cli, since the original branch's code predated several refactors.Design (per ADR-133)
Hybrid: resolve once at session start, scan many.
SessionStarthook runsclaude plugin list --json, filters toenabled == true, checks for$installPath/ways/, dedups by latestlastUpdated, writes$SESSION_DIR/plugin-ways.json.ways scanreads the manifest and adds plugin dirs as a third candidate source, between project-local and global (precedence: project > plugin > global).plugin:{id}/...to avoid collisions.Why this shape
ways scanruns on every prompt and tool-use, so per-invocationclaude plugin list --json(~100-200ms) is a non-starter — hence resolve-once-at-session-start. Reading the manifest is cheap; the CLI is the stable public interface, avoiding coupling to Claude Code's internal plugin storage.Planning tasks (this issue)
candidates.rs::collect_candidates(),cmd/corpus.rs, theSessionStartchain) predate refactors and need re-verificationplugin-ways.jsonmanifesttrusted-plugin-macrosfile vs. extendtrusted-project-macrosReferences