docs: generate level catalog#276
Conversation
📝 WalkthroughWalkthroughThis PR introduces an automated level catalog system that generates and maintains a living inventory of game levels from their TOML definitions. The catalog appears in the documentation, is validated for freshness alongside other drift checks, and integrates into the build system via Make and npm scripts. ChangesLevel Catalog Generation and Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/wiki/index.md`:
- Line 28: Replace the relative fragment link "[Level Catalog](`#level-catalog`)"
with an absolute docs route anchor to avoid markdownlint MD051; update the link
target to the full docs path (e.g., "[Level
Catalog](/docs/wiki/#level-catalog)") while ensuring the anchor matches the
header id on the target page so navigation still works.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 291c0672-ef87-49c3-887b-e719599b6102
📒 Files selected for processing (12)
.github/workflows/docs.ymlAGENTS.mdCLAUDE.mdMakefiledocs/package.jsondocs/src/lib/docsSidebar.tsdocs/src/pages/docs/[...slug].astrodocs/wiki/build-system.mddocs/wiki/index.mddocs/wiki/level-catalog.mdtools/check_docs_drift.pytools/generate_level_catalog.py
| | [Collectibles & Surfaces](#collectibles-and-surfaces) | Coins, stars, bouncepads, rails, float platforms, climbable surfaces | | ||
| | [Assets](#assets) | All sprite sheets, tilesets, and fonts in `assets/` | | ||
| | [Sounds](#sounds) | All audio files in `assets/sounds/` | | ||
| | [Level Catalog](#level-catalog) | Generated inventory of every `levels/*.toml` stage, progression link, and content count | |
There was a problem hiding this comment.
Use an absolute docs anchor to avoid markdown fragment lint drift.
#level-catalog is not a fragment defined in this markdown file, so markdownlint flags it (MD051). Pointing to the docs route anchor keeps navigation intent and avoids fragment-validation noise.
Suggested diff
-| [Level Catalog](`#level-catalog`) | Generated inventory of every `levels/*.toml` stage, progression link, and content count |
+| [Level Catalog](/super-mango-editor/docs/#level-catalog) | Generated inventory of every `levels/*.toml` stage, progression link, and content count |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | [Level Catalog](#level-catalog) | Generated inventory of every `levels/*.toml` stage, progression link, and content count | | |
| | [Level Catalog](/super-mango-editor/docs/#level-catalog) | Generated inventory of every `levels/*.toml` stage, progression link, and content count | |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 28-28: Link fragments should be valid
(MD051, link-fragments)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/wiki/index.md` at line 28, Replace the relative fragment link "[Level
Catalog](`#level-catalog`)" with an absolute docs route anchor to avoid
markdownlint MD051; update the link target to the full docs path (e.g., "[Level
Catalog](/docs/wiki/#level-catalog)") while ensuring the anchor matches the
header id on the target page so navigation still works.
Summary
docs/wiki/level-catalog.mdinventory for everylevels/*.tomlstage, including progression links, music, starts, configured resources, and content countstools/generate_level_catalog.py,make level-catalog, docs package scripts, and freshness checks throughmake docs-driftlevels/**and the catalog generatorlast_starcollectible counts,last_star.next_phasevalues, and agent context docs freshnessValidation
python3 tools/generate_level_catalog.py --checkinitially failed because the generator/catalog did not existmake level-catalogmake docs-driftcd docs && mise exec node@24.13.1 -- bun run lintcd docs && mise exec node@24.13.1 -- bun run buildmake validate-levelsmake test CC=clangmake smoke CC=clang SMOKE_FRAMES=5 SMOKE_SEED=1make webgit diff --checknext_phaseparsing and missinglast_starin collectible counts, both fixed; final review caught docs workflow path filters, fixedNotes
levels/02_lugio_02.tomlhasscreen_count = 11while its description says "Twelve screens". I left the source level prose unchanged in this docs-generation PR.Summary by CodeRabbit
New Features
Documentation
Chores