RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/levifig/rails-instructions

Cursor rule

.cursor/rules/guidelines.mdc

Code Patterns & Guidelines

Cursor rules

Quality

71/100

Scores the file, not the repository.

Length

458 words

22 headings · 0 code blocks

Repository

54

— · pushed 410 days ago

Last changed

3 days ago

First indexed 3 days ago.
levifig/rails-instructions/.cursor/rules/guidelines.mdcRawGitHub
1---
2description: Code Patterns & Guidelines
3globs:
4alwaysApply: true
5---
6 
7# Cursor AI Assistant Rules
8 
9## Assistant Behavior
10 
11- Be terse and direct in responses
12- Ask clarifying questions before implementing complex features
13- Anticipate needs and suggest improvements proactively
14- Focus on high-quality, production-ready code
15- Use analogies when explaining complex concepts
16 
17## Code Generation Principles
18 
19### Quality Standards
20- Generate code that could ship to production
21- Follow established patterns in the codebase
22- Maintain consistency with existing architecture
23- Every piece of code should be testable
24- Documentation is not optional
25 
26### Style Guidelines
27- Respect .prettierrc and linting configurations
28- Prefer clarity over cleverness
29- Use descriptive names that reveal intent
30- Keep line lengths reasonable
31- Consistent indentation and formatting
32 
33### Architecture Focus
34- Think in systems, not just functions
35- Consider scalability implications
36- Design for maintainability
37- Separate concerns appropriately
38- Make dependencies explicit
39 
40## Project Awareness
41 
42### Context Loading
43Always check for `.cursor/PROJECT_CONTEXT.md` which contains:
44- Current architectural patterns
45- Technology stack decisions
46- Team conventions and preferences
47- Recent design decisions
48- Performance considerations
49- Known technical debt
50 
51### File Organization
52- Follow existing project structure
53- Keep related code together
54- Use standard naming conventions
55- Maintain clear module boundaries
56 
57## Code Patterns
58 
59### Error Handling
60- Fail fast with clear messages
61- Use appropriate error types
62- Handle errors at the right level
63- Provide actionable error messages
64- Log errors appropriately
65 
66### Testing Approach
67- Write tests alongside implementation
68- Test edge cases explicitly
69- Use descriptive test names
70- Keep tests simple and focused
71- Mock external dependencies
72 
73### Documentation
74- Document why, not what
75- Include examples for complex APIs
76- Keep docs in sync with code
77- Use consistent documentation format
78- Document assumptions and constraints
79 
80## Language-Specific Rules
81 
82### Ruby on Rails
83Refer to `rails-rules.md` for:
84- Rails conventions and patterns
85- ActiveRecord best practices
86- Testing with RSpec
87- API design guidelines
88 
89 
90## Performance & Security
91 
92### Performance
93- Consider algorithmic complexity
94- Profile before optimizing
95- Cache strategically
96- Use appropriate data structures
97- Avoid premature optimization
98 
99### Security
100- Sanitize all inputs
101- Use secure defaults
102- Follow OWASP guidelines
103- Never expose sensitive data
104- Keep dependencies updated
105 
106## AI Assistant Guidelines
107 
108### When Generating Code
1091. Check `PROJECT_CONTEXT.md` first
1102. Follow existing patterns in codebase
1113. Include appropriate tests
1124. Add necessary documentation
1135. Consider edge cases
114 
115### When Explaining Concepts
116- Use clear analogies
117- Provide concrete examples
118- Link to authoritative sources
119- Keep explanations concise
120- Focus on practical application
121 
122### When Suggesting Improvements
123- Consider the bigger picture
124- Propose incremental changes
125- Explain trade-offs clearly
126- Respect existing constraints
127- Suggest best-in-class solutions
128 
129---
130 
131*Note: Language-specific and PROJECT_CONTEXT rules override these defaults.*
132 

Commands it names

  • rails-rules.md

Sections

  • Cursor AI Assistant Rules
  • Assistant Behavior
  • Code Generation Principles
  • Quality Standards
  • Style Guidelines
  • Architecture Focus
  • Project Awareness
  • Context Loading
  • File Organization
  • Code Patterns
  • Error Handling
  • Testing Approach
  • Documentation
  • Language-Specific Rules
  • Ruby on Rails
  • Performance & Security
  • Performance
  • Security
  • AI Assistant Guidelines
  • When Generating Code
  • When Explaining Concepts
  • When Suggesting Improvements

What it covers

testcode-styletesting-strategysecurityperformancedo-notagent-behaviourdocs

Glob targeting

  • [object Object]

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
levifig
Language
—
License
—
Archived
no

All configs in this repo

Also in levifig/rails-instructions

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
levifig/rails-instructions.github/instructions/rails-core.instructions.md · 54Copilot instructionsunclassifiedteststylearchtesting-strategy+568/1003 days ago
levifig/rails-instructions.cursor/rules/rails-rules.mdc · 54Cursor rulesunclassifiedtestlint-formatstylearch+984/1003 days ago
levifig/rails-instructions.github/copilot-instructions.md · 54Copilot instructionsunclassifiedteststyletesting-strategysecurity+471/1003 days ago
levifig/rails-instructions.github/instructions/rails-api.instructions.md · 54Copilot instructionsunclassifiedtestlint-formatstyletesting-strategy+767/1003 days ago
levifig/rails-instructions.github/instructions/rails-background-jobs.instructions.md · 54Copilot instructionsunclassifiedteststyletesting-strategydatabase+263/1003 days ago
levifig/rails-instructions.github/instructions/rails-controllers.instructions.md · 54Copilot instructionsunclassifiedteststylesecurityapi+156/1003 days ago
levifig/rails-instructions.github/instructions/rails-deployment.instructions.md · 54Copilot instructionsunclassifiedsetupstylesecuritydatabase+252/1003 days ago
levifig/rails-instructions.github/instructions/rails-hotwire.instructions.md · 54Copilot instructionsunclassifiedteststylesecurityperformance+156/1003 days ago
levifig/rails-instructions.github/instructions/rails-importmaps.instructions.md · 54Copilot instructionsunclassifiedteststylesecuritydatabase+256/1003 days ago
levifig/rails-instructions.github/instructions/rails-mobile.instructions.md · 54Copilot instructionsunclassifiedstyleuiperformance66/1003 days ago
levifig/rails-instructions.github/instructions/rails-models.instructions.md · 54Copilot instructionsunclassifiedteststylearchtypes+460/1003 days ago
levifig/rails-instructions.github/instructions/rails-performance.instructions.md · 54Copilot instructionsunclassifiedteststylegitdatabase+256/1003 days ago
levifig/rails-instructions.github/instructions/rails-security.instructions.md · 54Copilot instructionsunclassifiedteststylesecuritydependencies+363/1003 days ago
levifig/rails-instructions.github/instructions/rails-services.instructions.md · 54Copilot instructionsunclassifiedteststylearchtesting-strategy+475/1003 days ago
levifig/rails-instructions.github/instructions/rails-styling.instructions.md · 54Copilot instructionsunclassifiedstyledatabaseuiperformance+359/1003 days ago
levifig/rails-instructions.github/instructions/rails-testing.instructions.md · 54Copilot instructionsunclassifiedteststyletesting-strategysecurity+256/1003 days ago
levifig/rails-instructions.github/instructions/rails-views.instructions.md · 54Copilot instructionsunclassifiedteststylearchsecurity+360/1003 days ago
levifig/rails-instructions.github/instructions/rails.instructions.md · 54Copilot instructionsunclassifiedtestlint-formatstylearch+984/1003 days ago
Diff against .github/instructions/rails-core.instructions.md Diff against .cursor/rules/rails-rules.mdc Diff against .github/copilot-instructions.md Diff against .github/instructions/rails-api.instructions.md Diff against .github/instructions/rails-background-jobs.instructions.md Diff against .github/instructions/rails-controllers.instructions.md Diff against .github/instructions/rails-deployment.instructions.md Diff against .github/instructions/rails-hotwire.instructions.md Diff against .github/instructions/rails-importmaps.instructions.md Diff against .github/instructions/rails-mobile.instructions.md Diff against .github/instructions/rails-models.instructions.md Diff against .github/instructions/rails-performance.instructions.md Diff against .github/instructions/rails-security.instructions.md Diff against .github/instructions/rails-services.instructions.md Diff against .github/instructions/rails-styling.instructions.md Diff against .github/instructions/rails-testing.instructions.md Diff against .github/instructions/rails-views.instructions.md Diff against .github/instructions/rails.instructions.md
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack