feat: support nub as a package manager #300
Open
afonsojramos(GitHub profile, opens in a new tab)wants to merge 6 commits into
main fromrefs/pull/300/head·opened 🎯 Changes#
Adds nub as a supported package manager, so projects that use it get nub exec intent list / nub exec intent load <package>#<skill> in their guidance and hooks.
- Detection (
src/discovery/package-manager.ts): nub is recognised fromnub.lock, anub@packageManagerfield, ordevEngines.packageManager - Runner (
src/shared/command-runner.ts):nub exec intent, which runs the installednode_modules/.bin/intent - Command parsing (
src/hooks/policy.ts, eval harness):nub exec intentis accepted wherever runner commands are matched - Review (
src/review/review.ts, docs):nub.lockjoins the default-ignored lockfiles
I opened this as a PR rather than an issue first because the change is small and self-contained. Happy to move the discussion to an issue if you'd prefer.
Not in this PR#
These already applied to nub projects before this change (they were detected as unknown), so they are not regressions:
- The reusable
check-skills/review-skillsworkflows don't provision nub or install fromnub.lock. - Global package discovery uses
npm root -g; nub's global root differs. - In a nub project, skills from transitive dependencies are not discovered, while pnpm finds the same ones. For example, a project depending only on
@tanstack/react-routerlists no skills under nub, but lists@tanstack/router-core's 10 skills under pnpm. nub links its per-project.storeentries into a machine-wide store (~/.cache/nub/pm/store), whereas pnpm keeps real paths inside the project. Direct dependencies work.
Testing#
- Tested end to end in a real nub 0.7.5 project:
nub exec intent installwrotenub exec intentcommands to AGENTS.md, andnub exec intent list/loadran the installed CLI.
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested this code locally with
pnpm run test:pr(runpnpm build:allfirst).
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
Summary by CodeRabbit#
- New Features
- Added support for Nub projects, detecting Nub from its lockfile or package-manager declarations and generating
nub exec intentcommands for supported actions.
- Added support for Nub projects, detecting Nub from its lockfile or package-manager declarations and generating
- Bug Fixes
- Nub lockfiles are now excluded from review items, preventing them from appearing as unmapped changes.
- 1
Could you please rewrite the description so it's not AI generated
@LadyBluenotes sure, hope that helps
Sign in to join this conversation.
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID:
26a29c27-90d2-41bb-a86c-a3f3fe2b9984📥 Commits
Reviewing files that changed from the base of the PR and between cf6f070f714ddf279787ea0850a93772493908c1 and cac355a13e066131e9c8833538410df549d8037a.
📒 Files selected for processing (17)
.changeset/nub-package-manager.mddocs/cli/intent-review.mdevals/intent-discovery/harness-capture.eval.tsevals/intent-discovery/harness/intent-hooks/hook-core.mjsevals/intent-discovery/harness/parse-intent-commands.tsevals/intent-discovery/intent-hooks.eval.tspackages/intent/src/discovery/package-manager.tspackages/intent/src/hooks/policy.tspackages/intent/src/review/review.tspackages/intent/src/shared/command-runner.tspackages/intent/src/shared/types.tspackages/intent/tests/cli.test.tspackages/intent/tests/discovery-safety.test.tspackages/intent/tests/hooks-install.test.tspackages/intent/tests/install-writer.test.tspackages/intent/tests/review.test.tspackages/intent/tests/scanner.test.tsIncluded review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
📝 Walkthrough
Walkthrough#
The package adds Nub package-manager detection, generates
nub exec intentcommands, recognizes Nub intent invocations, and excludesnub.lockfrom review results.Changes#
Nub package-manager support
packages/intent/src/shared/types.ts,packages/intent/src/discovery/package-manager.ts,packages/intent/src/shared/command-runner.ts,packages/intent/tests/scanner.test.ts,packages/intent/tests/cli.test.ts,packages/intent/tests/discovery-safety.test.ts,.changeset/nub-package-manager.mdpackageManager,devEngines.packageManager.name, ornub.lock. The runner map generatesnub exec intent. Tests cover detection and generated commands.packages/intent/src/hooks/policy.ts,evals/intent-discovery/harness/parse-intent-commands.ts,evals/intent-discovery/harness/intent-hooks/hook-core.mjs,packages/intent/tests/hooks-install.test.ts,packages/intent/tests/install-writer.test.ts,evals/intent-discovery/harness-capture.eval.ts,evals/intent-discovery/intent-hooks.eval.tsnub exec intent listandloadcommands. Tests cover parsed actions, skill references, and installation command handling.packages/intent/src/review/review.ts,docs/cli/intent-review.md,packages/intent/tests/review.test.tsnub.lock. A test checks that the lockfile is excluded from review results.Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Suggested reviewers:
ladybluenotesMerge Risk: ⚪ Minimal · up to
cac35Nub detection, generated commands, parsing, and lockfile exclusion align across the inspected paths; no actionable merge-blocking risk was found.
Security Architecture Review#
Security architecture risk: 🔵 Low · up to
cac35The change stays within existing package-manager and hook boundaries, with no demonstrated new security defect. Nub’s external execution and download behavior remains unverified, so the assessment retains limited uncertainty.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 15 files. (2 skipped: 2 unsupported.)
✨ 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.
❤️ Share