---
type: Guide
title: Development guide
description: How to build, test, validate OKF documentation, and verify containers locally.
status: stable
tags: [contribution, build, testing, containers]
---

# Development guide

## Running checks

The `Makefile` uses host `go` when available and transparently falls back to a cgroup-bounded rootless `docker.io/library/golang:1.26` Podman container when Go is not installed on the host.

```bash
make check        # fmt/check, vet, tidy/check, fast tests, okf validate
make check/race   # full -race test suite + okf validate
make test/oauth   # OAuth 2.1 integration tests against standalone Keycloak container
make build        # compile static ./bin/what-if binary
make site/build   # render OKF docs and assemble Cloudflare site/dist
make site/brand   # re-render og.png and PNG icons from site/brand (Playwright container)
make image        # build minimal scratch container image
make image/omni   # build Alpine + ffmpeg container image
```

## Updating documentation

Whenever configuration keys, CLI commands, or MCP schemas change:

1. Update the affected files under `docs/`.
2. Add a dated log entry under `docs/logs/YYYY-MM/` and ensure its month index links to it.
3. Run `make docs/check` to confirm `okf validate docs/` passes with zero errors.

## Site and brand

The landing page and the docs share one palette, `site/assets/css/tokens.css`: warm stone neutrals in light, zinc in dark, and cerulean as the accent for interaction only (links, focus, selection, one primary action). `make docs/render` stages it into the docs theme ahead of `site/theme/tokens.wiki.css`, which maps it onto okf-wiki's names, so colours are edited in one place. Corners are 2px on controls and 4px on panels; there are no shadows, gradients or emoji, and status always pairs a shape and a word with its colour.

The mark is one path on a 26 by 20 grid in `site/brand/mark.svg`: a filled square (the state) forks into a filled square (the answer picked) and an outlined one (the answer not picked). The header, favicon, touch icon, docs mark and social card copy that path. After changing it, or `site/brand/card.html`, run `make site/brand` and commit the PNGs.

Cloudflare Workers Builds deploys the site from `main`. The Worker is named `what-if`, its root directory is `site`, its build command is `make -C .. site/build` (the build reads `docs/` and the root `Makefile`) and its deploy command is `npx wrangler deploy`. The custom domain `what-if.roundhouse.is` is attached in the Cloudflare dashboard. The build image has no container runtime, so `make docs/render` downloads the okf-wiki release pinned in the `Makefile` into `site/.toolchain` and checks its SHA-256 first; with podman, the image pinned to the same release renders instead. Move the two together.
