plugins: replace enable-first profiles with a native all-true manifest - #58
Draft
yulonglin wants to merge 2 commits into
Draft
plugins: replace enable-first profiles with a native all-true manifest#58yulonglin wants to merge 2 commits into
yulonglin wants to merge 2 commits into
Conversation
claude-tools context required a .claude/context.yaml in every repo before its plugins worked, and wrote project-scope true/false maps for all 33 installed plugins - the source of the 'project settings override your user setting' warnings in /plugin. Replace it with a user-scope install manifest: enabledPlugins in claude/settings.json lists the 24 kept plugins with an explicit true, and no project-scope plugin state is generated at all. An explicit true wins at every scope, so this does not depend on the platform's undocumented no-entry default. - drop SessionStart hooks context_auto_apply.sh and check_things_mcp.sh - deploy.sh: drop the claude-tools context --sync step (marketplaces are already declared natively in extraKnownMarketplaces) and the context-templates deploy block - delete .claude/context.yaml and claude/templates/contexts/profiles.yaml - statusline.sh: drop the now-dead context.yaml reader - extraKnownMarketplaces: 7 -> 6 (drop dev-browser-marketplace; productivity-tools stays, it still ships the macOS-only bear-mcp) - prune 9 unused plugins: dev-browser, figma, gopls-lsp, huggingface-skills, imessage, plugin-dev, ralph-loop, swift-lsp, things-mcp Accepted loss: OS-conditional loading (profiles.yaml had a macos: section). Its only entry, bear-mcp, was not installed anywhere. Claude-Session: https://claude.ai/code/session_01WoJYQoyUNVUn56h87MHDQ7
…ssed The manifest change landed in f89b1f4 but left live references to the retired claude-tools context system behind. Each was a real friction bug, not just stale prose: - CLAUDE.md: Common Tasks row pointing at a retired command - README.md: marketplaces documented as synced from profiles.yaml (they are declared in extraKnownMarketplaces); dropped the deregistered dev-browser-marketplace row and corrected openai-codex -> codex-plugin-cc - config/aliases/editors.sh: edit-profiles opened a deleted file - custom_bins/claude-plugin-reset: step 5 re-applied a context profile via a claude-context binary that no longer exists, and its --global path had a top-level 'local' that would have errored if ever reached; --global/--force existed only to drive it - claude/hooks/{context_auto_apply,check_things_mcp}.sh: orphaned scripts, already dereferenced from settings.json in f89b1f4 scripts/audit/stale-claims.sh: check_context_profiles was permanently skipped (its yaml is gone). Replaced with check_plugin_manifest, which asserts every enabledPlugins entry is true - so a stray false gate is caught by the audit rather than by a confusing missing plugin. Left deliberately: custom_bins/claude-usage-audit still reads profiles.yaml for per-profile attribution, but guards with an exists() check and returns empty, so it degrades cleanly. Reworking its data model was out of scope here. bash -n / zsh -n pass on all five scripts; stale-claims reports the new check OK. Claude-Session: https://claude.ai/code/session_01WoJYQoyUNVUn56h87MHDQ7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the enable-first
claude-tools contextplugin system with the platform-native model: a single user-scope install manifest, and no per-project plugin state.Previously every repo needed a
.claude/context.yamlbefore its plugins worked, andclaude-tools contextwrote project-scopetrue/falsemaps for all 33 installed plugins — the source of the△"project settings override your user setting" warnings in/plugin.Now
enabledPluginsinclaude/settings.jsonlists the 24 kept plugins with an explicittrue. An explicittruewins at every scope, so the setup does not rely on the platform's undocumented no-entry default.Changes
context_auto_apply.shandcheck_things_mcp.shdeploy.sh: dropped theclaude-tools context --syncstep (marketplaces were already declared natively inextraKnownMarketplaces, so it was redundant) and the context-templates deploy block.claude/context.yamlandclaude/templates/contexts/profiles.yamlstatusline.sh: removed the now-deadcontext.yamlreaderextraKnownMarketplaces7 → 6: droppeddev-browser-marketplace; keptproductivity-tools, which still ships the macOS-onlybear-mcpclaude/docs/plugin-management.md; fixed theCLAUDE.mdreference, which pointed at a path that did not resolveAlso done outside the repo (live runtime): the 9 uninstalls, deregistering
rust-skillsanddev-browser-marketplace, and trashing 9temp_git_*cache dirs.Findings worth reading
projectscope, bound to the unrelatedquiet-hooksworktree viaprojectPath. Install records pinned to a worktree die with it. Plugins should be installed atuserscope;claude plugin listshows the Scope column.claude plugin uninstallresolves scope to the owning project, not the CWD — run from this worktree with the default--scope user, it editedquiet-hooks/.claude/settings.json. It also leaves install records behind, so "uninstalled" ≠ "absent frominstalled_plugins.json".defaultEnabledis absent for all 276 official plugins, and every installed plugin already carries an explicit entry, so there was no clean case to observe. This is the strongest argument for the all-truemanifest over an empty map.deploy.shruns no installs, and it is unconfirmed whether a user-scopetrueentry installs a missing plugin or only enables a present one. Treat the cross-machine claim as unproven until a second machine deploys.Verification
statusLine/hooks/permissionsgate passes onclaude/settings.json(per.claude/rules/dotfiles-settings.md); 24 entries, alltruezsh -n deploy.shandbash -n claude/statusline.shpassextraKnownMarketplaces(6)/pluginwarning/error count, which needs a fresh sessionhttps://claude.ai/code/session_01WoJYQoyUNVUn56h87MHDQ7
Status, split three ways (updated after the follow-up sweep, 9588dbc)
1. Landed in the repo — verified. The all-true 24-entry manifest, hook removals, marketplace list 7 -> 6, deploy.sh and statusline.sh cleanup, docs rewrite. Plus 9588dbc, which swept seven stale references the first pass missed: a CLAUDE.md row and a README section documenting the retired CLI, an
edit-profilesalias opening a deleted file, aclaude-plugin-resetstep calling a nonexistentclaude-contextbinary, and two orphaned hook scripts.stale-claims.shnow asserts the manifest is all-true instead of running a permanently-skipped profiles check.2. Changed in the live runtime, outside the repo. 9 plugins uninstalled;
rust-skillsanddev-browser-marketplacederegistered;temp_git_*cache dirs trashed. None of this is captured by the diff — a fresh machine gets the repo state, not this.3. Changed in another worktree — unintended. Running
claude plugin uninstallresolved scope to the owning project, which was the livequiet-hooksworktree, not the CWD. Net uncommitted delta there is one line:dev-browser@dev-browser-marketplace: falseremoved. Low harm (that plugin is uninstalled and its marketplace deregistered), and I deliberately did not touch the file again — it belongs to a running session.Acceptance criteria that do NOT pass
claude plugin uninstalledits enabledPlugins but leaves the install record. Not satisfiable by the CLI alone.Pre-existing, not caused by this PR
quiet-hooks/.claude/settings.jsoncarries 32 entries with 10 setfalse, includingtelegram,playwright,researchandwriting. Project scope beats the user-scopetruemanifest, so those stay off in that worktree. It dies with the worktree, so no action taken.Recommended follow-up
Every plugin on this machine is recorded as
"scope": "project"bound toquiet-hooks— install records pinned to a worktree die with it. Reinstall the 24 at--scope useronce no session is using that worktree.