linkedin-studio/commands
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
..
ab-test.md fix(linkedin-studio): S18 harden ab-test — soften "(Tue-Thu, 8-9 AM optimal)" precision over-claim to "(Tue-Thu mornings)" 2026-06-19 13:55:41 +02:00
analyze.md refactor(linkedin-studio): S31c descriptive-%-scrub — platform-norm percentages asserted as fact -> SSOT 2026-06-20 09:54:44 +02:00
audit.md fix(linkedin-studio): S27 ref-consistency A — "penalty/penalizes" framing → SSOT 2026-06-19 22:06:39 +02:00
batch.md refactor(linkedin-studio): S29e terminology-scrub — rename thought-leadership-angles.md -> content-angles.md + all pointers 2026-06-20 06:39:49 +02:00
calendar.md fix(linkedin-studio): S13 harden calendar — concrete Reschedule snippet + correct camelCase exports 2026-06-18 20:19:31 +02:00
carousel.md fix(linkedin-studio): S5 harden carousel — Step-5 caption buzzword gate 2026-06-18 14:28:07 +02:00
competitive.md refactor(linkedin-studio): S29e terminology-scrub — rename thought-leadership-angles.md -> content-angles.md + all pointers 2026-06-20 06:39:49 +02:00
create.md fix(linkedin-studio): S24 harden create — drop orphan Glob grant from routing front-door 2026-06-19 21:25:00 +02:00
first-post.md docs(linkedin-studio): M0-14 — D3 path-convention + voice-readers prototype 2026-06-18 12:38:17 +02:00
firsthour.md fix(linkedin-studio): S12 harden firsthour — re-source ~70% stat to first 15-30 min + drop CEA mislabel 2026-06-18 18:48:19 +02:00
headless-review.md feat(linkedin-studio): v3.1.0 — Endring 9 adversarial review-pakke + per-artefakt personas 2026-05-29 13:01:24 +02:00
import.md fix(linkedin-studio): S14 harden import — drop baseline/metadata over-promise, prose now matches CLI 2026-06-18 20:56:47 +02:00
linkedin.md fix(linkedin-studio): S26 harden linkedin — re-source router copy to "LinkedIn Studio", queue S29 terminology-scrub 2026-06-19 21:52:58 +02:00
measure.md fix(linkedin-studio): S25 harden measure — explicit Glob, drop Read from routing front-door 2026-06-19 21:38:02 +02:00
monetize.md fix(linkedin-studio): S29a terminology-scrub — "thought leadership" → neutral (commands/) 2026-06-19 22:37:05 +02:00
multiplatform.md fix(linkedin-studio): S4 harden multiplatform — Step-0 empty-source fallback + cross-platform buzzword line 2026-06-18 14:10:17 +02:00
newsletter.md feat(linkedin-studio): wire contract-gate + ratify into newsletter Step 4.5 (fix #1 slice 3) 2026-06-20 20:34:49 +02:00
onboarding.md fix(linkedin-studio): S29a terminology-scrub — "thought leadership" → neutral (commands/) 2026-06-19 22:37:05 +02:00
outreach.md refactor(linkedin-studio): S31b multiplier-scrub (commands + agents) — generic "Nx" claims -> SSOT 2026-06-20 09:34:20 +02:00
pipeline.md refactor(linkedin-studio): S29e terminology-scrub — rename thought-leadership-angles.md -> content-angles.md + all pointers 2026-06-20 06:39:49 +02:00
pivot.md fix(linkedin-studio): S11 harden pivot — moderate to-phase reset skipped fact-check (off-by-one) 2026-06-18 18:34:37 +02:00
post.md refactor(linkedin-studio): S29e terminology-scrub — rename thought-leadership-angles.md -> content-angles.md + all pointers 2026-06-20 06:39:49 +02:00
profile.md fix(linkedin-studio): S23 harden profile — re-source profile-as-validated-object overclaim to SSOT, soften SEO claims 2026-06-19 21:12:54 +02:00
quick.md fix(linkedin-studio): S1 hardening — method calibration (quick) + Start journey 2026-05-31 06:46:11 +02:00
react.md refactor(linkedin-studio): S29e terminology-scrub — rename thought-leadership-angles.md -> content-angles.md + all pointers 2026-06-20 06:39:49 +02:00
report.md refactor(linkedin-studio): S31c descriptive-%-scrub — platform-norm percentages asserted as fact -> SSOT 2026-06-20 09:54:44 +02:00
setup.md fix(linkedin-studio): S29a terminology-scrub — "thought leadership" → neutral (commands/) 2026-06-19 22:37:05 +02:00
strategy.md fix(linkedin-studio): S29a terminology-scrub — "thought leadership" → neutral (commands/) 2026-06-19 22:37:05 +02:00
video.md refactor(linkedin-studio): S29e terminology-scrub — rename thought-leadership-angles.md -> content-angles.md + all pointers 2026-06-20 06:39:49 +02:00