fix(codex): native skills fallback refresh + legacy prompt suppression#1930
fix(codex): native skills fallback refresh + legacy prompt suppression#1930mnriem merged 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.
…nc-main-2026-03-25 * upstream/main: (90 commits) fix(ps1): replace null-conditional operator for PowerShell 5.1 compatibility (github#1975) chore: bump version to 0.4.2 (github#1973) feat: Auto-register ai-skills for extensions whenever applicable (github#1840) docs: add manual testing guide for slash command validation (github#1955) Add AIDE, Extensify, and Presetify to community extensions (github#1961) docs: add community presets section to main README (github#1960) docs: move community extensions table to main README for discoverability (github#1959) docs(readme): consolidate Community Friends sections and fix ToC anchors (github#1958) fix(commands): rename NFR references to success criteria in analyze and clarify (github#1935) Add Community Friends section to README (github#1956) docs: add Community Friends section with Spec Kit Assistant VS Code extension (github#1944) chore: bump version to 0.4.1 (github#1953) Add checkpoint extension (github#1947) fix(scripts): prioritize .specify over git for repo root detection (github#1933) docs: add AIDE extension demo to community projects (github#1943) fix(templates): add missing Assumptions section to spec template (github#1939) chore: bump version to 0.4.0 (github#1937) fix(cli): add allow_unicode=True and encoding="utf-8" to YAML I/O (github#1936) fix(codex): native skills fallback refresh + legacy prompt suppression (github#1930) feat(cli): embed core pack in wheel for offline/air-gapped deployment (github#1803) ...
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