chore: AGENTS.md as the shared instruction file - #82
Merged
Merged
Conversation
CLAUDE.md becomes a one-line stub importing AGENTS.md. Merges the project rules that lived in CLAUDE.md (tech stack, critical rules, architecture, testing, deploy) into AGENTS.md alongside the existing cross-tool authoring guide, adds a screenshots-on-PRs section (docs-kit is a visual product), and repoints internal CLAUDE.md references to AGENTS.md. No .rtk/filters.toml: bundle exec rspec/rubocop are already rtk-rewritten, bun run build:css is already rtk-rewritten, and bundle exec rake's noise is RSpec's documentation-format example list, which can't be safely line-stripped without risking a hidden failure — AGENTS.md now recommends running rspec and rubocop separately instead of through rake.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.md(tech stack, critical rules, architecture,the mental model, testing, deploy) into
AGENTS.md, ahead of the existingcross-tool authoring guide ("the two things you'll be asked to do", verify
commands). No content dropped — overlapping bullets (e.g. the old "Change the
gem" checklist duplicating Critical Rules) were collapsed into one copy.
CLAUDE.mdis now a 3-line stub (@AGENTS.md+ a pointer to.claude/),matching the shape Claude Code's own docs recommend for a shared
AGENTS.md.AGENTS.mdstating it's the instruction file forevery agent (Claude Code imports it via
CLAUDE.md; other tools read itdirectly).
visual chrome (
DocsUI::components, the docs site itself), so UI changesshould carry before/after pictures via
gh pr create/comment --attach.CLAUDE.mdreferences (that meant "the project rules")to
AGENTS.md:spec/spec_helper.rb,.claude/rules/agents.md,.claude/commands/plan.md(x2),.claude/commands/github-review-comments.md(x2).
(
lib/generators/docs_kit/install/install_generator.rb+templates/agents_md.erb): it already writes/merges a delimited<!-- BEGIN docs-kit --> … <!-- END docs-kit -->block into a consumingsite's
AGENTS.md(neverCLAUDE.md), so this change needed no generatorupdate — verified only, not touched. No
<!-- BEGIN docs-kit -->blockexists in this repo's own
AGENTS.md(that block is only for consumers), sothere was nothing to preserve there.
docs-kit.gemspecships whatevergit ls-filestracks —CLAUDE.mdwasalready shipping in the gem package before this change (now as the stub); no
.gitattributes/.npmignoreexists to adjust..rtk/filters.tomlNot added. Checked every command an agent runs here:
bundle exec rspec,bundle exec rubocop,bun run build:cssare alreadyrewritten by the global rtk hook (
rtk hook checkconfirms it) — no projectfilter needed.
bundle exec rake(spec + rubocop together, thedefaultRake task and whatCI runs) is not rewritten, and its raw output is noisy: a real local run is
1366 lines, dominated by ~950 RSpec
--format documentationexampledescription lines (
.rspecpins that formatter). A line-basedstrip_lines_matchingfilter can't safely tell a passing example line(
renders the expected markup) from a failing one printed the same waywith a
(FAILED - N)suffix in the same tree — Rust's regex engine (what rtkuses) has no lookaround, so there's no safe negative-match pattern either.
Rather than ship a filter that could hide a real failure,
AGENTS.mdnowtells agents to run
bundle exec rspecandbundle exec rubocopseparately(both already rtk-condensed) instead of
bundle exec rakewhen they need toread the result.
gem build/rake release[...]are publish/release commands — out of scopeto run for filter-building per the task brief (no network publishing).
bin/setup,bin/*scripts, or other noisy custom scripts exist in thisrepo to filter.
Adopts getzazu/app#4104.
Test plan
bundle exec rspec— 953 examples, 0 failures (ran in a fresh worktreewith the checked-in
Gemfile.lockcopied over, since it's gitignored)bundle exec rubocop— 151 files inspected, no offenses (0 on thechanged
spec/spec_helper.rb, 151 on the full repo)rtk verify— 154/154 passed.git,vendor,node_modules, the gitignored.claude/worktrees/) forCLAUDE.md—only the intentional self-reference in the new
AGENTS.mdintro remainsSummary by cubic
Moves the project rules from
CLAUDE.mdintoAGENTS.mdso every coding agent reads the same instruction file;CLAUDE.mdis now a thin stub that imports it. No project rules were dropped — overlapping bullets were collapsed into one copy.Changes
AGENTS.mdnow holds the tech stack, critical rules, architecture, testing, deploy, and commands, plus a new screenshots-on-PRs section.CLAUDE.mdreferences toAGENTS.md; the install generator already targets consuming sites'AGENTS.md, so no generator change was needed.Why no
.rtk/filters.tomlbundle exec rspec,bundle exec rubocop, andbun run build:cssare already condensed by the global rtk hook.bundle exec rakeoutput can't be safely line-filtered, soAGENTS.mdnow recommends runningrspecandrubocopseparately when reading results.Written for commit c4281ae. Summary will update on new commits.