Skip to content

[Bug Report] prompts and skills are not exact compatible with commands like "/opsx-new" in version 1.1.1 #727

Closed

Description

@TangCYxy

Backgroud:

  • I'm using openspen version 1.1.1 and codex 0.95.0.

Detail:

  • the commands in codex console are updated to "/opsx-xxx" as the version 1.1.1 said, but it seems like the description in SKILL files are left unchanged, which is unexpected and may cause some potential problems

Scope:

  • almost every openspec SKILL files are affected, all the description like "/opsx:xxx" should be amended to "/opsx-xxx"

proofs

  • openspec v1.1.1 release description shows that command upgrades from "/opsx:xxx" to "/opsx-xxx":
Image - the PROMPTS files after command "openspec init" as an example - Image

Activity

  1. 21st-connector commented on Feb 19, 2026

    @21st-connector
    Contributor

    Task completed.

    Comment posted successfully on issue #727: #727 (comment)

    Here's a summary of what the analysis found:

    Root cause: Commit 697738b added a transformToHyphenCommands() utility to convert /opsx: → /opsx-, but it was only wired up for the OpenCode adapter. The 10 workflow template source files in src/core/templates/workflows/ and 3 CLI output files still contain the old colon-based /opsx: format, which means all other tool adapters (Claude, Cursor, Codex, etc.) emit stale references.

    Scope: ~441 occurrences across ~73 files, with the most impactful being the 10 workflow templates and 3 CLI output files (init.ts, update.ts, welcome-screen.ts).

    Related issues: #717 and #723 likely share the same root cause.

    Recommended fix: Directly update all /opsx: → /opsx- in the template source files (Option A), rather than adding runtime transforms everywhere.


    View full conversation

    Powered by 1Code

  2. 21st-connector commented on Feb 19, 2026

    @21st-connector
    Contributor

    Issue Analysis

    This is a confirmed bug. The v1.1.1 release introduced a transformToHyphenCommands() utility to convert /opsx: → /opsx- references, but it was only applied to the OpenCode adapter. The source workflow templates and CLI output still contain the old colon-based /opsx: format.

    Root Cause

    Commit 697738b (fix(opencode): transform command references from colon to hyphen format (#626)) added the transformation utility at src/utils/command-references.ts:18-19:

    export function transformToHyphenCommands(text: string): string {
      return text.replace(/\/opsx:/g, '/opsx-');
    }

    However, this transform is only called from the OpenCode adapter at src/core/command-generation/adapters/opencode.ts:25. The underlying workflow template source files still use the colon format, so all other tool adapters emit the old /opsx: references.

    Affected Files

    Workflow templates (10 files in src/core/templates/workflows/) — these are the source of truth for all generated skill/command content:

    File Occurrences Example Lines
    onboard.ts ~25 Lines 480-532
    explore.ts ~11 Lines 100, 206, 256, 273, 306, 400, 452
    apply-change.ts ~5 Lines 26, 172, 183, 206, 276
    continue-change.ts ~3 Lines 134, 168, 212
    new-change.ts ~3 Lines 90, 142, 148
    ff-change.ts ~3 Lines 85, 117, 187
    bulk-archive-change.ts ~2 Lines 233, 480
    archive-change.ts ~1 Line 130
    sync-specs.ts ~1 Line 156
    verify-change.ts ~1 Line 184

    CLI output (user-facing messages still show old format):

    File Lines Content
    src/core/init.ts 574-576 '/opsx:new', '/opsx:continue', '/opsx:apply'
    src/core/update.ts 162-164 Same three commands
    src/ui/welcome-screen.ts 25, 28-30 Welcome screen shows /opsx:* commands

    Total: ~73 files affected, ~441 occurrences of /opsx: across the codebase (including docs and specs).

    Related Issues

    Suggested Fix Approach

    There are two possible strategies:

    Option A — Update templates at the source (recommended):
    Replace all /opsx: references with /opsx- directly in the 10 workflow template files and 3 CLI output files. This is the cleanest approach since the colon format is now deprecated.

    Option B — Apply transformation universally:
    Extend the transformToHyphenCommands() call to generateSkillContent() in src/core/shared/skill-generation.ts:106-128 and to the command generation pipeline, so all adapters receive transformed content. This would require also updating the CLI output strings separately.

    Option A is simpler and avoids the runtime overhead of regex transformations on every generated file.

    For Users — Workaround

    Until this is fixed, running openspec update after upgrading to v1.1.1 should regenerate skill files. However, since the templates themselves contain the old format, the regenerated files will still have /opsx: references unless the OpenCode adapter is being used (which applies the transform).

  3. added a commit that references this issue on Jul 28, 2026
    9a937cb
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions