smart-tree
AGENTS.md270 starsChanged 10 months 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 checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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 repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
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
- Very specific: line 22
Use anyhow::Result with .context(...).
- Very specific: line 34
Commit format: type: short description where type ∈ {feat, fix, docs, style, refactor, test, chore}.
- Very specific: line 35
Before PR: ensure ./scripts/manage.sh test passes and docs are updated when behavior changes.
- Very specific: line 39
Run st --cleanup after installs and st --security-scan .
- Very specific: line 40
Keep secrets and local settings out of the repo.
- Distinctive: line 41
Prefer local/offline MCP servers.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.
Files
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), andbin/targets forst,mq,m8,n8x.scripts/: Automation (manage.sh,build-and-install.sh) plus helper shell functions.tests/: Rust integration tests; fixtures live alongside intest,test_files, andtest-dirs.docs/andexamples/: 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 fullfor local LLM (candle).cargo run --bin st -- --help— smoke-test the CLI; add flags like--mode ai --compressas needed.cargo testorcargo test name -- --exact --nocapture— run all or targeted tests with output.cargo fmt --all -- --checkandcargo 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::Resultwith.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
tracingmacros; 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 undertest/test_files/test-dirs. - CLI/regression scripts (
test_spicy.sh,test_feature_flags.sh, etc.) can be run directly withbash. - 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 descriptionwheretype∈ {feat, fix, docs, style, refactor, test, chore}. Keep commits focused. - Before PR: ensure
./scripts/manage.sh testpasses 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 --cleanupafter installs andst --security-scan .before releases to detect risky MCP hooks or supply-chain issues. - Keep secrets and local settings out of the repo; confirm
.gitignorecoverage before adding new generated files. - Prefer local/offline MCP servers; discuss any new networked hooks in the PR to ensure review.
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.

