@@ -6,89 +6,109 @@ swarm:
66 architect:
77 description: "Rails architect coordinating <%= @api_only ? 'API' : 'full-stack' %> development for <%= Rails.application.class.module_parent_name %> "
88 directory: .
9- model: claude-3-5-haiku-20250110
9+ model: opus
1010 connections: [<%= agents.reject { |a| a == 'architect' }.join(', ') %> ]
1111 prompt_file: .claude-on-rails/prompts/architect.md
1212 vibe: true
13+ <% if File.directory?(Rails.root.join("app/models")) %>
1314
1415 models:
1516 description: "ActiveRecord models, migrations, and database optimization specialist"
1617 directory: ./app/models
17- model: claude-3-5-haiku-20250110
18+ model: opus
1819 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
1920 prompt_file: .claude-on-rails/prompts/models.md
21+ <% end %>
22+ <% if File.directory?(Rails.root.join("app/controllers")) %>
2023
2124 controllers:
2225 description: "Rails controllers, routing, and request handling specialist"
2326 directory: ./app/controllers
24- model: claude-3-5-haiku-20250110
25- connections: [services<%= ', api' if @api_only %> ]
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 %>
2634 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
2735 prompt_file: .claude-on-rails/prompts/controllers.md
28- <% unless @api_only %>
36+ <% end %>
37+ <% if !@api_only && File.directory?(Rails.root.join("app/views")) %>
2938
3039 views:
3140 description: "Rails views, layouts, partials, and asset pipeline specialist"
3241 directory: ./app/views
33- model: claude-3-5-haiku-20250110
34- connections: [<%= 'stimulus' if @has_turbo %> ]
42+ model: opus
43+ <% if @has_turbo && File.directory?(Rails.root.join("app/javascript")) %>
44+ connections: [stimulus]
45+ <% end %>
3546 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
3647 prompt_file: .claude-on-rails/prompts/views.md
3748<% end %>
38- <% if @api_only %>
49+ <% if @api_only && File.directory?(Rails.root.join("app/controllers/api")) %>
3950
4051 api:
4152 description: "RESTful API design, serialization, and versioning specialist"
4253 directory: ./app/controllers/api
43- model: claude-3-5-haiku-20250110
54+ model: opus
4455 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
4556 prompt_file: .claude-on-rails/prompts/api.md
4657<% end %>
47- <% if @has_graphql %>
58+ <% if @has_graphql && File.directory?(Rails.root.join("app/graphql")) %>
4859
4960 graphql:
5061 description: "GraphQL schema, resolvers, and mutations specialist"
5162 directory: ./app/graphql
52- model: claude-3-5-haiku-20250110
63+ model: opus
5364 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
5465 prompt_file: .claude-on-rails/prompts/graphql.md
5566<% end %>
56- <% if @has_turbo %>
67+ <% if @has_turbo && File.directory?(Rails.root.join("app/javascript")) %>
5768
5869 stimulus:
5970 description: "Stimulus.js controllers and Turbo integration specialist"
6071 directory: ./app/javascript
61- model: claude-3-5-haiku-20250110
72+ model: opus
6273 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
6374 prompt_file: .claude-on-rails/prompts/stimulus.md
6475<% end %>
76+ <% if File.directory?(Rails.root.join("app/services")) %>
6577
6678 services:
6779 description: "Service objects, business logic, and design patterns specialist"
6880 directory: ./app/services
69- model: claude-3-5-haiku-20250110
81+ model: opus
7082 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
7183 prompt_file: .claude-on-rails/prompts/services.md
84+ <% end %>
85+ <% if File.directory?(Rails.root.join("app/jobs")) %>
7286
7387 jobs:
7488 description: "Background jobs, ActiveJob, and async processing specialist"
7589 directory: ./app/jobs
76- model: claude-3-5-haiku-20250110
90+ model: opus
7791 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
7892 prompt_file: .claude-on-rails/prompts/jobs.md
79- <% unless @skip_tests %>
93+ <% end %>
94+ <% if !@skip_tests %>
95+ <% test_dir = @test_framework == 'RSpec' ? 'spec' : 'test' %>
96+ <% if File.directory?(Rails.root.join(test_dir)) %>
8097
8198 tests:
8299 description: "<%= @test_framework %> testing, factories, and test coverage specialist"
83- directory: ./<%= @test_framework == 'RSpec' ? 'spec' : 'test' %>
84- model: claude-3-5-haiku-20250110
100+ directory: ./<%= test_dir %>
101+ model: opus
85102 allowed_tools: [Read, Edit, Write, Bash, Grep, Glob, LS]
86103 prompt_file: .claude-on-rails/prompts/tests.md
87104<% end %>
105+ <% end %>
106+ <% if File.directory?(Rails.root.join("config")) %>
88107
89108 devops:
90109 description: "Deployment, Docker, CI/CD, and production configuration specialist"
91110 directory: ./config
92- model: claude-3-5-haiku-20250110
111+ model: opus
93112 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 %>
0 commit comments