Repository navigation
docs: add codebase docs and agent guidance - #612
Open
lessthanjacob wants to merge 10 commits into
Open
lessthanjacob wants to merge 10 commits into
lessthanjacob wants to merge 10 commits into
Conversation
A recent RuboCop release added Style/DirectiveScope, which flags the disable/enable pair wrapping ViewCollection. The Gemfile allows any 1.x RuboCop and .rubocop.yml enables new cops, so CI picked it up and has failed on main since the #603 dependency bump. Excluding the file in .rubocop.yml instead of using the newer disable-next directive keeps the exemption working on older RuboCop versions the Gemfile still allows. Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
Contributors and coding agents had only the README and CONTRIBUTING.md to go on, neither of which explains how a render works internally or what a change to lib/ has to preserve. The new docs cover the definition/compilation/render model, configuration timing, extension contracts, where each kind of change belongs, testing, and releasing. AGENTS.md (loaded via CLAUDE.md) carries the rules and verification gates an agent must follow. Each doc under docs/ has Diataxis type frontmatter plus OKF generated/verified trust fields, so readers can tell whether a person has checked it against the code since its last change. Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
The docs under docs/ serve anyone working in the codebase, including maintainers and agents, not only outside contributors. The README already covers users, so no qualifier is needed. Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
Mermaid's sequence-diagram parser treats ";" as a statement separator, so four message labels split mid-line and mermaid-cli 11 failed to render the diagram. Commas keep the same meaning and parse everywhere. Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
Ruby visibility doesn't mark a compatibility boundary, and two classes the README tells users to subclass, Transformer and AutoExtractor, were tagged @api private. Untag both, and tag the private AutoExtractor#extractor @api public since the README has subclasses override it. The docs and AGENTS.md now define public API as everything not tagged @api private that users call, subclass, or override. Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
AutoExtractor#extractor gained an @api public tag; it never had an @api private one to remove. Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
lessthanjacob
marked this pull request as ready for review
October 21, 2026 23:36
An append-only verified list grows with every re-review without adding information the trust rule uses, which only reads each reviewer's latest date. A re-review now updates the reviewer's existing entry, and git history keeps the earlier dates. Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
Co-authored-by: claude-code/claude-opus-5-5 <noreply@anthropic.com> Signed-off-by: Jacob Sheehy <jacobjsheehy@gmail.com>
This branch has not been deployed
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
Written by the author.
Changes
Added
docs/adds an architecture explanation, configuration and extension-point references, and how-tos for making changes, testing, releasing, and writing docs, indexed indocs/index.md.AGENTS.mdsets hard rules, verification gates, and gotchas, and points agents todocs/index.mdfirst.typeplus OKFgenerated/verifiedfrontmatter, so a reader can tell whether a person checked it against the code since its last change.Changed
TransformerandAutoExtractordrop their@api privatetags, and the privateAutoExtractor#extractoris tagged@api public, since the README has users subclass both and overrideextractor.Fixed
Metrics/ClassLengthexemption forViewCollectionmoves from an inlinedisable/enablepair, whichStyle/DirectiveScopenow flags, to.rubocop.yml.Context
Why This Approach
architecture.md, not in separate decision records, so it changes in the same edit as the mechanism.docs/index.mdis a hand-maintained table rather than generated, so there is no task or script to maintain for seven docs.architecture.mdcover where things live.@apitags and the README, not Ruby visibility: nearly everything in Ruby is reachable, so visibility can't mark a compatibility boundary.TransformerandAutoExtractoravoids carrying a "documented beats tagged" exception in the docs.Testonmainhas failed onStyle/DirectiveScopesince d1e407b, so no PR can go green without it..rubocop.ymlinstead of a# rubocop:disable-nextdirective: the Gemfile allowsrubocop ~> 1.44, and the installed 1.88.2 doesn't recognizedisable-next(1.91.0 does).Testing: CI green on fa9a100 (Ruby 3.1–4.0, CodeQL, DCO); all three diagrams render
testpasses on Ruby 3.1, 3.2, 3.3, and 4.0; CodeQL and DCO pass.bundle exec rakelocally on 4fdf9b9 (later commits touch onlyCHANGELOG.mdand Markdown underdocs/andAGENTS.md): 395 examples, 0 failures; RuboCop reports no offenses.architecture.mdrenders with@mermaid-js/mermaid-cli@11at 6322b47. Before that commit, the sequence diagram failed to parse because;in a message label ends the statement.AGENTS.mdanddocs/resolves, eachdocs/index.mdrow matches its doc's frontmatter, and all frontmatter loads with plainYAML.safe_load.docs/was checked against the code, with each example run. Wrong claims were corrected and unsupported rationale removed.verifiedfield.Checklist
current as of fa9a100
🤖 Generated with Claude Code