fix(workflow): support integration: auto to follow project's initialized AI#2421
Open
Quratulain-bilal wants to merge 1 commit intogithub:mainfrom
Open
fix(workflow): support integration: auto to follow project's initialized AI#2421Quratulain-bilal wants to merge 1 commit intogithub:mainfrom
Quratulain-bilal wants to merge 1 commit intogithub:mainfrom
Conversation
…zed AI The bundled `speckit` workflow YAML hardcoded `integration: copilot` as the default for the `integration` input. When a project was initialized for a different AI (e.g. opencode) and the `copilot` CLI happened to be installed on the same system, `specify workflow run speckit` would silently dispatch to copilot — which then failed with "No such agent: speckit.specify" because the agent files live under `.opencode/command/`, not `.github/agents/`. See github#2406 for a full failure trace. The fix is two small pieces: 1. Workflow engine: `_resolve_inputs` now recognizes the sentinel `default: "auto"` for the `integration` input and resolves it against `.specify/integration.json`. When the file is absent or malformed the literal `"auto"` is preserved so the dispatcher can surface a clear error instead of silently picking a wrong AI. 2. Bundled workflow: `workflows/speckit/workflow.yml` switches its `integration` default from the hardcoded `"copilot"` to `"auto"`. Explicit `--input integration=<name>` continues to win — `auto` only applies when no value is provided. Tests cover the four meaningful paths: integration.json present, file missing, malformed JSON, and explicit override. Refs github#2406
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #2406
Problem
The
speckitworkflow'sintegrationinput haddefault: "copilot"hardcoded inworkflows/speckit/workflow.yml. This meant projects initialized withclaudeorgeminiwould silently fall back to copilot when running the workflow without an explicit--input integration=...flag, breaking the principle of least surprise.Fix
workflows/speckit/workflow.yml: changedefault: "copilot"→default: "auto", update the prompt to describe the new behavior.src/specify_cli/workflows/engine.py: add_resolve_default()so that when an input default is the sentinel string"auto"and the input name is"integration", the engine reads.specify/integration.jsonand uses the project's initialized integration. Falls back to the literal"auto"when the file is missing or malformed (engine treats unresolved values harmlessly).tests/test_workflows.py: 4 new regression tests covering the resolution path, the missing-file fallback, the explicit-input override, and the malformed-JSON path.The change is opt-in via the YAML default, so existing workflows that hardcode
default: "copilot"(or any other literal) keep working unchanged. Only workflows that opt intodefault: "auto"get the new resolution.Test plan
speckitworkflow respects.specify/integration.jsonwhen no--inputis given--input integration=copilotstill overrides the project default.specify/integration.jsondoes not crash the engine