Skip to content

feat(code): add Codex conversion layer with coverage tests#97

Closed
aponamarev wants to merge 6 commits into
mainfrom
fea-1307/covertion-layer-claude-to-codex
Closed

feat(code): add Codex conversion layer with coverage tests#97
aponamarev wants to merge 6 commits into
mainfrom
fea-1307/covertion-layer-claude-to-codex

Conversation

@aponamarev
Copy link
Copy Markdown
Collaborator

@aponamarev aponamarev commented May 21, 2026

Summary

  • Adds codex/ — Codex CLI ports of all six plugins, generated by @disdjj/acplugin, plus a README.md documenting the conversion rules and regeneration commands.
  • Moves converted Codex plugin bundles under codex/plugins/<plugin> so the codex-marketplace CLI can install them from a root plugins/ folder.
  • Publishes the installable Codex marketplace from the codex/ subtree via the codex-marketplace branch and documents the working install command: npx codex-marketplace add https://github.com/closedloop-ai/claude-plugins/tree/codex-marketplace/plugins --plugins --global.
  • Adds codex/tests/test_conversion_coverage.py and semantic coverage helpers asserting every Claude agent/skill/command has a Codex counterpart and preserves expected content.
  • Wires the suite into CI: pytest plugins/ codex/.
  • Quotes argument-hint frontmatter values in four commands so the conversion pipeline YAML parser does not mis-tokenize bracketed/angled syntax.

Test plan

  • uv run pytest codex/ — 432 passed, 6 skipped
  • uv run ruff check codex/tests/ — clean
  • git diff --check — clean
  • npx codex-marketplace add https://github.com/closedloop-ai/claude-plugins/tree/codex-marketplace/plugins --plugins --global — installed 6 plugins
  • CI green on pytest plugins/ codex/

aponamarev and others added 2 commits May 21, 2026 17:18
Adds codex/ directory containing the Codex CLI ports of all six plugins
produced by @disdjj/acplugin, plus a pytest suite that asserts every
Claude agent/skill/command has a corresponding Codex artifact. Wires
the suite into CI via `pytest plugins/ codex/`. Quotes argument-hint
frontmatter values in four commands so YAML parsers in the conversion
pipeline don't mis-tokenize the bracketed/angled syntax.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends the codex/ test layer with content-fidelity assertions on top of
the existing structural checks. Six families: output validity (TOML/JSON
parse), agent name/description identity, acplugin transformation rules
(sandbox_mode, model, model_reasoning_effort), agent body fidelity
(word-count band + first heading), skill SKILL.md identity, and
cross-reference resolution for `plugin:skill` declarations.

Extracts the Plugin enum, frozen dataclasses, and discovery helpers from
the structural test into a shared codex/tests/helpers.py so both suites
share one SSOT for pair discovery and parsing.

432 passed, 6 skipped (doc-shaped files in agents/ with no frontmatter).
Negative-tested by sabotaging a description and a skill ref — both
families produced file-specific failure messages.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/ci.yml
python-version: "3.13"
- run: uv sync --frozen --group dev
- run: uv run pytest plugins/
- run: uv run pytest plugins/ codex/
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.

This will collect 5 test files from inside the converted artifacts (codex/code/.agents/skills/plan-validate/scripts/test_*.py and codex/judges/.agents/skills/run-judges/scripts/test_*.py). The judges tests compute REPO_ROOT as SCRIPT_DIR.parents[4], which resolves to codex/judges/ from that path depth, not the actual repo root. Those tests will fail trying to read plugins/judges/agents from the wrong base. You need a root-level conftest.py under codex/ with collect_ignore_glob to skip **/scripts/test_*.py, or add --ignore patterns to the pytest invocation.

Comment thread codex/tests/helpers.py


def claude_artifacts(plugin: Plugin) -> ClaudeArtifacts:
root = REPO_ROOT / "plugins" / plugin.value
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.

claude_artifacts does a raw glob of plugins/<plugin>/agents/*.md, but the README says files whose path contains .hook- are excluded from Codex output. If someone adds a hook-agent later, this test will flag it as missing from Codex when it was intentionally excluded. Worth filtering those out here to match the actual conversion rules.

---
description: Plan Amend - Discuss and apply amendments to a plan.json implementation plan
argument-hint: --workdir [path] --message "<text>" [--state-file [path]]
argument-hint: '--workdir [path] --message "<text>" [--state-file [path]]'
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.

This changes source files under plugins/code/ and plugins/self-learning/ but there are no version bumps in either plugin.json. CLAUDE.md rule: "Any change to a plugin's files MUST include a version bump in that plugin's plugin.json."

Copy link
Copy Markdown
Collaborator

@thadeusb thadeusb left a comment

Choose a reason for hiding this comment

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

CI will break. uv run pytest codex/ collects 5 copied test files from the converted plugin artifacts, and at least the 3 judges tests will fail because their SCRIPT_DIR.parents[4] path math lands at codex/judges/ instead of the repo root. Also missing required version bumps for the code and self-learning plugins.

@aponamarev
Copy link
Copy Markdown
Collaborator Author

Superseded by #98, which uses the unified root plugins layout and slash-free branch required for Codex marketplace validation.

@aponamarev aponamarev closed this May 22, 2026
@aponamarev aponamarev deleted the fea-1307/covertion-layer-claude-to-codex branch May 22, 2026 14:55
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