fix(opencode): use plural commands directory per official docs#2495
Open
tinesoft wants to merge 1 commit intogithub:mainfrom
Open
fix(opencode): use plural commands directory per official docs#2495tinesoft wants to merge 1 commit intogithub:mainfrom
commands directory per official docs#2495tinesoft wants to merge 1 commit intogithub:mainfrom
Conversation
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.
Contributor
There was a problem hiding this comment.
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_subdirfromcommand→commands. - 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" |
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.
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, whichstill works for backwards compatibility but is no longer the recommended convention.
This updates
commands_subdirandregistrar_config["dir"]in the opencode integration, along with the correspondingtest constants.
Testing
uv run specify --helpuv sync && uv run pytestAll 23 opencode integration tests pass (
uv run python -m pytest tests/integrations/test_integration_opencode.py -q).AI Disclosure
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.