Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR improves MCP functionality in the CLI by introducing a detailed feature flagging guide based on the Bucket feature management service, updating CLI commands to use npx for improved compatibility, and simplifying the codebase by removing redundant methods.
- Added comprehensive documentation and guidelines for feature flagging.
- Revised CLI commands and options (e.g. renaming and description adjustments) for consistency.
- Removed obsolete methods in companies.ts to simplify the code.
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/utils/options.ts | Updated option names and descriptions for clarity. |
| packages/cli/utils/json.ts | Exported JSONPrimitive type for broader reuse. |
| packages/cli/utils/errors.ts | Enhanced error messaging with additional error detail. |
| packages/cli/services/users.ts | Introduced new users service with proper schema validations. |
| packages/cli/services/stages.ts | Refactored updateFeatureStage function and schema for clarity. |
| packages/cli/services/features.ts | Added feature access functionality and updated target handling. |
| packages/cli/services/companies.ts | Removed unnecessary methods and unused imports. |
| packages/cli/services/bootstrap.ts | Renamed user type to BucketUser and added segments retrieval. |
| packages/cli/mcp/tools.ts | Integrated new response helpers and segments support in MCP tools. |
| packages/cli/mcp/responses.ts | Introduced consistent text response functions. |
| packages/cli/index.ts | Updated fetch method for user data to use getBucketUser. |
| packages/cli/commands/mcp.ts | Revised MCP command options and error messages for punctuation. |
| packages/cli/commands/features.ts | Added new feature access command with interactive prompts. |
| packages/cli/commands/companies.ts | Removed obsolete company feature access command. |
| packages/cli/README.md | Updated CLI usage documentation to reflect npx command changes. |
Files not reviewed (2)
- .cursor/rules/bucket.mdc: Language not supported
- packages/cli/package.json: Language not supported
Comments suppressed due to low confidence (1)
packages/cli/mcp/tools.ts:158
- The dynamic enum schema for segmentNames may throw a runtime error if the segments array is empty. Consider adding a check to ensure the segments array is non-empty or provide a default/fallback value.
segmentNames: z.array(z.enum(segmentNames as [string, ...string[]])).optional().describe(`Segment names to target. Must be one of the following: ${segmentNames.join(", ")}`,),
pavkam
left a comment
There was a problem hiding this comment.
Left comments -- I'm no expert on RAG/LLM dance so a lot of this will need to be seen in the wild.
One thing to note -- if we update the rules in the future, would it make sense to have some sort of a check in the CLI that could see if the users use an older version of the rules? Also would need to understand if the user made manual updates to the rules (we can make a hash of the file after copy and append to it, if it doesn't match in the future we know the user has tinkered with it).
|
@pavkam I rewrote the cursor rules to contain less fluff and be more relevant. Thoughts? |
Co-authored-by: Ron Cohen <ron@bucket.co>






Change highlights ✨
AI Summary
This pull request includes several updates to the
packages/cliproject, focusing on updating command usage in the documentation, enhancing feature access commands, and introducing AI-assisted development capabilities. Below are the most important changes:Documentation Updates:
packages/cli/README.mdto usenpxfor executing commands instead of the previous direct method. [1] [2] [3] [4] [5] [6]Feature Access Enhancements:
companies.tstofeatures.ts. [1] [2] [3] [4] [5] [6]AI-Assisted Development:
Bucket RulesandModel Context Protocol (MCP). Added commands for setting up AI-specific rules and starting an MCP server. [1] [2] [3] [4] [5]These changes enhance the usability of the CLI by ensuring consistency in command execution, improving the flexibility of feature management, and providing tools for AI-assisted development.