Skip to content

auto generate cursor rules from scripts#68

Merged
khleomix merged 1 commit into
mainfrom
feature/auto-cursor-generation
Jun 23, 2025
Merged

auto generate cursor rules from scripts#68
khleomix merged 1 commit into
mainfrom
feature/auto-cursor-generation

Conversation

@thatmitchcanter

Copy link
Copy Markdown
Member

Cursor Rules Auto-Generation from Variables in JSON Files via JQ

Testing

Testing is done locally

Description

This PR adds in a post-install composer (and accessible in NPM) script that will:

  • Check the version of various software and packages in composer.json and package.json
  • Store those as variables
  • Generate various cursor files under /.cursor/rules MDC files for Dependency Management, Development Workflow, Javascript Standards, PHP Code Standards, and Theme Development rules for AI prompts
  • Uses the variables to fill in necessary version restraints for those MDC Files ("please use PHP Version XXX (auto-extracted from composer.json)")

AI Assistance

  • 🤖 This project was developed with the help of a LLM/AI such as Cursor, Gemini, etc.

Added to documentation?

  • 📜 README.md
  • 📓 ClickUp
  • 🙅 No documentation needed

Added tests?

  • 👍 Yes - `./scripts/test-update-cursorrules.sh'
  • 🙅 No, because they aren't needed
  • 🙋 No, because I need help

Testing Instructions

Run NPM install and Composer Install. Verify MDC files or run the test bash script included.


Reviewer's Testing Checklist

As a reviewer, please verify that the relevant testing criteria are fulfilled and confirmed before approving this Pull Request.

  • Visual Regression Testing: Ensure that existing functionality is not negatively impacted by the changes.
  • Cross-Browser Compatibility: Test on major browsers (Chrome, Firefox, Safari) to ensure compatibility.
  • Mobile Responsiveness: Confirm that the changes are responsive and functional on various mobile devices.
  • Theme Compatibility: Ensure that the changes do not adversely affect the site's theme and styling.
  • Linting: Check that the code passes all linting checks (PHPCS, ESLint, SassLint). Check if PR passes code quality check.
  • Accessibility Testing: Validate that the changes comply with accessibility standards. Run npm run a11y.
  • Security Best Practices: Ensure that the code follows WordPress security best practices. Check if PR passes security check.
  • Documentation: Ensure that any new features or changes are appropriately documented in the README.md or Confluence.
  • Post-Deployment Tasks: Check if there are any tasks that need to be performed after deployment.

[optional] Additional Reviewer Notes or Considerations?

@khleomix khleomix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks and works great @thatmitchcanter. Thanks!

@khleomix khleomix merged commit 884a635 into main Jun 23, 2025
6 checks passed
@khleomix khleomix deleted the feature/auto-cursor-generation branch June 23, 2025 18:49
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.

2 participants