fix(banner): plugin rows follow the effective profile, not user scope

The ✅ row and detect_uiux_pro_max read user-scope settings.json and the
plugin cache, so a dev project showed ui-ux-pro-max on and an audit
project hid pr-review-toolkit. list_on_plugins now resolves the effective
profile (user scope for unmanaged ids); status-reporter and the plugin
advisor read per-project state from it.
This commit is contained in:
bchanot committed 2026-11-10 12:39:50 +01:00
1 parent 9f9821eab7
commit 556d0e6ddf
6 files changed
+179 -17

No files matched your search

+4
View File
@@ -26,6 +26,10 @@ field. PROBE REPORT missing or a field absent → emit
`PLUGIN CHECK — VERDICT: ERROR(probe report missing/invalid: <what>)` and
STOP. Fail closed: no recommendations over invented detection.
`ACTIVE:` = the managed ids from `PROFILE` (`pack-*=on`, `plugin:<id>=on`);
an id absent from PROFILE keeps its `PLUGINS` enabled state (user scope);
CLIs from `CLIS`. `PLUGINS` alone is installed state, never per-project.
`FRAMEWORK-DEPS` carries exact `"dep": "version"` pairs (or
`framework-deps-none`). Derive signal classes from those names + versions:
`frontend` = react/react-dom/vue/nuxt/svelte/astro/next present;
+2 -1
View File
@@ -19,7 +19,8 @@ Facts only — no signals, no recommendations, no complexity scoring.
# project and conversation (lib/profile.sh, no claude call)
bash "$HOME/.claude/lib/profile.sh" -C "$PWD" current --plain 2>/dev/null || echo "profile-unavailable"
# Marketplace plugins actually installed (ids, enabled state)
# Marketplace plugins installed; the enabled column may not reflect the
# project profile or --settings: per-project state = PROFILE above
claude plugin list 2>/dev/null || echo "plugin-list-unavailable"
# Context7 CLI
+5 -3
View File
@@ -20,7 +20,9 @@ No modifications. No design. No proposals. Facts only.
# Config version
cat ~/.claude/lib/../version.txt 2>/dev/null || echo "unknown" # lib symlink resolves into the repo
# Active plugins (from session-start detection)
# Active plugins: enabled for THIS project (effective profile), not the cache
. "$HOME/.claude/lib/detect-plugins.sh" && list_on_plugins || echo "plugins-unavailable"
bash "$HOME/.claude/lib/profile.sh" -C "$PWD" current --plain 2>/dev/null | grep -E '^(profile|pack-[a-z0-9-]+)=' || echo "profile-unavailable"
command -v rtk &>/dev/null && echo "rtk: installed" || echo "rtk: missing"
command -v gsd &>/dev/null && gsd --version 2>/dev/null | head -1 || echo "gsd: not installed"
@@ -32,7 +34,7 @@ grep -E 'PLUGIN_TOKENS \+ [0-9]+' "$(readlink -f "$HOME/.claude/lib")/../doctor.
# defer cost to /plugin-check.
```
Check `~/.claude/plugins/cache` for active marketplace plugins.
`~/.claude/plugins/cache` = installed, not active. `Plugins ON:` = rtk (if present) + the names printed by `list_on_plugins` (part before `@`) + the `pack-*=on` packs.
Check `~/.claude.json` for active MCP servers.
---
@@ -178,7 +180,7 @@ The report is best-effort: a single failing data source must not abort the whole
| Failure | Behavior |
|---|---|
| Permission denied on `git` (sandbox/CI without `.git` access) | Mark `Branch: N/A (permission denied)`, `Uncommitted: N/A`, `RECENT COMMITS: N/A`. Continue to PROJECT/GSD sections. |
| Permission denied on `~/.claude/plugins/cache` or `~/.claude.json` | Mark `Plugins ON: unknown (cannot read cache)`. Continue. |
| Permission denied on `~/.claude/plugins/cache` or `~/.claude.json` | Cache unreadable: no effect on `Plugins ON:`. `profile-unavailable` → `Plugins ON:` from `list_on_plugins` (user-scope fallback) with suffix `(profile.sh unavailable: user scope)`. `plugins-unavailable` → `Plugins ON: unknown (detect-plugins.sh unavailable)`. Continue. |
| gsd CLI snapshot fails or `.gsd/` state unreadable (`gsd.db`, `STATE.md`, per-milestone `<ID>-ROADMAP.md` — post-ADR-013 layout) | Mark `Progress: N/A (gsd state unreadable)`, do NOT abort the section — still print `Status: initialized` and `Milestone: N/A`. |
| `package.json` / `pyproject.toml` parse error | Mark `Tests: N/A (manifest parse error)`. Continue. |
| `python3` not available in PATH | Skip the python parsing fallbacks; rely on log files + bash-only checks. Mark Tests as `unknown` if no log found. |