claude-on-rails 0.1.3 → 0.2.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/.rubocop.yml +63 -0
- data/CHANGELOG.md +44 -0
- data/CLAUDE.md +59 -0
- data/Gemfile +6 -3
- data/Gemfile.lock +314 -0
- data/README.md +54 -5
- data/Rakefile +15 -5
- data/SETUP.md +132 -0
- data/lib/claude-on-rails.rb +4 -0
- data/lib/claude_on_rails/configuration.rb +8 -6
- data/lib/claude_on_rails/mcp_installer.rb +78 -0
- data/lib/claude_on_rails/mcp_support.rb +80 -0
- data/lib/claude_on_rails/project_analyzer.rb +53 -65
- data/lib/claude_on_rails/railtie.rb +12 -0
- data/lib/claude_on_rails/swarm_builder.rb +80 -88
- data/lib/claude_on_rails/version.rb +4 -2
- data/lib/claude_on_rails.rb +15 -12
- data/lib/generators/claude_on_rails/swarm/swarm_generator.rb +113 -53
- data/lib/generators/claude_on_rails/swarm/templates/CLAUDE.md.erb +2 -100
- data/lib/generators/claude_on_rails/swarm/templates/claude_on_rails_context.md +32 -0
- data/lib/generators/claude_on_rails/swarm/templates/prompts/api.md +22 -22
- data/lib/generators/claude_on_rails/swarm/templates/prompts/architect.md +14 -0
- data/lib/generators/claude_on_rails/swarm/templates/prompts/controllers.md +18 -2
- data/lib/generators/claude_on_rails/swarm/templates/prompts/models.md +15 -0
- data/lib/generators/claude_on_rails/swarm/templates/swarm.yml.erb +9 -0
- data/lib/tasks/claude_on_rails.rake +35 -0
- metadata +24 -109
- data/claude-on-rails.gemspec +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a54eaca693aeb4a066e7fae8112346681d1127d8b6c247f01d8cf56c4fe12f77
|
4
|
+
data.tar.gz: 3e7d637a4625cca7ef9a5886ed5c6aaef1464173b7bbb8735ebcdea5436ec583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3845a7c2b042d3c35943fd859ea8286ecfe61434e42e90263b217de1f73bf431f04f9c02f5a492dc65f6a5922c77da6a65c433cc20a55f5520966b4ece914bd
|
7
|
+
data.tar.gz: e269424a844bacc0a1906ef7a44e350ccb3798dbfc081702c647b799d703d3d0fa0093cc61888c3c8180e19b19b6fc502723090eedcba4e7f9e3c9dc5658395c
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 3.3
|
3
|
+
NewCops: enable
|
4
|
+
SuggestExtensions: false
|
5
|
+
Exclude:
|
6
|
+
- 'vendor/**/*'
|
7
|
+
- 'tmp/**/*'
|
8
|
+
- 'bin/**/*'
|
9
|
+
- 'spec/fixtures/**/*'
|
10
|
+
|
11
|
+
plugins:
|
12
|
+
- rubocop-rake
|
13
|
+
|
14
|
+
# Allow hyphenated filename to match gem name
|
15
|
+
Naming/FileName:
|
16
|
+
Exclude:
|
17
|
+
- 'lib/claude-on-rails.rb'
|
18
|
+
|
19
|
+
|
20
|
+
# Relaxed metrics for DSL-heavy library code
|
21
|
+
Metrics/MethodLength:
|
22
|
+
Max: 20
|
23
|
+
Exclude:
|
24
|
+
- 'spec/**/*'
|
25
|
+
|
26
|
+
Metrics/ClassLength:
|
27
|
+
Max: 150
|
28
|
+
Exclude:
|
29
|
+
- 'spec/**/*'
|
30
|
+
|
31
|
+
Metrics/BlockLength:
|
32
|
+
Max: 30
|
33
|
+
Exclude:
|
34
|
+
- 'spec/**/*'
|
35
|
+
- '*.gemspec'
|
36
|
+
|
37
|
+
Metrics/AbcSize:
|
38
|
+
Max: 25
|
39
|
+
|
40
|
+
Metrics/CyclomaticComplexity:
|
41
|
+
Max: 10
|
42
|
+
|
43
|
+
Metrics/ParameterLists:
|
44
|
+
Max: 6
|
45
|
+
|
46
|
+
# Documentation is nice but not required for internal classes
|
47
|
+
Style/Documentation:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Style/StringLiterals:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
# Allow longer lines for readability
|
54
|
+
Layout/LineLength:
|
55
|
+
Max: 120
|
56
|
+
Exclude:
|
57
|
+
- 'spec/**/*'
|
58
|
+
|
59
|
+
Gemspec/RequireMFA:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Metrics:
|
63
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,50 @@ 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.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.2.0] - 2025-01-02
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Rails MCP Server integration for enhanced documentation access
|
12
|
+
- Interactive setup wizard with `rails claude_on_rails:setup_mcp`
|
13
|
+
- Status checking with `rails claude_on_rails:mcp_status`
|
14
|
+
- Automated MCP setup during swarm generation
|
15
|
+
- Post-install message with setup instructions
|
16
|
+
- Comprehensive SETUP.md documentation
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
- Rails MCP Server is now a Ruby gem (not npm package)
|
20
|
+
- MCP configuration automatically added to swarm.yml when available
|
21
|
+
- All agent prompts enhanced with MCP-specific guidance
|
22
|
+
- Simplified setup process - just press Y during generation
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
- RDoc version conflicts during gem installation
|
26
|
+
- Use --no-document flag to avoid documentation generation issues
|
27
|
+
- Improved MCP availability detection
|
28
|
+
|
29
|
+
## [0.1.5] - 2025-01-27
|
30
|
+
|
31
|
+
### Fixed
|
32
|
+
- Fixed rake tasks not loading in Rails applications
|
33
|
+
- Added explicit require for rails/railtie in railtie.rb
|
34
|
+
- Changed Rails detection to check for Rails::Railtie instead of Rails
|
35
|
+
- Removed circular dependency in rake task file
|
36
|
+
|
37
|
+
## [0.1.4] - 2025-01-27
|
38
|
+
|
39
|
+
### Fixed
|
40
|
+
- Fixed CLAUDE.md overwriting user's existing directives
|
41
|
+
- Now uses Claude's file reference syntax (@file) to include context
|
42
|
+
- Fixed swarm configuration filename (claude-swarm.yml not swarm.yml)
|
43
|
+
- Updated documentation to clarify prompts vs commands
|
44
|
+
- Improved generator to preserve existing CLAUDE.md content
|
45
|
+
|
46
|
+
### Changed
|
47
|
+
- ClaudeOnRails context now stored in `.claude-on-rails/context.md`
|
48
|
+
- CLAUDE.md uses file references instead of appending content
|
49
|
+
- Clearer distinction between shell commands and Claude prompts
|
50
|
+
- Updated .gitignore to include `.claude-swarm/` directory
|
51
|
+
|
8
52
|
## [0.1.3] - 2025-01-26
|
9
53
|
|
10
54
|
### Fixed
|
data/CLAUDE.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# ClaudeOnRails Development
|
2
|
+
|
3
|
+
## Project Overview
|
4
|
+
|
5
|
+
ClaudeOnRails is a Ruby gem that leverages claude-swarm to create intelligent AI agent teams for Rails development. It generates swarm configurations that allow developers to describe what they want to build in natural language, and the swarm coordinates implementation across all Rails layers.
|
6
|
+
|
7
|
+
## Guidelines
|
8
|
+
|
9
|
+
### 1. File References in Claude
|
10
|
+
- Use `@filepath` syntax for file references, not `/file:filepath`
|
11
|
+
- File references are the preferred way to include content without duplicating it
|
12
|
+
|
13
|
+
### 2. Never Overwrite User Configuration
|
14
|
+
- Always check if CLAUDE.md exists before writing to it
|
15
|
+
- Use file references to include framework content rather than appending
|
16
|
+
- Store framework-specific content in separate files (e.g., `.claude-on-rails/context.md`)
|
17
|
+
|
18
|
+
### 3. Claude-Swarm Integration
|
19
|
+
- The default configuration file is `claude-swarm.yml`, not `swarm.yml`
|
20
|
+
- Command is simply `claude-swarm`, not `claude-swarm orchestrate`
|
21
|
+
- claude-swarm is a dependency, so no need to tell users to install it separately
|
22
|
+
|
23
|
+
### 4. Documentation Clarity
|
24
|
+
- Clearly distinguish between shell commands and Claude prompts
|
25
|
+
- Use `>` prefix for Claude prompts to avoid confusion with bash commands
|
26
|
+
- Be explicit about where commands should be run vs where prompts should be typed
|
27
|
+
|
28
|
+
### 5. Ruby Gem Best Practices
|
29
|
+
- Keep development dependencies in Gemfile, not gemspec (RuboCop rule)
|
30
|
+
- Always run `bundle exec rake` before committing changes to catch syntax and style issues
|
31
|
+
- Use `bundle exec rake release` for gem releases (creates tag, pushes to RubyGems)
|
32
|
+
- ...then create GitHub releases separately with `gh release create`
|
33
|
+
|
34
|
+
### 6. Generator Best Practices
|
35
|
+
- Check for directory existence before creating agents
|
36
|
+
- Make generators idempotent (running multiple times shouldn't duplicate content)
|
37
|
+
- Provide clear next steps after generation
|
38
|
+
- Show what will be created during the analysis phase
|
39
|
+
|
40
|
+
### 7. Testing Considerations
|
41
|
+
- Make sure that user confirms that they have tested changes with a real Rails project before releasing
|
42
|
+
- Consider different Rails configurations (API-only, full-stack, with/without GraphQL)
|
43
|
+
- **IMPORTANT**: This project uses RSpec exclusively for testing. NEVER use Minitest or any other testing framework. Do not add minitest gems, create test/ directories, or write any Minitest-style tests. All tests must be written in RSpec format and placed in the spec/ directory.
|
44
|
+
|
45
|
+
## Workflow Guidance
|
46
|
+
|
47
|
+
- For maximum efficiency, whenever you need to perform multiple independent operations, invoke all relevant tools simultaneously rather than sequentially.
|
48
|
+
- When you're tempted to respond and return control to me with a message like "The codebase is now in excellent shape with 859 passing tests, 1 failing test, and 5 pending tests. The project is ready for the v0.2.0 release once the team decides how to handle the final test (either fix it or mark it as pending)." then instead, you should decide how to handle the final test _first_.
|
49
|
+
|
50
|
+
## Release Guidance
|
51
|
+
|
52
|
+
- Note that releases are never ready if there are any tests failing in the test suites. Never tell me that a release is ready unless we have a clean build.
|
53
|
+
|
54
|
+
## Architecture Notes
|
55
|
+
|
56
|
+
- The gem analyzes Rails projects to detect patterns and frameworks
|
57
|
+
- It generates customized swarm configurations based on project structure
|
58
|
+
- Each agent works in a specific directory (MVC separation)
|
59
|
+
- Agents communicate via MCP protocol in claude-swarm
|
data/Gemfile
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
# Specify your gem's dependencies in claude-on-rails.gemspec
|
4
6
|
gemspec
|
5
7
|
|
6
|
-
gem
|
7
|
-
gem
|
8
|
+
gem 'rake', '~> 13.0'
|
9
|
+
gem 'rspec', '~> 3.0'
|
10
|
+
gem 'rubocop-rake', '~> 0.6'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,314 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
claude-on-rails (0.2.0)
|
5
|
+
claude_swarm (~> 0.1)
|
6
|
+
rails (>= 6.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actioncable (8.0.2)
|
12
|
+
actionpack (= 8.0.2)
|
13
|
+
activesupport (= 8.0.2)
|
14
|
+
nio4r (~> 2.0)
|
15
|
+
websocket-driver (>= 0.6.1)
|
16
|
+
zeitwerk (~> 2.6)
|
17
|
+
actionmailbox (8.0.2)
|
18
|
+
actionpack (= 8.0.2)
|
19
|
+
activejob (= 8.0.2)
|
20
|
+
activerecord (= 8.0.2)
|
21
|
+
activestorage (= 8.0.2)
|
22
|
+
activesupport (= 8.0.2)
|
23
|
+
mail (>= 2.8.0)
|
24
|
+
actionmailer (8.0.2)
|
25
|
+
actionpack (= 8.0.2)
|
26
|
+
actionview (= 8.0.2)
|
27
|
+
activejob (= 8.0.2)
|
28
|
+
activesupport (= 8.0.2)
|
29
|
+
mail (>= 2.8.0)
|
30
|
+
rails-dom-testing (~> 2.2)
|
31
|
+
actionpack (8.0.2)
|
32
|
+
actionview (= 8.0.2)
|
33
|
+
activesupport (= 8.0.2)
|
34
|
+
nokogiri (>= 1.8.5)
|
35
|
+
rack (>= 2.2.4)
|
36
|
+
rack-session (>= 1.0.1)
|
37
|
+
rack-test (>= 0.6.3)
|
38
|
+
rails-dom-testing (~> 2.2)
|
39
|
+
rails-html-sanitizer (~> 1.6)
|
40
|
+
useragent (~> 0.16)
|
41
|
+
actiontext (8.0.2)
|
42
|
+
actionpack (= 8.0.2)
|
43
|
+
activerecord (= 8.0.2)
|
44
|
+
activestorage (= 8.0.2)
|
45
|
+
activesupport (= 8.0.2)
|
46
|
+
globalid (>= 0.6.0)
|
47
|
+
nokogiri (>= 1.8.5)
|
48
|
+
actionview (8.0.2)
|
49
|
+
activesupport (= 8.0.2)
|
50
|
+
builder (~> 3.1)
|
51
|
+
erubi (~> 1.11)
|
52
|
+
rails-dom-testing (~> 2.2)
|
53
|
+
rails-html-sanitizer (~> 1.6)
|
54
|
+
activejob (8.0.2)
|
55
|
+
activesupport (= 8.0.2)
|
56
|
+
globalid (>= 0.3.6)
|
57
|
+
activemodel (8.0.2)
|
58
|
+
activesupport (= 8.0.2)
|
59
|
+
activerecord (8.0.2)
|
60
|
+
activemodel (= 8.0.2)
|
61
|
+
activesupport (= 8.0.2)
|
62
|
+
timeout (>= 0.4.0)
|
63
|
+
activestorage (8.0.2)
|
64
|
+
actionpack (= 8.0.2)
|
65
|
+
activejob (= 8.0.2)
|
66
|
+
activerecord (= 8.0.2)
|
67
|
+
activesupport (= 8.0.2)
|
68
|
+
marcel (~> 1.0)
|
69
|
+
activesupport (8.0.2)
|
70
|
+
base64
|
71
|
+
benchmark (>= 0.3)
|
72
|
+
bigdecimal
|
73
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
74
|
+
connection_pool (>= 2.2.5)
|
75
|
+
drb
|
76
|
+
i18n (>= 1.6, < 2)
|
77
|
+
logger (>= 1.4.2)
|
78
|
+
minitest (>= 5.1)
|
79
|
+
securerandom (>= 0.3)
|
80
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
81
|
+
uri (>= 0.13.1)
|
82
|
+
addressable (2.8.7)
|
83
|
+
public_suffix (>= 2.0.2, < 7.0)
|
84
|
+
ast (2.4.3)
|
85
|
+
base64 (0.3.0)
|
86
|
+
benchmark (0.4.1)
|
87
|
+
bigdecimal (3.2.2)
|
88
|
+
builder (3.3.0)
|
89
|
+
claude_swarm (0.1.20)
|
90
|
+
fast-mcp-annotations
|
91
|
+
thor (~> 1.3)
|
92
|
+
zeitwerk (~> 2.7.3)
|
93
|
+
concurrent-ruby (1.3.5)
|
94
|
+
connection_pool (2.5.3)
|
95
|
+
crass (1.0.6)
|
96
|
+
date (3.4.1)
|
97
|
+
diff-lcs (1.6.2)
|
98
|
+
drb (2.2.3)
|
99
|
+
dry-configurable (1.3.0)
|
100
|
+
dry-core (~> 1.1)
|
101
|
+
zeitwerk (~> 2.6)
|
102
|
+
dry-core (1.1.0)
|
103
|
+
concurrent-ruby (~> 1.0)
|
104
|
+
logger
|
105
|
+
zeitwerk (~> 2.6)
|
106
|
+
dry-inflector (1.2.0)
|
107
|
+
dry-initializer (3.2.0)
|
108
|
+
dry-logic (1.6.0)
|
109
|
+
bigdecimal
|
110
|
+
concurrent-ruby (~> 1.0)
|
111
|
+
dry-core (~> 1.1)
|
112
|
+
zeitwerk (~> 2.6)
|
113
|
+
dry-schema (1.14.1)
|
114
|
+
concurrent-ruby (~> 1.0)
|
115
|
+
dry-configurable (~> 1.0, >= 1.0.1)
|
116
|
+
dry-core (~> 1.1)
|
117
|
+
dry-initializer (~> 3.2)
|
118
|
+
dry-logic (~> 1.5)
|
119
|
+
dry-types (~> 1.8)
|
120
|
+
zeitwerk (~> 2.6)
|
121
|
+
dry-types (1.8.3)
|
122
|
+
bigdecimal (~> 3.0)
|
123
|
+
concurrent-ruby (~> 1.0)
|
124
|
+
dry-core (~> 1.0)
|
125
|
+
dry-inflector (~> 1.0)
|
126
|
+
dry-logic (~> 1.4)
|
127
|
+
zeitwerk (~> 2.6)
|
128
|
+
erb (5.0.1)
|
129
|
+
erubi (1.13.1)
|
130
|
+
fast-mcp-annotations (1.5.2)
|
131
|
+
addressable (~> 2.8)
|
132
|
+
base64
|
133
|
+
dry-schema (~> 1.14)
|
134
|
+
json (~> 2.0)
|
135
|
+
mime-types (~> 3.4)
|
136
|
+
rack (~> 3.1)
|
137
|
+
globalid (1.2.1)
|
138
|
+
activesupport (>= 6.1)
|
139
|
+
i18n (1.14.7)
|
140
|
+
concurrent-ruby (~> 1.0)
|
141
|
+
io-console (0.8.0)
|
142
|
+
irb (1.15.2)
|
143
|
+
pp (>= 0.6.0)
|
144
|
+
rdoc (>= 4.0.0)
|
145
|
+
reline (>= 0.4.2)
|
146
|
+
json (2.12.2)
|
147
|
+
language_server-protocol (3.17.0.5)
|
148
|
+
lint_roller (1.1.0)
|
149
|
+
logger (1.7.0)
|
150
|
+
loofah (2.24.1)
|
151
|
+
crass (~> 1.0.2)
|
152
|
+
nokogiri (>= 1.12.0)
|
153
|
+
mail (2.8.1)
|
154
|
+
mini_mime (>= 0.1.1)
|
155
|
+
net-imap
|
156
|
+
net-pop
|
157
|
+
net-smtp
|
158
|
+
marcel (1.0.4)
|
159
|
+
mime-types (3.7.0)
|
160
|
+
logger
|
161
|
+
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
162
|
+
mime-types-data (3.2025.0624)
|
163
|
+
mini_mime (1.1.5)
|
164
|
+
minitest (5.25.5)
|
165
|
+
net-imap (0.5.9)
|
166
|
+
date
|
167
|
+
net-protocol
|
168
|
+
net-pop (0.1.2)
|
169
|
+
net-protocol
|
170
|
+
net-protocol (0.2.2)
|
171
|
+
timeout
|
172
|
+
net-smtp (0.5.1)
|
173
|
+
net-protocol
|
174
|
+
nio4r (2.7.4)
|
175
|
+
nokogiri (1.18.8-aarch64-linux-gnu)
|
176
|
+
racc (~> 1.4)
|
177
|
+
nokogiri (1.18.8-aarch64-linux-musl)
|
178
|
+
racc (~> 1.4)
|
179
|
+
nokogiri (1.18.8-arm-linux-gnu)
|
180
|
+
racc (~> 1.4)
|
181
|
+
nokogiri (1.18.8-arm-linux-musl)
|
182
|
+
racc (~> 1.4)
|
183
|
+
nokogiri (1.18.8-arm64-darwin)
|
184
|
+
racc (~> 1.4)
|
185
|
+
nokogiri (1.18.8-x86_64-darwin)
|
186
|
+
racc (~> 1.4)
|
187
|
+
nokogiri (1.18.8-x86_64-linux-gnu)
|
188
|
+
racc (~> 1.4)
|
189
|
+
nokogiri (1.18.8-x86_64-linux-musl)
|
190
|
+
racc (~> 1.4)
|
191
|
+
parallel (1.27.0)
|
192
|
+
parser (3.3.8.0)
|
193
|
+
ast (~> 2.4.1)
|
194
|
+
racc
|
195
|
+
pp (0.6.2)
|
196
|
+
prettyprint
|
197
|
+
prettyprint (0.2.0)
|
198
|
+
prism (1.4.0)
|
199
|
+
psych (5.2.6)
|
200
|
+
date
|
201
|
+
stringio
|
202
|
+
public_suffix (6.0.2)
|
203
|
+
racc (1.8.1)
|
204
|
+
rack (3.1.16)
|
205
|
+
rack-session (2.1.1)
|
206
|
+
base64 (>= 0.1.0)
|
207
|
+
rack (>= 3.0.0)
|
208
|
+
rack-test (2.2.0)
|
209
|
+
rack (>= 1.3)
|
210
|
+
rackup (2.2.1)
|
211
|
+
rack (>= 3)
|
212
|
+
rails (8.0.2)
|
213
|
+
actioncable (= 8.0.2)
|
214
|
+
actionmailbox (= 8.0.2)
|
215
|
+
actionmailer (= 8.0.2)
|
216
|
+
actionpack (= 8.0.2)
|
217
|
+
actiontext (= 8.0.2)
|
218
|
+
actionview (= 8.0.2)
|
219
|
+
activejob (= 8.0.2)
|
220
|
+
activemodel (= 8.0.2)
|
221
|
+
activerecord (= 8.0.2)
|
222
|
+
activestorage (= 8.0.2)
|
223
|
+
activesupport (= 8.0.2)
|
224
|
+
bundler (>= 1.15.0)
|
225
|
+
railties (= 8.0.2)
|
226
|
+
rails-dom-testing (2.3.0)
|
227
|
+
activesupport (>= 5.0.0)
|
228
|
+
minitest
|
229
|
+
nokogiri (>= 1.6)
|
230
|
+
rails-html-sanitizer (1.6.2)
|
231
|
+
loofah (~> 2.21)
|
232
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
233
|
+
railties (8.0.2)
|
234
|
+
actionpack (= 8.0.2)
|
235
|
+
activesupport (= 8.0.2)
|
236
|
+
irb (~> 1.13)
|
237
|
+
rackup (>= 1.0.0)
|
238
|
+
rake (>= 12.2)
|
239
|
+
thor (~> 1.0, >= 1.2.2)
|
240
|
+
zeitwerk (~> 2.6)
|
241
|
+
rainbow (3.1.1)
|
242
|
+
rake (13.3.0)
|
243
|
+
rdoc (6.14.1)
|
244
|
+
erb
|
245
|
+
psych (>= 4.0.0)
|
246
|
+
regexp_parser (2.10.0)
|
247
|
+
reline (0.6.1)
|
248
|
+
io-console (~> 0.5)
|
249
|
+
rspec (3.13.1)
|
250
|
+
rspec-core (~> 3.13.0)
|
251
|
+
rspec-expectations (~> 3.13.0)
|
252
|
+
rspec-mocks (~> 3.13.0)
|
253
|
+
rspec-core (3.13.5)
|
254
|
+
rspec-support (~> 3.13.0)
|
255
|
+
rspec-expectations (3.13.5)
|
256
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
257
|
+
rspec-support (~> 3.13.0)
|
258
|
+
rspec-mocks (3.13.5)
|
259
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
260
|
+
rspec-support (~> 3.13.0)
|
261
|
+
rspec-support (3.13.4)
|
262
|
+
rubocop (1.77.0)
|
263
|
+
json (~> 2.3)
|
264
|
+
language_server-protocol (~> 3.17.0.2)
|
265
|
+
lint_roller (~> 1.1.0)
|
266
|
+
parallel (~> 1.10)
|
267
|
+
parser (>= 3.3.0.2)
|
268
|
+
rainbow (>= 2.2.2, < 4.0)
|
269
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
270
|
+
rubocop-ast (>= 1.45.1, < 2.0)
|
271
|
+
ruby-progressbar (~> 1.7)
|
272
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
273
|
+
rubocop-ast (1.45.1)
|
274
|
+
parser (>= 3.3.7.2)
|
275
|
+
prism (~> 1.4)
|
276
|
+
rubocop-rake (0.7.1)
|
277
|
+
lint_roller (~> 1.1)
|
278
|
+
rubocop (>= 1.72.1)
|
279
|
+
ruby-progressbar (1.13.0)
|
280
|
+
securerandom (0.4.1)
|
281
|
+
stringio (3.1.7)
|
282
|
+
thor (1.3.2)
|
283
|
+
timeout (0.4.3)
|
284
|
+
tzinfo (2.0.6)
|
285
|
+
concurrent-ruby (~> 1.0)
|
286
|
+
unicode-display_width (3.1.4)
|
287
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
288
|
+
unicode-emoji (4.0.4)
|
289
|
+
uri (1.0.3)
|
290
|
+
useragent (0.16.11)
|
291
|
+
websocket-driver (0.8.0)
|
292
|
+
base64
|
293
|
+
websocket-extensions (>= 0.1.0)
|
294
|
+
websocket-extensions (0.1.5)
|
295
|
+
zeitwerk (2.7.3)
|
296
|
+
|
297
|
+
PLATFORMS
|
298
|
+
aarch64-linux-gnu
|
299
|
+
aarch64-linux-musl
|
300
|
+
arm-linux-gnu
|
301
|
+
arm-linux-musl
|
302
|
+
arm64-darwin
|
303
|
+
x86_64-darwin
|
304
|
+
x86_64-linux-gnu
|
305
|
+
x86_64-linux-musl
|
306
|
+
|
307
|
+
DEPENDENCIES
|
308
|
+
claude-on-rails!
|
309
|
+
rake (~> 13.0)
|
310
|
+
rspec (~> 3.0)
|
311
|
+
rubocop-rake (~> 0.6)
|
312
|
+
|
313
|
+
BUNDLED WITH
|
314
|
+
2.5.23
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# ClaudeOnRails
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/claude-on-rails)
|
4
|
+
[](https://github.com/obie/claude-on-rails/actions/workflows/main.yml)
|
5
|
+
|
6
|
+
|
3
7
|
A Rails development framework that leverages [claude-swarm](https://github.com/parruda/claude-swarm) to create an intelligent team of AI agents specialized in different aspects of Rails development.
|
4
8
|
|
5
9
|
Instead of managing personas manually, ClaudeOnRails automatically orchestrates a swarm of specialized agents that work together like a real development team. Simply describe what you want to build, and the swarm handles the rest.
|
@@ -35,8 +39,11 @@ bundle install
|
|
35
39
|
rails generate claude_on_rails:swarm
|
36
40
|
```
|
37
41
|
|
42
|
+
During generation, you'll be offered to set up Rails MCP Server for enhanced documentation access. Simply press Y when prompted!
|
43
|
+
|
38
44
|
This will:
|
39
45
|
- Analyze your Rails project structure
|
46
|
+
- Optionally set up Rails MCP Server (recommended)
|
40
47
|
- Generate a customized swarm configuration
|
41
48
|
- Create agent-specific prompts
|
42
49
|
- Set up your development environment
|
@@ -107,8 +114,9 @@ After running the generator, you'll have:
|
|
107
114
|
```
|
108
115
|
your-rails-app/
|
109
116
|
├── claude-swarm.yml # Swarm configuration
|
110
|
-
├── CLAUDE.md # Project-specific Claude config
|
117
|
+
├── CLAUDE.md # Project-specific Claude config (imports context.md)
|
111
118
|
└── .claude-on-rails/
|
119
|
+
├── context.md # Rails project context imported by CLAUDE.md
|
112
120
|
└── prompts/ # Agent-specific prompts
|
113
121
|
├── architect.md
|
114
122
|
├── models.md
|
@@ -127,7 +135,7 @@ instances:
|
|
127
135
|
architect:
|
128
136
|
description: "Your project-specific architect description"
|
129
137
|
connections: [models, controllers, custom_agent]
|
130
|
-
|
138
|
+
|
131
139
|
custom_agent:
|
132
140
|
description: "Specialized agent for your domain"
|
133
141
|
directory: ./app/custom
|
@@ -150,12 +158,53 @@ Customize agent behavior by editing prompts in `.claude-on-rails/prompts/`:
|
|
150
158
|
- **Test-Driven**: Automatic test generation for all code
|
151
159
|
- **Performance Focus**: Built-in optimization capabilities
|
152
160
|
|
161
|
+
## Enhanced Documentation with Rails MCP Server
|
162
|
+
|
163
|
+
ClaudeOnRails integrates with [Rails MCP Server](https://github.com/mariochavez/rails-mcp-server) to provide your AI agents with real-time access to Rails documentation and best practices.
|
164
|
+
|
165
|
+
### Benefits
|
166
|
+
|
167
|
+
- **Up-to-date Documentation**: Agents access current Rails guides matching your version
|
168
|
+
- **Framework Resources**: Includes Turbo, Stimulus, and Kamal documentation
|
169
|
+
- **Consistent Standards**: All agents share the same documentation source
|
170
|
+
- **Reduced Hallucination**: Agents verify patterns against official documentation
|
171
|
+
|
172
|
+
### Automated Setup
|
173
|
+
|
174
|
+
When you run `rails generate claude_on_rails:swarm`, you'll be prompted to set up Rails MCP Server automatically. Just press Y!
|
175
|
+
|
176
|
+
If you skipped it initially, you can set it up anytime:
|
177
|
+
|
178
|
+
```bash
|
179
|
+
bundle exec rake claude_on_rails:setup_mcp
|
180
|
+
```
|
181
|
+
|
182
|
+
This interactive command will:
|
183
|
+
- Install the Rails MCP Server gem
|
184
|
+
- Configure your environment for enhanced documentation access
|
185
|
+
|
186
|
+
### Check Status
|
187
|
+
|
188
|
+
To verify your Rails MCP Server installation:
|
189
|
+
|
190
|
+
```bash
|
191
|
+
bundle exec rake claude_on_rails:mcp_status
|
192
|
+
```
|
193
|
+
|
194
|
+
### How It Works
|
195
|
+
|
196
|
+
When Rails MCP Server is available:
|
197
|
+
- Each agent can query Rails documentation in real-time
|
198
|
+
- Version-specific guidance ensures compatibility
|
199
|
+
- Agents reference canonical implementations
|
200
|
+
- Complex features follow official patterns
|
201
|
+
|
153
202
|
## Requirements
|
154
203
|
|
155
204
|
- Ruby 2.7+
|
156
205
|
- Rails 6.0+
|
157
|
-
-
|
158
|
-
-
|
206
|
+
- [claude-swarm](https://github.com/parruda/claude-swarm) gem (automatically installed as a dependency)
|
207
|
+
- Claude Code CLI
|
159
208
|
|
160
209
|
## Examples
|
161
210
|
|
@@ -177,4 +226,4 @@ MIT License - see [LICENSE](./LICENSE) for details.
|
|
177
226
|
|
178
227
|
- Powered by [claude-swarm](https://github.com/parruda/claude-swarm)
|
179
228
|
- Built for [Claude Code](https://github.com/anthropics/claude-code)
|
180
|
-
- Integrates with [Rails MCP Server](https://github.com/
|
229
|
+
- Integrates with [Rails MCP Server](https://github.com/maquina-app/rails-mcp-server)
|
data/Rakefile
CHANGED
@@ -1,9 +1,19 @@
|
|
1
|
-
|
2
|
-
require "rspec/core/rake_task"
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
# RSpec task
|
4
7
|
RSpec::Core::RakeTask.new(:spec)
|
5
8
|
|
6
|
-
require
|
7
|
-
|
9
|
+
require 'rubocop/rake_task'
|
10
|
+
|
11
|
+
RuboCop::RakeTask.new(:rubocop_ci)
|
12
|
+
|
13
|
+
task ci: %i[spec rubocop_ci]
|
14
|
+
|
15
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
16
|
+
task.options = ['--autocorrect']
|
17
|
+
end
|
8
18
|
|
9
|
-
task default: %i[spec rubocop]
|
19
|
+
task default: %i[spec rubocop]
|