Repository navigation
Conversation
Refs github#2654. Writes agents/openai.yaml with policy.allow_implicit_invocation: false for core command skills; extension skills stay model-invocable. Assisted-by: Claude Code (claude-sonnet-5-5) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xh3oZ7vsiPpGXAqtZnULC8
There was a problem hiding this comment.
🟡 Changes recommended
Policy-file handling can destroy user configuration and leave implicit invocation disabled after the option is cleared.
4 open issues
What changed in this PR
Adds a Codex-specific opt-out for implicit invocation of core Spec Kit skills, following the Claude and Droid integration options.
Changes:
- Adds
--no-model-invocationand generates per-skillagents/openai.yamlpolicies. - Keeps extension skills unchanged and uses existing option persistence and manifest tracking.
- Adds tests and documents usage, upgrades, and lifecycle limitations.
Validation used targeted, dependency-free checks; the project test suite was not run.
AI-generated review by GitHub Copilot for the requesting reviewer (identity not provided; model unknown; automated mode; settings not exposed).
| File | Description |
|---|---|
tests/integrations/test_integration_codex.py |
Tests option parsing, policy generation, upgrades, extension exclusion, and metadata merging. |
src/specify_cli/integrations/codex/__init__.py |
Declares the option and writes tracked policy files for core skills. |
docs/integrations/codex.md |
Documents invocation behavior, persistence, and lifecycle caveats. |
Review effort: Max
|
Please address Copilot feedback |
Setup no longer overwrites an unreadable, invalid or non-mapping agents/openai.yaml: it validates every target before writing any and raises naming the file. Policy files are written with record_file() on the lexical project-relative path, so a symlinked file or agents/ directory is refused before anything is written outside the project. A pre-existing or user-edited openai.yaml is recorded as partial and keeps that ownership across upgrades; uninstall, clearing the option and re-running init without it remove only policy.allow_implicit_invocation from such files, and delete only unmodified generated ones. Setup reconciles against the prior on-disk manifest, so re-init without the option no longer leaves implicit invocation disabled. A user file that already sets the policy is not claimed. Assisted-by: Claude Code (model: claude-opus-5-5, autonomous) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015w5WirGUspLsYEpCkaHWxV
Validate existing policy files before the base setup writes any skill, and derive manifest paths from the resolved project root. Treat a generated file whose content still equals the policy (CRLF checkout, added comment) as generated, so cleanup deletes it rather than leaving a stub. Keep tracking a user-edited generated file as partial even when it no longer parses, so upgrade's stale-file pass cannot delete it. Do not report user files whose policy teardown removed as preserved modified files. Document that rewritten files lose comments and formatting. Assisted-by: Claude Code (model: claude-opus-5-5, autonomous) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015w5WirGUspLsYEpCkaHWxV
Teardown now treats generated openai.yaml files like the option-clearing path does: a content-equal file (CRLF, added comment) is deleted, and an edited one keeps its keys and loses only the policy unless --force is given. A user file whose policy cannot be removed stays tracked so a later run can retry, and stale policies are released only after the new ones are written. Assisted-by: Claude Code (model: claude-opus-5-5, autonomous) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015w5WirGUspLsYEpCkaHWxV
|
@mnriem I've addressed the Copilot feedback in c409bf2, 06cafd3 and 4788fbd (Codex package, its tests and
Each case has a regression test that fails on 8c4c5bb and passes now: 20 new tests, 68 in AI disclosure: posted on behalf of @echarrod by Claude Code (model: claude-opus-5-5, autonomous mode). The agent wrote the changes and tests, ran the test suite and two automated code-review passes, and wrote this comment. The earlier commit 8c4c5bb carries an |


Description
Refs #2654. Follow-up to #4919 (Claude) and #5116 (Droid).
Adds a Codex CLI-only integration option:
specify init my-project --integration codex --integration-options="--no-model-invocation"agents/openai.yamlwithpolicy.allow_implicit_invocation: falsenext to each corespeckit-*command skill. OpenAI's skills docs say Codex then does not invoke the skill implicitly, while explicit$skillinvocation still works. The default is unchanged.speckit.git.featureneed the model to invoke them.integration.json, sospecify integration upgrade codexreapplies it, and clearing the options removes the generated files (they are tracked in the integration manifest).Differences from Droid:
SKILL.mdfrontmatter flag, so the policy is a separate file. The integration overridessetup()to write it after the skills, and an existingagents/openai.yamlkeeps its other keys.setup()get no file untilspecify integration upgrade codex --force.Only the Codex package, its tests and
docs/integrations/codex.mdchange; no sharedbase.pychange.AI Disclosure
AI disclosure: Written for @echarrod by Claude Code (claude-sonnet-5-5) running autonomously. It wrote the code, tests and docs, ran the test suite and an automated
/code-review medium. @echarrod reviewed it before marking it ready.