agentleFS
8b-is8b-is/smart-tree/AGENTS.md

smart-tree

AGENTS.md275 starsChanged 22 days agoMITView on GitHub

This guide gives contributors the essentials for working on Smart Tree in this repository. Keep updates concise and run the pre-commit checks before opening a PR.

  • 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 33,398 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 repository7 other files it gives its agents.

The file

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

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use anyhow::Result with .context(...).

    line 22
  2. Very specific:

    Commit format: type: short description where type ∈ {feat, fix, docs, style, refactor, test, chore}.

    line 34
  3. Very specific:

    Before PR: ensure ./scripts/manage.sh test passes and docs are updated when behavior changes.

    line 35
  4. Very specific:

    Run st --cleanup after installs and st --security-scan .

    line 39
  5. Very specific:

    Keep secrets and local settings out of the repo.

    line 40
  6. Distinctive:

    Prefer local/offline MCP servers.

    line 41

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

Repository Guidelines

This guide gives contributors the essentials for working on Smart Tree in this repository. Keep updates concise and run the pre-commit checks before opening a PR.

Project Structure & Module Organization

  • src/: Main Rust crate. Key areas: main.rs/cli.rs (entry & clap args), scanner.rs (walks the filesystem), formatters/ (output formats), mcp/ (JSON-RPC tools), mem8/ (persistence), web_dashboard/ (web UI backend), and bin/ targets for st, mq, m8, n8x.
  • scripts/: Automation (manage.sh, build-and-install.sh) plus helper shell functions.
  • tests/: Rust integration tests; fixtures live alongside in test, test_files, and test-dirs.
  • docs/ and examples/: User-facing guides and sample outputs.
  • marqant/: Compression submodule; expert_prompt_engineer/: secondary workspace crate.

Build, Test, and Development Commands

  • ./scripts/manage.sh test — pre-commit bundle: cargo test + cargo clippy -D warnings + cargo fmt --check.
  • cargo build --release — optimized binaries with TUI built-in; use --features full for local LLM (candle).
  • cargo run --bin st -- --help — smoke-test the CLI; add flags like --mode ai --compress as needed.
  • cargo test or cargo test name -- --exact --nocapture — run all or targeted tests with output.
  • cargo fmt --all -- --check and cargo clippy -- -D warnings — enforce style/lints when iterating.
  • ./scripts/build-and-install.sh — rebuild and install locally, clearing shell command cache.

Coding Style & Naming Conventions

  • Rust 2021, 4-space indent. Keep functions small; prefer composition over long match blocks.
  • Use anyhow::Result with .context(...); avoid panics in library code.
  • File/module names snake_case; types/enums struct PascalCase; CLI flags stay kebab-case to match cli.rs.
  • Logging via tracing macros; keep comments brief and in the existing light, direct tone.

Testing Guidelines

  • Primary suite: cargo test; async tests use #[tokio::test].
  • Integration coverage in tests/; data fixtures under test/test_files/test-dirs.
  • CLI/regression scripts (test_spicy.sh, test_feature_flags.sh, etc.) can be run directly with bash.
  • For verbose diagnostics: RUST_LOG=debug cargo test -- --nocapture.
  • Aim for zero clippy warnings and add tests for new branches or error paths.

Commit & Pull Request Guidelines

  • Commit format: type: short description where type ∈ {feat, fix, docs, style, refactor, test, chore}. Keep commits focused.
  • Before PR: ensure ./scripts/manage.sh test passes and docs are updated when behavior changes.
  • PR description should summarize intent, link issues, list relevant feature flags, and include output or screenshots for UX-facing changes (TUI/dashboard).

Security & Configuration Tips

  • Run st --cleanup after installs and st --security-scan . before releases to detect risky MCP hooks or supply-chain issues.
  • Keep secrets and local settings out of the repo; confirm .gitignore coverage before adding new generated files.
  • Prefer local/offline MCP servers; discuss any new networked hooks in the PR to ensure review.

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.