Skip to content

rename opsx to openspec#907

Open
chenxizhang wants to merge 3 commits intoFission-AI:mainfrom
chenxizhang:main
Open

rename opsx to openspec#907
chenxizhang wants to merge 3 commits intoFission-AI:mainfrom
chenxizhang:main

Conversation

@chenxizhang
Copy link
Copy Markdown

@chenxizhang chenxizhang commented Apr 3, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • All slash commands now use the /openspec: prefix (e.g., /openspec:propose, /openspec:apply, /openspec:archive, /openspec:new, /openspec:continue, /openspec:verify).
    • Updated command file naming conventions to use openspec- prefix for generated artifacts across all supported tools.
  • Documentation

    • Updated all documentation and user-facing examples to reflect the new /openspec:* command namespace.

Copilot AI and others added 3 commits April 2, 2026 10:00
- Update all 24 command adapter file paths from opsx to openspec
- Update adapter name fields (continue, cursor, iflow) from opsx- to openspec-
- Update CommandTemplate display names from OPSX: to OpenSpec: in 11 workflow files
- Update /opsx:* instruction references to /openspec:* in workflow templates
- Update transformToHyphenCommands utility for opencode (/openspec: -> /openspec-)
- Update init.ts, update.ts, migration.ts, welcome-screen.ts console messages
- Update README.md and docs/opsx.md command references
- Update legacy-cleanup patterns to detect old opsx-* files instead of openspec-*
- Update all test files to match new paths and naming conventions

Agent-Logs-Url: https://github.com/chenxizhang/OpenSpec/sessions/2f6b7d67-5478-414d-998b-0766bc8dce3f

Co-authored-by: chenxizhang <1996954+chenxizhang@users.noreply.github.com>
…consistency

Complete migration from /opsx:* to /openspec:* command prefix
@chenxizhang chenxizhang requested a review from TabishB as a code owner April 3, 2026 00:47
@1code-async
Copy link
Copy Markdown
Contributor

1code-async bot commented Apr 3, 2026

Task completed.

I'll review this PR by examining the changes. Let me start by fetching the PR details and diff.


View full conversation

Powered by 1Code

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

This PR systematically renames the slash command namespace across the entire codebase from /opsx:* to /openspec:*, including documentation files, command generation adapters for multiple AI tools, workflow templates, and test fixtures. The change is purely a namespace/naming refactor with no functional logic modifications.

Changes

Cohort / File(s) Summary
Documentation
README.md, docs/cli.md, docs/commands.md, docs/concepts.md, docs/getting-started.md, docs/migration-guide.md, docs/opsx.md, docs/supported-tools.md, docs/workflows.md
Updated all documented slash command examples and references from /opsx:* to /openspec:* across command tables, workflow diagrams, examples, and tool configuration file patterns.
Command Generation Adapters
src/core/command-generation/adapters/*.ts
Updated file path generation and frontmatter naming across 20+ adapters (Amazon Q, Antigravity, Auggie, Claude, Cline, CodeBuddy, Codex, Continue, CoStrict, Crush, Cursor, Factory, Gemini, GitHub Copilot, iFlow, Kilo Code, Kiro, OpenCode, Pi, Qoder, Qwen, RooCode, Windsurf) from opsx-<id> to openspec-<id> patterns in getFilePath() and frontmatter output.
Workflow Templates
src/core/templates/workflows/*.ts
Updated command template display names from OPSX: * to OpenSpec: * and replaced all user-facing command references (e.g., /opsx:apply, /opsx:archive) with /openspec:* equivalents in apply-change, archive-change, bulk-archive-change, continue-change, explore, ff-change, new-change, onboard, propose, sync-specs, and verify-change templates.
Core CLI & Utilities
src/core/init.ts, src/core/update.ts, src/core/migration.ts, src/core/legacy-cleanup.ts, src/ui/welcome-screen.ts, src/utils/command-references.ts, src/core/command-generation/types.ts
Updated user-facing messaging, legacy artifact path patterns, and command reference transformation utilities to use /openspec: prefix instead of /opsx:.
Test Files
test/commands/*.test.ts, test/core/command-generation/*.test.ts, test/core/legacy-cleanup.test.ts, test/core/init.test.ts, test/core/migration.test.ts, test/core/templates/*.test.ts, test/core/update.test.ts, test/core/shared/*.test.ts, test/utils/command-references.test.ts
Updated test fixtures, assertions, and expected paths/filenames from opsx-* to openspec-* patterns and regenerated cryptographic hashes for template parity verification.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #556: Modifies command-generation adapter implementations and getFilePath/formatFile signatures that are directly renamed in this PR.
  • PR #626: Updates src/utils/command-references.ts to implement transformToHyphenCommands utility, which this PR modifies to handle the new /openspec: prefix.
  • PR #627: Adds transformToHyphenCommands usage for /opsx: prefix conversion; this PR updates the same utility and its callers to use /openspec: namespace instead.

Suggested labels

codex

Suggested reviewers

  • TabishB

Poem

🐰 From opsx to openspec we hop,
A namespace bloom that will not stop,
Twenty adapters dance in line,
Templates dressed in names so fine,
Tests and docs all realigned—
A naming quest, both wide and kind! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'rename opsx to openspec' accurately summarizes the main change: a systematic namespace/prefix renaming from 'opsx' to 'openspec' across documentation, adapters, templates, tests, and utilities.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/commands.md (1)

631-645: ⚠️ Potential issue | 🟡 Minor

Inconsistent terminology: "OPSX" references remain in Legacy Commands section.

The commands have been renamed from /opsx:* to /openspec:*, but lines 631 and 644 still reference "OPSX commands" and "Migrating to OPSX". These should be updated for consistency.

Suggested fix
-These commands use the older "all-at-once" workflow. They still work but OPSX commands are recommended.
+These commands use the older "all-at-once" workflow. They still work but the newer OpenSpec commands are recommended.
-**Migrating to OPSX:**
-Legacy changes can be continued with OPSX commands. The artifact structure is compatible.
+**Migrating to OpenSpec commands:**
+Legacy changes can be continued with the newer OpenSpec commands. The artifact structure is compatible.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/commands.md` around lines 631 - 645, Update the inconsistent
terminology: replace references to "OPSX" and the phrase "Migrating to OPSX"
with the correct new name "openspec" (e.g., "openspec commands" or "Migrating to
openspec") so the Legacy Commands paragraph and the migration note match the
renamed command prefix (/openspec:*); search for the literal tokens "OPSX" and
"Migrating to OPSX" in the shown block and swap them to "openspec" or "Migrating
to openspec" as appropriate.
🧹 Nitpick comments (3)
src/core/templates/workflows/archive-change.ts (1)

122-124: Consider renaming the exported function for consistency.

Line 122 still uses getOpsxArchiveCommandTemplate, which now conflicts with the renamed namespace and can cause confusion during maintenance.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/templates/workflows/archive-change.ts` around lines 122 - 124, The
exported function getOpsxArchiveCommandTemplate should be renamed for
consistency with the new namespace (e.g., rename getOpsxArchiveCommandTemplate
to getOpenSpecArchiveCommandTemplate or getOpenSpecArchiveCommandTemplate) and
all references updated; change the function declaration and its export symbol in
src/core/templates/workflows/archive-change.ts, then update any imports/usages
across the codebase to use the new name (search for
getOpsxArchiveCommandTemplate and replace with the chosen new symbol).
src/core/templates/workflows/bulk-archive-change.ts (1)

254-257: Consider renaming the exported helper to remove legacy Opsx naming.

The template title is now OpenSpec, but getOpsxBulkArchiveCommandTemplate still carries the old namespace. Renaming this symbol would make internal naming consistent and reduce confusion during future cleanup.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/templates/workflows/bulk-archive-change.ts` around lines 254 - 257,
Rename the exported helper function getOpsxBulkArchiveCommandTemplate to match
the new OpenSpec naming (e.g., getOpenSpecBulkArchiveCommandTemplate) and update
all internal references/imports/exports to use the new symbol; ensure the
exported CommandTemplate object returned (name: 'OpenSpec: Bulk Archive') stays
unchanged and run tests/TS build to catch any missed usages of
getOpsxBulkArchiveCommandTemplate.
src/core/templates/workflows/apply-change.ts (1)

164-166: Consider renaming internal function for consistency.

The function getOpsxApplyCommandTemplate still uses the old "Opsx" prefix while returning user-facing content with "OpenSpec" naming. This is an internal API, so it doesn't affect users, but renaming to getOpenSpecApplyCommandTemplate would align with the PR's naming convention.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/templates/workflows/apply-change.ts` around lines 164 - 166, Rename
the internal function getOpsxApplyCommandTemplate to
getOpenSpecApplyCommandTemplate for naming consistency: update the function
declaration/export and every reference/import of getOpsxApplyCommandTemplate
across the codebase (including any tests or callers), ensuring the returned
CommandTemplate and its contents remain unchanged and TypeScript types/exports
are updated accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/migration-guide.md`:
- Around line 319-321: The fenced command snippets containing the literal lines
"/openspec:continue" and "/openspec:explore" use bare ``` fences and should
include a language/info tag to satisfy markdownlint MD040; update the fences
around the blocks that wrap the "/openspec:continue" and "/openspec:explore"
snippets (e.g., the fences shown in the diff) to use ```text instead of ``` so
the blocks become ```text ... ``` and avoid the lint warning.

In `@docs/opsx.md`:
- Around line 175-177: The markdown uses bare triple backticks for short command
examples (e.g. the blocks containing "/openspec:explore", "/openspec:propose",
"/openspec:continue", "/openspec:ff add-dark-mode", "/openspec:apply", and
"/openspec:archive"), which triggers MD040; update each of those fenced code
blocks to include a language tag such as "text" (i.e., replace ``` with ```text)
for all occurrences noted (around the command lines and the other ranges:
182-184, 195-197, 200-202, 207-209, 213-214) so the examples are properly
fenced.

In `@docs/supported-tools.md`:
- Around line 27-43: The table entries for Claude Code, CodeBuddy, Crush, Gemini
CLI, and Qoder use the wrong command path segment "opsx"; update the right-hand
column for the rows with symbols "Claude Code (`claude`)", "CodeBuddy
(`codebuddy`)", "Crush (`crush`)", "Gemini CLI (`gemini`)", and "Qoder
(`qoder`)" to use "openspec" instead of "opsx" (i.e., replace
`.claude/commands/opsx/<id>.md` → `.claude/commands/openspec/<id>.md`,
`.codebuddy/commands/opsx/<id>.md` → `.codebuddy/commands/openspec/<id>.md`,
`.crush/commands/opsx/<id>.md` → `.crush/commands/openspec/<id>.md`,
`.gemini/commands/opsx/<id>.toml` → `.gemini/commands/openspec/<id>.toml`, and
`.qoder/commands/opsx/<id>.md` → `.qoder/commands/openspec/<id>.md`).

In `@src/core/command-generation/adapters/codebuddy.ts`:
- Line 19: The legacy cleanup patterns are missing CodeBuddy's command dirs, so
add entries for CodeBuddy (at minimum ".codebuddy/commands/opsx") to the list in
src/core/legacy-cleanup.ts (e.g., the array or constant that contains cleanup
patterns such as LEGACY_DIRS or LEGACY_CLEANUP_PATTERNS); also consider adding
".codebuddy/commands/openspec" to cover the new path produced by the return in
the codebuddy adapter (the line returning
path.join('.codebuddy','commands','openspec',`${commandId}.md`)), ensuring stale
slash-command files are removed during cleanup.

In `@src/core/command-generation/adapters/factory.ts`:
- Line 19: The factory filename pattern changed to generate
.factory/commands/openspec-*.md, so update the cleanup rules in
legacy-cleanup.ts (the cleanup patterns map/constant for "factory") to also
match openspec-*.md (either add a second glob for
.factory/commands/openspec-*.md or change the existing opsx-*.md glob/regex to
include both opsx and openspec, e.g., opsx-*.md|openspec-*.md or use a combined
pattern like {opsx,openspec}-*.md) so newly generated openspec artifacts are
removed by the legacy cleanup.

In `@src/core/command-generation/adapters/opencode.ts`:
- Line 20: The generator path in
src/core/command-generation/adapters/opencode.ts uses
'.opencode/commands/openspec-<id>.md' but legacy-cleanup expects
'.opencode/command/...', causing orphaned files; update the path segment in the
return expression (the path.join call that currently uses 'commands') to use the
singular 'command' so the generated files match legacy-cleanup and existing
tests, or alternatively change legacy-cleanup and tests to the plural — pick one
canonical form and make the corresponding change in opencode.ts (or
legacy-cleanup.ts/tests) so both generator (the path.join in opencode.ts) and
cleanup use the exact same directory name.

---

Outside diff comments:
In `@docs/commands.md`:
- Around line 631-645: Update the inconsistent terminology: replace references
to "OPSX" and the phrase "Migrating to OPSX" with the correct new name
"openspec" (e.g., "openspec commands" or "Migrating to openspec") so the Legacy
Commands paragraph and the migration note match the renamed command prefix
(/openspec:*); search for the literal tokens "OPSX" and "Migrating to OPSX" in
the shown block and swap them to "openspec" or "Migrating to openspec" as
appropriate.

---

Nitpick comments:
In `@src/core/templates/workflows/apply-change.ts`:
- Around line 164-166: Rename the internal function getOpsxApplyCommandTemplate
to getOpenSpecApplyCommandTemplate for naming consistency: update the function
declaration/export and every reference/import of getOpsxApplyCommandTemplate
across the codebase (including any tests or callers), ensuring the returned
CommandTemplate and its contents remain unchanged and TypeScript types/exports
are updated accordingly.

In `@src/core/templates/workflows/archive-change.ts`:
- Around line 122-124: The exported function getOpsxArchiveCommandTemplate
should be renamed for consistency with the new namespace (e.g., rename
getOpsxArchiveCommandTemplate to getOpenSpecArchiveCommandTemplate or
getOpenSpecArchiveCommandTemplate) and all references updated; change the
function declaration and its export symbol in
src/core/templates/workflows/archive-change.ts, then update any imports/usages
across the codebase to use the new name (search for
getOpsxArchiveCommandTemplate and replace with the chosen new symbol).

In `@src/core/templates/workflows/bulk-archive-change.ts`:
- Around line 254-257: Rename the exported helper function
getOpsxBulkArchiveCommandTemplate to match the new OpenSpec naming (e.g.,
getOpenSpecBulkArchiveCommandTemplate) and update all internal
references/imports/exports to use the new symbol; ensure the exported
CommandTemplate object returned (name: 'OpenSpec: Bulk Archive') stays unchanged
and run tests/TS build to catch any missed usages of
getOpsxBulkArchiveCommandTemplate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 08281812-3933-4fe6-a383-9cda6f3b0c1b

📥 Commits

Reviewing files that changed from the base of the PR and between afdca0d and 19d4da7.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (62)
  • README.md
  • docs/cli.md
  • docs/commands.md
  • docs/concepts.md
  • docs/getting-started.md
  • docs/migration-guide.md
  • docs/opsx.md
  • docs/supported-tools.md
  • docs/workflows.md
  • src/core/command-generation/adapters/amazon-q.ts
  • src/core/command-generation/adapters/antigravity.ts
  • src/core/command-generation/adapters/auggie.ts
  • src/core/command-generation/adapters/claude.ts
  • src/core/command-generation/adapters/cline.ts
  • src/core/command-generation/adapters/codebuddy.ts
  • src/core/command-generation/adapters/codex.ts
  • src/core/command-generation/adapters/continue.ts
  • src/core/command-generation/adapters/costrict.ts
  • src/core/command-generation/adapters/crush.ts
  • src/core/command-generation/adapters/cursor.ts
  • src/core/command-generation/adapters/factory.ts
  • src/core/command-generation/adapters/gemini.ts
  • src/core/command-generation/adapters/github-copilot.ts
  • src/core/command-generation/adapters/iflow.ts
  • src/core/command-generation/adapters/kilocode.ts
  • src/core/command-generation/adapters/kiro.ts
  • src/core/command-generation/adapters/opencode.ts
  • src/core/command-generation/adapters/pi.ts
  • src/core/command-generation/adapters/qoder.ts
  • src/core/command-generation/adapters/qwen.ts
  • src/core/command-generation/adapters/roocode.ts
  • src/core/command-generation/adapters/windsurf.ts
  • src/core/command-generation/types.ts
  • src/core/init.ts
  • src/core/legacy-cleanup.ts
  • src/core/migration.ts
  • src/core/templates/workflows/apply-change.ts
  • src/core/templates/workflows/archive-change.ts
  • src/core/templates/workflows/bulk-archive-change.ts
  • src/core/templates/workflows/continue-change.ts
  • src/core/templates/workflows/explore.ts
  • src/core/templates/workflows/ff-change.ts
  • src/core/templates/workflows/new-change.ts
  • src/core/templates/workflows/onboard.ts
  • src/core/templates/workflows/propose.ts
  • src/core/templates/workflows/sync-specs.ts
  • src/core/templates/workflows/verify-change.ts
  • src/core/update.ts
  • src/ui/welcome-screen.ts
  • src/utils/command-references.ts
  • test/commands/artifact-workflow.test.ts
  • test/commands/config-profile.test.ts
  • test/core/command-generation/adapters.test.ts
  • test/core/command-generation/generator.test.ts
  • test/core/command-generation/types.test.ts
  • test/core/init.test.ts
  • test/core/legacy-cleanup.test.ts
  • test/core/migration.test.ts
  • test/core/shared/skill-generation.test.ts
  • test/core/templates/skill-templates-parity.test.ts
  • test/core/update.test.ts
  • test/utils/command-references.test.ts

Comment on lines 319 to 321
```
/opsx:continue
/openspec:continue
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language tags on these fenced command snippets.

These touched blocks use bare fences and can trigger markdown lint (MD040).

Suggested markdownlint fix
-```
+```text
 /openspec:continue

@@
- +text
/openspec:explore

Also applies to: 325-327

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/migration-guide.md` around lines 319 - 321, The fenced command snippets
containing the literal lines "/openspec:continue" and "/openspec:explore" use
bare ``` fences and should include a language/info tag to satisfy markdownlint
MD040; update the fences around the blocks that wrap the "/openspec:continue"
and "/openspec:explore" snippets (e.g., the fences shown in the diff) to use
```text instead of ``` so the blocks become ```text ... ``` and avoid the lint
warning.

Comment on lines 175 to 177
```
/opsx:explore
/openspec:explore
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add fence language tags for short command examples.

Several changed command blocks still use bare triple backticks, which triggers markdown lint (MD040).

Suggested markdownlint fix
-```
+```text
 /openspec:explore

@@
- +text
/openspec:propose

@@
-```
+```text
/openspec:continue

@@
- +text
/openspec:ff add-dark-mode

@@
-```
+```text
/openspec:apply

@@
- +text
/openspec:archive # Move to archive when done (prompts to sync specs if needed)

Also applies to: 182-184, 195-197, 200-202, 207-209, 213-214

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/opsx.md` around lines 175 - 177, The markdown uses bare triple backticks
for short command examples (e.g. the blocks containing "/openspec:explore",
"/openspec:propose", "/openspec:continue", "/openspec:ff add-dark-mode",
"/openspec:apply", and "/openspec:archive"), which triggers MD040; update each
of those fenced code blocks to include a language tag such as "text" (i.e.,
replace ``` with ```text) for all occurrences noted (around the command lines
and the other ranges: 182-184, 195-197, 200-202, 207-209, 213-214) so the
examples are properly fenced.

Comment on lines 27 to 43
| Claude Code (`claude`) | `.claude/skills/openspec-*/SKILL.md` | `.claude/commands/opsx/<id>.md` |
| Cline (`cline`) | `.cline/skills/openspec-*/SKILL.md` | `.clinerules/workflows/opsx-<id>.md` |
| Cline (`cline`) | `.cline/skills/openspec-*/SKILL.md` | `.clinerules/workflows/openspec-<id>.md` |
| CodeBuddy (`codebuddy`) | `.codebuddy/skills/openspec-*/SKILL.md` | `.codebuddy/commands/opsx/<id>.md` |
| Codex (`codex`) | `.codex/skills/openspec-*/SKILL.md` | `$CODEX_HOME/prompts/opsx-<id>.md`\* |
| Continue (`continue`) | `.continue/skills/openspec-*/SKILL.md` | `.continue/prompts/opsx-<id>.prompt` |
| CoStrict (`costrict`) | `.cospec/skills/openspec-*/SKILL.md` | `.cospec/openspec/commands/opsx-<id>.md` |
| Codex (`codex`) | `.codex/skills/openspec-*/SKILL.md` | `$CODEX_HOME/prompts/openspec-<id>.md`\* |
| Continue (`continue`) | `.continue/skills/openspec-*/SKILL.md` | `.continue/prompts/openspec-<id>.prompt` |
| CoStrict (`costrict`) | `.cospec/skills/openspec-*/SKILL.md` | `.cospec/openspec/commands/openspec-<id>.md` |
| Crush (`crush`) | `.crush/skills/openspec-*/SKILL.md` | `.crush/commands/opsx/<id>.md` |
| Cursor (`cursor`) | `.cursor/skills/openspec-*/SKILL.md` | `.cursor/commands/opsx-<id>.md` |
| Factory Droid (`factory`) | `.factory/skills/openspec-*/SKILL.md` | `.factory/commands/opsx-<id>.md` |
| Cursor (`cursor`) | `.cursor/skills/openspec-*/SKILL.md` | `.cursor/commands/openspec-<id>.md` |
| Factory Droid (`factory`) | `.factory/skills/openspec-*/SKILL.md` | `.factory/commands/openspec-<id>.md` |
| Gemini CLI (`gemini`) | `.gemini/skills/openspec-*/SKILL.md` | `.gemini/commands/opsx/<id>.toml` |
| GitHub Copilot (`github-copilot`) | `.github/skills/openspec-*/SKILL.md` | `.github/prompts/opsx-<id>.prompt.md`\*\* |
| iFlow (`iflow`) | `.iflow/skills/openspec-*/SKILL.md` | `.iflow/commands/opsx-<id>.md` |
| Kilo Code (`kilocode`) | `.kilocode/skills/openspec-*/SKILL.md` | `.kilocode/workflows/opsx-<id>.md` |
| Kiro (`kiro`) | `.kiro/skills/openspec-*/SKILL.md` | `.kiro/prompts/opsx-<id>.prompt.md` |
| OpenCode (`opencode`) | `.opencode/skills/openspec-*/SKILL.md` | `.opencode/commands/opsx-<id>.md` |
| Pi (`pi`) | `.pi/skills/openspec-*/SKILL.md` | `.pi/prompts/opsx-<id>.md` |
| GitHub Copilot (`github-copilot`) | `.github/skills/openspec-*/SKILL.md` | `.github/prompts/openspec-<id>.prompt.md`\*\* |
| iFlow (`iflow`) | `.iflow/skills/openspec-*/SKILL.md` | `.iflow/commands/openspec-<id>.md` |
| Kilo Code (`kilocode`) | `.kilocode/skills/openspec-*/SKILL.md` | `.kilocode/workflows/openspec-<id>.md` |
| Kiro (`kiro`) | `.kiro/skills/openspec-*/SKILL.md` | `.kiro/prompts/openspec-<id>.prompt.md` |
| OpenCode (`opencode`) | `.opencode/skills/openspec-*/SKILL.md` | `.opencode/commands/openspec-<id>.md` |
| Pi (`pi`) | `.pi/skills/openspec-*/SKILL.md` | `.pi/prompts/openspec-<id>.md` |
| Qoder (`qoder`) | `.qoder/skills/openspec-*/SKILL.md` | `.qoder/commands/opsx/<id>.md` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the actual command path patterns in adapter implementations

# Check Claude adapter path
rg -n "commands.*opsx|commands.*openspec" --type=ts src/core/command-generation/adapters/

# Check all adapter getFilePath implementations
ast-grep --pattern $'getFilePath($_) {
  $$$
}'

Repository: Fission-AI/OpenSpec

Length of output: 2985


Update command paths for Claude Code, CodeBuddy, Crush, Gemini CLI, and Qoder to match actual implementation.

The documented command paths for these five tools use opsx/ but the actual adapter implementations use nested openspec/ directories:

  • Claude Code: Change .claude/commands/opsx/<id>.md.claude/commands/openspec/<id>.md
  • CodeBuddy: Change .codebuddy/commands/opsx/<id>.md.codebuddy/commands/openspec/<id>.md
  • Crush: Change .crush/commands/opsx/<id>.md.crush/commands/openspec/<id>.md
  • Gemini CLI: Change .gemini/commands/opsx/<id>.toml.gemini/commands/openspec/<id>.toml
  • Qoder: Change .qoder/commands/opsx/<id>.md.qoder/commands/openspec/<id>.md
🧰 Tools
🪛 LanguageTool

[uncategorized] ~37-~37: The official name of this software platform is spelled with a capital “H”.
Context: ...| | GitHub Copilot (github-copilot) | .github/skills/openspec-*/SKILL.md | `.github/...

(GITHUB)


[uncategorized] ~37-~37: The official name of this software platform is spelled with a capital “H”.
Context: ... .github/skills/openspec-*/SKILL.md | .github/prompts/openspec-<id>.prompt.md** | ...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/supported-tools.md` around lines 27 - 43, The table entries for Claude
Code, CodeBuddy, Crush, Gemini CLI, and Qoder use the wrong command path segment
"opsx"; update the right-hand column for the rows with symbols "Claude Code
(`claude`)", "CodeBuddy (`codebuddy`)", "Crush (`crush`)", "Gemini CLI
(`gemini`)", and "Qoder (`qoder`)" to use "openspec" instead of "opsx" (i.e.,
replace `.claude/commands/opsx/<id>.md` → `.claude/commands/openspec/<id>.md`,
`.codebuddy/commands/opsx/<id>.md` → `.codebuddy/commands/openspec/<id>.md`,
`.crush/commands/opsx/<id>.md` → `.crush/commands/openspec/<id>.md`,
`.gemini/commands/opsx/<id>.toml` → `.gemini/commands/openspec/<id>.toml`, and
`.qoder/commands/opsx/<id>.md` → `.qoder/commands/openspec/<id>.md`).


getFilePath(commandId: string): string {
return path.join('.codebuddy', 'commands', 'opsx', `${commandId}.md`);
return path.join('.codebuddy', 'commands', 'openspec', `${commandId}.md`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add CodeBuddy to legacy opsx cleanup patterns to prevent stale command files.

Line 19 now writes to .codebuddy/commands/openspec/..., but src/core/legacy-cleanup.ts currently lists old opsx directories for other tools and appears to omit .codebuddy/commands/opsx. That can leave stale slash-command files after migration.

Suggested follow-up patch in src/core/legacy-cleanup.ts
 // Directory-based: .tooldir/commands/opsx/ or .tooldir/commands/opsx/*.md
   'claude': { type: 'directory', path: '.claude/commands/opsx' },
+  'codebuddy': { type: 'directory', path: '.codebuddy/commands/opsx' },
   'n': { type: 'directory', path: '.n/commands/opsx' },
   'qoder': { type: 'directory', path: '.qoder/commands/opsx' },
   'crush': { type: 'directory', path: '.crush/commands/opsx' },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/command-generation/adapters/codebuddy.ts` at line 19, The legacy
cleanup patterns are missing CodeBuddy's command dirs, so add entries for
CodeBuddy (at minimum ".codebuddy/commands/opsx") to the list in
src/core/legacy-cleanup.ts (e.g., the array or constant that contains cleanup
patterns such as LEGACY_DIRS or LEGACY_CLEANUP_PATTERNS); also consider adding
".codebuddy/commands/openspec" to cover the new path produced by the return in
the codebuddy adapter (the line returning
path.join('.codebuddy','commands','openspec',`${commandId}.md`)), ensuring stale
slash-command files are removed during cleanup.


getFilePath(commandId: string): string {
return path.join('.factory', 'commands', `opsx-${commandId}.md`);
return path.join('.factory', 'commands', `openspec-${commandId}.md`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Update legacy cleanup patterns for new Factory filenames.

Line 19 now generates .factory/commands/openspec-*.md, but src/core/legacy-cleanup.ts still matches only .factory/commands/opsx-*.md for factory. This leaves newly generated openspec-* artifacts outside cleanup coverage.

Suggested fix
-  'factory': { type: 'files', pattern: '.factory/commands/opsx-*.md' },
+  'factory': { type: 'files', pattern: ['.factory/commands/opsx-*.md', '.factory/commands/openspec-*.md'] },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/command-generation/adapters/factory.ts` at line 19, The factory
filename pattern changed to generate .factory/commands/openspec-*.md, so update
the cleanup rules in legacy-cleanup.ts (the cleanup patterns map/constant for
"factory") to also match openspec-*.md (either add a second glob for
.factory/commands/openspec-*.md or change the existing opsx-*.md glob/regex to
include both opsx and openspec, e.g., opsx-*.md|openspec-*.md or use a combined
pattern like {opsx,openspec}-*.md) so newly generated openspec artifacts are
removed by the legacy cleanup.


getFilePath(commandId: string): string {
return path.join('.opencode', 'commands', `opsx-${commandId}.md`);
return path.join('.opencode', 'commands', `openspec-${commandId}.md`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== OpenCode path usage in source and tests =="
rg -n --type=ts --type=md '\.opencode/(command|commands)/|openspec-.*\.md|opsx-.*\.md|toolId:\s*["'\'']opencode["'\'']' src test

echo
echo "== Legacy cleanup patterns for opencode =="
rg -n "opencode|\\.opencode/" src/core/legacy-cleanup.ts test/core/legacy-cleanup.test.ts

Repository: Fission-AI/OpenSpec

Length of output: 27888


Fix OpenCode path mismatch between generator and cleanup: commands vs command.

opencode.ts line 20 writes to .opencode/commands/openspec-<id>.md, but legacy-cleanup.ts line 52 searches .opencode/command/... (singular). This prevents cleanup from finding and deleting generated OpenCode artifacts, leaving stale files orphaned.

Choose one canonical path form across the adapter, cleanup patterns, and all tests:

  • Either .opencode/command/ (to match current cleanup expectations and tests)
  • Or .opencode/commands/ (to match current generator)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/command-generation/adapters/opencode.ts` at line 20, The generator
path in src/core/command-generation/adapters/opencode.ts uses
'.opencode/commands/openspec-<id>.md' but legacy-cleanup expects
'.opencode/command/...', causing orphaned files; update the path segment in the
return expression (the path.join call that currently uses 'commands') to use the
singular 'command' so the generated files match legacy-cleanup and existing
tests, or alternatively change legacy-cleanup and tests to the plural — pick one
canonical form and make the corresponding change in opencode.ts (or
legacy-cleanup.ts/tests) so both generator (the path.join in opencode.ts) and
cleanup use the exact same directory name.

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