fix(explore): require explicit confirmation before writing files - #1716
fix(explore): require explicit confirmation before writing files#1716aymanxdev wants to merge 1 commit into
Conversation
Fork pull request not scannedFork pull requests are not scanned. Open the branch in this repository, then create a new pull request. |
|
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 (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughExplore mode now requires a separate direct yes/no confirmation before writing files. It prohibits implementation-related changes, including workflow configuration, schemas, templates, and ChangesExplore write policy
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change adds explicit confirmation before explore mode writes files while preserving existing requested-write behavior. It is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 — prompt text only; no code paths change. Touches the explore skill template, its generated
/opsx:explorecommand twin, the committed skills.sh copy, and the pinned parity hashes.What was wrong
In explore mode, the guardrail "You MAY create OpenSpec artifacts … if the user asks" let an agent read answers to its own clarifying questions as an implicit go-ahead. In the reported case the agent created a project schema under
openspec/schemas/and switchedschema:inopenspec/config.yamlwhile the user was still discussing a possible design. Workflow configuration was also uncovered ground: neither "Don't implement" (scoped to application code) nor "Don't auto-capture" (scoped to change artifacts) claimed it.What changes
Both explore templates (skill and
/opsx:explorecommand — their guardrail text is byte-identical) now instruct the agent to:openspec/config.yaml— as changes, not thinking, under "Don't implement".Why it's safe
Explore stays exactly as capable: reading, searching, diagramming, and creating artifacts on request are all unchanged. The only new behaviour is one confirmation question before the first write. Non-explore skills and commands are untouched.
Proof
skills/openspec-explore/SKILL.mdregenerated withpnpm build && pnpm generate:skills; parity hashes updated withpnpm regen:parity-hashes.openspec init --tools claudefrom this branch installs the new text in both.claude/skills/openspec-explore/SKILL.mdand.claude/commands/opsx/explore.md.git statusconfirmed zero files written.No OpenSpec change proposal is included since no main spec covers the explore skill and precedent (#1658) shipped skill-text fixes directly — happy to add one if you'd prefer.
Generated with Claude Code using claude-fable-5. Tested and verified as above.
Closes #1715
Summary by CodeRabbit
New Features
Documentation