linkedin-studio/config
Kjell Tore Guttormsen e26d9fb659 feat(linkedin-studio): wire contract-gate + ratify into newsletter Step 4.5 (fix #1 slice 3)
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>
2026-06-20 20:34:49 +02:00
..
content-history.template.md feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command 2026-04-08 08:58:35 +02:00
edition-config.template.json fix(linkedin): close dogfood friction (S14) 2026-05-27 23:37:39 +02:00
edition-delingstekst.template.md fix(linkedin): close dogfood friction (S14) 2026-05-27 23:37:39 +02:00
edition-state.template.json feat(linkedin-studio): wire contract-gate + ratify into newsletter Step 4.5 (fix #1 slice 3) 2026-06-20 20:34:49 +02:00
image-credit-caption.template.md feat(linkedin-studio): parameterize series path + de-brand render output [skip-docs] 2026-05-30 00:46:05 +02:00
personas.template.md feat(linkedin-studio): v3.1.0 — Endring 9 adversarial review-pakke + per-artefakt personas 2026-05-29 13:01:24 +02:00
REMEMBER.template.md refactor(linkedin)!: rename plugin linkedin-thought-leadership → linkedin-studio (v3.0.0) 2026-05-29 11:32:02 +02:00
state-file.template.md feat(linkedin-studio): honest newsletter distribution + profile-SEO + outreach pipeline 2026-05-30 07:07:41 +02:00
user-profile.template.md fix(linkedin-studio): S29d terminology-scrub — "thought leadership" → neutral (skills/config/assets/hooks-test) 2026-06-20 06:19:10 +02:00