diff --git a/src/specify_cli/extensions.py b/src/specify_cli/extensions.py index 4d5bd8083..8f3120dd0 100644 --- a/src/specify_cli/extensions.py +++ b/src/specify_cli/extensions.py @@ -623,6 +623,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 cad112cf4..e557724fa 100644 --- a/tests/test_agent_config_consistency.py +++ b/tests/test_agent_config_consistency.py @@ -28,6 +28,13 @@ def test_extension_registrar_uses_kiro_cli_and_removes_q(self): 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 062250b63..04e53bcf4 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -405,6 +405,11 @@ def test_kiro_cli_agent_config_present(self): 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 = """---