-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[Fix] Add transformToSkillReferences for skills-only delivery mode #881
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Context
Reported in #879 by @m9dfukc. When delivery: 'skills' is configured, generated SKILL.md files contain hardcoded /opsx:* command references that point to commands that don't exist in skills-only mode.
Root Cause
- Workflow templates in
src/core/templates/workflows/*.tshardcode/opsx:*references (46 total across all templates) generateSkillContent()supports atransformInstructionscallback, but onlytransformToHyphenCommands(for OpenCode) existsinit.tsandupdate.tsdon't pass any transformer whendelivery === 'skills'
Proposed Fix
-
Add
transformToSkillReferences()tosrc/utils/command-references.tsusing the explicit mapping fromWORKFLOW_TO_SKILL_DIRin init.ts:/opsx:apply→/openspec-apply-change/opsx:archive→/openspec-archive-change/opsx:verify→/openspec-verify-change/opsx:continue→/openspec-continue-change/opsx:propose→/openspec-propose/opsx:explore→/openspec-explore/opsx:ff→/openspec-ff-change/opsx:new→/openspec-new-change/opsx:sync→/openspec-sync-specs/opsx:bulk-archive→/openspec-bulk-archive-change/opsx:onboard→/openspec-onboard
-
Wire the transformer in
src/core/init.tsandsrc/core/update.ts:
const transformer = tool.value === 'opencode'
? transformToHyphenCommands
: delivery === 'skills'
? transformToSkillReferences
: undefined;- Add tests for the new transformer
Files to Modify
src/utils/command-references.ts— addtransformToSkillReferences()src/core/init.ts— wire transformer (~line 541)src/core/update.ts— wire transformer (~lines 198, 669)- Tests
Closes #879
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working