@reinteractive/rails-insight 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +36 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -82,20 +82,35 @@ The server uses the workspace directory as the project root automatically, so no
82
82
 
83
83
  ## VS Code Integration
84
84
 
85
- In your VS Code `.mcp.json` file:
85
+ In your VS Code `.mcp.json` file (or `.vscode/mcp.json`):
86
86
 
87
87
  ```json
88
88
  {
89
89
  "servers": {
90
90
  "railsinsight": {
91
91
  "type": "stdio",
92
- "command": "npx",
93
- "args": ["-y", "@reinteractive/rails-insight"]
92
+ "command": "node",
93
+ "args": ["/opt/homebrew/lib/node_modules/@reinteractive/rails-insight/bin/railsinsight.js"]
94
94
  }
95
95
  }
96
96
  }
97
97
  ```
98
98
 
99
+ First install globally:
100
+
101
+ ```bash
102
+ npm install -g @reinteractive/rails-insight
103
+ ```
104
+
105
+ Then update the path in `args` to match the output of:
106
+
107
+ ```bash
108
+ npm root -g
109
+ # e.g. /opt/homebrew/lib/node_modules
110
+ ```
111
+
112
+ > **Why not `npx`?** On macOS with Homebrew, VS Code may resolve `npx` to a different Node.js installation than your terminal (e.g. `/usr/local/bin/npx` vs `/opt/homebrew/bin/npx`). Using `node` with an explicit path to the globally installed script avoids this ambiguity.
113
+
99
114
  Note: VS Code MCP configuration uses the `servers` block (not `mcpServers` as used by Claude Desktop/Cursor). The `"type": "stdio"` field is required.
100
115
 
101
116
  ## Available Tools
@@ -104,33 +119,33 @@ All 17 tools are available with no tier restrictions.
104
119
 
105
120
  ### Core Tools
106
121
 
107
- | Tool | Description |
108
- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
109
- | `index_project` | Re-index the Rails project. In local mode, re-scans the project root. Accepts `force` (boolean) to bypass cache. Returns statistics and duration. |
110
- | `get_overview` | Project summary: Rails/Ruby versions, database, auth strategy, key models and controllers, frontend stack, file counts. Call this first. |
111
- | `get_full_index` | Complete index JSON trimmed to fit a specified token budget (default: 12,000 tokens). |
112
- | `get_model` | Deep extraction for a specific model: associations, validations, scopes with queries, enums with values, callbacks, public methods, database columns. Requires `name`. |
113
- | `get_controller` | Deep extraction for a specific controller: actions with routes, filters, rate limiting, strong params, rescue handlers. Requires `name`. |
114
- | `get_routes` | Complete route map with namespaces, nested resources, member/collection routes. |
115
- | `get_schema` | Database schema with tables, columns, indexes, foreign keys, and model-to-table mapping. |
116
- | `get_subgraph` | Skill-scoped relationship subgraph with ranked files. Skills: `authentication`, `database`, `frontend`, `api`, `jobs`, `email`. |
117
- | `search_patterns` | Search across all extractions for a specific Rails pattern type (e.g. `has_many_through`, `before_action`, `turbo_broadcast`). |
118
- | `get_deep_analysis` | Deep analysis for a specific category. Categories: `authentication`, `authorization`, `jobs`, `email`, `storage`, `caching`, `realtime`, `api_patterns`, `dependencies`, `cela`|
122
+ | Tool | Description |
123
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
124
+ | `index_project` | Re-index the Rails project. In local mode, re-scans the project root. Accepts `force` (boolean) to bypass cache. Returns statistics and duration. |
125
+ | `get_overview` | Project summary: Rails/Ruby versions, database, auth strategy, key models and controllers, frontend stack, file counts. Call this first. |
126
+ | `get_full_index` | Complete index JSON trimmed to fit a specified token budget (default: 12,000 tokens). |
127
+ | `get_model` | Deep extraction for a specific model: associations, validations, scopes with queries, enums with values, callbacks, public methods, database columns. Requires `name`. |
128
+ | `get_controller` | Deep extraction for a specific controller: actions with routes, filters, rate limiting, strong params, rescue handlers. Requires `name`. |
129
+ | `get_routes` | Complete route map with namespaces, nested resources, member/collection routes. |
130
+ | `get_schema` | Database schema with tables, columns, indexes, foreign keys, and model-to-table mapping. |
131
+ | `get_subgraph` | Skill-scoped relationship subgraph with ranked files. Skills: `authentication`, `database`, `frontend`, `api`, `jobs`, `email`. |
132
+ | `search_patterns` | Search across all extractions for a specific Rails pattern type (e.g. `has_many_through`, `before_action`, `turbo_broadcast`). |
133
+ | `get_deep_analysis` | Deep analysis for a specific category. Categories: `authentication`, `authorization`, `jobs`, `email`, `storage`, `caching`, `realtime`, `api_patterns`, `dependencies`, `cela` |
119
134
 
120
135
  ### Test Intelligence Tools
121
136
 
122
- | Tool | Description |
123
- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
137
+ | Tool | Description |
138
+ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
124
139
  | `get_coverage_gaps` | Prioritised list of files needing test coverage, with structural context and per-method coverage data from SimpleCov. Accepts optional `category`, `min_gap`, and `l... |
125
140
  | `get_test_conventions` | Detected test patterns and conventions: spec style (request vs controller), let style, auth helper, factories, shared examples, custom matchers, and pattern referen... |
126
141
  | `get_domain_clusters` | Domain-clustered file groups for parallel test generation. Files in the same cluster share associations and factories; different clusters can be worked on simultane... |
127
- | `get_factory_registry` | Parsed FactoryBot factory definitions including attributes, traits, sequences, and associations. Accepts optional `model` to filter by factory name. |
142
+ | `get_factory_registry` | Parsed FactoryBot factory definitions including attributes, traits, sequences, and associations. Accepts optional `model` to filter by factory name. |
128
143
  | `get_well_tested_examples` | High-quality existing spec files suitable as pattern references for test generation agents. Selected by structural complexity per spec category. Accepts `category` ... |
129
144
 
130
145
  ### Blast Radius Tools
131
146
 
132
- | Tool | Description |
133
- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
147
+ | Tool | Description |
148
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
134
149
  | `get_blast_radius` | Analyse the impact of code changes. Accepts explicit file paths or auto-detects from git diff. Returns impacted entities classified by risk level (CRITICAL/HIGH/MEDIUM/LO... |
135
150
  | `get_review_context` | Build a token-budget-aware review summary for changed files. Combines blast radius analysis with relevant code context for AI-assisted code review. Accepts `files`, `base... |
136
151
 
@@ -225,4 +240,4 @@ If you encounter a pattern that isn't detected, please [open an issue](https://g
225
240
 
226
241
  ## License
227
242
 
228
- ISC — see [LICENSE](LICENSE) for details.
243
+ ISC — see [LICENSE](LICENSE) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reinteractive/rails-insight",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Rails-aware codebase indexer — MCP server for AI agents",
5
5
  "type": "module",
6
6
  "bin": {