diff --git a/src/specify_cli/_invocation_style.py b/src/specify_cli/_invocation_style.py index 5cc7098837..50b9ac5f57 100644 --- a/src/specify_cli/_invocation_style.py +++ b/src/specify_cli/_invocation_style.py @@ -18,6 +18,7 @@ CONDITIONAL_SLASH_AGENTS: frozenset[str] = frozenset( { "agy", + "alquimia", "bob", "claude", "copilot", diff --git a/tests/integrations/test_integration_alquimia.py b/tests/integrations/test_integration_alquimia.py index e8eab8281c..e4612d22b2 100644 --- a/tests/integrations/test_integration_alquimia.py +++ b/tests/integrations/test_integration_alquimia.py @@ -37,6 +37,36 @@ def test_requires_cli_is_true(self): assert integration.config["requires_cli"] is True assert integration.multi_install_safe is True + def test_is_slash_skills_agent(self): + """Alquimia installs `.alquimia/skills/speckit-/SKILL.md`, so the + invocation helper must report the hyphenated form when skills are on. + + It was the only `SkillsIntegration` subclass absent from every set in + `_invocation_style`, so `is_slash_skills_agent` returned False and the + two callers that consult it — `HookExecutor._render_hook_invocation` + and `specify init`'s Next Steps panel — emitted the dotted + `/speckit.` form Alquimia never registers. + """ + from specify_cli._invocation_style import is_slash_skills_agent + + assert is_slash_skills_agent("alquimia", True) is True + # Conditional, not always: with skills disabled the dotted form is + # correct, which is what distinguishes this from an ALWAYS_SLASH agent. + assert is_slash_skills_agent("alquimia", False) is False + + def test_build_command_invocation_matches_the_invocation_helper(self): + """The integration's own renderer and the helper must agree. + + `SkillsIntegration.build_command_invocation` already returned + `/speckit-plan`; only the helper disagreed, which is why the two + outputs diverged for the same on-disk layout. + """ + from specify_cli._invocation_style import is_slash_skills_agent + + integration = get_integration("alquimia") + assert integration.build_command_invocation("plan") == "/speckit-plan" + assert is_slash_skills_agent("alquimia", True) is True + def test_build_exec_args_uses_headless_prompt_flag(self): """Workflow dispatch relies on the inherited ``SkillsIntegration.build_exec_args()`` — pin its argv shape so a