docs: restructure README into purpose-built documents#407
Conversation
Split the 821-line README into focused files: - README.md (249 lines): project overview, 3 examples, getting started - EXAMPLES.md: full 12-example language tour (contracts → inference) - DESIGN.md: technical decisions table and prior art - KNOWN_ISSUES.md: bugs and limitations tables (was inline in README) Update CI infrastructure: - New pre-commit hook: check_examples_doc.py validates EXAMPLES.md blocks - check_limitations_sync.py now reads from KNOWN_ISSUES.md (not README.md) - fix-allowlists hook triggers updated to include EXAMPLES.md - limitations-sync hook triggers updated to include KNOWN_ISSUES.md - Hook count 21 → 22 (updated in TESTING.md and CONTRIBUTING.md) Update tests: - test_readme.py: vera block count 13 → 3 (remaining examples in EXAMPLES.md) - test_errors.py: update _extract_readme_error_block() for new section heading - Remove stale allowlist entry pointing to old README line 736 Co-Authored-By: Claude <noreply@anthropic.invalid>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
=======================================
Coverage 90.30% 90.30%
=======================================
Files 49 49
Lines 19100 19100
Branches 220 220
=======================================
Hits 17248 17248
Misses 1848 1848
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds EXAMPLES.md, DESIGN.md, KNOWN_ISSUES.md and refactors README; introduces scripts/check_examples_doc.py and a pre-commit hook to validate Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Git as Git / pre-commit
participant Hook as examples-doc hook
participant Script as scripts/check_examples_doc.py
participant Parser as vera.parser
rect rgba(200,200,255,0.5)
Dev->>Git: git commit
Git->>Hook: run examples-doc
Hook->>Script: execute check_examples_doc.py --files EXAMPLES.md
Script->>Script: extract fenced code blocks
Script->>Parser: parse each `vera` block
Parser-->>Script: parse result (ok or error)
Script->>Hook: exit code/report
Hook-->>Git: hook passes/fails commit
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
CONTRIBUTING.md (1)
74-122:⚠️ Potential issue | 🟡 MinorUpdate hook/docs list to include
EXAMPLES.mdvalidationThe hook count was updated to 22, but the surrounding list still omits the new
EXAMPLES.mdparser check, which makes this section stale.📌 Proposed doc update
-- README, SKILL.md, HTML, and spec code blocks parse correctly +- README, EXAMPLES.md, SKILL.md, HTML, and spec code blocks parse correctly ... python scripts/check_readme_examples.py # verify README code blocks parse +python scripts/check_examples_doc.py # verify EXAMPLES.md code blocks parse python scripts/check_skill_examples.py # verify SKILL.md code blocks parseAs per coding guidelines
**/*.md: Review Markdown files for factual accuracy against the codebase, broken links, and outdated information.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CONTRIBUTING.md` around lines 74 - 122, Update the documentation list of pre-commit hooks to include the new EXAMPLES.md parser validation: add an item like "EXAMPLES.md parser/validation" to the bullet list and ensure the stated hook count (22) and any related sentences reflect this addition; specifically update the section that mentions documentation-source changes and the `site-assets` hook (and references to `scripts/build_site.py` / `scripts/check_site_assets.py`) so it documents that EXAMPLES.md is validated by the site-assets/check scripts.TESTING.md (1)
348-369:⚠️ Potential issue | 🟡 MinorHook table is still out of sync with the new doc split
The section says 22 hooks, but the table is missing
check_examples_doc.py, and thecheck_limitations_sync.pydescription still points to README instead ofKNOWN_ISSUES.md.📌 Proposed doc update
| `check_readme_examples.py` | README code blocks parse correctly | +| `check_examples_doc.py` | EXAMPLES.md code blocks parse correctly | | `check_skill_examples.py` | SKILL.md code blocks parse correctly | ... -| `check_limitations_sync.py` | Limitation tables consistent across README, vera/README, and spec | +| `check_limitations_sync.py` | Limitation tables consistent across KNOWN_ISSUES.md, vera/README.md, and spec |As per coding guidelines
**/*.md: Review Markdown files for factual accuracy against the codebase, broken links, and outdated information.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@TESTING.md` around lines 348 - 369, Update the hook summary and table under the "After running `pre-commit install`, every commit is checked by 22 hooks:" paragraph: increment the count to 23, add the missing row for `check_examples_doc.py` (describe it as "Documentation examples pass `vera check` + `vera verify`" or similar), and change the description for `check_limitations_sync.py` to reference `KNOWN_ISSUES.md` instead of README; edit the table entries in TESTING.md where the hooks are listed (look for the existing `check_examples.py` / `check_limitations_sync.py` rows) to make these three concrete edits so the doc matches the codebase.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@CONTRIBUTING.md`:
- Around line 74-122: Update the documentation list of pre-commit hooks to
include the new EXAMPLES.md parser validation: add an item like "EXAMPLES.md
parser/validation" to the bullet list and ensure the stated hook count (22) and
any related sentences reflect this addition; specifically update the section
that mentions documentation-source changes and the `site-assets` hook (and
references to `scripts/build_site.py` / `scripts/check_site_assets.py`) so it
documents that EXAMPLES.md is validated by the site-assets/check scripts.
In `@TESTING.md`:
- Around line 348-369: Update the hook summary and table under the "After
running `pre-commit install`, every commit is checked by 22 hooks:" paragraph:
increment the count to 23, add the missing row for `check_examples_doc.py`
(describe it as "Documentation examples pass `vera check` + `vera verify`" or
similar), and change the description for `check_limitations_sync.py` to
reference `KNOWN_ISSUES.md` instead of README; edit the table entries in
TESTING.md where the hooks are listed (look for the existing `check_examples.py`
/ `check_limitations_sync.py` rows) to make these three concrete edits so the
doc matches the codebase.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: aa8eda59-fd1d-4103-836e-c3f93b10c465
📒 Files selected for processing (12)
.pre-commit-config.yamlCLAUDE.mdCONTRIBUTING.mdDESIGN.mdEXAMPLES.mdKNOWN_ISSUES.mdREADME.mdTESTING.mdscripts/check_examples_doc.pyscripts/check_limitations_sync.pytests/test_errors.pytests/test_readme.py
CONTRIBUTING.md: - Add EXAMPLES.md to bullet list of doc files whose code blocks are checked - Add check_examples_doc.py to Validation Scripts section TESTING.md: - Add missing check_examples_doc.py row to pre-commit hook table - Update check_limitations_sync.py description: README → KNOWN_ISSUES.md - Fix check_examples.py example count: 29 → 30 Hook count stays at 22 (was already correct after the restructure commit). Co-Authored-By: Claude <noreply@anthropic.invalid>
|
@coderabbitai Both outside-diff comments addressed in 57ee10e: CONTRIBUTING.md — added EXAMPLES.md to the bullet list of validated doc files; added TESTING.md — added the missing Note: the hook count stays at 22 (not 23 as suggested) — |
|
Tip For best results, initiate chat on the files or code changes.
And you're right to push back on the hook count — if 🧠 Learnings used |
Summary
Splits the 821-line README into four focused files, each with a single job:
README.md(249 lines) — project overview, three canonical examples, getting startedEXAMPLES.md— full 12-example language tour (contracts through LLM inference)DESIGN.md— technical decisions table (19 rows) and prior art (9 references)KNOWN_ISSUES.md— bugs and limitations tables, previously buried in READMEUpdates all CI infrastructure to match:
check_examples_doc.pyscript + pre-commit hook validates allverablocks in EXAMPLES.mdcheck_limitations_sync.pynow reads Tier 1 fromKNOWN_ISSUES.mdinstead ofREADME.mdfix-allowlistsandlimitations-synchook triggers updated for new file namesFixes tests broken by the restructure:
test_readme.py: vera block count 13 → 3 (examples moved to EXAMPLES.md); stale allowlist entry removedtest_errors.py:_extract_readme_error_block()updated for new section heading### Errors are instructions; README error block updated to include rationale text matching the canonical E001 diagnosticTest plan
pytest tests/ -q)check_readme_examples.py— 3 vera blocks, all parsecheck_examples_doc.py— 12 vera blocks, all parsecheck_limitations_sync.py— 32 in KNOWN_ISSUES.md, consistentcheck_doc_counts.py— counts consistent🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
New Features
Bug Fixes