Class: RubyAiGemContext::Platforms::Windsurf
Class Method Summary
collapse
backup, exists?, full_path, path, read, write
Class Method Details
.description ⇒ Object
15
16
17
|
# File 'lib/ruby_ai_gem_context/platforms/windsurf.rb', line 15
def description
"Windsurf IDE - Project rules file"
end
|
.filename ⇒ Object
11
12
13
|
# File 'lib/ruby_ai_gem_context/platforms/windsurf.rb', line 11
def filename
".windsurfrules"
end
|
.generation_prompt ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/ruby_ai_gem_context/platforms/windsurf.rb', line 19
def generation_prompt
<<~PROMPT
Generate a .windsurfrules file for this Ruby project. This file tells Windsurf AI how to work with this codebase.
Structure it as clear rules and guidelines:
1. Project context - What this project is
2. Language and framework details
3. Code conventions to follow
4. Architecture patterns
5. Testing requirements
6. Important files and their purposes
7. Commands for common tasks
8. Pitfalls and things to avoid
Write in a direct, instructional style. Focus on actionable guidance.
PROMPT
end
|
.name ⇒ Object
7
8
9
|
# File 'lib/ruby_ai_gem_context/platforms/windsurf.rb', line 7
def name
"Windsurf"
end
|
.template ⇒ Object
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# File 'lib/ruby_ai_gem_context/platforms/windsurf.rb', line 38
def template
<<~TEMPLATE
# Project Context
This is a Ruby project. Describe its purpose here.
# Language & Framework
- Ruby 3.x
- Add frameworks used (Rails, Sinatra, etc.)
- Key gems and their purposes
# Code Conventions
- Follow Ruby style guide
- Use snake_case for methods/variables
- Use CamelCase for classes/modules
- Document public APIs with YARD
# Architecture
- Describe the overall structure
- Key patterns used
- How components interact
# Testing
- RSpec for unit tests
- Run with: bundle exec rspec
- Write tests for all new code
# Important Files
- lib/ - Main code
- spec/ - Tests
- Gemfile - Dependencies
# Common Commands
- bundle install - Install dependencies
- bundle exec rspec - Run tests
- bundle exec rubocop - Run linter
# Pitfalls
- Things to watch out for
- Common mistakes in this codebase
TEMPLATE
end
|