mcp-on-rails 0.2.0 โ 0.3.1
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: d00c5baf8c50853434f3c76604316ca0825a2479a7b6292bccbca19f08d4d64e
|
4
|
+
data.tar.gz: 98827e73894aea815e2c587f0ac5f591027d94518cc61734e8d3c7931b52d446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fef158baa8da03b4e6224e00d1f06f3dc315d592409e99643a79d3850d4cfea5658025d424fb46c5919dc63278de161b171a78a568ea15e603cd40b4712ddb5d
|
7
|
+
data.tar.gz: 799052c6cd4d4d62ce38038cb78bebc049585088dfd2310fd113c8633b68c1c7e48771e20d8640f334ebcc381b5fb873f69297c83f47ae1fd09254f07b3cbd51
|
@@ -10,6 +10,60 @@ This Rails project uses **MCP on Rails** configuration located in `.mcp-on-rails
|
|
10
10
|
- **`.mcp-on-rails/prompts/`** - Contains specialized prompts for different Rails components
|
11
11
|
- **`.mcp-on-rails/context.md`** - Project-specific context and information
|
12
12
|
- **`.mcp-on-rails/mcp-config.yml`** - MCP server configuration
|
13
|
+
- **`.mcp-on-rails/specs/`** - Feature specifications and task management
|
14
|
+
|
15
|
+
## Pre-Development Workflow
|
16
|
+
|
17
|
+
### ๐ **MANDATORY: Specification Creation**
|
18
|
+
**Before starting ANY development task**, you MUST create a comprehensive specification in `.mcp-on-rails/specs/` directory:
|
19
|
+
|
20
|
+
1. **Create Project Subdirectory**:
|
21
|
+
```
|
22
|
+
.mcp-on-rails/specs/[feature-name]/
|
23
|
+
```
|
24
|
+
|
25
|
+
2. **Required Documentation Files**:
|
26
|
+
- **`requirement.md`** - Detailed requirements and acceptance criteria
|
27
|
+
- **`design.md`** - Technical design, architecture decisions, and implementation approach
|
28
|
+
- **MANDATORY**: Must query `rails-mcp-server` for latest Rails documentation before writing
|
29
|
+
- **MANDATORY**: Include version-specific Rails patterns and best practices
|
30
|
+
- **MANDATORY**: Reference current Rails guides for security, performance, and conventions
|
31
|
+
- **`tasks.md`** - Step-by-step task breakdown with progress tracking
|
32
|
+
|
33
|
+
3. **Task Management Process**:
|
34
|
+
- Assign appropriate specialist prompts to each task
|
35
|
+
- Update `tasks.md` after completing each step
|
36
|
+
- Mark completed tasks with โ
and timestamp
|
37
|
+
- Document any design changes or decisions
|
38
|
+
|
39
|
+
### ๐ **Rails Documentation Integration**
|
40
|
+
**Always leverage `rails-mcp-server` for up-to-date Rails guidance**:
|
41
|
+
|
42
|
+
1. **During design.md Creation** (MANDATORY):
|
43
|
+
- Query latest Rails documentation for current version patterns
|
44
|
+
- Verify API methods and their parameters
|
45
|
+
- Check for deprecated methods and modern alternatives
|
46
|
+
- Reference security best practices and performance guidelines
|
47
|
+
- Ensure design follows current Rails conventions
|
48
|
+
|
49
|
+
2. **Before Implementation**: Query latest Rails documentation for:
|
50
|
+
- Version-specific syntax and best practices
|
51
|
+
- New features and deprecated methods
|
52
|
+
- Security considerations and performance optimizations
|
53
|
+
|
54
|
+
3. **Stay Current**: Use MCP server to:
|
55
|
+
- Verify Rails conventions for current version
|
56
|
+
- Check for latest gem compatibility
|
57
|
+
- Reference official Rails guides and API documentation
|
58
|
+
- Ensure security best practices compliance
|
59
|
+
|
60
|
+
**Example Specification Structure**:
|
61
|
+
```
|
62
|
+
.mcp-on-rails/specs/user-authentication/
|
63
|
+
โโโ requirement.md # What needs to be built
|
64
|
+
โโโ design.md # How it will be built
|
65
|
+
โโโ tasks.md # Step-by-step implementation plan
|
66
|
+
```
|
13
67
|
|
14
68
|
## Specialized Agent Roles
|
15
69
|
|
@@ -50,6 +104,7 @@ When working on different parts of the Rails application, adopt the appropriate
|
|
50
104
|
- HTML/CSS styling and responsive design
|
51
105
|
- Asset pipeline management
|
52
106
|
- UI components and partials
|
107
|
+
- **MANDATORY**: Playwright MCP testing for view validation and iterative refinement
|
53
108
|
|
54
109
|
### โก **Stimulus Specialist** (JavaScript/Interactivity)
|
55
110
|
**When working in**: `app/javascript/`, Stimulus controllers, Turbo features
|
@@ -121,28 +176,43 @@ Always follow:
|
|
121
176
|
## Implementation Workflow
|
122
177
|
|
123
178
|
### For New Features:
|
124
|
-
1. **
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
179
|
+
1. **๐ Specification** (MANDATORY): Create comprehensive specs in `.mcp-on-rails/specs/[feature-name]/`
|
180
|
+
- Write `requirement.md` with detailed requirements and acceptance criteria
|
181
|
+
- Create `design.md` with technical approach and architecture decisions
|
182
|
+
- Draft `tasks.md` with step-by-step implementation plan
|
183
|
+
2. **๐ Research** (Rails MCP): Query latest Rails documentation for version-specific best practices
|
184
|
+
3. **๐๏ธ Plan** (Architect): Understand requirements and design approach
|
185
|
+
4. **๐๏ธ Model** (Models): Design data structure and relationships
|
186
|
+
5. **๐ฎ Route & Control** (Controllers): Implement HTTP endpoints
|
187
|
+
6. **๐จ Present** (Views): Create user interface
|
188
|
+
- **MANDATORY**: Use `playwright` MCP for view testing and validation
|
189
|
+
- Test UI rendering and interactions iteratively until properly displayed
|
190
|
+
- Verify responsive design and cross-browser compatibility
|
191
|
+
- Fix visual and functional issues identified through Playwright testing
|
192
|
+
7. **โก Enhance** (Stimulus): Add interactive behavior
|
193
|
+
8. **๐ง Process** (Jobs): Handle background tasks if needed
|
194
|
+
9. **๐งช Test** (Tests): Ensure comprehensive coverage
|
195
|
+
10. **๐ Deploy** (DevOps): Configure for production
|
196
|
+
11. **๐ Update**: Mark tasks complete in `tasks.md` with โ
and timestamp
|
132
197
|
|
133
198
|
### For Bug Fixes:
|
134
|
-
1. **
|
135
|
-
2.
|
136
|
-
3.
|
137
|
-
4.
|
138
|
-
5.
|
199
|
+
1. **๐ Document** (MANDATORY): Create spec directory for the fix with problem analysis
|
200
|
+
2. **๐ Research**: Use Rails MCP server for latest debugging techniques and solutions
|
201
|
+
3. **๐งฉ Diagnose**: Identify the problem area
|
202
|
+
4. **๐ Reference**: Check relevant specialist prompt
|
203
|
+
5. **๐ง Fix**: Implement solution following best practices
|
204
|
+
6. **๐งช Test**: Verify fix with appropriate tests
|
205
|
+
7. **๐ Document**: Update specs and relevant documentation
|
139
206
|
|
140
207
|
### For Refactoring:
|
141
|
-
1. **
|
142
|
-
2.
|
143
|
-
3.
|
144
|
-
4.
|
145
|
-
5.
|
208
|
+
1. **๐ Plan** (MANDATORY): Create refactoring spec with current state analysis
|
209
|
+
2. **๐ Research**: Query Rails MCP for modern patterns and best practices
|
210
|
+
3. **๐ง Analyze**: Understand current implementation
|
211
|
+
4. **๐ฏ Design**: Plan improved approach with clear goals
|
212
|
+
5. **๐ Refactor**: Implement changes systematically
|
213
|
+
6. **๐งช Test**: Ensure no regression
|
214
|
+
7. **โก Optimize**: Improve performance where applicable
|
215
|
+
8. **๐ Complete**: Update specs with final implementation details
|
146
216
|
|
147
217
|
## Special Considerations
|
148
218
|
|
@@ -163,15 +233,33 @@ Always follow:
|
|
163
233
|
- Ensure high test coverage
|
164
234
|
- Include integration and system tests
|
165
235
|
- Test edge cases and error conditions
|
236
|
+
- **MANDATORY for Views**: Use `playwright` MCP for comprehensive view testing
|
237
|
+
- Test UI components and interactions until properly rendered
|
238
|
+
- Verify responsive design across different viewports
|
239
|
+
- Validate accessibility and user experience
|
240
|
+
- Iterate testing and fixes until all visual elements work correctly
|
166
241
|
|
167
242
|
## Quick Reference Commands
|
168
243
|
|
169
244
|
When asked to help with Rails development:
|
170
245
|
|
171
|
-
1.
|
172
|
-
2.
|
173
|
-
3.
|
174
|
-
4.
|
175
|
-
5.
|
246
|
+
1. **๐ CREATE SPECS FIRST** (MANDATORY): Always start with `.mcp-on-rails/specs/[feature-name]/` directory creation
|
247
|
+
2. **๐ Query Rails MCP**: Use `rails-mcp-server` to get latest Rails documentation and best practices
|
248
|
+
3. **๐ฏ Identify the area** of work (models, controllers, views, etc.)
|
249
|
+
4. **๐ Reference the appropriate prompt**: "Let me check .mcp-on-rails/prompts/[area].md for best practices"
|
250
|
+
5. **๐ง Apply specialist knowledge** for that area with current Rails version considerations
|
251
|
+
6. **๐ Consider dependencies** and coordination with other areas
|
252
|
+
7. **๐งช Ensure comprehensive testing** and documentation
|
253
|
+
8. **๐ Update progress**: Mark completed tasks in `tasks.md` throughout development
|
254
|
+
|
255
|
+
### Mandatory Pre-Development Checklist:
|
256
|
+
- [ ] Created `.mcp-on-rails/specs/[feature-name]/` directory
|
257
|
+
- [ ] Written comprehensive `requirement.md`
|
258
|
+
- [ ] **MANDATORY**: Queried `rails-mcp-server` for latest Rails documentation and patterns
|
259
|
+
- [ ] **MANDATORY**: Incorporated current Rails version best practices into `design.md`
|
260
|
+
- [ ] Designed technical approach in `design.md` with up-to-date Rails guidance
|
261
|
+
- [ ] Planned step-by-step tasks in `tasks.md`
|
262
|
+
- [ ] Assigned appropriate specialist prompts to each task
|
263
|
+
- [ ] **For View Components**: Prepared to use `playwright` MCP for iterative testing and refinement
|
176
264
|
|
177
|
-
Remember: You are part of a coordinated development team. Always
|
265
|
+
Remember: You are part of a coordinated development team with a structured specification-driven approach. Always create comprehensive documentation before coding, leverage the Rails MCP server for up-to-date guidance, and use Playwright MCP for thorough view testing. Maintain consistency with Rails conventions and project standards.
|
@@ -9,6 +9,7 @@ You are a Rails views and frontend specialist working in the app/views directory
|
|
9
9
|
3. **Helper Methods**: Implement view helpers for clean templates
|
10
10
|
4. **Frontend Architecture**: Organize views following Rails conventions
|
11
11
|
5. **Responsive Design**: Ensure views work across devices
|
12
|
+
6. **MANDATORY Testing**: Use Playwright MCP for comprehensive view testing and validation
|
12
13
|
|
13
14
|
## View Best Practices
|
14
15
|
|
@@ -117,4 +118,48 @@ If the project uses Hotwire:
|
|
117
118
|
- Create Stimulus controllers
|
118
119
|
- Keep interactions smooth
|
119
120
|
|
120
|
-
|
121
|
+
## MANDATORY: Playwright MCP Testing
|
122
|
+
|
123
|
+
**Every view component MUST be tested using Playwright MCP before completion:**
|
124
|
+
|
125
|
+
### ๐งช **Testing Workflow**
|
126
|
+
1. **Initial Render Test**: Verify basic view rendering
|
127
|
+
```
|
128
|
+
Use Playwright MCP to take screenshots and verify layout
|
129
|
+
```
|
130
|
+
|
131
|
+
2. **Interactive Testing**: Test all user interactions
|
132
|
+
- Form submissions and validations
|
133
|
+
- Button clicks and navigation
|
134
|
+
- Dynamic content updates
|
135
|
+
- AJAX/Turbo interactions
|
136
|
+
|
137
|
+
3. **Responsive Design Validation**:
|
138
|
+
- Test across multiple viewport sizes
|
139
|
+
- Verify mobile, tablet, and desktop layouts
|
140
|
+
- Check touch interactions on mobile devices
|
141
|
+
|
142
|
+
4. **Cross-Browser Testing**:
|
143
|
+
- Test in different browsers (Chrome, Firefox, Safari)
|
144
|
+
- Verify consistent rendering and functionality
|
145
|
+
|
146
|
+
5. **Accessibility Testing**:
|
147
|
+
- Check keyboard navigation
|
148
|
+
- Verify screen reader compatibility
|
149
|
+
- Validate ARIA labels and semantic HTML
|
150
|
+
|
151
|
+
### ๐ **Iterative Testing Process**
|
152
|
+
- **Test โ Identify Issues โ Fix โ Re-test**
|
153
|
+
- Continue until ALL visual and functional elements work correctly
|
154
|
+
- Document any browser-specific fixes or workarounds
|
155
|
+
- Ensure performance is acceptable across all tested scenarios
|
156
|
+
|
157
|
+
### ๐ **Testing Documentation**
|
158
|
+
For each view component, document:
|
159
|
+
- Screenshots of successful renders
|
160
|
+
- List of tested interactions
|
161
|
+
- Browser compatibility notes
|
162
|
+
- Performance observations
|
163
|
+
- Accessibility compliance status
|
164
|
+
|
165
|
+
Remember: Views should be clean, semantic, and focused on presentation. Business logic belongs in models or service objects, not in views. **ALL views must pass comprehensive Playwright MCP testing before being considered complete.**
|
data/lib/mcp/on/rails/version.rb
CHANGED