Slice 3 of fix#1 (§C2 bindende + akkumulerende): wire the deterministic
§B/§C1 contract-gate into the long-form pipeline as a pre-handoff step, so
mechanical violations die deterministically BEFORE the costly AI gates and
never reach the operator at a judgment gate ("rettelser fester seg").
Newsletter pipeline:
- New Step 4.5 (between Step 4 consistency/quality and Step 5 fact-check):
(1) ratify the gate (rules.ts <-> §E-manifest 1:1; DRIFT escalates to
operator, not a draft fix) and (2) gate the draft (exit 0 PASS / exit 1
BLOCK -> fix by tightening + re-run; WARN = direction, never blocks).
Adopter-safe: no-op when contract-gate deps / the maskinrommet contract
are absent.
- Pipeline phase count 16 -> 17 across every LIVE surface (overview table +
build-status + narrative + banner + schema pointer in newsletter.md;
command-table rows in CLAUDE.md and README). Historical version-narrative
entries left untouched.
- edition-state.template.json: new "contract-gate" phase string (Step 4.5),
between consistency-quality and factcheck-sweep. JSON valid; phases 16->17.
CI integration (test-runner.sh, Section 14 — new):
- 14a: contract-gate suite stays green (npm test exit 0) with a 33-test
case-count floor (anti-erosion).
- 14b: ratify invariant — rules.ts bound 1:1 to the §E-manifest.
- Both KTG-internal and adopter-safe (warn/skip, never fail, when deps or the
contract are absent). set +e inside the test command-substitution keeps a
red suite from aborting the runner; ratify exit 1 captured via if-subshell.
- SC6 anti-erosion section renumbered 14 -> 15; header comment updated.
Verification:
- Structure lint 81 -> 83/0/0 (contract-gate suite + ratify both green).
- Documented Step 4.5 command smoke-tested on a real draft
(serier/silvija-seres-motsvar/utkast/04-utkast.md): 0 BLOCK / 2 WARN ->
"Gate passert", exit 0.
- edition-state.template.json valid JSON; phases array = 17.
foldIns capture into the pipeline phases deferred to a later slice (scope A).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>