fix(opencode): use commands/ directory (plural) to match OpenCode docs#2453
Open
marcusburghardt wants to merge 1 commit intogithub:mainfrom
Open
fix(opencode): use commands/ directory (plural) to match OpenCode docs#2453marcusburghardt wants to merge 1 commit intogithub:mainfrom
marcusburghardt wants to merge 1 commit intogithub:mainfrom
Conversation
OpenCode documentation (https://opencode.ai/docs/commands/) uses .opencode/commands/ (plural) as the canonical command directory. The OpenCode runtime supports both .opencode/command/ and .opencode/commands/ via a {command,commands} glob, but the singular form was the original convention and is now outdated. Update the OpenCode integration to write to .opencode/commands/ instead of .opencode/command/, aligning with the documented standard and the OpenSpec fix (Fission-AI/OpenSpec#748). Signed-off-by: Marcus Burghardt <maburgha@redhat.com> Assisted-by: OpenCode (claude-opus-4-6)
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
Align the OpenCode integration's command directory with OpenCode's
documented standard:
.opencode/commands/(plural) instead of.opencode/command/(singular).OpenCode's documentation (https://opencode.ai/docs/commands/) uses
commands/as the canonical directory name. The OpenCode runtimesupports both via a
{command,commands}glob, so the singular formworks but is outdated. OpenSpec already fixed this in
Fission-AI/OpenSpec#748.
This is a two-value change in
opencode/__init__.py:commands_subdir:"command"→"commands"registrar_config.dir:".opencode/command"→".opencode/commands"With corresponding test updates in
test_integration_opencode.pyand
test_integration_subcommand.py.Backward compatibility
No user action is required. OpenCode loads commands from both
.opencode/command/and.opencode/commands/via its{command,commands}glob, so existing projects continueworking without changes. After updating, new
specify initruns will deploy Speckit commands to
.opencode/commands/(plural). Previously deployed Speckit commands in
.opencode/command/remain functional but can be removed:Testing
uv run specify --helpuv sync && uv run pytestRan
specify init /tmp/speckit-test --integration opencode --script shand verified commands are created in
.opencode/commands/(plural)with no
.opencode/command/(singular) directory created.Also ran
uv run python -m pytest tests/test_agent_config_consistency.py(24/24 pass).
AI Disclosure
This fix was identified through codebase analysis using OpenCode
(claude-opus-4-6). The two-line source change and test updates
were authored with AI assistance. All tests were run and verified
locally.