The Algorand Specifications are published continuously at https://specs.algorand.co/.
The
Warning
The PDF Book is a work in progress and may contain formatting errors or missing graphics. Progress is tracked in issue #243.
Technical contributors should start with the contribution guidelines. They define how to propose changes and the authoring conventions for Markdown, MathJax, links, and diagrams.
The rest of this document is the operational guide for the repository setup, toolchain, automation, deployments, and releases.
All workflows require Git, GNU Make, Bash, and the repository's Git submodules.
Choose one execution path:
- The Docker path requires only Docker with the Docker Compose plugin in addition to the common tools. The project images contain the HTML, validation, and release toolchains.
- The native path requires Rust and Cargo for mdBook and uv for the pinned pre-commit runner.
The Docker path installs no project tooling on the host. The native setup installs
mdbook and mdbook-mermaid through cargo; uv manages Python and pre-commit.
PDF Book dependencies (Pandoc, Node.js, Chromium, and LaTeX) remain confined just to the Docker release image.
Clone the repository with its submodules:
git clone --recurse-submodules https://github.com/algorandfoundation/specs.git
cd specs
make doctorFor an existing checkout, synchronize the submodules before building:
git submodule update --init --recursiveRun make help for the complete command list and make doctor to compare the
local environment with the repository's declared toolchain.
Run the same authoritative checks and HTML build as GitHub CI:
make ciThis runs the Linux AMD64 toolchain, validates the theme submodule, executes all gating
pre-commit hooks, runs mdbook test, and builds the HTML site. On ARM hosts, Docker
uses emulation so that local and remote CI execute the same platform-specific tools.
For a faster Docker-backed edit/test loop without the final HTML build, use
make docker-check.
Serve the book with hot reload at http://localhost:3000. The command builds the image and installs the generated Mermaid assets first:
make docker-serveInstall the pinned mdbook and mdbook-mermaid versions with cargo:
make setupEnsure Cargo's binary directory, normally ~/.cargo/bin, is on PATH. Run the native
validation and then serve the book:
make check
make servemake check uses tools installed on the host and warns when their versions differ
from toolchain.env. When it emits no version-drift warnings, it is the local equivalent
of Dockerized make ci. The local workflow does not install the PDF release toolchain.
Before submitting a change, choose either validation path:
# Exact GitHub Linux AMD64 environment (requires Docker)
make ci
# Equivalent native checks; ensure no version-drift warnings are emitted
make checkmake ci requires Docker and runs the exact environment used by GitHub. make check
does not require Docker and runs the same validation gates and HTML build with native
tools. Both commands also check local links and anchors in the generated HTML. To build
and run only that generated-output check, use make docker-html-links-check with
Docker or make html-links-check with the native toolchain. make test-auto and
make serve-auto remain available when automatic native-to-Docker fallback is useful.
External links are deliberately checked separately because remote services can be transiently unavailable:
# Native
make links-check
# Docker
make docker-links-checkValidate the complete HTML and PDF release path when changing release tooling:
make docker-releaseGenerated HTML is written to book/html/; the release PDF is written to book/pandoc/pdf/algorand-specs.pdf.
Use make clean to remove build output and untracked generated Mermaid assets.
Dependencies are pinned in the format native to each ecosystem.
| Dependency | Source of truth | Update mechanism |
|---|---|---|
| Tool versions, image digests, and checksums | toolchain.env |
make toolchain-updates and maintainer review |
| Remote hooks | .pre-commit-config.yaml |
Dependabot or pre-commit autoupdate |
| GitHub Actions | Full commit SHAs in .github/workflows/ |
Dependabot |
| mdBook theme | theme submodule gitlink |
Dependabot and maintainer review |
| Docker platform configuration | docker-compose.yaml |
Manual |
Dependabot configuration is maintained in .github/dependabot.yaml
and covers GitHub Actions, pre-commit repositories, and Git submodules. Toolchain versions
and container digests are handled via local toolchain script.
toolchain.env is a manifest consumed by Make, Docker, and CI. It is the
single source of truth for tool versioning. make versions-check validates the
manifest and warns when native tool versions drift.
Check toolchain updates with:
make toolchain-updatesThe command requires uv, Docker, and network access and runs in CI.
When applying its suggestions:
- Update each relevant version together with its associated digest or checksum.
- Run
make versions-check. - Run
make ci, ormake checkand confirm that it emits no version-drift warnings. - Run
make docker-releasewhen the change affects Pandoc,mdbook-pandoc, Mermaid Filter, the Docker base, or other release dependencies.
RUST_VERSIONandUV_VERSIONselect exact tool releases.RUST_IMAGE_SHA256andUV_IMAGE_SHA256pin their multi-platform container images.- Pandoc's architecture-specific packages are pinned by their release-asset SHA-256 digests.
PYTHON_VERSIONpins the uv-managed interpreter used for pre-commit.
Keep ecosystem-native pins in their native configuration: GitHub Action SHAs belong in workflow files, hook revisions in the pre-commit configuration, and the theme revision in the submodule gitlink.
Dependabot can update every configured hook repository. When updating manually, use
pre-commit autoupdate --freeze so each rev remains an immutable commit SHA with its
release tag recorded in a comment.
After an updater changes the configuration, run:
make ciRun make links-check or make docker-links-check as well when Lychee changes.
- Keep the human-readable version comment when Dependabot updates a GitHub Action's immutable commit SHA.
- When updating the theme submodule, review the upstream change, update the gitlink, and validate both HTML and PDF output.
Every build workflow receives or resolves an immutable source commit. CI passes the exact built artifact to deployment.
| Workflow | Trigger | Responsibility |
|---|---|---|
ci.yaml |
Reusable workflow | Lint, test, and build an exact commit |
pr.yaml |
Pull request | Run CI and deploy eligible internal previews |
external-pr-preview.yaml |
Maintainer dispatch | Resolve, build, and preview an external PR |
cd.yaml |
Push to master |
Deploy the CI-built site to production |
links.yaml |
Monthly or manual | Check external links |
toolchain-updates.yaml |
Monthly or manual | Report available toolchain updates |
release.yaml |
Maintainer dispatch | Build the PDF and create a draft release |
Pull request CI tests the proposed merge commit. Internal PRs receive an automatic deployment preview.
External PRs run CI without deployment preview. To preview an external PR, a maintainer runs the external-preview workflow with its PR number.
Every push to master runs CI for that exact commit. The successful HTML artifact
is then deployed to https://specs.algorand.co/.
The release workflow always builds the current master commit, regardless of the
ref selected when dispatching the workflow.
- Confirm CI and production deployment are successful for the
mastercommit. - Open Actions → Create Release Draft → Run workflow.
- Wait for the HTML and PDF release build to complete.
- Open the generated draft release.
- Confirm the recorded full source commit and tag identify the
mastercommit. - Optional: Download and inspect the PDF artifact.
- Review the generated release notes, then publish the draft.
- Run
make doctorfirst; it reports missing tools, version mismatches, missing Mermaid assets, and Docker Compose availability. - Run
make versions-checkwhen CI rejectstoolchain.env. - Run
git submodule update --init --recursivewhen the theme is missing or at the wrong recorded revision. - Run
make setupafter changing the local mdBook tool versions. - Run
make ci, or runmake checkand confirm that it emits no version-drift warnings, before submitting changes. - Use
make cleanbefore investigating stale generated output.
The Algorand Specifications have been completely updated and renewed throughout 2025, both in form (new website and PDF Book) and contents (non-normative sections, diagrams, examples, etc.).
The last release using the previous HTML and PDF format is 7791a63.
Its (normative only) source files remain available in _archive.