From e58d2e666fbe01b58850ab2e9423fd65b021fc50 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Thu, 5 Mar 2026 11:34:25 -0800 Subject: [PATCH 1/2] Add AGENTS.md and CLAUDE.md for AI coding agent guidance --- AGENTS.md | 32 ++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 33 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..01bd58c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,32 @@ +# AGENTS.md + +This file provides guidance to AI coding agents when working with code in this repository. + +## What this project is + +`packwerk-extensions` provides checker extensions for [packwerk](https://github.com/Shopify/packwerk) 3, a gradual modularization platform for Ruby. It ships `privacy`, `visibility`, `folder_privacy`, and `layer` checkers that enforce boundaries between packages. + +## Commands + +```bash +bundle install + +# Run all tests (minitest) +bundle exec rake test + +# Run a single test file +bundle exec ruby -Ilib -Itest test/path/to/test.rb + +# Lint +bundle exec rubocop +bundle exec rubocop -a # auto-correct + +# Type checking (Sorbet) +bundle exec srb tc +``` + +## Architecture + +- `lib/packwerk/` — checker implementations, each as a class that implements the packwerk checker interface +- `test/` — minitest tests; `test/fixtures/` holds sample Rails app structures used in tests +- Each checker (e.g. `privacy.rb`, `visibility.rb`, `layer_checker.rb`) reads `package.yml` metadata and decides whether a reference crosses a boundary 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 cc296bb235c693428ad62ae47e9e02e89f562e04 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger <697964+dduugg@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:01:41 -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 01bd58c..a29cbb8 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