Skip to content

feat: explain Cursor rule activation for declared file context - #80

Merged
LE0-Lin merged 1 commit into
mainfrom
feat/cursor-scope-analysis
Nov 2, 2026
Merged

LE0-Lin merged 1 commit into
mainfrom
feat/cursor-scope-analysis

Conversation

@LE0-Lin

@LE0-Lin LE0-Lin commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Cursor project rules can attach based on the files in an agent's context. A repository-wide text comparison cannot explain which rules a particular task would trigger, and disjoint globs can still co-activate in a multi-file task.

Add the opt-in, unscored scope PATH --target FILE command and cursor-file-context-v1 model. It parses a bounded scalar metadata grammar, matches declared logical paths using an iterative glob engine, retains manual/model/unsupported cases as unknown, and reports textual opposing-directive signals with original source lines and trigger evidence. Raw metadata/directive bodies are omitted from reports; the new runtime module is included in tool fingerprints.

Includes a runnable synthetic example, installed-wheel journeys for both aliases and the module entrypoint, a detailed grammar/reference, and synchronized English/Simplified/Traditional core guides. Existing scan/diff/compare findings and gate scores are unchanged. This first phase does not observe Cursor, prove semantic conflicts, implement effective-policy inheritance/change-impact analysis, or update published v0.24.0 artifacts/Action refs. Whole-repository supported-source preflight still applies.

Validation:

  • Windows: 572 tests, 560 passed and 12 platform skips.
  • WSL Linux: all 28 new model/integration tests passed.
  • Built wheel + sdist; wheel-only installed acceptance passed all 17 journeys, including three-entrypoint scope behavior, multi-file co-activation, unknown metadata, source lines, privacy and error handling.
  • Existing demo remains F 56; repository self-scan remains A 100; staged diff whitespace check passed.
  • Manual pinned-repository smoke on c334dd38fd6dcf06ac7d2d6374a2abaa94f89b31: five completed scans and one expected typed rejection for the pinned Reaparr dangling source; no acquisition errors. All maintained expectations match. The retained report identity matches this 17-module runtime (af0ca24b63f7d502711e0addbab8989ec6f839ea74a2af54d3e681cb4d84a5f7). This is compatibility evidence, not six successful scans or an independent accuracy estimate.

These are deterministic development and installation checks, not independent accuracy or user-adoption evidence.

@LE0-Lin
LE0-Lin merged commit e68506c into main Nov 2, 2026
26 checks passed
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.

1 participant