Skip to content

Conversation

@tomerdbz
Copy link
Collaborator

Description

Add two Cursor AI rules to streamline development workflow:

  • commit-msg.mdc: Automates generation of well-formatted commit messages following project conventions with proper Redmine issue tracking and sign-off requirements

  • evaluate-bug.mdc: Provides structured approach for bug investigation using Redmine MCP integration, including ticket analysis, codebase investigation, and root cause analysis with visual diagrams

These rules enable AI-assisted development by encoding project best practices and integrating with existing tools.

What

Streamline workflows with A.I. using rules.

Why ?

Justification for the PR. If there is existing issue/bug please reference.

How ?

It is optional but for complex PRs please provide information about the design,
architecture, approach, etc.

Change type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

@greptile-apps
Copy link

greptile-apps bot commented Nov 13, 2025

Greptile Summary

  • Adds two Cursor AI rules to automate commit message generation and bug investigation workflows with Redmine integration
  • The commit-msg.mdc rule follows actual project conventions (51/72 char wrapping is within the 100 char maximum from contributing.md)
  • The evaluate-bug.mdc references non-existent @solve-bug.mdc file which will cause workflow errors when developers reach the "Next Steps" phase

Confidence Score: 3/5

  • Safe to merge with one broken reference that needs fixing
  • The rules are well-structured documentation files that won't affect runtime code, but evaluate-bug.mdc references a non-existent solve-bug.mdc file which will confuse developers trying to follow the workflow
  • .cursor/rules/evaluate-bug.mdc - fix the broken reference to @solve-bug.mdc

Important Files Changed

Filename Overview
.cursor/rules/evaluate-bug.mdc New Cursor rule for bug investigation workflow using Redmine MCP; references non-existent solve-bug.mdc file

Sequence Diagram

sequenceDiagram
    participant Developer
    participant CursorAI as "Cursor AI"
    participant Git
    participant Redmine as "Redmine MCP"
    
    Note over Developer,Redmine: Bug Investigation Workflow
    Developer->>CursorAI: "@evaluate-bug.mdc [ticket#]"
    CursorAI->>Redmine: "yai__get_tickets(ticket_id)"
    Redmine-->>CursorAI: "Ticket details"
    CursorAI->>Redmine: "yai__get_comments(ticket_id)"
    Redmine-->>CursorAI: "Comments and discussion"
    CursorAI->>Redmine: "yai__get_similar_issues(ticket_id)"
    Redmine-->>CursorAI: "Related issues"
    CursorAI->>Git: "Search codebase for affected code"
    Git-->>CursorAI: "Code locations and history"
    CursorAI-->>Developer: "Root cause analysis with diagrams"
    
    Note over Developer,Redmine: Commit Message Workflow
    Developer->>Git: "git add [files]"
    Developer->>CursorAI: "@commit-msg.mdc"
    CursorAI->>Git: "git diff --staged"
    Git-->>CursorAI: "Staged changes"
    CursorAI->>Git: "git config user.name/email"
    Git-->>CursorAI: "User details"
    CursorAI->>Git: "Check branch name for issue ID"
    Git-->>CursorAI: "Branch info"
    CursorAI-->>Developer: "Formatted commit message"
    Developer->>Git: "git commit -m [message]"
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

## Next Steps

After completing this evaluation:
- **If fix is needed**: Use `@solve-bug.mdc [ticket#]` to generate solution proposals
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: References @solve-bug.mdc which doesn't exist in this PR or repository. Either include this file or update the reference to reflect the actual workflow.

Comment on lines +29 to +35
- **Maximum length**: 51 characters (for optimal git log display)
- **Style**: Use imperative mood (e.g., "Add feature" not "Added feature")
- **Content**: Brief, actionable description of the change
- **Example**: `issue: 12345 Fix memory leak in buffer pool`

### Body
- **Line length**: Maximum 72 characters per line (for readability in various git tools)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Line length limits (51 chars for subject, 72 for body) conflict with docs/contributing.md:116 which specifies 100 characters maximum for all lines. Consider aligning with project guidelines or updating the contributing docs.

Comment on lines +16 to +22
1. Fetch the full ticket using `yai__get_tickets` with ticket ID
2. Extract key information:
- Bug description and reproduction steps
- Affected versions, components, priority
- Attachments (logs, screenshots, stack traces)
3. Review comments using `yai__get_comments`
4. Search for similar issues using `yai__get_similar_issues`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: References Redmine MCP tools (yai__get_tickets, yai__get_comments, yai__get_similar_issues) without setup verification. This rule will fail if the Redmine MCP server isn't configured. Add prerequisite check or document setup requirements.

Add two Cursor AI rules to streamline development workflow:

- commit-msg.mdc: Automates generation of well-formatted
  commit messages following project conventions with proper
  Redmine issue tracking and sign-off requirements

- evaluate-bug.mdc: Provides structured approach for bug
  investigation using Redmine MCP integration, including
  ticket analysis, codebase investigation, and root cause
  analysis with visual diagrams

These rules enable AI-assisted development by encoding
project best practices and integrating with existing tools.

Signed-off-by: Tomer Cabouly <[email protected]>
@tomerdbz tomerdbz force-pushed the 4480494_cursor_rules_pilot branch from 5625a34 to c13a4aa Compare November 18, 2025 18:43
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant