Skip to main content
CORE:S:0038 mechanical medium structure core

Path Scope Declared

Path-scoped instruction files must declare which paths they apply to via a frontmatter key. Without a scope declaration, the file loads for all contexts instead of being scoped to specific files.

Each agent uses a different frontmatter key for path scoping:

  • Claude: paths
  • Cursor: globs
  • Copilot: applyTo

Antipatterns

  • Scoped file without frontmatter scope key. Loads for all contexts instead of being scoped, wasting context tokens.
  • Using the wrong key for the agent. Each agent checks a specific key — the wrong key is silently ignored.
  • Empty frontmatter block. A file with --- / --- but no keys still fails — the scope key must be present.

Pass / Fail

Pass

---
paths: src/**/*.py
---
# Testing Design

Tests exist to catch bugs, not to confirm the implementation works.

Fail

---
description: Rules for testing files
---
# Testing Design

Tests exist to catch bugs, not to confirm the implementation works.

Limitations

Core check verifies frontmatter is present. Agent-level overrides check the specific scope key (e.g., paths for Claude, globs for Cursor, applyTo for Copilot).