Skip to main content
Category
Agent
Severity
CURSOR:G:0001

Hook Uses Project Dir Variable

Hook shell commands in .cursor/hooks.json SHOULD reference $CURSOR_PROJECT_DIR instead of hardcoded absolute paths. Cursor injects this environment variable at runtime — using it makes hooks portable across machines and collaborators.

Mediumcursorgovernance
CURSOR:S:0002

Import Depth Within Limit

Cursor's @filename syntax in AGENTS.md and .cursor/rules/*.mdc is single-level only — referenced files are pulled into context, but @<path> syntax inside those referenced files is not transitively followed. This stub supersedes the more permissive CORE ceiling with Cursor's actual single-level model so a chained-import pattern (which Cursor does not honor) is flagged early.

Mediumcursorstructure
CURSOR:S:0001

Path Scope Declared

Cursor path-scoped rules must declare a globs frontmatter key. Rules without globs and without alwaysApply: true are manual-only (loaded via @-mention, not automatically).

Mediumcursorstructure
CURSOR:S:0004

Hook Command Has Field

Hook handlers with "type": "command" in .cursor/hooks.json MUST include a "command" field containing the shell command to execute. Without it, Cursor has no command to run and the hook fails silently.

Highcursorstructure
CURSOR:S:0003

Hook Handler Has Type

Each hook handler object in .cursor/hooks.json MUST contain a "type" field set to command or prompt. Without a type field, Cursor cannot dispatch the handler and the hook silently does nothing.

Highcursorstructure
CURSOR:S:0005

Hook Prompt Has Field

Hook handlers with "type": "prompt" in .cursor/hooks.json MUST include a "prompt" field containing the instruction text. Without it, Cursor has no prompt to inject and the hook does nothing.

Highcursorstructure