Repository navigation
Done
Labels
enhancementNew feature or request
Milestone
Description
Problem
instructions is a single source file published as the client's project-wide instructions. A repository with distinct areas (a frontend and a backend, generated code, a docs tree) cannot give guidance that applies only there. Everything goes into one always-loaded file, or maintainers keep hand-written native rule files next to the OpenLune setup, which is the duplication OpenLune exists to remove.
The brief lists scoped instructions as a later possibility.
Proposal
Make instructions a map of named entries, like agents, skills and mcp. An entry without paths applies to the whole repository; an entry with paths applies only there:
instructions:
project:
source: instructions.md
frontend:
source: instructions/frontend.md
paths: ["web/**"]- Each entry is a resource with an ID, published and owned separately, with literal source bytes preserved. Project instructions no longer need an empty ID as a special case.
- Scope comes from
paths, not from the name.projectis a convention, not a reserved ID. - At most one entry may omit
pathsto start, because every client has a single project-wide file.paths: []is an error, not a synonym for omitted. pathsare passed to the client's native matcher unchanged; OpenLune does not evaluate globs.- A client that cannot express the scope renders its closest behavior as a deviation naming the outcome, for example "applies to the whole repository".
- This replaces
instructions.source. OpenLune has not been released yet, so breaking existing manifests is fine and needs no migration or compatibility path. The old form gets an error naming the new one.
Native forms, from memory of each client's documentation and not rechecked or run:
| Client | Scoped instructions |
|---|---|
| Claude Code | .claude/rules/*.md with paths frontmatter |
| Copilot | .github/instructions/*.instructions.md with applyTo |
| Cursor | .cursor/rules/*.mdc with globs |
| Codex | nested AGENTS.md per directory; no glob matching |
| Antigravity | to be checked |
Open questions
- Glob dialects differ between clients. Is passing the pattern through acceptable, or does that break the "declare once" promise for anything beyond simple directory prefixes?
- Codex scopes by directory only. Is a pattern that is a plain directory prefix published as a nested
AGENTS.md, and anything else a deviation? A nestedAGENTS.mdmay already exist and be unmanaged. - Native rule files have further modes (always apply, apply on request with a description). Is path scope alone enough to start?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity