Problem
NEXUS currently uses a single monolithic instruction file applied to the entire project. The AI coding tool ecosystem has moved toward scoped rules — instructions that apply only to specific directories or file types.
Cursor's MDC format and GitHub Copilot's applyTo globs are the leading implementations of this pattern (r/cursor, April 2026). A single global rules file is increasingly at odds with where tooling is heading.
Solution
Support a scoped rules directory in .nexus/rules/:
.nexus/
rules/
global.md # applies to all files (projected to all tools)
src/api.md # applies only when working in src/api/
src/ui.md # applies only when working in src/ui/
tools/tui.md # applies when editing the TUI source
Each file supports YAML frontmatter for scope definition:
---
applyTo: "src/api/**"
tools: [claude-code, cursor, copilot]
---
# API Rules
Always validate request bodies at the boundary...
Projection behaviour
global.md → projected to all tools as the base instruction
- Scoped files → projected to tools that support glob scoping (Cursor MDC, Copilot instructions)
- For tools without glob support (Windsurf, Cline) → scoped rules are appended to the global file with a section header
Dependencies
Requires #17 (driver system) and #80 (AGENTS.md projection).
Problem
NEXUS currently uses a single monolithic instruction file applied to the entire project. The AI coding tool ecosystem has moved toward scoped rules — instructions that apply only to specific directories or file types.
Cursor's MDC format and GitHub Copilot's
applyToglobs are the leading implementations of this pattern (r/cursor, April 2026). A single global rules file is increasingly at odds with where tooling is heading.Solution
Support a scoped rules directory in
.nexus/rules/:Each file supports YAML frontmatter for scope definition:
Projection behaviour
global.md→ projected to all tools as the base instructionDependencies
Requires #17 (driver system) and #80 (AGENTS.md projection).