chore(rtk): AGENTS.md as the shared instruction file, docs rtk filter - #44
Merged
Merged
Conversation
Adopts getmanza/app#4104. Moves the root CLAUDE.md body into AGENTS.md so Grok, Cursor, Copilot and Codex read the same project instructions Claude Code imports; CLAUDE.md becomes a stub. Adds docs/.rtk/filters.toml for the docs site's `rake lint` task, whose sh-echoed rubocop invocation and rake/bundler backtrace are pure noise on both a clean pass and a failure.
A command that crashes writes to stderr only; rtk then printed '<name>: ok' under the stack trace. The message now says the output was filtered away and points at the exit code. Test seeds are needed to reproduce an order-dependent failure, so no filter strips them.
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
Adopts getzazu/app#4104 for this repo.
CLAUDE.mdbody (131lines) into a new
AGENTS.md, with a short intro explaining it's shared by Claude Code, Grok,Cursor, Copilot and Codex. Root
CLAUDE.mdis now a 4-line stub that@-importsAGENTS.md(same shape as zazu's). No content was dropped or duplicated.
docs/AGENTS.md(the docsauthoring contract) is a separate, unrelated file and was left untouched, as were
.claude/rules/and
.claude/commands/.CLAUDE.mdpointers in.claude/commands/{lfg,plan,github-review-pr,github-review-comments}.mdthat meant "the project rules" — they now say
AGENTS.md. Repo-wide grep confirms no otherCLAUDE.mdreferences remain outside the stub itself.importmap-plus.gemspec'sspec.fileslist never included either file, so neither ships in the published gem — nothing to fix there.
No
.github/copilot-instructions.mdexists in this repo..rtk/filters.toml— one filter, scoped todocs/.cd docs && bundle exec rake lintisthe only command in the verification workflow the global rtk hook doesn't already rewrite
(
rspec,rubocopandrake testare already covered). Therake linttasksh-echoes thefull 53-file rubocop invocation as one very long line, and on failure also dumps a rake/bundler
backtrace through
Bundler::CLI/Thorinternals — neither is useful signal. New filterdocs-lintstrips both; verified against real captured output for a clean pass and for a realRuboCop offense (
Layout/TrailingEmptyLines), bothrtk trust --yes+rtk verifyclean(156/156 inline tests, including this filter's 2).
30 → 7 lines (plus a
rtk recallpointer). The bigger win is the ~950-character echoedfile-list line disappearing from both cases.
docs/.rtk/filters.toml, not the repo root. rtkresolves project-local filters against the directory a command is actually invoked from, with
no upward walk — and
rake lintonly runs withdocs/as the working directory (it needsdocs/Gemfileanddocs/Rakefile). A root-level.rtk/filters.tomlmatched inrtk hook checkbut silently failed to apply end-to-end once the shell actuallycd'd intodocs/first; moving the file to
docs/.rtk/fixed it. Documented this inAGENTS.mdso the nextperson doesn't rediscover it.
rtk trust --yesstep todocs/bin/setup(the onlybin/setupin thisrepo — there's none at the gem root) — it no-ops when
rtkisn't installed.bundle exec ruby -Itest test/*_test.rborbin/release --dry-run: ran both for real, output is already a handful of clean lines. Did not runbundle exec appraisal generate(10 gemfiles, several againstrails/railsbranches overgit/bundle install — not cheap) or the live-CDN
bin/importmapcommands, so no filter wasbuilt or claimed for those.
docs/. The gem's CLI itself has no visual output,but
docs/is a real deployed Phlex/docs-kit Rails site — I verified this by reading itsapp/views,app/components,app/assetsstructure before deciding. Added a trimmed"Screenshots on PRs and issues" section to
AGENTS.mdcoveringdocs/UI changes: the fourgh … --attachexamples, the quoting rule, create-vs-comment,agent-browser screenshotagainstcd docs && bin/dev, save under the scratchpad,brew upgrade gh. Dropped the native/simulatorand
bin/claude-setupmentions from zazu's version (neither applies here).Test plan
rtk trust --yes+rtk verifyfromdocs/— 156/156 inline tests passrtk hook check "bundle exec rake lint"(fromdocs/) rewrites tortk bundle exec rake lintrtk bundle exec rake lintend-to-end, clean tree — condensed output, exit 0rtk bundle exec rake lintend-to-end, with an injectedLayout/TrailingEmptyLinesoffense— condensed output, exit 1 preserved, offense reverted before commit
bundle exec ruby -Itest test/importmap_test.rb— 45 runs, 0 failures (gem root, unaffectedby this PR)
ruby -c docs/bin/setup— syntax OKgrep -rn "CLAUDE.md"(outside.git) shows only the intentional@AGENTS.mdstub reference
git diff --statreviewed — only the intended 8 files touched,docs/Gemfile.lockrevertedafter an unrelated local
bundle installdiffbundle exec rake test(full suite, live CDNs) orbundle exec appraisal generate— docs/config-only change, out of scope per this repo's own "don't run full testsuites for docs/config PRs" guidance
Summary by cubic
Makes
AGENTS.mdthe shared project instruction file and condensesdocslint output in agent runs.What changed
CLAUDE.mdintoAGENTS.md;CLAUDE.mdis now a stub that imports it.AGENTS.mdis read directly by Grok, Cursor, Copilot, and Codex; Claude Code gets the same file through the stub..claude/commands/*.mdfiles that referencedCLAUDE.mdto referenceAGENTS.md.AGENTS.md: PRs that changedocs/UI must attach before/after captures.docs/.rtk/filters.tomlforbundle exec rake lintand madedocs/bin/setuptrust it idempotently whenrtkis installed.okwhen a crash writes only to stderr.Side effects
docs/AGENTS.mdremains the separate docs authoring contract.docs/.rtk, not the repo root, becausertkresolves filters only in the directory a command runs from.Written for commit e7b81e0. Summary will update on new commits.