-
Notifications
You must be signed in to change notification settings - Fork 31
fix(cli): transform codex marketplace skills #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
davidmohamedfr
wants to merge
2
commits into
ai-driven-dev:main
Choose a base branch
from
davidmohamedfr:fix/570-codex-marketplace-skills
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+286
−14
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/phase-1.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| status: done | ||
| --- | ||
|
|
||
| # Instruction: Apply and prove skill transformation | ||
|
|
||
| ## Architecture projection | ||
|
|
||
| > Tree of the final files. ✅ create · ✏️ modify · ❌ delete | ||
|
|
||
| ```txt | ||
| . | ||
| ✏️ cli/src/application/use-cases/framework/strategies/marketplace-build-strategy.ts | ||
| ✏️ cli/src/application/use-cases/framework/strategies/marketplace-strategy-helpers.ts | ||
| ✏️ cli/src/application/use-cases/framework/strategies/tool-contracts.ts | ||
| ✏️ cli/src/domain/tools/ai/codex.ts | ||
| ✏️ cli/tests/application/use-cases/framework/marketplace-build-strategy.codex.integration.test.ts | ||
| ``` | ||
|
|
||
| ## User Journey | ||
|
|
||
| ```mermaid | ||
| flowchart TD | ||
| A[Framework source skill] --> B[Codex marketplace build] | ||
| B --> C[Codex-transformed SKILL.md] | ||
| C --> D[Native marketplace artifact] | ||
| ``` | ||
|
|
||
| ## Tasks to do | ||
|
|
||
| ### `1)` Reuse the Codex skill converter during marketplace builds | ||
|
|
||
| > Route markdown skill files through the target artifact transform after link rewriting. | ||
|
|
||
| 1. Extend the marketplace skill-tree writer to receive and apply the skill artifact transform. | ||
| 2. Expose or extract the existing Codex frontmatter allowlist as the build transform's source of truth. | ||
| 3. Configure the Codex marketplace contract to transform skill markdown while preserving non-markdown assets and existing link rewriting. | ||
|
|
||
| ### `2)` Lock the regression with an integration test | ||
|
|
||
| > Assert the native Codex marketplace artifact omits `model` and unsupported frontmatter. | ||
|
|
||
| 1. Add a fixture-backed test covering a skill with Claude model metadata. | ||
| 2. Assert supported Codex frontmatter remains and `model` is absent. | ||
|
|
||
| ## Test acceptance criteria | ||
|
|
||
| | Task | Acceptance criteria | | ||
| | --- | --- | | ||
| | 1 | A Codex marketplace build emits every markdown skill using the Codex frontmatter allowlist, while source skills remain unchanged. | | ||
| | 2 | The build integration suite fails if a native Codex marketplace `SKILL.md` contains `model`. | |
47 changes: 47 additions & 0 deletions
47
aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/phase-2.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| status: done | ||
| --- | ||
|
|
||
| # Instruction: Verify installed origin marketplace | ||
|
|
||
| ## Architecture projection | ||
|
|
||
| > Tree of the final files. ✅ create · ✏️ modify · ❌ delete | ||
|
|
||
| ```txt | ||
| . | ||
| ``` | ||
|
|
||
| ## User Journey | ||
|
|
||
| ```mermaid | ||
| flowchart TD | ||
| A[Build current origin] --> B[Install its Codex marketplace] | ||
| B --> C[Inspect installed skills] | ||
| C --> D[No model frontmatter] | ||
| ``` | ||
|
|
||
| ## Tasks to do | ||
|
|
||
| ### `1)` Build and test the current origin | ||
|
|
||
| > Run the targeted regression suite and create a fresh Codex marketplace output from this worktree. | ||
|
|
||
| 1. Run the Codex marketplace integration tests. | ||
| 2. Build a fresh Codex marketplace from the worktree. | ||
| 3. Scan the generated `SKILL.md` files for a `model` frontmatter key. | ||
|
|
||
| ### `2)` Install and identify the local origin artifact | ||
|
|
||
| > Use Codex to install the marketplace generated from this worktree in an isolated Codex home, then inspect installed skills and marketplace metadata. | ||
|
|
||
| 1. Install from a local artifact or an origin-addressable ref that names this repository, never the upstream repository. | ||
| 2. Assert installed skill files contain no `model` frontmatter key. | ||
| 3. Assert installation metadata identifies this origin artifact, not `ai-driven-dev/framework`. | ||
|
|
||
| ## Test acceptance criteria | ||
|
|
||
| | Task | Acceptance criteria | | ||
| | --- | --- | | ||
| | 1 | The current-worktree Codex marketplace build and targeted integration tests succeed, and generated skills have no `model` key. | | ||
| | 2 | An isolated Codex installation sourced from this origin artifact has no `model` key in installed `SKILL.md` files and carries origin-specific marketplace identity. | |
32 changes: 32 additions & 0 deletions
32
aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/plan.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| objective: "Codex marketplace installs from this origin distribute transformed SKILL.md files with no model frontmatter." | ||
| status: reviewed | ||
| --- | ||
|
|
||
| # Plan: Transform Codex marketplace skills | ||
|
|
||
| ## Overview | ||
|
|
||
| | Field | Value | | ||
| | --- | --- | | ||
| | **Goal** | Make native Codex marketplace output use the same skill-frontmatter conversion as the AIDD CLI install path. | | ||
| | **Source** | [upstream issue #570](https://github.com/ai-driven-dev/framework/issues/570) | | ||
|
|
||
| ## Phases | ||
|
|
||
| | # | Phase | File | | ||
| | --- | --- | --- | | ||
| | 1 | Apply and prove skill transformation | [phase-1.md](./phase-1.md) | | ||
| | 2 | Verify installed origin marketplace | [phase-2.md](./phase-2.md) | | ||
|
|
||
| ## Resources | ||
|
|
||
| | Source | Verified | | ||
| | --- | --- | | ||
| | https://github.com/ai-driven-dev/framework/issues/570 | Native Codex marketplace currently bypasses `stripCodexSkillFrontmatter`; installed skills must omit `model`. | | ||
|
|
||
| ## Decisions | ||
|
|
||
| | Decision | Why | | ||
| | --- | --- | | ||
| | Make marketplace skill writes honor each target's existing skill artifact transform. | It reuses the target contract rather than adding a Codex-only branch, keeps Claude source untouched, and makes native marketplace output follow the same conversion policy as the CLI install path. | |
34 changes: 34 additions & 0 deletions
34
aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/review.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Review: Transform Codex marketplace skills | ||
|
|
||
| - **Verdict**: approve | ||
| - **Diff**: `main...20e46f31967a308c795015c975fd89967ba2cdf1 + worktree` | ||
| - **Axes run**: code, functional, relevancy | ||
| - **Date**: 2026-08-03 | ||
| - **Findings**: 0 critical, 0 warning, 0 minor | ||
|
|
||
| ## Phases | ||
|
|
||
| ### Phase 1 — Apply and prove skill transformation | ||
|
|
||
| - [x] A Codex marketplace build emits every `SKILL.md` using the Codex frontmatter allowlist while source skills remain unchanged; auxiliary Markdown assets remain byte-preserved. — `cli/src/application/use-cases/framework/strategies/marketplace-build-strategy.ts:80-84`, `cli/src/application/use-cases/framework/strategies/marketplace-strategy-helpers.ts:93-102`, `cli/src/application/use-cases/framework/strategies/tool-contracts.ts:337-360`, `cli/tests/application/use-cases/framework/marketplace-build-strategy.codex.integration.test.ts:227-263` | ||
| - [x] The build integration suite fails if a native Codex marketplace `SKILL.md` contains `model`. — `cli/tests/application/use-cases/framework/marketplace-build-strategy.codex.integration.test.ts:227-243`, `cli/tests/fixtures/framework-codex/plugins/aidd-codex-fixture/skills/sample/SKILL.md:1-8` | ||
|
|
||
| ### Phase 2 — Verify installed origin marketplace | ||
|
|
||
| - [x] The current-worktree Codex marketplace build and targeted integration tests succeed, and generated `SKILL.md` files have no `model` key. — `aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/validation.md:3-10`, `aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/validation.md:31-32`; `pnpm vitest run tests/application/use-cases/framework/marketplace-build-strategy.codex.integration.test.ts` => `30 passed` | ||
| - [x] An isolated Codex installation sourced from the local artifact has no `model` in installed `SKILL.md` and carries origin-specific marketplace identity. — `aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/validation.md:17-32` (`sourceType: local`, local artifact path, 13 installed `SKILL.md`, scan clean) | ||
|
|
||
| ## Findings | ||
|
|
||
| | Sev | Kind | Phase | Location | Issue | Fix | | ||
| | --- | ---- | ----- | -------- | ----- | --- | | ||
| | — | — | — | — | None. | — | | ||
|
|
||
| ## Verification | ||
|
|
||
| | Metric | Value | | ||
| | --- | --- | | ||
| | Verified | 100% (4/4) | | ||
| | Files checked | `cli/src/application/use-cases/framework/strategies/marketplace-build-strategy.ts`, `cli/src/application/use-cases/framework/strategies/marketplace-strategy-helpers.ts`, `cli/src/application/use-cases/framework/strategies/tool-contracts.ts`, `cli/src/domain/tools/ai/codex.ts`, `cli/tests/application/use-cases/framework/marketplace-build-strategy.codex.integration.test.ts`, `cli/tests/fixtures/framework-codex/plugins/aidd-codex-fixture/skills/sample/SKILL.md`, `cli/tests/fixtures/framework-codex/plugins/aidd-codex-fixture/skills/sample/assets/template.md`, `aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/validation.md` | | ||
| | Unchecked | none | | ||
| | Unplanned | `aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/review.md` is the required review deliverable; none otherwise | |
32 changes: 32 additions & 0 deletions
32
aidd_docs/tasks/2026_08/2026_08_03_codex-marketplace-skill-transform/validation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Native Codex installation validation | ||
|
|
||
| Observed on 2026-08-03 from a locally built marketplace artifact: | ||
|
|
||
| ```json | ||
| { | ||
| "marketplaceName": "aidd-framework", | ||
| "installedRoot": "/private/tmp/aidd-codex-marketplace.EOuI9t/marketplace", | ||
| "alreadyAdded": false | ||
| } | ||
| ``` | ||
|
|
||
| Installed plugin identity: | ||
|
|
||
| ```json | ||
| { | ||
| "pluginId": "aidd-context@aidd-framework", | ||
| "installedPath": "/tmp/aidd-codex-marketplace.EOuI9t/home/.codex/plugins/cache/aidd-framework/aidd-context/2.5.0", | ||
| "source": { | ||
| "source": "local", | ||
| "path": "/private/tmp/aidd-codex-marketplace.EOuI9t/marketplace/plugins/aidd-context" | ||
| }, | ||
| "marketplaceSource": { | ||
| "sourceType": "local", | ||
| "source": "/private/tmp/aidd-codex-marketplace.EOuI9t/marketplace" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| `sourceType: "local"` and the temporary artifact path prove this is not the upstream | ||
| `ai-driven-dev/framework` marketplace. The installed cache contained 13 `SKILL.md` files; | ||
| the completed `^model:` scan returned no matches. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.