navra
CLAUDE.md1 starsChanged 5 months agoApache-2.0View on GitHub
Secure MCP gateway daemon for Linux desktops. Rust workspace. ONNX Runtime is bundled automatically via the ort crate's download-binaries feature — no system packages required. 24-crate Rust workspace. See DESIGN.md for the full crate table, dependency layering, architecture diagrams, and design decisions. After tests pass for a feature, commit immediately. Never accumulate unstaged changes across multiple features. One feature = one commit. Every agent prompt MUST include this instruction: Before finishing, commit all your changes: git add -A && git…
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- benchSkill
- buildSkill
- checkSkill
- implementSkill
- navra-diagnoseSkill
- navra-initSkill
- navra-policySkill
- testSkill
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
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 27
After tests pass for a feature, commit immediately.
- Distinctive: line 36
Every agent prompt MUST include this instruction:
- Distinctive: line 46
When an agent completes in a worktree, merge its branch:
- Distinctive: line 52
Do NOT copy files manually — that loses history, misses files, and creates merge conflicts with other agents.
- Distinctive: line 69
Same commit: when adding, removing, or changing a feature, update the relevant documentation in the same commit.
- Distinctive: line 72
No stale counts: never hardcode counts (tests, proofs, crates) that will drift.
- Very specific: line 82
Verify claims against code: before writing that navra "does X", grep for the implementation.
- Very specific: line 158
All async tests use #[tokio::test]
- Very specific: line 177
Never use pkill — find and kill specific PIDs
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
navra
Secure MCP gateway daemon for Linux desktops. Rust workspace.
Build
ONNX Runtime is bundled automatically via the ort crate's
download-binaries feature — no system packages required.
# Build
cargo build
# Run
cargo run -- serveWorkspace
24-crate Rust workspace. See DESIGN.md for the full crate table,
dependency layering, architecture diagrams, and design decisions.
Agent Workflow (MANDATORY)
Commit after every verified feature
After tests pass for a feature, commit immediately. Never accumulate unstaged changes across multiple features. One feature = one commit.
git add -A && git commit -s -m "description"Agents must commit in their worktrees
Every agent prompt MUST include this instruction:
Before finishing, commit all your changes:
git add -A && git commit -s -m "your summary"
This ensures the worktree branch survives cleanup. Without a commit, worktree removal destroys all agent work.
Merge agent work via git merge, not file copy
When an agent completes in a worktree, merge its branch:
git merge --no-ff worktree-agent-xxx -m "Merge: feature description"Do NOT copy files manually — that loses history, misses files, and creates merge conflicts with other agents.
Never let worktrees accumulate
Merge or discard each worktree as soon as the agent completes. Stale worktrees with uncommitted changes will be lost on cleanup.
See AGENTS.md for parallel development rules.
Documentation Maintenance (MANDATORY)
Documentation is a deliverable, not an afterthought. Inaccurate docs are worse than missing docs — they actively mislead users.
Rules
- Same commit: when adding, removing, or changing a feature, update the relevant documentation in the same commit. A feature without doc updates is not done.
- No stale counts: never hardcode counts (tests, proofs, crates) that will drift. If you must state a count, grep the codebase for the real number — do not copy from memory or another doc.
- No duplicate sources of truth: the docs site (
docs/content/) is canonical for user-facing content. Root-level markdown files are for developer workflow only. Never duplicate content between them — link instead. - Delete, don't preserve: stale docs, frozen one-time evals, and internal decision logs do not belong in user-facing docs. Git has history. Delete without stubs.
- Verify claims against code: before writing that navra "does X", grep for the implementation. If the code doesn't do X, don't document X.
What to update where
- Crate changes (add/remove/rename):
DESIGN.mdcrate table and dependency graph, crate count in this file,TESTING.md. - New tools, hooks, or config fields:
docs/content/docs/configuration/_index.mdand the relevant section indocs/content/docs/security/_index.mdor guides. - IFC, auth, or safety changes:
docs/content/docs/security/_index.mdanddocs/content/docs/learn/information-flow-control.md. - Proof count changes (Kani/Verus/TLA+):
docs/content/docs/architecture/_index.mdanddocs/content/docs/learn/what-kani-proves.md. - Known limitations or security gaps:
.lean/items/work item, not a comment in a design doc.
Conventions
Naming
- Tool names are prefixed with module name:
file_read,git_status - Operations are string-based, module-namespaced:
"read","git.commit" - Config fields use snake_case in TOML
Error Handling
- Modules return
CallToolResult::error(msg)for user-facing errors - Infrastructure errors use
anyhow::Resultin server code - Model loading failures are logged and skipped (graceful degradation)
Testing
2800+ tests. Always use just to run tests — it sets ORT
environment variables, serializes navra-server tests one binary at
a time, and cleans up leaked server processes between runs.
# All tests (workspace parallel + server serialized)
just test
# Workspace only (excludes navra-server)
just test-workspace
# navra-server only (one binary at a time with cleanup)
just test-server
# Single crate
just test-crate navra-coreNEVER run raw cargo test -p navra-server — it spawns multiple
server processes that OOM the machine. The pre-commit hook blocks
this, but use just to avoid the issue entirely.
Doc-test convention: use no_run for examples needing cross-crate
types, text for illustrative examples. Never use ignore.
Prerequisites:
- Ollama with any model for 1 e2e test (
ollama pull qwen2.5:0.5b)
# Build with OTel trace export
just build
# Then: OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 navra mcp serveConventions:
- Unit tests live in
#[cfg(test)] mod testsat the bottom of each file - Integration tests in
tests/directories per crate echo_tool_def()andtest_ctx()helpers are defined locally innavra-core/src/server/tests.rs; other crates define their owntest_ctx()for constructingCallContextin tests- All async tests use
#[tokio::test]
See DESIGN.md for adding modules and tools.
Config
Default path: ~/.config/navra/config.toml
Key sections: [server], [modules.*], [models.*], [[agents]],
[permissions.*], [[upstream]], discover, [[registry]].
See docs/content/docs/configuration/_index.md for the full config
reference, or examples/config.toml for a commented example.
Resource Limits
- Agents using Ollama: serialize, max one concurrent
- Single GPU: serialize with high timeouts
- Background processes: immediately capture PID, verify before using
- Never use
pkill— find and kill specific PIDs - Ollama IS available — don't exclude Ollama-dependent tests
Work Tracking
Work items live in .lean/items/*.yml (source of truth).
plan.yml is a generated index — regenerate with bash ~/.claude/lean/scripts/generate-plan.sh.
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.

