Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Working on the Docs

The documentation site is mdBook: plain Markdown files plus a navigation file, built to static HTML and published to GitHub Pages.

Build it locally

cargo install mdbook
mdbook serve docs --open

serve watches the source and reloads the browser on save. For a one-off build:

mdbook build docs      # output in docs/book/

docs/book/ is gitignored. Only sources are committed; the published site is built by CI.

Layout

docs/
├── book.toml              # mdBook configuration
├── theme/
│   ├── custom.css         # status callouts, tables, diagrams
│   └── mermaid-init.js    # renders ```mermaid fences
└── src/
    ├── SUMMARY.md         # navigation — every page must be listed
    ├── introduction.md
    ├── status.md
    ├── getting-started/
    ├── guide/
    ├── reference/
    ├── design/
    └── contributing/

Adding a page

  1. Create the .md file in the right section.
  2. Add it to SUMMARY.md — a page missing from SUMMARY.md is not built.
  3. Open with a status callout (see below).
  4. Link to it from related pages.

create-missing = false is set in book.toml, so a SUMMARY.md entry without a file fails the build. That is deliberate: CI catches the broken link rather than publishing a dead nav item.

The status convention

Every page opens with one line stating implementation status:

# Publishing

> **Status:** ⚪ Planned — `[signing]` parses, but `kargo publish` is not
> implemented. See [Implementation Status](../status.md).
MarkerMeaning
🟢Works today
🟡Partly working — say which part
⚪Specified, not built

Mark individual sections too when a page is mixed:

## Remote cache

> **Status:** ⚪ Planned.

Implementation Status is the single source of truth. Update it in the same PR that changes what works, and keep the per-page markers consistent with it.

Writing for these docs

Document the design, not the current state. These docs describe Kargo as it is being built to be; the status markers carry the difference. A planned feature is documented fully, in the present tense, with its marker — not hedged into vagueness.

Be accurate about what exists. Aspirational is not the same as invented. If a page shows kargo new output, that output must match what kargo new actually prints. Check the source before writing a code block for an implemented feature.

Lead with the task. Readers arrive with "how do I add a dependency", not "tell me about the dependency subsystem". Open with the command, then explain.

Say why, not just what. A table of flags is reference material. "Use --offline after kargo fetch to prove your build is reproducible" is a document.

Keep the architecture in its place. How Kargo Works exists for people debugging something surprising. It is not the point of the site, and user-facing pages should not require it.

Conventions

  • Hard-wrap prose at roughly 80 columns.
  • Fenced code blocks always carry a language: bash, toml, kotlin, rust, json, yaml, text.
  • Relative links between pages, with the .md extension — mdBook rewrites them.
  • Tables for anything enumerable: flags, keys, status.
  • Reference file.rs:42 style paths when pointing at source.

Diagrams

Fenced mermaid blocks render as diagrams:

```mermaid
graph LR
    A["kargo-cli"] --> B["kargo-ops"]
```

theme/mermaid-init.js converts these blocks and loads mermaid from a CDN, choosing a light or dark theme to match the reader's. There is no mdBook preprocessor to install — a plain mdbook build renders them. Offline, the diagram source stays visible as code, which still reads.

Publishing

.github/workflows/docs.yml builds the site on every push to main and deploys to GitHub Pages. Pull requests build it without deploying, so a broken SUMMARY.md or a missing page fails the PR.

Pages must be enabled once in the repository settings, with Source set to GitHub Actions.

Checking your work

mdbook build docs      # fails on a SUMMARY.md entry with no file
mdbook serve docs      # read what you wrote

Then click through the links you added. mdBook does not validate link targets inside pages — only SUMMARY.md entries.

The repository's other docs

FilePurpose
README.mdThe repository's front door. Short; links here.
CONTRIBUTING.mdA pointer to Contributing.
CLAUDE.md, .cursor/rules/Instructions for AI assistants working on Kargo.
crates/*/CLAUDE.mdCrate-local conventions.

Keep README.md short. It should orient a newcomer and send them here, not duplicate the docs.