outline-mcp-rs
CLAUDE.md7 starsChanged 9 months agoMITView on GitHub
You are a professional software architect, Rust developer, tester, and DevOps engineer. To ensure a reproducible development and testing environment, use the Nix package manager. Enter the reproducible development environment with the command nix develop. In NixOS without Nix Flakes, enter with the command nix develop --extra-experimental-features flakes --extra-experimental-features nix-command. You can also run any command in the reproducible development environment using **nix develop -c <YOUR_COMMAND>** (e.g., nix develop -c cargo test). After entering the Nix environment, the system environment…
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
18 rules. About 0 are common, 11 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
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
- Distinctive: line 24
After entering the Nix environment, the system environment will use dependencies defined in the "flake.nix" file.
- Very specific: line 90
Follow code formatting standards cargo fmt.
- Very specific: line 91
Use cargo clippy for code quality checks.
- Very specific: line 92
Use #[derive(Debug)] for all structures.
- Very specific: line 93
Prefer &str over String for function parameters.
- Very specific: line 94
Use Result<T, E> for functions that may fail.
- Distinctive: line 100
Always follow the decomposition rule "1 structure - 1 file"
- Distinctive: line 101
Place automated reusable SH-scripts in the "scripts" directory
- Distinctive: line 102
Place temporary scripts in the "temp" directory
- Very specific: line 117
Use RUST_LOG to configure logging level
- Distinctive: line 118
Prefer debug! logging over println!
- Very specific: line 119
Use rust-gdb or lldb for deep debugging
- Distinctive: line 122
Use tracing for structured logging
- Distinctive: line 124
Do not log sensitive information (passwords, tokens)
- Distinctive: line 130
All public functions must be covered by tests
- Distinctive: line 153
Never commit secrets, keys, passwords
- Distinctive: line 154
Use environment variables for confidential data
- Distinctive: line 156
Use prepared statements for database work
≈ “Common” is an estimate: at least 1 in 5 of the 28,029 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
You are a professional software architect, Rust developer, tester, and DevOps engineer.
Technical Development Environment Requirements
Development, Testing, and Build Tools
- Reproducible development environment with Nix;
- Git version control system;
- Rust programming language with 2024 edition standard;
- Most recent versions of Rust Crates;
- Project configuration, dependency management, build, auto-formatting, and auto-testing tool (Cargo)
- Supporting analyzers (Clippy, Rust Analyzer)
- Shell scripts for automating complex repetitive tasks;
- IDE (e.g., Zed);
- AI Agents (e.g., Claude Code).
Reproducible Development Environment with Nix
To ensure a reproducible development and testing environment, use the Nix package manager.
Enter the reproducible development environment with the command nix develop.
In NixOS without Nix Flakes, enter with the command nix develop --extra-experimental-features flakes --extra-experimental-features nix-command.
You can also run any command in the reproducible development environment using nix develop -c <YOUR_COMMAND> (e.g., nix develop -c cargo test).
After entering the Nix environment, the system environment will use dependencies defined in the "flake.nix" file.
Mandatory Pre-Commit Checks
CRITICAL: These checks MUST be run locally before every commit. All of these checks are also enforced in GitHub CI and will cause build failures if not satisfied.
Required Local Commands (in order):
# 1. Code formatting check (must pass, auto-fixes if needed)
cargo fmt --check
# 2. Linting with no warnings allowed
cargo clippy -- -D warnings
# 3. All tests must pass
cargo test
# 4. Build verification
cargo build --release
# 5. Nix build verification (if using Nix)
nix buildGitHub CI Equivalents:
The GitHub Actions workflow runs the same checks:
- Formatting:
cargo fmt --check(fails if code is not formatted) - Linting:
cargo clippy -- -D warnings(fails on any clippy warnings) - Testing:
cargo test(fails if any tests fail) - Security:
cargo auditandcargo deny check(fails on vulnerabilities) - Build:
cargo build --release(fails if build errors) - Nix:
nix build(fails if Nix build errors)
Pre-Commit Validation Script:
#!/bin/bash
set -e
echo "🔧 Running pre-commit checks..."
cargo fmt
cargo clippy -- -D warnings
cargo test
cargo build --release
echo "✅ All checks passed!"Architectural Principles
Design Principles
- Separation of Concerns - Dividing the system into separate and non-overlapping functional modules
- Resilience - The system's ability to quickly recover from failures
- Parallel Execution - Distributing tasks for simultaneous execution
- Cohesion & Coupling - Module elements are strongly related to each other as they work on the same functionality
- Composition over Inheritance - Object composition is preferable to inheritance for better flexibility
- Open/Closed Principle - Modules should be open for extension but closed for modification
- Dependency Inversion Principle - High-level modules should not depend on low-level modules; both should depend on abstractions. Abstractions should not depend on details; details should depend on abstractions.
- Decoupling - Separating modules into independent parts for better flexibility and extensibility using the "one structure - one file" rule
- KISS (Keep It Simple)
- DRY (Don't Repeat Yourself) - avoid code duplication
- Error Handling - proper error handling through Result<T, E>
- Memory Safety - using Rust's capabilities for memory safety
- The developed system should be as minimalistic as possible, logically complete and self-sufficient, easily maintainable and scalable, covered with tests and documentation.
Code Development and Documentation Standards
Rust Coding Standards
- Avoid dead code;
- Follow code formatting standards
cargo fmt; - Use
cargo clippyfor code quality checks; - Use
#[derive(Debug)]for all structures; - Prefer
&stroverStringfor function parameters; - Use
Result<T, E>for functions that may fail. - Naming conventions:
snake_casefor functions, variables, modulesPascalCasefor structures, enums, traitsSCREAMING_SNAKE_CASEfor constants- Meaningful names that reflect purpose
- Always follow the decomposition rule "1 structure - 1 file"
- Place automated reusable SH-scripts in the "scripts" directory
- Place temporary scripts in the "temp" directory
Rust Documentation Standards
- Primary documentation format RustDocs, for API description OpenAPI;
- Markdown for documentation text formatting;
- Synchronize documentation with codebase;
- Must be documented:
- Public functions and data structures; should be documented in RustDoc format, and public APIs in OpenAPI format;
- Configuration parameters;
- Errors and exceptions;
Logging and Debugging Standards
Debugging
- Use
RUST_LOGto configure logging level - Prefer debug! logging over println! for debugging
- Use
rust-gdborlldbfor deep debugging
Logging
- Use tracing for structured logging
- Logging levels:
error,warn,info,debug,trace - Do not log sensitive information (passwords, tokens)
Testing Standards
Basic Requirements
- Minimum test coverage: 80%
- All public functions must be covered by tests
- Critical security functions require 100% coverage
Test Types
- Unit tests - testing individual functions and modules
- Integration tests - testing interaction between modules
- End-to-end tests - testing full workflows
Test Structure
tests/
├── integration/ # Integration tests
│ ├── mcp_tests.rs # MCP protocol tests
│ ├── http_transport_tests.rs # HTTP transport tests
│ └── common/
│ └── mod.rs # Common test utilities
└── e2e/ # End-to-end tests
└── full_workflow_tests.rsSecurity Standards
Basic Requirements:
- Never commit secrets, keys, passwords
- Use environment variables for confidential data
- Validate all incoming data
- Use prepared statements for database work
- Regularly update dependencies
Security Checks:
# Dependency audit
cargo audit
# Vulnerability check
cargo deny checkDoes 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.

