From 943074aedecb5553da84067973bb362be676dd2f Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Thu, 10 Jul 2025 20:29:26 -0400 Subject: [PATCH] expt: an AGENTS.md for agentic coding --- AGENTS.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..25b7a58 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,36 @@ +# AGENTS.md + +## Build Commands +- Build all crates: `cargo build` +- Build specific crate: `cargo build -p ` (e.g., `cargo build -p offline-web-storage`) +- Build with optimizations: `cargo build --release` + +## Test Commands +- Run all tests: `cargo test` +- Run specific test: `cargo test ` (e.g., `cargo test test_dependencies_updated_when_nodes_added`) +- Run tests in specific crate: `cargo test -p ` +- Run tests with output: `cargo test -- --nocapture` + +## Code Style Guidelines + +### Formatting & Imports +- Group imports by std, external crates, and internal modules +- Sort imports alphabetically within groups +- Use block imports with curly braces for multi-imports + +### Types & Naming +- Use snake_case for functions, variables, and modules +- Use PascalCase for types and structs +- Prefix trait implementations with the trait name +- Use Option for nullable values, not unwrap() + +### Error Handling +- Use Result with custom error types +- Implement thiserror::Error for error enums +- Propagate errors with ? operator +- Use descriptive error messages + +### Documentation +- Document public APIs with /// comments +- Include examples in documentation for complex functions +- Explain parameter and return types in function docs \ No newline at end of file