Skip to content
VerificationWould you notice if your agent drifted in production?Explore the 5-stage harness›
Architecture Internals

Keeping the docs true (contributors)

To prevent documentation drift as the compiler evolves, Aegil enforces automated synchronization checks. Whenever CLI commands, error codes, device permissions, file ownership rules, or verification checks are updated in the Dart source, continuous integration validates that reference tables, YAML annotations, and documentation pages match the live compiler code.

The pages under Reference (generated) are built from the Dart source code by scripts/generate.mjs and are gitignored:

Generated page Extractor (scripts/extract/) Dart source read Annotation YAML (annotations/)
CLI commands and options cli.mjs bin/aegil.dart (_usage) cli.yaml
Error codes errors.mjs bin/**/*.dart, lib/**/*.dart (ERR_*) errors.yaml
Platforms and permissions permissions.mjs lib/compiler/platforms/permission_registry.dart permissions.yaml
File ownership and tool-managed paths owners.mjs output_plan.dart, platform_shell_emitter.dart owners.yaml
Verification check kinds checks.mjs integration_test_emitter.dart checks.yaml
Secrets and environment variables secrets.mjs secrets_emitter.dart secrets.yaml

Commands for updating and verifying the docs

Section titled “Commands for updating and verifying the docs”

From inside site/:

Terminal window
cd ../aegil_docs
pnpm dev # regenerate reference pages and serve http://localhost:4321
pnpm annotate # add TODO placeholders for any new CLI flags, ERR_* codes, permissions, etc.
pnpm coverage # fail if any code item is missing from annotations/*.yaml or still says TODO
pnpm verify # run generate, lint, coverage, extractor tests, and astro build

And from the repository root:

Terminal window
dart run tool/check_docs.dart
dart analyze bin lib test tool
dart test