Instructions & rules
Instructions are the baseline context your AI client reads when working in a repository—coding conventions, architecture notes, test commands, or rules that apply only to a particular folder.
Instead of maintaining CLAUDE.md, .github/copilot-instructions.md, and AGENTS.md side by side, you write the Markdown once and point OpenLune at it.
Repository-wide instructions
Section titled “Repository-wide instructions”An entry under instructions without a paths list applies to the whole repository:
version: "0.1"
instructions: project: source: instructions.mdThe source path is relative to the directory containing manifest.yaml (usually openlune/). So source: instructions.md reads openlune/instructions.md.
OpenLune copies your file’s content verbatim into the client’s project-wide instruction file:
| Client | Generated file |
|---|---|
| Claude Code | CLAUDE.md |
| Copilot | .github/copilot-instructions.md |
| Codex, Grok Build, Antigravity | AGENTS.md |
Because every client has only one project-wide instruction file, a manifest can declare at most one entry without paths. If you want to split guidelines by topic or area of the codebase, use path-scoped instructions below.
Path-scoped rules
Section titled “Path-scoped rules”When a guideline only matters for part of the repository—say, Go files, SQL migrations, or frontend components—add a paths list of glob patterns:
version: "0.1"
instructions: project: source: instructions.md
go-style: source: instructions/go.md paths: ["**/*.go"]
api-docs: source: instructions/api.md paths: ["api/**/*.yaml", "docs/api/**"]OpenLune passes your paths patterns straight through to the client’s native rule format—it does not evaluate globs itself.
| Client | Generated file |
|---|---|
| Claude Code | .claude/rules/<id>.md |
| Copilot | .github/instructions/<id>.instructions.md |
| Grok Build | .cursor/rules/<id>.mdc |
| Antigravity | .agents/rules/<id>.md |
| Codex | Not supported (reported as a deviation) |
Things to watch out for
Section titled “Things to watch out for”A few client quirks are worth knowing before you write complex glob patterns:
- Avoid commas inside a single pattern. Copilot, Grok Build, and Antigravity store patterns in a comma-separated field, so brace expansions like
src/**/*.{ts,tsx}cannot be represented there. Write separate list items instead:paths: ["src/**/*.ts", "src/**/*.tsx"] - Codex skips path-scoped rules. Codex does not support glob-scoped rules (only directory-based
AGENTS.mdfiles). If your manifest includes scoped entries, Codex skips them and OpenLune reports that as a deviation duringplanandapply. - Antigravity has a 24,000-byte rule limit. Antigravity truncates rule files larger than 24,000 bytes. Rather than letting a rule get silently cut off, OpenLune reports a deviation and skips any rendered rule that exceeds the limit.
- Content stays literal. OpenLune never evaluates templates, variables, or shell substitutions inside your Markdown files. Any client-native syntax you write is preserved as-is.
- Omitted vs. empty
paths. Omitpathsfor repository-wide instructions; an empty list (paths: []) is rejected so intent stays clear.
Keeping instructions focused
Section titled “Keeping instructions focused”If a single project instruction file starts growing past a couple hundred lines, consider moving domain-specific rules into path-scoped entries or into Skills that load only when needed. Smaller, targeted context usually produces better results across every client anyway.