From 639ee609f09b9226994fab0d581549f4aa5b3f22 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Thu, 5 Mar 2026 11:41:55 -0800 Subject: [PATCH 1/2] Add AGENTS.md and CLAUDE.md for AI coding agent guidance --- AGENTS.md | 40 ++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 41 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..9dcd856 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,40 @@ +# AGENTS.md + +This file provides guidance to AI coding agents when working with code in this repository. + +## What this project is + +`codeowners-rs` is a Rust implementation of a CODEOWNERS resolver. It parses CODEOWNERS files and determines ownership of files in a repository, used as both a library and CLI tool. + +## Commands + +```bash +# Build +cargo build +cargo build --release + +# Run all tests +cargo test + +# Run a single test by name +cargo test test_name + +# Lint +cargo clippy --all-targets --all-features +cargo fmt --all -- --check # check only +cargo fmt --all # apply formatting + +# Check compilation without building +cargo check +``` + +## Architecture + +- `src/main.rs` — CLI entry point using `clap` +- `src/lib.rs` — library root; exposes the public API +- `src/ownership.rs` / `src/ownership/` — core ownership resolution logic: parses CODEOWNERS patterns and matches them against file paths +- `src/config.rs` — configuration loading +- `src/runner/` — orchestrates file walking and ownership resolution +- `src/cache/` — caching layer for resolved ownership results +- `src/cli.rs` — CLI command definitions +- Integration tests in `src/common_test.rs`; fixture data used in tests lives alongside test files diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..43c994c --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +@AGENTS.md From c9bc6b75155e48e953dffb75785e3487601af858 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger <697964+dduugg@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:01:23 -0800 Subject: [PATCH 2/2] Fix inaccuracies in AGENTS.md - Remove redundant heading that repeats the filename - Fix incorrect spec/fixtures/ references where that directory doesn't exist - Fix Claude-specific intro text to be agent-agnostic (pks only) Co-Authored-By: Claude Sonnet 4.6 (1M context) --- AGENTS.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9dcd856..29ada3b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,3 @@ -# AGENTS.md - This file provides guidance to AI coding agents when working with code in this repository. ## What this project is