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.
- .claude/CLAUDE.mdCLAUDE.md
- Capturing DecisionsSkill
- generating-pikchrSkill
- markdown-authoringSkill
- using-gitSkill
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
- Distinctive: line 4
Consider the project a monorepo containing multiple crates unless explicitly told otherwise.
- Very specific: line 5
Follow the existing crate/workspace layout.
- Very specific: line 6
Treat target/ as build output only.
- Very specific: line 10
NEVER add directly to Cargo.toml files.
- Very specific: line 39
Prefer idiomatic, readable Rust.
- Very specific: line 40
Keep clippy clean; avoid unsafe unless there’s a clear, documented need.
- Very specific: line 41
Use standard Rust naming: snake_case (items), UpperCamelCase (types/traits).
- Distinctive: line 45
If you change behavior, add/adjust tests in the same change.
- Distinctive: line 46
Prefer fast, deterministic tests.
- Very specific: line 50
Follow Conventional Commits (feat:, fix:, docs:, perf:, chore:) for clarity.
- Very specific: line 53
Never make commits directly.
- Very specific: line 60
If you capture architectural decisions, prefer lightweight ADRs under docs/decisions/.
- Very specific: line 64
Keep CHANGELOG.md up to date for user-visible changes.
- Common: line 67
Do not commit secrets. Prefer environment variables for credentials and document configuration defaults.
≈ “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.
Files
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.tomlfiles. - ALWAYS use
cargo add - For the following types of functionality, use:
- CLI:
clap(derive) +clap_completefor completions,clap_mangenfor manpages - Errors:
thiserrorin libraries;anyhowin binaries. - Logging:
tracing+tracing_subscriber. - YAML:
saphyr - Serialization:
serde+serde_json+serde-saphyr - Testing (CLI):
assert_cmd+predicates; snapshots viainsta. - Async:
tokiowhen 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 nextestfor coverage. - Configuration:
config
- CLI:
Build, Test, and Development Commands
just --list— show available recipes (preferred entrypoint ifjustis 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 (requirescargo-deny).just test(orcargo nt) — tests (requirescargo-nextest).just doc-test(orcargo doc-test) — doctests.cargo check --all-targets --all-features— fast compile sanity check.- Optional:
just cov(orcargo cov) — coverage (requirescargo-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
rustfmtdefaults. - Keep clippy clean; avoid
unsafeunless 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 covoutput 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 surecommit.txtis empty before writing to it. Otherwise, append since changes are accumulating prior to commit.
MSRV
- Set
package.rust-versioninCargo.toml(if not already set) and keep it intentional. - CI runs an MSRV compile check when
rust-versionis present.
Docs
- If you capture architectural decisions, prefer lightweight ADRs under
docs/decisions/.
Releases
- Publishing to crates.io requires the
CARGO_REGISTRY_TOKENGitHub Actions secret. - Keep
CHANGELOG.mdup to date for user-visible changes.
Security & Configuration
- Do not commit secrets. Prefer environment variables for credentials and document configuration defaults.
deny.tomlconfigurescargo-denyfor supply chain security: license compliance, vulnerability scanning, and source verification.
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.

