Skip to content

Conversation

@ivangrynenko
Copy link
Owner

Summary

  • convert all .mdc rule files from legacy syntax to front matter + Markdown sections
  • rewrite core security/performance guides with actionable Required Checks and Recommendations
  • document new rule authoring template and migration expectations in cursor-rules.mdc

Testing

  • not run

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ivangrynenko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the internal structure of all rule definition files within the repository. The primary goal is to standardize the format of these rules by migrating them from an older, custom XML-like syntax to a more modern and readable Markdown-based structure. This change improves the clarity of rule definitions, making them easier to understand and contribute to. Additionally, it updates the documentation for authoring new rules and outlines the migration process for existing ones, ensuring consistency and future-proofing the rule management system.

Highlights

  • Rule File Format Conversion: All .mdc rule files have been converted from a legacy <rule> XML-like syntax to a new Markdown-based format, enhancing readability and maintainability.
  • Enhanced Security and Performance Guides: Core security and performance guides have been rewritten to include clearer, actionable 'Required Checks' and 'Recommendations' sections, making it easier to understand and apply best practices.
  • New Rule Authoring Documentation: The cursor-rules.mdc file now documents the new rule authoring template and provides migration expectations, guiding future rule development and transitions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 3 to 4
globs: *.py
alwaysApply: false

Choose a reason for hiding this comment

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

P0 Badge Quote glob patterns to produce valid YAML front matter

The new front matter uses globs: *.py (and similar wildcards across the rules). In YAML, values beginning with * or ! are parsed as anchors/tags, so this line fails to parse (Psych::SyntaxError: did not find expected alphabetic or numeric character while scanning an alias). If the rules loader reads the front matter as YAML, every rule file now raises a syntax error and none of the guidance will load. Wrap each glob pattern in quotes or express them as a YAML list to make the metadata valid.

Useful? React with 👍 / 👎.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a significant and valuable refactoring of the .mdc rule files, migrating them from a legacy XML-style format to a much more readable and maintainable Markdown-based structure. The new format, documented in cursor-rules.mdc, is a great improvement. While the conversion is well-executed overall, I've identified several files where the globs front matter property is either missing or inconsistent with the rule's intended scope as described in the Trigger Conditions. These inconsistencies could lead to rules not being applied to the correct files. I've provided specific suggestions to align the globs with the intended file patterns. Additionally, this refactoring commendably corrects several long-standing errors in the JavaScript rules that were incorrectly targeting Python files.

Comment on lines 43 to 46
## Required Checks / Recommendations / Positive Signals
- Use headings that suit the rule's enforcement style.
- Keep bullets short, actionable, and framework-agnostic.
- Include validation or positive examples when useful.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The section ## Required Checks / Recommendations / Positive Signals is very generic. It would be more helpful to provide specific examples of what each of these might look like, similar to how other sections have examples. This would improve the clarity of the rule authoring template.

- `*.theme`

## Trigger Conditions
- Files matching pattern `\.(php|inc|module|install|theme|yml)$`
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The Trigger Conditions pattern yml is less specific than the *.info.yml glob used for file matching. To improve clarity and consistency, the trigger condition should also use the more specific info.yml pattern, which is correct for Drupal module info files.

- Files matching pattern `\.(php|inc|module|install|theme|info\.yml)$`

@ivangrynenko ivangrynenko added invalid This doesn't seem right wontfix This will not be worked on labels Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants