fix(skills): avoid activation outside OpenSpec projects - #1658
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (26)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughOpenSpec skill descriptions and workflow templates now require an OpenSpec directory, applicable store, or explicit OpenSpec request. A shared activation guard is prepended to generated workflows. Parity tests validate the generated content. ChangesOpenSpec skill activation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change limits automatic skill activation to OpenSpec projects or explicitly named OpenSpec requests while preserving explicit commands and workflow behavior. No actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Risk: low-medium — this one is worth a real look, since it changes when skills activate. Prompt text only; no code paths change.
What was wrong
Generated OpenSpec skills advertised broad actions like "explore ideas" and "propose features". Tools that discover skills globally could therefore pick an OpenSpec workflow for an ordinary request in a repository that doesn't use OpenSpec at all.
What changes
Every generated workflow skill now opens with an OpenSpec-only activation check, and the skill body re-checks before doing any work, falling back to normal assistance if there's no OpenSpec context.
Why it's safe
The check accepts all existing OpenSpec contexts, so it should never turn off a skill someone legitimately wanted:
openspec/directory, orExplicit
/opsx:*slash commands are deliberately left unchanged — verified on this release stack: the guard appears in all 12 generated skills and in none of the generated/opsxcommands.Proof
All 12 skill frontmatters parse as YAML, descriptions run 289–453 characters (limit 1,024). 1,137 focused generation, adapter, parity and end-to-end tests pass. CI green on all three platforms.