Skip to content

docs: update module READMEs only when their contracts change - #1245

Closed
ashwkun wants to merge 1 commit into
masterfrom
readme-rules
Closed

ashwkun wants to merge 1 commit into
masterfrom
readme-rules

Conversation

@ashwkun

@ashwkun ashwkun commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Module READMEs are updated only when a documented contract changes, and a new JVM check keeps them short and free of history.

Motivation

  • Every production change had to touch its module README (AGENTS.md, plus six "unconditional" CodeRabbit rules including a merge-blocking pre-merge check). With nothing saying what doesn't belong, each change appended a sentence, usually history. Four module READMEs passed 11,000 words, with dates, plan labels, design measurements and test-by-test lists.

What changed

  • AGENTS.md: update the module README only when its purpose, public API, structure, dependencies, threading, or stable names and IDs change; rewrite lines rather than add them; never record history, labels, measurements, test lists or server/security details.
  • .coderabbit.yaml: the module README rule, the three per-path rules, the README path rule and the "Module README updated" pre-merge check now follow that rule instead of requiring an edit for any production change; the stale changelog instruction now points at the PR changelog region and the listener notes list.
  • docs/MODULE_README_TEMPLATE.md: a 500–2,000 word budget, one idea per bullet, nothing after "See also", and a "What doesn't belong" table saying where each kind of detail goes instead.
  • ModuleReadmeBudgetTest (:core:testing): fails when a module README passes 2,000 words, holds dates or plan/decision labels, or has non-list lines after "See also". READMEs over those limits today are listed with their current numbers in core/testing/src/test/resources/module-readme-budget.txt and may only shrink.
  • docs/TESTING.md: lists the new check.

Behavior & compatibility

  • No app behaviour changes. A PR that grows a listed README past its allowance, or adds a date or plan label to one, now fails the unit suite with a message naming the README and the limit.

Release copy

Changed

  • Module READMEs are updated only when a documented contract changes; ModuleReadmeBudgetTest keeps them under 2,000 words with no dates or plan labels, and older READMEs may only shrink.

Test plan

  • :core:testing architecture tests pass locally, including the new ModuleReadmeBudgetTest (3 tests)
  • The check fails as expected when a date is added to a README that has none (verified locally, then reverted)
  • detekt and :core:testing:ktlintCheck pass

Module READMEs no longer have to change with every production change.
AGENTS.md, the README template and the CodeRabbit rules now ask for an
update only when a module's purpose, public API, structure,
dependencies, threading or stable names and IDs change, and list what
doesn't belong in a README. ModuleReadmeBudgetTest keeps READMEs under
2,000 words with no dates or plan labels; older READMEs may only shrink.
@ashwkun ashwkun added the no-user-impact No listener-facing change (CI, docs, internal) label Nov 8, 2026
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 964e4a5 and 0608aec.

Files selected for processing: 6

  • .coderabbit.yaml
  • AGENTS.md
  • core/testing/src/test/java/cx/aswin/boxlore/core/testing/architecture/ModuleReadmeBudgetTest.kt
  • core/testing/src/test/resources/module-readme-budget.txt
  • docs/MODULE_README_TEMPLATE.md
  • docs/TESTING.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

@ashwkun

ashwkun commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

Pushed directly to master in 128ab5d.

@ashwkun ashwkun closed this Nov 8, 2026
@ashwkun
ashwkun deleted the readme-rules branch November 8, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-user-impact No listener-facing change (CI, docs, internal)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant