mcp-on-rails 0.3.1 โ 0.3.2
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 +5 -0
- data/lib/mcp/on/rails/templates/copilot-instructions.md +41 -3
- data/lib/mcp/on/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7145979c731192cebf86b91cdf29a8e9abc4704002ef0a353dd3d468e4288a26
|
4
|
+
data.tar.gz: 90bfef4c67f2079c7fb4706403cc7c14a93db322fd3285960981d465c02ac814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a631e46399eea8a614d2f2b1003260e68ca8f8bd1211e9d7157863d4b4554f0836c754bba9f5391cfd984fe8348cb44dad56f983afb5cd4d55800e0a2708080
|
7
|
+
data.tar.gz: f30fd3669e3bf12b4a3aea1298cd16612bafd91c0667b61115cbb79a066247c80637b60b43ea5b6d1af114b5a91854f38d64b79aa2709de99f5843237cc01093
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,7 @@ You are working with a Rails project that has been configured with MCP on Rails,
|
|
7
7
|
This Rails project uses **MCP on Rails** configuration located in `.mcp-on-rails/` directory. Always reference the specialized prompts and context when helping with development tasks.
|
8
8
|
|
9
9
|
### Key Directories and Their Purpose:
|
10
|
+
|
10
11
|
- **`.mcp-on-rails/prompts/`** - Contains specialized prompts for different Rails components
|
11
12
|
- **`.mcp-on-rails/context.md`** - Project-specific context and information
|
12
13
|
- **`.mcp-on-rails/mcp-config.yml`** - MCP server configuration
|
@@ -15,17 +16,20 @@ This Rails project uses **MCP on Rails** configuration located in `.mcp-on-rails
|
|
15
16
|
## Pre-Development Workflow
|
16
17
|
|
17
18
|
### ๐ **MANDATORY: Specification Creation**
|
19
|
+
|
18
20
|
**Before starting ANY development task**, you MUST create a comprehensive specification in `.mcp-on-rails/specs/` directory:
|
19
21
|
|
20
|
-
1. **Create Project Subdirectory**:
|
22
|
+
1. **Create Project Subdirectory**:
|
23
|
+
|
21
24
|
```
|
22
25
|
.mcp-on-rails/specs/[feature-name]/
|
23
26
|
```
|
24
27
|
|
25
28
|
2. **Required Documentation Files**:
|
29
|
+
|
26
30
|
- **`requirement.md`** - Detailed requirements and acceptance criteria
|
27
31
|
- **`design.md`** - Technical design, architecture decisions, and implementation approach
|
28
|
-
- **MANDATORY**: Must query `rails-mcp-server` for latest Rails documentation before writing
|
32
|
+
- **MANDATORY**: Must query `rails-mcp-server` for latest Rails documentation(and `context7` for relevant context) before writing
|
29
33
|
- **MANDATORY**: Include version-specific Rails patterns and best practices
|
30
34
|
- **MANDATORY**: Reference current Rails guides for security, performance, and conventions
|
31
35
|
- **`tasks.md`** - Step-by-step task breakdown with progress tracking
|
@@ -37,9 +41,11 @@ This Rails project uses **MCP on Rails** configuration located in `.mcp-on-rails
|
|
37
41
|
- Document any design changes or decisions
|
38
42
|
|
39
43
|
### ๐ **Rails Documentation Integration**
|
44
|
+
|
40
45
|
**Always leverage `rails-mcp-server` for up-to-date Rails guidance**:
|
41
46
|
|
42
47
|
1. **During design.md Creation** (MANDATORY):
|
48
|
+
|
43
49
|
- Query latest Rails documentation for current version patterns
|
44
50
|
- Verify API methods and their parameters
|
45
51
|
- Check for deprecated methods and modern alternatives
|
@@ -47,6 +53,7 @@ This Rails project uses **MCP on Rails** configuration located in `.mcp-on-rails
|
|
47
53
|
- Ensure design follows current Rails conventions
|
48
54
|
|
49
55
|
2. **Before Implementation**: Query latest Rails documentation for:
|
56
|
+
|
50
57
|
- Version-specific syntax and best practices
|
51
58
|
- New features and deprecated methods
|
52
59
|
- Security considerations and performance optimizations
|
@@ -58,6 +65,7 @@ This Rails project uses **MCP on Rails** configuration located in `.mcp-on-rails
|
|
58
65
|
- Ensure security best practices compliance
|
59
66
|
|
60
67
|
**Example Specification Structure**:
|
68
|
+
|
61
69
|
```
|
62
70
|
.mcp-on-rails/specs/user-authentication/
|
63
71
|
โโโ requirement.md # What needs to be built
|
@@ -70,36 +78,44 @@ This Rails project uses **MCP on Rails** configuration located in `.mcp-on-rails
|
|
70
78
|
When working on different parts of the Rails application, adopt the appropriate specialist role and reference the corresponding prompt file:
|
71
79
|
|
72
80
|
### ๐๏ธ **Architect Role** (Overall coordination)
|
81
|
+
|
73
82
|
**When to use**: Project-wide decisions, architecture planning, feature coordination
|
74
83
|
**Reference**: `.mcp-on-rails/prompts/architect.md`
|
75
|
-
**Focus**:
|
84
|
+
**Focus**:
|
85
|
+
|
76
86
|
- Coordinate implementation across multiple components
|
77
87
|
- Make high-level architectural decisions
|
78
88
|
- Ensure consistency across the application
|
79
89
|
- Plan complex features that span multiple areas
|
80
90
|
|
81
91
|
### ๐๏ธ **Models Specialist** (Data layer)
|
92
|
+
|
82
93
|
**When working in**: `app/models/`, `db/migrate/`, database-related tasks
|
83
94
|
**Reference**: `.mcp-on-rails/prompts/models.md`
|
84
95
|
**Focus**:
|
96
|
+
|
85
97
|
- ActiveRecord models, associations, validations
|
86
98
|
- Database migrations and schema design
|
87
99
|
- Query optimization and performance
|
88
100
|
- Data integrity and constraints
|
89
101
|
|
90
102
|
### ๐ฎ **Controllers Specialist** (HTTP handling)
|
103
|
+
|
91
104
|
**When working in**: `app/controllers/`, routing, APIs
|
92
105
|
**Reference**: `.mcp-on-rails/prompts/controllers.md`
|
93
106
|
**Focus**:
|
107
|
+
|
94
108
|
- RESTful controllers and routing
|
95
109
|
- Authentication and authorization
|
96
110
|
- API design and implementation
|
97
111
|
- Request/response handling
|
98
112
|
|
99
113
|
### ๐จ **Views Specialist** (Frontend/UI)
|
114
|
+
|
100
115
|
**When working in**: `app/views/`, `app/assets/`, frontend components
|
101
116
|
**Reference**: `.mcp-on-rails/prompts/views.md`
|
102
117
|
**Focus**:
|
118
|
+
|
103
119
|
- ERB templates and layouts
|
104
120
|
- HTML/CSS styling and responsive design
|
105
121
|
- Asset pipeline management
|
@@ -107,36 +123,44 @@ When working on different parts of the Rails application, adopt the appropriate
|
|
107
123
|
- **MANDATORY**: Playwright MCP testing for view validation and iterative refinement
|
108
124
|
|
109
125
|
### โก **Stimulus Specialist** (JavaScript/Interactivity)
|
126
|
+
|
110
127
|
**When working in**: `app/javascript/`, Stimulus controllers, Turbo features
|
111
128
|
**Reference**: `.mcp-on-rails/prompts/stimulus.md`
|
112
129
|
**Focus**:
|
130
|
+
|
113
131
|
- Stimulus.js controllers and targets
|
114
132
|
- Turbo Drive, Frames, and Streams
|
115
133
|
- JavaScript behavior and DOM manipulation
|
116
134
|
- Progressive enhancement
|
117
135
|
|
118
136
|
### ๐ง **Jobs Specialist** (Background processing)
|
137
|
+
|
119
138
|
**When working in**: `app/jobs/`, background tasks, queues
|
120
139
|
**Reference**: `.mcp-on-rails/prompts/jobs.md`
|
121
140
|
**Focus**:
|
141
|
+
|
122
142
|
- ActiveJob background processing
|
123
143
|
- Queue management and scheduling
|
124
144
|
- Async task implementation
|
125
145
|
- Performance optimization for background work
|
126
146
|
|
127
147
|
### ๐งช **Tests Specialist** (Quality assurance)
|
148
|
+
|
128
149
|
**When working in**: `test/`, `spec/`, testing-related tasks
|
129
150
|
**Reference**: `.mcp-on-rails/prompts/tests.md`
|
130
151
|
**Focus**:
|
152
|
+
|
131
153
|
- Comprehensive test coverage
|
132
154
|
- Test-driven development (TDD)
|
133
155
|
- Factory and fixture management
|
134
156
|
- Integration and system tests
|
135
157
|
|
136
158
|
### ๐ **DevOps Specialist** (Infrastructure/Deployment)
|
159
|
+
|
137
160
|
**When working in**: `config/`, deployment, infrastructure
|
138
161
|
**Reference**: `.mcp-on-rails/prompts/devops.md`
|
139
162
|
**Focus**:
|
163
|
+
|
140
164
|
- Application configuration and environments
|
141
165
|
- Docker, CI/CD, and deployment strategies
|
142
166
|
- Performance monitoring and optimization
|
@@ -145,21 +169,27 @@ When working on different parts of the Rails application, adopt the appropriate
|
|
145
169
|
## How to Work with This Project
|
146
170
|
|
147
171
|
### 1. **Always Check Context First**
|
172
|
+
|
148
173
|
Before starting any task, review:
|
174
|
+
|
149
175
|
```
|
150
176
|
- .mcp-on-rails/context.md for project-specific information
|
151
177
|
- .mcp-on-rails/prompts/[relevant-area].md for specialized guidance
|
152
178
|
```
|
153
179
|
|
154
180
|
### 2. **Multi-Agent Coordination**
|
181
|
+
|
155
182
|
For complex features that span multiple areas:
|
183
|
+
|
156
184
|
1. Start with the **Architect** role to plan the implementation
|
157
185
|
2. Break down tasks for appropriate specialists
|
158
186
|
3. Ensure consistency across all components
|
159
187
|
4. Always include comprehensive tests
|
160
188
|
|
161
189
|
### 3. **Rails Best Practices**
|
190
|
+
|
162
191
|
Always follow:
|
192
|
+
|
163
193
|
- Rails conventions and naming patterns
|
164
194
|
- RESTful design principles
|
165
195
|
- Security best practices
|
@@ -167,6 +197,7 @@ Always follow:
|
|
167
197
|
- Comprehensive test coverage
|
168
198
|
|
169
199
|
### 4. **Code Quality Standards**
|
200
|
+
|
170
201
|
- Write clean, readable, and maintainable code
|
171
202
|
- Follow Ruby and Rails style guides
|
172
203
|
- Include proper documentation and comments
|
@@ -176,6 +207,7 @@ Always follow:
|
|
176
207
|
## Implementation Workflow
|
177
208
|
|
178
209
|
### For New Features:
|
210
|
+
|
179
211
|
1. **๐ Specification** (MANDATORY): Create comprehensive specs in `.mcp-on-rails/specs/[feature-name]/`
|
180
212
|
- Write `requirement.md` with detailed requirements and acceptance criteria
|
181
213
|
- Create `design.md` with technical approach and architecture decisions
|
@@ -196,6 +228,7 @@ Always follow:
|
|
196
228
|
11. **๐ Update**: Mark tasks complete in `tasks.md` with โ
and timestamp
|
197
229
|
|
198
230
|
### For Bug Fixes:
|
231
|
+
|
199
232
|
1. **๐ Document** (MANDATORY): Create spec directory for the fix with problem analysis
|
200
233
|
2. **๐ Research**: Use Rails MCP server for latest debugging techniques and solutions
|
201
234
|
3. **๐งฉ Diagnose**: Identify the problem area
|
@@ -205,6 +238,7 @@ Always follow:
|
|
205
238
|
7. **๐ Document**: Update specs and relevant documentation
|
206
239
|
|
207
240
|
### For Refactoring:
|
241
|
+
|
208
242
|
1. **๐ Plan** (MANDATORY): Create refactoring spec with current state analysis
|
209
243
|
2. **๐ Research**: Query Rails MCP for modern patterns and best practices
|
210
244
|
3. **๐ง Analyze**: Understand current implementation
|
@@ -217,18 +251,21 @@ Always follow:
|
|
217
251
|
## Special Considerations
|
218
252
|
|
219
253
|
### Security First
|
254
|
+
|
220
255
|
- Always validate user input
|
221
256
|
- Implement proper authentication/authorization
|
222
257
|
- Follow Rails security guidelines
|
223
258
|
- Use strong parameters and CSRF protection
|
224
259
|
|
225
260
|
### Performance Matters
|
261
|
+
|
226
262
|
- Optimize database queries (avoid N+1)
|
227
263
|
- Use appropriate caching strategies
|
228
264
|
- Monitor and profile performance
|
229
265
|
- Consider background processing for heavy tasks
|
230
266
|
|
231
267
|
### Test Everything
|
268
|
+
|
232
269
|
- Write tests before implementing features (TDD)
|
233
270
|
- Ensure high test coverage
|
234
271
|
- Include integration and system tests
|
@@ -253,6 +290,7 @@ When asked to help with Rails development:
|
|
253
290
|
8. **๐ Update progress**: Mark completed tasks in `tasks.md` throughout development
|
254
291
|
|
255
292
|
### Mandatory Pre-Development Checklist:
|
293
|
+
|
256
294
|
- [ ] Created `.mcp-on-rails/specs/[feature-name]/` directory
|
257
295
|
- [ ] Written comprehensive `requirement.md`
|
258
296
|
- [ ] **MANDATORY**: Queried `rails-mcp-server` for latest Rails documentation and patterns
|
data/lib/mcp/on/rails/version.rb
CHANGED