agentleFS
ivangrynenkoivangrynenko/cursorrules/.cursor/rules/pull-request-changelist-instructions.mdc

cursorrules / rules

Cursor rule88 starsChanged 13 months agoMITView on GitHub

Guidelines for creating consistent pull request changelists in markdown format with proper code block formatting

The file

We split this pull-request-changelist-instructions.mdc into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Avoid ambiguous wording that could lead to a rendered (formatted) output.

    line 39
  2. Distinctive:

    If the response is rendered markdown rather than a raw code block, prompt with one of the following:

    line 53
  3. Very specific:

    Main Heading: Must begin with # Summary of Changes

    line 59
  4. Very specific:

    Categories: Use ## headings to group related changes.

    line 60
  5. Distinctive:

    Keep each entry concise but descriptive.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
pull-request-changelist-instructions.mdc
---
description: Guidelines for creating consistent pull request changelists in markdown format with proper code block formatting
globs: 
alwaysApply: false
---
---
description: Updated guidelines for creating consistent pull request changelists in markdown format, ensuring strict raw markdown code block formatting and proper structure.
globs: "*.md"
alwaysApply: false
---
# Pull Request Changelist Format

This document outlines strict standards for creating and formatting pull request changelists in markdown. Following these guidelines ensures that the output remains as raw markdown (unrendered) and prevents any issues with Cursor’s markdown rendering.

<rule>
name: pull_request_changelist_format
description: Updated guidelines for creating consistent pull request changelists in markdown with strict code block handling and structured formatting.
filters:
  - type: file_extension
    pattern: "\\.md$"
  - type: content
    pattern: "(?i)(pull request|pr|changelist|changelog)"

actions:
  - type: suggest
    message: |
      ## Updated Pull Request Changelist Guidelines

      To guarantee clarity and consistency, please adhere to the following time-tested, unambiguous guidelines when requesting a PR changelist from Cursor:

      ### 1. Request Format
      **Always explicitly request raw markdown output in a code block** using one of these exact phrases:
      - "Return markdown as code"
      - "Return as code inside markdown as code (one block)"
      - "Provide the markdown in a code block"
      - "Return the content as a markdown code block, not as formatted text"
      - "Generate the PR changelist in a markdown code block"

      Avoid ambiguous wording that could lead to a rendered (formatted) output.

      ### 2. Expected Response Format
      Cursor should always respond with a raw markdown code block that looks like:
      ```
      ```markdown
      # Summary of Changes

      ## Category Name
      - Change item
      ```
      ```

      ### 3. Handling Incorrect Format
      If the response is rendered markdown rather than a raw code block, prompt with one of the following:
      - "Please provide the exact markdown in a code block using triple backticks, not as formatted text."
      - "I require the raw markdown syntax; reformat your response with triple backticks."
      - "Reformat your output as a code block enclosed in triple backticks."

      ### 4. Changelist Structure
      - **Main Heading:** Must begin with `# Summary of Changes`
      - **Categories:** Use `##` headings to group related changes.
      - **Changes:** List each change with a bullet (`-`), starting with a past tense verb (e.g., Added, Updated, Removed).
      - **Code/Variables:** Enclose module names or configuration settings in backticks (e.g., `module_name`).

      ### 5. Content Requirements
      - Be specific about what changed and why.
      - Group similar changes under the appropriate category headings.
      - For configuration changes, include both the setting name and its new value.
      - Keep each entry concise but descriptive.

      ### 6. Example Command
      To request a changelist from Cursor, try:
      ```
      Prepare a PR changelist based on these changes. Return the markdown in a code block with triple backticks.
      ```

      Adhering to these traditional, time-tested formatting guidelines not only prevents ambiguity but also paves the way for future improvements in automated changelist generation.
      
  - type: validate
    conditions:
      - pattern: "^```\\s*markdown\\s*\\n#\\s+Summary\\s+of\\s+Changes"
        message: "The changelist must be a raw markdown code block starting with '# Summary of Changes'. Ensure the use of triple backticks and correct heading structure."
      - pattern: "-\\s+(Added|Updated|Removed)\\b"
        message: "Each bullet point must begin with a past tense verb: 'Added', 'Updated', or 'Removed'."
      
examples:
  - input: |
      Request: "Create a PR changelist for my changes. Return markdown code as code."
      
      Good Response from Cursor:
      ```markdown
      # Summary of Changes

      ## Environment Configuration
      - Updated `STAGE_FILE_PROXY_URL` to data.safeworkaustralia.gov.au
      - Updated `LOCALDEV_URL` to dataswa.docker.amazee.io

      ## Module Changes
      - Removed `page_cache` module
      - Added `stage_file_proxy` module
      ```
    output: |
      This is the correct format for Cursor to return a changelist – as a raw markdown code block enclosed in triple backticks.
      
  - input: |
      Request: "Create a PR changelist for my changes."
      
      Bad Response from Cursor (rendered markdown instead of a code block):
      # Summary of Changes

      ## Environment Configuration
      - Updated `STAGE_FILE_PROXY_URL` to data.safeworkaustralia.gov.au
      - Updated `LOCALDEV_URL` to dataswa.docker.amazee.io
    output: |
      This response is incorrectly formatted as rendered markdown. Please ask Cursor to provide the output as a raw markdown code block with triple backticks.

metadata:
  priority: medium
  version: 1.2
</rule>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.