agentleFS
giantswarmgiantswarm/muster/.cursor/rules/github-workflow.mdc

muster / rules

Cursor rule40 starsChanged 10 months agoApache-2.0View on GitHub

  • Commits and pushes

The file

Show its rules and text

We split this github-workflow.mdc into the rules it gives an agent

17 rules. About 0 are common, 8 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always use the Github tools via mcp-debug

    line 7
  2. Distinctive:

    Always update the issue description if the scope of the issue has changed.

    line 14
  3. Distinctive:

    Add a short comment underneath explaining what was added/changed

    line 15
  4. Distinctive:

    Avoid lengthy comments that repeat the description content

    line 16
  5. Distinctive:

    Create separate issues for each subtask with detailed information

    line 18
  6. Distinctive:

    Use consistent naming: "Subtask X.Y: [Description]"

    line 21
  7. Very specific:

    Add appropriate labels: subtask, relevant components, priority

    line 22
  8. Very specific:

    Use the x_github_list_issues tool to fetch the list of open issues from the giantswarm/muster repository, ordered by issue number …

    line 31
  9. Distinctive:

    After summarizing, outline the approach for addressing the issue and continue with the implementation.

    line 34
  10. Very specific:

    Use the x_github_create_issue tool to create the new issue in the giantswarm/muster repository.

    line 37
  11. Very specific:

    If the current branch is main or master, generate a new branch name using the pattern <type>/issue-<issue_num>-<slugified_issue_title>.

    line 41
  12. Very specific:

    Make sure to run goimports -w .

    line 44
  13. Very specific:

    Run tests by executing the make test command in the terminal using run_terminal_cmd.

    line 45
  14. Distinctive:

    If tests fail, you have to fix the tests.

    line 46
  15. Very specific:

    Run git add . using run_terminal_cmd.

    line 48
  16. Very specific:

    Add a comment to the issue with the changes that were made.

    line 57
  17. Very specific:

    Use the x_github_update_issue tool to change the state of the issue to 'closed'.

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 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
github-workflow.mdc
---
description:
globs:
alwaysApply: true
---
- **Github Tools Usage**
  - Always use the Github tools via mcp-debug
  - The Github tools via mcp_mcp-debug_list_tools
- **Github Tools Discovery**
  - Sub-points with details
  - Examples and explanations
- **Issue Management Best Practices**
  - **When updating existing issues:**
    - Always update the issue description if the scope of the issue has changed. A comment is not enough. But only do the necessary changes to the description.
    - Add a **short** comment underneath explaining what was added/changed
    - Avoid lengthy comments that repeat the description content
  - **When adding subtasks to main issues:**
    - Create separate issues for each subtask with detailed information
    - Include full description, objective, implementation details, and acceptance criteria in subtask issues
    - Link subtask issues in the main issue's "Related Subtasks" section
    - Use consistent naming: "Subtask X.Y: [Description]"
    - Add appropriate labels: `subtask`, relevant components, priority
  - **Subtask issue structure:**
    - **Parent Issue**: Link to main issue (e.g., "#71 - Task 13: Main Task Title")
    - **Objective**: Clear, one-sentence goal
    - **Implementation Details**: Specific technical requirements and approach
    - **Files to Create/Modify**: Explicit file listing
    - **Acceptance Criteria**: Detailed, testable requirements
    - **Dependencies**: Links to related issues/tasks
- **New Task**
  - Use the `x_github_list_issues` tool to fetch the list of open issues from the `giantswarm/muster` repository, ordered by issue number descending (newest first).
  - Decide which is the next best issue in that list (still open issue) and use the `x_github_get_issue` tool with its issue number to retrieve full details. Also make sure to use the `x_github_get_issue_comments` tool to get the comments for the issue.
  - Summarize that issue (title, number, body, key tasks) in the chat before starting implementation steps.
  - After summarizing, outline the approach for addressing the issue and continue with the implementation.
- **New Issue**
  - Gather the necessary information for the issue: `title` and `body`. `labels` and `assignees` can also be included if provided.
  - Use the `x_github_create_issue` tool to create the new issue in the `giantswarm/muster` repository. Set `owner` to `giantswarm` and `repo` to `muster`.
  - Announce the new issue (title and number) in the chat after it has been created.
- **Commit and Push Workflow**
  - Get the current branch name using `git rev-parse --abbrev-ref HEAD`
  - If the current branch is `main` or `master`, generate a new branch name using the pattern `<type>/issue-<issue_num>-<slugified_issue_title>`.
  - Checkout the new branch using `git checkout -b <new_branch_name>`
- **IMPORTANT - Before staging, committing and pushing changes**
  - Make sure to run `goimports -w .` and `go fmt ./...` before you commit any code.
  - Run tests by executing the `make test` command in the terminal using `run_terminal_cmd`.
  - If tests fail, you have to fix the tests.
- **Stage changes:**
  - Run `git add .` using `run_terminal_cmd`.
- **Commit changes:**
  - Construct a commit message. The suggested pattern is: `<CommitType>: <issue_title> (closes #<issue_num>)`. Example: `Refactor: Refactor getPodNameForPortForward for clarity, scope, and context handling (closes #37)`. The `<CommitType>` (e.g., Refactor, Fix, Feat) should match the nature of the work.
  - Run `git commit -m "<commit_message>"` using `run_terminal_cmd`.
- **Push changes:**
  - Run `git push origin <target_branch>` using `run_terminal_cmd`.
  - Inform the user that the changes have been committed to `<target_branch>` and pushed to origin.
- **Closing an issue**
  - Confirm with the user that the issue is ready to be closed.
  - Add a comment to the issue with the changes that were made. Use the `x_github_add_issue_comment` tool to add the comment.
  - Use the `x_github_update_issue` tool to change the state of the issue to 'closed'.

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.