feat(intent): review existing skill permissions during install - #255
Merged
Conversation
Contributor
|
Warning Review limit reachedNext included review available in 9 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (12)
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 |
|
View your CI Pipeline Execution ↗ for commit 5098d1e
☁️ Nx Cloud last updated this comment at |
commit: |
Merged
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.
🎯 Changes
Configured projects could only refresh guidance with
intent install; revisiting permissions required editing JSON. Addintent install --reviewto start from existing rules, add packages/scopes/skills, remove selected rules, inspect current access, and review individual skills before one save confirmation.Preserve undiscovered and excluded rules, raw unchanged entries, and existing exclusions. An unchanged inherited review keeps inheritance; confirmed changes create a local override in the nearest owning package.json. Reject policy changes made while review is open. Cancellation and dry runs leave permissions and guidance untouched, and guidance failures are reported separately from saved permissions.
Plain configured installs retain their guidance-only path. Review requires a terminal and rejects mapping/global/prompt mode combinations.
Performance: reuse one local discovery result throughout review and completion. Reuse the existing compiled policy once per selection pass rather than recompiling it for each skill. The regression fixture has 1,000 skills and 100 wildcard rules: the previous implementation compiled 100,000 matchers; the new check caps compilation at 100. This is an operation-count result, not an end-to-end latency claim. Searchable lists show at most six options and descriptions are inspected on demand. No new dependencies.
Part of #221, with the agreed narrower scope of reviewing current permission configuration. Historical “newly discovered since last install” reporting needs a discovery baseline and remains deferred; this PR does not close #221. Content hashes, content-change notifications, delivery state, and #222's standalone list/JSON explanation surface remain outside this change. Saved exclusions can still be removed through the existing
intent excludecommand.✅ Checklist
pnpm run test:pr.Verified: 681 unit tests and 73 integration tests, types, lint, build, Knip, Sherif, docs links, formatting, and
git diff --check. Tests cover unchanged rules, non-TTY rejection, incompatible options, cancellation/dry run, inheritance, policy changes during prompts, missing/excluded exact rules, rule explanations, one discovery scan, and compilation count. Lint passes with require-await warnings in test stubs.Exercised the built CLI in a macOS terminal: selected a package for individual review, excluded one skill, confirmed the preview, and verified the saved policy and generated guidance. Automated keyboard tests exercise Clack. Windows/Linux terminal interaction was not verified locally.
Local checks used
NX_NO_CLOUD=true,NX_DAEMON=false,pnpm_config_verify_deps_before_run=false, existing dependency links, and a temporary npm cache. Integration tests required local-port access for their test registry.🚀 Release Impact