-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Issue
As a developer using rails-active-mcp from any directory, I need robust Rails project detection that can find Rails applications from subdirectories and handle various project structures while providing clear error messages for invalid paths.
The current find_rails_root function works but needs enhancement to support the new CLI patterns and be more resilient to different Rails project configurations and edge cases.
Proposed Solution
Enhance the existing Rails project detection logic by improving the find_rails_root function, integrating it with Thor CLI options for explicit paths and auto-detection, and adding better validation for various Rails project indicators and error handling for edge cases.
Breakdown
- Extract and enhance existing
find_rails_rootlogic - Implement
determine_rails_pathmethod to handle CLI option logic - Improve
rails_project?validation to check multiple indicators:config/application.rb(primary)Gemfilewith rails dependency (secondary)- Additional Rails indicators for edge cases
- Add error handling for invalid paths and permissions
- Integrate with Thor CLI options (
--project,--auto-detect) - Maintain existing directory change behavior
Success Criteria
- Enhanced project detection finds Rails projects from subdirectories
- Explicit project paths work with absolute and relative paths
- Invalid paths rejected with helpful error messages
- Multiple Rails project indicators properly detected
- Directory traversal stops at filesystem root safely
- Integration with existing Rails loading logic preserved
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels