Skip to content

feat(plugins): fix Codex install, default-install a set, pre-flight every skill - #1193

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/plugin-defaults-and-skill-preflight
Sep 10, 2026
Merged

feat(plugins): fix Codex install, default-install a set, pre-flight every skill#1193
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/plugin-defaults-and-skill-preflight

Conversation

@potiuk

@potiuk potiuk commented Sep 10, 2026

Copy link
Copy Markdown
Member

What

Five changes that trace to one gap: nothing checked what the plugin manifests actually claim, and nothing checked whether an installed plugin had been set up.

Codex install was broken. .agents/plugins/marketplace.json carried invented policy values (manual, none). Codex's enums are closed and SCREAMING_SNAKE, and it rejects the whole catalogue on an unknown variant — so codex plugin marketplace add apache/magpie failed and nothing installed. Fixed to AVAILABLE and verified live against codex 0.154.0. check-family-plugins.py now validates both policy enums, so the class of bug cannot return. These manifests had been checked against vendor docs but never live-installed — the first real run is what found it.

A stale published claim. The all-in-one plugin advertised ~21.7k always-on tokens; the measured figure is ~8.6k.

A default-installed set. A project can commit enabledPlugins so a contributor arrives with magpie-setup, magpie-utilities and magpie-agent-guard already enabled. Documented per harness, including why only Claude Code can express it: per-family plugins are Claude Code-only (AP1 forbids a symlink escaping the plugin root), so Codex could only default-install all ten families; Gemini has no workspace-extension mechanism — verified against the CLI, which reports "No extensions installed" for a repo-local extension.

JetBrains IDEs. Documented as a host, not a distribution target: plugin state lives in one user-scope store shared by every host of the same CLI, so a marketplace added in a terminal is already there in the IDE. Junie remains a separate harness port (#321).

A shared setup pre-flight in every skill. locks.md already claimed a drift check ran "on every framework-skill invocation"; nothing implemented it. It can't be a hook — on most harnesses no code runs on plugin install or upgrade — and it can't be an include, because a family plugin's symlinks may not escape its root. So it is one source (tools/dev/preflight-block.md) propagated into 65 skill bodies by check-skill-preflight.py --fix, with a pre-commit hook preventing drift. The setup family is exempt: those skills perform the setup.

Also excludes hooks/ from the in-place pre-commit fixers — the sandbox write-denies hook scripts, which aborted prek run --all-files on a file needing no fix.

Testing

prek run --all-files passes clean. The Codex fix was verified end-to-end against a real codex plugin marketplace add + plugin list; the enum guard was verified to reject the original bad values; the pre-flight generator was verified for generation, idempotence, family exemption, and source-to-skills propagation.

Not included

The quick-start page and screenshot work, and the marketplace-first setup-skill rewrite, are on a separate branch — the latter depends on the quick-start page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KkTvGHyYCFW5TritQK2pgy

…very skill

Five changes that all trace back to the same gap: nothing checked what the
plugin manifests actually claim, and nothing checked whether an installed
plugin had been set up.

- **Codex install was broken.** `.agents/plugins/marketplace.json` carried
  invented `policy` values (`manual`, `none`). Codex's enums are closed and
  SCREAMING_SNAKE, and it rejects the *whole catalogue* on an unknown
  variant — so `codex plugin marketplace add apache/magpie` failed and
  nothing installed. Fixed to `AVAILABLE`, verified live against codex
  0.154.0, and `check-family-plugins.py` now validates both policy enums so
  the class of bug cannot return. The manifests had been checked against
  vendor docs but never live-installed.

- **A stale published claim.** The all-in-one plugin advertised ~21.7k
  always-on tokens; the measured figure is ~8.6k.

- **A default-installed set.** A project can commit `enabledPlugins` so a
  contributor arrives with `magpie-setup`, `magpie-utilities` and
  `magpie-agent-guard` already on. Documented per harness, including why
  only Claude Code can express it: per-family plugins are Claude Code-only,
  so Codex could only default-install all ten families, and Gemini has no
  workspace-extension mechanism at all (verified against the CLI).

- **JetBrains IDEs.** Documented as a host, not a distribution target —
  plugin state lives in one user-scope store shared by every host of the
  same CLI, so installing in a terminal covers the IDE. Junie remains a
  separate harness port (apache#321).

- **A shared setup pre-flight in every skill.** `locks.md` already claimed a
  drift check ran "on every framework-skill invocation"; nothing implemented
  it. It cannot be a hook (no code runs on plugin install/upgrade on most
  harnesses) and cannot be an include (a family plugin's symlinks may not
  escape its root under AP1), so it is one source propagated into 65 skill
  bodies by `check-skill-preflight.py --fix`, with a hook preventing drift.
  The `setup` family is exempt — those skills perform the setup.

Also excludes `hooks/` from the in-place pre-commit fixers: the sandbox
write-denies hook scripts, which aborted `prek run --all-files` on a file
that needed no fix.

Generated-by: Claude Code (Opus 5)
@potiuk
potiuk merged commit 227fcba into apache:main Sep 10, 2026
44 checks passed
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.

1 participant