Contribution Guidelines
The source of the Algorand Specification is released on the official GitHub Algorand Foundation repository.
If you would like to contribute, please consider submitting an issue or opening a pull request.
Typos
To fix typos, consider opening a pull request labeled “typo”. By clicking on the “Suggest an edit” icon in the top-right corner of the page containing the typo, you will be redirected to the relevant source code file to be edited in the pull request.
Issues
To report major issues, such as unclear contents, errors in mathematical formulas, broken rendering of the Web version or PDF version, broken rendering of diagrams, broken links, etc. please consider submitting a templated issue.
Source Code
The Algorand Specifications book is built with mdBook.
The source code is structured as follows:
src/ -> mdBook source code
└── _include/ -> Code snippets, templates, TeX-macros, auto-generated files, and examples
└── _excalidraw/ -> Excalidraw diagrams source code
└── _images/ -> SVG files
└── Part_A/ -> Part A normative files
└── non-normative/ -> Part A non-normative files
└── Part_B/ -> Part B files
└── Part.../ -> ...
└── SUMMARY.md, ... -> mdBook SUMMARY.md, COVER.md, prefix/suffix-chapters, etc.
Markdown
The book is written in CommonMark.
The CI pipeline enforces Markdown linting, formatting, and style checking with
rumdl.
Numbered Lists
Numbered lists MUST be defined with 1-only style.
Tip
EXAMPLE:
1. First item 1. Second item 1. Third itemResult:
- First item
- Second item
- Third item
Tables
Table rows MUST use the same column widths.
Tip
EXAMPLE:
Correct table format:
| Month | Savings | |----------|---------| | January | €250 | | February | €80 | | March | €420 |Incorrect table format:
| Month | Savings | |----------|---------| | January | €250 | | February | €80 | | March | €420 |Result:
Month Savings January €250 February €80 March €420
Consider aligning text in the columns to the left, right, or center by adding a
colon : to the left, right, or on both sides of the dashes --- within the header
row.
Tip
EXAMPLE:
| Name | Quantity | Size | |:-------|:--------:|-----:| | Item A | 1 | S | | Item B | 5 | M | | Item C | 10 | XL |Result:
Name Quantity Size Item A 1 S Item B 5 M Item C 10 XL
MathJax
Mathematical formulas are defined with MathJax.
Note
mdBook MathJax documentation.
Important
When you use double backslashes in MathJax blocks (for example in commands such as
\begin{cases} \frac 1 2 \\ \frac 3 4 \end{cases}) you need to add two extra backslashes (e.g.,\begin{cases} \frac 1 2 \\\\ \frac 3 4 \end{cases}).
Inline Equations
Inline equations MUST include extra spaces in the MathJax delimiters.
Tip
EXAMPLE:
Equation: \( \int x dx = \frac{x^2}{2} + C \)
Correct inline delimiter:
\\( \int x dx = \frac{x^2}{2} + C \\)Incorrect inline delimiter:
\\(\int x dx = \frac{x^2}{2} + C\\)
Block Equations
Block equations MUST use the $$ delimiter (instead of \\[ ... \\]).
Tip
EXAMPLE:
Equation:
$$ \mu = \frac{1}{N} \sum_{i=0} x_i $$
Correct block delimiter:
$$ \mu = \frac{1}{N} \sum_{i=0} x_i $$Incorrect block delimiter:
\\[ \mu = \frac{1}{N} \sum_{i=0} x_i \\]
For readability, long equations SHOULD be wrapped at natural operators with continuation lines indented.
TeX-Macros
TeX-macros are defined in the ./src/_include/tex-macros/ folder using the mdBook
include feature.
TeX-macros are divided into functional blocks (e.g., pseudocode, operators, constants, etc.).
TeX-macros MUST be imported at the top of the consumer files using the mdBook.
TeX macros can be imported entirely or partially (e.g., just a functional block).
Tip
EXAMPLE:
Import all TeX-macros:
{{#include ./_include/tex-macros.md:all}}Import just a block of TeX-macros (e.g., pseudocode commands):
{{#include ./_include/tex-macros.md:pseudocode}}
Admonitions
Admonitions MUST use mdBook’s native Markdown syntax. Use NOTE for non-normative
comments, TIP with an EXAMPLE label for examples, and IMPORTANT with an IMPLEMENTATION
label for reference implementation details.
> [!NOTE]
> This is a non-normative comment.
> [!TIP]
> **EXAMPLE:**
>
> This is an example.
> [!IMPORTANT]
> **IMPLEMENTATION:**
>
> This describes the reference implementation.
GitHub Links
Links to the go-algorand reference implementation or other repositories MUST
be permalinks.
Diagrams
Structured Diagrams
Structured diagrams (e.g., flow charts, sequence diagrams, etc.) are defined with Mermaid “text-to-diagram” tool.
Unstructured Diagrams
Unstructured diagrams and images are drawn with Excalidraw.
Excalidraw images MUST be exported in .svg format without a background and
saved in the ./src/_images/ folder.
Excalidraw images source code MUST be committed in the ./src/_excalidraw/
folder.
Prepare and Submit a Change
Repository setup, local preview, validation commands, and pull-request preview behavior are maintained in the repository README. Follow those instructions before submitting a pull request.
Keep each pull request focused and explain the scope and motivation in its description. When a change affects rendering, inspect its deployment preview. External-contribution previews are triggered by maintainers on request.