# Rule glob overlap audit (Ordio)

**Last Updated:** 2026-04-03  
**Purpose:** Document intentional overlap on hot paths so agents do not treat multiple matching rules as “errors.” Regenerate metrics with `python3 scripts/ai/rule-footprint.py`.

## Summary

| Area | Rules that can match together | Notes |
|------|-------------------------------|--------|
| Comparison pages | `comparison-pages-core.mdc`, `comparison-pages-content.mdc`, `comparison-pages-schema-meta.mdc` | **Intentional split** — same glob `v2/pages/compare_*.php`; shared guidance was split for context efficiency. |
| Tools | `tools-pages.mdc`, `tools-prioritization.mdc` | **Different globs** — `tools-pages.mdc` for PHP/FAQ/content; `tools-prioritization.mdc` for `docs/content/tools/*.{md,json}` and `v2/scripts/tools/*.php`. Overlap on tools **documentation** edits can attach both if paths match both patterns. |
| ShiftOps UI | `shiftops-frontend-core.mdc`, `shiftops-frontend-qa.mdc` | **Intentional pair** — same ShiftOps front-end globs; QA adds checklist patterns. |
| API | `api-endpoints-core.mdc`, `api-endpoints-security.mdc` | **Intentional pair** — complementary; per-file globs in each file. |
| Blog JSON | Multiple `blog-*.mdc` rules | Typical edits to `v2/data/blog/posts/**/*.json` may match **blog-json-edit-prohibition**, **blog-backup**, topic-specific blog rules — verify globs in each rule before assuming redundancy. |
| Base | `base-components.mdc` | Single primary rule for `v2/base/*.php`; other rules rarely override—still read `global.mdc`. |

## Recommendations

1. **Do not merge** the comparison or ShiftOps front-end splits without a context-budget review—they exist to limit tokens per rule file.
2. **Fix stale `relatedRules`** in any `.mdc` that still points at deleted filenames (e.g. old `tools-pages-*` shards); use `tools-pages.mdc` + archive docs instead.
3. When editing **tools** prioritisation docs only, you may get `tools-prioritization.mdc` without `tools-pages.mdc`—expected.

## Related

- [`rule-hierarchy.md`](rule-hierarchy.md)
- [`../.cursor/rules/README.md`](../../.cursor/rules/README.md)
