rails-ai-context 5.38.2 → 5.39.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 +4 -4
- data/CHANGELOG.md +87 -0
- data/CODE_OF_CONDUCT.md +44 -0
- data/CONTRIBUTING.md +25 -1
- data/README.md +436 -193
- data/docs/CLI.md +2 -2
- data/docs/COMPATIBILITY.md +4 -3
- data/docs/CONFIGURATION.md +1 -1
- data/docs/FAQ.md +1 -2
- data/docs/GUIDE.md +22 -24
- data/docs/INTROSPECTORS.md +1 -1
- data/docs/PROMPTS.md +6 -7
- data/docs/QUICKSTART.md +1 -1
- data/docs/SECURITY.md +10 -10
- data/docs/SETUP.md +51 -30
- data/docs/STANDALONE.md +3 -3
- data/docs/TOOLS.md +3 -3
- data/docs/TROUBLESHOOTING.md +13 -8
- data/docs/adr/0002-static-tier-declared-not-detected.md +5 -0
- data/docs/adr/0005-workspace-mcp-entries.md +6 -5
- data/docs/index.md +30 -36
- data/exe/rails-ai-context +2 -2
- data/lib/generators/rails_ai_context/install/install_generator.rb +0 -6
- data/lib/rails_ai_context/action_filters.rb +1 -1
- data/lib/rails_ai_context/concern_membership.rb +1 -1
- data/lib/rails_ai_context/doctor.rb +43 -102
- data/lib/rails_ai_context/install/ai_tool.rb +37 -10
- data/lib/rails_ai_context/install/program.rb +25 -23
- data/lib/rails_ai_context/install/uninstall.rb +3 -5
- data/lib/rails_ai_context/install/workspace.rb +1 -1
- data/lib/rails_ai_context/introspectors/controller_introspector.rb +2 -2
- data/lib/rails_ai_context/mcp_config_generator.rb +110 -46
- data/lib/rails_ai_context/tasks/rails_ai_context.rake +0 -6
- data/lib/rails_ai_context/tools/search_code.rb +1 -1
- data/lib/rails_ai_context/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 94b2634b5384da11f4a765e7d33f9bc07791e66b6303fabe6cf35d43db780b33
|
|
4
|
+
data.tar.gz: 802b9059f8fffb0db30d74f575f4b394cb7a8c28d342e3016d16330c11541767
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad1ba1f302bdaf4fdaa25c254d3a6101a4d576dcb6426811f513579d21266a1c48f7e5a353c8a55a37c8ef74c2cb382143a286030569fa0b9256a6514d44e1ee
|
|
7
|
+
data.tar.gz: c15145c44717a97495ed08a5567327b68c6e6d1c98109e042aaab4bb2a71528ec3569d51d1ad7c33ccbc75e7d8c7e354e46ecd6169df1c09f18d2092fde57afe
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,93 @@ 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
|
+
## [5.39.0] - 2026-10-31
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **The website is built from the repository.** `scripts/site.rb` fills in
|
|
13
|
+
`site/index.html` with the install prompt from `docs/PROMPTS.md`, the tool
|
|
14
|
+
list and the counts from the registry, and the answers it shows, recorded by
|
|
15
|
+
running the gem's own binary against the sample app in `site/sample_app`;
|
|
16
|
+
every page under `docs/` is rendered beside it with the same layout, at the
|
|
17
|
+
same URLs as before, except the docs index, which moves from the site root
|
|
18
|
+
to `docs.html`. `.github/workflows/pages.yml` builds it on a pull
|
|
19
|
+
request and deploys it from `main`, which replaces the Jekyll build of
|
|
20
|
+
`docs/`. The README leads with a figure of real answers in place of the
|
|
21
|
+
GIFs, which are gone with `demo/`. The packaged gem gains the two files the
|
|
22
|
+
README now links: `CODE_OF_CONDUCT.md` and ADR 0002.
|
|
23
|
+
- **The glossary is `GLOSSARY.md`.** It was `CONTEXT.md`; every doc, ADR and
|
|
24
|
+
code comment that points at it uses the new name. The gem does not ship it.
|
|
25
|
+
- **A new `opencode.json` starts with `"$schema": "https://opencode.ai/config.json"`**,
|
|
26
|
+
the line OpenCode adds itself to a config it loads without one. An existing
|
|
27
|
+
`opencode.json` gets none added, and removing the gem's entry deletes an
|
|
28
|
+
`opencode.json` left holding only that line.
|
|
29
|
+
- **The Codex setup docs say why the first step of a new session can lack the
|
|
30
|
+
rails tools.** Codex waits about one second
|
|
31
|
+
(`mcp_optional_startup_grace_ms`) for a server still starting, so the first
|
|
32
|
+
step of a session, `codex exec` above all, can run while the app boots.
|
|
33
|
+
`required = true` in the server's table (Codex 0.100 or later) makes Codex
|
|
34
|
+
wait. The install does not write it.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **The Cursor CLI starts the server under rvm and chruby.** It starts a
|
|
39
|
+
server with only `HOME`, `LOGNAME`, `PATH`, `SHELL`, `TERM` and `USER`, so
|
|
40
|
+
`bundle` or `rails-ai-context` found no gems and the server never started.
|
|
41
|
+
The `.cursor/mcp.json` entries now run the command through a one-line
|
|
42
|
+
`ruby -e` launcher, which sets `GEM_PATH` from the gem folders on `PATH`
|
|
43
|
+
when the client passed neither `GEM_PATH` nor `GEM_HOME`, keeping RubyGems'
|
|
44
|
+
own folders, and changes nothing when it passed either. `.github/mcp.json`
|
|
45
|
+
gets the same launcher: Copilot CLI 1.0.105 passes the whole environment,
|
|
46
|
+
but GitHub's docs say only `PATH` is passed. The install recognizes the
|
|
47
|
+
launcher as its own, so a re-run keeps the entry current and removal takes
|
|
48
|
+
it; the Cursor editor asks once to turn the rewritten entry back on.
|
|
49
|
+
Windows entries get no launcher.
|
|
50
|
+
- **Windows entries start through `cmd /d /c`.** `/d` skips the registry's
|
|
51
|
+
AutoRun commands, whose output, a `chcp` line for one, would reach the
|
|
52
|
+
client ahead of the server's first message. An entry an earlier release
|
|
53
|
+
wrote with `cmd /c` stays the gem's, and the next install rewrites it.
|
|
54
|
+
- **Copilot CLI finds the server.** It reads
|
|
55
|
+
`.github/mcp.json` (and `.mcp.json`), never `.vscode/mcp.json`, so choosing
|
|
56
|
+
`copilot` now writes `.github/mcp.json` too: `mcpServers`, each entry with
|
|
57
|
+
`command`, `args`, an optional `env` and `"tools": ["*"]`. A `tools` list
|
|
58
|
+
you narrowed there is kept. In a folder of apps its entries use bare
|
|
59
|
+
relative paths, since Copilot CLI expands no variable naming the folder.
|
|
60
|
+
Copilot CLI loads it only in a folder you trust, and `copilot mcp list`
|
|
61
|
+
shows it. Removal and uninstall take the entry out of both files, and
|
|
62
|
+
`rails ai:doctor` checks the new one as "GitHub Copilot CLI". Copilot in
|
|
63
|
+
JetBrains IDEs reads that file only under `servers` and starts a server in
|
|
64
|
+
the IDE's own folder, so it takes the entry `rails-ai-context mcp-entry`
|
|
65
|
+
prints.
|
|
66
|
+
- **Codex no longer starts the server with this machine's saved Ruby
|
|
67
|
+
environment.** `.codex/config.toml` held the `PATH`, `GEM_HOME` and the
|
|
68
|
+
rest from the install, which a Ruby switch left stale. The gem's table now
|
|
69
|
+
lists `env_vars = ["GEM_HOME", "GEM_PATH", "GEM_ROOT", "RUBY_VERSION",
|
|
70
|
+
"BUNDLE_PATH"]`, which Codex passes from the shell it started in beside the
|
|
71
|
+
`PATH` it always keeps, and `startup_timeout_sec = 30.0`, since Codex waited
|
|
72
|
+
only 10 s for a server before 0.120 and the server boots the app first. A
|
|
73
|
+
timeout you set is kept and none is added beside it, and a removal still
|
|
74
|
+
takes the table, since the timeout configures only the gem's server.
|
|
75
|
+
`env_vars` names you added are merged into the list. The next install or
|
|
76
|
+
context run replaces a table an earlier release wrote. The install no longer adds `.codex/config.toml` to `.gitignore`,
|
|
77
|
+
since the file is committed like the other MCP configs, and takes out the
|
|
78
|
+
line an earlier release added. `rails ai:doctor` drops the
|
|
79
|
+
"Codex env snapshot" check and no longer counts the Codex config as a file
|
|
80
|
+
never to commit; its MCP config check warns about an entry that still holds
|
|
81
|
+
a saved environment and fails it when the saved `PATH` no longer reaches the
|
|
82
|
+
command.
|
|
83
|
+
- **Cursor's entries in a folder of apps start.** They named each app from
|
|
84
|
+
`${workspaceFolder}`, which the Cursor CLI passes to the server as literal
|
|
85
|
+
text. They are now written like Claude Code's, `rails-ai-context serve
|
|
86
|
+
--app-path shop` with a relative `BUNDLE_GEMFILE`: the CLI starts the
|
|
87
|
+
server in the folder it runs in, and the editor in the project's folder.
|
|
88
|
+
VS Code keeps `${workspaceFolder}`. An entry an earlier release wrote is
|
|
89
|
+
still read, and the next `init` in the folder rewrites it.
|
|
90
|
+
- **The guide's Cursor table gives the tools guide rule's real scope.**
|
|
91
|
+
`.cursor/rules/rails-mcp-tools.mdc` has been `alwaysApply: true` since
|
|
92
|
+
5.38.2, and the table in `docs/GUIDE.md` still said the agent loaded it only
|
|
93
|
+
on request.
|
|
94
|
+
|
|
8
95
|
## [5.38.2] - 2026-10-29
|
|
9
96
|
|
|
10
97
|
### Added
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment:
|
|
18
|
+
|
|
19
|
+
* Using welcoming and inclusive language
|
|
20
|
+
* Being respectful of differing viewpoints and experiences
|
|
21
|
+
* Gracefully accepting constructive criticism
|
|
22
|
+
* Focusing on what is best for the community
|
|
23
|
+
* Showing empathy towards other community members
|
|
24
|
+
|
|
25
|
+
Examples of unacceptable behavior:
|
|
26
|
+
|
|
27
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
28
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
+
* Public or private harassment
|
|
30
|
+
* Publishing others' private information without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
32
|
+
|
|
33
|
+
## Enforcement
|
|
34
|
+
|
|
35
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
36
|
+
reported to the project maintainer at **crisjosephnahine@gmail.com**.
|
|
37
|
+
|
|
38
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
39
|
+
|
|
40
|
+
## Attribution
|
|
41
|
+
|
|
42
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
|
|
43
|
+
version 2.1, available at
|
|
44
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
data/CONTRIBUTING.md
CHANGED
|
@@ -34,7 +34,7 @@ lib/rails_ai_context/
|
|
|
34
34
|
2. Subclass `Introspectors::Base` (it holds `app` and `root`) and implement `#call` → returns a Hash. Let it raise: the loop in `Introspector#call` records a failed section as `{ error: msg }` and warns
|
|
35
35
|
3. Register it in `lib/rails_ai_context/introspector.rb` (the `INTROSPECTOR_MAP`)
|
|
36
36
|
4. `extend StaticTier` and declare one: `static_tier :files_only` if `#call` runs unchanged with nothing booted, `:runtime_only` if it needs live reflection, or `:alternate_source` plus a `static_call` reading elsewhere. A mapped introspector that declares nothing fails the suite
|
|
37
|
-
5. If it opens a file outside the fingerprint's watched folders and extensions, declare `READS = %w[...]` (globs from the app root), or an edit to that file is not seen until a restart (see **READS** in `
|
|
37
|
+
5. If it opens a file outside the fingerprint's watched folders and extensions, declare `READS = %w[...]` (globs from the app root), or an edit to that file is not seen until a restart (see **READS** in `GLOSSARY.md`)
|
|
38
38
|
6. Add the key to the appropriate preset(s) in `Configuration::PRESETS` (`:full` is the default, `:standard` for core-only)
|
|
39
39
|
7. Write specs in `spec/lib/rails_ai_context/introspectors/your_introspector_spec.rb`
|
|
40
40
|
|
|
@@ -134,6 +134,30 @@ Adding or removing a fixture model means changing that spec in the same commit.
|
|
|
134
134
|
`docs/RELEASING.md` is the checklist. The tag publishes, not the merge, and the
|
|
135
135
|
release gate wants a green E2E run for the tagged commit before it will start.
|
|
136
136
|
|
|
137
|
+
## The website
|
|
138
|
+
|
|
139
|
+
`site/` is the page at <https://crisnahine.github.io/rails-ai-context/>, and `scripts/site.rb` fills it
|
|
140
|
+
in from the repository: the install prompt from `docs/PROMPTS.md`, the tool list and the counts from the
|
|
141
|
+
registry and the introspector map, every page under `docs/` rendered with the same layout, and the
|
|
142
|
+
answers it shows recorded by running the gem's own binary against `site/sample_app` in the static tier.
|
|
143
|
+
Change the words in `site/index.html` and the facts where they live. To see it before pushing:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
bundle exec ruby scripts/site.rb _site
|
|
147
|
+
python3 -m http.server 8000 -d _site
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Any static file server will do, and a server it has to be: a browser loads no module script from a
|
|
151
|
+
`file://` page. The script writes only into a new directory or one it wrote before. A placeholder
|
|
152
|
+
nothing fills, a heading a quoted block has lost, a tool `docs/TOOLS.md` files under no category, a
|
|
153
|
+
docs page `Site::DOC_NAV` does not place, or a tool call that fails stops the build, and
|
|
154
|
+
`spec/site_spec.rb` names which. `.github/workflows/pages.yml` builds the site on every pull request,
|
|
155
|
+
since a change to the gem changes the answers on the page, and deploys it from `main`, where the
|
|
156
|
+
repository's Pages source has to be GitHub Actions.
|
|
157
|
+
|
|
158
|
+
The sample app is a fixture with no `config/environment.rb`, so every tool reads it without booting. A change to it changes the answers on the page, and the README quotes some of
|
|
159
|
+
them, so check both.
|
|
160
|
+
|
|
137
161
|
## Reporting Bugs
|
|
138
162
|
|
|
139
163
|
Open an issue at https://github.com/crisnahine/rails-ai-context/issues with:
|