From 837afddba3adb4c526147b960cb58266fdc51cfe Mon Sep 17 00:00:00 2001 From: Ivan Grynenko Date: Mon, 27 Oct 2025 09:03:50 +1100 Subject: [PATCH 1/2] refactor: Restructured cursor rule files for improved readability and consistency - Simplified rule file structure across all 22 rule files - Reorganised content with dedicated sections for Rule Details, Filters, Rejections, and Suggestions - Converted verbose rule definitions into more concise, readable format - Improved consistency in formatting and documentation standards - Enhanced clarity of metadata and priority levels - Maintained all existing functionality whilst improving maintainability --- .cursor/rules/accessibility-standards.mdc | 84 +++---- .cursor/rules/api-standards.mdc | 88 +++---- .cursor/rules/build-optimization.mdc | 88 +++---- .cursor/rules/code-generation-standards.mdc | 113 ++++----- .cursor/rules/cursor-rules.mdc | 214 +++++++--------- .cursor/rules/debugging-standards.mdc | 61 +++-- .cursor/rules/docker-compose-standards.mdc | 235 ++++++++---------- .../rules/drupal-authentication-failures.mdc | 216 +++++++--------- .../rules/drupal-broken-access-control.mdc | 192 ++++++-------- .../rules/drupal-cryptographic-failures.mdc | 206 +++++++-------- .cursor/rules/drupal-database-standards.mdc | 61 +++-- .cursor/rules/drupal-file-permissions.mdc | 227 ++++++++--------- .cursor/rules/drupal-injection.mdc | 206 +++++++-------- .cursor/rules/drupal-insecure-design.mdc | 216 +++++++--------- .cursor/rules/drupal-integrity-failures.mdc | 216 +++++++--------- .cursor/rules/drupal-logging-failures.mdc | 220 +++++++--------- .../drupal-security-misconfiguration.mdc | 206 +++++++-------- .cursor/rules/drupal-ssrf.mdc | 211 +++++++--------- .../rules/drupal-vulnerable-components.mdc | 216 +++++++--------- .cursor/rules/generic_bash_style.mdc | 106 ++++---- .cursor/rules/git-commit-standards.mdc | 77 +++--- .cursor/rules/github-actions-standards.mdc | 98 ++++---- 22 files changed, 1506 insertions(+), 2051 deletions(-) diff --git a/.cursor/rules/accessibility-standards.mdc b/.cursor/rules/accessibility-standards.mdc index 7729123..a41578c 100644 --- a/.cursor/rules/accessibility-standards.mdc +++ b/.cursor/rules/accessibility-standards.mdc @@ -6,51 +6,39 @@ globs: *.vue, *.jsx, *.tsx, *.html, *.php Ensures WCAG compliance and accessibility best practices. - -name: accessibility_standards -description: Enforce accessibility standards and WCAG compliance -filters: - - type: file_extension - pattern: "\\.(vue|jsx|tsx|html|php|css|scss|sass)$" # Expanded to include CSS files - -actions: - - type: enforce - conditions: - - pattern: "]+(?!alt=)[^>]*>" - message: "Images must have alt attributes for screen readers." - - - pattern: "aria-[a-z]+=\"\"" - message: "ARIA attributes should not be empty; provide meaningful values." - - - pattern: "]*>(?![^<]*[^\\s])[^<]*" - message: "Buttons should have meaningful, descriptive content." - - - pattern: "]*href=\"#[^\"]*\"[^>]*>(?![^<]*" - message: "Links with href='#' should either be removed or have an aria-label for context." - - - pattern: "]+type=\"(text|email|password|search|tel|url)\"[^>]*>" - pattern_negate: "aria-label|aria-labelledby|title" - message: "Form inputs should include an aria-label or aria-labelledby attribute for better screen reader support." - - - pattern: "]*>(?!" - message: "Videos should include captions for accessibility." - - - type: suggest - message: | - **Accessibility Best Practices:** - - **Heading Hierarchy:** Use headings (h1 to h6) in a logical order to structure content. - - **Keyboard Navigation:** Ensure all interactive elements are accessible via keyboard. - - **Semantic HTML:** Favor semantic elements like