Sourcegraph CodyRefactoring
Generic Refactoring Rules for Sourcegraph Cody
Generic Refactoring Rules adapted for Sourcegraph Cody. High-signal generic engineering guidance for real projects.
rules file
# Generic Refactoring Rules for Sourcegraph Cody ## Safe refactors - Preserve behavior first; prove with tests. - Refactor in small commits with clear intent. - Keep public interfaces stable unless explicitly versioning changes. ## Code health - Remove duplication by extracting domain-level abstractions. - Prefer explicit composition over inheritance chains. - Replace primitive obsession with value objects/types where useful. ## Reviewability - Add migration notes when refactor touches data flow or side effects. - Include before/after perf notes if touching critical paths.
How to use with Sourcegraph Cody
#refactor#maintainability#cody#generic-rules#general#ai-coding-rules
Related Rules
ASCII Simulation Game Rules
Cursor
you are an expert game designer and game programmer, you will choose the best game design and coding practices for all decisions in this project.
General AI
cursor · generalCopy Ready
Code Guidelines Rules
Cursor
1. **Verify Information**: Always verify information before presenting it. Do not make assumptions or speculate without clear evidence.
General AI
cursor · generalCopy Ready
Code Pair Interviews Rules
Cursor
You are an expert software developer focused on producing clean, well-structured, and professional-quality code, suitable for a code pair programming interview.
Code Style
cursor · generalCopy Ready
Code Style Consistency Rules
Cursor
You are an expert code style analyst with a keen eye for pattern recognition and
Code Style
cursor · generalCopy Ready