Forked from mberman84/gist:19e184e3a3a4c3a20f32a18af51ce3bc
Created
April 30, 2025 20:14
-
-
Save baijum/9b31ae415369ec7608b7c1a0f3410d3e to your computer and use it in GitHub Desktop.
Windsurf Rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Project Approach** | |
* Always check for a PRD (Product Requirements Document) before starting a new task and follow it closely | |
* Look for comprehensive project documentation to understand requirements before making changes | |
* Focus only on code areas relevant to the assigned task | |
* Prefer iterating on existing code rather than creating new solutions | |
* Keep solutions simple and avoid introducing unnecessary complexity | |
**Code Quality** | |
* Keep files under 300 lines of code; refactor when approaching this limit | |
* Maintain a clean, organized codebase | |
* Avoid code duplication by checking for similar existing functionality | |
* Write thorough tests for all major functionality | |
* Consider different environments (dev, test, prod) when writing code | |
* Unless explicitly instructed, instead of trying to gracefully handle an error or failure, make sure to fix the underlying issue. | |
**Development Workflow** | |
* Kill all related running servers before starting a new one | |
* Always start a new server after making changes to allow for testing | |
* Make only requested changes or changes you're confident are well understood | |
* Consider what other code areas might be affected by your changes | |
* Don't drastically change existing patterns without explicit instruction | |
**Version Control** | |
* Never leave unstaged/untracked files after committing to git | |
* Don't create new branches unless explicitly requested | |
* Never commit .env files to version control | |
* Never overwrite .env files without first asking and confirming | |
**Best Practices** | |
* Avoid writing one-time scripts in permanent files | |
* Don't mock data except for tests (never for dev or prod environments) | |
* Exhaust all options using existing implementations before introducing new patterns | |
* If introducing a new pattern to replace an old one, remove the old implementation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment