Skip to content

💫 Toolkit to help you get started with SDD or any other process!

feat: add Codex support for extension command registration (#1767)

Adrián Luján Muñoz4ab91fbadfa3
diff --git a/src/specify_cli/extensions.py b/src/specify_cli/extensions.py
index b1045e3ce..64300b535 100644
--- a/src/specify_cli/extensions.py
+++ b/src/specify_cli/extensions.py
@@ -635,6 +635,12 @@ class CommandRegistrar:
"args": "$ARGUMENTS",
"extension": ".md"
},
+ "codex": {
+ "dir": ".codex/prompts",
+ "format": "markdown",
+ "args": "$ARGUMENTS",
+ "extension": ".md"
+ },
"windsurf": {
"dir": ".windsurf/workflows",
"format": "markdown",
diff --git a/tests/test_agent_config_consistency.py b/tests/test_agent_config_consistency.py
index 607d491d9..3615dbc78 100644
--- a/tests/test_agent_config_consistency.py
+++ b/tests/test_agent_config_consistency.py
@@ -28,6 +28,13 @@ class TestAgentConfigConsistency:
assert cfg["kiro-cli"]["dir"] == ".kiro/prompts"
assert "q" not in cfg
+ def test_extension_registrar_includes_codex(self):
+ """Extension command registrar should include codex targeting .codex/prompts."""
+ cfg = CommandRegistrar.AGENT_CONFIGS
+
+ assert "codex" in cfg
+ assert cfg["codex"]["dir"] == ".codex/prompts"
+
def test_release_agent_lists_include_kiro_cli_and_exclude_q(self):
"""Bash and PowerShell release scripts should agree on agent key set for Kiro."""
sh_text = (REPO_ROOT / ".github" / "workflows" / "scripts" / "create-release-packages.sh").read_text(encoding="utf-8")
diff --git a/tests/test_extensions.py b/tests/test_extensions.py
index 9ef9cb739..545363225 100644
--- a/tests/test_extensions.py
+++ b/tests/test_extensions.py
@@ -407,6 +407,11 @@ class TestCommandRegistrar:
assert CommandRegistrar.AGENT_CONFIGS["kiro-cli"]["dir"] == ".kiro/prompts"
assert "q" not in CommandRegistrar.AGENT_CONFIGS
+ def test_codex_agent_config_present(self):
+ """Codex should be mapped to .codex/prompts."""
+ assert "codex" in CommandRegistrar.AGENT_CONFIGS
+ assert CommandRegistrar.AGENT_CONFIGS["codex"]["dir"] == ".codex/prompts"
+
def test_parse_frontmatter_valid(self):
"""Test parsing valid YAML frontmatter."""
content = """---