You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A workflow command or prompt step with integration: shai reports success without running the command. ShaiIntegration inherits MarkdownIntegration.build_exec_args(), so the step runs shai -p "/speckit.plan". The SHAI CLI (ovh/shai, latest release v0.1.11) has no -p or --model flag: shai-cli/src/main.rs collects every argument as free text (trailing_var_arg = true, allow_hyphen_values = true) for its auto-fix mode. SHAI then gives that agent the literal text -p /speckit.plan against its default provider, and it exits 0 even when the model call fails. The step is marked completed and the workflow moves on.
No argv can make this work. SHAI reads headless prompts only from stdin (echo "..." | shai), and it never loads .shai/commands: its only slash commands are the built-in /exit, /auth, /tc, /tokens and /theme. So this opts SHAI out of CLI dispatch, and those steps now fail through the same path as any integration without dispatch. SHAI is one of the unverified integrations listed in #2416.
ShaiIntegration.build_exec_args() returns None, with a comment pointing at the upstream parser.
The command and prompt steps said "CLI not found or not installed" whenever dispatch was unavailable, which is wrong when the CLI is on PATH. Both messages now also name the other cause: the integration does not support CLI dispatch.
The SHAI row in docs/reference/integrations.md notes that workflow steps can't run through it.
Reproduction on current main with the SHAI v0.1.11 release binary on PATH, in a project initialized with --integration shai, run offline (unshare -rn) so nothing reaches a provider:
schema_version: "1.0"workflow:
id: "shai-plan"name: "SHAI plan"version: "1.0.0"steps:
- id: plancommand: speckit.planintegration: shai
- id: aftertype: shellrun: echo "workflow continued past the plan step"
▸ [plan] speckit.plan …
Status: failed
Error: Cannot dispatch command 'speckit.plan': integration 'shai' CLI not found
or not installed, or the integration does not support CLI dispatch. Install the
CLI tool or check 'specify integration list'.
Online, the same main run sent -p /speckit.plan to SHAI's default OVHcloud model, which treated it as a failed shell command to diagnose. Making SHAI work for these steps would need stdin support in step dispatch, and it still wouldn't have the Spec Kit commands, so that's out of scope here.
Testing
Tested locally with uv run specify --help
Ran existing tests with uv sync && uv run pytest
Tested with a sample project (if applicable)
New tests in tests/integrations/test_integration_shai.py: build_exec_args() returns None, and a command step and a prompt step fail without calling subprocess.run while shai is on PATH. All three fail on main, where both steps come back completed.
Full suite: 8763 passed, 251 skipped (Linux, Python 3.13)
uvx ruff@0.15.0 check src tests: clean. markdownlint on the changed doc: clean.
Sample project: the workflow above against main and this branch, SHAI v0.1.11.
AI Disclosure
I did not use AI assistance for this contribution
I did use AI assistance (fill in the disclosure below)
AI disclosure: Claude Code (Claude Opus 5.5, xhigh reasoning effort, autonomous agent mode) was used to investigate the SHAI CLI, write the code change, the regression tests and this description.
The SHAI CLI has no -p or --model flag and takes every argument as text
for its auto-fix agent, which exits 0, so a workflow step targeting SHAI
reported success without running the command. SHAI only reads headless
prompts from stdin and never loads .shai/commands, so opt it out of CLI
dispatch. The step error for an integration without dispatch now names
that cause as well as a missing CLI.
Refs github#2416
Assisted-by: Claude Code (model: Claude Opus 5.5, autonomous)
SHAI does take headless prompt text as positional arguments, on stdin
and through `shai agent <name> <prompt>`, so "no argv form that runs a
prompt" was wrong. Every route goes to its auto-fix agent and
.shai/commands is never loaded, which is why dispatch stays disabled.
Reword the code comment, the test docstring and the integrations
reference to say that.
Refs github#2416
Assisted-by: Claude Code (model: claude-opus-5-5, autonomous)
Addressed in b5512b0. Copilot is right that "no argv form" was wrong: SHAI v0.1.11 takes headless prompt text as positional arguments, on stdin, and through shai agent <name> <prompt>.
Dispatch still has to stay off because of where that text goes. In shai-cli/src/main.rs, every one of those routes calls handle_fix, which is SHAI's auto-fix agent. Nothing in the SHAI source loads .shai/commands, so no route runs an installed Spec Kit command. The code comment, the TestShaiCliDispatch docstring and the SHAI row in docs/reference/integrations.md now say that.
Behavior is unchanged. The SHAI tests pass and ruff check src tests is clean.
Drafted on behalf of @kartsan03 by Claude Code (model: claude-opus-5-5, autonomous). The agent checked Copilot's claim against the SHAI v0.1.11 source, made the change and wrote this comment.
The command and prompt step errors cover both a missing CLI and an
integration that does not support CLI dispatch, but the command step
only suggested installing the CLI or checking `specify integration
list`, which does not help for SHAI. Suggest installing the CLI when it
is missing, and switching the step's integration when the integration
cannot dispatch.
Refs github#2416
Assisted-by: Claude Code (model: claude-opus-5-5, autonomous)
Addressed in f059551. The step can't tell the two cases apart: _try_dispatch() returns None both when the executable is missing and when the integration returns no argv. So both step errors now give a separate remedy for each case. If the CLI is missing, install it (the command step also keeps specify integration list). If the integration does not support CLI dispatch, set the step's integration to one that does. The prompt step had no remedy before, so it gets the same two. The SHAI step tests now also check for the second remedy.
tests/test_workflows.py and the SHAI tests pass, and ruff check src tests is clean.
Drafted on behalf of @kartsan03 by Claude Code (model: claude-opus-5-5, autonomous). The agent made the change and wrote this comment.
The subject and verb do not agree in “Its argument, stdin and ... routes all hand,” making the three prompt routes hard to read. Name the routes as the subject and use “all pass.”
Assisted-by: Claude Code (model: claude-opus-5-5, autonomous)
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
triage-can-waitVerdict: valid and in-scope but deprioritized; held behind the evidence gate
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A workflow
commandorpromptstep withintegration: shaireports success without running the command.ShaiIntegrationinheritsMarkdownIntegration.build_exec_args(), so the step runsshai -p "/speckit.plan". The SHAI CLI (ovh/shai, latest release v0.1.11) has no-por--modelflag:shai-cli/src/main.rscollects every argument as free text (trailing_var_arg = true, allow_hyphen_values = true) for its auto-fix mode. SHAI then gives that agent the literal text-p /speckit.planagainst its default provider, and it exits 0 even when the model call fails. The step is marked completed and the workflow moves on.No argv can make this work. SHAI reads headless prompts only from stdin (
echo "..." | shai), and it never loads.shai/commands: its only slash commands are the built-in/exit,/auth,/tc,/tokensand/theme. So this opts SHAI out of CLI dispatch, and those steps now fail through the same path as any integration without dispatch. SHAI is one of the unverified integrations listed in #2416.ShaiIntegration.build_exec_args()returnsNone, with a comment pointing at the upstream parser.PATH. Both messages now also name the other cause: the integration does not support CLI dispatch.docs/reference/integrations.mdnotes that workflow steps can't run through it.Reproduction on current
mainwith the SHAI v0.1.11 release binary onPATH, in a project initialized with--integration shai, run offline (unshare -rn) so nothing reaches a provider:specify workflow run shai-plan.ymlonmain:With this change:
Online, the same
mainrun sent-p /speckit.planto SHAI's default OVHcloud model, which treated it as a failed shell command to diagnose. Making SHAI work for these steps would need stdin support in step dispatch, and it still wouldn't have the Spec Kit commands, so that's out of scope here.Testing
Tested locally with
uv run specify --helpRan existing tests with
uv sync && uv run pytestTested with a sample project (if applicable)
New tests in
tests/integrations/test_integration_shai.py:build_exec_args()returnsNone, and a command step and a prompt step fail without callingsubprocess.runwhileshaiis onPATH. All three fail onmain, where both steps come backcompleted.Full suite: 8763 passed, 251 skipped (Linux, Python 3.13)
uvx ruff@0.15.0 check src tests: clean. markdownlint on the changed doc: clean.Sample project: the workflow above against
mainand this branch, SHAI v0.1.11.AI Disclosure
AI disclosure: Claude Code (Claude Opus 5.5, xhigh reasoning effort, autonomous agent mode) was used to investigate the SHAI CLI, write the code change, the regression tests and this description.