From b0fddae3e17184380bf19c8f1083960544fcd8fc Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Thu, 5 Mar 2026 11:43:16 -0800 Subject: [PATCH 1/2] Add AGENTS.md and CLAUDE.md for AI coding agent guidance --- AGENTS.md | 35 +++++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 36 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..ca17e51 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,35 @@ +# AGENTS.md + +This file provides guidance to AI coding agents when working with code in this repository. + +## What this project is + +`code_ownership` is a Ruby gem that helps engineering teams declare and query ownership of code. It supports multiple ownership mechanisms: package-based ownership (via `package.yml`), team-based glob patterns, and file annotations. + +## Commands + +```bash +bundle install + +# Run all tests (RSpec) — note: includes a native extension compile step +bundle exec rake default # compiles extension + runs specs + +# Run specs directly (after compiling) +bundle exec rspec + +# Run a single spec file +bundle exec rspec spec/path/to/spec.rb + +# Lint +bundle exec rubocop +bundle exec rubocop -a # auto-correct + +# Type checking (Sorbet) +bundle exec srb tc +``` + +## Architecture + +- `lib/code_ownership.rb` — public API: `CodeOwnership.for_file`, `CodeOwnership.validate!`, `CodeOwnership.for_team` +- `lib/code_ownership/` — mapper plugins (each ownership mechanism is a mapper), `Ownership` value object, configuration loading, and CLI +- `spec/` — RSpec tests; `spec/fixtures/` has sample application structures with various ownership configurations 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 a17aa496c551d49d7c4e9b75a7e021964b8e0e86 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger <697964+dduugg@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:01:21 -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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ca17e51..e2db455 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 @@ -32,4 +30,4 @@ bundle exec srb tc - `lib/code_ownership.rb` — public API: `CodeOwnership.for_file`, `CodeOwnership.validate!`, `CodeOwnership.for_team` - `lib/code_ownership/` — mapper plugins (each ownership mechanism is a mapper), `Ownership` value object, configuration loading, and CLI -- `spec/` — RSpec tests; `spec/fixtures/` has sample application structures with various ownership configurations +- `spec/` — RSpec tests