Skip to content

fix(opencode): use plural commands directory per official docs#2495

Open
tinesoft wants to merge 1 commit intogithub:mainfrom
tinesoft:fix/opencode-commands
Open

fix(opencode): use plural commands directory per official docs#2495
tinesoft wants to merge 1 commit intogithub:mainfrom
tinesoft:fix/opencode-commands

Conversation

@tinesoft
Copy link
Copy Markdown
Contributor

@tinesoft tinesoft commented May 8, 2026

Description

opencode's official documentation specifies .opencode/commands/ (plural) as the directory for custom slash commands
(see https://opencode.ai/docs/commands/). The integration was using the old singular form .opencode/command, which
still works for backwards compatibility but is no longer the recommended convention.

This updates commands_subdir and registrar_config["dir"] in the opencode integration, along with the corresponding
test constants.

Testing

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

All 23 opencode integration tests pass (uv run python -m pytest tests/integrations/test_integration_opencode.py -q).

AI Disclosure

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

Code changes and documentation research generated by Claude Code (Claude Sonnet 4.6). The AI verified the correct
directory name against the official opencode docs and confirmed backwards compatibility before making the change.

The official opencode documentation specifies that custom commands should now be placed in a directory named `.opencode/commands`.
Although previus path is still supported, it is recommended to use the plural form to ensure compatibility with future updates and to follow the standard convention. (See <https://opencode.ai/docs/config/#precedence-order>)

Updated commands_subdir and registrar dir from `.opencode/command` to `.opencode/commands` to match opencode's canonical configuration.
Copilot AI review requested due to automatic review settings May 8, 2026 05:53
@tinesoft tinesoft requested a review from mnriem as a code owner May 8, 2026 05:53
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

Updates the Opencode integration to follow Opencode’s current convention of using the plural .opencode/commands/ directory for custom slash commands, aligning Spec Kit’s generated paths and registrar configuration with official Opencode docs.

Changes:

  • Change Opencode integration commands_subdir from commandcommands.
  • Change Opencode registrar output directory from .opencode/command.opencode/commands.
  • Update Opencode integration test constants to match the new directory naming.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/specify_cli/integrations/opencode/__init__.py Updates Opencode integration config and registrar directory to .opencode/commands.
tests/integrations/test_integration_opencode.py Updates test expectations for the new Opencode commands directory.

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

Comment on lines 15 to 17
registrar_config = {
"dir": ".opencode/command",
"dir": ".opencode/commands",
"format": "markdown",
Comment on lines 8 to 13
class TestOpencodeIntegration(MarkdownIntegrationTests):
KEY = "opencode"
FOLDER = ".opencode/"
COMMANDS_SUBDIR = "command"
REGISTRAR_DIR = ".opencode/command"
COMMANDS_SUBDIR = "commands"
REGISTRAR_DIR = ".opencode/commands"
CONTEXT_FILE = "AGENTS.md"
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.

2 participants