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.
@@ -1,192 +1,184 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ClaudeOnRails
2
4
  class SwarmBuilder
3
5
  attr_reader :project_analysis
4
-
6
+
5
7
  def initialize(project_analysis)
6
8
  @project_analysis = project_analysis
7
9
  end
8
-
10
+
9
11
  def build
10
12
  {
11
13
  version: 1,
12
14
  swarm: {
13
- name: "Rails Development Team",
14
- main: "architect",
15
+ name: 'Rails Development Team',
16
+ main: 'architect',
15
17
  instances: build_instances
16
18
  }
17
19
  }
18
20
  end
19
-
21
+
20
22
  private
21
-
23
+
22
24
  def build_instances
23
25
  instances = {}
24
-
26
+
25
27
  # Always include architect
26
28
  instances[:architect] = build_architect
27
-
29
+
28
30
  # Core agents
29
31
  instances[:models] = build_models_agent
30
32
  instances[:controllers] = build_controllers_agent
31
-
33
+
32
34
  # Conditional agents
33
- unless project_analysis[:api_only]
34
- instances[:views] = build_views_agent
35
- end
36
-
37
- if project_analysis[:api_only]
38
- instances[:api] = build_api_agent
39
- end
40
-
41
- if project_analysis[:has_graphql]
42
- instances[:graphql] = build_graphql_agent
43
- end
44
-
45
- if project_analysis[:has_turbo] && !project_analysis[:api_only]
46
- instances[:stimulus] = build_stimulus_agent
47
- end
48
-
35
+ instances[:views] = build_views_agent unless project_analysis[:api_only]
36
+
37
+ instances[:api] = build_api_agent if project_analysis[:api_only]
38
+
39
+ instances[:graphql] = build_graphql_agent if project_analysis[:has_graphql]
40
+
41
+ instances[:stimulus] = build_stimulus_agent if project_analysis[:has_turbo] && !project_analysis[:api_only]
42
+
49
43
  # Supporting agents
50
44
  instances[:services] = build_services_agent
51
45
  instances[:jobs] = build_jobs_agent
52
-
53
- if project_analysis[:test_framework]
54
- instances[:tests] = build_tests_agent
55
- end
56
-
46
+
47
+ instances[:tests] = build_tests_agent if project_analysis[:test_framework]
48
+
57
49
  instances[:devops] = build_devops_agent
58
-
50
+
59
51
  instances
60
52
  end
61
-
53
+
62
54
  def build_architect
63
- connections = ["models", "controllers"]
64
- connections << "views" unless project_analysis[:api_only]
65
- connections << "api" if project_analysis[:api_only]
66
- connections << "graphql" if project_analysis[:has_graphql]
67
- connections << "services"
68
- connections << "jobs"
69
- connections << "tests" if project_analysis[:test_framework]
70
- connections << "devops"
71
-
55
+ connections = %w[models controllers]
56
+ connections << 'views' unless project_analysis[:api_only]
57
+ connections << 'api' if project_analysis[:api_only]
58
+ connections << 'graphql' if project_analysis[:has_graphql]
59
+ connections << 'services'
60
+ connections << 'jobs'
61
+ connections << 'tests' if project_analysis[:test_framework]
62
+ connections << 'devops'
63
+
72
64
  {
73
65
  description: "Rails architect coordinating #{project_analysis[:api_only] ? 'API' : 'full-stack'} development",
74
- directory: ".",
66
+ directory: '.',
75
67
  model: ClaudeOnRails.configuration.default_model,
76
68
  connections: connections,
77
- prompt_file: ".claude-on-rails/prompts/architect.md",
69
+ prompt_file: '.claude-on-rails/prompts/architect.md',
78
70
  vibe: ClaudeOnRails.configuration.vibe_mode
79
71
  }
80
72
  end
81
-
73
+
82
74
  def build_models_agent
83
75
  {
84
- description: "ActiveRecord models, migrations, and database optimization specialist",
85
- directory: "./app/models",
76
+ description: 'ActiveRecord models, migrations, and database optimization specialist',
77
+ directory: './app/models',
86
78
  model: ClaudeOnRails.configuration.default_model,
87
79
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
88
- prompt_file: ".claude-on-rails/prompts/models.md"
80
+ prompt_file: '.claude-on-rails/prompts/models.md'
89
81
  }
90
82
  end
91
-
83
+
92
84
  def build_controllers_agent
93
- connections = ["services"]
94
- connections << "api" if project_analysis[:api_only]
95
-
85
+ connections = ['services']
86
+ connections << 'api' if project_analysis[:api_only]
87
+
96
88
  {
97
- description: "Rails controllers, routing, and request handling specialist",
98
- directory: "./app/controllers",
89
+ description: 'Rails controllers, routing, and request handling specialist',
90
+ directory: './app/controllers',
99
91
  model: ClaudeOnRails.configuration.default_model,
100
92
  connections: connections.empty? ? nil : connections,
101
93
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
102
- prompt_file: ".claude-on-rails/prompts/controllers.md"
94
+ prompt_file: '.claude-on-rails/prompts/controllers.md'
103
95
  }.compact
104
96
  end
105
-
97
+
106
98
  def build_views_agent
107
99
  connections = []
108
- connections << "stimulus" if project_analysis[:has_turbo]
109
-
100
+ connections << 'stimulus' if project_analysis[:has_turbo]
101
+
110
102
  {
111
- description: "Rails views, layouts, partials, and asset pipeline specialist",
112
- directory: "./app/views",
103
+ description: 'Rails views, layouts, partials, and asset pipeline specialist',
104
+ directory: './app/views',
113
105
  model: ClaudeOnRails.configuration.default_model,
114
106
  connections: connections.empty? ? nil : connections,
115
107
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
116
- prompt_file: ".claude-on-rails/prompts/views.md"
108
+ prompt_file: '.claude-on-rails/prompts/views.md'
117
109
  }.compact
118
110
  end
119
-
111
+
120
112
  def build_api_agent
121
113
  {
122
- description: "RESTful API design, serialization, and versioning specialist",
123
- directory: "./app/controllers/api",
114
+ description: 'RESTful API design, serialization, and versioning specialist',
115
+ directory: './app/controllers/api',
124
116
  model: ClaudeOnRails.configuration.default_model,
125
117
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
126
- prompt_file: ".claude-on-rails/prompts/api.md"
118
+ prompt_file: '.claude-on-rails/prompts/api.md'
127
119
  }
128
120
  end
129
-
121
+
130
122
  def build_graphql_agent
131
123
  {
132
- description: "GraphQL schema, resolvers, and mutations specialist",
133
- directory: "./app/graphql",
124
+ description: 'GraphQL schema, resolvers, and mutations specialist',
125
+ directory: './app/graphql',
134
126
  model: ClaudeOnRails.configuration.default_model,
135
127
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
136
- prompt_file: ".claude-on-rails/prompts/graphql.md"
128
+ prompt_file: '.claude-on-rails/prompts/graphql.md'
137
129
  }
138
130
  end
139
-
131
+
140
132
  def build_stimulus_agent
141
133
  {
142
- description: "Stimulus.js controllers and Turbo integration specialist",
143
- directory: "./app/javascript",
134
+ description: 'Stimulus.js controllers and Turbo integration specialist',
135
+ directory: './app/javascript',
144
136
  model: ClaudeOnRails.configuration.default_model,
145
137
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
146
- prompt_file: ".claude-on-rails/prompts/stimulus.md"
138
+ prompt_file: '.claude-on-rails/prompts/stimulus.md'
147
139
  }
148
140
  end
149
-
141
+
150
142
  def build_services_agent
151
143
  {
152
- description: "Service objects, business logic, and design patterns specialist",
153
- directory: "./app/services",
144
+ description: 'Service objects, business logic, and design patterns specialist',
145
+ directory: './app/services',
154
146
  model: ClaudeOnRails.configuration.default_model,
155
147
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
156
- prompt_file: ".claude-on-rails/prompts/services.md"
148
+ prompt_file: '.claude-on-rails/prompts/services.md'
157
149
  }
158
150
  end
159
-
151
+
160
152
  def build_jobs_agent
161
153
  {
162
- description: "Background jobs, ActiveJob, and async processing specialist",
163
- directory: "./app/jobs",
154
+ description: 'Background jobs, ActiveJob, and async processing specialist',
155
+ directory: './app/jobs',
164
156
  model: ClaudeOnRails.configuration.default_model,
165
157
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
166
- prompt_file: ".claude-on-rails/prompts/jobs.md"
158
+ prompt_file: '.claude-on-rails/prompts/jobs.md'
167
159
  }
168
160
  end
169
-
161
+
170
162
  def build_tests_agent
171
163
  test_dir = project_analysis[:test_framework] == 'RSpec' ? './spec' : './test'
172
-
164
+
173
165
  {
174
166
  description: "#{project_analysis[:test_framework]} testing, factories, and test coverage specialist",
175
167
  directory: test_dir,
176
168
  model: ClaudeOnRails.configuration.default_model,
177
169
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
178
- prompt_file: ".claude-on-rails/prompts/tests.md"
170
+ prompt_file: '.claude-on-rails/prompts/tests.md'
179
171
  }
180
172
  end
181
-
173
+
182
174
  def build_devops_agent
183
175
  {
184
- description: "Deployment, Docker, CI/CD, and production configuration specialist",
185
- directory: "./config",
176
+ description: 'Deployment, Docker, CI/CD, and production configuration specialist',
177
+ directory: './config',
186
178
  model: ClaudeOnRails.configuration.default_model,
187
179
  allowed_tools: %w[Read Edit Write Bash Grep Glob LS],
188
- prompt_file: ".claude-on-rails/prompts/devops.md"
180
+ prompt_file: '.claude-on-rails/prompts/devops.md'
189
181
  }
190
182
  end
191
183
  end
192
- end
184
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ClaudeOnRails
2
- VERSION = "0.1.3"
3
- end
4
+ VERSION = '0.2.0'
5
+ end
@@ -1,29 +1,32 @@
1
- require "claude_on_rails/version"
2
- require "claude_on_rails/configuration"
3
- require "claude_on_rails/project_analyzer"
4
- require "claude_on_rails/swarm_builder"
1
+ # frozen_string_literal: true
2
+
3
+ require 'claude_on_rails/version'
4
+ require 'claude_on_rails/configuration'
5
+ require 'claude_on_rails/project_analyzer'
6
+ require 'claude_on_rails/swarm_builder'
7
+ require 'claude_on_rails/mcp_support'
8
+
9
+ # Load railtie if Rails is defined
10
+ require 'claude_on_rails/railtie' if defined?(Rails::Railtie)
5
11
 
6
12
  module ClaudeOnRails
7
13
  class Error < StandardError; end
8
-
14
+
9
15
  class << self
10
- attr_accessor :configuration
11
-
12
16
  def configure
13
- self.configuration ||= Configuration.new
14
17
  yield(configuration) if block_given?
15
18
  end
16
-
19
+
17
20
  def configuration
18
21
  @configuration ||= Configuration.new
19
22
  end
20
-
23
+
21
24
  def analyze_project(root_path = Rails.root)
22
25
  ProjectAnalyzer.new(root_path).analyze
23
26
  end
24
-
27
+
25
28
  def build_swarm(project_analysis)
26
29
  SwarmBuilder.new(project_analysis).build
27
30
  end
28
31
  end
29
- end
32
+ end
@@ -1,104 +1,164 @@
1
- require "rails/generators/base"
2
- require "claude_on_rails"
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators/base'
4
+ require 'claude_on_rails'
3
5
 
4
6
  module ClaudeOnRails
5
7
  module Generators
6
8
  class SwarmGenerator < Rails::Generators::Base
7
- source_root File.expand_path("templates", __dir__)
8
-
9
+ source_root File.expand_path('templates', __dir__)
10
+
9
11
  class_option :api_only, type: :boolean, default: false,
10
- desc: "Generate swarm for API-only Rails application"
11
-
12
+ desc: 'Generate swarm for API-only Rails application'
13
+
12
14
  class_option :skip_tests, type: :boolean, default: false,
13
- desc: "Skip test agent in swarm configuration"
14
-
15
+ desc: 'Skip test agent in swarm configuration'
16
+
15
17
  class_option :graphql, type: :boolean, default: false,
16
- desc: "Include GraphQL specialist agent"
17
-
18
+ desc: 'Include GraphQL specialist agent'
19
+
18
20
  class_option :turbo, type: :boolean, default: true,
19
- desc: "Include Turbo/Stimulus specialist agents"
20
-
21
+ desc: 'Include Turbo/Stimulus specialist agents'
22
+
23
+ class_option :mcp_server, type: :boolean, default: true,
24
+ desc: 'Include Rails MCP Server for enhanced documentation access'
25
+
21
26
  def analyze_project
22
- say "Analyzing Rails project structure...", :green
27
+ say 'Analyzing Rails project structure...', :green
23
28
  @project_analysis = ClaudeOnRails.analyze_project(Rails.root)
24
-
29
+
25
30
  # Auto-detect features
26
31
  @api_only = options[:api_only] || @project_analysis[:api_only]
27
32
  @has_graphql = options[:graphql] || @project_analysis[:has_graphql]
28
33
  @has_turbo = options[:turbo] && !@api_only
29
34
  @skip_tests = options[:skip_tests]
30
35
  @test_framework = @project_analysis[:test_framework]
31
-
36
+
37
+ # Check for Rails MCP Server
38
+ @include_mcp_server = options[:mcp_server] && ClaudeOnRails::MCPSupport.available?
39
+
32
40
  say "Project type: #{@api_only ? 'API-only' : 'Full-stack Rails'}", :cyan
33
41
  say "Test framework: #{@test_framework}", :cyan if @test_framework
34
42
  say "GraphQL detected: #{@has_graphql ? 'Yes' : 'No'}", :cyan
35
-
43
+ say "Rails MCP Server: #{@include_mcp_server ? 'Available' : 'Not available'}", :cyan
44
+
45
+ # Offer MCP setup if enabled but not available
46
+ offer_mcp_setup if options[:mcp_server] && !@include_mcp_server
47
+
36
48
  # Show which agents will be created
37
49
  say "\nAgents to be created:", :yellow
38
50
  agents.each do |agent|
39
51
  say " - #{agent}", :cyan
40
52
  end
41
53
  end
42
-
54
+
43
55
  def create_swarm_config
44
- say "Generating swarm configuration...", :green
45
- template "swarm.yml.erb", "claude-swarm.yml"
56
+ say 'Generating swarm configuration...', :green
57
+ template 'swarm.yml.erb', 'claude-swarm.yml'
46
58
  end
47
-
59
+
48
60
  def create_claude_md
49
- say "Creating CLAUDE.md configuration...", :green
50
- template "CLAUDE.md.erb", "CLAUDE.md"
61
+ # Always create the ClaudeOnRails context file
62
+ template 'claude_on_rails_context.md', '.claude-on-rails/context.md'
63
+
64
+ if File.exist?('CLAUDE.md')
65
+ say 'CLAUDE.md already exists - adding ClaudeOnRails file reference...', :yellow
66
+
67
+ existing_content = File.read('CLAUDE.md')
68
+
69
+ # Check if file reference already exists
70
+ if existing_content.include?('.claude-on-rails/context.md')
71
+ say 'āœ“ CLAUDE.md already references ClaudeOnRails context', :green
72
+ else
73
+ file_reference = "\n/file:.claude-on-rails/context.md\n"
74
+ append_to_file 'CLAUDE.md', file_reference
75
+ say 'āœ“ Added ClaudeOnRails context reference to existing CLAUDE.md', :green
76
+ end
77
+ else
78
+ say 'Creating CLAUDE.md configuration...', :green
79
+ template 'CLAUDE.md.erb', 'CLAUDE.md'
80
+ end
51
81
  end
52
-
82
+
53
83
  def create_agent_prompts
54
- say "Setting up agent-specific prompts...", :green
55
- directory "prompts", ".claude-on-rails/prompts"
84
+ say 'Setting up agent-specific prompts...', :green
85
+ directory 'prompts', '.claude-on-rails/prompts'
56
86
  end
57
-
87
+
58
88
  def update_gitignore
59
- say "Updating .gitignore...", :green
60
- append_to_file ".gitignore", "\n# ClaudeOnRails\n.claude-on-rails/sessions/\nswarm.log\n"
89
+ say 'Updating .gitignore...', :green
90
+ gitignore_path = Rails.root.join('.gitignore')
91
+
92
+ # Create .gitignore if it doesn't exist
93
+ create_file '.gitignore', '' unless File.exist?(gitignore_path)
94
+
95
+ append_to_file '.gitignore', "\n# ClaudeOnRails\n.claude-on-rails/sessions/\n.claude-swarm/\nclaude-swarm.log\n"
61
96
  end
62
-
97
+
63
98
  def display_next_steps
64
99
  say "\nāœ… ClaudeOnRails swarm configuration created!", :green
65
100
  say "\nNext steps:", :yellow
66
- say "1. Review and customize claude-swarm.yml for your project"
67
- say "2. Start your Rails development swarm:"
68
- say " claude-swarm", :cyan
101
+
102
+ # Remove this section since we now handle it interactively in analyze_project
103
+
104
+ say '1. Review and customize claude-swarm.yml for your project'
105
+ say '2. Start your Rails development swarm:'
106
+ say ' claude-swarm', :cyan
69
107
  say "\nOnce the swarm is running, just describe what you want to build:"
70
108
  say ' > Add user authentication with social login', :cyan
71
109
  say "\nThe swarm will automatically coordinate the implementation across all layers!"
72
110
  end
73
-
111
+
74
112
  private
75
-
113
+
76
114
  def agents
77
115
  @agents ||= build_agent_list
78
116
  end
79
-
117
+
80
118
  def build_agent_list
81
- list = ["architect"]
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"
119
+ list = ['architect']
120
+ list << 'models' if File.directory?(Rails.root.join('app/models'))
121
+ list << 'controllers' if File.directory?(Rails.root.join('app/controllers'))
122
+ list << 'views' if !@api_only && File.directory?(Rails.root.join('app/views'))
123
+ list << 'api' if @api_only && File.directory?(Rails.root.join('app/controllers/api'))
124
+ list << 'graphql' if @has_graphql && File.directory?(Rails.root.join('app/graphql'))
125
+ list << 'stimulus' if @has_turbo && File.directory?(Rails.root.join('app/javascript'))
126
+ list << 'services' if File.directory?(Rails.root.join('app/services'))
127
+ list << 'jobs' if File.directory?(Rails.root.join('app/jobs'))
128
+
129
+ unless @skip_tests
130
+ case @test_framework
131
+ when 'RSpec'
132
+ list << 'tests' if File.directory?(Rails.root.join('spec'))
133
+ when 'Minitest'
134
+ list << 'tests' if File.directory?(Rails.root.join('test'))
96
135
  end
97
136
  end
98
-
99
- list << "devops" if File.directory?(Rails.root.join("config"))
137
+
138
+ list << 'devops' if File.directory?(Rails.root.join('config'))
100
139
  list
101
140
  end
141
+
142
+ def offer_mcp_setup
143
+ say "\nšŸŽÆ Rails MCP Server Enhancement Available!", :yellow
144
+ say "Rails MCP Server provides your AI agents with real-time Rails documentation.", :cyan
145
+
146
+ if yes?("Would you like to set it up now? (Y/n)", :green)
147
+ say "\nStarting Rails MCP Server setup...", :green
148
+ system('bundle exec rake claude_on_rails:setup_mcp')
149
+
150
+ # Re-check availability after setup
151
+ @include_mcp_server = ClaudeOnRails::MCPSupport.available?
152
+
153
+ if @include_mcp_server
154
+ say "\nāœ“ Rails MCP Server is now available!", :green
155
+ else
156
+ say "\nSetup was not completed. Continuing without MCP Server.", :yellow
157
+ end
158
+ else
159
+ say "\nYou can set it up later with: bundle exec rake claude_on_rails:setup_mcp", :cyan
160
+ end
161
+ end
102
162
  end
103
163
  end
104
- end
164
+ end
@@ -1,101 +1,3 @@
1
- # <%= Rails.application.class.module_parent_name %> Rails Development with ClaudeOnRails
1
+ ## ClaudeOnRails Configuration
2
2
 
3
- This project uses ClaudeOnRails to create an intelligent swarm of AI agents specialized in different aspects of Rails development.
4
-
5
- ## Project Overview
6
-
7
- - **Application**: <%= Rails.application.class.module_parent_name %>
8
- - **Rails Version**: <%= Rails.version %>
9
- - **Ruby Version**: <%= RUBY_VERSION %>
10
- - **Type**: <%= @api_only ? 'API-only' : 'Full-stack Rails application' %>
11
- - **Test Framework**: <%= @test_framework || 'Not detected' %>
12
- <% if @has_graphql -%>
13
- - **GraphQL**: Enabled
14
- <% end -%>
15
-
16
- ## How to Use
17
-
18
- Simply describe what you want to build or fix, and the swarm will automatically coordinate the implementation:
19
-
20
- ```bash
21
- # Start the swarm
22
- claude-swarm orchestrate
23
-
24
- # Then just describe your task
25
- claude "Add user authentication with email confirmation"
26
- claude "Optimize the dashboard queries that are running slowly"
27
- claude "Create an API endpoint for mobile app integration"
28
- ```
29
-
30
- ## Swarm Architecture
31
-
32
- The following specialized agents work together to implement your requests:
33
-
34
- - **Architect**: Coordinates all development and makes high-level decisions
35
- - **Models**: Handles ActiveRecord models, migrations, and database design
36
- - **Controllers**: Manages request handling, routing, and controller logic
37
- <% unless @api_only -%>
38
- - **Views**: Creates and maintains views, layouts, and partials
39
- <% end -%>
40
- <% if @api_only -%>
41
- - **API**: Designs RESTful endpoints and handles serialization
42
- <% end -%>
43
- <% if @has_graphql -%>
44
- - **GraphQL**: Manages GraphQL schemas, types, and resolvers
45
- <% end -%>
46
- <% if @has_turbo -%>
47
- - **Stimulus**: Implements interactive features with Stimulus controllers
48
- <% end -%>
49
- - **Services**: Extracts business logic into service objects
50
- - **Jobs**: Handles background processing and async tasks
51
- <% unless @skip_tests -%>
52
- - **Tests**: Ensures comprehensive test coverage with <%= @test_framework %>
53
- <% end -%>
54
- - **DevOps**: Manages deployment and production configurations
55
-
56
- ## Project Conventions
57
-
58
- ### Code Style
59
- - Follow Rails conventions and best practices
60
- - Use RuboCop for Ruby style enforcement
61
- - Prefer clarity over cleverness
62
- - Write self-documenting code
63
-
64
- ### Testing
65
- <% if @test_framework == 'RSpec' -%>
66
- - RSpec for all tests
67
- - Factory Bot for test data
68
- - Request specs for API endpoints
69
- - System specs for user interactions
70
- <% else -%>
71
- - Minitest for all tests
72
- - Fixtures or factories for test data
73
- - Integration tests for user flows
74
- - Unit tests for models and services
75
- <% end -%>
76
-
77
- ### Git Workflow
78
- - Feature branches for new work
79
- - Descriptive commit messages
80
- - PR reviews before merging
81
- - Keep main branch deployable
82
-
83
- ## Custom Patterns
84
-
85
- Add your project-specific patterns and conventions here:
86
-
87
- ```yaml
88
- # Example: Custom service object pattern
89
- Services:
90
- Pattern: Command pattern with Result objects
91
- Location: app/services/
92
- Naming: VerbNoun (e.g., CreateOrder, SendEmail)
93
- Testing: Unit tests with mocked dependencies
94
- ```
95
-
96
- ## Notes
97
-
98
- - This configuration was generated by ClaudeOnRails
99
- - Customize agent prompts in `.claude-on-rails/prompts/`
100
- - Update this file with project-specific conventions
101
- - The swarm learns from your codebase patterns
3
+ You are working on <%= Rails.application.class.module_parent_name %>, a <%= @api_only ? 'Rails API' : 'Rails' %> application. Review the ClaudeOnRails context file at @.claude-on-rails/context.md