fix(codex): native skills fallback refresh + legacy prompt suppression#1930
fix(codex): native skills fallback refresh + legacy prompt suppression#1930RbBtSn0w wants to merge 8 commits intogithub:mainfrom
Conversation
39e3690 to
3793b45
Compare
There was a problem hiding this comment.
Pull request overview
This PR tightens Codex skills-mode initialization by avoiding legacy .codex prompt extraction and making native-skills agents (Codex/Kimi) attempt an install_ai_skills() fallback when bundled skills are missing, with updated tests and documentation to reflect the skills-based Codex layout.
Changes:
- Add
skip_legacy_codex_promptssupport to template extraction and enable it forcodex+--ai-skills. - For native-skills agents, attempt
install_ai_skills()fallback when bundled skills are missing; keep a clear error when both bundled skills and fallback fail. - Update tests, docs, and release-package skill generators to align SKILL.md frontmatter.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Adds legacy .codex skip/removal during extraction and implements native-skills fallback behavior in init. |
tests/test_ai_skills.py |
Updates Codex native-skills tests to assert fallback is attempted and non-speckit skill dirs trigger fallback. |
src/specify_cli/agents.py |
Adds a technical-debt note documenting expected SKILL.md frontmatter schema alignment. |
AGENTS.md |
Updates Codex directory documentation to .agents/skills/ and adjusts directory conventions section. |
.github/workflows/scripts/create-release-packages.sh |
Adds compatibility and metadata fields to generated SKILL.md frontmatter. |
.github/workflows/scripts/create-release-packages.ps1 |
Mirrors the SKILL.md frontmatter additions for PowerShell packaging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Background
This is a follow-up fix after the previous skills/frontmatter work was already merged.
In local debugging and re-init scenarios (
specify init --here --ai codex --ai-skills), two issues were observed:.codex/prompts), which should not appear in skills mode.SKILL.mdfiles were not refreshed due to additive-only behavior.Why this change
The goal is to make Codex/Kimi skills-mode initialization resilient without broad behavioral changes:
What changed
download_and_extract_template(...), addskip_legacy_codex_prompts.ai=codexand--ai-skillsis enabled, do not materialize.codexfrom the downloaded archive.install_ai_skills(...)as fallback instead of failing immediately.overwrite_existing: bool = Falsetoinstall_ai_skills(...).overwrite_existing=True) so fallback can refresh stale nativeSKILL.mdfiles.Why this is minimal impact
Tests
SKILL.md.Validation run:
uv run pytest tests/test_ai_skills.py -q->89 passed