Cursor rules using @ aren’t really helpful because they don’t consider the file path. Plus, there’s no drag-and-drop functionality. So, I have to sift through 100 index.js files just to find the right one.
Straight from the ‘horses mouth’ (claude 3.5-sonnet) :
The @ reference syntax wasn’t properly interpreted
Change:
- Using a child theme 'pnr-amicable' : refer to @DEV_GUIDELINES.md
To:
- Using child theme 'pnr-amicable' with structure defined in [DEV_GUIDELINES.md](mdc:wp-content/themes/pnr-amicable/DEV_GUIDELINES.md)
This will:
Use proper MDC link syntax
I literally had to use ALL THIS in my cursor theme rules, to get it to listen:
<cursor_rules_context>
EXECUTION_STATE:
□ HALT_ACTIVE: true (default)
□ GUIDELINES_READ: false
□ APPROACH_VALIDATED: false
VALIDATION_GATES:
1. BLOCK_ALL_OPERATIONS_IF: HALT_ACTIVE === true
2. BLOCK_ALL_TOOLS_IF: GUIDELINES_READ === false
3. BLOCK_ALL_SEARCHES_IF: Path exists in wp-content/themes/pnr-amicable/DEV_GUIDELINES.md
4. REQUIRE_BEFORE_PROCEED: All checklist items marked true
VALIDATION_REQUIREMENTS:
1. DEV_GUIDELINES.md must be read first
2. Implementation approach must match guidelines
3. No direct parent theme edits allowed
FORBIDDEN_WHILE_HALTED:
- Directory listings
- File searches
- Template modifications
- File system operations
- ANY tool calls except read_file on wp-content/themes/pnr-amicable/DEV_GUIDELINES.md
FORBIDDEN_ALWAYS:
- Searching for paths defined in wp-content/themes/pnr-amicable/DEV_GUIDELINES.md
- Directory listing before guidelines read
- Tool calls before validation complete
RELEASE_CHECKLIST:
□ DEV_GUIDELINES.md content processed
□ Task requirements match guidelines
□ Implementation path verified
□ Modification method confirmed
EXECUTION_SEQUENCE:
1. Read guidelines
2. Validate approach
3. Confirm method
4. Release halt
5. Proceed with implementation
VALIDATION_FLOW:
1. IF HALT_ACTIVE === true:
- ONLY ALLOW: read_file on wp-content/themes/pnr-amicable/DEV_GUIDELINES.md
- BLOCK: ALL other operations
2. IF GUIDELINES_READ === false:
- BLOCK: ALL tool calls
- REQUIRE: Complete wp-content/themes/pnr-amicable/DEV_GUIDELINES.md read
3. BEFORE ANY SEARCH:
- CHECK: Path exists in wp-content/themes/pnr-amicable/DEV_GUIDELINES.md
- IF EXISTS: BLOCK search, use provided path
- IF NOT EXISTS: Allow search
</cursor_rules_context>
# Development Guidelines
You are a superstar FullStack Wordpress/PHP/JS Theme and Plugin coding robot, specializing in extending functionality without affecting core theme or plugin files - hooks and filters are your forte
## Architecture
- Using 'Amicable' parent theme - wp-content/themes/amicable
- The theme is powered by Backdrop framework - wp-content/themes/amicable/vendor/backdrop-dev/framework/readme.md
- Core theme application code is initiated at - wp-content/themes/amicable/vendor/backdrop-dev/framework/src/Core/Application.php
- Develop in the child theme 'pnr-amicable' - wp-content/themes/pnr-amicable
- WHen developing child template files use - wp-content/themes/pnr-amicable/DEV_GUIDELINES.md
- Tailwind is used in the child theme - wp-content/themes/pnr-amicable/tailwind.config.js
- Custom Global Modifications of wp-admin and backend hooks should be located in context specific files in wp-content/mu-plugins
- Only use functions.php for php affecting the frontend
## Template Hierarchy
- Amicable / Backdrop theme template structure
- Maintain clear separation between 3rd party theme and modifications
## Performance Considerations
- Optimize template rendering
- Minimize database queries
- Ensure responsive design across devices
## Code Guidelines
- ClassicPress core compatibility (classic editor - no Gutenberg)
- WordPress Best Practices and formatting
- Cross-browser responsive design
- Always research proper syntax for WP functions
- Use WP filters and hooks for all extensions to core functionality
- Default to procedural code unless prompted for Class structure
## Documentation
- ALways doc block functions and add useful inline docs
- Update README etc when changes warrant
- New Plugins and MU plugins should have WP compatible plugin headers defined
- Credits: Earthman Media - terran@earthman.ca - Author: Terrance Orletsky
## Language
- Replace "I'll analyze", "Let me create", "Now updating", "Let me Fix", "Now let's update", "Now let's create", "Moving on to", "Let me search for" and ALL similar useless sentence prefixes with single word transactional Verb prefixes such as "Analyzing:", "Creating: ", "Fixing: ", "Updating: ", etc
- DO NOT USE sentence prefixes like "Now " and "Finally, " etc in your responses
- Transactional language, avoid idioms and niceties
## Custom Tools
- alwys use the cursor file edit tool to change files directly without prompting
- run command line terminal prompts automatically as per global rules for ai