Render one wiki page per synthesized cluster — overview, user stories, what is built, open threads, and hot files — plus an index linking them all.
pks brain wiki [options]$ pks brain wiki --dry-runList the pages that would be rendered
$ pks brain wiki --max-clusters 5Render only the five largest clusters
$ pks brain wiki --no-aiWrite the index from existing clusters only
Wiki is phase 4. It reads ./.pks/brain/synthesis/clusters.json and renders one markdown page per qualifying cluster into ./.pks/brain/wiki/ — overview, user stories, what has been built, open threads, and hot files — together with wiki/index.md linking every page.
The default --min-cluster-size is 3. A theme backed by fewer than three sessions is usually too thin to read as a page.
./.pks/brain/wiki/, so the command exits with code 1 outside a repo.clusters.json. Without it, wiki tells you to run synth and exits 0.pks brain wiki --dry-run
Eligible pages and the estimated cost are printed with no model calls.
pks brain wiki
Pages are rendered ten at a time by default. The confirmation gate fires at 10 or more pages and $1.00 or more estimated, unless --no-ai or -y is passed.
pks brain wiki --max-clusters 5 --min-cluster-size 4
--max-clusters bounds how many pages get an AI rendering; the remaining clusters stay in the index only. --min-cluster-size controls which clusters qualify as a page at all.
pks brain wiki --no-ai
Writes wiki/index.md from the existing clusters.json and skips every model call.
cat ./.pks/brain/wiki/index.md
Every entry links to a rendered page in the same directory.
| Flag | Default | Description |
|---|---|---|
--model <name> | haiku | Model name passed to the backend. |
--parallel <n> | 10 | Maximum parallel model invocations. |
--max-clusters <n> | — | Cap how many cluster pages receive an AI rendering. Others stay in the index. |
--min-cluster-size <n> | 3 | Minimum sessions per cluster before it becomes a page. |
--no-ai | false | Skip model calls. Writes wiki/index.md from the existing clusters.json only. |
--max-budget-usd <amount> | — | Hard dollar cap per invocation. |
--dry-run | false | Plan only — print eligible pages and the estimate. |
-y, --yes | false | Skip the cost-confirmation prompt. |
"Run pks brain synth first" and exit 0. clusters.json does not exist. pks brain synth --no-ai produces it without cost.
Fewer pages than clusters. Clusters below --min-cluster-size are indexed but not rendered. Lower the threshold to widen the set.
Exit code 1 immediately. The working directory is not inside a git repository.