Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/specify_cli/_invocation_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
CONDITIONAL_SLASH_AGENTS: frozenset[str] = frozenset(
{
"agy",
"alquimia",
"bob",
"claude",
"copilot",
Expand Down
30 changes: 30 additions & 0 deletions tests/integrations/test_integration_alquimia.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-<name>/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.<name>` 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
Expand Down