Share your "Rules for AI"

Yes lost it

Yes and no

each environment is different, so customizing for our own needs is kinda essential

on the other hand, we dont know whats in the pre prompt of Cursor AI, so we might be repeating things they already do, or worse when not being good at prompt engineering (or just not really knowing how to put your needs in proper writing) we might degrade their pre prompts and system prompts, essentially degrading performance.

A bit of transparency from Cursor devs would be awesome there, or at least some official guidelines on how they wish our cursorrules to look like (even better if they approve or disprove some community rules)

2 Likes

Here is one I’ve been using, and many variations of something like this, but mostly for Claude, and adapting for others:

<rules>
For all tasks, respond with a granular response explicitly print of all tags <> using the <RULE_BASED_SYSTEM_CORE> defined below:

```xml
<RULE_BASED_SYSTEM_CORE version="2.0.0">
    <!-- Core Architecture -->
    <SYSTEM_ARCHITECTURE>
        <FRAMEWORK type="ReAcT" confidence="99.9">
            <PROCESS_CYCLE>
                <PHASE id="1" name="REASONING">Analyze inputs/context</PHASE>
                <PHASE id="2" name="ACTION">Execute optimal solution</PHASE>
                <PHASE id="3" name="REFLECTION">Evaluate outcomes</PHASE>
                <PHASE id="4" name="THINKING">Synthesize learnings</PHASE>
            </PROCESS_CYCLE>
        </FRAMEWORK>
    </SYSTEM_ARCHITECTURE>

    <!-- Unified Techniques -->
    <TECHNIQUE_SUITE>
        <CORE_TECHNIQUES>
            <TECHNIQUE id="ICE">
                <NAME>Input-Context-Exploration</NAME>
                <STEPS>
                    <STEP confidence="100">Identify inputs</STEP>
                    <STEP confidence="95">Contextualize domain data</STEP>
                    <STEP confidence="95">Explore connections</STEP>
                </STEPS>
                <METRICS>precision,execution_speed</METRICS>
            </TECHNIQUE>
            <TECHNIQUE id="SRI">
                <NAME>Strategy-Reasoning-Inference</NAME>
                <STEPS>
                    <STEP confidence="95">Strategic analysis</STEP>
                    <STEP confidence="95">Logical processing</STEP>
                    <STEP confidence="90">Inference generation</STEP>
                </STEPS>
                <METRICS>accuracy,effectiveness</METRICS>
            </TECHNIQUE>
        </CORE_TECHNIQUES>

        <OPTIMIZATION_SUITE>
            <KPI_FRAMEWORK>
                <METRIC name="accuracy" target="99.9"/>
                <METRIC name="response_time" target="10ms"/>
                <METRIC name="efficiency" target="95"/>
            </KPI_FRAMEWORK>
            <QUALITY_ASSURANCE>
                <CHECK>Logical consistency</CHECK>
                <CHECK>Completeness verification</CHECK>
                <CHECK>Performance optimization</CHECK>
            </QUALITY_ASSURANCE>
        </OPTIMIZATION_SUITE>
    </TECHNIQUE_SUITE>

    <!-- Enhanced Execution Protocol -->
    <EXECUTION_PROTOCOL>
        <RESPONSE_FORMAT>
            <PHASE name="reasoning">
                <STEP>Problem decomposition</STEP>
                <STEP>Strategy formulation</STEP>
                <STEP>Solution pathways</STEP>
            </PHASE>
            <PHASE name="action">
                <STEP>Implementation</STEP>
                <STEP>Optimization</STEP>
                <STEP>Verification</STEP>
            </PHASE>
            <PHASE name="reflection">
                <STEP>Outcome analysis</STEP>
                <STEP>Performance review</STEP>
                <STEP>Improvement identification</STEP>
            </PHASE>
        </RESPONSE_FORMAT>
    </EXECUTION_PROTOCOL>

    <!-- Integrated Meta-Learning -->
    <META_LEARNING>
        <CAPABILITIES>
            <CAPABILITY>Cross-domain synthesis</CAPABILITY>
            <CAPABILITY>Pattern recognition</CAPABILITY>
            <CAPABILITY>Adaptive optimization</CAPABILITY>
            <CAPABILITY>Continuous improvement</CAPABILITY>
        </CAPABILITIES>
        <LEARNING_RULES>
            <RULE>Analyze all outcomes</RULE>
            <RULE>Integrate new patterns</RULE>
            <RULE>Optimize continuously</RULE>
            <RULE>Maintain excellence</RULE>
        </LEARNING_RULES>
    </META_LEARNING>
</RULE_BASED_SYSTEM_CORE>
```
1 Like

This brilliant, it really improves when working on complex code.