From db6ef4b52cb644dc78d488567a56ab9d1c33ff03 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Thu, 5 Mar 2026 11:39:42 -0800 Subject: [PATCH 1/2] Add AGENTS.md and CLAUDE.md for AI coding agent guidance --- AGENTS.md | 33 +++++++++++++++++++++++++++++++++ CLAUDE.md | 1 + 2 files changed, 34 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..7f12f41 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,33 @@ +# AGENTS.md + +This file provides guidance to AI coding agents when working with code in this repository. + +## What this project is + +`packs` is a Ruby gem that provides the specification and development CLI for the packs packaging system — a way to modularize Ruby applications. It provides `bin/packs` commands to create packs, add dependencies, and manage pack configuration. + +## Commands + +```bash +bundle install + +# Run all tests (RSpec) +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/packs.rb` — public API entry point +- `lib/packs/` — core classes: `Pack` (represents a single package), `Configuration`, `Formatter`, and CLI command implementations +- `bin/packs` — CLI executable; uses the library to expose commands like `create`, `add_dependency`, `move` +- `spec/` — RSpec tests; `spec/fixtures/` contains sample Ruby application structures used in integration tests 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 bdc41d9a17a91836d91cd74b7436ddf27b327f83 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Thu, 5 Mar 2026 11:51:45 -0800 Subject: [PATCH 2/2] Fix inaccuracies in AGENTS.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove redundant `# AGENTS.md` heading (filename already identifies it) - Remove nonexistent `Formatter` and `Pack` classes from architecture description (`Pack` comes from the `packs-specification` gem; there is no `Formatter` in lib/packs/) - Fix `spec/fixtures/` reference — this directory doesn't exist; tests use temp directories via `packs/rspec/support` - Add `lib/packs/private/` entry explaining the internal implementation layer - Note that `bin/packs` runs interactive mode when called with no arguments - List additional CLI commands (`validate`, `check`) for completeness Co-Authored-By: Claude Sonnet 4.6 (1M context) --- AGENTS.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7f12f41..75c5f3d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,10 +1,8 @@ -# AGENTS.md - This file provides guidance to AI coding agents when working with code in this repository. ## What this project is -`packs` is a Ruby gem that provides the specification and development CLI for the packs packaging system — a way to modularize Ruby applications. It provides `bin/packs` commands to create packs, add dependencies, and manage pack configuration. +`packs` is a Ruby gem that provides the development CLI for the packs packaging system — a way to modularize Ruby applications. It provides `bin/packs` commands to create packs, move files between packs, add dependencies, and manage pack configuration. ## Commands @@ -28,6 +26,7 @@ bundle exec srb tc ## Architecture - `lib/packs.rb` — public API entry point -- `lib/packs/` — core classes: `Pack` (represents a single package), `Configuration`, `Formatter`, and CLI command implementations -- `bin/packs` — CLI executable; uses the library to expose commands like `create`, `add_dependency`, `move` -- `spec/` — RSpec tests; `spec/fixtures/` contains sample Ruby application structures used in integration tests +- `lib/packs/` — core library: `Configuration`, `CLI` (Thor-based command definitions), post-processors (`RubocopPostProcessor`, `CodeOwnershipPostProcessor`, `UpdateReferencesPostProcessor`), and the `UserEventLogger` interface +- `lib/packs/private/` — internal implementation; `interactive_cli/` contains the interactive TUI mode +- `bin/packs` — CLI executable; runs the interactive mode when called with no arguments, otherwise dispatches to `Packs::CLI` commands like `create`, `add_dependency`, `move`, `validate`, `check` +- `spec/` — RSpec tests; tests use temporary directories created via `packs/rspec/support` rather than static fixtures