Skip to content

OpenCode command directory: command/ vs commands/ #748

Description

@calionauta

While reading through the OpenSpec OpenCode adapter, I noticed that generated commands are written to a singular directory:

  .opencode/command/

Specifically, in: src/core/command-generation/adapters/opencode.ts there is a hard-coded path similar to:

path.join('.opencode', 'command', `opsx-${commandId}.md`)

From what I understand, the current OpenCode documentation describes the plural form as the standard structure:

  .opencode/commands/
  ~/.config/opencode/commands/

I also noticed that the docs mention singular directory names may still be supported for backward compatibility, so it’s very possible that I’m missing some context here.

Questions:

  1. Is OpenSpec intentionally targeting command/ (singular) for backward compatibility with OpenCode?
  2. Given that the OpenCode docs describe commands/ as the standard, would it make sense to consider switching the adapter to the plural form, or supporting both to better align with upstream?

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions