Turn completed plans into plain-language entries a non-engineer can skim. Companion to the
fleet-dashboard "Shipped" tab, which renders these entries. You (the running Claude session)
are the rewrite engine — this uses the subscription, never an API key.
-
Collect the work order (deterministic, no LLM):
node "$(dirname "$0")/scripts/collect-wiki-sources.mjs" [--root <dir>] [--for <slug>]
Run the script at .claude/skills/wiki/scripts/collect-wiki-sources.mjs in the target
project. It prints JSON: { root, project, items: [...] }. Each item has slug, action
(create | update | skip), title, branch, tags, completed, sourceHash,
entryPath, planBody, journalText, gitLog.
-
Skip the skips. Items with action: "skip" are already up to date (source hash
unchanged) — do NOT rewrite them. This is the idempotency guarantee: an unchanged fleet
⇒ zero writes, zero generation.
-
Author prose for each create / update item (skip skip items). Read planBody,
journalText (may be null), and gitLog, and build a prose map keyed by slug:
{ "<slug>": { "title": "...", "summary": "...", "highlights": ["..."], "lessons": ["..."] } }
title = the outcome in plain language (not the slug).
summary = 2–3 sentences of what shipped & why it matters.
highlights = concrete wins (prefer measured numbers / fixed bugs from the journal).
lessons = journal traps — only rendered when the item has a journal; omit otherwise.
- Mirror the source language (Vietnamese plan ⇒ Vietnamese prose).
Save the map as JSON (a temp file is fine).
-
Stamp the entries deterministically:
node "$(dirname "$0")/scripts/write-wiki-entries.mjs" --work-order <work-order.json> --prose <prose.json>
The writer assembles each docs/wiki/<slug>.md with the correct frontmatter and the exact
source_hash from the work order — you never transcribe the hash yourself, so idempotency
cannot break. It creates docs/wiki/ if missing. (You supply prose only; frontmatter is
mechanical.)
-
Report: list created / updated / skipped counts. Keep it terse.