agentleFS
nizovtsevnvnizovtsevnv/outline-mcp-rs/CLAUDE.md

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…

  • In this repository2 other files it gives its agents.

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

    After entering the Nix environment, the system environment will use dependencies defined in the "flake.nix" file.

    line 24
  2. Very specific:

    Follow code formatting standards cargo fmt.

    line 90
  3. Very specific:

    Use cargo clippy for code quality checks.

    line 91
  4. Very specific:

    Use #[derive(Debug)] for all structures.

    line 92
  5. Very specific:

    Prefer &str over String for function parameters.

    line 93
  6. Very specific:

    Use Result<T, E> for functions that may fail.

    line 94
  7. Distinctive:

    Always follow the decomposition rule "1 structure - 1 file"

    line 100
  8. Distinctive:

    Place automated reusable SH-scripts in the "scripts" directory

    line 101
  9. Distinctive:

    Place temporary scripts in the "temp" directory

    line 102
  10. Very specific:

    Use RUST_LOG to configure logging level

    line 117
  11. Distinctive:

    Prefer debug! logging over println!

    line 118
  12. Very specific:

    Use rust-gdb or lldb for deep debugging

    line 119
  13. Distinctive:

    Use tracing for structured logging

    line 122
  14. Distinctive:

    Do not log sensitive information (passwords, tokens)

    line 124
  15. Distinctive:

    All public functions must be covered by tests

    line 130
  16. Distinctive:

    Never commit secrets, keys, passwords

    line 153
  17. Distinctive:

    Use environment variables for confidential data

    line 154
  18. Distinctive:

    Use prepared statements for database work

    line 156

≈ “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.

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

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 build

GitHub 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 audit and cargo 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 clippy for code quality checks;
  • Use #[derive(Debug)] for all structures;
  • Prefer &str over String for function parameters;
  • Use Result<T, E> for functions that may fail.
  • Naming conventions:
    • snake_case for functions, variables, modules
    • PascalCase for structures, enums, traits
    • SCREAMING_SNAKE_CASE for 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_LOG to configure logging level
  • Prefer debug! logging over println! for debugging
  • Use rust-gdb or lldb for 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

  1. Unit tests - testing individual functions and modules
  2. Integration tests - testing interaction between modules
  3. 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.rs

Security 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 check

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.