{"slug": "cursor-ai-prompting-rules-this-gist-provides-structured-prompting-rules-for-ai", "title": "Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.", "summary": "Structured prompting framework called the \"Autonomous Agent Prompting Framework,\" designed to transform AI agents from simple command executors into autonomous, senior-level engineers. The framework is built on five core principles—research-first, extreme ownership, autonomous problem-solving, precision, and self-improvement—and consists of three main components: an Operational Doctrine (core.md), Operational Playbooks (request.md, refresh.md, retro.md), and optional stackable directives. Users are instructed to install the core.md as a global or project-specific rule, then paste the appropriate playbook template into the chat to initiate disciplined, verifiable AI workflows.", "body_md": "# The Autonomous Agent Prompting Framework\n\nThis repository contains a disciplined, evidence-first prompting framework designed to elevate an Agentic AI from a simple command executor to an **Autonomous Principal Engineer.**\n\nThe philosophy is simple: **Autonomy through discipline. Trust through verification.**\n\nThis framework is not just a collection of prompts; it is a complete operational system for managing AI agents. It enforces a rigorous workflow of reconnaissance, planning, safe execution, and self-improvement, ensuring every action the agent takes is deliberate, verifiable, and aligned with senior engineering best practices.\n\n_**I also have Claude Code prompting for your reference:**_\nhttps://gist.github.com/aashari/1c38e8c7766b5ba81c3a0d4d124a2f58\n\n---\n\n## Core Philosophy\n\nThis framework is built on five foundational principles that the AI agent is expected to embody:\n\n1.  **Research-First, Always:** The agent must never act on assumption. Every action is preceded by a thorough investigation of the current system state.\n2.  **Extreme Ownership:** The agent's responsibility extends beyond the immediate task. It owns the end-to-end health and consistency of the entire system it touches.\n3.  **Autonomous Problem-Solving:** The agent is expected to be self-sufficient, exhausting all research and recovery protocols before escalating for human clarification.\n4.  **Unyielding Precision & Safety:** The operational environment is treated with the utmost respect. Every command is executed safely, and the workspace is kept pristine.\n5.  **Metacognitive Self-Improvement:** The agent is designed to learn. It reflects on its performance and systematically improves its own core directives.\n\n## Framework Components\n\nThe framework consists of three main parts: the **Doctrine**, the **Playbooks**, and optional **Directives**.\n\n### 1. The Operational Doctrine (`core.md`)\n\nThis is the central \"constitution\" that governs all of the agent's behavior. It's a universal, technology-agnostic set of principles that defines the agent's identity, research protocols, safety guardrails, and professional standards.\n\n**Installation is the first and most critical step.** You must install the `core.md` content as the agent's primary system instruction set.\n\n-   **For Global Use (Recommended):** Install `core.md` as a global or user-level rule in your AI environment. This ensures all your projects benefit from this disciplined foundation.\n-   **For Project-Specific Use:** If a project requires a unique doctrine, you can place the content in a project-specific rule file (e.g., a `.cursor/rules/` directory or a root-level `AGENT.md`). This will override the global setting.\n\n> **Note:** Treat the Doctrine like infrastructure-as-code. When updating, replace the entire file to prevent configuration drift.\n\n### 2. The Operational Playbooks\n\nThese are structured \"mission briefing\" templates that you paste into the chat to initiate a task. They ensure every session follows the same rigorous, disciplined workflow. The agent uses the following status markers in its reports:\n-   `✅`: Objective completed successfully.\n-   `⚠️`: A recoverable issue was encountered and fixed autonomously.\n-   `🚧`: Blocked; awaiting input or a resource.\n\n| Playbook         | Purpose                                          | When to Use                                                                 |\n| ---------------- | ------------------------------------------------ | --------------------------------------------------------------------------- |\n| **`request.md`** | Standard Operating Procedure for Constructive Work | Use this for building new features, refactoring code, or making any planned change. |\n| **`refresh.md`** | Root Cause Analysis & Remediation Protocol       | Use this when a bug is persistent and previous, simpler attempts have failed. |\n| **`retro.md`**   | Metacognitive Self-Improvement Loop              | Use this at the end of a session to capture learnings and improve the `core.md`. |\n\n### 3. Optional Directives (Stackable)\n\nThese are smaller, single-purpose rule files that can be appended to a playbook prompt to modify the agent's behavior for a specific task.\n\n| Directive          | Purpose                                        |\n| ------------------ | ---------------------------------------------- |\n| **`05-concise.md`** | **(Optional)** Mandates radically concise, information-dense communication, removing all conversational filler. |\n\nTo use an optional directive, simply append its full content to the bottom of a playbook prompt before pasting it into the chat.\n\n## How to Use This Framework: A Typical Session\n\nYour interaction with the agent becomes a simple, repeatable, and highly effective loop.\n\n1.  **Initiate with a Playbook:**\n    -   Copy the full text of the appropriate playbook (e.g., `request.md`).\n    -   Replace the single placeholder line at the top with your specific, high-level goal.\n    -   **(Optional)** If you need a specific behavior, like conciseness, append the content of `05-concise.md` to the end of the prompt.\n    -   Paste the entire combined text into the chat.\n\n2.  **Observe Disciplined Execution:**\n    -   The agent will announce its operational phase (Reconnaissance, Planning, etc.).\n    -   It will perform non-destructive research first, presenting a digest of its findings.\n    -   It will execute its plan, providing verifiable evidence for its actions and running tests autonomously.\n    -   It will conclude with a mandatory self-audit to prove its work is correct.\n\n3.  **Review the Final Report:**\n    -   The agent will provide a final summary with status markers. All evidence will be transparently available in the chat log, and the workspace will be left clean.\n\n4.  **Close the Loop with a Retro:**\n    -   Once satisfied, paste the contents of `retro.md` into the chat.\n    -   The agent will analyze the session and, if a durable lesson was learned, it will propose an update to its own Doctrine.\n\nBy following this workflow, you are not just giving the agent tasks; you are actively participating in its training and evolution, ensuring it becomes progressively more aligned and effective over time.\n\n---\n\n## Guiding Principles\n- **Be Specific:** In your initial request, clearly state *what* you want and *why* it's important.\n- **Trust the Process:** The framework is designed for autonomy. Intervene only when the agent explicitly escalates under its Clarification Threshold.\n- **End with a Retro:** Regularly using `retro.md` is the key to creating a learning agent and keeping the Doctrine evergreen.\n\n**Welcome to a more disciplined, reliable, and truly autonomous way of working with AI.**", "url": "https://wpnews.pro/news/cursor-ai-prompting-rules-this-gist-provides-structured-prompting-rules-for-ai", "canonical_source": "https://gist.github.com/aashari/07cc9c1b6c0debbeb4f4d94a3a81339e", "published_at": "2025-02-28 05:45:55+00:00", "updated_at": "2026-05-21 14:12:44.734118+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "developer-tools"], "entities": ["Cursor AI", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/cursor-ai-prompting-rules-this-gist-provides-structured-prompting-rules-for-ai", "markdown": "https://wpnews.pro/news/cursor-ai-prompting-rules-this-gist-provides-structured-prompting-rules-for-ai.md", "text": "https://wpnews.pro/news/cursor-ai-prompting-rules-this-gist-provides-structured-prompting-rules-for-ai.txt", "jsonld": "https://wpnews.pro/news/cursor-ai-prompting-rules-this-gist-provides-structured-prompting-rules-for-ai.jsonld"}}