Documentation Workflow
The published documentation is organized as a system manual first. The top of
docs/SUMMARY.md should lead with pages that explain how to understand, build,
boot, configure, operate, and review the current capOS implementation.
The mdBook site may keep the wider project corpus reachable for maintainers: roadmap, changelog, backlog, proposal, paper, and research files can remain under the lower archive section. Those pages should not shape the primary reader path, and they should not be treated as part of the generated PDF manual unless they become current system documentation.
PDF Manual Pipeline
The PDF is a Typst-authored manual shell plus generated body content:
tools/docs-bundle.jsreadsdocs/SUMMARY.md, selects only manual sections, rewrites bundled-doc links to PDF-local heading anchors, and emits ignored Markdown atdocs/capos-docs.md.mdbook-mermaidchecks Mermaid syntax, andmermaid-cliconverts Mermaid blocks in the generated Markdown to PNG artifacts undertarget/docs-bundle/.uv tool run --constraints tools/md2typst-constraints.txt --from md2typst==0.3.3 md2typstconverts the generated Markdown body to Typst with the converter dependency set pinned.tools/build-typst-manual.jsnormalizes the converted body, fillsdocs/manual.typwith the generated version/date/source metadata, and writestarget/docs-bundle/capos-docs.pdf.typ. The normalizer also collapses Markdown source-wrap line breaks outside code blocks so PDF prose and list items use normal paragraph layout.- The pinned Typst binary compiles the final PDF.
docs/manual.typ owns the PDF document structure: title page, version block,
one-level table of contents, page setup, and base typography. Generated files
under docs/capos-docs.md, target/docs-bundle/, and target/docs-site/
must remain untracked.
Scope Rules
The PDF manual includes current system documentation: introduction, status, build and boot workflow, configuration, repository map, runnable demos, architecture, and security/verification pages.
Project archives stay on the mdBook site but are excluded from the PDF manual: proposals, backlogs, research notes, whitepaper planning, and other planning records are useful context for maintainers, not the operator-facing manual.