Maintainer overview
Repo-specific maintenance checklist for the llamadart docs site, releases, and verification flow.
On this page
This section is for llamadart maintainers: repository ownership, routine
checks, and how the docs site is built and published.
Repository ownership#
Which repository owns which runtime change is listed once, in Runtime ownership.
Many maintainers keep the owning repositories as sibling checkouts one level above this repo:
../llamadart
../llamadart-native
../litert-lm-native
../llama-web-bridge
../llama-web-bridge-assets
Verify these paths before running cross-repo workflows.
Core maintainer responsibilities in this repo#
- Keep public Dart APIs stable and documented.
- Keep runtime wiring aligned with native/web owning repos.
- Keep docs, migration notes, and examples aligned to actual behavior.
- Keep CI green on format, analyze, tests, and docs checks.
Daily verification commands#
The canonical repository baseline is
AGENTS.md
(Build and test). From repo root:
dart run tool/prepare_workspace.dart
python3 tool/ci/check_format.py
dart analyze
dart run tool/testing/check_platform_boundaries.dart
TMPDIR="$(mktemp -d)" dart test -p vm -j 1 --exclude-tags local-only
dart test -p chrome --exclude-tags local-only
Preparation resolves the root package and every maintained example. It also
fails if any example or companion package is missing or unclassified. The root
analyzer covers the root package and examples; companion packages own separate
dependency, analysis, test, SwiftPM, and publish-validation lanes. Generated
.dart_tool, build, CocoaPods Pods, Flutter platform
ephemeral, and
plugin .symlinks trees are not workspace packages. Vendored, archived docs,
or local-only trees outside example/ and packages/ are not discovered by
the workspace bootstrap.
Use the Flutter SDK pinned in .flutter-version (3.47.1), the same version
CI installs, for repository-wide quality gates. Other Dart formatters produce
different source layouts even after the same dependency bootstrap.
-
Studio formatting and SDK:
python3 tool/ci/check_format.pychecks root-SDK formatting while excludingpackages/llamadart_studioandpackages/llamadart_studio_core. Those two Studio packages use the independent Flutter SDK pinned inpackages/llamadart_studio/.flutter-version(3.50.0); run their package-localdart format --output=none --set-exit-if-changed ., analyze, and tests with that SDK. -
Isolated
TMPDIRon macOS: Run local VM tests with an isolatedTMPDIR(TMPDIR="$(mktemp -d)" dart test -p vm ...). LiteRT-LM engines withoutliteRtLmCacheDirprune program caches shared under$TMPDIR/llamadart_litert_lm, and CI checks the canary there.
Use targeted test commands when iterating quickly, then run full checks before release-related merges.
Validating changes#
Package changes run the repository baseline above with isolated TMPDIR for VM
tests and dart test -p chrome --exclude-tags local-only for browser tests,
plus package-local Studio checks under packages/llamadart_studio/.flutter-version
when Studio files change.
Docs and website changes run:
dart run tool/testing/verify_release_docs_versions.dart
./tool/docs/build_site.sh
(cd website && dart pub get && dart analyze --fatal-infos && dart test)
./tool/docs/build_site.sh checks the observability example, builds the Jaspr
site, runs website/tool/finalize_site.dart (which fails on any broken
internal link or anchor), and indexes search with Pagefind, so a separate
validate_links.sh call is not needed. Also run
TMPDIR="$(mktemp -d)" dart test -p vm test/unit/tooling/ and
TMPDIR="$(mktemp -d)" xargs dart test -p vm -j 1 --exclude-tags local-only < tool/ci/markdown_test_suites.txt
when touching docs checked by root Markdown tests.
For heavier local model checks, list the discoverable scenarios:
dart run tool/testing/run_local_e2e.dart --list
dart run tool/testing/test_matrix.dart --list
Keep public behavior, examples, README, website docs, support matrices, and changelog entries aligned. For non-trivial PRs, record the relevant testing matrix rows and exact validation evidence in the PR body.
Docs site#
website/ is a Jaspr static site. It is its own Dart
package with its own analyze and test lane; the root analyzer skips it.
| Path | Purpose |
|---|---|
docs/, sidebars.json |
Next-release docs and their sidebars (docsSidebar, maintainersSidebar) |
versioned_docs/, versioned_sidebars/, versions.json |
Released snapshots; the first entry of versions.json is the latest release |
content/ | Homepage, 404 page and the /api redirect |
lib/ | Loaders, layouts, components and syntax highlighting |
web/ |
Static assets copied as-is (
styles.css
,
site.js
,
img/
,
robots.txt
,
CNAME
)
|
tool/ | Post-build finalizer, preview server, and version cut |
URLs: the latest release is served at /docs/..., the next release at
/docs/next/..., and each older release at /docs/<version>/....
website/examples/observability is a docs-owned runnable package. The docs
build resolves, formats-checks, analyzes and tests it; it is excluded from the
site analyzer until its own dependencies are resolved. Regenerate its lockfile
with pub when the core version changes.
./tool/docs/build_site.sh validates that example and runs jaspr build, then
tool/finalize_site.dart,
which writes route.html files, 404.html and sitemap.xml
and fails on any
broken internal link or anchor, then indexes search with Pagefind (via npx).
If another local service uses Jaspr's default build port (normally 8080), select a free port for static generation:
./tool/docs/build_site.sh --port 43831
The override applies only to the temporary Jaspr build server. All example,
link and search-index checks still run. --port accepts decimal integers from
1 to 65535 without leading zeros; --help prints usage without starting a build.
Preview the result as GitHub Pages serves it:
cd website
dart run tool/serve_site.dart --port 8080
For live editing, dart run jaspr_cli:jaspr serve in website/ renders pages
on demand; set DOCS_ARCHIVED=0 to skip archived releases and start faster.
Writing docs:
-
Link to other docs with relative paths (
../guides/tool-calling);.mdsuffixes and#anchorswork. - Admonitions use
:::note|tip|info|warning|caution|danger Optional title. -
```mermaidfences render as diagrams. Code fences for Dart, bash, YAML, JSON, JS, HTML, Ruby, PowerShell and HTTP are highlighted at build time. - Put images under
website/web/img/and reference them as/img/<name>. -
Add every new doc to
sidebars.json:website/test/site_model_test.dartfails unless each doc withoutunlisted: trueappears there exactly once.
How changes reach GitHub Pages:
- Ordinary pushes or merges to
maindo not deploy GitHub Pages. -
Tag-triggered release deployment: Pushing a core
v*tag triggersdocs_version_cut.yml, which runsdart run tool/cut_version.dart <version>inwebsite/to snapshotdocs/andsidebars.json(making that release the latest at/docs/...), and pushes tomain. Whendocs_version_cut.ymlcompletes successfully (workflow_run),docs_pages.ymlbuilds the site with./tool/docs/build_site.shand deploys it to GitHub Pages. -
Manual deployment: Triggering
docs_pages.ymlviaworkflow_dispatchonmainbuilds and deploys the current default branch to GitHub Pages, publishing/docs/next/...fromwebsite/docs/alongside existing snapshots.
Analytics and SEO maintenance#
-
GA4 is added at build time when
DOCS_GA_MEASUREMENT_IDis set, as the docs deployment workflow does from the repository variable of the same name. Update that variable when rotating the docs site's GA4 stream. -
Page metadata and structured data live in
website/lib/src/layouts/site_layout.dart. Keepwebsite/web/robots.txt, the social card and those URLs in sync with the production domainhttps://llamadart.leehack.com. -
Only the latest release is indexed:
/docs/next, archived versions andunlisted: truedocs carrynoindex, and stay out ofsitemap.xmland site search. -
The header version menu lists the next docs and every published version in
website/versions.json, and keeps the reader on the same page when the target version has it. After a docs cut, verify it opens the matching latest and archived installation pages without changing their package pins or the latest-stable default route.