@@ -505,33 +505,41 @@ with a cargo warning); `q2 mcp` then fails at runtime pointing at the
505505xtask. Design: ` claude-notes/plans/2026-06-11-q2-mcp-hub-auth.md `
506506(bd-81cfshmw).
507507
508- ## Refreshing the embedded docs for ` q2 docs llms `
508+ ## Refreshing the embedded docs for ` q2 docs llms ` / ` q2 docs serve `
509509
510510The same trap once more, with one twist. ` q2 docs llms ` (aliased as `q2
511511agents-info`) serves the docs site's llms.txt mirror — the index, the
512- per-page ` .md ` companions, and ` llms-full.txt ` — embedded from
513- ` agents-docs-dist/ ` via ` include_dir! ` . After changing anything under
514- ` docs/ ` , the embed is stale until you run:
512+ per-page ` .md ` companions, and ` llms-full.txt ` — and ` q2 docs serve `
513+ (aliased as ` q2 docs open ` ) serves the whole rendered HTML site offline.
514+ Both read one embed: ` agents-docs-dist/ ` (the rendered site plus the llms
515+ ledger), archived as a tar.zst by ` crates/quarto/build.rs ` and stored
516+ llms-first so ` docs llms ` decodes only its prefix. After changing
517+ anything under ` docs/ ` , the embed is stale until you run:
515518
516519``` bash
517520cargo xtask build-agents-docs # render docs/, stage agents-docs-dist/
518- cargo build --bin q2 # re-embed via include_dir!
521+ cargo build --bin q2 # re-embed (build.rs re-archives)
519522```
520523
521524The twist: staging * renders the docs with ` q2 ` itself* , so unlike every
522525other embed artifact this step runs ** after** a Rust build, not before.
523526` cargo xtask build-all ` reflects that — its docs step comes last and
524527ends with its own ` cargo build --bin q2 ` (skip it with
525- ` --skip-agents-docs ` ).
528+ ` --skip-agents-docs ` ). Staging also fails if the site loads a remote
529+ subresource (a CDN script, stylesheet, iframe, …): the embedded docs
530+ must work offline. The allowlist lives in
531+ ` crates/xtask/src/docs_offline_check.rs ` .
526532
527533Diagnose staleness with ` q2 docs llms --embed-info ` , which prints the
528534source commit, a ` (dirty) ` marker, and the page count. Fresh clones
529535build fine without the staged tree (a placeholder is embedded, with a
530- cargo warning); ` q2 docs llms ` then fails at runtime pointing at the
531- xtask. ` agents-docs-dist/ ` is generated and gitignored — never commit
532- it. The release workflow stages it once in ` web-payloads ` and fails any
533- leg whose binary reports a placeholder or a foreign commit. Design:
534- ` claude-notes/plans/2026-08-24-agents-info-command.md ` (bd-hwop1zii).
536+ cargo warning); ` q2 docs llms ` and ` q2 docs serve ` then fail at runtime
537+ pointing at the xtask. ` agents-docs-dist/ ` is generated and gitignored —
538+ never commit it. The release workflow stages it once in ` web-payloads `
539+ and fails any leg whose binary reports a placeholder or a foreign
540+ commit. Design: ` claude-notes/plans/2026-08-24-agents-info-command.md `
541+ (bd-hwop1zii), ` claude-notes/plans/2026-10-26-q2-docs-serve.md `
542+ (bd-x248xpyh).
535543
536544## Build Commands
537545
0 commit comments