Skip to content

feat(pack): generate .codex-plugin/plugin.json for targets: [codex] - #3906

Merged
Daniel Meppiel (danielmeppiel) merged 9 commits into
mainfrom
danielmeppiel-codex-plugin-manifest
Nov 19, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 9 commits into
mainfrom
danielmeppiel-codex-plugin-manifest

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

apm pack now writes .codex-plugin/plugin.json alongside the Claude and Copilot manifests when apm.yml targets: includes codex. A package listed in an APM-generated Codex marketplace (marketplace.outputs.codex) then installs in Codex CLI under its real version, with its skills and MCP servers loaded and no hand-written JSON.

On main, targets: [codex] fails with "Nothing to pack". A plugin directory with no manifest Codex can read installs as version local, and Codex writes a stand-in manifest that holds only the name and category.

What changed

  • Owner src/apm_cli/core/plugin_manifest.py: adds the codex row to PLUGIN_MANIFEST_ECOSYSTEMS and PLUGIN_ECOSYSTEM_PATHS (.codex-plugin/plugin.json). build_plugin_manifest(..., "codex") emits:
    • the identity fields synthesized from apm.yml: name, version, description, author, license, homepage, repository, keywords;
    • "skills": "./skills/" when a regular root skills/ directory exists;
    • "mcpServers": "./.mcp.json" when a regular root .mcp.json exists. Symlinks are skipped. Codex reads the author's own file, so no MCP server data is copied and no secrets are touched;
    • no interface block. Codex's compatibility parser does not derive one (it ignores author), so the plugin carries no Codex listing presentation metadata; generating it is out of scope;
    • a [!] warning when version, description or author is missing. The Codex format requires them.
  • Producer core/build_orchestrator.py: unchanged routing. The "Nothing to pack" error now lists the ecosystems from the owner instead of a hard-coded 'claude' or 'copilot'.
  • Static guard: new owner record pack-plugin-manifests (.apm/architecture/owners/marketplace-plugins.json) and rule marketplace-integrations-pack-plugin-manifests. The rule requires PLUGIN_ECOSYSTEM_PATHS and build_plugin_manifest to be defined only in the owner. It also forbids host-manifest path literals (.claude-plugin, .codex-plugin, .github/plugin) anywhere else in the pack surface (core/, bundle/, commands/pack.py). The rule is in the frozen rule inventory and has a sorted mutation case.
  • Docs: reference/cli/pack.md (Plugin manifests table and Codex rules), producer/publish-to-a-marketplace.md (Codex entries need the manifest; tested surface stated), packages/apm-guide/.apm/skills/apm-usage/commands.md, pack --help, and a CHANGELOG line.

Codex plugin manifest contract (primary sources)

OpenAI, Upload and submit your plugin -> Manifest fields, "Package identity and components" (quoted exactly, Codex-relevant rows):

Field Requirement Value and use
$schema Required for Agent Plugins; omit for Codex Required for the portable format: https://agent-plugins.org/schemas/1.0.0/plugin.schema.json. Omit it from a standalone Codex compatibility manifest.
name Required Required stable identifier, at most 64 characters. Use lowercase letters, numbers, and single hyphens for packages you plan to submit. Keep it separate from the display name.
version Required for Codex; optional in the portable schema Release version, such as 1.0.0. Optional in the portable schema; use an explicit semantic version for submission and updates. Required in the Codex format.
description Required for Codex; optional for Agent Plugins Package summary, at most 4000 characters. Optional in the portable schema and required in the Codex format.
author Required for Codex; optional for Agent Plugins Publisher object with name, optional email, and optional HTTPS url. The portable schema allows this object to be omitted; the Codex format requires author.name. Use at most 120 characters for the name, 320 for email, and 2048 for the URL.
homepage Optional Optional HTTPS project homepage, at most 2048 characters. Set the listing's interface.websiteURL separately.
repository Optional Optional source repository URL.
license Optional Optional license identifier, such as MIT.
keywords Optional Optional array of discovery terms.
skills For Codex packages with skills Codex only: a relative directory path or array of paths containing skills, such as "./skills/". Portable packages discover skills/ automatically.
mcpServers For Codex packages with MCP servers Codex only: "./.mcp.json" for bundled MCP server configuration. Portable packages discover root mcp.json automatically.

The same page lists interface as "Required for Codex; optional for Agent Plugins", a presentation object for public-directory submission. Package your plugin says: "A separate .codex-plugin/plugin.json is optional and serves as a compatibility fallback when that object [extensions.com.openai] is absent."

Codex CLI source at tag rust-v0.170.0 (commit 29eb79e9866b3262a777fdf8195c1b9e63684c91):

  • codex-rs/utils/plugins/src/plugin_namespace.rs find_plugin_manifest_path: root plugin.json counts only when it carries an https://agent-plugins.org/schemas/ $schema. Otherwise Codex checks DISCOVERABLE_PLUGIN_MANIFEST_PATHS (codex-rs/exec-server-protocol/src/protocol.rs) in this order: .codex-plugin/plugin.json, .claude-plugin/plugin.json, .cursor-plugin/plugin.json.
  • codex-rs/core-plugins/src/manifest.rs RawPluginManifest reads name, version, description, keywords, skills (path or paths), mcpServers (path or object), apps, hooks, interface, extensions. loader.rs defaults: skills, .mcp.json, hooks/hooks.json.

APM's default Claude-format bundle writes root plugin.json without $schema, so Codex ignores it. That is why the manifest has to sit in the plugin directory itself.

Issue and approved scope

Issue: Fixes #3077

Human scope-approval comment: #3077 (comment) (strict apm-scope:v1; scripts/governance/authority.cjs evaluateIssue returns record-present, approver and review contact Daniel Meppiel (@danielmeppiel)). It narrows the accepted October 1 scope (#3077 (comment)) to the 0.37 delivery Daniel approved. Context: #3077 (comment).

This PR completes the recorded scope. Out of scope, unchanged: generated interface / extensions.com.openai data, the apm.yml extensions passthrough, displayName (#3076), Codex desktop or hosted parity, hooks or agents claims, writing the file inside packed bundles, and any automatic Codex trust, consent or MCP authentication.

Reporter Roger Siegenthaler (@siegenthalerroger): thank you for the spike on Codex 0.162.1. It matches what 0.170.0 does: --format agent-plugin still works through its schema-declared root plugin.json (no sidecar needed), and this PR covers the targets: route for plugin-shaped package directories.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass (targeted suites below; CI is the authority)
  • Added tests for new functionality (if applicable)

Real Codex CLI verification

Versions: codex-cli 0.170.0 (/opt/homebrew/bin/codex, CLI surface only), APM from this branch (Agent Package Manager (APM) CLI version 0.36.1 (b7520981a5)), macOS. Every run uses a fresh, isolated CODEX_HOME.

The fixture is a plugin-shaped package (skills/hello/SKILL.md, a stdio .mcp.json, apm.yml with targets:) under market/plugins/hello-codex, plus a marketplace apm.yml with outputs: {codex: {}} and a local packages: entry. The recipe script (below) packs the package, packs the marketplace, then runs:

codex plugin marketplace add "$W/market"
codex plugin add hello-codex@apm-fixture-market
codex plugin list --marketplace apm-fixture-market
codex mcp list
codex debug prompt-input "hi" | grep -o 'hello-codex:hello: [^(]*(file: [^)]*)'

Baseline (main @ fec774d, TARGETS='[codex]'):

Error: apm.yml has neither 'dependencies:' nor 'marketplace:' block, and 'target:' does not include 'claude' or 'copilot'. Nothing to pack. ...

A default apm pack bundle (no readable manifest) listed in the same marketplace installs as .../hello-codex/local, VERSION local. Codex writes {"name": "hello-codex", "category": "Productivity", "interface": {"category": "Productivity"}} as its stand-in .codex-plugin/plugin.json.

This branch (TARGETS='[codex]'):

== apm pack (package) ==
[+] Generated plugin manifest: .../market/plugins/hello-codex/.codex-plugin/plugin.json
== codex ==
codex-cli 0.170.0
Added plugin `hello-codex` from marketplace `apm-fixture-market`.
Installed plugin root: .../codex-home/plugins/cache/apm-fixture-market/hello-codex/1.2.3
PLUGIN                          STATUS              VERSION  SOURCE
hello-codex@apm-fixture-market  installed, enabled  1.2.3    .../market/plugins/hello-codex
Name          Command  Args                       Env  Cwd  Status   Auth
fixture-echo  node     -e process.stdin.resume()  -    -    enabled  Unsupported
-- installed .codex-plugin/plugin.json
{"name": "hello-codex", "version": "1.2.3", "description": "Greeting workflow packed by APM",
 "author": {"name": "APM Fixture"}, "license": "MIT", "skills": "./skills/", "mcpServers": "./.mcp.json"}
hello-codex:hello: Greet the user with a friendly APM fixture message. (file: r2/hello-codex/1.2.3/skills/hello/SKILL.md)

The catalog entry name hello-codex and source.path ./plugins/hello-codex match the manifest name and the directory Codex installed.

This branch (targets: [claude, copilot, codex]): all three manifests are written. Codex installs 1.2.3, lists fixture-echo and exposes hello-codex:hello (Codex prefers .codex-plugin/ over .claude-plugin/).

APM consumer checks (no regression):

  • An .apm/-layout package with the new file installs at project scope as apm_package. Its targets: [codex] restriction skips Claude deployment exactly as it does without the file.
  • apm install -g --target codex <package> with isolated HOME/CODEX_HOME goes through the existing Codex-native consumer ([BUG] Plugins whose manifest is .codex-plugin/plugin.json lose their MCP servers (typed skill_bundle) #2992): "Reconciled 1 Codex native plugin registration(s) at user scope. New plugins stay disabled". Then codex plugin list shows installed, disabled 1.2.3. Activation and MCP authorization stay with Codex.
  • A plugin-shaped package whose only host manifest is .codex-plugin/plugin.json is treated by APM as a Codex compatibility plugin. That route is user-scope only, so project installs refuse it with the existing guidance (apm install -g --target codex). Adding claude or copilot to targets: keeps project installs working.
Recipe script (re-runnable)
#!/usr/bin/env bash
# Usage: TARGETS='[codex]' run-recipe.sh <apm-command> <workdir>
set -euo pipefail
APM="$1"; W="$2"
rm -rf "$W"; mkdir -p "$W/market/plugins/hello-codex/skills/hello"
P="$W/market/plugins/hello-codex"
cat > "$P/apm.yml" <<YML
name: hello-codex
version: 1.2.3
description: Greeting workflow packed by APM
author: APM Fixture
license: MIT
targets: ${TARGETS:-[claude, copilot, codex]}
YML
cat > "$P/skills/hello/SKILL.md" <<'MD'
---
name: hello
description: Greet the user with a friendly APM fixture message.
---

Greet the user warmly and mention the APM fixture.
MD
printf '%s\n' '{"mcpServers": {"fixture-echo": {"command": "node", "args": ["-e", "process.stdin.resume()"]}}}' > "$P/.mcp.json"
echo "== apm pack (package) =="; (cd "$P" && $APM pack 2>&1)
echo "== generated manifests =="; (cd "$P" && for f in .claude-plugin/plugin.json .github/plugin/plugin.json .codex-plugin/plugin.json; do echo "-- $f"; cat "$f" 2>/dev/null || echo "(absent)"; done)
cat > "$W/market/apm.yml" <<'YML'
name: apm-fixture-market
version: 0.1.0
description: APM fixture marketplace for Codex
license: MIT
marketplace:
  owner:
    name: apm-fixture
  outputs:
    codex: {}
  packages:
    - name: hello-codex
      source: ./plugins/hello-codex
      version: 1.2.3
      description: Greeting workflow packed by APM
      category: Productivity
YML
echo "== apm pack (marketplace) =="; (cd "$W/market" && $APM pack 2>&1 | grep -E '^\[' | head -3); cat "$W/market/.agents/plugins/marketplace.json"
export CODEX_HOME="$W/codex-home"; mkdir -p "$CODEX_HOME"
echo "== codex =="; codex --version
codex plugin marketplace add "$W/market"
codex plugin add hello-codex@apm-fixture-market
codex plugin list --marketplace apm-fixture-market
codex mcp list
echo "-- installed .codex-plugin/plugin.json"; cat "$CODEX_HOME"/plugins/cache/apm-fixture-market/hello-codex/*/.codex-plugin/plugin.json || true; echo
(cd "$W" && codex debug prompt-input "hi" | grep -o 'hello-codex:hello: [^(]*(file: [^)]*)' | head -1)

Automated checks (local)

  • uvx [email protected] check src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py: passed
  • uvx [email protected] format --check (same paths): passed
  • .venv/bin/python -m pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py: passed (10.00/10)
  • bash scripts/lint-auth-signals.sh: passed
  • bash scripts/lint-architecture-boundaries.sh: passed (exit 0)
  • pytest tests/unit/core/test_plugin_manifest.py tests/unit/core/test_build_orchestrator.py tests/integration/test_pack_unified.py tests/unit/commands/ -k "plugin_manifest or build_orchestrator or pack" -p no:xdist: 483 passed
  • pytest tests/integration/test_architecture_owner_rule_mutations.py tests/unit/scripts/test_architecture_runner.py -k "pack-plugin-manifests or pack_plugin or inventory or coverage" -p no:xdist: 18 passed (includes the new mutation case and the frozen rule inventory); -k "every_registered or covers or sorted or matrix_covers": 2 passed

All runs used the PR merge state (this branch merged with main @ f823cd0).

Changelog

  • One line under ## [Unreleased] in CHANGELOG.md: user-visible
    effect first, 25 words or fewer, ending with (#PR); see
    .github/instructions/changelog.instructions.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • Spec edit
  • Manifest edit
  • Test edit
  • CONFORMANCE.{md,json} regenerated
  • N/A -- this PR does not change OpenAPM-observable behaviour. (The commit carries an apm-spec-waiver: line: producer-side Codex plugin.json generation extends the existing pack manifest owner.)

apm pack now writes the documented Codex compatibility manifest alongside
the Claude and Copilot manifests when targets: includes codex. The owner
core/plugin_manifest.py adds the codex ecosystem: identity fields from
apm.yml plus "./skills/" and "./.mcp.json" path references when those
regular root paths exist, so Codex reads the author's MCP file natively and
no server data is copied. No interface block is generated. A new
architecture guard keeps host manifest paths inside the owner.

Verified with Codex CLI 0.170.0: an APM-generated Codex marketplace entry
installs with its real version, loads the skill and lists the MCP server.

Refs #3077

apm-spec-waiver: producer-side Codex plugin.json generation extends the existing pack manifest owner; no OpenAPM normative requirement changes

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 08:49
apm-spec-waiver: producer-side Codex plugin.json generation extends the existing pack manifest owner; no OpenAPM normative requirement changes

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documentation incorrectly implies that portable bundles need additional Codex manifests and that Codex derives listing text from author metadata, misleading authors about compatibility and presentation behavior.

2 open issues
What changed in this PR

Adds Codex compatibility-manifest generation to apm pack, extending the existing Claude and Copilot manifest builder for plugin directories published through Codex marketplaces.

Changes:

  • Generates .codex-plugin/plugin.json with package identity and references to existing skills and MCP configuration.
  • Registers a canonical manifest owner and architecture guard, with regression and mutation tests.
  • Updates CLI help, publishing documentation, the usage guide, and changelog.
File Description
tests/​unit/​scripts/​test_architecture_runner.py Adds the guard to the frozen rule inventory.
tests/​unit/​core/​test_plugin_manifest.py Tests Codex identity, component references, warnings, and paths.
tests/​unit/​core/​test_build_orchestrator.py Tests Codex-only generation and supported-target diagnostics.
tests/​integration/​test_architecture_owner_rule_mutations.py Adds a manifest-path ownership mutation case.
src/​apm_cli/​core/​plugin_manifest.py Implements Codex manifest generation.
src/​apm_cli/​core/​build_orchestrator.py Derives supported ecosystems in the error message from the owner.
src/​apm_cli/​commands/​pack.py Adds Codex to command help.
scripts/​architecture_linter/​checks/​marketplace_pack_plugin_manifests.py Guards centralized manifest definitions and paths.
scripts/​architecture_linter/​checks/​marketplace_integration_analyzers.py Registers the new architecture check.
packages/​apm-guide/​.apm/​skills/​apm-usage/​commands.md Documents Codex manifest generation in the usage guide.
docs/​src/​content/​docs/​reference/​cli/​pack.md Describes Codex output and component handling.
docs/​src/​content/​docs/​producer/​publish-to-a-marketplace.md Adds Codex publishing guidance and tested-scope notes.
CHANGELOG.md Announces Codex manifest support.
.apm/​architecture/​owners/​marketplace-plugins.json Records the canonical pack-manifest owner.

Review effort: Balanced

Codex 0.170.0 reads schema-declared root plugin.json from agent-plugin
bundles and the .cursor-plugin fallback, so only directories with none of
those manifests install as 'local'. The legacy Codex parser does not read
author and leaves interface absent, so a generated compatibility manifest
carries no listing presentation metadata. Addresses Copilot inline review
on publish-to-a-marketplace.md:254 and reference/cli/pack.md:288.

apm-spec-waiver: producer-side Codex plugin.json generation extends the existing pack manifest owner; no OpenAPM normative requirement changes

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.37.0 milestone Nov 19, 2026
@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

APM Review Panel: ship_with_followups

apm pack now writes .codex-plugin/plugin.json when apm.yml targets codex. It reuses the existing manifest owner and was checked end to end with codex-cli 0.170.0 (install, MCP list, skill load).

panel-mode=lean; personas=python-architect,doc-writer,test-coverage-expert,apm-ceo

cc Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

This PR delivers the accepted scope of #3077 and nothing more. When targets: includes codex, apm pack writes the Codex compatibility manifest that Codex reads: identity fields plus root skills/ and .mcp.json path references, with no interface block. It builds this through the existing owner in core/plugin_manifest.py and adds no translation layer. That follows the native-first, standards-led direction. The coordinator independently confirmed that real codex-cli 0.170.0 installs version 1.2.3, lists the MCP server and loads the skill. The deferred items (interface/extensions generation, writing the manifest inside packed bundles, desktop/hosted parity, hooks/agents) are correctly out of scope.

All three panelists agree on direction, and every finding is at the recommended tier. They point to one theme: the producer is correct for the happy path, but nothing ties it to APM's own Codex consumer or to the CLI surface users touch. The manifest path is now defined twice (PLUGIN_ECOSYSTEM_PATHS['codex'] and CODEX_COMPAT_MANIFEST), and no test checks the producer output against load_codex_compatibility_manifest. There is no CLI-tier apm pack test with targets: [codex]. The unit tests do fail on main, so the regression is caught at the unit tier; the CLI-tier gap is integration coverage, not correctness.

The doc findings are the user-facing version of the same gap. A producer who uses APM's own layout (.apm/skills/, mcp: in apm.yml) gets a version in the manifest but no skills or MCP references, and the docs never say so. The publish example also leaves out apm pack, the commit step and --force, so a version bump can leave a stale Codex manifest in place. All of these fit inside the PR's scope and are cheap to fold.

Dissent. The panelists do not disagree. The CLI-tier outcome: missing gets extra weight because it sits on the portable-by-manifest surface.

Aligned with: Portable by manifest: targets: now produces the native Codex manifest a real client consumes. Multi-harness: Codex joins Claude and Copilot through the same owner, with desktop and hosted parity deferred. Pragmatic as npm: one command and standard output, once the docs show the pack, commit and --force steps. Secure by default: unaffected; only path references and identity fields are emitted. OSS: delivers accepted community issue #3077 under a strict scope record.

Panel summary

Persona B R N Takeaway
Python Architect 0 3 0 Extending core/plugin_manifest.py is the right owner, but the Codex manifest path is now declared twice and the new guard misses the second one.
Doc Writer 0 3 0 Docs match the code and the folded Copilot fixes hold. Say skills and MCP must live at the package root, and add the pack, commit and --force steps.
Test Coverage Expert 0 3 0 Unit tests catch the codex regression (they fail on main). No CLI-tier pack test covers targets:[codex], and the agent-plugin and dry-run paths have no codex-specific test.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 5 follow-ups

  1. [Test Coverage Expert] Add a CLI-tier test that runs apm pack with targets: [codex] and checks .codex-plugin/plugin.json. Also cover dry-run, keep-existing, --force, and the mixed-target agent-plugin case. -- This is outcome: missing on the portable-by-manifest surface.
  2. [Python Architect] Add a round-trip test of the producer output into load_codex_compatibility_manifest, and warn when the name fails the reader's regex (reuse that regex). -- APM should not ship a Codex manifest its own consumer rejects.
  3. [Python Architect] Keep a single definition of the Codex manifest path and extend the guard to codex_plugins/. -- Two literals for one path let a future move split the producer from the consumer.
  4. [Doc Writer] State the root skills/ and .mcp.json requirement on all three doc surfaces, add the pack, commit and --force steps to the publish example, and trim the CHANGELOG line so it promises only what is unconditional. -- Without these, producers get stale or empty Codex manifests and no explanation.
  5. [Python Architect] Make build_plugin_manifest raise on an unknown ecosystem instead of falling through to the Copilot shape, and add a per-ecosystem key-set test. Track the full dispatch-table refactor post-merge. -- The silent fallback would give a fourth ecosystem the wrong manifest shape.

Recommendation

The direction is right and a real Codex client has proven it works. Fold the five in-scope items above before landing. The highest-value one is the CLI-tier apm pack test with targets: [codex] plus the round-trip check against load_codex_compatibility_manifest: together they keep APM's Codex producer and consumer in agreement. Only the broader dispatch-table refactor should be tracked after merge.


Full per-persona findings

Python Architect

  • [recommended] The Codex manifest path now has two owners: PLUGIN_ECOSYSTEM_PATHS['codex'] repeats CODEX_COMPAT_MANIFEST, at src/apm_cli/core/plugin_manifest.py:72
    The reader and the consumer lookup use codex_plugins/manifest.py:13. The new guard does not scan codex_plugins/, so the two literals could drift.
    Suggested: Use one constant and extend the guard.
  • [recommended] No check that APM's own Codex reader accepts the producer output, at src/apm_cli/core/plugin_manifest.py
    load_codex_compatibility_manifest requires a safe native name. The producer copies name through without warning.
    Suggested: Add a round-trip unit test and warn using the reader's regex.
  • [recommended] build_plugin_manifest still uses copilot as the silent else-branch
    A new ecosystem would silently get the Copilot shape.
    Suggested: Raise on unknown and add a key-set test.

Doc Writer

  • [recommended] .apm/skills/ and apm.yml mcp: end up in no Codex reference, at docs/src/content/docs/producer/publish-to-a-marketplace.md:249
    A producer following APM's own layout gets a version but no skills or MCP references.
  • [recommended] The publish example has no apm pack, commit or --force step, at docs/src/content/docs/producer/publish-to-a-marketplace.md:258
    An existing plugin.json is kept without --force, so a version bump leaves a stale Codex manifest.
  • [recommended] The CHANGELOG line over-promises skills and MCP servers, at CHANGELOG.md:29
    Only the version is unconditional.

Test Coverage Expert

  • [recommended] No CLI-tier test runs apm pack with targets: [codex], at tests/integration/test_pack_unified.py:462
    Proof (missing at): tests/integration/test_pack_unified.py -- proves: a plugin author whose apm.yml targets codex gets a Codex manifest instead of 'Nothing to pack'. [multi-harness-support,devx]
  • [recommended] No mixed-target test shows codex is written under agent-plugin while claude is skipped, at tests/unit/core/test_build_orchestrator.py:498
    Proof (missing at): tests/unit/core/test_build_orchestrator.py -- proves: the Agent Plugin format drops only the Claude sidecar. [multi-harness-support,vendor-neutral]
  • [recommended] Dry-run, keep-existing and --force are untested for .codex-plugin/plugin.json
    Proof (missing at): tests/integration/test_pack_unified.py -- proves: --dry-run writes nothing and a re-run never overwrites without --force. [secure-by-default,devx]

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.


Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.

Folds the lean review panel on #3906. codex_plugins/manifest.py now derives
CODEX_COMPAT_MANIFEST from PLUGIN_ECOSYSTEM_PATHS and exposes
is_safe_codex_plugin_name, which pack reuses to warn on names APM's Codex
route rejects. build_plugin_manifest raises on an unknown ecosystem instead
of falling through to the Copilot shape, and the static guard now scans
codex_plugins/. Adds a CLI-tier pack test (dry-run, keep-existing, --force),
a mixed-target agent-plugin test and a reader round-trip test, each proven
by mutation-break. Docs state the root skills/ and .mcp.json requirement and
the pack, commit and --force steps; the CHANGELOG line no longer
over-promises.

apm-spec-waiver: producer-side Codex plugin.json generation extends the existing pack manifest owner; no OpenAPM normative requirement changes

Co-authored-by: Copilot App <[email protected]>
apm-spec-waiver: producer-side Codex plugin.json generation extends the existing pack manifest owner; no OpenAPM normative requirement changes

Co-authored-by: Copilot App <[email protected]>
Folds the delta review panel on #3906. is_safe_codex_plugin_name now lives
in core/plugin_manifest.py next to PLUGIN_ECOSYSTEM_PATHS; the Codex reader
and the native registrar's persisted-record check call it, so the lazy
core-to-adapter import and the third regex copy are gone, and the guard
forbids that rule literal on the pack and Codex surface. A parametrized
test pins pack warning == reader rejection, and the dry-run check now
asserts the project tree is byte-for-byte unchanged (both mutation-broken).
The publish example shows the root marketplace wiring and the commit step,
and the name-rule docs name the first-character rule and its consequence.

apm-spec-waiver: producer-side Codex plugin.json generation extends the existing pack manifest owner; no OpenAPM normative requirement changes

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

APM Review Panel: ship_with_followups

PR #3906 lets apm pack produce a native Codex plugin marketplace. Real codex-cli 0.170.0 installs it, and every delta-pass finding was folded.

panel-mode=delta; personas=python-architect,doc-writer,test-coverage-expert,apm-ceo

cc Sergio Sisternes (@sergio-sisternes-epam) -- a fresh advisory pass is ready for your review.

Delta since the lean pass at ce3222c. All five lean follow-ups were folded in db89805: one Codex manifest path constant, a reader round-trip test and safe-name warning, a raise on unknown ecosystem, CLI-tier pack coverage, and doc/CHANGELOG accuracy. The delta panelists confirmed those folds hold and raised five smaller items. All five were folded in this pass:

  • Python Architect: the safe-name rule had moved into the Codex adapter, core imported it lazily, and registrar.py kept a third copy. is_safe_codex_plugin_name now lives in core/plugin_manifest.py, and both Codex consumers import it. The guard forbids the rule literal on the pack and Codex surface; a mutation that re-adds the regex in registrar.py is reported.
  • Test Coverage Expert: test_codex_name_warning_matches_reader_rejection (6 names) asserts that pack warns exactly when APM's Codex reader rejects a name; it fails with the reader guard removed. The --dry-run check is now a byte-for-byte tree snapshot; it fails with the writer's dry-run guard removed.
  • Doc Writer: the publish example now shows the root marketplace wiring and a commit step. The name-rule docs give the first-character rule and its consequence.

At final head 30612fe, the real codex-cli 0.170.0 recipe installs the plugin enabled at version 1.2.3, lists the fixture-echo MCP server, and exposes the hello skill. The functional suites pass: pack CLI, producer, owner unit plus the mutation case, Codex native admission, registrar, and intent. Ruff, pylint R0801, auth-signal and architecture-boundary lints are clean.

Aligned with: Portable by manifest: one path constant and a reader round-trip test. Secure by default: one safe-name rule, pack warning and reader rejection proven to agree, and dry-run proven to write nothing. Multi-harness: verified against real codex-cli 0.170.0. Pragmatic as npm: the publish docs cover wiring, commit and push.

Panel summary

Persona B R N Takeaway
Python Architect 0 1 0 All three folds hold; the one remaining back edge (name rule in the adapter) is folded.
Doc Writer 0 3 0 All three folds are accurate; example wiring, commit step and name-rule wording are now folded.
Test Coverage Expert 0 2 0 All three prior folds close their gaps; the paired name trap and the dry-run snapshot are now folded.

B = blocking-severity findings, R = recommended, N = nits.
Counts are signal strength, not gates. The maintainer ships.

Top 2 follow-ups

  1. [Python Architect] Post-merge: replace the per-ecosystem branching in the pack producer with a full dispatch table. -- The raise on unknown ecosystem already prevents silent fallthrough; a table makes the next ecosystem cheap to add.
  2. [Python Architect] Post-merge: use the same guard regexes across ecosystem surfaces. -- One convention keeps a rule from being duplicated again when the next adapter lands.

Recommendation

Ship #3906 in 0.37.0 once CI on 30612fe is green. All in-scope findings from the lean and delta passes are folded, and the key guarantees are enforced by tests shown to fail when their guards are removed. Track the dispatch-table refactor and guard-regex uniformity as post-merge issues; the dispatch table is the higher-signal follow-up.


Full per-persona findings (delta)

Python Architect

  • [recommended] The name rule lived in the adapter and was copied in registrar.py, at src/apm_cli/core/plugin_manifest.py:414
    Core reached back into codex_plugins through a lazy import. Folded: the rule now lives in the owner.

Doc Writer

  • [recommended] The Codex example lacked root marketplace wiring, at docs/src/content/docs/producer/publish-to-a-marketplace.md:269. Folded.
  • [recommended] git add had no commit step, at docs/src/content/docs/producer/publish-to-a-marketplace.md:271. Folded.
  • [recommended] The name-rule wording missed the first-character rule and its consequence, at docs/src/content/docs/reference/cli/pack.md:288. Folded.

Test Coverage Expert

  • [recommended] No test paired the pack warning with reader rejection, at tests/unit/core/test_plugin_manifest.py
    Proof (passed): tests/unit/core/test_plugin_manifest.py::TestBuildPluginManifest::test_codex_name_warning_matches_reader_rejection -- proves: pack warns exactly when install would refuse the name. [secure-by-default,multi-harness-support,devx]
  • [recommended] The dry-run check covered a single file, at tests/integration/test_pack_unified.py
    Proof (passed): tests/integration/test_pack_unified.py::TestPackUnified::test_pack_codex_target_writes_codex_plugin_json -- proves: apm pack --dry-run leaves the project byte-for-byte unchanged. [devx,governed-by-policy]

This panel is advisory. It does not block merge. Re-apply the
panel-review label after addressing feedback to re-run.


Generated by autopilot-pr-review-worker. This comment is AI-generated and may contain errors.

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.

[FEATURE] apm pack: generate .codex-plugin/plugin.json alongside the Claude and Copilot manifests

2 participants