Rules for ultra context, memories, lessons, scratchpad with plan and act modes

Comprehensive Guide to AI Context Rules System

Introduction

This guide provides a detailed explanation of the AI Context Rules System, designed to enhance your development workflow in Cursor. The system combines memory management, lessons tracking, and a dual-mode operation system to ensure consistent and reliable AI interactions.

First, you need to create a complete project requirement, and it has a roadmap on it like it has a phase and this is up to you for what format do you want the as long as it has a phase.

Example:

Then after that you need to prompt a plan the keyword is “plan” to automatically edit/update the scratchpad file and put your requests into a planned setup.

Example:

Then it will automatically fetch the 2 mdc rules and it will start to edit the scratchpad


as you can see it will edit as soon as possible when you query it

This is the structure on the scratchpad after you edit it

It looks amazing right?

Then after that you can use a keyword, mine is [mems] for triggering the memory manually this is for non-development or for important details because I don’t want to make my memory to full immediately, and the automatic will trigger if it’s implementations or development mode only (you can adjust this for you preference).

Examples:

The lesson learned you will trigger it manually and automatically, it will trigger automatically if there’s an important and reusable information that will help you in the future or if there’s a problem, issues, bug, fixing that is encounter it will automatically trigger that to update/add the lesson learned file. for manually update it you can just prompt it to update the and capture all of the important details.

Examples:

This is the update for memories

Tips & Tricks

Add all of the files for rules and .cursor/*.md files to context the rules and automatic fetching rules

!!you will include all of the md files and mdc files on context window!!

Handling AI Hallucinations and Cursor Issues

When experiencing issues with AI responses or Cursor functionality, follow these steps:

  1. Required Open Tabs:
    • Active file you’re working on
    • Cursor Settings (Feature tab → Resync Index)
    • .cursorrules file

  1. Reload Process:
    1. Press Ctrl+Shift+P
    2. Type "Developer: Reload Window"
    3. Wait 3-10 seconds for complete reload
    

  1. When to Use:
    • AI seems confused
    • Cursor not responding properly
    • Unexpected behavior
    • Need to refresh codebase indexing

Best Practices

  1. Memory Management:

    • Regular updates
    • Clear categorization
    • Proper cross-referencing
  2. Mode System Usage:

    • Start in Plan mode
    • Build confidence systematically
    • Transition to Agent mode at 95%
  3. Documentation:

    • Keep inline comments updated
    • Maintain clear changelog
    • Cross-reference related files

Common Issues and Solutions

  1. AI Hallucination:

    • Symptom: AI gives inconsistent or incorrect responses
    • Solution: Follow reload process with required tabs open
    • Prevention: Keep .cursorrules file open
  2. Cursor Unresponsive:

    • Symptom: Cursor stops providing suggestions
    • Solution: Resync index and reload window
    • Prevention: Regular resyncs during long sessions
  3. Context Loss:

    • Symptom: AI loses track of previous conversation
    • Solution: Check memory system and reload
    • Prevention: Regular memory updates

Conclusion

This system provides a structured approach to AI-assisted development, ensuring consistency and reliability. By following these guidelines and using the provided tools effectively, you can maintain a more organized and efficient development workflow.


Note: This guide will be updated with actual images showing each component and process in detail. The current placeholders indicate where visual aids will be added to enhance understanding.

5 Likes