Instruction file imported from aurintex/pai-os (
.cursor/rules/docs-maintenance.mdc). Copyright stays with the author.
Documentation Maintenance Enforcer
Single Source of Truth: The maintenance procedures for the hybrid documentation system are defined in Documentation Maintenance (docs-maintenance.mdx).
Required Action
When modifying Rust code in the engine crate, Protocol Buffer files, or changing the documentation scripts:
- Reference the Guide: Review docs-maintenance.mdx to understand the hybrid MDX/GitHub Pages approach.
- Regenerate Local Docs: After API changes, run:
npm run gen:rustdoc(Rust MDX for Starlight)npm run gen:proto(Protocol Buffer MDX)
- Standard rustdoc HTML: Generated automatically via GitHub Actions (
.github/workflows/rustdoc.yml) on push tomainand deployed to GitHub Pages. - Validate Build: Run
npm run buildin thedocs/directory to ensure all paths and redirects are correctly generated.
Prevention of Regressions
- The
/reference/rustdoc/routes redirect toaurintex.github.io/pai-os/rustdoc/(external GitHub Pages). - When modifying
.protofiles, ensureproto-doc-gen.mjscan parse them correctly. The script supports bothprotoc-gen-doc(if available) and a built-in parser as fallback.
References:
- Maintenance Guide: docs-maintenance.mdx
- Rustdoc Workflow: rustdoc.yml
- Definition of Done: definition-of-done.mdc