Skip to content

[enhancement] Step 6.5 monorepo host plugin disambiguation (verify follow-up from #45 round 3) #68

@kiki830621

Description

@kiki830621

Problem

From verification of #45 (PR #67 round 3, master comment A2):
「monorepo host (e.g. psychquant-claude-plugins with 37 plugins) returns FIRST plugin in marketplace.json order — not user-disambiguated」
— Source: codex round-3 verify

/idd-close Step 6.5 resolve_plugin_name(repo_root) walks marketplace.json plugins[] and returns the first whose source path matches repo_root prefix. For monorepo plugin hosts (psychquant-claude-plugins, etc.) where repo_root IS the marketplace dir, MULTIPLE plugins match (all under ./plugins/*) — current impl returns the first, which is determined by JSON ordering not user intent.

Empirical example:

  • ~/Developer/psychquant-claude-pluginsresolve_plugin_name returns mcp-tools (first in marketplace.json)
  • But the issue being closed might be about che-apple-mail-mcp plugin specifically

Type

enhancement (v2 disambiguation)

Priority

P3 (#45 v1 known limitation, acceptable for single-plugin repos which is the common case)

Strategy

Extend resolve_plugin_name (or wrapper logic in Step 6.5) to handle multi-match case:

Option A — git diff heuristic:

# When multiple plugins match repo_root prefix, narrow by git diff:
# - look at files changed in commits Refs #NNN
# - for each plugin_dir, check if any changed file is under plugin_dir
# - if exactly one plugin has matching changes → use that
# - else → AskUserQuestion

Option B — AskUserQuestion fallback:

"Multiple plugins detected in this repo:
 - mcp-tools
 - plugin-tools
 - issue-driven-dev
 ...
 Which plugin does this issue affect?"

Option C — issue body / labels heuristic:

  • Parse issue body for plugin name mentions
  • Or check plugin:NAME labels

Acceptance

  • resolve_plugin_name (or caller logic) detects multi-match case
  • Disambiguation strategy chosen (likely combo: git diff first, AskUserQuestion fallback)
  • Smoke test on psychquant-claude-plugins host with 37 plugins → correctly resolves to changed plugin

Related

Source: surfaced during /idd-verify --pr 67 round 3 (codex). Master report: #67 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions