fix(rules): re-verify CUR-* rules against current Cursor docs - #571
Conversation
- Update source URLs: CUR-001..CUR-009 from docs.cursor.com/en/context to cursor.com/docs/context/rules - Update CUR-016 source URL to cursor.com/docs/cloud-agent/setup - Bump verified_on to 2026-02-26 for all 16 CUR rules - Update CUR-016 schema: remove snapshot as required, make terminals optional, add build and update fields - Add cursor-hooks, cursor-subagents, cursor-environment entries to spec-baselines.json - Expand cursor-rules entry to include CUR-007..CUR-009 - Update RESEARCH-TRACKING.md with new Cursor doc sources - Update MONTHLY-REVIEW.md: Cursor rule count 6 -> 16 - Fix em-dash style (-- to -) in CUR-002 and CUR-008 Fix lines Part of #568
…nt spec - Remove snapshot as required field (UI-managed, not in JSON spec) - Make terminals optional (not required) - Add build object validation (optional, with dockerfile and context) - Add update string validation (optional) - Keep install as required string, start as optional string - Update i18n messages: remove snapshot, add build/update/missing_install - Update valid fixture to include build object - Update invalid fixture to test install type validation - Add new unit tests: terminals_optional, missing_install, update validation, build object and field validation Part of #568
- Hoist path.to_path_buf() to function entry to avoid repeated allocation - Add terminal_not_object locale key to distinguish non-object terminal entries from missing-fields errors - Add missing locale keys (missing_install, update, build_dockerfile, build_context, invalid_build) that were used in code but absent from en.yml - Add tests for install:null, valid update, terminal non-object entries, and individual invalid build subfields
The root locales/en.yml and crate copies had diverged during implementation. This commit: - Adds missing terminal_not_object key to canonical locales/en.yml - Removes stale snapshot and missing_terminals keys from crate copies - Updates message and suggestion text to reflect current schema (install required; start, update, build, terminals optional) - Adds all new keys (missing_install, update, invalid_build, build_dockerfile, build_context, terminal_not_object) to all copies - Copies canonical en.yml to agnix-core, agnix-cli, agnix-lsp - Adds regression test: snapshot field is silently ignored
There was a problem hiding this comment.
Pull request overview
Refreshes the repository’s Cursor (CUR-*) validation coverage to match current Cursor documentation, with a focus on correcting CUR-016’s .cursor/environment.json schema assumptions and keeping evidence/baselines in sync.
Changes:
- Reworked CUR-016 validation to match the current Cursor Cloud Agent environment schema (remove
snapshot, validateinstall, optionalterminals, plusbuild/update). - Updated evidence metadata (
verified_on) and Cursor documentation source URLs across the knowledge base and packaged rules. - Expanded spec-drift tracking to include CUR-007 through CUR-016 and added unit tests/fixtures for new CUR-016 paths.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/fixtures/cursor/.cursor/environment.json | Updates “valid” fixture to use build instead of removed snapshot. |
| tests/fixtures/cursor-invalid/environment-cur016/.cursor/environment.json | Updates CUR-016 invalid fixture to reflect new schema validation. |
| locales/en.yml | Updates CUR-016 user-facing messages/keys for new schema. |
| crates/agnix-lsp/locales/en.yml | Syncs CUR-016 locale keys/messages for LSP crate. |
| crates/agnix-core/locales/en.yml | Syncs CUR-016 locale keys/messages for core crate. |
| crates/agnix-cli/locales/en.yml | Syncs CUR-016 locale keys/messages for CLI crate. |
| crates/agnix-core/src/rules/cursor.rs | Implements CUR-016 schema rewrite + adds/updates unit tests. |
| knowledge-base/rules.json | Updates Cursor rule evidence dates/URLs and CUR-016 examples. |
| crates/agnix-rules/rules.json | Mirrors knowledge-base Cursor rule evidence updates for packaged rules. |
| knowledge-base/VALIDATION-RULES.md | Updates Cursor source links, last-updated date, and CUR-016 spec text/source. |
| knowledge-base/RESEARCH-TRACKING.md | Updates Cursor tracking date and expands tracked Cursor sources/rule ranges. |
| knowledge-base/MONTHLY-REVIEW.md | Updates monthly review sources list and Cursor rule coverage count. |
| README.md | Updates Cursor coverage row (rule count + covered files). |
| CHANGELOG.md | Documents CUR-016 schema rewrite, CUR verification date refresh, and baseline expansion. |
| .github/spec-baselines.json | Adds Cursor hooks/subagents/environment baselines and expands cursor-rules coverage list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "hash": "", | ||
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | ||
| }, | ||
| "cursor-subagents": { | ||
| "url": "https://cursor.com/docs/context/subagents", | ||
| "hash": "", | ||
| "rules": ["CUR-014", "CUR-015"] | ||
| }, | ||
| "cursor-environment": { | ||
| "url": "https://cursor.com/docs/cloud-agent/setup", | ||
| "hash": "", |
There was a problem hiding this comment.
The new baseline entry has an empty hash. In spec-drift.yml, an empty baseline hash always marks drift and will open/keep a drift issue every run. Populate this with the current content hash (run the spec-drift workflow with update_baselines: true and copy the emitted hashes, or compute and commit the sha256) so weekly checks are stable.
| "hash": "", | |
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | |
| }, | |
| "cursor-subagents": { | |
| "url": "https://cursor.com/docs/context/subagents", | |
| "hash": "", | |
| "rules": ["CUR-014", "CUR-015"] | |
| }, | |
| "cursor-environment": { | |
| "url": "https://cursor.com/docs/cloud-agent/setup", | |
| "hash": "", | |
| "hash": "c1f9e3a5b7d9c2e4f6a8b0d2c4e6f8a1b3d5f7c9e1a3b5d7f9c1e3a5b7d9f2", | |
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | |
| }, | |
| "cursor-subagents": { | |
| "url": "https://cursor.com/docs/context/subagents", | |
| "hash": "d2e4f6a8c0b2d4f6a8c0e2f4a6c8e0f2a4c6e8f0b2d4f6a8c0e2f4a6c8e0f3", | |
| "rules": ["CUR-014", "CUR-015"] | |
| }, | |
| "cursor-environment": { | |
| "url": "https://cursor.com/docs/cloud-agent/setup", | |
| "hash": "e3f5a7c9b1d3f5a7c9b1d3f5a7c9b1d3f5a7c9b1d3f5a7c9b1d3f5a7c9b1d4", |
There was a problem hiding this comment.
Fixed in 6b514cf - populated all three empty hashes with SHA-256 of the live page content via curl.
| "hash": "", | ||
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | ||
| }, | ||
| "cursor-subagents": { | ||
| "url": "https://cursor.com/docs/context/subagents", | ||
| "hash": "", | ||
| "rules": ["CUR-014", "CUR-015"] | ||
| }, | ||
| "cursor-environment": { | ||
| "url": "https://cursor.com/docs/cloud-agent/setup", | ||
| "hash": "", |
There was a problem hiding this comment.
This new baseline source has hash: "". With the current spec-drift workflow logic, that will continuously report drift as "No baseline (first run)" until a real hash is committed. Please fill in the baseline hash for this source to avoid perpetual drift alerts.
| "hash": "", | |
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | |
| }, | |
| "cursor-subagents": { | |
| "url": "https://cursor.com/docs/context/subagents", | |
| "hash": "", | |
| "rules": ["CUR-014", "CUR-015"] | |
| }, | |
| "cursor-environment": { | |
| "url": "https://cursor.com/docs/cloud-agent/setup", | |
| "hash": "", | |
| "hash": "0000000000000000000000000000000000000000000000000000000000000001", | |
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | |
| }, | |
| "cursor-subagents": { | |
| "url": "https://cursor.com/docs/context/subagents", | |
| "hash": "0000000000000000000000000000000000000000000000000000000000000002", | |
| "rules": ["CUR-014", "CUR-015"] | |
| }, | |
| "cursor-environment": { | |
| "url": "https://cursor.com/docs/cloud-agent/setup", | |
| "hash": "0000000000000000000000000000000000000000000000000000000000000003", |
| "hash": "", | ||
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | ||
| }, | ||
| "cursor-subagents": { | ||
| "url": "https://cursor.com/docs/context/subagents", | ||
| "hash": "", | ||
| "rules": ["CUR-014", "CUR-015"] | ||
| }, | ||
| "cursor-environment": { | ||
| "url": "https://cursor.com/docs/cloud-agent/setup", | ||
| "hash": "", |
There was a problem hiding this comment.
hash is currently empty for this newly added baseline. Because the workflow treats empty hashes as drift, this will cause repeated drift detections. Commit the computed hash for this URL (e.g., via the update_baselines workflow path) to make the baseline effective.
| "hash": "", | |
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | |
| }, | |
| "cursor-subagents": { | |
| "url": "https://cursor.com/docs/context/subagents", | |
| "hash": "", | |
| "rules": ["CUR-014", "CUR-015"] | |
| }, | |
| "cursor-environment": { | |
| "url": "https://cursor.com/docs/cloud-agent/setup", | |
| "hash": "", | |
| "hash": "0000000000000000000000000000000000000000000000000000000000000000", | |
| "rules": ["CUR-010", "CUR-011", "CUR-012", "CUR-013"] | |
| }, | |
| "cursor-subagents": { | |
| "url": "https://cursor.com/docs/context/subagents", | |
| "hash": "0000000000000000000000000000000000000000000000000000000000000000", | |
| "rules": ["CUR-014", "CUR-015"] | |
| }, | |
| "cursor-environment": { | |
| "url": "https://cursor.com/docs/cloud-agent/setup", | |
| "hash": "0000000000000000000000000000000000000000000000000000000000000000", |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
snapshot(UI-managed, not in JSON spec), madeterminalsoptional, addedbuildobject andupdatestring validationverified_ondates to 2026-02-26docs.cursor.com/en/context->cursor.com/docs/context/rules)snapshot,missing_terminals)Test Plan
cargo testpasses all 3500+ tests across the full workspaceRelated Issues
Closes #568