Skip to content

docs: design + plan for marketplace & local plugins experiment toggle#733

Draft
Groenbech96 wants to merge 3 commits into
mainfrom
docs/plugins-experiment-spec-and-plan
Draft

docs: design + plan for marketplace & local plugins experiment toggle#733
Groenbech96 wants to merge 3 commits into
mainfrom
docs/plugins-experiment-spec-and-plan

Conversation

@Groenbech96

Copy link
Copy Markdown
Collaborator

What

Docs only — adds the design spec and the implementation plan for a new experiment toggle: marketplace & local agent plugins. No code changes.

  • docs/superpowers/specs/2026-07-03-marketplace-and-local-plugins-experiment-design.md
  • docs/superpowers/plans/2026-07-06-marketplace-and-local-plugins.md

Design summary

A config-driven plugins toggle (peer of instructions/skills/agents/mcp) that installs agent plugins into the running CLI so their skills are native during a run — measured like the other experiment levers.

  • Sources: marketplace (repo + pinned commit) or local (path). Per-entry enabled; multiple at once.
  • Activation via the CLI's real commands (plugin marketplace add + plugin install, user scope, both Copilot & Claude). Config injection (extraKnownMarketplaces/enabledPlugins) is not used — it is trust-dialog-gated and ignored in headless mode (verified live + corroborated by an independent write-up).
  • Commit pinning: the marketplace is cloned at its commit into <repo>/.bcbench/plugins/.
  • Cleanup: symmetric targeted teardown (uninstall + marketplace remove); .bcbench content wiped by the existing cleanup. No global/home residue.
  • Recording: ExperimentConfiguration.plugins: list[str] ("name@commit" / "name@local").
  • AL-LSP untouched.

Full plugin lifecycle was verified live on both CLIs (non-interactive, offline, reversible).

Plan

Seven TDD tasks: ExperimentConfiguration.plugins field → clone_at_commit git helper → plugin_operations.py (materialize + install/teardown) → Copilot & Claude runner wiring → config/docs/mock + full-suite verification.

Note

This PR is the entry point for reviewing the approach before implementation — merging is optional.

…gins experiment toggle

Adds a design spec and a task-by-task implementation plan for a new experiment
toggle that installs agent plugins (a marketplace pinned to a git commit, or a
local marketplace) into the running CLI via its own 'plugin marketplace add' +
'plugin install' commands, records them in ExperimentConfiguration, and removes
them after the run. Docs only; no code changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
design reuses that runtime-created, repo-local root to hold cloned marketplace
content.

### 2.3 Why the commands (config injection does not work headless)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugins install at user scope (§2.3 says project scope is ignored headless), so the shared /.copilot//.claude store means concurrent runs can race — one entry's marketplace remove teardown can rip out a plugin another in-flight entry is still using; please state whether plugins-enabled runs must be serialized or add per-run locking/refcounting.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it due to my limited knowledge on how experiments are executed.
Are they running on the same machine?

@gggdttt gggdttt Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For code-review every task should be a new VM. So it should not be affected.
But I remember for bug-fix sometimes it could be the same machine.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed. Verified against copilot-evaluation.yml: entries run with max-parallel: 64 on the shared self-hosted GitHub-BCBench runner (bug-fix / test-generation), and the CLI plugin store is user-scope/global — so concurrent installs and one entry's marketplace remove racing another in-flight entry is a real problem, exactly as described. code-review (ubuntu-latest) and nl2al (windows-latest) get fresh VMs and are unaffected (thanks @Groenbech96 / @gggdttt for pinning that down).

Fix (pushed, commit 469ac69): each entry now installs into a fresh per-entry config home (COPILOT_HOME / CLAUDE_CONFIG_DIR under <repo>/.bcbench/), applied to both the plugin commands and the agent launch. Concurrent entries no longer share global state, so there is no cross-entry race — and no teardown at all (the home is discarded with the checkout; a clean-before removes any stale one). Verified live on both CLIs: a fresh COPILOT_HOME accepts marketplace add/install, copilot skill list shows the installed plugin's skill, and a real copilot -p session runs (auth via the COPILOT_GITHUB_TOKEN the workflow already sets) with the real ~/.copilot untouched. See spec §2.5 (Concurrency) and §4.4.

@Groenbech96 Groenbech96 marked this pull request as draft July 6, 2026 08:04
agent_type: AgentType, cli_cmd: str,
) -> list[InstalledPlugin]: ...

def teardown_plugins(cli_cmd: str, installed: list[InstalledPlugin]) -> None: ...

@gggdttt gggdttt Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

§4.1's signature teardown_plugins(cli_cmd, installed) is missing the agent_type param that the plan (Task 4/5/6) uses — it's needed because Copilot uninstalls by plugin and Claude by plugin@marketplace. Please sync the spec to teardown_plugins(cli_cmd, agent_type, installed).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by removing teardown entirely. With the per-entry isolated config home (§2.5), there is nothing global to undo, so teardown_plugins is gone. setup_plugins_from_config now returns (plugin_records, env_overrides), and the runner merges env_overrides (COPILOT_HOME / CLAUDE_CONFIG_DIR) into the agent-launch env. Spec §4.1 / §4.6 and the implementation plan (Tasks 4-6) updated accordingly.

gggdttt
gggdttt previously approved these changes Jul 6, 2026
…iew)

Addresses review: execution-based categories run entries as a parallel matrix
(max-parallel 64) on a shared self-hosted runner, and the CLI plugin store is
user-scope/global, so concurrent installs/teardowns would race. Fix: install
into a fresh per-entry config home (COPILOT_HOME / CLAUDE_CONFIG_DIR under
.bcbench), applied to both the plugin commands and the agent launch. This
removes teardown entirely (isolated home discarded with the checkout) and moots
the teardown_plugins signature comment. Verified live on both CLIs (fresh home:
install + skill load + headless session, real config untouched).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r-entry home)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants