Project Rules being regularly Ignored

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I have tried a few different formats and looked at documentation of rules as well as asked several models to review and I’m still seeing project rules most of the time being ignored. The most frustrating one is below, and I have it because I have an incomplete source tree for database migrations, so I simple ask cursor to ask for example schema before making assumptions or trying to parse migrations or models and it just doesn’t “listen”.


description: Rules for handling database schema and using correct database facades
globs: [“**/*.php”]
alwaysApply: true

Database Schema Handling Rules

Migration File Limitations

  • NEVER search in database/migrations/ files for table schema information
  • NEVER rely on migration files to understand current table structure
  • NEVER rely on Model files to understand current table structure
  • Our migrations do not encompass the complete database history
  • Migration files may be incomplete or outdated

Preferred Approach for Schema Queries

When you need table structure, database schema, or column information to implement a change:

  1. Prompt for Example Data: Instead of searching migrations, ask the user to provide:
    • A sample row of data from the table
    • Example INSERT statement
    • Database dump or export of a few rows
    • Screenshot of table structure from database management tool

Response Template

When schema information is requested, respond with:

I cannot rely on migration files for accurate table schema as they don't encompass the complete database history. 

Could you please provide:
- A sample row of data from the table
- An example INSERT statement
- Or a database export of a few rows

This will help me understand the current table structure accurately.

Steps to Reproduce

just ask it to change a column or a data mapping

Expected Behavior

i expect it to prompt for schema every time it is writing code to interact with the database.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.4.5 (Universal)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

yeah i’m having the same issue. the globs seem to not work at all, and the intelligent apply doesn’t seem to work except for 1 rule file i have like it just works for that and nothing else.
only the alwaysapply true seem to be working, but it’s hard to know without being able to inspect the context being sent

Hi @kev_rm,

I’ve reviewed your sample rule and noticed conflicting paths along with areas where the rules could be made clearer and more effective.

Header:

  • Avoid mixing description, globs, and alwaysApply in a single rule. Choose one approach for clarity.
  • For your scenario, a simple description such as “Rules for creating or modifying database schema and using facades” may be sufficient.

Content:

  • Avoid using “NEVER” or other absolute statements, as these can be misinterpreted or ignored by AI and even may confuse AI.
  • Use positive, explanatory guidance. For example:
    • “Since our database/migrations files may not be up to date, always check directly the database rather than relying solely on migration files.”
    • “Our migration files might be outdated; ask the user for an up-to-date schema or sample data instead of relying on migrations.”

Suggestions:

  • Consider using Laravel Boost, which can help both AI and team members manage relevant tasks more effectively. You can also modify it based on your needs.
  • Either export the current database schema as a migration, or choose not to use migrations if they’re outdated: Boost can assist with this process.
  • Keep instructions concise, eliminate conflicts, and avoid excessive specificity. Short, clear guidance is more effective for both AI and humans.