mirror of
https://github.com/github/spec-kit.git
synced 2026-03-19 20:03:07 +00:00
feat: add Codex support for extension command registration (#1767)
* feat: add Codex support for extension command registration * test: add codex command registrar mapping check * test: add codex consistency check to test_agent_config_consistency Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
5c0bedb410
commit
4ab91fbadf
@@ -635,6 +635,12 @@ class CommandRegistrar:
|
|||||||
"args": "$ARGUMENTS",
|
"args": "$ARGUMENTS",
|
||||||
"extension": ".md"
|
"extension": ".md"
|
||||||
},
|
},
|
||||||
|
"codex": {
|
||||||
|
"dir": ".codex/prompts",
|
||||||
|
"format": "markdown",
|
||||||
|
"args": "$ARGUMENTS",
|
||||||
|
"extension": ".md"
|
||||||
|
},
|
||||||
"windsurf": {
|
"windsurf": {
|
||||||
"dir": ".windsurf/workflows",
|
"dir": ".windsurf/workflows",
|
||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
|
|||||||
@@ -28,6 +28,13 @@ class TestAgentConfigConsistency:
|
|||||||
assert cfg["kiro-cli"]["dir"] == ".kiro/prompts"
|
assert cfg["kiro-cli"]["dir"] == ".kiro/prompts"
|
||||||
assert "q" not in cfg
|
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):
|
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."""
|
"""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")
|
sh_text = (REPO_ROOT / ".github" / "workflows" / "scripts" / "create-release-packages.sh").read_text(encoding="utf-8")
|
||||||
|
|||||||
@@ -407,6 +407,11 @@ class TestCommandRegistrar:
|
|||||||
assert CommandRegistrar.AGENT_CONFIGS["kiro-cli"]["dir"] == ".kiro/prompts"
|
assert CommandRegistrar.AGENT_CONFIGS["kiro-cli"]["dir"] == ".kiro/prompts"
|
||||||
assert "q" not in CommandRegistrar.AGENT_CONFIGS
|
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):
|
def test_parse_frontmatter_valid(self):
|
||||||
"""Test parsing valid YAML frontmatter."""
|
"""Test parsing valid YAML frontmatter."""
|
||||||
content = """---
|
content = """---
|
||||||
|
|||||||
Reference in New Issue
Block a user