agentleFS
smgglrs-aismgglrs-ai/navra/AGENTS.md

navra

AGENTS.md1 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. When referencing files, use exact paths relative to the project root. Before claiming any work is complete: 1. Tests pass: just test-crate <crate> 2. Clippy clean: cargo clippy -p <crate> -- -D warnings 3. No new warnings: read the full build output, not just the exit code 4. Security warnings are fatal: if clippy or your…

  • Reads credentials

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

26 rules. About 0 are common, 19 are distinctive, and 7 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.

  • 7

    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
  1. Distinctive:

    All AI agents working in this project must follow these rules.

    line 3
  2. Distinctive:

    When referencing files, use exact paths relative to the project root.

    line 9
  3. Distinctive:

    Read CLAUDE.md for architecture, conventions, and build commands

    line 20
  4. Very specific:

    Read roadmap.json to understand what's in progress

    line 21
  5. Distinctive:

    Run git log --oneline -10 for recent context

    line 22
  6. Very specific:

    If assigned a crate, read its lib.rs top-level doc comment

    line 23
  7. Distinctive:

    Do not re-read files you already have in context

    line 27
  8. Distinctive:

    If you need a fact about the codebase, grep or read — do not guess

    line 28
  9. Very specific:

    When switching crates, read the new crate's lib.rs and test files

    line 29
  10. Distinctive:

    Before claiming any work is complete:

    line 33
  11. Distinctive:

    No new warnings: read the full build output, not just the exit code

    line 37
  12. Distinctive:

    Security warnings are fatal: if clippy or your own review flags a security concern, fix it or escalate — never defer

    line 38
  13. Distinctive:

    If tests fail, fix them. Do not report partial success as complete.

    line 41
  14. Very specific:

    Never commit: .env, *.pem, *.key, Cargo.lock changes (let the build update it), model weights, database files

    line 47
  15. Distinctive:

    Never force push, rewrite history, or run destructive git commands

    line 49
  16. Distinctive:

    Write commit messages in imperative mood: "add X", not "added X"

    line 50
  17. Distinctive:

    If two agents need to change the same file, they cannot run in parallel — sequence them or have one agent do both changes

    line 78
  18. Distinctive:

    Every agent in a worktree must:

    line 83
  19. Distinctive:

    When working as part of a Claude Code team:

    line 93
  20. Distinctive:

    No silent work: if you hit a blocker, message the lead immediately

    line 97
  21. Distinctive:

    No scope creep: do your assigned task, nothing more

    line 98
  22. Distinctive:

    Prefer tasks in ID order (lowest first) when multiple are available

    line 99
  23. Distinctive:

    Before modifying a crate, understand its patterns:

    line 103
  24. Very specific:

    Check for a local test_ctx() helper — use it, don't invent your own

    line 105
  25. Very specific:

    Check the error handling pattern: CallToolResult::error() vs anyhow

    line 106
  26. Very specific:

    Check whether the crate uses #[tokio::test] or sync tests

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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.

1. Path Precision

When referencing files, use exact paths relative to the project root.

  • navra-auth/src/permissions/acl.rs:42 — correct
  • navra-core/tests/session_test.rs — correct
  • "the security file" — wrong
  • "acl.rs" — wrong (which crate?)

2. Context Protocol

Session start

  1. Read CLAUDE.md for architecture, conventions, and build commands
  2. Read roadmap.json to understand what's in progress
  3. Run git log --oneline -10 for recent context
  4. If assigned a crate, read its lib.rs top-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.rs and test files

3. Work Quality Gates

Before claiming any work is complete:

  1. Tests pass: just test-crate <crate>
  2. Clippy clean: cargo clippy -p <crate> -- -D warnings
  3. No new warnings: read the full build output, not just the exit code
  4. 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.lock changes (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

  1. Plan on main: design the approach, decompose into crate-scoped work packages, identify file ownership boundaries
  2. Implement in worktree: each agent gets its own worktree on its own branch, modifying only its assigned crates
  3. Commit before exiting: git add -A && git commit -s -m "summary" — uncommitted work is lost when the worktree is cleaned up
  4. 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.toml workspace, 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.md and AGENTS.md at session start
  • Read the target crate's lib.rs and 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() vs anyhow
  • Check whether the crate uses #[tokio::test] or sync tests
  • Match the existing naming: test_deny_wins_over_allow, not test1
  • Respect the dependency layering in CLAUDE.md — never add a dependency that violates the crate hierarchy

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.