shakacode / shakacode/reactonrails.com
Docs inventory + scoring pipeline: npm run audit:inventory
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Part of the docs & demos tracking issue: #140. Phase 0 of the docs-quality program: make the audit repeatable instead of one-shot.
Problem
The docs corpus is 176 pages / ~308k words (2026-07-09 measurement) with large quality variance that currently requires manual archaeology to see:
- Critical pages that are far too thin:
oss/getting-started/pro-quick-start.mdis 207 words — the entry point for the paid tier - Pages too long to navigate:
oss/migrating/rsc-troubleshooting.md(8.7k words),oss/upgrading/changelog.md(35.8k words inside the docs tree) - A stale cluster untouched since 2026-03-10 (
angular-js-integration-migration,troubleshooting-when-using-webpacker,asset-pipelineat 92 words,rails-engine-integrationwith zero site references,project-structure)
Docs churn is high (dozens of pages changed in the first week of July alone), so any manual audit rots within weeks. We need npm run audit:inventory to regenerate the picture on demand.
Work
-
scripts/inventory-docs.mjsfollowing theaudit-docs.mjsconventions (ESM,--docs-root/--output/--fail-onargs, report to workspace root) - Resolve the monorepo the same way
sync-docs.mjsdoes (REACT_ON_RAILS_REPOenv var, then sibling../react_on_rails) and analyze<repo>/docsdirectly so git history is available for last-modified dates - Per-page metrics: word count, heading/code-block counts, title, frontmatter description presence, last commit date (one batched
git log --name-onlypass), inbound links from other docs pages (resolved relative markdown links, not substring matches), sidebar presence (prototypes/docusaurus/sidebars.ts) - Per-page flags:
tooShort(<300 words, excluding index/release-note pages),tooLong(>4000 words),stale(>90 days untouched),orphan(no inbound links and not in sidebar),missingDescription - Output: JSON dataset + markdown summary report (extremes tables, flag counts), mirroring the
VALIDATION_REPORTpattern - npm scripts:
audit:inventoryandtest:inventory-docs(unit tests for the pure helpers vianode --test)
Follow-ups (not this issue)
- Join with an importance signal (Cloudflare Web Analytics page views, or GSC if a property exists) to complete the Importance × Quality triage
- Feed
tooShort/stale/orphanflags intoaudit:docsCI severities once thresholds are tuned
Acceptance criteria
npm run audit:inventoryruns against a siblingreact_on_railscheckout and produces the JSON + markdown report; unit tests pass vianode --test.
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading scripts/audit-docs.mjs and scripts/sync-docs.mjs for the reporting and repository-resolution conventions, then inspect prototypes/docusaurus/sidebars.ts and the docs tree. Implement the inventory and pure-helper tests, and run npm run audit:inventory plus node --test to verify the JSON dataset, markdown summary, flags, and acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript, node.js
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100