rails-ai-context 1.0.0 → 1.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 436104e565f41ae5d82ff35810543c142c82174f277eef8a7f6b046de6437bc4
4
- data.tar.gz: d3951676a8aef432734bda1d6fb97004e89c009d11bc1fe5c3b35d6a6b85a7e3
3
+ metadata.gz: 06aa759cd0c6214756b038ed582232f6b6b1e997c35bda3c69b5bb3288c9ae6c
4
+ data.tar.gz: 44f40ae646ad5706747f35c7ffb03aa36ccb4be65a205aaad989d5081c446fbb
5
5
  SHA512:
6
- metadata.gz: 58982aca74fc74ebbb5cfd410a3b680396fad54f9552931258644ee8d98f27f64fa53e0246692ffb4a4aeaa98b6f8e055195fa3d94d009cc0b48834f81eaee5c
7
- data.tar.gz: 0d9220605f100fb14c045cb294071009116ad018ca4221a599e4805d93ab6e6b0817181e2138253349e57da02257da7566e1843d79b6460757bad238ad030caf
6
+ metadata.gz: 34dbfb450c700d0f3520b3e345e38beea105acdc1775e5a1e2b3c68bbd337325f21ef22c4d493a47142a01bf258f07ce1409e7b3933396136954e82be93962e6
7
+ data.tar.gz: b1bb5feb20affb165a194a2cbcd39be37caac1b8b2552a2a528a30114c2d2dc450e61f962d9b9d98b7acc24a7b2b0329b41dde6a677b713c85ec102046f9e0a3
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.0] - 2026-03-23
9
+
10
+ ### Changed
11
+
12
+ - **Default preset changed to `:full`** — all 28 introspectors now run by default, giving AI assistants richer context out of the box. Introspectors that don't find relevant data return empty hashes with zero overhead. Use `config.preset = :standard` for the previous 13-core default.
13
+
8
14
  ## [1.0.0] - 2026-03-23
9
15
 
10
16
  ### Added
data/CLAUDE.md CHANGED
@@ -33,7 +33,7 @@ structure to AI assistants via the Model Context Protocol (MCP).
33
33
  7. **Diff-aware** — context regeneration skips unchanged files
34
34
  8. **Per-assistant serializers** — each AI tool gets tailored output format
35
35
  9. **Zeitwerk autoloading** — files loaded on-demand, not all upfront
36
- 10. **Introspector presets** — `:standard` (13 core) default, `:full` (28) for power users
36
+ 10. **Introspector presets** — `:full` (28) default, `:standard` (13 core) for lightweight usage
37
37
  11. **MCP auto-discovery** — `.mcp.json` generated by install generator
38
38
  12. **Compact by default** — context files ≤150 lines, MCP tools use `detail` parameter (summary/standard/full)
39
39
  13. **Per-tool split rules** — `.claude/rules/`, `.cursor/rules/`, `.windsurf/rules/`, `.github/instructions/`
data/CONTRIBUTING.md CHANGED
@@ -32,7 +32,7 @@ lib/rails_ai_context/
32
32
  1. Create `lib/rails_ai_context/introspectors/your_introspector.rb` (auto-loaded by Zeitwerk)
33
33
  2. Implement `#initialize(app)` and `#call` → returns a Hash (never raises)
34
34
  3. Register it in `lib/rails_ai_context/introspector.rb` (the `INTROSPECTOR_MAP`)
35
- 4. Add the key to the appropriate preset(s) in `Configuration::PRESETS` (`:standard` for core, `:full` for all)
35
+ 4. Add the key to the appropriate preset(s) in `Configuration::PRESETS` (`:full` is the default, `:standard` for core-only)
36
36
  5. Write specs in `spec/lib/rails_ai_context/your_introspector_spec.rb`
37
37
 
38
38
  ## Adding a New MCP Tool
data/README.md CHANGED
@@ -211,7 +211,7 @@ Root files (CLAUDE.md, AGENTS.md, etc.) use **section markers** — your custom
211
211
  | **DevOps** | Puma, Procfile, Docker, deployment tools, asset pipeline |
212
212
  | **Architecture** | Service objects, STI, polymorphism, state machines, multi-tenancy, engines |
213
213
 
214
- 29 introspectors total. The `:standard` preset runs 13 core ones by default; use `:full` for 28 (`database_stats` is opt-in, PostgreSQL only).
214
+ 29 introspectors total. The `:full` preset runs 28 by default; use `:standard` for 13 core only (`database_stats` is opt-in, PostgreSQL only).
215
215
 
216
216
  ---
217
217
 
@@ -265,8 +265,8 @@ end
265
265
  ```ruby
266
266
  # config/initializers/rails_ai_context.rb
267
267
  RailsAiContext.configure do |config|
268
- # Presets: :standard (13 introspectors, default) or :full (all 28)
269
- config.preset = :standard
268
+ # Presets: :full (28 introspectors, default) or :standard (13 core)
269
+ config.preset = :full
270
270
 
271
271
  # Cherry-pick on top of a preset
272
272
  # config.introspectors += %i[views turbo auth api]
@@ -299,8 +299,8 @@ end
299
299
  | Option | Default | Description |
300
300
  |--------|---------|-------------|
301
301
  | **Presets & Introspectors** | | |
302
- | `preset` | `:standard` | Introspector preset (`:standard` or `:full`) |
303
- | `introspectors` | 13 core | Array of introspector symbols |
302
+ | `preset` | `:full` | Introspector preset (`:full` or `:standard`) |
303
+ | `introspectors` | 28 (full) | Array of introspector symbols |
304
304
  | **Context Generation** | | |
305
305
  | `context_mode` | `:compact` | `:compact` (≤150 lines) or `:full` (dump everything) |
306
306
  | `claude_max_lines` | `150` | Max lines for CLAUDE.md in compact mode |
data/SECURITY.md CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  | Version | Supported |
6
6
  |---------|--------------------|
7
+ | 1.1.x | :white_check_mark: |
7
8
  | 1.0.x | :white_check_mark: |
8
- | 0.15.x | :white_check_mark: |
9
- | < 0.15 | :x: |
9
+ | < 1.0 | :x: |
10
10
 
11
11
  ## Reporting a Vulnerability
12
12
 
data/docs/GUIDE.md CHANGED
@@ -757,8 +757,8 @@ Both transports are **read-only** — they expose the same 14 tools and never mo
757
757
  RailsAiContext.configure do |config|
758
758
  # --- Introspectors ---
759
759
 
760
- # Presets: :standard (13 core, default) or :full (all 28)
761
- config.preset = :standard
760
+ # Presets: :full (28 introspectors, default) or :standard (13 core)
761
+ config.preset = :full
762
762
 
763
763
  # Cherry-pick on top of a preset
764
764
  config.introspectors += %i[views turbo auth api]
@@ -865,8 +865,8 @@ end
865
865
 
866
866
  | Option | Type | Default | Description |
867
867
  |--------|------|---------|-------------|
868
- | `preset` | Symbol | `:standard` | Introspector preset (`:standard` or `:full`) |
869
- | `introspectors` | Array | 13 core symbols | Which introspectors to run |
868
+ | `preset` | Symbol | `:full` | Introspector preset (`:full` or `:standard`) |
869
+ | `introspectors` | Array | 28 (full preset) | Which introspectors to run |
870
870
  | `context_mode` | Symbol | `:compact` | `:compact` or `:full` |
871
871
  | `claude_max_lines` | Integer | `150` | Max lines for CLAUDE.md in compact mode |
872
872
  | `max_tool_response_chars` | Integer | `120_000` | Safety cap for MCP tool responses |
@@ -922,7 +922,7 @@ All split rules include an app overview file, so no context is lost when root fi
922
922
 
923
923
  ### Standard preset (13 introspectors)
924
924
 
925
- These run by default. Fast and cover core Rails structure.
925
+ Core Rails structure only. Use `config.preset = :standard` for a lighter footprint.
926
926
 
927
927
  | Introspector | What it discovers |
928
928
  |-------------|-------------------|
@@ -940,7 +940,7 @@ These run by default. Fast and cover core Rails structure.
940
940
  | `view_templates` | View file contents, partial references, Stimulus data attributes, UI pattern extraction, model field usage in partials. |
941
941
  | `design_tokens` | Auto-detects CSS framework (Tailwind v3/v4, Bootstrap, Sass, plain CSS) and extracts design tokens from config files and built CSS. |
942
942
 
943
- ### Full preset (28 introspectors)
943
+ ### Full preset (28 introspectors) — default
944
944
 
945
945
  Includes all standard introspectors plus:
946
946
 
@@ -963,16 +963,17 @@ Includes all standard introspectors plus:
963
963
  | `multi_database` | Multiple databases, replicas, sharding config, model-specific `connects_to` declarations. database.yml parsing fallback. |
964
964
  | `database_stats` | PostgreSQL approximate row counts via `pg_stat_user_tables`. **Opt-in only** — not in any preset, add manually: `config.introspectors += [:database_stats]`. |
965
965
 
966
- ### Enabling the full preset
966
+ ### Using the standard preset
967
967
 
968
968
  ```ruby
969
- config.preset = :full
969
+ config.preset = :standard
970
970
  ```
971
971
 
972
972
  ### Cherry-picking introspectors
973
973
 
974
974
  ```ruby
975
975
  # Start with standard, add specific ones
976
+ config.preset = :standard
976
977
  config.introspectors += %i[views turbo auth api]
977
978
 
978
979
  # Or build from scratch
@@ -41,9 +41,9 @@ module RailsAiContext
41
41
 
42
42
  RailsAiContext.configure do |config|
43
43
  # Introspector preset:
44
+ # :full — all 28 introspectors (default — schema, models, routes, views, turbo, auth, API, assets, devops, etc.)
44
45
  # :standard — 13 core introspectors (schema, models, routes, jobs, gems, conventions, controllers, tests, migrations, stimulus, view_templates, design_tokens, config)
45
- # :full — all 28 introspectors (adds views, turbo, auth, API, assets, devops, etc.)
46
- # config.preset = :standard
46
+ # config.preset = :full
47
47
 
48
48
  # Or cherry-pick individual introspectors:
49
49
  # config.introspectors += %i[views turbo auth api]
@@ -86,7 +86,7 @@ module RailsAiContext
86
86
  def initialize
87
87
  @server_name = "rails-ai-context"
88
88
  @server_version = RailsAiContext::VERSION
89
- @introspectors = PRESETS[:standard].dup
89
+ @introspectors = PRESETS[:full].dup
90
90
  @excluded_paths = %w[node_modules tmp log vendor .git]
91
91
  @sensitive_patterns = %w[
92
92
  .env .env.* config/master.key config/credentials.yml.enc
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAiContext
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-ai-context
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - crisnahine