commune-ship
Mechanical. Everything here is a check with a right answer, which is why it runs after the human has said ship and why a stranger who edited by hand can run it alone.
Run every command from the wiki root. Pass no --root. $COMMUNE is the path
step 1 prints. Handoff file shapes: references/handoffs.md.
Rules
- Never merge. Open the PR and stop. Voice is the human's, and the PR is where they read the page in the site's chrome.
- A green
checkis not proof the page exists. It did not catch a note whose file name and title disagreed shipping a 404. Step 5 is what catches that. - Pre-existing findings are the baseline, not your problem. New findings are, and they stop the ship.
- Never install anything.
Steps
Preflight and read.
node scripts/preflight.mjs→$COMMUNE; stop on exit 1. ReadWRITING.mdfordumps.commit. Readdumps/<slug>.connect.mdforfiles:andbaseline:, anddumps/<slug>.answers.mdfor what was decided. Pipe every--jsonpayload throughnode scripts/preflight.mjs --schema. Compare finding identities(rule, file, target)withbaseline.findings, usingnullfor absent targets.Check against the baseline.
$COMMUNE check --json. Compare identities as sets, never counts. A missingbaseline.findingsrequires recovering the pre-edit findings; never treat the edited corpus as its own baseline. Any finding that is not in the baseline stops the ship: say which file and which rule, and hand back tocommune-write.File the updates entry.
$COMMUNE update --recent <dump date> --jsonfirst, to read the scaffold. Ifsrc/content/updates/<today>.mddoes not exist, run it again with--write; if it does, edit that file —updaterefuses to overwrite and a second scaffold for one day is wrong anyway. Then fillsummary:, which the CLI leaves empty on purpose: one sentence, from the dump, in the voiceWRITING.mddescribes. SetaiGenerated: falsewhen that sentence is the human's — dictated or edited by them — andtruewhen you wrote it and they only approved. Show them the sentence.Build and gate.
pnpm run build, neverastro buildby hand: the wiki's script carries its lifecycle hooks (devon-wiki'sprebuildunshallows the clone so dates are real). If the script does not end incommune gate, run$COMMUNE gateafter it.gatereadspublic/backlinks.json, which only a build writes, so there is no gate without the build.gateexits 1 when the built site is wrong; that stops the ship.Confirm every new href. For each created or renamed entry, read its
urlPathfrom$COMMUNE graph query --json. Require both an href occurrence in built HTML and an existing destination underdist/:/path/maps todist/path/index.html; its/path.mdtwin maps todist/path.md. Check both URLs, stripping query and fragment before mapping;/maps todist/index.html. Also check new internal links in edited files, including existing destinations. Record occurrence and destination existence separately; either missing stops ship.Commit and open the PR. Prepare the receipt first with commit, PR and preview pending. Commit exactly
files:plus the updates entry; include the four handoffs only whenWRITING.mdsaysdumps.commit: true. Otherwise exclude everydumps/path, even if listed infiles:or already staged. Never use a blanket add. Use the wiki's conventional commit subject. Push and open the PR with the preview URL and summary sentence. Include the review path only when handoffs are shared; otherwise describe the review in the PR.Finish the receipt. Update
dumps/<slug>.ship.mdperreferences/handoffs.mdwith the check diff, href checks, updates entry, content commit, PR and preview URLs. Whendumps.commit: true, commit this receipt update separately and push; itscommitnames the content commit. Otherwise keep it local. Print the PR URL and stop.
Stop conditions
- A new
checkfinding → stop, name it, hand back tocommune-write. gateexits 1 → stop, quote its finding.- An href occurrence or destination file missing from
dist/→ stop. That is the 404 this step exists for. - No preview URL yet (the deployment has not finished) → open the PR anyway and say the preview is pending; do not wait, and do not merge.