codex -> agent skills#257
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 9 files reviewed • 4 need attention
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
Nitpicks 🔍
|
| if (subtype === 'agent') { | ||
| return join(process.cwd(), '.agents', 'agents', baseName, 'AGENT.md'); | ||
| } | ||
| // Other subtypes use AGENTS.md |
There was a problem hiding this comment.
Suggestion: Codex slash commands currently fall through to the generic AGENTS.md path, but the Agent Skills/Codex docs specify that progressive-disclosure slash commands should live at .opencommands/{name}.md. This mislocation means converted Codex slash commands won't be written where the editor expects them, so they may not be discovered or invoked correctly as slash commands. Add a dedicated slash-command branch in the Codex getDefaultPath case to target .opencommands/{name}.md. [logic error]
Severity Level: Major ⚠️
- ⚠️ `prpm convert --to codex --subtype slash-command` writes AGENTS.md.
- ⚠️ Converted Codex slash-commands diverge from `.opencommands/` install layout.| // Other subtypes use AGENTS.md | |
| // Codex slash commands use .opencommands/{name}.md for progressive disclosure | |
| if (subtype === 'slash-command') { | |
| return join(process.cwd(), '.opencommands', `${baseName}.md`); | |
| } |
Steps of Reproduction ✅
1. Run the CLI convert command created by `createConvertCommand()` at
`packages/cli/src/commands/convert.ts:534-585`, e.g.:
`prpm convert my-command.md --to codex --subtype slash-command` in a project directory
with no `--output` flag.
2. The `.action` handler in `createConvertCommand()` calls `handleConvert()` at
`convert.ts:569-576`, passing `options.to === 'codex'` and `options.subtype ===
'slash-command'`.
3. Inside `handleConvert()` at `convert.ts:485-487`, the code computes the output path as:
`const outputPath = options.output || getDefaultPath(options.to, sourcePath,
options.subtype, options.name);`
so it calls `getDefaultPath('codex', sourcePath, 'slash-command', options.name)`.
4. In `getDefaultPath()` at `convert.ts:90-178`, the `case 'codex'` branch at `165-175`
executes. Because `subtype` is `'slash-command'`, neither the `skill` check at `167-168`
nor the `agent` check at `171-172` matches, so execution falls through to the default
branch at `174-175` and returns `<cwd>/AGENTS.md`. This is inconsistent with:
- The Codex progressive disclosure spec in
`packages/converters/docs/agent-skills.md:218-223`, which specifies
`.opencommands/{name}.md` for Codex slash commands; and
- The install flow in `packages/cli/src/commands/install.ts:1097-1111` and the
progressive-disclosure logic at `install.ts:1475-1481`, where manifest formats
including `'codex'` install slash commands to `.opencommands/{packageName}.md`.
As a result, Codex slash commands produced via `prpm convert --to codex --subtype
slash-command` are written to `AGENTS.md` instead of the `.opencommands/{name}.md`
location used by `prpm install` and described in the docs.Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** packages/cli/src/commands/convert.ts
**Line:** 174:174
**Comment:**
*Logic Error: Codex slash commands currently fall through to the generic AGENTS.md path, but the Agent Skills/Codex docs specify that progressive-disclosure slash commands should live at `.opencommands/{name}.md`. This mislocation means converted Codex slash commands won't be written where the editor expects them, so they may not be discovered or invoked correctly as slash commands. Add a dedicated `slash-command` branch in the Codex `getDefaultPath` case to target `.opencommands/{name}.md`.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
2 issues found across 9 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/converters/src/to-codex.ts">
<violation number="1" location="packages/converters/src/to-codex.ts:578">
P2: The new comment says agents use AGENT.md, but the converter still routes all non-skill subtypes (including agents) to AGENTS.md and generateFilename never returns AGENT.md. Either implement agent-specific AGENT.md output or remove the AGENT.md claim to avoid misleading behavior.</violation>
</file>
<file name="packages/cli/src/commands/convert.ts">
<violation number="1" location="packages/cli/src/commands/convert.ts:224">
P2: `detectFormat` now treats `.agents/agents` as Codex, but the Codex parser only supports SKILL.md (skills) and hard-codes `subtype: 'skill'`. This will mis-detect `.agents/agents/{name}/AGENT.md` files and parse them as skills. Either add an agent parser or avoid classifying `.agents/agents` as `codex` until agent parsing exists.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/commands/convert.ts">
<violation number="1" location="packages/cli/src/commands/convert.ts:225">
P2: detectFormat now returns "codex-skill"/"codex-agent", but handleConvert only supports "codex". This makes .agents/skills or .agents/agents files fail conversion with "Unsupported source format". Add cases for the new formats or map them back to "codex" before the switch.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| if (filepath.includes('.codex/skills')) { | ||
| return 'codex'; | ||
| if (filepath.includes('.agents/skills')) { | ||
| return 'codex-skill'; |
There was a problem hiding this comment.
P2: detectFormat now returns "codex-skill"/"codex-agent", but handleConvert only supports "codex". This makes .agents/skills or .agents/agents files fail conversion with "Unsupported source format". Add cases for the new formats or map them back to "codex" before the switch.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/cli/src/commands/convert.ts, line 225:
<comment>detectFormat now returns "codex-skill"/"codex-agent", but handleConvert only supports "codex". This makes .agents/skills or .agents/agents files fail conversion with "Unsupported source format". Add cases for the new formats or map them back to "codex" before the switch.</comment>
<file context>
@@ -221,8 +221,11 @@ function detectFormat(content: string, filepath: string): string | null {
- if (filepath.includes('.agents/skills') || filepath.includes('.agents/agents')) {
- return 'codex';
+ if (filepath.includes('.agents/skills')) {
+ return 'codex-skill';
+ }
+ if (filepath.includes('.agents/agents')) {
</file context>
CodeAnt-AI Description
Move Codex skill and agent locations to .agents and add native agent output
What Changed
Impact
✅ Fewer missed Codex skills during format detection✅ Clearer Codex agent output location (AGENT.md) for agent packages✅ Consistent cross-tool skill directory (.agents) for conversions and docs💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.