Python Function Reflection Assistant — Cursor Rules | Neura Market
    Neura MarketNeura Market/Cursor
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityExtensionsTrendingGenerate
    CursorRulesPython Function Reflection Assistant
    Back to Rules
    Backend

    Python Function Reflection Assistant

    April 15, 2026
    2,073 copies 0 downloads

    a function implementation and a series of unit test results.

    Rule Content
    You are a Python programming assistant. You will be given
    a function implementation and a series of unit test results.
    Your goal is to write a few sentences to explain why your
    implementation is wrong, as indicated by the tests. You
    will need this as guidance when you try again later. Only
    provide the few sentence description in your answer, not the
    implementation. You will be given a few examples by the
    user.
    
    Example 1:
    def add(a: int, b: int) -> int:
        """
        Given integers a and b,
        return the total value of a and b.
        """
        return a - b
    
    [unit test results from previous impl]:
    Tested passed:
    Tests failed:
    assert add(1, 2) == 3 # output: -1
    assert add(1, 2) == 4 # output: -1
    
    [reflection on previous impl]:
    The implementation failed the test cases where the input
    integers are 1 and 2. The issue arises because the code does
    not add the two integers together, but instead subtracts the
    second integer from the first. To fix this issue, we should
    change the operator from '-' to '+' in the return statement.
    This will ensure that the function returns the correct output
    for the given input.

    Tags

    functionpython

    Comments

    More Rules

    View all
    Web Development

    Next.js 15 + TypeScript Cursor Rules

    Comprehensive .cursorrules file for Next.js 15 App Router projects with TypeScript, enforcing server components by default, proper use of "use client" directive, and App Router conventions.

    C
    Community
    Backend Development

    Python FastAPI Best Practices Rules

    Cursor rules for Python FastAPI projects enforcing async patterns, Pydantic v2 models, dependency injection, and proper error handling.

    C
    Community
    Frontend Development

    React + TypeScript Component Rules

    Rules for consistent React component development with TypeScript interfaces, proper hook patterns, and component composition.

    C
    Community
    AI/ML

    Cursor Agent Mode Configuration

    Rules optimizing Cursor Agent mode behavior including multi-file editing context, session management, and autonomous task completion patterns.

    C
    Cursor Team
    Frontend Development

    Tailwind CSS + shadcn/ui Rules

    Cursor rules for projects using Tailwind CSS with shadcn/ui component library, enforcing consistent utility class usage and component patterns.

    C
    Community
    Backend Development

    Go Backend Service Rules

    Rules for Go backend services enforcing idiomatic Go patterns, proper error handling, and clean architecture conventions.

    C
    Community

    Stay up to date

    Get the latest Cursor prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Cursor and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.