Skip to content

Quality

Part of Dev. A change is done when the generated tables still match the code and the book still builds. Every command below runs from the repository root; the full guard table is maintained in the repository agent instructions.

Book guards

Command What it catches
python3 scripts/botbook_guards.py --check Missing or unpublished SUMMARY chapters, dead relative links, bad anchors, product-version drift and port claims.
python3 scripts/gen_catalogs.py --check Connector and skills catalogs that no longer match their seeds, adapters and SKILL.md files.
python3 scripts/gen_api_reference.py --check Generated REST reference that no longer matches routes and the API catalog.
python3 scripts/gen_schema_reference.py --check Generated database reference that no longer matches botschema and migrations.
python3 scripts/gen_basic_reference.py --check Generated BASIC reference that no longer matches registered keywords.
scripts/botbook_reindex.sh Book build and search index; every SUMMARY link must resolve.

A link checked only against the filesystem proves nothing: MkDocs renders only pages listed in SUMMARY.md. The guards check publication, not just file existence. The allowlist in botbook/guards-allowlist.txt may only shrink; a new row is a decision, not a way to silence a guard.

Code rules

Rule Check
cargo clippy --workspace with zero warnings. Fix the cause; no #[allow(clippy::…)] attributes.
Replace unwrap / expect in production paths with error handling. Review the diff.
Keep a source file under 450 lines. Split the module instead of suppressing the limit.
Keep table! / joinable! in botschema only. Feature crates re-export with pub use botschema::<table>.
Add every user-facing string to all locale catalogs. data-i18n in HTML, gbT() in JS, one .ftl per feature per locale.
Use local fonts, inline icons and --id-* tokens. No CDN, no hardcoded color, radius, shadow or font.
Leave generated reference pages alone. Change the source and regenerate.
Browser-test web-facing work. One short CDP script per action; record the observed state.

Testing practice and known gaps are documented in Testing; the code workflow is in Contribute.