From 1971b8d0f5f29d99abc1b219445d269fa409c09e Mon Sep 17 00:00:00 2001 From: bchanot Date: Tue, 10 Nov 2026 17:05:49 +0100 Subject: [PATCH 1/3] fix(banner): drop stale passive-cost constants and the budget row The banner, plugin-advisor and status-reporter kept hand-copied token costs (gstack 2750, ui-ux 400) that the 2026-09-28 prune fixed only in doctor.sh. The banner budget row and its now-dead detect_plan are gone; the agents point to make doctor for the measured cost. --- agents/plugin-advisor.md | 44 +++++++++---------- agents/status-reporter.md | 12 ++--- hooks/session-start.sh | 39 +--------------- lib/detect-plugins.sh | 26 +---------- ...n.test.sh => hook-recursion-guard.test.sh} | 28 +++--------- lib/tests/session-banner.test.sh | 18 ++++++++ 6 files changed, 51 insertions(+), 116 deletions(-) rename lib/tests/{detect-plan.test.sh => hook-recursion-guard.test.sh} (60%) diff --git a/agents/plugin-advisor.md b/agents/plugin-advisor.md index 326b56e..c637594 100644 --- a/agents/plugin-advisor.md +++ b/agents/plugin-advisor.md @@ -104,7 +104,7 @@ PROFILE: [active skill profile — name + match%, or " (default — not ap SIGNALS: [detected signals] COMPLEXITY: % — PLAN: (budget: ~t | n/a) -COST ESTIMATE: ~Xt passive tokens (all active plugins combined) +COST ESTIMATE: run make doctor (measured; no per-plugin constants here) RECOMMENDATIONS: ✅ KEEP : [plugin] — [reason] @@ -147,9 +147,9 @@ ACTION REQUIRED? YES / NO | `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 ~3000-5000t | +| `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 | ~3100t saved | +| backend/lib/CLI only | — | ui-ux-pro-max, gstack | passive tokens saved | | small project / hotfix | — | gstack, gsd | Use /hotfix, /bugfix, or /feat | **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`. @@ -190,17 +190,17 @@ When the plugin-advisor detects a `simple` or `hotfix` signal, suggest the appro ### Recommended sets by project type -| Project type | Plugins ON | OFF | Passive cost | -|---|---|---|---| -| Backend API / microservice | (superpowers skills always on), context7 (if fast libs) | ui-ux-pro-max, gstack | ~0t | -| Frontend SPA / SSR | (superpowers skills always on), ui-ux-pro-max, impeccable, design-motion-principles, context7 | gstack | ~600t | -| Full-stack SaaS | (superpowers skills always on), gstack, ui-ux-pro-max, impeccable, design-motion-principles, context7 | — | ~3400t | -| CLI tool / library | (superpowers skills always on) | all toggles | ~0t | -| Multi-session large feature | (superpowers skills always on) + gsd v2 CLI (external) | — | ~0t CC | -| Quick fix / hotfix | (superpowers skills always on) | all toggles | ~0t | -| Design system / component lib | (superpowers skills always on), ui-ux-pro-max, impeccable, design-motion-principles | gstack, gsd | ~400t | -| Fast-evolving libs (Next.js etc.) | (superpowers skills always on), context7 | — | ~200t | -| Enterprise multi-agent orchestration | (superpowers skills always on) + gsd v2 (external) | plugin-dev | ~0t CC | +| 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 @@ -212,7 +212,7 @@ When the plugin-advisor detects a `simple` or `hotfix` signal, suggest the appro RULE: IF "mobile" signal (React Native/Expo/Flutter detected): → gstack OFF — no browser QA on mobile → Docker NOT relevant — no server-side containerization for mobile - → ui-ux-pro-max OPTIONAL (~400t) — only if design system complexity is high + → ui-ux-pro-max 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 @@ -222,25 +222,25 @@ RULE: IF "monorepo" signal detected: → passive cost estimate = highest-cost package profile (other packages add nothing) RULE: IF "frontend" signal OR .tsx/.jsx count > 0: - → ui-ux-pro-max ON if "design-system" signal (~400t) + → 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) RULE: IF "deploy" AND "browser-qa" signals: - → gstack ON (~2750t) — full-product workflow + → gstack 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 RULE: IF "fast-libs" (Next.js/React 18+/Prisma/Supabase/Drizzle): - → context7 ON (~200t) + → context7 ON (CLI; its find-docs skill always loads) RULE: IF "multi-agent" AND "complex-arch": → gsd v2 CLI recommended (0t passive, multi-session coordination) RULE: IF "simple" OR "hotfix": - → Disable all toggles. ~800t base only. + → Disable all toggles, base only. RULE: IF "embedded" signal (firmware, bare-metal, microcontroller, or Makefile+C without Node/Rust/Go): → Disable ALL toggles including gstack, context7, plugin-dev @@ -252,11 +252,11 @@ RULE: IF "embedded" signal (firmware, bare-metal, microcontroller, or Makefile+C → 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 (~100t saved if disabled) + → 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 (~100t) + → 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): @@ -264,7 +264,7 @@ RULE: IF `browser-qa` signal (e2e tests, Playwright/Cypress/Puppeteer in deps): → context7 OPTIONAL (depends on framework version) RULE: IF `design-system` signal (tokens, theme files, Storybook present): - → ui-ux-pro-max ON (~400t) + → 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 diff --git a/agents/status-reporter.md b/agents/status-reporter.md index 71e20a8..7ee740c 100644 --- a/agents/status-reporter.md +++ b/agents/status-reporter.md @@ -1,6 +1,6 @@ --- name: status-reporter -description: Read-only project-status engine — dispatched by /status. Collects plugin roster + passive-cost estimate (doctor.sh constants), git state, build/tests, GSD milestone into one snapshot. +description: Read-only project-status engine — dispatched by /status. Collects plugin roster (passive cost via make doctor), git state, build/tests, GSD milestone into one snapshot. tools: Read, Bash, Glob, Grep model: haiku effort: low @@ -25,15 +25,9 @@ cat ~/.claude/lib/../version.txt 2>/dev/null || echo "unknown" # lib symlink re bash "$HOME/.claude/lib/profile.sh" -C "$PWD" current --plain 2>/dev/null | grep -E '^(profile|pack-[a-z0-9-]+)=' || echo "profile-unavailable" command -v rtk &>/dev/null && echo "rtk: installed" || echo "rtk: missing" command -v gsd &>/dev/null && gsd --version 2>/dev/null | head -1 || echo "gsd: not installed" - -# Passive token cost — source of truth: doctor.sh's constants block -# (PLUGIN_TOKENS + per detect_* line). Read it, sum ONLY the plugins -# found active above. Never invent a number outside these constants. -grep -E 'PLUGIN_TOKENS \+ [0-9]+' "$(readlink -f "$HOME/.claude/lib")/../doctor.sh" 2>/dev/null -# grep empty (doctor.sh missing/moved) → report the plugin count only and -# defer cost to /plugin-check. ``` +The passive token cost is not computed here: `make doctor` measures it. `~/.claude/plugins/cache` = installed, not active. `Plugins ON:` = rtk (if present) + the names printed by `list_on_plugins` (part before `@`) + the `pack-*=on` packs. Check `~/.claude.json` for active MCP servers. @@ -141,7 +135,7 @@ PROJECT STATUS CONFIG Version : v - Plugins ON: (~t passive — doctor.sh constants; full audit → /plugin-check) + Plugins ON: (passive cost: make doctor; full audit → /plugin-check) GSD v2 : installed / not installed PROJECT diff --git a/hooks/session-start.sh b/hooks/session-start.sh index 2c5395c..2cb9ae6 100644 --- a/hooks/session-start.sh +++ b/hooks/session-start.sh @@ -159,42 +159,6 @@ if [ -n "${CLAUDE_CODE_EFFORT_LEVEL:-}" ]; then EFFORT_WARN="⚠️ CLAUDE_CODE_EFFORT_LEVEL=${CLAUDE_CODE_EFFORT_LEVEL} set: skill/agent effort pins ignored" fi -# Detect plan and set passive token budget -PLAN=$(detect_plan 2>/dev/null || echo "pro") -case "$PLAN" in - max) _budget=20000; PLAN_LABEL="Max" ;; - pro) _budget=11000; PLAN_LABEL="Pro" ;; - *) _budget=11000; PLAN_LABEL="Pro" ;; -esac - -# Quick passive token cost estimate -# Only count plugins that are ACTIVE (detected as ON), not just installed -# superpowers dropped 2026-09-28 (tier 2 of the skill-catalog prune): its -# 7 vendored skills are counted by the skill catalog, not a plugin cost. -_passive_t=0 - -# Token costs for toggle plugins — map display name to cost -declare -A _plugin_costs=( - [gstack]=2750 - [ui-ux-pro-max]=400 - [plugin-dev]=100 - [context7]=200 - [graphify]=300 -) -for _p in "${TOGGLE_ACTIVE[@]}"; do - _cost="${_plugin_costs[$_p]:-0}" - _passive_t=$((_passive_t + _cost)) -done -_budget_pct=$((_passive_t * 100 / _budget)) -if [ "$_budget_pct" -gt 50 ]; then - TOKEN_WARN="⚠️ ~${_passive_t}t passif (${_budget_pct}% budget $PLAN_LABEL)" -elif [ "$_budget_pct" -gt 25 ]; then - TOKEN_WARN="~${_passive_t}t passif (${_budget_pct}% budget $PLAN_LABEL)" -else - TOKEN_WARN="" -fi -unset _passive_t _budget_pct _budget - echo "" echo "┌─ Claude Code config ──────────────────────────────────┐" # "ALWAYS ON" row — actual state, not hardcoded. RTK is a binary on PATH; @@ -267,7 +231,6 @@ else fi unset _active_count _inactive_count printf "│ 🖥️ CLI : %-40s│\n" "$GSD_STATUS" -[ -n "$TOKEN_WARN" ] && printf "│ 💰 %-44s│\n" "${TOKEN_WARN:0:44}" printf "│ 📦 v%-45s│\n" "$CONFIG_VERSION" if [ -n "$GF_REFRESHED" ]; then _gf_line="hooks refreshed: $GF_REFRESHED → commit .githooks/" @@ -460,4 +423,4 @@ fi unset _ss_digest echo "" -unset TOKEN_WARN PROFILE_PLAIN +unset PROFILE_PLAIN diff --git a/lib/detect-plugins.sh b/lib/detect-plugins.sh index 00fce61..854b2f0 100644 --- a/lib/detect-plugins.sh +++ b/lib/detect-plugins.sh @@ -4,7 +4,7 @@ # Sourced by: session-start.sh, doctor.sh, agents/status-reporter.md # # detect_* return 0 (detected) or 1 (not detected), silently — callers -# handle messaging. detect_plan and list_on_plugins print to stdout. +# handle messaging. list_on_plugins prints to stdout. # ============================================================ # --- Always-on plugins --- @@ -86,27 +86,3 @@ detect_graphifyy() { # Graphifyy — codebase knowledge graph, installed via pipx command -v graphify &>/dev/null } - - -# --- Plan detection --- - -detect_plan() { - # Detect Claude plan: max or pro. - # Never call the `claude` CLI here: it starts a session whose - # SessionStart hook calls detect_plan again (BLK-043). - # Checks ~/.claude.json for model access hints. - # Returns plan name on stdout, always exits 0. - local claude_json="$HOME/.claude.json" - if [ -f "$claude_json" ]; then - # Max plan: has opus model access or max flag - if grep -q '"planType".*"max"' "$claude_json" 2>/dev/null; then - echo "max"; return 0 - fi - # Check cached features for max indicators - if grep -q '"tengu_cobalt_compass": true' "$claude_json" 2>/dev/null \ - && grep -q '"tengu_harbor": true' "$claude_json" 2>/dev/null; then - echo "max"; return 0 - fi - fi - echo "pro" -} diff --git a/lib/tests/detect-plan.test.sh b/lib/tests/hook-recursion-guard.test.sh similarity index 60% rename from lib/tests/detect-plan.test.sh rename to lib/tests/hook-recursion-guard.test.sh index 82a8be0..5cd05e9 100644 --- a/lib/tests/detect-plan.test.sh +++ b/lib/tests/hook-recursion-guard.test.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# lib/tests/detect-plan.test.sh -# Regression for BLK-043: detect_plan must never call the claude CLI -# (a hook-launched claude re-enters session-start.sh: fork bomb). +# lib/tests/hook-recursion-guard.test.sh +# Regression for BLK-043: session-start.sh must guard against re-entry +# and never call the claude CLI (a hook-launched claude re-enters the +# hook: fork bomb). set -u ROOT="$(cd "$(dirname "$0")/../.." && pwd)" -LIB="${DETECT_PLUGINS_LIB:-$ROOT/lib/detect-plugins.sh}" HOOK="$ROOT/hooks/session-start.sh" WORK=$(mktemp -d) || exit 1 trap 'rm -rf "$WORK"' EXIT @@ -17,27 +17,11 @@ check() { if [ "$2" = "$3" ]; then pass=$((pass+1)); else fail=$((fail+1)); . "$ROOT/lib/tests/claude-stub.sh" || exit 1 claude_stub_install "$WORK" -# detect_plan, no .claude.json: pro, no claude call. -mkdir -p "$WORK/empty" -out=$(HOME="$WORK/empty" bash -c 'source "$1"; detect_plan' _ "$LIB") -check T1-no-json-plan "$out" pro -check T1-no-json-calls "$(claude_stub_calls)" 0 - -# detect_plan, max markers: max, no claude call. -mkdir -p "$WORK/maxhome" -printf '{"tengu_cobalt_compass": true, "tengu_harbor": true}\n' \ - >"$WORK/maxhome/.claude.json" -: >"$CLAUDE_LOG" -out=$(HOME="$WORK/maxhome" bash -c 'source "$1"; detect_plan' _ "$LIB") -check T2-max-plan "$out" max -check T2-max-calls "$(claude_stub_calls)" 0 - -# Hook HOME: real ~/.claude entries + max fixture (no fallback needed). +# Hook HOME: real ~/.claude entries. mkdir -p "$WORK/hookhome/.claude" "$WORK/proj" for e in "$HOME"/.claude/*; do ln -s "$e" "$WORK/hookhome/.claude/$(basename "$e")" done -cp "$WORK/maxhome/.claude.json" "$WORK/hookhome/.claude.json" # Guard: hook exits 0 silently when already running. out=$(cd "$WORK/proj" && HOME="$WORK/hookhome" SESSION_START_RUNNING=1 \ @@ -62,5 +46,5 @@ chmod +x "$WORK/stub/git" check T4-child-sees-guard "$(head -1 "$GIT_LOG")" 1 check T4-hook-no-claude-calls "$(claude_stub_calls)" 0 -printf 'detect-plan: %d passed, %d failed\n' "$pass" "$fail" +printf 'hook-recursion-guard: %d passed, %d failed\n' "$pass" "$fail" [ "$fail" -eq 0 ] diff --git a/lib/tests/session-banner.test.sh b/lib/tests/session-banner.test.sh index 697ca64..a404080 100644 --- a/lib/tests/session-banner.test.sh +++ b/lib/tests/session-banner.test.sh @@ -89,6 +89,10 @@ 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 +# 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 + # uiux : exit status of detect_uiux_pro_max, PROFILE_PLAIN unset uiux() { (cd "$WORK/$2" && unset PROFILE_PLAIN && HOME="$WORK/$1" bash -c \ @@ -126,5 +130,19 @@ check SB7-empty-list-rtk-only "$ao" rtk # SB8: no hook run of this suite called the claude CLI (BLK-043) check SB8-no-claude-calls "$(claude_stub_calls)" 0 +# SB10: no hand-copied passive-cost figure or dead plan path left +# gone [filter]: 1 when no line (after the filter) matches +gone() { + 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-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 + printf 'session-banner: %d passed, %d failed\n' "$pass" "$fail" [ "$fail" -eq 0 ] From 9777a4795d0459277fdf4954c746682bb00b611c Mon Sep 17 00:00:00 2001 From: bchanot Date: Tue, 10 Nov 2026 18:16:18 +0100 Subject: [PATCH 2/3] docs: banner cost row removal in changelog, USAGE budget note points to make doctor --- CHANGELOG.md | 1 + USAGE.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 338dad4..0a650e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/) and this project - `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-` 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). ### Fixed - `/guardrails` and the interviewer cite the secure-by-default, Supabase, cloud-function and a11y rules by their absolute `~/.claude/rules/.md` path; run from a project repo, the bare `rules/.md` path resolved against that project and missed the rule files. diff --git a/USAGE.md b/USAGE.md index dff8a95..8095391 100644 --- a/USAGE.md +++ b/USAGE.md @@ -245,7 +245,7 @@ Hotfix/quick fix → tout OFF (skills superpowers vendorisés, toujours ## Patterns de workflow -> **Budget Pro (~11k tokens/5h) :** un `/init-project` complet consomme 3000-5000t — laissant 6000-8000t pour les steps suivants. Adapter le choix de plugins actifs en conséquence. Les tokens sont indiqués à titre indicatif — varient selon la taille du projet et les plugins actifs. +> **Coût indicatif :** un `/init-project` complet consomme 3000-5000t. Le coût passif des plugins actifs se mesure avec `make doctor`. Les tokens sont indiqués à titre indicatif et varient selon la taille du projet et les plugins actifs. ### Pattern A — Nouveau projet court (≤1 session) · ~3000-5000t From 176023bf5d5f6240b4ded0a8e6d8e6de146d59ba Mon Sep 17 00:00:00 2001 From: bchanot Date: Tue, 10 Nov 2026 18:34:45 +0100 Subject: [PATCH 3/3] chore(memory): G2 fixed (split), BLK-047, LRN-275, measured-cost feature in TODO --- .claude/audits/BUGS-FOUND.md | 1 + .claude/memory/blockers.md | 6 +++ .claude/memory/journal.md | 1 + .claude/memory/learnings.md | 5 +++ .claude/tasks/TODO.md | 3 ++ .../2026-11-10-passive-cost-source-1330.md | 29 +++++++++++++ .../2026-11-10-passive-cost-source-1330.md | 41 +++++++++++++++++++ 7 files changed, 86 insertions(+) create mode 100644 .claude/tasks/contracts/2026-11-10-passive-cost-source-1330.md create mode 100644 .claude/tasks/plans/2026-11-10-passive-cost-source-1330.md diff --git a/.claude/audits/BUGS-FOUND.md b/.claude/audits/BUGS-FOUND.md index 2a4a452..ad5294e 100644 --- a/.claude/audits/BUGS-FOUND.md +++ b/.claude/audits/BUGS-FOUND.md @@ -7,6 +7,7 @@ - hooks/session-start.sh:200-217 + lib/detect-plugins.sh:49-52 (`detect_uiux_pro_max`) — the banner "ALWAYS ON" row and the ui-ux-pro-max toggle row read user-scope settings.json / plugin cache, not the effective profile (`profile.sh current --plain`, BDR-134 single source of truth): a dev or minimal project shows ui-ux-pro-max on; pr-review-toolkit on in max/audit is not shown. Severity: low (banner only). Discovered while: code-clean 2026-11-09 (phase 5 sweep). Not fixed. FIXED 2026-11-10 (/bugfix, bugfix/banner-effective-profile): new `list_on_plugins` (lib/detect-plugins.sh) = effective profile for the ids lib/profiles manages, user-scope true for the others; the ✅ row reads it (model-router now shown, user choice) and `detect_uiux_pro_max` = cache AND enabled; pipefail-safe for doctor.sh; test lib/tests/session-banner.test.sh SB1-SB8. - hooks/session-start.sh:177-183 + agents/plugin-advisor.md:193,197,211,226,233,263 vs doctor.sh:520-526 — passive-cost constants disagree (banner/advisor: gstack 2750, ui-ux-pro-max 400, context7 200, graphify 300; doctor dropped gstack/context7/graphify 2026-09-28 as double counting, ui-ux-pro-max 670); agents/status-reporter.md:26-30 names doctor as source of truth. Severity: low (estimates). Discovered while: code-clean 2026-11-09. Not fixed. + FIXED 2026-11-10 (/bugfix, bugfix/passive-cost-source, split by the user): stale hand figures removed from the banner (💰 budget row + `_plugin_costs` + now-dead `detect_plan` deleted), plugin-advisor and status-reporter (cost → `make doctor`); doctor keeps its measured ui-ux 670; tests SB9/SB10, detect-plan.test.sh renamed hook-recursion-guard.test.sh. Measured-cost API = TODO feature. - hooks/session-start.sh:404-408 (`_digest_journal`) — greps `^- ` without skipping HTML comments; templates/memory/journal.md:19-21 holds `- ` bullets inside ``, so a template-born project prints "- journal: " in the session digest until its first journal write. Fix template and digest together. Severity: low. Discovered while: code-clean 2026-11-09 (phase 4 sweep). Not fixed. FIXED 2026-11-09 (/hotfix, bugfix/digest-journal-comment): the digest skips HTML comment blocks (opener anchored at line start, CommonMark rule; an inline `