Documentation Guide
This page is the canonical workflow for building and updating the TaskBridge documentation site.
What the docs stack contains
mkdocs.ymldefines the repository site and navigationdocs/contains curated hand-written guidesscripts/docs_prepare.pystages generated assets before MkDocs buildsdocs/llms.txtis generated as a curated LLM entrypoint and published at the site rootdocs/reference/android-ref/is generated from Dokka multi-module output and stays untrackeddocs/reference/backend-api/contains generated OpenAPI documentation and stays untracked- Python API reference pages use
mkdocstringsagainst repository modules
Local workflows
Managed environment
Use this when you work on docs repeatedly or want the same flow as CI:
uv sync --group docs --group dev
uv run python scripts/docs_prepare.py
uv run mkdocs serve
Ad-hoc preview with uvx
Use this when you want a fast local preview without relying on the repo-managed MkDocs environment:
python scripts/docs_prepare.py
uvx --with mkdocs-material --with mkdocstrings-python --with pymdown-extensions mkdocs serve
scripts/docs_prepare.py still runs locally because it is repository code, not a bundled uvx tool.
Strict static build
Run this before finalizing docs changes:
uv sync --group docs --group dev
uv run python scripts/docs_prepare.py
uv run mkdocs build --strict
What scripts/docs_prepare.py does
Default behavior:
- runs
./gradlew dokkaGeneratePublicationHtmlinandroid/ - reads Dokka HTML from
android/build/dokka/html/ - replaces the staged subtree under
docs/reference/android-ref/ - copies
protocol/openapi/taskbridge.openapi.yamltodocs/reference/backend-api/openapi.yaml - generates a Redoc
index.htmlunderdocs/reference/backend-api/ - writes a curated
docs/llms.txtindex for LLM-oriented consumption
Useful modes:
uv run python scripts/docs_prepare.py --skip-build
uv run python scripts/docs_prepare.py --dokka-source /custom/path
uv run python scripts/docs_prepare.py --destination-android docs/reference/android-ref
Use --skip-build when generated outputs are already fresh and you only want to restage them.
The llms.txt output is still regenerated in --skip-build mode so summaries and curated links stay in sync with the docs workflow.
When docs must be updated
If Android public API changes
- update KDoc in
android/taskbridge-coreandandroid/taskbridge-transport-okhttpas needed - run
scripts/docs_prepare.py - check
docs/android/index.mdand any guide text that describes public behavior
If backend or adapter public API changes
- keep
mkdocstringspages rendering - update
docs/backend/index.md,docs/adapters/index.md, and related guides if integration behavior changed
If protocol or transport semantics change
- update
protocol/ - update
docs/protocol/index.md - update relevant ADRs or architecture pages when the semantic change is architectural
If contributor workflow changes
- update this page first
- refresh the curated
llms.txtcontent if the best entrypoints for integrators changed - then update short entrypoints in
README.md,CONTRIBUTING.md, or package README files only as pointers
GitHub Pages and CI
The repository workflow is .github/workflows/docs-site.yml.
It does the following:
- installs Java, Android SDK, Python, and
uv - syncs repo docs dependencies
- runs
pytestfortests/test_docs_prepare.py - runs
scripts/docs_prepare.py - runs
mkdocs build --strict - uploads the Pages artifact
- deploys on pushes to
main
Editing policy
- keep package README files short and link back to this guide
- keep operational details here instead of duplicating them in many places
- do not publish internal planning notes in site navigation
- keep generated Android HTML out of version control