From 3228e45e793a25e8dd8a8fd5756d2360cfeb238c Mon Sep 17 00:00:00 2001 From: bchanot Date: Sun, 25 Oct 2026 14:18:23 +0100 Subject: [PATCH] chore(memory): phase 5 carries the model per project and per conversation (measured) --- .claude/tasks/TODO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 75e59ec..1bbfe11 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -51,6 +51,7 @@ Shared rules for every phase: - Facts 2026-10-24/25 (scratch projects, fresh headless sessions, canaries, run concurrently, one shared ~/.claude): `.claude/settings.local.json` `enabledPlugins` per project works both ways and concurrently; `claude --settings ''` gives two SIMULTANEOUS conversations in the SAME project different plugin sets; a skills-dir plugin obeys both; plugin skills keep their short name (`ui-styling` resolves) but verify `:` too (router rows must match both); plugin agents need the `plugin:` prefix; `permissions.deny Skill(x)` does not hide a skill; `skillOverrides` does not reach plugin skills (packs hide by disabling, guide); a user-scope MCP cannot be switched off per project by settings: project MCP belongs in a pack `.mcp.json`; claude.ai connectors do not load under `-p`. - User answers 2026-10-25: profile per project and per conversation, never one for all; tracked `.claude/settings.json` keeps deny/allow only, profiles go local; a project without a profile gets a proposal once, written on accept; the global mode (skills/ ↔ skills-disabled/ symlinks + user-scope plugin toggling) is DELETED; core = everything except the heavy packs (design, seo/geo, web-validate, scroll/3d, higgsfield, gstack); agents stay global; a skill needing an off pack proposes to enable it then `/reload-plugins` (spike first); all 11 profiles kept as pack compositions. - Packs: each heavy group becomes a skills-dir plugin `skills/pack-/` (`.claude-plugin/plugin.json` + `skills//SKILL.md`, + `.mcp.json` for higgsfield, + hooks if any). Spike first: nested skills load once as plugin skills; gstack (external installer, symlinks) as a pack. + - Model per project and per conversation (user ask 2026-10-25, measured headless the same day: project `.claude/settings.local.json` `"model": "haiku"` → haiku; `--settings '{"model":"sonnet"}'` on top → sonnet; nothing → the user settings model; scratchpad modeltest). A profile carries `model` beside `enabledPlugins`; `profile.sh set` writes both into `.claude/settings.local.json`; the conversation launcher passes both. `/model` writes the TRACKED user settings.json (seen 2026-10-25: fable landed there), so the doctrine says: `/model` only for a one-off turn, the project model goes through the profile; the tracked default stays `opus`; doctor warns when settings.json `model` differs from `opus`. Applied by hand today for this repo (local fable, tracked opus). - Profile = `lib/profiles/.json` (`{"enabledPlugins": {...}}`), the source of truth, reachable through the ~/.claude/lib link: no generator, no `~/.claude/profiles/`. Per project: `profile.sh set ` writes `enabledPlugins` into `.claude/settings.local.json` (never user scope). Per conversation: `claude --settings ~/.claude/lib/profiles/.json` (shell function or make helper, named with the user). - Detection: no fingerprint. When the project has no profile, session-start prints one line pointing at `/plugin-check`; the plugin-advisor maps its canonical profile to a pack profile (replaces the banner hint the cleanup deletes). - Pack needed mid-skill: the orchestrators' existing gates (lib/design-gate.md + design-tool-gate.sh, lib/plugin-gate.md) check the required packs; off → propose enabling for THIS conversation (the `--settings` copy when the session was launched with one, else `.claude/settings.local.json`; never user scope) + `/reload-plugins`; spike that a settings change + `/reload-plugins` loads the pack mid-session.