commune-write
Grill, draft, refine. One note per run. The draft goes into the real file in
src/content/; the worktree is the staging area.
Run every command from the wiki root. Pass no --root. $COMMUNE is the path
step 1 prints. Handoff file shapes: references/handoffs.md.
Rules
Use the target note's title verbatim in
[[Title]], with no display text or pipe. Rewrite the sentence around the title.WRITING.mdat the wiki root decides every sentence and every frontmatter block. Read it first and read nothing else about voice. If it is missing, stop and say: "Runcommune-setupfirst — this wiki has noWRITING.md."A note the dump means to publish gets
visibility: publicbefore you runcheck. Notes default toprivate, and the graph cannot see a private note:check,related,gateandupdateall skip it, so a greencheckon a private draft proves nothing. Whenpublish: false, say in one line that the note gets no graph verification, and do not pretend otherwise.Candidates in
.connect.mdare offers. A mention the draft ignores is not a miss, and you never link something to raise a number.Never install anything. Do not commit the draft;
commune-shipcommits it. The one exception is refine, which commits each correction on its own so a verdict can be reverted alone (references/refine.md).
Steps
Preflight and read. Run
node scripts/preflight.mjs→$COMMUNE; stop on exit 1 and show its line. Read, in order:WRITING.md, the dump file,dumps/<slug>.connect.md, anddumps/<slug>.answers.mdif it exists. Pipe every--jsonpayload throughnode scripts/preflight.mjs --schema.Grill — when no answered round exists. Follow
references/grill.md. Output:dumps/<slug>.answers.mdwith## Settledand## Round N — questions. Print the path and stop. Do not draft in the same turn.Draft — when the newest round has answers under it. Output: the file at
target:in the dump, or a new file insrc/content/<collection>/, named the way that collection already names its files — read one before you guess. Write## Round N — decisions extractedinto.answers.mdfirst, then apply those decisions as a delta to the base named bybase:. Frontmatter comes fromWRITING.md's block for that collection, keys in its order. Append every file you touched tofiles:in.connect.md.Verify. Run
$COMMUNE check --jsonand compare finding identities(rule, file, target),nullfor an absent target, againstbaseline.findingsin.connect.md. Any new finding is yours to fix before you show anything; pre-existing findings are the baseline and are not. Then$COMMUNE graph related <target> --jsonfor what the note now links.Render the side by side. Run:
node scripts/review.mjs <base-ref> <target> --connect dumps/<slug>.connect.md --answers dumps/<slug>.answers.md --out dumps/<slug>.review.htmlPass--out: the script's default is named after the note, not the dump. Print that path, then a short table of what changed in the graph — links added, links dropped, and for each dropped link whatat_risksays it costs.Hand off. Say: "Answer in
dumps/<slug>.answers.md, give me a one-sentence correction, or say ship." On a correction, followreferences/refine.md— same skill, next round. On "ship", say: "Runcommune-ship."
Stop conditions
- No
WRITING.md→ stop, namecommune-setup. .connect.mdhasstatus: blocked→ stop;commune-dumpowns that.- No answered round → you are in step 2, and stopping is the step.
- A new
checkfinding you cannot fix → stop and say which line caused it. Never show a review page with a broken link in it.