Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
Loading