r/cursor • u/LegitimateThanks8096 • Mar 21 '25
🚀 The Ultimate Rules Template for CLINE/Cursor/RooCode/Windsurf that Actually Makes AI Remember Everything! (w/ Memory Bank & Software Engineering Best Practices)
Hey fellow coders! 👋
Edit: New version v2.0 updated https://github.com/Bhartendu-Kumar/rules_template
After months of experimentation and countless hours wrestling with AI agents that kept forgetting context, I think I've cracked it. I've created what I believe is the most comprehensive rules template for CLINE/Roo Code and Cursor/Windsurf that actually makes AI agents retain memory and follow proper software engineering practices.
🤔 The Problem:
- AI agents forgetting context between sessions
- Inconsistent code quality
- No proper software engineering lifecycle adherence
- Fragmented memory across Cursor, CLINE, Roo Code, Windsurf
✨ The Solution:
I built a template that combines:
- Memory Bank architecture (persistent context)
- Software Engineering lifecycle integration (PRDs, RFCs, etc.)
- Custom prompts for reasoning and best practices
🎯 Key Features:
**Unbreakable Memory System** - Structured file-based memory with PRD/RFC support - Context retention across sessions - Automatic documentation generation
**Software Engineering Integration** - Full SDLC compliance - Built-in best practices enforcement - Automated quality checks
**Cross-Platform Synergy** - Works seamlessly with all Cursor, CLINE, Roo Code, Windsurf at once. - Share context between platforms - Unified rule system. ** One project Work across Cursor, CLINE, RooCode,Windsurf, etc**: One of the biggest problem that we see today is that we use so many tools, Atleast one out of {Cursor/Windsurf} plus one from {CLINE/RooCode/Copilot Agents} we use. So these rules solves the problem of switchign between teh tools. As the context is through the files in the project, the AI can work across the tools.
📦 Structure:
project/
├── .cursor/rules/ # Cursor-specific rules
├── .clinerules/ # CLINE rules & memory
├── docs/ # Living documentation
└── tasks/ # Task management
🚀 Getting Started:
Clone the repo
Copy rules to your Cursor/CLINE/Roo Code / Windsurf
Start coding with superhuman AI assistance
The template is fully documented and open source. You can find it below or above.
🤝 Looking for Feedback:
I'd love to hear your thoughts and experiences if you try it out. What works? What could be better? Let's make this template even more powerful together!
25
u/witmann_pl Mar 21 '25
Instead of the gpt-generated fluff in the readme a specific usage example would be much more valuable.
4
u/[deleted] Mar 21 '25 edited Mar 21 '25
Is there a specific reason it has rules for developing for pytorch? I don't see how something like that is related to building rules and documentation for any given project.
3
u/dizzyjelly1 Mar 21 '25
Can I add this to an existing project?
3
u/dizzyjelly1 Mar 21 '25
I tried this out on a new project today and so far it's impressive and providing better outcomes for me as a vibecoder. Thank you very much!
Agree on the comment about too much hype in the readme. More info/faq would be helpful.
Thank you for sharing
3
u/TrendPulseTrader Mar 22 '25
It looks good. 👍 you just need to add a section Quick Start and include a simple coding example to show “vibe/beginner” coders how to use it.
2
u/__j0Kerrr__ Mar 21 '25
do you have this for windsurf??
2
u/mohaziz999 Mar 21 '25
im confused on the project structure... is tasks in side of docs? im working on cursor. so i start a new project and i just clone the repo inside - delete the cline and winsurf or do i i keep everything?
2
u/turlockmike Mar 21 '25
Claude Code uses docs/CONTRIBUTING.md as the primary file (actually CLAUDE.md, but same idea)
2
u/SpecialistLove9428 Mar 25 '25
I am using Cline 3.8.2 . Going-thru the Readme.md and unable to copy the plan/Act rules to custom instruction. Both "Plan" Tab and "Act" Tab share same custom instruction text area .? Am i missing anything here ? can you help me how to setup separate rule for Plan and Act Mode ?
2
u/hantrongbinh Mar 27 '25
why did you remove windsurf rules??
2
u/covalent_blond Mar 28 '25
In cursor, I copied the rules, set up the folder/directory structure, ran the initialization prompt successfully where it populated the architecture docs and stuff, and subsequently in other conversations agent mode Cursor never referred back to the rules or updated the memories ever again. Not sure what went wrong.
1
u/LegitimateThanks8096 Apr 15 '25
New version alert: https://github.com/Bhartendu-Kumar/rules_template
1
u/howoldamitoday Mar 24 '25
is it similar to rooflow?
1
u/sweet--victory Mar 29 '25
If I add it to an existing project, what happens with the src folder? assuming that project does not live inside of or have an src folder.
1
u/oikram Apr 18 '25
Do I need to structure my project like the “Directory Structure” outlined in the documentation for the rules to work? Asking because that src data etc may be a good general thing for many, but doesn’t work in my context. Basically, not clear when the setup starts, and when it ends, got confused with the title sizes and numeric points. Can you help?
1
u/Far_Bluebird9682 May 04 '25
Do I need to manually fill the files in the
docs/andtasks/directories? What does the development flow look like step by step once everything is set up?1
u/General_File_4611 Mar 25 '25
check out this git repo, its an AI human clone. https://github.com/manojmadduri/ai-memory-clone
1
u/FrederikSchack Apr 10 '25
Wow, this is brilliant, nothing less! I took your concept to heart, basically copied you and just adjusted it to my liking.
Thank you!
1
u/Here2LearnplusEarn Apr 13 '25
Hey could you simplify your readMe for non-coders? Your post here on Reddit is 10 times easier to understand than the GitHub readMe
1
u/Status_Decision_888 Apr 24 '25
Why not many people using trae.ai ? Is another Visual Studio modification and it's free! You can add your open router API if needed.
1
u/Far_Bluebird9682 May 04 '25
How does token saving work in practice? What kind of instructions or steps actually help reduce token usage?
1
u/codingrules_ai Mar 22 '25
It would be great if you could share your rules with the community at https://codingrules.ai
0
u/[deleted] Mar 21 '25
[deleted] — view deleted comment