linkedin-studio/commands
Kjell Tore Guttormsen 657539ef09 feat(linkedin-studio): N12 — editions-register CLI + phaseLog-telemetri (TDD) [skip-docs]
Two things were structurally invisible: WHICH editions are in flight (readable
only by opening every series folder's edition-state.json by hand) and HOW LONG an
edition takes (not recorded anywhere). At two editions a week both are
load-bearing — a production line cannot be dimensioned on numbers never collected.

Register (scripts/editions, new module beside distillate.ts): one row per edition
in ${LINKEDIN_STUDIO_DATA}/editions/register.json — series, edition, title, series
path, current phase, next action, slot, startedAt/completedAt. Data-dir placement
(M0) because the register spans ALL series; the distillate is per-series and stays
in the series root. Verbs: register-upsert / register-list / register-complete.

phaseLog: articles.NN.phaseLog[{phase, completedAt}] in edition-state, additive so
schemaVersion stays 1 — pre-N12 editions load unchanged and their absence reads as
"not measured", never as zero. Per-article, mirroring articles.NN.phase: lead time
is a property of an edition.

One call per transition, both writes: newsletter.md gains a phase-transition
protocol defined once beside the resumption table, and all 16 canonical phases
invoke it. register-upsert appends the phase-log entry AND mirrors the register
row. Deliberately one command, not two — telemetry the command layer must remember
to write separately is incomplete inside a week, and an incomplete log measures
nothing. Step 10 closes the row and prints the measured lead time.

Mirror discipline: resumption still reads edition-state.json and only that. Delete
the register and the next transition rebuilds it; a failed upsert is reported, never
a reason to stop the pipeline. startedAt is the one unrecoverable value, so it never
moves — re-upserting a completed edition reactivates the same row (what
/linkedin:pivot does), keeping the clock on real elapsed production time.

Deterministic: no clock in the core (now passed in, --at/--now at the edge, as the
distillate takes lockedAt). Idempotent where a re-run is legitimate (repeated
transition logs once; completing twice keeps the first completedAt), not where it is
real work (a phase recurring after another one is logged again — a pivot back through
cleared gates is production time that happened). Missing facts are refused at the
edge, not defaulted: a row naming the wrong phase is worse than no row.

TDD (Iron Law): all three test files written first and verified red before any
implementation existed (register.test.ts + editionState.test.ts failed on missing
modules, cli-register.test.ts on "unknown command: register-upsert").

Suites: editions 27 -> 72 (floor raised) · test-runner 173 -> 184 (Section 16s: 11
unconditional greps incl. a 16-phase coverage sweep + non-vacuity self-test;
anti-erosion floor 155 -> 166) · trends 300/0 · brain 134/0 · specifics-bank 45/0 ·
hooks 140/0 · tests 35/0 · render 60/0. tsc --noEmit clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QxvWAjte7vPcF79QeSRvRJ
2026-07-25 06:55:44 +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): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00
carousel.md fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +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 fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00
firsthour.md fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +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 feat(linkedin-studio): N5 — /linkedin:trends discovery-kommando + trend-spotter pin-fjerning + triage [skip-docs] 2026-07-17 04:00:17 +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): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00
newsletter.md feat(linkedin-studio): N12 — editions-register CLI + phaseLog-telemetri (TDD) [skip-docs] 2026-07-25 06:55:44 +02:00
onboarding.md fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +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 fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +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 fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00
profile.md feat(linkedin-studio): de-niche rest-sweep — vary KTG-beat examples across surfaces (B-S2b) [skip-docs] 2026-06-23 10:50:28 +02:00
quick.md fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00
react.md fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00
report.md fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00
setup.md feat(linkedin-studio): de-niche rest-sweep — vary KTG-beat examples across surfaces (B-S2b) [skip-docs] 2026-06-23 10:50:28 +02:00
strategy.md fix(linkedin-studio): S29a terminology-scrub — "thought leadership" → neutral (commands/) 2026-06-19 22:37:05 +02:00
trends.md feat(linkedin-studio): N7.5 — MR-F9 etterspørsels-sveip (Tier-5-kilder + smertepunkt + vokabular-oversettelse + arc-kontrakt) [skip-docs] 2026-07-23 22:26:39 +02:00
video.md fix(linkedin-studio): Oppgave 1 fix-pass — clipboard heredoc + report refs + calendar queue-felter [skip-docs] 2026-06-30 13:35:17 +02:00