@luxia/domain-rules
v0.0.8
Published
Agnos rules domain plugin
Downloads
961
Readme
@luxia/domain-rules
agnos domain plugin that owns the rules category: a single project-wide instructions file that every active agent should read.
What it does
- Owns the
rulesfield inagnos.json. - Resolves
agnos.json#rules.sourceto an absolute path and hands it to each agent'shandles.rules.onInitialize. - Creates the rules file on disk if it does not exist (so a fresh project ends up with a starter
AGENTS.md). - Implements
movesoagnos rules <new-path>can relocate the file safely.
The default location is ./AGENTS.md. Override it with agnos rules ./docs/agents.md or by editing agnos.json directly.
Why a domain for one file?
Because every agent has a different opinion about what to call it: Claude Code wants CLAUDE.md, Codex wants AGENTS.md, Cursor wants .cursorrules, and the next tool will invent something new. agnos keeps one canonical source and lets each agent plugin decide how to expose it (symlink, copy, or in-place if the names already match).
Install
You usually get this for free with @luxia/agnos. Standalone:
pnpm add -D @luxia/domain-rulesConfiguration
{
"rules": { "source": "./AGENTS.md" }
}source is project-relative. The file is created on first install if missing.
CLI
| Command | What it does |
| -------------------- | ---------------------------------------------------------------------------- |
| agnos rules | Show the current rules source. |
| agnos rules <path> | Set or relocate the rules source. Existing content is moved, not duplicated. |
License
MIT.
