Merge feature/banner-drop-plugin-dev into develop

This commit is contained in:
bchanot committed 2026-11-11 19:49:59 +01:00
commit 7d35a3e26a
21 files changed
+473 -226

No files matched your search

+8
View File
@@ -22,3 +22,11 @@
- lib/memory.sh `memory_legacy_status` default range (`## ID` to the next `## BLK-`) — on a v1 registry a `### BLK-` entry after a `## BLK-` entry feeds its status line to the `##` entry: a resolved `###` entry can close the open `##` entry above it, which then leaves the handover §5 (the `###` ID itself is flagged unreadable). Severity: low (rare dialect, flagged indirectly). Discovered while: /bugfix G5 verifier. Not fixed.
- agents/handover-doc-writer.md:83 + agents/client-handover-writer.md:1201-1202 — `ROOT="<PROJECT root from the PACKAGE>"` pastes the root into a double-quoted literal, and the printed remedy `memory.sh -C <root> status …` leaves `<root>` unquoted: a root with `"`, `$(…)`, a backtick or a space breaks the line or splits the path. Value is the operator's own `git rev-parse --show-toplevel`, not registry data. Severity: low. Discovered while: /bugfix G5 security gate. Not fixed.
- lib/profile-state.jq (`jq -r` output read by lib/detect-plugins.sh `list_on_plugins` / `detect_gstack`) — a settings value carrying a newline can forge a `plugin:<id>=on` line in the PROFILE_PLAIN text, so the banner or status shows a plugin ON that is not. Display-only, pre-existing for detect_gstack. Severity: low. Discovered while: /bugfix G1+G4 security gate 2026-11-10. Not fixed.
<!-- /feat D2+D3 2026-11-11 (feature/banner-drop-plugin-dev): non-blocking gate findings, plan .claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md -->
- agents/plugin-advisor.md embedded RULE (~:217) — the `embedded` signal can come from REQUEST keywords alone ("driver", "kernel", :58) and maps to `↻ SET : minimal`, against the gated rule "minimal reachable from project-level signals only" (only DISABLE is limited to project signals, :124-126). Gate confirmation limits it. Severity: medium (gated decision not fully enforced). Discovered while: /feat D3 verifier 2026-11-11. Not fixed.
- lib/plugin-gate.md:49-51 — pack `extras` accepted from an advisor token, but pack-extras bundles 21st-ai (credit-metered generate/iterate), same reason as the higgsfield exclusion; no advisor rule emits it. Severity: medium. Discovered while: /feat D3 security gate. Not fixed.
- skills/onboard/SKILL.md:255 + agents/plugin-advisor.md:289 — say `make plugin` installs a pinned ctx7; plugins.lock.json pins "latest" (install-plugins.sh:573-574). Fix the wording or pin ctx7. Severity: low. Discovered while: /feat D3 security gate. Not fixed.
- agents/plugin-advisor.md:281 BLOCK "Superpowers skills missing → make plugin" + lib/plugin-gate.md:61 "A) fix plugins" undefined — cwd-dependent `make plugin` in an onboarded foreign repo; qualify with the claude-config repo or make it print-only. Severity: low. Discovered while: /feat D3 security gate. Not fixed.
- lib/plugin-gate.md templates — tokens and `"<PROJECT_ROOT>"` sit in double quotes (`$()` / backticks still expand; protection = the prose closed-list check); linked worktree: the apply check compares `--show-toplevel` but profile.sh writes at the parent of `--git-common-dir` (confirmed path ≠ written path, same repo); PROJECT_ROOT = $HOME as a git repo passes the check and find_root writes `~/.claude/settings.local.json`. Severity: low (defense in depth). Discovered while: /feat D3 security gates. Not fixed.
- skills/onboard/SKILL.md:387-762 and skills/tour/SKILL.md:155 — still "gstack ON/OFF" (packs vocabulary elsewhere since D3); cosmetic: unwrapped lines skills/plugin-check/SKILL.md:17, lib/plugin-gate.md:45, USAGE.md:182, USAGE.md:1022 transcript without the ↻ glyph. Severity: low. Discovered while: /feat D3 verifier. Not fixed.
+6
View File
@@ -1530,3 +1530,9 @@ Supersedes [[BDR-030]].
- **Alternatives rejected**: `syncClaudeAiSkills: false` (moves synced skills to `~/.claude/skills/.trash/`, not reversible per project); skillOverrides in profile fragments (session without profile reads no fragment); lower budget (40000 = 50000 once synced off, no gain).
- **Also 2026-11-09**: user removed Higgsfield + unused claude.ai connectors at account level → MCP instr 2.4k → 0.77k on full; profile `deniedMcpServers` now dead (cleanup queued). Full headless 32.2k → 26.9k total.
- **Amends** [[BDR-134]] "nothing global": account-level noise cut globally, packs/profiles untouched. Ref: feature/claude-ai-skills-off 47438f4, contract .claude/tasks/contracts/2026-11-09-claude-ai-skills-off-1253.md. See [[BDR-125]].
## BDR-142 — Plugin advisor emits tokens; profile set only on a project without profile, gate validates and applies [accepted] (2026-11-11)
- **Decision**: plugin advisor emits tokens only: `↻ SET <profile>`, `⚡ ENABLE` / `⚠️ DISABLE <pack | full plugin id>`. SET only when source=default AND profile=full AND target != full; else enable/disable deltas against current (or SET target). Hotfix/quick-fix request never changes profile. DISABLE from project-level probe signals only. Under source=flag: no write, `relaunch: cc` only. Monorepo = one profile at git root (union). lib/plugin-gate.md (main loop) checks tokens vs closed lists (profiles web/seo/dev/design/qa/audit/minimal, 8 packs w/o higgsfield, 2 managed full ids), builds `profile.sh -C "<root>"` cmds from fixed templates, prints `diff` turns off/on, applies only when git toplevel == root, SET first, prints undo.
- **Why**: `set` merges whole fragment (every managed key): a recommendation on a project with chosen packs or a custom state wiped them silently (web project told "backend → dev" lost 6 packs). Advisor has no Bash: lists it "computed" were invented; gate holds the shell. Bare `ui-ux-pro-max` id refused rc 2.
- **Alternatives rejected**: set anytime with turns-off list (clobbers custom/chosen packs); hotfix → set minimal (task-scoped mass disable, persists project-wide); advisor printing full commands (unvalidated token reaches shell).
- **Ref**: feature/banner-drop-plugin-dev 80f56ef + 9b12b12, plan .claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md (r3, 2 challenge rounds, 4 exec rounds). Follow-ups in BUGS-FOUND (embedded keyword → SET minimal, extras metered pack, quoting). See [[BDR-134]].
+1
View File
@@ -719,3 +719,4 @@ rules:
## 2026-11-11
- 2026-11-11: /bugfix G5 handover blocker status: 2 challenge rounds -> r3 reconcile_blk_classify (open/closed/unreadable), STEP 9 rooted on PACKAGE root, mandatory SYNTH MEMORY line relayed to user; gates MET/CONFORME/PASS first pass; commit 93a8e19 + changelog; G6-G9 + 2 LOW logged in BUGS-FOUND; BLK-048, LRN-276.
- 2026-11-11: G5 merged c0347eb. 3.0.0 scope set (D1-D6, dead denies, MIGRATION). /feat D2+D3 on feature/banner-drop-plugin-dev: 2 challenge rounds, RUN A banner (plugin-dev gone, OFF row hidden) 80f56ef, RUN B advisor packs vocabulary 9b12b12 after 2 verifier + 1 security rounds; docs; 6 follow-ups in BUGS-FOUND; BDR-142, LRN-277.
+5
View File
@@ -2031,3 +2031,8 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
- **Context**: G5 handover fix. Agent prompt carries bash snippet (STEP 9). Census grep on tokens stays green when snippet logic breaks; retyped copy in test drifts from shipped one.
- **Pattern**: test extracts shipped fenced block (awk: first ```bash fence under its heading), sed swaps placeholders (root, lib dir) for fixture paths, runs with `bash <file>`; negative control = HEAD block prints nothing. Status consumer classifies by ONE known word: closed → omit, known open word → list, anything else → unreadable bucket, flagged to user, never dropped, never substring close.
- **Future application**: any agent/skill prompt holding shell (handover, reconcile, status-reporter); any new reader of registry status.
## LRN-277 — Shell-derived facts belong to the agent with Bash; executor briefs forbid stdin readers (2026-11-11)
- **Context**: D3 plan r2 had advisor print "turns off: <ids from profile.sh diff>"; advisor tools Read/Glob/Grep, no Bash. Two challengers caught it: list would be invented. Same run: sonnet executors left stdin-blocked background jobs 3x (`python3 -`, `cat >>`, empty heredoc), one holding a stale compound command.
- **Pattern**: before assigning a computation to an agent, check its `tools:` frontmatter; shell-derived facts belong to the component that runs Bash (main-loop gate), the report-only agent names inputs only. Executor briefs forbid stdin readers without input (`cat` no file, `cat >>`, `python3 -`), require one simple foreground command per call; orchestrator TaskStops any leftover job named in the report before GATE 0.
- **Future application**: any plan splitting work between a reasoner agent and a gate; every feater/bugfixer brief.
+3 -3
View File
@@ -134,13 +134,13 @@ Shared rules for every phase:
### Actionable
- [ ] BDR-125 obsolescence pass (2026-11-09, /code-clean on chore/bdr125-obsolescence-clean; report `.claude/tasks/plans/2026-11-09-bdr125-obsolescence-clean-1650.md`): phases 0/1/2 clean, 4a-4d code clean, 5 all declared artifacts gone; clean scope A1 + B4a-e executed; bugs G1-G5 in `.claude/audits/BUGS-FOUND.md`. User decisions queued below (D1-D6), each with evidence in the report:
- [ ] D1 doctrine: CLAUDE.global.md:52-54 "Session start 1. Read `.claude/memory/`" + skills/capitalize/SKILL.md:375, while the 4c digest delivers open BLK + TODO + last journal at start (4a meant to fix the "load every session" premise)
- [ ] D2 visible: banner "OFF : plugin-dev" (plugin dropped 2026-07-02): lib/detect-plugins.sh:43-47, hooks/session-start.sh:106,111,180,210, agents/plugin-advisor.md:59,181,199,242,250-255
- [ ] D3 visible (= docs backlog P34): packs vocabulary in agents/plugin-advisor.md (:99 PROFILE template in the old `profile.sh current` format, :126-129 rollback, gstack ON/OFF rules, context7 ON) and USAGE.md:181,232,233,1090,1092,1095
- [x] D2 visible (done 80f56ef, feature/banner-drop-plugin-dev): banner "OFF : plugin-dev" (plugin dropped 2026-07-02): lib/detect-plugins.sh:43-47, hooks/session-start.sh:106,111,180,210, agents/plugin-advisor.md:59,181,199,242,250-255
- [x] D3 visible (done 9b12b12, BDR-142; follow-ups in BUGS-FOUND) (= docs backlog P34): packs vocabulary in agents/plugin-advisor.md (:99 PROFILE template in the old `profile.sh current` format, :126-129 rollback, gstack ON/OFF rules, context7 ON) and USAGE.md:181,232,233,1090,1092,1095
- [ ] D4 skill behavior: skills/prune-memory STEP 1.A/3 detection (per-entry frontmatter, raw `status:` lines) → read statuses via `memory.sh index` (v1 + v2); keep example IDs 9xx (RED-7)
- [ ] D5 user rules: rules/web-security.md vs rules/secure-by-default.md: strict duplicates (web-security :11, :19, "Login rate limiting," in :20) and password wording conflict ("bcrypt/argon2" vs "argon2id (bcrypt or scrypt otherwise)"); cookie flags, upload type/size, forced HTTPS, security headers are unique to web-security
- [x] G1+G4 fixed (bugfix/banner-effective-profile, merged a655b06); G3 fixed (merged 9f9821e); G2 hand figures removed (bugfix/passive-cost-source, plan `.claude/tasks/plans/2026-11-10-passive-cost-source-1330.md` r3); G5 fixed (bugfix/handover-memory-status, 93a8e19, plan `.claude/tasks/plans/2026-11-10-handover-memory-status-1600.md` r3); follow-ups G6-G9 + 2 LOW quoting in BUGS-FOUND
- [ ] feature (G2 split, user 2026-11-10): measured passive-cost API, one source for doctor / /status / plugin-advisor (probe COSTS field). Spec input = the two challenge rounds in the G2 plan: unit = pack or ON plugin (skills + agents + commands descriptions; pr-review-toolkit ~1550t, example-skills ~2350t), doctor counts OFF packs (higgsfield, extras), `detect_plugin_dev` globs the wrong cache level and ignores enabled state, `?` for not-installed or empty units, rc-0 sentinels (`costs-unavailable`/`unknown`) for doctor's `set -euo pipefail`, profile.sh failure → unknown, `python3 -I` (probe runs in the user's project), installPath from installed_plugins.json. Doctor keeps its measured ui-ux 670 until then.
- [ ] D3 add-ons from G2 (plugin-advisor.md): plan-budget WARN :317 (unreachable: plugin-gate never sends PLAN, detect_plan gone), :42 "absolute COST ESTIMATE still reported", :105 `(budget: ~<N>t | n/a)`, :222 "passive cost estimate = highest-cost package profile", "0t passive" claims for impeccable / design-motion-principles (:226 :227 :268 :269); USAGE.md :248 "Budget Pro (~11k tokens/5h)", :494 `(~400t)`, :923 `(~200t)`; session-banner.test.sh SB10 `gone()` passes on a missing file (add an existence check)
- [x] D3 add-ons (done 9b12b12) from G2 (plugin-advisor.md): plan-budget WARN :317 (unreachable: plugin-gate never sends PLAN, detect_plan gone), :42 "absolute COST ESTIMATE still reported", :105 `(budget: ~<N>t | n/a)`, :222 "passive cost estimate = highest-cost package profile", "0t passive" claims for impeccable / design-motion-principles (:226 :227 :268 :269); USAGE.md :248 "Budget Pro (~11k tokens/5h)", :494 `(~400t)`, :923 `(~200t)`; session-banner.test.sh SB10 `gone()` passes on a missing file (add an existence check)
- [ ] D6 project rule: .claude/rules/graphify-vendored.md says `graphify install --platform claude` "touches nothing else", but graphifyy 0.9.67 appends a `# graphify` block to ~/.claude/CLAUDE.md (= CLAUDE.global.md); `graphify claude install` writes into the caller's cwd, so the install-plugins.sh trap protects $REPO only when run from $REPO
- [ ] parked (code-clean 2026-11-09): hooks/rtk-rewrite.sh:84 no-op `[ "$CMD" = "$REWRITTEN" ] && REWRITTEN="$CMD"`: remove with the next real rtk-hook edit, re-pin `hooks/.rtk-hook.sha256` + rtk-rewrite.test.sh T13 in the same step
- [ ] deferred (BDR-123): remap inline-writing best-tier skills (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /audit-delta 3d, /harden STEP 3); stale citers skills/feat/SKILL.md:6, skills/code-clean/SKILL.md:36; + impeccable row in routing.json (design Build stack has none; frontend-design has `reflect`; census test pins the table)
@@ -0,0 +1,39 @@
# CONTRACT — advisor-packs-vocabulary
- date: 2026-11-11 | flow: feat | branch: feature/banner-drop-plugin-dev (RUN B, commits in place after RUN A)
- status: active
## REQUEST (verbatim — IMMUTABLE)
D2 + D3 from .claude/tasks/TODO.md § Release 3.0.0 scope (user decisions 2026-11-11, [gated]). D2: plugin-dev was dropped 2026-07-02 but the banner prints "OFF : plugin-dev": remove plugin-dev everywhere (lib/detect-plugins.sh `detect_plugin_dev` :43-47, hooks/session-start.sh :106,111,180,210, agents/plugin-advisor.md :59,181,199,242,250-255); the ⚫ OFF row disappears when empty. D3: rewrite agents/plugin-advisor.md and USAGE.md to the packs vocabulary (report .claude/tasks/plans/2026-11-09-bdr125-obsolescence-clean-1650.md D3: :99 PROFILE template in the old `profile.sh current` format, :126-129 toggle+rollback (plugin-gate says atomic), gstack ON/OFF rules :81-85,139-149,209,216,226,259, "context7 ON" :144,233; USAGE.md :181,232,233,1090,1092,1095), no budget/token claims, plus the G2 add-ons (TODO "D3 add-ons from G2": plan-budget WARN :317, :42, :105, :222, "0t passive" claims :226 :227 :268 :269; USAGE.md :248, :494, :923; lib/tests/session-banner.test.sh SB10 `gone()` must fail on a missing file). Line numbers predate the G1-G5 merges: re-locate. Regression tests in lib/tests/session-banner.test.sh. make test needs GATES_TIMEOUT=600 + PATH=$HOME/.bun/bin:$PATH (LRN-271). Foreign-code style. In force: BDR-134 (profiles single source), BDR-100 (patch every citer), BDR-125, LRN-274, LRN-275.
## CLARIFICATIONS
Q: one run or two? / A: two sequential /feat runs; RUN A (banner side) committed on this branch; THIS contract = RUN B (agents/plugin-advisor.md incl. its plugin-dev lines, lib/plugin-gate.md, USAGE.md, lib/tests/session-banner.test.sh) (orchestrator)
Q: plan? / A: .claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md r3 § RUN B is binding (orchestrator, after two challenge rounds)
Q: profile mapping? / A: Backend API → dev (+ctx7 if fast libs); Frontend SPA/SSR → design; public website → web; Full-stack SaaS → full; CLI / library → dev; quick fix → minimal; design system → design; multi-session / enterprise → current profile or dev + gsd CLI (user, 2026-11-11) [gated]
Q: when may the advisor propose `profile.sh set`? / A: only when the project has no profile yet; otherwise per-pack enable/disable deltas; any set line lists what it turns off (user, 2026-11-11) [gated]
Q: USAGE scope? / A: every non-COST line of the plan's step 6 list rewritten; the 6 transcript `COST: ~Nt` lines and the Pattern-header estimates untouched (user, 2026-11-11) [gated]
Q: CHECK 3 matched `120000 tokens` (USAGE:202, literal /route show sample) via `0 token`? / A: oracle defect, pattern anchored `(^|[^0-9])0 token` as in SB10 (orchestrator, 2026-11-11, after GATE 0 run 1)
Q: GATE 1 ECARTS(2) + GATE 2 PASS with MEDIUM/LOW findings: fold all into one fresh-executor round? / A: yes; gap list `.claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-round2-gaps.md`; FILE SCOPE adds skills/onboard/SKILL.md (ctx7 setup citer, BDR-100) (orchestrator, 2026-11-11)
Q: hotfix / quick-fix request on a project without profile: SET minimal (mapping) or no change? / A: no profile change; a hotfix request only points to /hotfix or /bugfix; minimal stays reachable from project-level signals only (user, 2026-11-11) [gated]
Q: GATE 1 round 2 ECARTS(2) + GATE 2 round 2 LOWs? / A: one fresh-executor round 3, gap list `.claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-round3-gaps.md` (orchestrator, 2026-11-11)
Q: GATE 1 round 3 CONFORME, GATE 2 BLOCK(1) (onboard `make plugin` in a foreign cwd) + MEDIUM (max via SET) + verifier notes? / A: one fresh-executor security round, gap list `.claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-security1-gaps.md`; FILE SCOPE adds skills/plugin-check/SKILL.md:14-17 (BDR-100 citer; RUN B now 6 files, over the /feat cap of 5 by two one-line citers, accepted) (orchestrator, 2026-11-11)
## ACCEPTANCE CRITERIA
1. Advisor in packs vocabulary: no plugin-dev, PLAN, plan budget, "0t passive", rollback, "gstack ON/OFF", `[plugin]` slot, `ctx7 setup`, "passive tokens"; DECISION TABLE and Recommended sets table gone; full ids for managed plugins; `↻ SET` slot gated on source=default.
CHECK: cd /home/bchanot/Documents/claude && ! grep -qE 'plugin-dev|PLAN:|plan budget|0t passive|rollback|gstack ON|gstack OFF|\[plugin\]|ctx7 setup|passive tokens|## DECISION TABLE|Recommended sets' agents/plugin-advisor.md && grep -q 'ui-ux-pro-max@ui-ux-pro-max-skill' agents/plugin-advisor.md && grep -q 'pr-review-toolkit@claude-code-plugins' agents/plugin-advisor.md && grep -q '↻ SET' agents/plugin-advisor.md && grep -q 'source=default' agents/plugin-advisor.md && echo ADVISOR-OK
EXPECT: ADVISOR-OK
EVIDENCE: MET exit=0 marker-found :: ADVISOR-OK
2. Gate: the main loop prints `profile.sh diff` for a SET, applies only at the git root, SET first, disable form present, no ctx7 pre-fetch, no bare ui-ux-pro-max enable.
CHECK: cd /home/bchanot/Documents/claude && grep -q 'diff' lib/plugin-gate.md && grep -q 'rev-parse --show-toplevel' lib/plugin-gate.md && grep -q 'disable' lib/plugin-gate.md && grep -q 'unset' lib/plugin-gate.md && ! grep -qE 'Pre-fetch ctx7|Enable ui-ux-pro-max \(' lib/plugin-gate.md && echo GATE-OK
EXPECT: GATE-OK
EVIDENCE: MET exit=0 marker-found :: GATE-OK
3. USAGE: no old-vocabulary or zero-token claim outside the kept COST lines.
CHECK: cd /home/bchanot/Documents/claude && ! grep -E '0 t passif|(^|[^0-9])0 token|gstack ON|gstack OFF|context7 ON|tout OFF|\(~[1-9][0-9]*t\)|DISABLE: .*context7' USAGE.md | grep -qv 'COST' && echo USAGE-OK
EXPECT: USAGE-OK
EVIDENCE: MET exit=0 marker-found :: USAGE-OK
4. Regression locks + full suite green.
CHECK: cd /home/bchanot/Documents/claude && grep -q 'lib/plugin-gate.md' lib/tests/session-banner.test.sh && grep -q 'USAGE.md' lib/tests/session-banner.test.sh && GATES_TIMEOUT=600 PATH="$HOME/.bun/bin:$PATH" make test 2>&1 | tail -1 | grep -q 'all suites green' && shellcheck -S warning lib/tests/session-banner.test.sh && echo GREEN
EXPECT: GREEN
EVIDENCE: MET exit=0 marker-found :: GREEN
## FILE SCOPE
agents/plugin-advisor.md, lib/plugin-gate.md, USAGE.md, lib/tests/session-banner.test.sh, skills/onboard/SKILL.md (:254-257 ctx7 install lines only), skills/plugin-check/SKILL.md (:14-17 only)
@@ -0,0 +1,28 @@
# CONTRACT — banner-drop-plugin-dev
- date: 2026-11-11 | flow: feat | branch: feature/banner-drop-plugin-dev
- status: active
## REQUEST (verbatim — IMMUTABLE)
D2 + D3 from .claude/tasks/TODO.md § Release 3.0.0 scope (user decisions 2026-11-11, [gated]). D2: plugin-dev was dropped 2026-07-02 but the banner prints "OFF : plugin-dev": remove plugin-dev everywhere (lib/detect-plugins.sh `detect_plugin_dev` :43-47, hooks/session-start.sh :106,111,180,210, agents/plugin-advisor.md :59,181,199,242,250-255); the ⚫ OFF row disappears when empty. D3: rewrite agents/plugin-advisor.md and USAGE.md to the packs vocabulary (report .claude/tasks/plans/2026-11-09-bdr125-obsolescence-clean-1650.md D3: :99 PROFILE template in the old `profile.sh current` format, :126-129 toggle+rollback (plugin-gate says atomic), gstack ON/OFF rules :81-85,139-149,209,216,226,259, "context7 ON" :144,233; USAGE.md :181,232,233,1090,1092,1095), no budget/token claims, plus the G2 add-ons (TODO "D3 add-ons from G2": plan-budget WARN :317, :42, :105, :222, "0t passive" claims :226 :227 :268 :269; USAGE.md :248, :494, :923; lib/tests/session-banner.test.sh SB10 `gone()` must fail on a missing file). Line numbers predate the G1-G5 merges: re-locate. Regression tests in lib/tests/session-banner.test.sh. make test needs GATES_TIMEOUT=600 + PATH=$HOME/.bun/bin:$PATH (LRN-271). Foreign-code style. In force: BDR-134 (profiles single source), BDR-100 (patch every citer), BDR-125, LRN-274, LRN-275.
## CLARIFICATIONS
Q: one run or two? / A: two sequential /feat runs (advisor side needs lib/plugin-gate.md: 6 files > /feat cap). THIS contract = RUN A (D2 banner side: lib/detect-plugins.sh, hooks/session-start.sh, lib/tests/session-banner.test.sh); the plugin-dev lines of agents/plugin-advisor.md go to RUN B with D3 (orchestrator)
Q: plan? / A: .claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md r3 § RUN A is the binding plan (orchestrator, after two challenge rounds)
Q: OFF row when every toggle is on? / A: no line at all (user, 2026-11-11) [gated]
## ACCEPTANCE CRITERIA
1. plugin-dev gone from the banner side and the OFF row absent when every toggle is on, with a positive control; `gone()` fails on a missing file; suite green.
CHECK: cd /home/bchanot/Documents/claude && GATES_TIMEOUT=600 PATH="$HOME/.bun/bin:$PATH" make test suite=lib/tests/session-banner.test.sh 2>&1 | tail -1 | grep -q 'all suites green' && grep -q 'SB11' lib/tests/session-banner.test.sh && ! grep -qi 'plugin.dev' lib/detect-plugins.sh hooks/session-start.sh && grep -q 'ctx7' lib/tests/session-banner.test.sh && echo BANNER-OK
EXPECT: BANNER-OK
EVIDENCE: MET exit=0 marker-found :: BANNER-OK
2. The dead >4 split branches of the toggle rows are gone; the 40-char budget is named in a comment.
CHECK: cd /home/bchanot/Documents/claude && ! grep -q '_inactive_count\|_active_count\|INACTIVE_STR\|ACTIVE_STR=' hooks/session-start.sh && grep -q '40' hooks/session-start.sh && echo COLLAPSED
EXPECT: COLLAPSED
EVIDENCE: MET exit=0 marker-found :: COLLAPSED
3. Build/tests green (full suite); shellcheck at warning level clean on the touched shell files.
CHECK: cd /home/bchanot/Documents/claude && shellcheck -S warning lib/detect-plugins.sh hooks/session-start.sh lib/tests/session-banner.test.sh && GATES_TIMEOUT=600 PATH="$HOME/.bun/bin:$PATH" make test 2>&1 | tail -1 | grep -q 'all suites green' && echo GREEN
EXPECT: GREEN
EVIDENCE: MET exit=0 marker-found :: GREEN
## FILE SCOPE
lib/detect-plugins.sh, hooks/session-start.sh, lib/tests/session-banner.test.sh
@@ -0,0 +1,67 @@
# FEAT — advisor-packs-vocabulary (D2+D3, 2026-11-11) — r3 after two challenge rounds (final)
Source: .claude/tasks/TODO.md § Release 3.0.0 scope (user decisions 2026-11-11 [gated]); evidence .claude/tasks/plans/2026-11-09-bdr125-obsolescence-clean-1650.md D2/D3; TODO "D3 add-ons from G2".
Two /feat runs, sequential: RUN A = D2 banner side (3 files), RUN B = D3 advisor side + the plugin-dev advisor lines (4 files; lib/plugin-gate.md makes 6 files for one run, over the /feat cap).
## Context
- plugin-dev dropped 2026-07-02 (install-plugins.sh:527-529 history comment stays). Live citers: `detect_plugin_dev` (lib/detect-plugins.sh:67-71), banner toggle loop (hooks/session-start.sh:106,111), `_toggle_owned` (:173), plugin-advisor (:63, :185, :203, :246, :254-260). Banner prints `⚫ OFF : plugin-dev`.
- Packs (BDR-134): every switch is `lib/profile.sh` (`set <profile>`, `unset`, `enable|disable <pack | plugin id>`, `diff <profile>` prints `id: on → off` lines). `set` merges the WHOLE fragment (every managed key) into `<root>/.claude/settings.local.json`; root = git root (find_root walks up to .claude/, CLAUDE.md or .git below $HOME; no root → rc 2). gstack = packs gstack-dev / gstack-browser / gstack-design; impeccable + design-motion-principles = pack design; managed plugins (full id only, the bare name resolves to a non-existent pack, rc 2): `ui-ux-pro-max@ui-ux-pro-max-skill` (on in design, web, full, max), `pr-review-toolkit@claude-code-plugins` (on in audit, max); context7 = `ctx7` CLI (find-docs skill always loads), gsd = external CLI; `dev` = gstack-dev on.
- `source=default` + `profile=full` = no project profile and the manifest defaults; `source=default` with another profile name = pack keys from shared/user scope (custom).
- Under `source=flag` every profile.sh write affects other sessions only (lib/profile.sh:196-199).
- The advisor has no Bash (tools: Read, Glob, Grep): it can never run `profile.sh diff`; the gate (main loop) can.
## User decisions [gated]
- D2: remove plugin-dev everywhere; ⚫ OFF row disappears when empty.
- D3: advisor + USAGE in packs vocabulary, no budget/token claims.
- Profile mapping approved: Backend API → dev (+ctx7 if fast libs); Frontend SPA/SSR → design; public website → web; Full-stack SaaS → full; CLI / library → dev; quick fix → minimal; design system → design; multi-session / enterprise → current profile or dev + gsd CLI.
- Profile switch policy: `set <profile>` ONLY when the project has no profile yet; otherwise per-pack `enable` / `disable` deltas. Any `set` line lists what it turns off.
- USAGE scope: the 6 transcript `COST: ~Nt` lines (:363 :497 :551 :649 :711 :1018) and the Pattern-header session estimates stay; every other non-COST line in the sweep list below is rewritten (user 2026-11-11, round 2).
## RUN A — D2 banner side (/feat, 3 files)
1. `lib/detect-plugins.sh`: delete `detect_plugin_dev` (:67-71).
2. `hooks/session-start.sh`:
- toggle loop `for plugin in gstack uiux_pro_max context7 graphifyy`, with a comment that the four display names (38 chars) must fit the 40-char field (a fifth toggle needs a split again); delete the `plugin_dev)` case line; `_toggle_owned` drops `plugin-dev`.
- collapse the toggle rows (:202-232) to `printf "│ 🟢 ON : %-40s│\n" "${TOGGLE_ACTIVE[*]:-none}"` and `if [ ${#TOGGLE_INACTIVE[@]} -gt 0 ]; then printf "│ ⚫ OFF : %-40s│\n" "${TOGGLE_INACTIVE[*]}"; fi`; delete ACTIVE_STR / INACTIVE_STR / `_active_count` / `_inactive_count` and their unsets; drop the stale "split across 2 lines if >4" comment; reword the ✅ row comment (:183-185) so it no longer cites the toggle row's split policy (the ✅ row keeps its greedy split, unchanged).
3. `lib/tests/session-banner.test.sh`:
- printf `ctx7` and `graphify` stub executables into `$WORK/stub` next to rtk (already first on PATH).
- SB11 on SB3's existing `out` (h1 + pfull): 🟢 ON row has gstack, ui-ux-pro-max, context7, graphify (= 1 each, the positive control); `row '⚫ OFF'` is empty.
- `gone()` echoes 0 when `$ROOT/$1` is missing; SB10 adds `gone lib/detect-plugins.sh detect_plugin_dev` = 1 and `gone hooks/session-start.sh 'plugin.dev'` = 1.
- SB1-toggle-off-uiux (existing) keeps proving the OFF row prints when non-empty.
## RUN B — D3 advisor side (/feat, 4 files)
4. `agents/plugin-advisor.md` (voice kept). File-wide rule: every recommendation names a pack, a profile, a managed plugin by full id, or a CLI (ctx7, gsd); "gstack ON/OFF" never appears (gstack = the three packs).
a. INPUT: delete the PLAN paragraph (:40-43).
b. PHASE 2: delete the `skill-creation` row (:63).
c. PHASE 2.5 tiers (:85-91) in profiles: simple → `minimal` (or `dev` for code work), moderate → current profile + ctx7 if fast-libs, complex → + pack gstack-browser if browser-QA, gsd if multi-session; graphify 200-file rule unchanged (BDR-097). Never "no gstack" next to a profile that enables gstack-dev.
d. PHASE 3 template: `ACTIVE:` unchanged; `PROFILE: <profile> (source=<local|flag|default>)`; `↻ SET : <profile> — [reason]` ONLY when source=default AND profile=full AND the target differs from full (target = full → `✅ KEEP`, no SET); the SET line names the profile only (the gate prints what it turns off); with a SET line every ENABLE / DISABLE is a delta against the TARGET profile (a pack the target turns off but the project needs = ENABLE); `✅ KEEP : [pack or plugin] — [reason]`; `⚡ ENABLE : [pack or plugin] — [reason] — bash $HOME/.claude/lib/profile.sh enable <pack | full plugin id>`; `⚠️ DISABLE : [pack or plugin] — [reason] — bash $HOME/.claude/lib/profile.sh disable <pack | full plugin id>`, emitted only from project-level probe signals (manifests, deps, file counts), never from REQUEST-only signals (simple, hotfix, "this task"); `ℹ️ OPTIONAL: [pack or plugin] — [marginal benefit]`; under source=flag: no profile.sh command at all, only `relaunch: cc <name> <profile>` when a needed pack is off; delete the `PLAN:` line (:106).
e. Apply note (:130-134): "Apply and confirmation are the DISPATCHER'S job" (the word "rollback" goes); atomic profile.sh writes; "emits the EXACT profile.sh commands".
f. DECISION TABLE (:138-153) deleted: the Conditional RULES become the only signal → recommendation source (every table row has its RULE twin; the backend row :152 lives in the WRITING table). The RULES in packs vocabulary: mobile → packs gstack-browser + gstack-design off; deploy + browser-qa → packs gstack-dev + gstack-browser; browser-qa alone → pack gstack-browser; frontend / design-system → one line "pack design ON" (impeccable + design-motion-principles) + `ui-ux-pro-max@ui-ux-pro-max-skill` per the existing condition; the design-system WARN fires when pack design and ui-ux-pro-max are both off; fast-libs → "ctx7 CLI installed (find-docs skill always loads)", never ENABLE/DISABLE; gsd lines (:155, :234, :240) → "external CLI, nothing loads in Claude Code"; drop every "0t passive", "Saves passive tokens", "passive tokens saved". Keep the "Skill routing by task size" subsection (:157-171) as is.
g. Recommended sets table (:191-207) deleted. WRITING A PROFILE table (:283-294): fold the approved labels into the existing rows' Signal cells (backend / API / CLI / library → dev, + ctx7 if fast libs; frontend SPA/SSR, heavy UI, design system → design; public website → web; quick fix / narrow session → minimal); add rows only for full-stack SaaS → full and multi-session / enterprise → current profile or dev + gsd CLI. The id list (:296-297) adds `ui-ux-pro-max@ui-ux-pro-max-skill` and `pr-review-toolkit@claude-code-plugins` (full ids). The section states the switch policy (set only at source=default + profile=full; else deltas; under flag only relaunch).
h. Monorepo RULE (:217-222): one profile for the whole repo (profile.sh writes at the git root) = the union of the packages' needs, plus enable deltas; delete the per-package recommendation lines and "passive cost estimate" (:222).
i. Embedded RULE: "all packs off (profile `minimal`)"; simple/hotfix RULE: "profile `minimal` when source=default, else nothing (no task-scoped DISABLE)"; delete the two plugin-dev RULEs (:254-260) and the compat row `plugin-dev ↔ superpowers` (:185); compat gstack rows say "gstack packs".
j. BLOCK: delete "Full-product + gstack not installed" (:311). WARN: delete the plan-budget line (:317); "Active toggle plugins not needed for this task (dead passive cost)" → "Active packs no project signal needs"; context7 WARN fix (:320) → "`make plugin` (installs ctx7 and wires find-docs)", drop `ctx7 setup --claude`.
5. `lib/plugin-gate.md`:
- step 4 (present, main loop): for a `↻ SET <profile>` line run `bash "$HOME/.claude/lib/profile.sh" -C <PROJECT_ROOT> diff <profile>` and print its `→ off` lines under it as "turns off" (none → "turns off: nothing").
- step 5 (apply): trigger = a `↻ SET`, `⚡ ENABLE` or `⚠️ DISABLE` line. Apply only when `git -C <PROJECT_ROOT> rev-parse --show-toplevel` equals PROJECT_ROOT; otherwise print the commands and apply nothing ("no git root yet: run them after git init"). Order: the SET first, then the deltas (after "customize" too). Command forms: `set <name>`, `enable <pack | full plugin id>`, `disable <pack | full plugin id>`. The confirmation says the change is project-wide and persists in `<root>/.claude/settings.local.json`. Undo printed after a write: after a SET `profile.sh unset`, after deltas the inverse enable/disable. PROPOSED CHANGES example: `↻ Set profile dev (backend detected) — turns off: <diff lines>`, `⚡ Enable pack design (frontend detected)`, `⚡ Enable ui-ux-pro-max@ui-ux-pro-max-skill`; no ctx7 pre-fetch line. Under source=flag nothing is applied (relaunch line only).
6. `USAGE.md` (French, voice kept). Rewrite to the packs vocabulary and the approved mapping, drop every "0 token / 0 t passif / 0t / sans coût passif / ~Nt" claim, on these lines only: :181, :229, :232, :233, :236, :237, :240 (GSD: "CLI externe, rien ne se charge dans Claude Code"), :326 ("cso si le pack gstack-dev est actif"), :417-418, :494-496, :547, :550, :647-648, :709-710, :715 (drop "3000t de"), :810, :923, :1021-1023, :1031, :1055, :1078, :1090, :1092, :1094, :1095, :1096. Untouched: the 6 COST lines, Pattern-header estimates (:250 :271 :298 :359 :366 :369 :383 :400), :248 (already points to make doctor), :978. Transcript advisor lines show what the new advisor can emit (packs, profiles, full ids; context7 only as "ctx7 installé" / WARN).
7. `lib/tests/session-banner.test.sh` SB10: `gone agents/plugin-advisor.md 'plugin-dev|PLAN:|plan budget|0t passive|rollback|gstack ON|gstack OFF|\[plugin\]|ctx7 setup|passive tokens'` = 1 (the old `'plan budget'` filter arg is dropped); `gone lib/plugin-gate.md 'Pre-fetch ctx7|Enable ui-ux-pro-max \('` = 1; `has` lib/plugin-gate.md `profile.sh" -C` + `diff` and `rev-parse --show-toplevel` = 1; `has` agents/plugin-advisor.md `ui-ux-pro-max@ui-ux-pro-max-skill` = 1; `gone USAGE.md '0 t passif|0 token|gstack ON|gstack OFF|context7 ON|~[1-9][0-9]*t\)'` = 1 with a filter that keeps the 6 COST lines (`'COST'`).
## Edge cases
- Banner width: 40-char field, longest toggle row 38 (comment in the loop).
- A stale user-scope `plugin-dev@…: true` key would now show in the ✅ row: truthful, by design (none on this machine).
- doctor.sh / status-reporter do not call `detect_plugin_dev` (grep 2026-11-11).
- /init-project STEP 0 runs before `git init`: the gate shows the commands and applies nothing (step 5 git-root check); applying after STEP 5f is left to the user (skills/init-project not in scope).
- source=default with a non-full profile (shared or user scope pack keys): no SET, deltas only.
- source=flag: no write at all.
- CHANGELOG history lines naming plugin-dev stay.
## Disposition
honors BDR-134 (profile.sh single switch, project-scoped, never user scope), BDR-100 + LRN-169 (every citer patched), BDR-125 (D2 deletes what the plugin-dev drop obsoleted), BDR-097 (graphify rule untouched), LRN-093 (SB11 positive control), LRN-274 (detect-plugins: deletion only), LRN-275, LRN-271.
## Files
RUN A: lib/detect-plugins.sh, hooks/session-start.sh, lib/tests/session-banner.test.sh.
RUN B: agents/plugin-advisor.md, lib/plugin-gate.md, USAGE.md, lib/tests/session-banner.test.sh.
## Challenge summary
- Round 1: correctness FATAL(3), robustness CONCERNS(3), simplicity CONCERNS(3) → r2 (run split, SET slot, full ids, monorepo union, banner collapse, tests).
- Round 2 (cap reached, no round 3): correctness CONCERNS(2), robustness CONCERNS(4), simplicity CONCERNS(3), no BLOCKER. Folded into r3: the turns-off list moves to the gate (advisor has no Bash), SET only at default+full and never equal to full, deltas against the target, SET first, git-root apply check, DISABLE from project signals only, undo lines, no writes under flag, DECISION TABLE deleted (RULES = one source), WRITING table folded not appended, pack design one line, pr-review-toolkit full id, USAGE sweep widened (user), SB11 on SB3's output.
@@ -0,0 +1,27 @@
# RUN B — round 2 gaps (GATE 1 ECARTS(2) + GATE 2 findings), 2026-11-11
Apply on top of the current working tree (RUN B edits are in place, uncommitted). Binding plan: .claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md r3 (RUN B + User decisions [gated]).
## Verifier gaps (must close)
G1. lib/plugin-gate.md step 5: the PROPOSED CHANGES consent prompt (before "Apply these changes? (yes / no / customize)") must say the change is project-wide and persists in `<PROJECT_ROOT>/.claude/settings.local.json`. Today it only appears after the write.
G2. USAGE.md :647 and :710 read "→ DISABLE: pack design, packs gstack (profil dev ou minimal)": `dev` turns pack gstack-dev ON, so the line contradicts itself, and "packs gstack" is a collective gstack OFF. Rewrite both to what the new advisor emits for that scenario (CLI / library, source=default + full): a `↻ SET : dev` line (gate shows what it turns off), no DISABLE of a pack dev enables, never "packs gstack" as a group.
## Transcript accuracy (same class as G2, verifier notes)
G3. USAGE.md :418 and :496 show DISABLE lines from description-only /plugin-check runs before init (source=default + full): the new advisor emits a `↻ SET : <profile>` there (mobile → the profile the RULES give; public website → `web`, which keeps gstack-dev and gstack-browser on), never a REQUEST-only DISABLE. :494 and :548 ENABLE pack design + ui-ux-pro-max that `full` already turns on: show them as KEEP (or covered by the SET target), not ENABLE.
G4. USAGE.md :1091 `"design élaboré" / tokens → ui-ux-pro-max ON`: same rewrite as its twin :231.
G5. USAGE.md :240 keeps the banned frame "n'est pas X : c'est Y": reword as a plain statement (e.g. "GSD v2 est un CLI externe, rien ne se charge dans Claude Code. …"). :704 heading "zéro token inutile": reword without a token claim. Em-dashes inside the rewritten structured transcript lines (:326 tree prefix, :494 template separator, :1055 STEP line) may stay (structured formats, not prose).
## Rule tensions (advisor)
G6. agents/plugin-advisor.md simple/hotfix RULE (:214): a REQUEST-only "simple"/"hotfix" signal drives NO SET and NO DISABLE (both are project-wide, persistent); it recommends the lightweight skill only. `minimal` stays reachable from project-level signals (embedded RULE, WRITING table "narrow session" row).
G7. lib/plugin-gate.md step 4: when `profile.sh -C "<PROJECT_ROOT>" diff <profile>` exits non-zero (no project root yet, e.g. /init-project STEP 0 before git init), print "turns off: unknown (no project root yet)" and continue; step 5 already applies nothing in that case.
## Security findings (GATE 2 PASS, fixed here)
S1 (MEDIUM). lib/plugin-gate.md: the main loop builds every command from the fixed template only; before running ANY command (step-4 diff included) it checks the advisor's token: profile name against the profiles in `lib/profiles/` (`^[a-z0-9][a-z0-9-]*$` and an existing `lib/profiles/<name>.json`), pack against the documented pack list (design, scroll3d, seo, web-validate, gstack-dev, gstack-browser, gstack-design, higgsfield, extras), plugin against the two managed full ids (`ui-ux-pro-max@ui-ux-pro-max-skill`, `pr-review-toolkit@claude-code-plugins`). A token that matches none is printed as rejected and skipped, never pasted into a shell. Tokens are quoted in the template.
S2 (LOW). lib/plugin-gate.md: quote the root everywhere in the templates: `-C "<PROJECT_ROOT>"`, `git -C "<PROJECT_ROOT>" rev-parse --show-toplevel`.
S3 (LOW). agents/plugin-advisor.md: the emitted command form names the token only, the gate builds the command: e.g. `⚡ ENABLE : pack design — <reason> — enable design` (or keep the full form but with `-C "<PROJECT_ROOT>"` and `"$HOME/.claude/lib/profile.sh"` quoted). Pick ONE form and make advisor template, WRITING section and gate agree; the gate never runs the advisor's line verbatim.
## Out-of-scope citer (BDR-100)
C1. skills/onboard/SKILL.md:254 `npm install -g ctx7 && ctx7 setup --claude` → `make plugin` (installs ctx7 and wires find-docs), same as the advisor WARN; only that line.
## Tests
T1. lib/tests/session-banner.test.sh SB10: lock `has` lib/plugin-gate.md 'rejected' (S1) and `gone` lib/plugin-gate.md "-C <PROJECT_ROOT>" (unquoted form, S2) = 1; `gone USAGE.md 'packs gstack \(|DISABLE: pack design, packs gstack'` = 1; `gone skills/onboard/SKILL.md 'ctx7 setup'` = 1. Keep every existing lock green.
@@ -0,0 +1,28 @@
# RUN B — round 3 gaps (GATE 1 round 2 ECARTS(2) + GATE 2 round 2 LOWs), 2026-11-11
Apply on top of the current working tree (RUN B rounds 1-2 in place, uncommitted). Binding: plan r3 (.claude/tasks/plans/2026-11-11-advisor-packs-vocabulary-1000.md), round-2 gaps (…-round2-gaps.md), contract CLARIFICATIONS.
## User decision (2026-11-11) [gated]
A hotfix / quick-fix REQUEST never changes the profile: it only points to /hotfix or /bugfix. `minimal` stays reachable from project-level signals only (embedded RULE, "narrow session" row). This replaces the "quick fix → minimal" mapping row.
## Verifier gaps (must close)
R1. agents/plugin-advisor.md WRITING table: rows whose profile is `full` (public website end-to-end ~:252, full-stack SaaS ~:255) emit `✅ KEEP` (no SET), per the PHASE 3 rule "target = full → ✅ KEEP, no SET".
R2. USAGE.md :648 and :711: the SET line names the profile only: `↻ SET : dev`. Drop the parenthetical turns-off list (it was wrong: `profile.sh diff dev` from full lists 7 ids). If the transcript shows the gate's line, it must be the real one: `turns off: pack-design, pack-scroll3d, pack-seo, pack-web-validate, pack-gstack-browser, pack-gstack-design, ui-ux-pro-max@ui-ux-pro-max-skill`.
## Hotfix decision (apply)
R3. agents/plugin-advisor.md: the WRITING row "quick fix, narrow session → ↻ SET : minimal" (~:258) becomes "narrow session (project-level) → ↻ SET : minimal"; quick fix / hotfix appears only in the simple/hotfix RULE (no SET, no DISABLE, skill pointer). USAGE.md :237 and :1097 ("Hotfix → profil minimal") → "Hotfix / script rapide → aucun changement de profil (/hotfix ou /bugfix)".
## Security LOWs + verifier notes (fix)
R4. lib/plugin-gate.md:46 profile check path anchored: `$HOME/.claude/lib/profiles/<name>.json` (the gate runs from a consumer project's main loop).
R5. lib/plugin-gate.md closed pack list: `higgsfield` is NOT accepted from advisor tokens (paid service, explicit user ask only); say so next to the list.
R6. lib/plugin-gate.md:54-55: correct the premise: `diff` fails on a bad name, unknown profile or missing dir (not "no project root": find_root returns rc 0); on any non-zero exit print "turns off: unknown" and continue.
R7. lib/plugin-gate.md: keep `-C "<PROJECT_ROOT>"` and its argument on one line in every template (no line break right after `-C`), so the one-line lock catches an unquoted root.
R8. USAGE.md :551 Example 3: drop the OPTIONAL line that suggests packs `full` already turns on (target full = KEEP).
R9. agents/plugin-advisor.md:165-166: remove the double blank line.
## Tests
T2. lib/tests/session-banner.test.sh SB10: `gone agents/plugin-advisor.md 'SET : full'` = 1; `gone USAGE.md 'le gate liste ce que le profil coupe'` = 1; `has` lib/plugin-gate.md `$HOME/.claude/lib/profiles/` = 1; `gone lib/plugin-gate.md -- '-C *$'` = 1 (no `-C` at line end). Keep every existing lock green.
## Logged, not fixed (orchestrator → BUGS-FOUND)
- worktree: gate compares `--show-toplevel` but profile.sh writes at the parent of `--git-common-dir`; in a linked worktree the confirmed path and the written path differ (same repo).
- `"<PROJECT_ROOT>"` double quotes still expand `$(…)`; value comes from the main loop.
@@ -0,0 +1,23 @@
# RUN B — security round 1 (GATE 2 BLOCK(1) after GATE 1 CONFORME), 2026-11-11
Apply on top of the current working tree (RUN B rounds 1-3 in place, uncommitted). Binding: plan r3, round-2 and round-3 gap lists, contract CLARIFICATIONS.
## BLOCKING (HIGH) — must close
B1. skills/onboard/SKILL.md:254 (consent prompt :257 "yes install now"): the install action must not depend on the working directory and must never run `make plugin` / install-plugins.sh (/onboard runs inside a foreign repo: a bare `make plugin` runs that repo's Makefile, or install-plugins.sh with its sudo / curl|sh paths). Replace with the one cwd-independent command `npm install -g ctx7` (what install-plugins.sh STEP 6 runs), and add on the next line, as text the user may run themselves: "version épinglée et find-docs : `make plugin` depuis le dépôt claude-config". The "yes install now" answer runs only `npm install -g ctx7`.
B1b. agents/plugin-advisor.md context7 WARN (~:281, ~:289 "Fix: `make plugin`"): same wording: fix = `npm install -g ctx7`; `make plugin` named only as "from the claude-config repo".
## MEDIUM — close in the same round
M1. lib/plugin-gate.md token check: a SET profile token is accepted only from the advisor's own set {web, seo, dev, design, qa, audit, minimal} (no `full`: target full is KEEP; no `max`: it turns higgsfield, extras and pr-review-toolkit on; no user-added profile from an advisor token). A profile outside that set is printed as rejected.
M2. lib/plugin-gate.md step 4: for a SET print both the `→ off` lines ("turns off") and the `→ on` lines ("turns on") of `profile.sh diff`.
## Citer left behind (verifier N1, BDR-100)
C2. skills/plugin-check/SKILL.md:14-17: "show the advisor's exact commands" → the main loop shows the commands it builds from the gate's step-5 templates (`set` / `enable` / `disable`, with `-C "<PROJECT_ROOT>"`), after the gate's token check; the user runs them. Only those lines.
## Advisor consistency (verifier N2)
N2. agents/plugin-advisor.md PHASE 2.5 (~:79-84): tiers decide tool depth only (ctx7, gstack-browser for browser-QA, gsd, graphify rule); they name no profile. Profile choice lives only in the WRITING table, signals only in the RULES (as :145 states). Remove "profile `minimal` (or `dev`…)" and "current profile" from the tiers; drop examples that contradict the WRITING table (site vitrine / landing page → web).
## Style (verifier N4)
S4. lib/tests/session-banner.test.sh:160 and :173 back under 80 chars (split the pattern string the way neighbouring checks do). USAGE.md:237 arrow aligned with its block; USAGE.md:419 the ui-ux-pro-max OPTIONAL on its own `→ OPTIONAL:` line. lib/plugin-gate.md:92 `<root>` → `<PROJECT_ROOT>`.
## Tests
T3. SB10: `gone skills/onboard/SKILL.md 'make plugin`? *\(installe'` = 1 (the old cwd-dependent install line gone); `has` lib/plugin-gate.md 'turns on' = 1; `gone lib/plugin-gate.md 'higgsfield,'`… keep existing; `has` lib/plugin-gate.md the accepted SET set line (e.g. 'web, seo, dev, design, qa, audit, minimal') = 1; `gone skills/plugin-check/SKILL.md "advisor's exact commands"` = 1. All lines ≤ 80 chars.
+3
View File
@@ -64,12 +64,15 @@ Format follows [Keep a Changelog](https://keepachangelog.com/) and this project
- gitflow pre-commit (`lib/gitflow.sh`, generated `githooks/pre-commit` and per-repo `.githooks/pre-commit`) exempts on `main`/`develop` only staged paths under `.claude/memory/`, `.claude/tasks/`, `.claude/audits/`, `.claude/deploy/` and `.githooks/`, was all of `.claude/**`. A commit touching `.claude/rules/`, `.claude/settings.json`, agents or skills on a protected base is now blocked: branch first. Staged paths are listed with `--no-renames`, so a `git mv` from a blocked path into the allowlist is blocked too. Per-repo hooks pick it up at the next session start, the global ones at `make link`. Tests: `lib/gitflow-test.sh` T21d-T21h.
- `settings.json` gains `skillOverrides` setting the claude.ai-synced skills to `"off"`, global so a plain `claude` gets it too. Listed by name: a skill synced later stays listed until its name is added, and a same-named skill elsewhere is hidden too. A project re-enables one with `{"skillOverrides": {"<name>": "on"}}` in its `.claude/settings.local.json`. The reason is listing cost: every synced skill is listed in every session's context. Measured headless on the full profile on 2026-11-09, CLI 2.1.319: Skills 16.2k to 12.5k, total 32.2k to 28.5k. The listing budget is unchanged (40000 and 50000 give the same listing once the synced skills are off). `syncClaudeAiSkills: false` is not used: it moves the synced skills to `~/.claude/skills/.trash/`. Check `claude --version` on another machine before pulling.
- Profiles deny no claude.ai connector: the two higgsfield connectors were removed from the claude.ai account on 2026-11-09, so `deniedMcpServers` leaves `audit`, `dev`, `minimal`, `qa` and `seo`, and the pack census drops its connector rule. A project that ran `profile.sh set` with one of those five profiles before this change keeps the two entries in its `.claude/settings.local.json`, and no profile verb strips them any more: harmless while the connectors stay removed, delete them by hand before reconnecting either one. Reconnecting them for good: revert the merge of `chore/connector-deny-cleanup` into develop (`git revert -m 1 <merge>`), which restores the denies, their census rule and the docs.
- The plugin advisor speaks packs and profiles and emits tokens only; the plugin gate checks them against closed lists, shows what a profile set turns off and on, and applies at the git root only. A profile set is proposed only on a project without a profile; a hotfix request never changes the profile.
- The banner's OFF row disappears when every toggle is on; /onboard's ctx7 offer runs `npm install -g ctx7` only.
### Removed
- `rules/default-language.md`: its content is `lib/architecture-defaults.md` § Default language.
- The five `effort-low` … `effort-max` skills, `lib/effort-pins.txt`, `lib/effort-pins.sh` and `lib/model-check.sh`, with their tests and the effort-pin re-apply steps of `install-plugins.sh` and `update-all.sh`. The model-router rows replace them. A typed `/effort-<level>` no longer exists: use `ultrathink` or `/route effort=max`. Breaking: the next release is 3.0.0.
- `skills-disabled/`, `lib/toggle-external.sh`, `.profile`, `.active-profile` and `make profile-reset`. `profile.sh enable higgsfield` replaces `toggle-external.sh`. Machine steps: MIGRATION.md, "Profiles and packs".
- The session banner's 💰 passive-cost row and its per-plan budget (Pro 11000, Max 20000 tokens), with the hand-copied per-plugin constants behind it (gstack 2750, ui-ux-pro-max 400, graphify 300, context7 200, plugin-dev 100) and `detect_plan` in `lib/detect-plugins.sh`, left without a caller. The constants went stale at the 2026-09-28 skill-catalog prune, which fixed only `doctor.sh`. `make doctor` is now the one place that measures the passive cost: the plugin advisor's `COST ESTIMATE` and the `/status` `Plugins ON:` line point to it and quote no per-plugin figure. `lib/tests/detect-plan.test.sh` becomes `lib/tests/hook-recursion-guard.test.sh` (the BLK-043 re-entry guard).
- plugin-dev from the banner and the advisor (dropped 2026-07-02), with `detect_plugin_dev`; the advisor's PLAN input and plan-budget WARN.
### Fixed
- `/guardrails` and the interviewer cite the secure-by-default, Supabase, cloud-function and a11y rules by their absolute `~/.claude/rules/<name>.md` path; run from a project repo, the bare `rules/<name>.md` path resolved against that project and missed the rule files.
+1 -1
View File
@@ -244,7 +244,7 @@ a different package, ships its own conflicting `graphify` bin) — see
| `/release-candidate` | Cut a versioned release — finalize version.txt + CHANGELOG, merge develop→main, tag, push (auto-push mode, tag on your go; manual push mode: one `! git push --atomic` command you run) |
| `/deploy` | Compose the deploy checklist from a project's committed runbook (delta only); you run it, the skill resumes cold on your report |
| `/graphify` | Codebase knowledge graph — navigation for large-scope tasks |
| `/plugin-check` | Check active plugins vs project needs — recommend enable/disable |
| `/plugin-check` | Check packs and plugins vs project needs: recommend a profile (project without one) and enable/disable deltas |
| `/health` | Code quality dashboard (gstack) — setup diagnostic is `make doctor` |
| `/status` | Consolidated project snapshot — plugins, git, GSD milestone |
| `/skills-perso` | List personal (user-created) skills |
+41 -40
View File
@@ -178,8 +178,8 @@ Tu veux...
> Cette table couvre les skills personnels principaux. `/seo` et `/geo` (pack-seo)
> et `/web-validate` (pack-web-validate) vivent dans des packs : un profil qui laisse
> le pack éteint les masque (`/profile current`). Les plugins (gstack,
> pr-review-toolkit…) et marketplaces externes en ajoutent beaucoup d'autres ;
> le pack éteint les masque (`/profile current`). Les packs gstack-dev,
> gstack-browser et gstack-design, les plugins (pr-review-toolkit…) et marketplaces externes en ajoutent beaucoup d'autres ;
> `/skills-perso` liste tes skills personnels.
---
@@ -226,18 +226,18 @@ Le mod `mods/memory/` note les échecs Bash et les jalons de la session pour que
## Les plugins — décision rapide
```
Toujours actifs (0 token) : security-guidance, rtk
Toujours actifs : security-guidance, rtk
Design élaboré/system → ui-ux-pro-max ON
Deploy + QA browser → gstack ON
Next.js/React/Prisma → context7 ON (WARN si absent, pas BLOCK)
Multi-session (>1 jour) → gsd v2 CLI (gsd dans terminal)
Design élaboré/system → pack design + ui-ux-pro-max@ui-ux-pro-max-skill
Deploy + QA browser → packs gstack-dev + gstack-browser
Next.js/React/Prisma → CLI ctx7 installé (WARN si absent, pas BLOCK)
Multi-session (>1 jour) → gsd CLI (gsd dans terminal)
Backend/CLI seulement → tout OFF (skills superpowers vendorisés, toujours actifs, 0 t passif)
Hotfix/quick fix → tout OFF (skills superpowers vendorisés, toujours actifs, 0 t passif)
Backend/CLI seulement → profil dev (skills superpowers vendorisés, toujours actifs)
Hotfix / script rapide → aucun changement de profil (/hotfix ou /bugfix)
```
**GSD v2** n'est pas un plugin Claude Code — c'est un CLI externe. Il ne consomme pas de tokens passifs. Tu le lances dans un terminal séparé avec `gsd`, puis `/gsd auto` pour le mode autonome.
**GSD** est un CLI externe, rien ne se charge dans Claude Code. Tu le lances dans un terminal séparé avec `gsd`, puis `/gsd auto` pour le mode autonome.
**Profils et packs.** Un profil se règle par projet (`/profile set web` puis `/reload-plugins`) ou par conversation (`cc <nom> web`, la conversation est figée: relance-la pour changer). Neuf profils: `full`, `max`, `minimal`, `dev`, `design`, `web`, `seo`, `qa`, `audit`. Sans profil, c'est `full`. Un `--settings` édité en cours de session reste sans effet. `cc` est une fonction de `lib/cc.sh`, à sourcer depuis `~/.bashrc` (`[ -f "$HOME/.claude/lib/cc.sh" ] && . "$HOME/.claude/lib/cc.sh"`) ; `make doctor` le signale tant qu'elle manque.
@@ -323,7 +323,7 @@ cd mon-projet-existant/
| 5 | Analyze read-only (analyzer agent) | .onboard-audit/analyze.md |
| 6 | Audits parallèles selon archétype : | .onboard-audit/*.md (9 fichiers max) |
| | — dette tech (general-purpose, audit read-only) |
| | — sécurité (cso si gstack ON, sinon OWASP fallback) |
| | — sécurité (cso si le pack gstack-dev est actif, sinon OWASP fallback) |
| | — docs drift (doc-syncer) |
| | — SEO + GEO (si public) |
| | — design UI/UX (si frontend) |
@@ -414,8 +414,10 @@ Ajouter un archétype : créer `~/.claude/lib/project-archetypes/<name>.md` (voi
/plugin-check "App mobile React Native Expo liste de courses, offline-first, SQLite, notifications push"
→ SIGNALS: frontend (mobile), fast-libs (Expo SDK)
→ WARN: context7 si Expo SDK 51+ utilisé (fast-libs)
→ OFF: gstack (mobile, pas de browser QA), ui-ux-pro-max (optionnel)
→ WARN: ctx7 CLI si Expo SDK 51+ utilisé (fast-libs)
→ ↻ SET: dev (mobile)
→ ⚡ ENABLE: pack design (frontend mobile, delta sur le profil dev)
→ OPTIONAL: ui-ux-pro-max@ui-ux-pro-max-skill
→ BLOCKING: none
```
@@ -491,9 +493,9 @@ gsd
/plugin-check "Site vitrine Next.js 14 studio photo, design élaboré, animations Framer Motion, galerie, dark mode, SEO"
→ SIGNALS: frontend, design-system, fast-libs(Next.js)
→ ENABLE: ui-ux-pro-max (~400t) — "design élaboré" signal fort
→ WARN: context7 non configuré → taper "force" pour continuer (ou configurer avant)
→ OFF: gstack (vitrine statique, pas de deploy complexe)
→ ↻ SET: web (site public)
→ KEEP: pack design + ui-ux-pro-max@ui-ux-pro-max-skill — "design élaboré" signal fort
→ WARN: ctx7 non configuré → taper "force" pour continuer (ou configurer avant)
→ COST: ~1600t passif (comfortable)
```
@@ -544,10 +546,9 @@ Sans ui-ux-pro-max : "Tailwind avec palette neutre, Inter". La différence est v
/plugin-check "Jeu de puzzle web React + FastAPI + PostgreSQL. Auth JWT, collection de cartes, boutique in-app, leaderboard. Multi-session, dev sur plusieurs semaines."
→ SIGNALS: frontend, fast-libs(React), deploy, multi-session
→ ENABLE: context7
→ ENABLE: ui-ux-pro-max (cartes visuelles, cohérence design)
→ CLI: gsd v2 RECOMMANDÉ (multi-session détecté)
→ OPTIONAL: gstack si deploy CI + browser QA prévus
→ KEEP: ctx7 CLI installé (find-docs, fast-libs React)
→ KEEP: pack design + ui-ux-pro-max@ui-ux-pro-max-skill (cartes visuelles, cohérence design)
→ CLI: gsd RECOMMANDÉ (multi-session détecté)
→ COST: ~1800t passif (avec context7)
```
@@ -644,8 +645,8 @@ ONBOARD COMPLETE: mycli
/plugin-check "Rust CLI, pas de frontend, pas de deploy"
→ SIGNALS: none (CLI pur)
→ DISABLE: ui-ux-pro-max, gstack, context7
→ (skills superpowers vendorisés, toujours actifs, 0 t passif)
→ ↻ SET: dev
→ (skills superpowers vendorisés, toujours actifs)
→ COST: ~800t (minimal)
→ ACTION REQUIRED? NO
```
@@ -701,18 +702,18 @@ DO NOT TOUCH:
**Contexte :** outil en ligne de commande, pas de frontend, pas de serveur, pas de Docker. Le cas le plus simple — illustre que le système fonctionne aussi bien sur les projets petits que complexes.
**Setup plugins — zéro token inutile :**
**Setup plugins — seulement ce que le projet demande :**
```
/plugin-check "CLI Rust, convertisseur de fichiers JSON/CSV/TOML, pas de réseau, pas de frontend"
→ SIGNALS: none (CLI pur, pas de deploy, pas de frontend)
→ (skills superpowers vendorisés, toujours actifs, 0 t passif)
→ DISABLE: ui-ux-pro-max, gstack, context7
→ (skills superpowers vendorisés, toujours actifs)
→ ↻ SET: dev
→ COST: ~800t (base seulement)
→ ACTION REQUIRED? NO
```
L'intérêt ici est de voir que `/plugin-check` est aussi utile pour confirmer qu'on n'a **rien** à activer, évitant de polluer le contexte avec 3000t de plugins inutiles.
L'intérêt ici est de voir que `/plugin-check` est aussi utile pour confirmer qu'on n'a **rien** à activer, évitant de polluer le contexte avec des packs inutiles.
**Prompt init (complet, pas de questions) :**
```
@@ -807,7 +808,7 @@ Simple à valider. L'architecture proposée est plate, pas de surprise.
**Contexte :** module `services/payment_service.py` dans un projet FastAPI existant. Écrit il y a 2 ans, jamais refactorisé. Violations connues : fonctions de 80 lignes, global state, pas de tests unitaires, logique métier mélangée avec appels HTTP.
**Setup :** projet déjà onboardé (CLAUDE.md présent), skills superpowers vendorisés (toujours actifs, 0 t passif), plugins inutiles désactivés.
**Setup :** projet déjà onboardé (CLAUDE.md présent), skills superpowers vendorisés (toujours actifs), packs inutiles désactivés.
#### Étape 1 — Analyse avant toute modification
@@ -920,7 +921,7 @@ PROJECT STATUS
CONFIG
Version : v2.5.0
Plugins ON: context7 (~200t), skills superpowers vendorisés (toujours actifs, 0 t passif)
Plugins ON: ctx7 CLI, skills superpowers vendorisés (toujours actifs)
GSD v2 : installed (3.0.0)
PROJECT
@@ -1018,9 +1019,9 @@ SIGNALS: simple, CLI/embedded
COST: ~0t (skills superpowers vendorisés, toujours actifs, 0 t passif)
RECOMMENDATIONS:
DISABLE : ui-ux-pro-max, gstack, context7
SET : minimal (embedded : tous les packs éteints)
NOTE : skills superpowers (brainstorming, writing-plans...) restent
disponibles par nom bare sans coût passif, même pour un
disponibles par nom bare, même pour un
firmware minimal.
```
@@ -1028,7 +1029,7 @@ RECOMMENDATIONS:
```
# Pas de /init-project, pas de GSD ; skills superpowers vendorisés
# (toujours actifs, 0 t passif) mais non invoqués ici
# (toujours actifs) mais non invoqués ici
# 1. Comprendre avant de modifier
/analyze src/drivers/uart.c
@@ -1052,7 +1053,7 @@ OUTPUT:
/ship-feature "Corriger l'accès non-atomique au ring_buffer_head dans l'ISR"
STEP 0b — CLAUDE.md found
STEP 0 — plugin check: skills superpowers vendorisés (toujours actifs, 0 t passif)
STEP 0 — plugin check: skills superpowers vendorisés (toujours actifs)
STEP 1 — BRAINSTORM (rapide, contexte déjà clair depuis /analyze):
Design: protéger ring_buffer_head avec __disable_irq()/__enable_irq()
@@ -1075,7 +1076,7 @@ STEP 4 — IMPLEMENT (subagents légers, modifications chirurgicales)
```
**Points clés :**
- `/plugin-check` confirme qu'aucun plugin inutile n'est actif (skills superpowers vendorisés, toujours actifs, 0 t passif).
- `/plugin-check` confirme qu'aucun pack inutile n'est actif (skills superpowers vendorisés, toujours actifs).
- `/analyze` est particulièrement utile sur du code C bas-niveau : l'analyzer identifie les accès non-atomiques, les race conditions, les violations de normes, **sans proposer de fix**.
- Pour un firmware, le workflow `analyze → ship-feature` peut se réduire à `analyze → edit direct` si la modification est triviale.
- GSD v2 n'est jamais pertinent pour du firmware : les sessions sont courtes et les tâches atomiques.
@@ -1087,11 +1088,11 @@ STEP 4 — IMPLEMENT (subagents légers, modifications chirurgicales)
Description contient... → Plugin
─────────────────────────────────────────────────────
Next.js 13+ / App Router → context7 WARN
Prisma / Supabase → context7 ON
"design élaboré" / tokens → ui-ux-pro-max ON
Docker + QA browser → gstack ON
"plusieurs semaines" → gsd v2 CLI
Rust / Python / Go / C → tout OFF (skills superpowers vendorisés, 0t)
Mobile / Flutter / RN → gstack OFF
Hotfix / script rapide → tout OFF (skills superpowers vendorisés, 0t)
Prisma / Supabase → ctx7 installé
"design élaboré" / tokens → pack design + ui-ux-pro-max@ui-ux-pro-max-skill
Docker + QA browser → packs gstack-dev + gstack-browser
"plusieurs semaines" → gsd CLI
Rust / Python / Go / C → profil dev (skills superpowers vendorisés)
Mobile / Flutter / RN → packs gstack-browser + gstack-design off
Hotfix / script rapide → aucun changement de profil (/hotfix ou /bugfix)
```
+85 -116
View File
@@ -37,11 +37,6 @@ CLIs from `CLIS`. `PLUGINS` alone is installed state, never per-project.
supabase/@supabase/supabase-js, drizzle-orm, expo. Never re-scan the
manifest to make this split.
`REQUEST` MAY carry `PLAN: Max|Pro|Free` from the dispatcher. Echo it in
the output. Absent → output `PLAN: unknown (not provided)` and SKIP the
plan-budget WARN (absolute COST ESTIMATE still reported). Never assume a
plan.
---
## PHASE 2 — ANALYZE
@@ -60,7 +55,6 @@ Detect signals from REQUEST + the PROBE REPORT fields:
| `fast-libs` | Next.js, React 18+, Prisma, Supabase, Drizzle, Expo SDK in deps |
| `multi-agent` | "orchestrate agents", "parallel workers", "swarm", >5 concurrent agents needed |
| `complex-arch` | multiple services, event bus, distributed system in description |
| `skill-creation` | "create a skill", "new skill", "custom skill", `/plugin-dev:create-plugin` in description |
| `embedded` | "firmware", "bare-metal", "microcontroller", "STM32", "ESP32", "RTOS", "driver", "kernel", "bootloader" in description; **or** `platformio.ini` present; **or** linker script (`*.ld`, `*.lds`) present; **or** `Makefile` + `src/*.c` + no `package.json`/`Cargo.toml`/`go.mod`/`setup.py`/`pyproject.toml` (C project without standard ecosystems). Note: `.c` files with a Rust/Node/Go manifest = FFI binding, NOT embedded. |
| `simple` | single file, hotfix, quick script, no frontend, no deploy |
| `anim-lib-eligible` | PROBE REPORT `ANIM` field: `eligibility=eligible|…` (React/Vue/Svelte stack) |
@@ -82,11 +76,11 @@ Factors (weighted):
| Infra/deploy | 15% | Local only | Single deploy target | Multi-env, CI/CD, containers, monitoring |
**Score thresholds:**
- **0-30% (simple)**: superpowers skills only (vendored, always on). No gstack, no gsd, no ctx7, no graphify.
_Examples: site vitrine, landing page, script CLI, simple CRUD._
- **30-60% (moderate)**: + context7 if fast-libs. graphify only once the codebase passes 200 tracked code files (session-start banner informs, the user decides — BDR-097), never at scaffold.
- **0-30% (simple)**: superpowers skills always on (vendored). No gsd, no ctx7, no graphify.
_Examples: script CLI, simple CRUD._
- **30-60% (moderate)**: ctx7 CLI if fast-libs. graphify only once the codebase passes 200 tracked code files (session-start banner informs, the user decides — BDR-097), never at scaffold.
_Examples: blog with auth, dashboard with charts, API with validation._
- **60-85% (complex)**: + gstack if browser-QA, + gsd if multi-session. graphify: same 200-file rule, likely reached — say so, do not pre-enable.
- **60-85% (complex)**: + pack gstack-browser if browser-QA, + gsd CLI if multi-session. graphify: same 200-file rule, likely reached — say so, do not pre-enable.
_Examples: SaaS with billing, game with social features, e-commerce._
- **85-100% (enterprise)**: all tools justified.
_Examples: multi-service platform, real-time collab app, marketplace._
@@ -99,19 +93,19 @@ Output: `COMPLEXITY: <score>% — <label>` with one-line justification.
```
PLUGIN CHECK
ACTIVE: [plugin — status, one line each]
PROFILE: [active skill profile — name + match%, or "<name> (default — not applied yet …)"]
ACTIVE: [pack, plugin id or CLI — status, one line each]
PROFILE: <profile> (source=<local|flag|default>)
SIGNALS: [detected signals]
COMPLEXITY: <score>% — <simple|moderate|complex|enterprise>
PLAN: <Max|Pro|Free (echoed from REQUEST) | unknown (not provided)> (budget: ~<N>t | n/a)
COST ESTIMATE: run make doctor (measured; no per-plugin constants here)
RECOMMENDATIONS:
✅ KEEP : [plugin] — [reason]
⚡ ENABLE : [plugin] — [reason] — [install/enable cmd]
⚠️ DISABLE : [plugin] — [token cost saved, not needed here]
ℹ️ OPTIONAL: [plugin] — [marginal benefit, low priority]
🖥️ CLI : [gsd v2] — [run 'gsd' in terminal if multi-session]
↻ SET : <profile> — [reason]
✅ KEEP : [pack or plugin] — [reason]
⚡ ENABLE : [pack or plugin] — [reason] — enable <pack | full plugin id>
⚠️ DISABLE : [pack or plugin] — [reason] — disable <pack | full plugin id>
ℹ️ OPTIONAL: [pack or plugin] — [marginal benefit, low priority]
🖥️ CLI : [gsd] — [run 'gsd' in terminal if multi-session]
ANIMATION LIB:
✅ <lib> installed (anim-lib-installed)
@@ -123,36 +117,35 @@ BLOCKING: [issues] or none
ACTION REQUIRED? YES / NO
```
`↻ SET` is emitted ONLY when `source=default` AND `profile=full` AND the
target profile differs from `full` (target = `full` → `✅ KEEP`, no SET). It
names the profile only: the gate prints what the profile turns off. With a
SET line, every ENABLE / DISABLE is a delta against the TARGET profile (a
pack the target turns off but the project needs = ENABLE). `⚠️ DISABLE` comes
only from project-level probe signals (manifests, deps, file counts), never
from REQUEST-only signals (simple, hotfix, "this task"). Under `source=flag`
no profile.sh command at all: only `relaunch: cc <name> <profile>` when a
needed pack is off.
> ANIMATION LIB is **read-only** in this report. The advisor never installs
> packages itself — it just states the status. Installation happens in
> `/init-project` STEP 5e (auto) or `/onboard` STEP 2.5 (opt-in).
> **Apply, confirmation, and rollback are the DISPATCHER'S job** —
> **Apply and confirmation are the DISPATCHER'S job** —
> `lib/plugin-gate.md` steps 4-5 (main loop: present, ACTION-REQUIRED stop,
> PROPOSED-CHANGES confirmation, toggle + rollback). This agent only
> recommends and emits the EXACT toggle commands. It never applies, never
> asks the user (it cannot — it is dispatched).
> PROPOSED-CHANGES confirmation, profile.sh writes, atomic). This agent only
> recommends and emits the token to apply (profile, pack or full plugin id);
> the gate builds the profile.sh command from a fixed template. It never
> applies, never asks the user (it cannot — it is dispatched).
---
## DECISION TABLE
## SIGNAL → RECOMMENDATION
| Signal | Enable / Use | Disable / Skip | Notes |
|---|---|---|---|
| `frontend` | impeccable, ui-ux-pro-max, design-motion-principles | — | UI design + polish + motion. design-motion-principles = motion/animation, impeccable = the Build path: /impeccable verbs + deterministic detector (`npx impeccable detect`, 61 rules) — all external, symlinked |
| `mobile` (React Native/Expo/Flutter) | — | gstack (no browser QA), Docker N/A | ui-ux-pro-max optional |
| `monorepo` | per-package plugin recommendations | avoid recommending gstack for whole repo if only one package has browser QA | Specify which plugin applies to which package |
| `design-system` | impeccable, ui-ux-pro-max, design-motion-principles | — | Design tokens, theme, Storybook, motion; impeccable init persists the design context (DESIGN.md/PRODUCT.md) |
| `deploy` + `browser-qa` | gstack | — | Full-product workflow |
| `multi-session` | gsd v2 CLI | — | Run `gsd` in terminal, not CC plugin |
| `fast-libs` | context7 | — | Doc freshness critical |
| `multi-agent` + `complex-arch` | gsd v2 CLI | — | GSD v2 preferred for multi-session coordination |
| `simple` / single-session | — | gsd, gstack, ui-ux-pro-max | Saves passive tokens |
| `embedded` / firmware | — | all toggles (superpowers skills vendored, always on) | workflow: /analyze → /hotfix or /bugfix or /ship-feature |
| backend/lib/CLI only | — | ui-ux-pro-max, gstack | passive tokens saved |
| small project / hotfix | — | gstack, gsd | Use /hotfix, /bugfix, or /feat |
The Conditional RULES below are the only source: each signal maps to packs,
a profile, a managed plugin or a CLI.
**GSD v2 note:** `gsd-pi` is a standalone CLI (Pi SDK), not a Claude Code plugin. Zero passive token cost in CC sessions. Recommend when: feature > 1 day, multiple isolated context windows needed, crash recovery, cost tracking, or parallel workers. Usage: `gsd` in terminal → `/gsd auto`.
**GSD note:** `gsd-pi` is a standalone CLI (Pi SDK), not a Claude Code plugin: external CLI, nothing loads in Claude Code. Recommend when: feature > 1 day, multiple isolated context windows needed, crash recovery, cost tracking, or parallel workers. Usage: `gsd` in terminal → `/gsd auto`.
### Skill routing by task size
@@ -178,99 +171,69 @@ When the plugin-advisor detects a `simple` or `hotfix` signal, suggest the appro
| Pair | Relation | Verdict |
|---|---|---|
| gstack ↔ gsd v2 | ✅ Complementary | GStack = full-product CC workflow. GSD v2 = multi-session CLI. Different scopes, no conflict. |
| superpowers ↔ gsd v2 | ✅ Complementary | superpowers skills (vendored) = single-session execution. GSD v2 = multi-session CLI orchestration. No conflict. |
| superpowers ↔ gstack | ✅ Complementary | Used together in /init-project and /ship-feature. superpowers skills (vendored) = engine, GStack = full-product skills. |
| gstack packs ↔ gsd | ✅ Complementary | gstack packs = full-product CC workflow. GSD = multi-session CLI. Different scopes, no conflict. |
| superpowers ↔ gsd | ✅ Complementary | superpowers skills (vendored) = single-session execution. GSD = multi-session CLI orchestration. No conflict. |
| superpowers ↔ gstack packs | ✅ Complementary | Used together in /init-project and /ship-feature. superpowers skills (vendored) = engine, gstack packs = full-product skills. |
| context7 ↔ any | ✅ Independent | Doc lookup CLI (ctx7), no workflow overlap. Always safe to combine. |
| plugin-dev ↔ superpowers | ⚠️ Minor overlap | superpowers skills (vendored) can create skills too (writing-skills). Keep plugin-dev only when actively building new plugins. |
| ui-ux-pro-max ↔ gstack | ✅ Complementary | GStack = deploy/QA layer; ui-ux-pro-max = UI quality layer. Different concerns. |
| ui-ux-pro-max ↔ gstack packs | ✅ Complementary | gstack packs = deploy/QA layer; ui-ux-pro-max = UI quality layer. Different concerns. |
| pr-review-toolkit ↔ superpowers | ✅ Complementary | `requesting-code-review` (vendored superpowers skill) and /pr-review-toolkit:review-pr cover different review styles. |
| rtk ↔ any | ✅ Independent | Hook-only token compression. Zero interaction with any plugin. |
| security-guidance ↔ any | ✅ Independent | Hooks + out-of-band LLM reviews (agentic review on commit/push; Stop diff review disabled by ENABLE_STOP_REVIEW=0). No context injection unless a regex hits. |
### Recommended sets by project type
| Project type | Plugins ON | OFF |
|---|---|---|
| Backend API / microservice | (superpowers skills always on), context7 (if fast libs) | ui-ux-pro-max, gstack |
| Frontend SPA / SSR | (superpowers skills always on), ui-ux-pro-max, impeccable, design-motion-principles, context7 | gstack |
| Full-stack SaaS | (superpowers skills always on), gstack, ui-ux-pro-max, impeccable, design-motion-principles, context7 | — |
| CLI tool / library | (superpowers skills always on) | all toggles |
| Multi-session large feature | (superpowers skills always on) + gsd v2 CLI (external) | — |
| Quick fix / hotfix | (superpowers skills always on) | all toggles |
| Design system / component lib | (superpowers skills always on), ui-ux-pro-max, impeccable, design-motion-principles | gstack, gsd |
| Fast-evolving libs (Next.js etc.) | (superpowers skills always on), context7 | — |
| Enterprise multi-agent orchestration | (superpowers skills always on) + gsd v2 (external) | plugin-dev |
> rtk is always on at 0 context tokens; security-guidance is always on and
> costs quota out of band (LLM reviews), not context — both omitted from
> the estimates
### Conditional rules
```
RULE: IF "mobile" signal (React Native/Expo/Flutter detected):
→ gstack OFF — no browser QA on mobile
→ packs gstack-browser + gstack-design off — no browser QA on mobile
→ Docker NOT relevant — no server-side containerization for mobile
→ ui-ux-pro-max OPTIONAL — only if design system complexity is high
→ ui-ux-pro-max@ui-ux-pro-max-skill OPTIONAL — only if design system complexity is high
RULE: IF "monorepo" signal detected:
→ scan each top-level package individually for frontend/deploy/fast-libs signals
→ recommend plugins per-package, NOT for the whole repo
→ if only apps/api/ has deploy: gstack only if apps/api/ has browser QA too
→ NOTE in output: "Plugin X recommended for apps/web/ — disable for apps/api/"
→ passive cost estimate = highest-cost package profile (other packages add nothing)
→ ONE profile for the whole repo (profile.sh writes at the git root)
→ = the union of the packages' needs (frontend, deploy, fast-libs), plus enable deltas
→ pack gstack-browser only if some package has browser QA
RULE: IF "frontend" signal OR .tsx/.jsx count > 0:
→ ui-ux-pro-max ON if "design-system" signal
→ impeccable ON (external skill, 0t passive — ~/.claude/skills/pack-design/skills/impeccable)
→ design-motion-principles ON if anim-lib-installed or description mentions animation/motion (external, 0t passive)
→ pack design ON (impeccable + design-motion-principles, external skills — ~/.claude/skills/pack-design/skills/impeccable)
→ ui-ux-pro-max@ui-ux-pro-max-skill ON if "design-system" signal
RULE: IF "deploy" AND "browser-qa" signals:
→ gstack ON — full-product workflow
→ packs gstack-dev + gstack-browser ON — full-product workflow
RULE: IF "multi-session" OR multi-day feature:
→ Recommend gsd v2 CLI: npm install -g gsd-pi → gsd → /gsd auto
→ Zero passive CC token cost
→ Recommend gsd CLI: npm install -g gsd-pi → gsd → /gsd auto
→ external CLI, nothing loads in Claude Code
RULE: IF "fast-libs" (Next.js/React 18+/Prisma/Supabase/Drizzle):
→ context7 ON (CLI; its find-docs skill always loads)
→ ctx7 CLI installed (find-docs skill always loads); never ENABLE/DISABLE
RULE: IF "multi-agent" AND "complex-arch":
→ gsd v2 CLI recommended (0t passive, multi-session coordination)
→ gsd CLI recommended (external CLI, nothing loads in Claude Code; multi-session coordination)
RULE: IF "simple" OR "hotfix":
→ Disable all toggles, base only.
→ recommend the lightweight skill only (see Skill routing by task size); a REQUEST-only
signal drives no SET and no DISABLE (both are project-wide, persistent)
RULE: IF "embedded" signal (firmware, bare-metal, microcontroller, or Makefile+C without Node/Rust/Go):
→ Disable ALL toggles including gstack, context7, plugin-dev
→ all packs off (profile `minimal`)
→ superpowers skills stay on (vendored, no toggle): useful for initial
design brainstorm on complex drivers, unnecessary for single-function
patches; just don't invoke them, no disable needed
→ GSD v2 CLI: not recommended (sessions are short, tasks are atomic)
→ GSD CLI: not recommended (sessions are short, tasks are atomic)
→ Recommend workflow: /analyze <file> → /hotfix (patch) or /bugfix (investigation) or /ship-feature (multi-file)
→ NOTE: print "embedded project detected — minimal plugin footprint recommended"
RULE: IF plugin-dev ON AND no `skill-creation` signal detected:
→ WARN: plugin-dev active but no skill-creation signal (saves its passive tokens if disabled)
→ Disable unless you're actively building custom plugins or skills
RULE: IF `skill-creation` signal:
→ plugin-dev ON
→ superpowers skills (vendored, always on): used for skill scaffolding (writing-skills)
RULE: IF `browser-qa` signal (e2e tests, Playwright/Cypress/Puppeteer in deps):
→ gstack ON — browser automation and QA
→ context7 OPTIONAL (depends on framework version)
→ pack gstack-browser ON — browser automation and QA
→ ctx7 CLI OPTIONAL (depends on framework version)
RULE: IF `design-system` signal (tokens, theme files, Storybook present):
→ ui-ux-pro-max ON
→ impeccable ON (external skill, 0t passive)
→ design-motion-principles ON (external skill, 0t passive)
→ WARN if all three OFF with this signal: significant design gap
→ pack design ON (impeccable + design-motion-principles, external skills)
→ ui-ux-pro-max@ui-ux-pro-max-skill ON
→ WARN if pack design and ui-ux-pro-max@ui-ux-pro-max-skill are both off with this signal: significant design gap
RULE: IF `complex-arch` signal (multiple services, event bus, distributed system):
→ gsd v2 CLI recommended for multi-session coordination
→ gsd CLI recommended for multi-session coordination
```
---
@@ -278,29 +241,37 @@ RULE: IF `complex-arch` signal (multiple services, event bus, distributed system
## WRITING A PROFILE OR A PACK
Everything switches through `lib/profile.sh`, per project, never the user
scope. Emit the exact command; never write files directly.
scope. Emit the token only (profile, pack or full plugin id); the gate builds
the command. Never write files directly.
| Signal | Profile | Command |
| Signal | Profile | Emitted line |
|---|---|---|
| public website, no SEO focus | `web` | `bash $HOME/.claude/lib/profile.sh set web` |
| audit-only: SEO + GEO + W3C + WCAG | `seo` | `… set seo` |
| public website end-to-end | `full` | `… set full` |
| backend / API / library | `dev` | `… set dev` |
| heavy UI, no dev | `design` | `… set design` |
| typical dev session | `dev` | `… set dev` |
| browser QA only | `qa` | `… set qa` |
| comprehensive audit | `audit` | `… set audit` |
| narrow session | `minimal` | `… set minimal` |
| one pack on top | — | `bash $HOME/.claude/lib/profile.sh enable <pack>` |
| public website, no SEO focus | `web` | `↻ SET : web` |
| audit-only: SEO + GEO + W3C + WCAG | `seo` | `↻ SET : seo` |
| public website end-to-end | `full` | `✅ KEEP` (no SET) |
| backend / API / CLI / library, typical dev session (+ ctx7 if fast libs) | `dev` | `↻ SET : dev` |
| frontend SPA / SSR, heavy UI, design system | `design` | `↻ SET : design` |
| full-stack SaaS | `full` | `✅ KEEP` (no SET) |
| browser QA only | `qa` | `↻ SET : qa` |
| comprehensive audit | `audit` | `↻ SET : audit` |
| narrow session (project-level) | `minimal` | `↻ SET : minimal` |
| multi-session / enterprise | current profile, or `dev` + gsd CLI | `↻ SET : dev` |
| one pack on top | — | `⚡ ENABLE : … — enable <pack or full plugin id>` |
| one pack off | — | `⚠️ DISABLE : … — disable <pack or full plugin id>` |
`<pack>` is one of design, scroll3d, seo, web-validate, gstack-dev,
gstack-browser, gstack-design, higgsfield, extras.
gstack-browser, gstack-design, higgsfield, extras. Managed plugins take
their full id, never the bare name: `ui-ux-pro-max@ui-ux-pro-max-skill`,
`pr-review-toolkit@claude-code-plugins`.
Read `PROFILE :` first: when it says `source=flag`, a pack it turns off
cannot be enabled in this conversation; recommend `relaunch: cc <name>
<profile>` instead of an `enable`. No profile = `full` (manifest defaults);
`unset` returns to it. Every write needs `/reload-plugins` to load the
packs; connectors and model apply to the next session.
Read `PROFILE :` first. `set` only when `source=default` AND `profile=full`
(no project profile yet); any other state gets per-pack enable / disable
deltas. `source=default` with another profile name = pack keys from shared
or user scope: deltas only. Under `source=flag` a pack it turns off cannot
be enabled in this conversation: recommend `relaunch: cc <name> <profile>`
instead of any ENABLE / DISABLE / SET line. No profile = `full` (manifest
defaults); `unset` returns to it. Every write needs `/reload-plugins` to
load the packs; connectors and model apply to the next session.
`higgsfield`: never recommended from project signals. It drives a paid
generation service; explicit user ask only (CLAUDE.md "Skill routing").
@@ -308,16 +279,14 @@ generation service; explicit user ask only (CLAUDE.md "Skill routing").
## BLOCK if
- Superpowers skills missing → `make plugin` (vendors them) then `make link`
- Full-product (UI+deploy+QA) + gstack not installed
## WARN (no block)
- Active toggle plugins not needed for this task (dead passive cost)
- Active packs no project signal needs
- Multi-session feature + `gsd` CLI not installed → `npm install -g gsd-pi`
- Total passive cost > 50% of plan budget (Pro: ~5500t, Max: ~10000t, Free: ~2500t) — only when PLAN was provided; PLAN unknown → skip this WARN
- **Next.js/React 18+/Prisma/Supabase detected + context7 not configured**
→ Risk: Claude may generate code using outdated APIs (App Router changes frequently)
→ Fix: `npm install -g ctx7 && ctx7 setup --claude`
→ Fix: `npm install -g ctx7` (`make plugin` from the claude-config repo pins the version and wires find-docs)
→ Or standalone: `ctx7 docs /vercel/next.js "middleware"`
→ Free higher rate limits: `ctx7 login` (OAuth) or API key from context7.com/dashboard
→ Type "force" to proceed without context7 (not recommended for fast-evolving libs)
+9 -40
View File
@@ -103,12 +103,11 @@ export PROFILE_PLAIN
TOGGLE_ACTIVE=()
TOGGLE_INACTIVE=()
for plugin in gstack uiux_pro_max plugin_dev context7 graphifyy; do
for plugin in gstack uiux_pro_max context7 graphifyy; do
# Map function name to display name. graphifyy = the pipx PACKAGE name
# (pypi:graphifyy); the CLI and skill are 'graphify' — display that.
case "$plugin" in
uiux_pro_max) display="ui-ux-pro-max" ;;
plugin_dev) display="plugin-dev" ;;
graphifyy) display="graphify" ;;
*) display="$plugin" ;;
esac
@@ -120,10 +119,6 @@ for plugin in gstack uiux_pro_max plugin_dev context7 graphifyy; do
fi
done
# --- Format output ---
ACTIVE_STR="${TOGGLE_ACTIVE[*]:-none}"
INACTIVE_STR="${TOGGLE_INACTIVE[*]:-none}"
# Profile row: the project's local profile, the conversation's --settings
# one, or none (manifest defaults = full) with the /plugin-check pointer.
_pname="$(sed -n 's/^profile=//p' <<<"$PROFILE_PLAIN" | head -1)"
@@ -170,7 +165,7 @@ echo "┌─ Claude Code config ────────────────
# by the toggle row below are excluded (dual display).
ALWAYS_ON=()
detect_rtk &>/dev/null && ALWAYS_ON+=("rtk")
_toggle_owned=" gstack ui-ux-pro-max plugin-dev context7 graphify "
_toggle_owned=" gstack ui-ux-pro-max context7 graphify "
while IFS= read -r _pl; do
[ -n "$_pl" ] || continue
case "$_toggle_owned" in
@@ -180,9 +175,8 @@ while IFS= read -r _pl; do
done < <(sed 's/@.*//' <<<"$(list_on_plugins)")
unset _toggle_owned _pl
ALWAYS_ON_STR="${ALWAYS_ON[*]:-none}"
# Same 40-char-width split policy as the toggle row below — keeps the
# right border aligned on overflow. Greedy width-fill (not a fixed 3-name
# cut: 3 long names overflowed line 1 and left line 2 empty).
# 40-char width, greedy split: keeps the right border aligned on overflow
# (not a fixed 3-name cut: 3 long names overflowed line 1, line 2 empty).
if [ "${#ALWAYS_ON_STR}" -le 40 ]; then
printf "│ ✅ ON : %-40s│\n" "$ALWAYS_ON_STR"
else
@@ -199,37 +193,12 @@ else
unset _ao_l1 _ao_l2 _ao_e
fi
unset ALWAYS_ON ALWAYS_ON_STR
# Plugin display — all plugins shown, split across 2 lines if >4
_active_count=${#TOGGLE_ACTIVE[@]}
_inactive_count=${#TOGGLE_INACTIVE[@]}
if [ "$_active_count" -eq 0 ]; then
printf "│ 🟢 ON : %-40s│\n" "none"
elif [ "$_active_count" -le 4 ]; then
printf "│ 🟢 ON : %-40s│\n" "$ACTIVE_STR"
else
# Split: first 4 on line 1, rest on continuation line
_line1="${TOGGLE_ACTIVE[0]} ${TOGGLE_ACTIVE[1]} ${TOGGLE_ACTIVE[2]} ${TOGGLE_ACTIVE[3]}"
_rest=("${TOGGLE_ACTIVE[@]:4}")
_line2="${_rest[*]}"
printf "│ 🟢 ON : %-40s│\n" "$_line1"
printf "│ %-40s│\n" "$_line2"
unset _line1 _line2 _rest
# Toggle rows: the four display names (38 chars) must fit the 40-char
# field; a fifth toggle needs a split again. OFF prints only when non-empty.
printf "│ 🟢 ON : %-40s│\n" "${TOGGLE_ACTIVE[*]:-none}"
if [ ${#TOGGLE_INACTIVE[@]} -gt 0 ]; then
printf "│ ⚫ OFF : %-40s│\n" "${TOGGLE_INACTIVE[*]}"
fi
if [ "$_inactive_count" -eq 0 ]; then
printf "│ ⚫ OFF : %-40s│\n" "none"
elif [ "$_inactive_count" -le 4 ]; then
printf "│ ⚫ OFF : %-40s│\n" "$INACTIVE_STR"
else
_line1="${TOGGLE_INACTIVE[0]} ${TOGGLE_INACTIVE[1]} ${TOGGLE_INACTIVE[2]} ${TOGGLE_INACTIVE[3]}"
_rest=("${TOGGLE_INACTIVE[@]:4}")
_line2="${_rest[*]}"
printf "│ ⚫ OFF : %-40s│\n" "$_line1"
printf "│ %-40s│\n" "$_line2"
unset _line1 _line2 _rest
fi
unset _active_count _inactive_count
printf "│ 🖥️ CLI : %-40s│\n" "$GSD_STATUS"
printf "│ 📦 v%-45s│\n" "$CONFIG_VERSION"
if [ -n "$GF_REFRESHED" ]; then
-6
View File
@@ -64,12 +64,6 @@ detect_gsd() {
command -v gsd &>/dev/null
}
detect_plugin_dev() {
# plugin-dev replaces the old "skill-creator" reference
local cache_dir="$HOME/.claude/plugins/cache"
[ -d "$cache_dir" ] && compgen -G "$cache_dir"/*plugin-dev* &>/dev/null
}
detect_uiux_pro_max() {
# installed (cache) AND enabled for this project (here-string: no pipe)
local cache_dir="$HOME/.claude/plugins/cache"
+45 -15
View File
@@ -39,32 +39,62 @@ PROBE REPORT (ground truth — do not re-detect):
## 4. PRESENT + BLOCKING GATE (main loop)
Show the returned PLUGIN CHECK block.
Show the returned PLUGIN CHECK block. The advisor emits tokens only; the
main loop builds every command from the fixed templates of step 5, never
pastes the advisor's text into a shell. Before running ANY command (the
step-4 diff included) check each token: a profile name is one of the advisor's own set
(web, seo, dev, design, qa, audit, minimal; never `full`, `max` or a
user-added profile) and matches `^[a-z0-9][a-z0-9-]*$` with an existing
`$HOME/.claude/lib/profiles/<name>.json`;
a pack is one of design, scroll3d, seo, web-validate, gstack-dev,
gstack-browser, gstack-design, extras (`higgsfield` is never accepted from an
advisor token: paid service, explicit user ask only); a plugin is one of the
two managed full ids `ui-ux-pro-max@ui-ux-pro-max-skill`,
`pr-review-toolkit@claude-code-plugins`. A token matching none is printed as
rejected and skipped, never run.
For a `↻ SET <profile>` line run
`bash "$HOME/.claude/lib/profile.sh" -C "<PROJECT_ROOT>" diff "<profile>"` and
print its `→ off` lines under it as "turns off" (none → "turns off: nothing")
and its `→ on` lines as "turns on" (none → "turns on: nothing").
The diff exits non-zero on a bad name, an unknown profile or a missing
profiles dir: on any non-zero exit print "turns off: unknown" and continue.
- `ACTION REQUIRED? YES` → offer: A) fix plugins B) type "force". STOP until
answered.
- OK → print `✅ Plugin check passed — [active plugins] — complexity: <score>%`.
## 5. APPLY GATE (main loop: only when the flow auto-activates)
If any plugin has ⚡ ENABLE status:
1. List the changes:
Trigger: a `↻ SET`, `⚡ ENABLE` or `⚠️ DISABLE` line. Under `source=flag`
(`PROFILE :` block) the advisor emits only `relaunch: cc <name> <profile>`:
nothing is applied. Apply only when
`git -C "<PROJECT_ROOT>" rev-parse --show-toplevel` equals PROJECT_ROOT;
otherwise print the commands and apply nothing ("no git root yet: run them
after git init").
1. List the changes, saying they are project-wide and persist in
`<PROJECT_ROOT>/.claude/settings.local.json`:
```
PROPOSED CHANGES:
⚡ Enable ui-ux-pro-max (frontend detected, complexity 65%)
⚡ Pre-fetch ctx7 docs for next.js, prisma
PROPOSED CHANGES (project-wide, persisted in
<PROJECT_ROOT>/.claude/settings.local.json):
↻ Set profile dev (backend detected) — turns off: <diff lines>
⚡ Enable pack design (frontend detected, complexity 65%)
⚡ Enable ui-ux-pro-max@ui-ux-pro-max-skill
Apply these changes? (yes / no / customize)
```
2. "yes" → run the advisor's commands in order, each one `bash
"$HOME/.claude/lib/profile.sh" -C <PROJECT_ROOT> set <name>` or `enable
<pack>`. Each call writes `.claude/settings.local.json` atomically or
refuses (rc 2, nothing written), so there is nothing to roll back: stop at
the first non-zero rc, print its stderr, and continue with the current
config. "customize" → user picks. "no" → proceed with current config.
2. "yes" → run the changes in order, the SET first, then the deltas (after
"customize" too). Each one is
`bash "$HOME/.claude/lib/profile.sh" -C "<PROJECT_ROOT>" set "<name>"`,
`... enable "<pack | full plugin id>"` or
`... disable "<pack | full plugin id>"` (same prefix). Each call
writes `.claude/settings.local.json` atomically or refuses (rc 2, nothing
written): stop at the first non-zero rc, print its stderr, and continue
with the current config. "customize" → user picks. "no" → proceed with
current config.
3. After a successful write print `✅ Applied N change(s): run
/reload-plugins to load the packs in this session (connectors and model:
next session).` In a `--settings` conversation (`PROFILE :` block says
`source=flag`) the advisor emits no enable for a pack the flag turns off;
it says `relaunch: cc <name> <profile>` instead.
next session).` Say the change is project-wide and persists in
`<PROJECT_ROOT>/.claude/settings.local.json`. Print the undo: after a SET:
`bash "$HOME/.claude/lib/profile.sh" -C "<PROJECT_ROOT>" unset`, after
deltas the inverse enable / disable.
**Never auto-activate without showing the list and getting confirmation.
Never write the user scope.**
+47 -2
View File
@@ -20,7 +20,9 @@ has() { case "$1" in *"$2"*) echo 1 ;; *) echo 0 ;; esac; }
claude_stub_install "$WORK"
# rtk pinned present, whatever the machine has
printf '#!/bin/sh\nexit 0\n' >"$WORK/stub/rtk" || exit 1
chmod +x "$WORK/stub/rtk" || exit 1
printf '#!/bin/sh\nexit 0\n' >"$WORK/stub/ctx7" || exit 1
printf '#!/bin/sh\nexit 0\n' >"$WORK/stub/graphify" || exit 1
chmod +x "$WORK/stub/rtk" "$WORK/stub/ctx7" "$WORK/stub/graphify" || exit 1
UIUX='"ui-ux-pro-max@ui-ux-pro-max-skill":true'
SEC='"security-guidance@claude-code-plugins":true'
@@ -89,6 +91,13 @@ check SB3-toggle-on-uiux "$(has "$(row '🟢 ON' "$out")" ui-ux-pro-max)" 1
ok="$(row '✅ ON' "$out")"
check SB3-onrow-no-pr-review "$(has "$ok" pr-review-toolkit)" 0
# SB11: every toggle on: all four in the ON row, no OFF row (SB3 output)
on="$(row '🟢 ON' "$out")"
for w in gstack ui-ux-pro-max context7 graphify; do
check "SB11-on-$w" "$(has "$on" "$w")" 1
done
check SB11-no-off-row "$(row '⚫ OFF' "$out")" ""
# SB9: no passive-cost row and no plan budget in the banner
check SB9-no-cost-row "$(has "$out" 💰)" 0
check SB9-no-budget "$(has "$out" budget)" 0
@@ -133,16 +142,52 @@ check SB8-no-claude-calls "$(claude_stub_calls)" 0
# SB10: no hand-copied passive-cost figure or dead plan path left
# gone <file> <regex> [filter]: 1 when no line (after the filter) matches
gone() {
[ -f "$ROOT/$1" ] || { echo 0; return; }
if grep -v "${3:-^\$}" "$ROOT/$1" | grep -qE -- "$2"; then echo 0
else echo 1; fi
}
check SB10-hook-costs "$(gone hooks/session-start.sh \
'_plugin_costs|TOKEN_WARN|detect_plan')" 1
check SB10-lib-detect-plan "$(gone lib/detect-plugins.sh detect_plan)" 1
check SB10-lib-plugin-dev "$(gone lib/detect-plugins.sh \
detect_plugin_dev)" 1
check SB10-hook-plugin-dev "$(gone hooks/session-start.sh 'plugin.dev')" 1
check SB10-reporter-const "$(gone agents/status-reporter.md \
'PLUGIN_TOKENS|~[1-9][0-9-]*t')" 1
check SB10-advisor-figures "$(gone agents/plugin-advisor.md \
'~[1-9][0-9-]*t' 'plan budget')" 1
'~[1-9][0-9-]*t')" 1
check SB10-advisor-vocab "$(gone agents/plugin-advisor.md \
'plugin-dev|PLAN:|plan budget|0t passive|rollback|gstack ON|gstack OFF|'\
'\[plugin\]|ctx7 setup|passive tokens')" 1
check SB10-gate-vocab "$(gone lib/plugin-gate.md \
'Pre-fetch ctx7|Enable ui-ux-pro-max \(')" 1
gate="$(cat "$ROOT/lib/plugin-gate.md")"
check SB10-gate-diff "$(has "$gate" 'profile.sh" -C')" 1
check SB10-gate-diff2 "$(has "$gate" 'diff "<profile>"')" 1
check SB10-gate-root "$(has "$gate" 'rev-parse --show-toplevel')" 1
check SB10-gate-rejected "$(has "$gate" 'rejected')" 1
check SB10-gate-quoted "$(gone lib/plugin-gate.md '-C <PROJECT_ROOT>')" 1
check SB10-advisor-fullid "$(has "$(cat "$ROOT/agents/plugin-advisor.md")" \
'ui-ux-pro-max@ui-ux-pro-max-skill')" 1
# anchored: "120000 tokens" (the /route show sample) is not a 0-token claim
check SB10-usage-vocab "$(gone USAGE.md \
'0 t passif|(^|[^0-9])0 token|gstack ON|gstack OFF|context7 ON|'\
'~[1-9][0-9]*t\)' COST)" 1
check SB10-usage-packs-group "$(gone USAGE.md \
'packs gstack \(|DISABLE: pack design, packs gstack')" 1
check SB10-advisor-keep-full "$(gone agents/plugin-advisor.md 'SET : full')" 1
check SB10-usage-gate-lists "$(gone USAGE.md \
'le gate liste ce que le profil coupe')" 1
check SB10-gate-profiles-path "$(has "$gate" '$HOME/.claude/lib/profiles/')" 1
check SB10-gate-C-oneline "$(gone lib/plugin-gate.md '-C *$')" 1
check SB10-onboard-ctx7 "$(gone skills/onboard/SKILL.md 'ctx7 setup')" 1
check SB10-onboard-install "$(gone skills/onboard/SKILL.md \
'make plugin`? *\(installe')" 1
check SB10-gate-turns-on "$(has "$gate" 'turns on')" 1
check SB10-gate-set-tokens "$(has "$gate" \
'web, seo, dev, design, qa, audit, minimal')" 1
check SB10-check-cmds "$(gone skills/plugin-check/SKILL.md \
"advisor's exact commands")" 1
printf 'session-banner: %d passed, %d failed\n' "$pass" "$fail"
[ "$fail" -eq 0 ]
+4 -1
View File
@@ -251,10 +251,13 @@ Pour chaque fast-lib détectée :
```
⚠️ ctx7 non installé — risque de code utilisant des APIs obsolètes
sur : [liste fast-libs]
Install : `npm install -g ctx7 && ctx7 setup --claude`
Install : `npm install -g ctx7`
Version épinglée et find-docs : `make plugin` depuis le dépôt claude-config
Ou continuer sans (non recommandé pour fast-libs).
```
Demander : `yes install now / continue without / skip audit`.
`yes install now` lance uniquement `npm install -g ctx7` (jamais
`make plugin`, qui dépend du répertoire courant).
- **Pas de fast-lib** → skip silencieusement.
+3 -2
View File
@@ -12,8 +12,9 @@ plugin-probe (sonnet) → validation checkpoint → dispatch plugin-advisor
dispatched, gates in this loop).
/plugin-check is READ-ONLY advisory: SKIP the gate's step 5 (apply) — show
the advisor's exact commands for the user instead. Never write: the user runs
them (`lib/profile.sh` `set <profile>` / `enable <pack>` writes the
the commands the main loop builds from the gate's step-5 templates (`set` /
`enable` / `disable`, with `-C "<PROJECT_ROOT>"`), after the gate's token
check, for the user instead. Never write: the user runs them (`lib/profile.sh` `set <profile>` / `enable <pack>` writes the
project's `.claude/settings.local.json`, never the user scope).
If `$HOME/.claude/lib/plugin-gate.md` unreachable: emit `Plugin gate include