Provision A Repo Wiki - alexherrero/crickets GitHub Wiki
Note
Goal: Stand up a repo's wiki/ from nothing โ the six-section folder structure plus the CI that lints and publishes it โ with one idempotent, preview-first command.
Prereqs: the wiki-maintenance plugin installed (Install crickets plugins); run from the target repo's root; git, and โ for visibility detection + publishing โ an authenticated gh and a wiki enabled on the repo.
wiki-init is an agent action, not an install hook โ plugins have no target-repo install step, so you run the bundled scaffolder yourself. It's idempotent + preview-first: it fills only what's missing, never overwrites an operator-authored page, and a second run is a no-op. The companion that keeps the wiki current afterward is the wiki-watcher.
-
Preview first โ always. From the target repo root:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/wiki_init.py" --previewIt prints the gap-fill plan and writes nothing. On Claude Code,
/wiki-initruns this for you. -
Read the plan. It has two halves:
-
Scaffold โ the section folders (the six-section frame by default:
how-to ยท reference ยท architecture ยท designs ยท explanation ยท operational), each with a<!-- mode: index -->landing and a per-folder_Sidebar.md, plus the curatedHome.mdand root_Sidebar.md. Two of the six are conditional โarchitecture/renders only when the repo declares components in awiki/architecture.ymlmanifest,operational/only on a non-public wiki โ so a public repo with no manifest scaffolds four. The scaffold is gate-passing by construction (zero hardcheck-wikiissues on a freshwiki/). -
CI โ one workflow,
.github/workflows/wiki-sync.yml(named[W] Update Wiki), and the vendored gate.github/scripts/check-wiki.py.
Every line is an add (
+) or a kept existing (=) โ it never lists an overwrite. -
Scaffold โ the section folders (the six-section frame by default:
-
Heed the cost warning on non-public targets. Before it writes the workflow, the preview auto-detects visibility (via
gh) and prints a billed-minutes warning when the repo isn't public โ Actions minutes are free only on public repos. Relay that warning and get an explicit OK before applying; don't silently--yespast it. To scaffold the wiki only, with no workflow and no billing surface, add--no-ci. -
Apply. Drop
--preview:python3 "${CLAUDE_PLUGIN_ROOT}/scripts/wiki_init.py" --yes--yesskips the script's own prompt (use it once you've confirmed the plan); omit it to keep the interactive guard. The workflow'slint-wikijob runs the gate on every push and PR; itsupdate-wikijob (needs: lint-wiki) publishes to the GitHub Wiki only on the default branch โ so a structurally-broken wiki never publishes. -
Tailor with flags.
--sections a,b,cselects the folder set (default: the six-section frame;architecture/operationalstill gate on their conditions even if listed);--name <project>sets theHome/_Sidebartitles (defaults to the repo dir name);--visibility public|private|internaloverrides auto-detection whenghcan't see the repo (and decides whetheroperational/renders). -
Re-sync the gate after a plugin upgrade. CI runs a vendored copy of
check-wiki.py(GitHub Actions has no${CLAUDE_PLUGIN_ROOT}to reference the plugin's). After upgrading the plugin, refresh that copy:python3 "${CLAUDE_PLUGIN_ROOT}/scripts/wiki_init.py" --resync-gateIt re-vendors
.github/scripts/check-wiki.pyand exits. (The agent path needs no re-sync โ it references the plugin directly.)
-
Wiki-Maintenance plugin โ the plugin that bundles
wiki-init, the gate, and the watcher. - Maintain a wiki โ wiki-watcher โ keep the provisioned wiki in sync after scaffolding.
- Provisioning design โ why provisioning joins authoring, and the gate-distribution split (reference for the agent, vendor for CI).
-
Declare a project's Architecture โ write the
wiki/architecture.ymlthat grows the scaffoldedarchitecture/section. - Wiki design โ six-section wiki taxonomy โ why the frame is fixed at six, and the two conditional-section gates.
-
Install crickets plugins โ get
wiki-maintenanceonto your host.