Package standards
The standards an EpiAware package is held to. Each gives the rule and what enforces it, so you can see what CI catches and what a reviewer must catch. Expand "Why" for the rationale. How each check works and is configured is in Test infrastructure and the API reference.
Overview page and README
The README checks (test_readme_placeholders, test_readme_prose, test_readme_bullets) run in the quality testset by default. Turn one off with placeholders = false, prose = false or bullets = false in the readme field of qa_config.jl. A new README fails the placeholders check until its placeholder text is filled in.
1. The "Why" section is a list of motivation bullets
Write bullets saying why a user needs the package, not a feature inventory (**Name**: does X) or paragraphs. test_readme_bullets checks shape, count (3 to 6 by default) and one sentence per bullet. Whether a bullet states real motivation is reviewed by hand.
Why
A reader deciding whether to install needs a reason to care before a list of parts.
2. The headline example earns its place
Show real executed values, with no placeholders or bare booleans, and use the package's natural-syntax macro over the functional form. test_readme_placeholders catches unfilled text, and the docs build runs the README's julia blocks (README_EXECUTE). Whether the example makes the package's point is reviewed by hand.
Why
A flat call with placeholder output shows the syntax and hides the reason the package exists. Where the package has a nested or compositional concept, the example should show that depth.
3. No internal-facing caveats in the pitch
Keep scope apologies ("we don't support X") and org-internal detail out of the Why section and the first example. Put them in a FAQ if anywhere. Reviewed by hand.
Why
A first-time reader should not meet an apology before a benefit.
4. A "Related packages" section
Give one sentence per sibling package with a real relationship, linked to its live docs. test_readme_sections requires the section through STANDARD_README_SECTIONS and reports the old "What packages work well with X?" heading as drift. Documenter linkcheck checks the links. Which siblings belong is reviewed by hand.
Why, and which link
The ecosystem is only navigable if each package points at its neighbours. Link to /stable/ once released, /dev/ before that, and the repo when no site is deployed. Linkcheck runs on the generated home page.
5. The overview page does not repeat the home page
Where a package has both a README-derived home page and a getting-started overview, the overview links to the home page's Related packages section instead of repeating it. Reviewed by hand.
Why
Two copies of one list drift apart.
Prose and comments
6. Prose is direct
Use UK English, short sentences, one sentence per line in Markdown, no padding adjectives and none of the banned words. test_readme_prose checks banned words and sentence length in the README. One sentence per line, and prose elsewhere, are reviewed by hand.
Why
Docs that pad get skipped, so their content is lost. test_readme_prose owns the banned-word list and the sentence-length limit.
7. A page opens with its purpose and its reader
A page's first lines say what it is for and who it is for, and point other readers elsewhere. Reviewed by hand.
Why
A reader knows at once whether to stay, and an expert can skip ahead.
8. What the reader needs is stated before it is needed
A tutorial or how-to guide lists its prerequisites before the first step, such as an existing Project.toml or a working test/ folder. Reviewed by hand.
Why
A reader who meets a missing prerequisite halfway has wasted the steps before it.
9. Each code block is followed by what to notice
After a code block, one sentence says what the reader should take from it. Reviewed by hand.
Why
The code shows how, and that sentence shows why.
10. Asides get their own sentence
Do not put rationale inside dashes or brackets in an instruction. Give it its own sentence, or a !!! details block if it is optional depth. Reviewed by hand.
Why
An aside buries the instruction it interrupts.
11. A new term is defined where it first appears
Italicise a term where a page first uses it and define it in the same sentence, for example "Managed files are rewritten on every sync." Reviewed by hand.
Why
The reader learns one term at a time instead of hunting for a definition.
12. Comments say why, not what
A comment records a decision or constraint the code does not show, briefly, and does not narrate the lines below. Reviewed by hand.
Why
Narration duplicates the code and then rots against it. If a comment needs a paragraph, the code under it usually needs simplifying.
13. Comments and docs carry no development history
Comments, docstrings and docs say what is true now, with no issue or PR numbers and no account of past behaviour or fixed bugs. Reviewed by hand.
Why
git blame and the pull request already hold that history. A second copy in the source is the one that rots. A reader who wants the discussion finds it through the commit.
14. Release notes live on the GitHub release
Write notes on the release itself, above TagBot's merged-PR list. The docs page fetches them at build time, as set out in Release notes convention. Reviewed by hand.
Why
A changelog file has to be kept in step with the tags by hand, and its shape had forked four ways across the org. The release is the one copy that cannot drift from what shipped.
Code and design
15. Public API is documented and its examples run
Every public binding has a docstring in the standard shape with an # Examples section, written as a jldoctest, or a plain julia block when it needs fixtures a doctest cannot set up. Never use @example in a docstring. Enforced by test_docstring_format, Aqua's undocumented-names check in test_aqua, and test_doctest.
Why
An undocumented export is not a public API, and an example that no longer runs is worse than none. Documenter never expands @example inside a docstring, so it renders as literal text and never runs. A jldoctest renders with its output and is checked by test_doctest, which loads the package as the default DocTestSetup.
16. Source is machine formatted
Format with Runic, which has one fixed style and no config file. Enforced by the runic pre-commit hook and test_formatting (task test-formatting).
Why
No review time goes on layout, and diffs stay about the change.
17. Extension points are public, not exported
Export only the names a user needs for the package's main job. Mark extension points and collision-prone generic names public and document them. Reviewed by hand.
Why
A crowded export list stops saying which names matter, and a generic exported name collides on using. public still publishes the name and its docstring without putting it in every caller's namespace.
18. New variants arrive by dispatch
A new variant of a component is a new type plus one or two methods, with no edit to existing source. A component that branches on a flag or Symbol is a known deviation. Reviewed by hand.
Why, and the kit's own deviations
It makes "does this change respect the design?" a reviewable test rather than a judgement call.
The kit has two deviations:
Template.ad::SymbolandTemplate.bench::Symbolinsrc/scaffold.jl, read by_ad_selectedand_bench_selected, gate everySCAFFOLD_TEMPLATESentry through aSymbolswitch. A new gating criterion means editing the struct and both selectors. This is the main deviation.ad_harness.jl'sADRegistryis duck-typed and method-based, and is the worked example of the pattern.About eight private content generators in
src/scaffold.jl, including the tutorial, benchmark and docs-dependency helpers, open withad || return ""orbenchmarks || return "". This is weaker, since each gates one fixed feature rather than an extension point.
These are not deviations: _resolve_docs_subdomain, which dispatches on type; benchmarks.jl's status::Symbol, a closed three-state tag; quality.jl's expr.head in (...), which branches on Julia's AST rather than this package's API; and an ordinary ::Bool keyword.
19. Package hygiene has one implementation
The kit is the only implementation of the shared checks and templates. A package differs through qa_config.jl and its docs config, not by forking a managed file. Enforced by template sync, which rewrites managed files on update (see Infrastructure and template sync). A check reimplemented outside a managed file is reviewed by hand.
Why
A forked copy drifts, and the drift is invisible until the two disagree.
20. Named options are validated where they enter
Check a named option where it enters and reject a bad one there. test_option_validation checks an entry point once a package adds it to its tests. It is not in the generic quality testset.
Why
A bad option that propagates surfaces as a confusing failure far from its cause.
21. Composed objects are conformant and queryable
A composition agrees with itself (sampling matches density, leaf protocols are complete) or fails loudly, and can report how it will be evaluated with no silent fallback. Not enforced yet. Per-package checks are being added across the ecosystem.
Why
A composition that degrades quietly gives an answer that is trusted and wrong.
22. Interfaces are duck-typed, not type-constrained
A component asks for the methods it calls (e.g. rand and logpdf), not a concrete type, and call sites stay type-stable. Reviewed by hand.
Why, and how to document an interface
Constraining to a concrete type locks out anything that meets the same contract another way. Asking for methods keeps the interface open, and type stability means it costs no dynamic dispatch. Document the required methods, typically in an interfaces.jl, with a conformance check a new implementation can run against itself.