agentleFS
clayloclaylo/pikchr-tools/AGENTS.md

pikchr-tools

AGENTS.md0 starsChanged 10 months agoApache-2.0View on GitHub

  • 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 31,439 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 repository5 other files it gives its agents.

The file

Show its rules and text

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

14 rules. About 1 is common, 3 are distinctive, and 10 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    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:

    Consider the project a monorepo containing multiple crates unless explicitly told otherwise.

    line 4
  2. Very specific:

    Follow the existing crate/workspace layout.

    line 5
  3. Very specific:

    Treat target/ as build output only.

    line 6
  4. Very specific:

    NEVER add directly to Cargo.toml files.

    line 10
  5. Very specific:

    Prefer idiomatic, readable Rust.

    line 39
  6. Very specific:

    Keep clippy clean; avoid unsafe unless there’s a clear, documented need.

    line 40
  7. Very specific:

    Use standard Rust naming: snake_case (items), UpperCamelCase (types/traits).

    line 41
  8. Distinctive:

    If you change behavior, add/adjust tests in the same change.

    line 45
  9. Distinctive:

    Prefer fast, deterministic tests.

    line 46
  10. Very specific:

    Follow Conventional Commits (feat:, fix:, docs:, perf:, chore:) for clarity.

    line 50
  11. Very specific:

    Never make commits directly.

    line 53
  12. Very specific:

    If you capture architectural decisions, prefer lightweight ADRs under docs/decisions/.

    line 60
  13. Very specific:

    Keep CHANGELOG.md up to date for user-visible changes.

    line 64
  14. Common:

    Do not commit secrets. Prefer environment variables for credentials and document configuration defaults.

    line 67

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

Project Structure

  • Consider the project a monorepo containing multiple crates unless explicitly told otherwise.
  • Follow the existing crate/workspace layout. If creating a new workspace, prefer a simple, discoverable structure (e.g. crates under crates/).
  • Treat target/ as build output only; do not commit artifacts.
  • Capture architectural decisions in Markdown ADRs under docs/decisions/.

Dependencies

  • NEVER add directly to Cargo.toml files.
  • ALWAYS use cargo add
  • For the following types of functionality, use:
    • CLI: clap (derive) + clap_complete for completions, clap_mangen for manpages
    • Errors: thiserror in libraries; anyhow in binaries.
    • Logging: tracing + tracing_subscriber.
    • YAML: saphyr
    • Serialization: serde + serde_json + serde-saphyr
    • Testing (CLI): assert_cmd + predicates; snapshots via insta.
    • Async: tokio when async is required; otherwise stay sync.
    • HTTP: reqwest (client), axum (server) when needed.
    • Paths: camino, since we don't always know when UTF-8 paths are required.
    • Testing: cargo nextest, cargo llvm-cov nextest for coverage.
    • Configuration: config

Build, Test, and Development Commands

  • just --list — show available recipes (preferred entrypoint if just is installed).
  • just check — format, lint, deny, tests (nextest), and doctests.
  • just fmt — format.
  • just clippy — lint (CI-level strict).
  • just deny — check dependencies for security advisories and license compliance (requires cargo-deny).
  • just test (or cargo nt) — tests (requires cargo-nextest).
  • just doc-test (or cargo doc-test) — doctests.
  • cargo check --all-targets --all-features — fast compile sanity check.
  • Optional: just cov (or cargo cov) — coverage (requires cargo-llvm-cov).
  • Optional: markdownlint — lint Markdown files.

Coding Style & Naming Conventions

  • Rust 2024 edition; #![deny(unsafe_code)] in each crate — keep contributions safe and pure Rust.
  • Prefer idiomatic, readable Rust; rely on rustfmt defaults.
  • Keep clippy clean; avoid unsafe unless there’s a clear, documented need.
  • Use standard Rust naming: snake_case (items), UpperCamelCase (types/traits).
  • For public APIs: add rustdoc, examples when helpful, and keep semver impact in mind.

Testing Guidelines

  • If you change behavior, add/adjust tests in the same change.
  • Prefer fast, deterministic tests; use integration tests for end-to-end behavior.
  • just cov output should exceed 95% prior to any commit.

Commit & Pull Request Guidelines

  • Follow Conventional Commits (feat:, fix:, docs:, perf:, chore:) for clarity.
  • PRs ALSO follow conventional commit style, and should include: purpose, scope of files touched, manual checks performed, and open questions.
  • Link related issues if available.
  • Never make commits directly. Write commit message to commit.txt. If branch is clean, make sure commit.txt is empty before writing to it. Otherwise, append since changes are accumulating prior to commit.

MSRV

  • Set package.rust-version in Cargo.toml (if not already set) and keep it intentional.
  • CI runs an MSRV compile check when rust-version is present.

Docs

  • If you capture architectural decisions, prefer lightweight ADRs under docs/decisions/.

Releases

  • Publishing to crates.io requires the CARGO_REGISTRY_TOKEN GitHub Actions secret.
  • Keep CHANGELOG.md up to date for user-visible changes.

Security & Configuration

  • Do not commit secrets. Prefer environment variables for credentials and document configuration defaults.
  • deny.toml configures cargo-deny for supply chain security: license compliance, vulnerability scanning, and source verification.

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.