Repository navigation
Description
Parent
Refs #16428: Ship the plugin-profiles plugin and remove the core bundle
Depends on
- none: on the frontier now (after the build-time probes recorded in the plan)
Outcome
A user runs the plugin-profiles command-line tool to apply a profile to a folder: it previews every change, checks the prerequisites of each plugin it would switch on, writes only the plugin and hidden-skill entries in the folder's local settings in one all-or-nothing write, records what it changed, and clear puts the folder back exactly. Ships the always-on and build profiles.
Demo: apply build to a temporary project folder with --dry-run, then for real, start a session there and compare claude plugin list --json with the preview; run clear and the settings file matches its original byte for byte.
Decisions
- Q55: Node
.mjsengine, no npm packages, vendored YAML and config readers. - Q56: one YAML file per profile; every plugin id written
name@marketplace, shipped files included. - Q57: profiles live in the plugin, in
~/.claude/plugin-profiles/for the user, and in the repository's convention home. - Q58: the applied-profile record lives in the plugin's data folder and keeps each entry's value from before the tool's first write.
- Q62: write through a temp file and rename after re-checking the file's hash; one re-plan, then fail unchanged.
- Q64 / D8:
--dry-runpreview and a confirm before writing; anoff-pendingrecord state for a switch cut off between its two writes. - Q65: a profile governs only the marketplaces it names; other plugins are never written and are listed.
- Q66: same-named profiles extend the one below with
pluginsandremove. - Q67: profile keys
description,plugins,optional,remove,exclude,hide_skills. - AC26 (owner): missing required prerequisites are listed with install lines and stated consequence; writing needs an explicit yes; nobody to ask means no write.
- D4: the session-start inventory reads installed plugins without starting a nested
claude. - D6: the data folder is found from the script's own install path.
- harness-ops and context-budget stay in
always-onas interim members until the hook-unit item lands.
Key interfaces
From the design: a pure planner turns (profile catalog, inventory, settings layers, target) into a plan with writes, pinned, missing, untouched and hook-plugins-off lists; one module each owns profile files, the plugin inventory, settings reads and writes, and the applied-profile record. The CLI verbs are apply <name> --for session|folder|initial [--dry-run] [--yes], status, clear, inventory. Desired set = always-on ∪ profile members ∪ installed optional members ∪ repository-enabled ∪ dependencies − exclude; a committed false wins and is reported. Variation verdicts: settings files, the plugin CLI and the mods API are each contained in one module; no abstraction layer. Conventions followed: ADR 0019 (vendoring with a sync gate), ADR 0075 (repository convention home), the plugin philosophy's cross-platform contract, the prerequisites contract.
Review criterion (owner): "Make sure we're applying solid principles: Single Responsibility Principle, DRY, Single Source of Truth principle, so no duplication. Make sure we're adhering to general good practice, best practice, and software engineering principles: low coupling, high cohesion; things that change together live together; feature vertical slice architecture."
Done when
- AC1, AC16, AC17, AC18, AC23, AC24: planner table tests cover the desired set, governed marketplaces, repository plugins, pins, hidden skills and the always-on rule, and pass under
node --test. - AC3: a user
build.yamlwith onepluginsline and oneremoveline extends the shipped one in a test. - AC8, AC21: a forced failure and a concurrent-writer race each leave the settings file unchanged in a CLI test. (The Windows rename retry moved to Verify the plugin-profiles CLI on the Windows lane and time status on the owner's machine #16455.)
- AC19:
clearafterapplyrestores the file byte for byte (cmpexits 0); with no file before the apply,clearremoves it. - AC26: a fixture plugin with a missing required prerequisite makes
apply --yesexit non-zero with the file unchanged; the preview lists the tool, install line and stated consequence. - Only
enabledPluginsandskillOverrideschange:jq -S 'del(.enabledPlugins,.skillOverrides)'before and after is identical. status --jsontiming on the owner's machine moved to host-run Verify the plugin-profiles CLI on the Windows lane and time status on the owner's machine #16455.- AC7 (process criterion of this container): the container's PR also removes
core.
Out of scope
- The
/plugin-profilecommand, the guided setup, the other five profiles, and thecoreremoval: their own items in this container. - Moving harness-ops' hooks: its own item.
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 15, 2026
Size: Large
Complexity: High
Uncertainty: Knowable
Flags: none
Blocked by: none
Understood: you want a plugin-profiles command-line tool that applies a profile (
always-on,build) to a folder. It previews every change, checks each plugin's prerequisites, and writes onlyenabledPluginsandskillOverridesin the folder's local settings in one all-or-nothing write. It records what it changed, andclearrestores the file byte for byte.The body states the outcome, decisions and done-when items exactly, so I asked no open questions. Some done-when items need a person or another host, namely the
status --jsontiming on the owner's machine and the Windows rename retry on the Windows lane. They are not a reason to hold the issue.This is a large, multi-module piece of work (planner, profile files, inventory, settings writer, applied-profile record, CLI). It probably needs splitting. The build-time probes mentioned under "Depends on" may settle some approach details.
No duplicate open issues and no merged pull request that already covers this. Parent: #16428.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 15, 2026
Not admitted to the issue lane: its done-when asks for what an unattended lane run cannot perform: item 3 (named-host: "AC8, AC21: a forced failure and a concurrent-writer race each leave the setti..."), item 7 (named-host: "status --json runs in under 2 s on the owner's machine."); recommended split: keep the other items here as the admissible issue and move these to a child issue for the host queue (
host-run). Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Nov 15, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: A new plugin-profiles plugin ships an apply/status/clear/inventory Node CLI that applies the always-on and build profiles to a folder's local settings, writing only enabledPlugins and skillOverrides atomically and restoring byte for byte on clear.
Related work
Open questions
RECOMMENDED: No. Treat AC7 as a container-level check owned by #16436, drop it from this issue's done-when, and keep this PR to the new plugin only. Basis: 16436
RECOMMENDED: Name the plan file path and probe results in the issue, or list the probes as a dependency, so a run does not guess plugin CLI and settings-layer behavior. Basis: judgment
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.