fix(codex): convert /gsd- workflow commands to $gsd- during installation#1994
Merged
trek-e merged 1 commit intogsd-build:mainfrom Apr 10, 2026
Merged
Conversation
The convertSlashCommandsToCodexSkillMentions function only converted colon-style skill invocations (/gsd:command) but not hyphen-style command references (/gsd-command) used in workflow output templates (Next Up blocks, phase completion messages, etc.). This caused Codex users to see /gsd- prefixed commands instead of $gsd- in chat output. - Add regex to convert /gsd-command → $gsd-command with negative lookbehind to exclude file paths (e.g. bin/gsd-tools.cjs) - Strip /clear references in Codex output (no Codex equivalent) - Add 5 regression tests covering command conversion, path preservation, and /clear removal Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
trek-e
approved these changes
Apr 10, 2026
Collaborator
trek-e
left a comment
There was a problem hiding this comment.
Review: APPROVE
Summary
Correct fix for the Codex /gsd- prefix conversion gap. The negative lookbehind (?<![a-zA-Z0-9./]) correctly excludes file path segments like bin/gsd-tools.cjs while converting slash-command references like /gsd-discuss-phase.
Test coverage
5 new regression tests in codex-config.test.cjs cover:
- Hyphen-style command conversion
- Backtick-wrapped commands
- File path exclusion (non-regression)
/clearremoval (bare and backtick-wrapped)
Tests follow project conventions.
One minor observation
The /clear removal regex handles three cases (backtick-wrapped with trailing text, bare with trailing text, standalone line). The order matters — backtick+trailing is handled before bare+trailing, which is correct. No issues.
No blocking issues
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.
Fix PR
Linked Issue
Fixes #1993
What was broken
When running GSD inside Codex, workflow chat output (Next Up blocks, phase completion messages) displayed
/gsd-prefixed commands instead of the correct$gsd-prefix. Users could not copy-paste suggested commands directly.What this fix does
Extends the Codex installation-time conversion to also handle hyphen-style command references (
/gsd-command→$gsd-command) and strips/clearreferences that have no Codex equivalent.Root cause
convertSlashCommandsToCodexSkillMentions()inbin/install.jsonly converted colon-style skill invocations (/gsd:command→$gsd-command) but not hyphen-style references (/gsd-command) used throughout all workflow output templates. The/clearcommand was also left unconverted.Testing
How I verified the fix
/clearremoval (both backtick-wrapped and bare)Regression test added?
Platforms tested
Runtimes tested
Checklist
Fixes #1993confirmed-buglabelnpm test)Breaking changes
None