diff --git a/docs/plans/b2-profile-overlays.md b/docs/plans/b2-profile-overlays.md new file mode 100644 index 0000000..a2b72a8 --- /dev/null +++ b/docs/plans/b2-profile-overlays.md @@ -0,0 +1,62 @@ +# B2: per-profile plugin-enablement overlays — shipped + measured + +_Task: B2 in [system-prompt-profiles-tasks.md](system-prompt-profiles-tasks.md) · +2026-07-08 · Depends on C3 findings ([c3-spike-findings.md](c3-spike-findings.md))_ + +## Pre-check result: `enabledPlugins` DEEP-MERGES + +The open item from C3 is resolved empirically (transcript `skill_listing` inspection, two +headless haiku runs): a `--settings ` file's `enabledPlugins` is merged +key-by-key into `~/.claude/settings.json` — only the plugins explicitly set `false` +disappear (baseline 64 skills → 61, exactly the 3 skills of the 2 disabled plugins); +unlisted plugins and all hooks are unaffected. **Diff-only overlays are safe.** + +## Shipped + +`~/.claude/profiles/` (see its README.md): + +- `cc-os-design.json` — disables rails-ui-component, api-wrapper, invoice-ninja, + creative-team, dev-team +- `client-dev.json` — disables creative-team, invoice-ninja, arch-refactor +- `brainstorm.json` — disables all 9 coding/client plugins (adds ruby-lsp, codex, + git-context, arch-refactor) + +Usage: `claude --settings ~/.claude/profiles/.json`. Never combine with a +`--setting-sources` list that omits `user` (silent plugin/hook drop — see vault note +`claude-code-setting-sources-silent-plugin-drop`). + +## Measured savings (headless haiku, empty dir, 2026-07-08) + +| Run | Context tokens | Delta vs baseline | +|---|---|---| +| baseline (no overlay) | 29,045 | — | +| cc-os-design (5 plugins off) | 29,013 | −32 | +| brainstorm (9 plugins off) | 28,413 | −632 | + +**Honest verdict: token savings are marginal.** + +## Follow-on: YAGNI tool deny (2026-07-08, same session) + +Transcript sweep of all sessions since 2026-06-01 (tool_use counts across +`~/.claude/projects/**/*.jsonl`): heavy use of Bash (7.7k) / Read (4.2k) / Edit (2.1k) / +Agent (1.3k) / Write (1.2k); **zero-or-one lifetime calls** to Workflow, Artifact, +SendUserFile, ReportFindings — all of which ship full schemas up front (not deferred). + +Measured (headless haiku, empty dir): disallowing Workflow alone −5,982 tokens +(its schema ≈ the whole system-prompt text); all four −6,509. A `permissions.deny` +block in a settings file removes the schemas identically to `--disallowedTools` +(22,532 vs 22,536). + +**Applied globally** to `~/.claude/settings.json`: +`"permissions": {"deny": ["Workflow", "Artifact", "SendUserFile", "ReportFindings"]}` — +~6.5k saved every session, no flags needed. Revert by deleting the entry (needed if +"ultracode"-style Workflow orchestration is ever wanted). This delivers the +"`--tools` restriction is the real lever" prediction from the assessment; A1/A2's +remaining value is now just the interactive-Fable confirmation. The assessment's "~4.8k user stack" +is dominated by hooks/memsearch injection and per-plugin fixed listings, not by the +skill descriptions the overlays remove — ToolSearch deferral already made plugin +skills cheap. The remaining value of profiles is **focus** (no irrelevant slash +commands/agents offered in a brainstorm session), not context cost. This further +deprioritizes Wave 3 (aliases: trivial, do when friction is felt) and Group D +(dropped), and shifts remaining token-diet attention to the memsearch injection +(~1.5–3.9k/session, needs upstream fix — see b3-memsearch-injection-review.md). diff --git a/docs/plans/system-prompt-profiles-tasks.md b/docs/plans/system-prompt-profiles-tasks.md index 50a940d..6eccb22 100644 --- a/docs/plans/system-prompt-profiles-tasks.md +++ b/docs/plans/system-prompt-profiles-tasks.md @@ -34,7 +34,7 @@ A1 and A3 run in parallel; A2 follows A1. | ID | Task | Depends on | Suggested agent | |---|---|---|---| | B1 | **Split cc-os CLAUDE.md.** ~11k tokens → ~2–3k orientation file + `docs/implementation-status.md` (the append-only changelog moved out, linked not `@`-imported so it loads on demand). Follow `~/servers/proxmox-hermes/docs/claude-md-maintenance.md`: keep it short, pointers over copies, never auto-append. Must preserve: the "keep this file current" contract (redirected to the new doc), plugin naming rule, ADR discipline, OpenSpec workflow. Verify a fresh session still orients correctly. | G0 | sonnet (judgment about what is orientation vs changelog); main-loop review before commit | -| B2 | **Per-profile plugin enablement.** Design + create settings overlay files (one per profile: e.g. `cc-os-design`, `client-dev`, `brainstorm`) listing `enabledPlugins`; a brainstorm profile drops rails-ui-component / api-wrapper / invoice-ninja / creative-team etc. Resolve where overlays live so they don't fight `bin/refresh-plugins` (open question #3). | B1 (so measured savings are attributable) | sonnet | +| B2 ✅ (2026-07-08, see [b2-profile-overlays.md](b2-profile-overlays.md) — deep-merge confirmed, 3 overlays shipped to `~/.claude/profiles/`, measured savings marginal: −32 to −632 tokens) | **Per-profile plugin enablement.** Design + create settings overlay files (one per profile: e.g. `cc-os-design`, `client-dev`, `brainstorm`) listing `enabledPlugins`; a brainstorm profile drops rails-ui-component / api-wrapper / invoice-ninja / creative-team etc. Resolve where overlays live so they don't fight `bin/refresh-plugins` (open question #3). | B1 (so measured savings are attributable) | sonnet | | B3 | **memsearch injection review.** Measure the SessionStart recall injection size across a week of sessions (~13 KB observed once); review memsearch plugin config options for capping/trimming it; recommend (not apply) a setting. | — (parallel with B1/B2 once G0 clears) | haiku | ## Group C — `cyolo` profile wrapper (Phase 2, after B) @@ -63,7 +63,10 @@ A1 and A3 run in parallel; A2 follows A1. Superseded by the slimmed scope above. Current order: 1. **Wave 1 (parallel):** B1 (main-loop), B3 + C3 (subagents). -2. **Wave 2:** B2 (needs C3's overlay-location answer). +2. **Wave 2:** B2 (needs C3's overlay-location answer). ✅ Done 2026-07-08 — + overlays shipped; measured token savings marginal (plugin listings are cheap + post-ToolSearch), so profiles' value is focus, not context cost. 3. **Wave 3 (minimal C):** settings-overlay aliases only; full C1/C2 wrapper deferred - until the friction is felt. + until the friction is felt. B2's marginal-savings result lowers this further — + do only when friction is actually felt. 4. **Deferred:** A1/A2 pending the interactive `/context` check; D dropped (pointer kept).