Mirexa

Wiki Design

Writing for the wiki

How pages in the Mirexa wiki are structured, cited and kept true.

The wiki is the open, reader-facing documentation for Mirexa. It lives as Markdown in docs/wiki/ and is published to the website from the same files, so every page has to read well on GitHub and convert cleanly to HTML.

The one rule

Every claim about behaviour is checked against the source before it is written, and the page says where. A page describes what the code does, not what a design note, roadmap box or comment says it does. If a claim could not be checked, the page says "unverified" rather than asserting it. Measurements carry a date and the machine they were taken on.

Page shape

Each page starts with YAML front matter:

yaml
---
title: The write-ahead log          # equals the page's single H1
description: One sentence, used for search results and link previews.
section: internals                  # concepts | guides | operations | cluster | internals | reference | design
order: 30                           # position inside its section
sources:                            # repo paths the page was verified against
  - internal/wal/manager.go
  - internal/wal/record.go
verified: 2026-10-30 @ af3a8ef      # date and commit the claims were checked at
---

Then, in order:

  1. One H1, equal to title.
  2. A short opening (two to five sentences): what this is and why it exists, before how.
  3. The body. Concept first, then mechanism, then detail. Use H2/H3; no deeper.
  4. ## References — always present, with up to four sub-lists:
    • Source — files and symbols, e.g. [`wal.Manager.Append`](/internal/wal/manager.go).
    • Tests — the tests that prove the page's claims, by name and file.
    • Further reading — other wiki pages.
    • External — papers, specifications, other systems' docs (full title, author, URL).

Inline citations use footnotes (claim.[^wal-sync]) that resolve to an entry in References, so a reader can jump from a sentence to its proof.

  • Between wiki pages: relative paths with the .md extension — [hot cache](../internals/hot-cache.md), [...](hot-cache.md#anchors).
  • Into the repository: root-relative paths — [/internal/wal/record.go](/internal/wal/record.go). GitHub resolves these against the repo root; the website build rewrites them to the hosted repository. Link files and name symbols; do not cite line numbers, which rot.
  • External: full https:// URLs.

Style

  • Write Mirexa with a capital M in prose. Binary names, config keys, packages and identifiers stay as they are in code (mirexa-cli, storage.data_dir).
  • Plain, precise prose. Define a term the first time a page uses it, or link to the glossary.
  • Present Mirexa as a whole. Gap classification (market closure versus lost data) is one feature among several; give it the weight of the others.
  • Describe the system as it is now. No project history, phase numbers or roadmap section numbers in the body; those belong in the repository's internal notes.
  • Say what is not built or not guaranteed as plainly as what is. A limitation stated is worth more than a feature implied.
  • Code blocks carry a language tag (go, bash, yaml, text). Shell examples show one command per block where a reader would run them.
  • Callouts use GitHub's syntax: > [!NOTE], > [!TIP], > [!WARNING], > [!IMPORTANT].
  • Diagrams: Mermaid (mermaid code block) where a picture shows a mechanism a paragraph cannot; keep them small.
  • Tables for reference material (flags, knobs, codes, frames); prose for explanation.

Keeping it true

When a change alters something a page describes, update the page in the same commit and bump its verified line. When a page turns out to be wrong, fix it and, if the error was load-bearing, note it in the repository's docs/dev-overview.md §10.