claude-on-rails 0.1.2 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de4a3fb293d60b83ed1f58dbaac8d0884d4febdf37acf2adb18d93de025858c2
|
4
|
+
data.tar.gz: 7c180d4eb24f642107e6029c9f2502b2a4707a52debf87cd5f672b88738d9c83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d853f53d8ff33753d9db0f3386ecabecb58e816711e0eaa57b8e3fad35c3d99284d3a101101bdf52f0f3010d83df95b1866ac9e8069e6bd40a55d6181d0cbf2
|
7
|
+
data.tar.gz: 9e44356c815d9f0bd3338e49ab12e2e134eae9e9a5ab1519ec69ef6ca4e32ad2cd9d7ccae63cbd6504130adc845a383953231adfe5ed2d73a53ad5360546e355
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,21 @@ 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.1.3] - 2025-01-26
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Only create swarm agents for directories that actually exist
|
12
|
+
- Changed model from full model name to claude-swarm compatible names (opus/haiku/sonnet)
|
13
|
+
- Fixed controllers connections to only include services if directory exists
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
- Default model is now "opus" for all agents
|
17
|
+
- Generator now shows which agents will be created during analysis
|
18
|
+
|
19
|
+
### Improved
|
20
|
+
- Swarm configuration template now checks for directory existence before creating agents
|
21
|
+
- Better handling of optional directories like app/services, app/jobs, etc.
|
22
|
+
|
8
23
|
## [0.1.2] - 2025-01-26
|
9
24
|
|
10
25
|
### Fixed
|
@@ -3,7 +3,7 @@ module ClaudeOnRails
|
|
3
3
|
attr_accessor :default_model, :vibe_mode, :session_directory, :log_directory
|
4
4
|
|
5
5
|
def initialize
|
6
|
-
@default_model = "
|
6
|
+
@default_model = "opus"
|
7
7
|
@vibe_mode = true
|
8
8
|
@session_directory = ".claude-on-rails/sessions"
|
9
9
|
@log_directory = ".claude-on-rails/logs"
|
@@ -32,6 +32,12 @@ module ClaudeOnRails
|
|
32
32
|
say "Project type: #{@api_only ? 'API-only' : 'Full-stack Rails'}", :cyan
|
33
33
|
say "Test framework: #{@test_framework}", :cyan if @test_framework
|
34
34
|
say "GraphQL detected: #{@has_graphql ? 'Yes' : 'No'}", :cyan
|
35
|
+
|
36
|
+
# Show which agents will be created
|
37
|
+
say "\nAgents to be created:", :yellow
|
38
|
+
agents.each do |agent|
|
39
|
+
say " - #{agent}", :cyan
|
40
|
+
end
|
35
41
|
end
|
36
42
|
|
37
43
|
def create_swarm_config
|
@@ -73,16 +79,24 @@ module ClaudeOnRails
|
|
73
79
|
|
74
80
|
def build_agent_list
|
75
81
|
list = ["architect"]
|
76
|
-
list << "models"
|
77
|
-
list << "controllers"
|
78
|
-
list << "views"
|
79
|
-
list << "api" if @api_only
|
80
|
-
list << "graphql" if @has_graphql
|
81
|
-
list << "stimulus" if @has_turbo
|
82
|
-
list << "services"
|
83
|
-
list << "jobs"
|
84
|
-
|
85
|
-
|
82
|
+
list << "models" if File.directory?(Rails.root.join("app/models"))
|
83
|
+
list << "controllers" if File.directory?(Rails.root.join("app/controllers"))
|
84
|
+
list << "views" if !@api_only && File.directory?(Rails.root.join("app/views"))
|
85
|
+
list << "api" if @api_only && File.directory?(Rails.root.join("app/controllers/api"))
|
86
|
+
list << "graphql" if @has_graphql && File.directory?(Rails.root.join("app/graphql"))
|
87
|
+
list << "stimulus" if @has_turbo && File.directory?(Rails.root.join("app/javascript"))
|
88
|
+
list << "services" if File.directory?(Rails.root.join("app/services"))
|
89
|
+
list << "jobs" if File.directory?(Rails.root.join("app/jobs"))
|
90
|
+
|
91
|
+
if !@skip_tests
|
92
|
+
if @test_framework == 'RSpec' && File.directory?(Rails.root.join("spec"))
|
93
|
+
list << "tests"
|
94
|
+
elsif @test_framework == 'Minitest' && File.directory?(Rails.root.join("test"))
|
95
|
+
list << "tests"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
list << "devops" if File.directory?(Rails.root.join("config"))
|
86
100
|
list
|
87
101
|
end
|
88
102
|
end
|
@@ -6,89 +6,109 @@ swarm:
|
|
6
6
|
architect:
|
7
7
|
description: "Rails architect coordinating <%= @api_only ? 'API' : 'full-stack' %> development for <%= Rails.application.class.module_parent_name %>"
|
8
8
|
directory: .
|
9
|
-
model:
|
9
|
+
model: opus
|
10
10
|
connections: [<%= agents.reject { |a| a == 'architect' }.join(', ') %>]
|
11
11
|
prompt_file: .claude-on-rails/prompts/architect.md
|
12
12
|
vibe: true
|
13
|
+
<% if File.directory?(Rails.root.join("app/models")) %>
|
13
14
|
|
14
15
|
models:
|
15
16
|
description: "ActiveRecord models, migrations, and database optimization specialist"
|
16
17
|
directory: ./app/models
|
17
|
-
model:
|
18
|
+
model: opus
|
18
19
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
19
20
|
prompt_file: .claude-on-rails/prompts/models.md
|
21
|
+
<% end %>
|
22
|
+
<% if File.directory?(Rails.root.join("app/controllers")) %>
|
20
23
|
|
21
24
|
controllers:
|
22
25
|
description: "Rails controllers, routing, and request handling specialist"
|
23
26
|
directory: ./app/controllers
|
24
|
-
model:
|
25
|
-
|
27
|
+
model: opus
|
28
|
+
<% connections = [] %>
|
29
|
+
<% connections << 'services' if File.directory?(Rails.root.join("app/services")) %>
|
30
|
+
<% connections << 'api' if @api_only && File.directory?(Rails.root.join("app/controllers/api")) %>
|
31
|
+
<% if connections.any? %>
|
32
|
+
connections: [<%= connections.join(', ') %>]
|
33
|
+
<% end %>
|
26
34
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
27
35
|
prompt_file: .claude-on-rails/prompts/controllers.md
|
28
|
-
<%
|
36
|
+
<% end %>
|
37
|
+
<% if !@api_only && File.directory?(Rails.root.join("app/views")) %>
|
29
38
|
|
30
39
|
views:
|
31
40
|
description: "Rails views, layouts, partials, and asset pipeline specialist"
|
32
41
|
directory: ./app/views
|
33
|
-
model:
|
34
|
-
|
42
|
+
model: opus
|
43
|
+
<% if @has_turbo && File.directory?(Rails.root.join("app/javascript")) %>
|
44
|
+
connections: [stimulus]
|
45
|
+
<% end %>
|
35
46
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
36
47
|
prompt_file: .claude-on-rails/prompts/views.md
|
37
48
|
<% end %>
|
38
|
-
<% if @api_only %>
|
49
|
+
<% if @api_only && File.directory?(Rails.root.join("app/controllers/api")) %>
|
39
50
|
|
40
51
|
api:
|
41
52
|
description: "RESTful API design, serialization, and versioning specialist"
|
42
53
|
directory: ./app/controllers/api
|
43
|
-
model:
|
54
|
+
model: opus
|
44
55
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
45
56
|
prompt_file: .claude-on-rails/prompts/api.md
|
46
57
|
<% end %>
|
47
|
-
<% if @has_graphql %>
|
58
|
+
<% if @has_graphql && File.directory?(Rails.root.join("app/graphql")) %>
|
48
59
|
|
49
60
|
graphql:
|
50
61
|
description: "GraphQL schema, resolvers, and mutations specialist"
|
51
62
|
directory: ./app/graphql
|
52
|
-
model:
|
63
|
+
model: opus
|
53
64
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
54
65
|
prompt_file: .claude-on-rails/prompts/graphql.md
|
55
66
|
<% end %>
|
56
|
-
<% if @has_turbo %>
|
67
|
+
<% if @has_turbo && File.directory?(Rails.root.join("app/javascript")) %>
|
57
68
|
|
58
69
|
stimulus:
|
59
70
|
description: "Stimulus.js controllers and Turbo integration specialist"
|
60
71
|
directory: ./app/javascript
|
61
|
-
model:
|
72
|
+
model: opus
|
62
73
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
63
74
|
prompt_file: .claude-on-rails/prompts/stimulus.md
|
64
75
|
<% end %>
|
76
|
+
<% if File.directory?(Rails.root.join("app/services")) %>
|
65
77
|
|
66
78
|
services:
|
67
79
|
description: "Service objects, business logic, and design patterns specialist"
|
68
80
|
directory: ./app/services
|
69
|
-
model:
|
81
|
+
model: opus
|
70
82
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
71
83
|
prompt_file: .claude-on-rails/prompts/services.md
|
84
|
+
<% end %>
|
85
|
+
<% if File.directory?(Rails.root.join("app/jobs")) %>
|
72
86
|
|
73
87
|
jobs:
|
74
88
|
description: "Background jobs, ActiveJob, and async processing specialist"
|
75
89
|
directory: ./app/jobs
|
76
|
-
model:
|
90
|
+
model: opus
|
77
91
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
78
92
|
prompt_file: .claude-on-rails/prompts/jobs.md
|
79
|
-
<%
|
93
|
+
<% end %>
|
94
|
+
<% if !@skip_tests %>
|
95
|
+
<% test_dir = @test_framework == 'RSpec' ? 'spec' : 'test' %>
|
96
|
+
<% if File.directory?(Rails.root.join(test_dir)) %>
|
80
97
|
|
81
98
|
tests:
|
82
99
|
description: "<%= @test_framework %> testing, factories, and test coverage specialist"
|
83
|
-
directory: ./<%=
|
84
|
-
model:
|
100
|
+
directory: ./<%= test_dir %>
|
101
|
+
model: opus
|
85
102
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
86
103
|
prompt_file: .claude-on-rails/prompts/tests.md
|
87
104
|
<% end %>
|
105
|
+
<% end %>
|
106
|
+
<% if File.directory?(Rails.root.join("config")) %>
|
88
107
|
|
89
108
|
devops:
|
90
109
|
description: "Deployment, Docker, CI/CD, and production configuration specialist"
|
91
110
|
directory: ./config
|
92
|
-
model:
|
111
|
+
model: opus
|
93
112
|
allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
|
94
|
-
prompt_file: .claude-on-rails/prompts/devops.md
|
113
|
+
prompt_file: .claude-on-rails/prompts/devops.md
|
114
|
+
<% end %>
|