navra
AGENTS.md2 starsChanged 5 months agoApache-2.0View on GitHub
All AI agents working in this project must follow these rules. These apply to all agents: main session, subagents, worktree agents, and team members. Building and testing this workspace is HEAVY: full builds take gigabytes of RAM per rustc/linker process, and the navra-server test binaries each spawn real server processes. The primary development machine is the user's daily-driver workstation — running heavy jobs there disrupts the user's desktop and is treated as a critical process failure. 1. No heavy builds…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,040 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- benchSkill
- buildSkill
- checkSkill
- implementSkill
- navra-diagnoseSkill
- navra-initSkill
- navra-policySkill
- testSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
30 rules. About 0 are common, 19 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 3
All AI agents working in this project must follow these rules.
- Very specific: line 27
Check resources before and during: Before starting work on the build machine, check free -g, df -h, current load (uptime), and that no …
- Very specific: line 40
Use just test-server-guarded (serialized + a watchdog that aborts if more than 10 navra processes are alive at once) — preferred, or plain …
- Very specific: line 43
Run ONE filtered test at a time: cargo test -p navra-server --test <binary> <name> -- --test-threads=1 cargo test -p <other-crate> may run …
- Distinctive: line 55
When referencing files, use exact paths relative to the project root.
- Distinctive: line 66
Read CLAUDE.md for architecture, conventions, and build commands
- Very specific: line 67
Read .lean/plan.yml to understand what's in progress (generated from .lean/items/*.yml, the source of truth — regenerate with bash …
- Distinctive: line 70
Run git log --oneline -10 for recent context
- Very specific: line 71
If assigned a crate, read its lib.rs top-level doc comment
- Distinctive: line 75
Do not re-read files you already have in context
- Distinctive: line 76
If you need a fact about the codebase, grep or read — do not guess
- Very specific: line 77
When switching crates, read the new crate's lib.rs and test files
- Distinctive: line 81
Before claiming any work is complete:
- Very specific: line 83
Tests pass: run on the designated build machine per rule 0 — cargo test -p <crate> for non-server crates, just test-server-guarded (or one …
- Distinctive: line 89
No new warnings: read the full build output, not just the exit code
- Distinctive: line 90
Security warnings are fatal: if clippy or your own review flags a security concern, fix it or escalate — never defer
- Distinctive: line 93
If tests fail, fix them. Do not report partial success as complete.
- Very specific: line 99
Never commit: .env, *.pem, *.key, Cargo.lock changes (let the build update it), model weights, database files
- Distinctive: line 101
Never force push, rewrite history, or run destructive git commands
- Distinctive: line 102
Write commit messages in imperative mood: "add X", not "added X"
- Distinctive: line 130
If two agents need to change the same file, they cannot run in parallel — sequence them or have one agent do both changes
- Distinctive: line 135
Every agent in a worktree must:
- Distinctive: line 145
When working as part of a Claude Code team:
- Distinctive: line 149
No silent work: if you hit a blocker, message the lead immediately
- Distinctive: line 150
No scope creep: do your assigned task, nothing more
- Distinctive: line 151
Prefer tasks in ID order (lowest first) when multiple are available
- Distinctive: line 155
Before modifying a crate, understand its patterns:
- Very specific: line 157
Check for a local test_ctx() helper — use it, don't invent your own
- Very specific: line 158
Check the error handling pattern: CallToolResult::error() vs anyhow
- Very specific: line 159
Check whether the crate uses #[tokio::test] or sync tests
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Rules
All AI agents working in this project must follow these rules. These apply to all agents: main session, subagents, worktree agents, and team members.
0. Build Machine Rules (ABSOLUTE — no exceptions)
Building and testing this workspace is HEAVY: full builds take gigabytes of RAM per rustc/linker process, and the navra-server test binaries each spawn real server processes. The primary development machine is the user's daily-driver workstation — running heavy jobs there disrupts the user's desktop and is treated as a critical process failure.
- No heavy builds on the user's workstation.
cargo build,cargo test,cargo clippy, andcargo checkmust NEVER run on the machine you develop on. The only permitted cargo commands there arecargo fmt/cargo fmt --check. Run all compilation and tests on the designated build machine (ask the lead/operator which host that is — it is reached over SSH and configured as a git remote). Workflow: push your branch to that remote, clone or check out into your OWN directory there (one per agent, never shared), and iterate fix → commit → push → re-test over SSH. Never edit files on the build machine directly; git is the only transport. - Check resources before and during. Before starting work on
the build machine, check
free -g,df -h, current load (uptime), and that no stray processes from earlier runs are alive (pgrep -f 'target/debug/navra'— kill any you find, report them). If memory or disk are tight, or load is already high, stop and coordinate instead of piling on. While your jobs run, they must stay within the resource envelope below. - navra-server tests are serialized, EVERYWHERE. Plain
cargo test -p navra-serverruns every integration binary in parallel and each spawns multiple navra server processes — dozens of navra instances at once, on any machine. This is whyjust test-crate navra-serveris blocked. The rule applies on every machine, including the build machine:- Use
just test-server-guarded(serialized + a watchdog that aborts if more than 10 navra processes are alive at once) — preferred, or plainjust test-server, or - Run ONE filtered test at a time:
cargo test -p navra-server --test <binary> <name> -- --test-threads=1cargo test -p <other-crate>may run in parallel on the build machine, but never more than one cargo invocation at a time per agent. Never run two test-server invocations concurrently.
- Use
- Clean up after yourself: kill any navra test processes you
started (
pkill -f 'target/debug/navra'), tell the lead which directory you used on the build machine, and leave no stray processes behind.
1. Path Precision
When referencing files, use exact paths relative to the project root.
navra-auth/src/permissions/acl.rs:42— correctnavra-core/tests/session_test.rs— correct- "the security file" — wrong
- "acl.rs" — wrong (which crate?)
2. Context Protocol
Session start
- Read
CLAUDE.mdfor architecture, conventions, and build commands - Read
.lean/plan.ymlto understand what's in progress (generated from.lean/items/*.yml, the source of truth — regenerate withbash ~/.claude/lean/scripts/generate-plan.sh) - Run
git log --oneline -10for recent context - If assigned a crate, read its
lib.rstop-level doc comment
During work
- Do not re-read files you already have in context
- If you need a fact about the codebase, grep or read — do not guess
- When switching crates, read the new crate's
lib.rsand test files
3. Work Quality Gates
Before claiming any work is complete:
- Tests pass: run on the designated build machine per rule 0 —
cargo test -p <crate>for non-server crates,just test-server-guarded(or one filtered test at a time) for navra-server - Clippy clean:
cargo clippy -p <crate> -- -D warningson the designated build machine - No new warnings: read the full build output, not just the exit code
- Security warnings are fatal: if clippy or your own review flags a security concern, fix it or escalate — never defer
If tests fail, fix them. Do not report partial success as complete.
4. Git Discipline
- Sign all commits:
git commit -s -m "description" - One feature = one commit. Commit immediately after tests pass.
- Never commit:
.env,*.pem,*.key,Cargo.lockchanges (let the build update it), model weights, database files - Never force push, rewrite history, or run destructive git commands
- Write commit messages in imperative mood: "add X", not "added X"
5. Worktree Protocol
When to use worktrees
- Parallel work on independent crates (e.g., tests + docs)
- Multi-agent team assignments
- Experimental changes that might not land
How worktrees work
- Plan on main: design the approach, decompose into crate-scoped work packages, identify file ownership boundaries
- Implement in worktree: each agent gets its own worktree on its own branch, modifying only its assigned crates
- Commit before exiting:
git add -A && git commit -s -m "summary"— uncommitted work is lost when the worktree is cleaned up - Merge back:
git merge --no-ff <worktree-branch> -m "Merge: description"
File ownership
Crate boundaries are the natural ownership boundary. When multiple agents work in parallel:
- Each agent owns one or more crates (all files under that crate dir)
- Shared files (
Cargo.tomlworkspace,CLAUDE.md,AGENTS.md) are owned by the lead session — agents do not modify them - If two agents need to change the same file, they cannot run in parallel — sequence them or have one agent do both changes
Agent checklist
Every agent in a worktree must:
- Read
CLAUDE.mdandAGENTS.mdat session start - Read the target crate's
lib.rsand existing tests - Run tests before and after changes
- Commit all work before finishing
- Report what was done, what was not, and why
6. Team Coordination
When working as part of a Claude Code team:
- Lead decomposes the task, assigns crates, creates the task list
- Members claim tasks, work in worktrees, report via SendMessage
- No silent work: if you hit a blocker, message the lead immediately
- No scope creep: do your assigned task, nothing more
- Prefer tasks in ID order (lowest first) when multiple are available
7. Crate Conventions
Before modifying a crate, understand its patterns:
- Check for a local
test_ctx()helper — use it, don't invent your own - Check the error handling pattern:
CallToolResult::error()vsanyhow - Check whether the crate uses
#[tokio::test]or sync tests - Match the existing naming:
test_deny_wins_over_allow, nottest1 - Respect the dependency layering in
CLAUDE.md— never add a dependency that violates the crate hierarchy
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

