Skip to content

Fix opencode workflow dispatch to use run subcommand#2410

Merged
mnriem merged 1 commit intogithub:mainfrom
afurm:af/fix-opencode-dispatch
Apr 29, 2026
Merged

Fix opencode workflow dispatch to use run subcommand#2410
mnriem merged 1 commit intogithub:mainfrom
afurm:af/fix-opencode-dispatch

Conversation

@afurm
Copy link
Copy Markdown
Contributor

@afurm afurm commented Apr 29, 2026

Description

Fixes #2409.

This updates the opencode integration dispatch path to use opencode run --command <command> instead of inheriting the generic Markdown integration’s -p prompt flag. The inherited dispatch generated unsupported opencode CLI arguments, causing workflow command execution to print help output instead of running the requested Spec Kit command.

The fix also maps opencode-specific flags correctly:

  • --command for command dispatch
  • -m for model selection
  • --format json for captured JSON output

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv run python -m pytest -q
  • Tested with a sample project (if applicable)

Additional focused checks:

  • uv run python -m pytest tests/integrations/test_integration_opencode.py -q
  • uv run python -m pytest tests/integrations/test_base.py tests/integrations/test_integration_opencode.py tests/test_agent_config_consistency.py -q

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

I used Codex to inspect the issue and code path, implement the focused fix, add regression tests, and run validation locally.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the opencode integration’s workflow command dispatch so it uses opencode’s supported non-interactive invocation (opencode run) rather than inheriting the generic Markdown integration’s unsupported -p prompt flag, resolving the dispatch failure described in #2409.

Changes:

  • Override OpencodeIntegration.build_exec_args() to dispatch via opencode run, mapping slash-commands to --command, model to -m, and JSON capture to --format json.
  • Add regression tests asserting opencode’s exec-arg construction for slash-command dispatch, model flag mapping, JSON output, and plain prompt dispatch.
Show a summary per file
File Description
src/specify_cli/integrations/opencode/__init__.py Implements opencode-specific CLI argument construction for workflow dispatch via run/--command and correct flag mapping.
tests/integrations/test_integration_opencode.py Adds focused tests to prevent regressions in opencode dispatch argument formatting.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@mnriem mnriem merged commit c079b2c into github:main Apr 29, 2026
15 checks passed
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 29, 2026

Thank you!

@markuswondrak
Copy link
Copy Markdown

There are other CLIs missing as well. See my comment on the closed issue: #2409 (comment)

kanfil added a commit to tikalk/agentic-sdlc-spec-kit that referenced this pull request Apr 29, 2026
Upstream changes (22 commits):
- fix: include --from git+... in upgrade hint to avoid PyPI squat package (github#2411)
- fix: dispatch opencode commands via run (github#2410)
- feat: add catalog discovery CLI commands (github#2360)
- fix(extensions): use explicit UTF-8 encoding when reading manifest YAML (github#2370)
- feat: Speckit preset fiction book v1.7 - Support for RAG (Chroma DB) (github#2367)
- chore: release 0.8.2, begin 0.8.3.dev0 development (github#2397)
- Catalog updates: security review v1.3.0, v-model v0.6.0, threatmodel,
  isaqb-architecture-governance, m365, MarkItDown

Fork customizations preserved:
- Fork package name and version (agentic-sdlc-specify-cli)
- skill_app integration from cli_customization
- Bundled extensions and presets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: opencode integration dispatch fails — uses unsupported -p flag instead of run subcommand

4 participants