fix(linkedin-studio): S13 — close S12 WARN ($-scalar + false-green test) + $-safety lint guard

Closes the 2 grep/Read-verified findings from the S12 cold full-brief re-review
(docs/remediation/review.md, WARN 0/1/1/0, 0 dropped) and closes the $-injection
CLASS — not the line — across the whole state-updater.mjs mutation surface.

See docs/remediation/review.md (S13 ALLOW, 0/0/0/0) for the full closure record:
replaceField -> replacement function; the 3 additive-insert sites -> functions
(m === $1, behavior-preserving); a scalar assert.match pins last_post_topic; and a
behavioral, coverage-complete, self-testing Section 12 guard (check-replace-safety.mjs)
that is mutation-proven. Docs three-doc + residuals updated. test-runner.sh 71/0/0,
node --test 98/98.
This commit is contained in:
Kjell Tore Guttormsen 2026-05-30 19:12:45 +02:00
commit 431a893f7c
10 changed files with 665 additions and 9 deletions

View file

@ -627,7 +627,7 @@ Scheduled posts are tracked in `assets/drafts/queue.json`:
| Version | Date | Highlights |
|---------|------|-----------|
| **4.0.0** | 2026-05-30 | **Audit-remediation release (Voyage Phase 03).** A critical self-review found overclaiming (tracking/analytics/review-independence the plugin couldn't deliver), dormant capability (11 agents never invoked by any command), and structural rot (a dead lint, a self-contradicting algorithm claim, an unpublishable model brand/date in user copy). The fix: every claim made honest or removed; **all 11 orphaned agents wired** (no deletions → 19 agents); new **`/linkedin:firsthour`** command (→ 27 commands) + short-form de-AI gate + video quality gate; `post-feedback-monitor` → Opus; honest newsletter-distribution / profile-SEO / outreach surfaces; **algorithm signals reconciled to one sourced statement** (no model name/date) with `references/algorithm-signals-reference.md` as the single source of truth; analytics fresh-clone crash fixed; **voice-profile leak closed** (placeholder + sentinel + gitignore); structure lint rebuilt with version/count/stat-consistency guards; 7-gate long-form review stack measured → no gate trimmed. **Breaking — reinstall/reload required** for the newly-wired agents; consolidates the v3.0.0 identity break. |
| **4.0.0** | 2026-05-30 | **Audit-remediation release (Voyage Phase 03).** A critical self-review found overclaiming (tracking/analytics/review-independence the plugin couldn't deliver), dormant capability (11 agents never invoked by any command), and structural rot (a dead lint, a self-contradicting algorithm claim, an unpublishable model brand/date in user copy). The fix: every claim made honest or removed; **all 11 orphaned agents wired** (no deletions → 19 agents); new **`/linkedin:firsthour`** command (→ 27 commands) + short-form de-AI gate + video quality gate; `post-feedback-monitor` → Opus; honest newsletter-distribution / profile-SEO / outreach surfaces; **algorithm signals reconciled to one sourced statement** (no model name/date) with `references/algorithm-signals-reference.md` as the single source of truth; analytics fresh-clone crash fixed; **voice-profile leak closed** (placeholder + sentinel + gitignore); structure lint rebuilt with version/count/stat/model-consistency + render-chain-propagation + `$`-safety guards (post-release remediation S8S13); 7-gate long-form review stack measured → no gate trimmed. **Breaking — reinstall/reload required** for the newly-wired agents; consolidates the v3.0.0 identity break. |
| **3.1.0** | 2026-05-29 | Adversarial review package (Endring 9). New **`/linkedin:headless-review`** command + **Step 6.5 (headless-review)** in `/linkedin:newsletter`: three cold/headless archetypes — **`content-reviewer`** (argument), **`language-reviewer`** (Norwegian), **`fact-reviewer`** (cold re-verification + pivot-risk) — plus `persona-reviewer` (resonance/conversion), all with NO drafting-session context. New **`/linkedin:pivot`** command + pivot-detection gate (> 20 % word-count / > 2 new sections re-opens cleared gates before lock). **Per-artifact personas** (`articles.NN.personas`). Pipeline 15 → 16 phases; 24 → 26 commands; 16 → 19 agents; additive `personas`/`pivots`/`headlessReview` state. Backward-compatible; reload required for the new agents. |
| **3.0.0** | 2026-05-29 | **Renamed** `linkedin-thought-leadership``linkedin-studio` ("LinkedIn Thought Leadership" → **LinkedIn Studio**). Breaking (slug + agent namespace `linkedin-studio:<agent>` + runtime state path `~/.claude/linkedin-studio.local.md` all change; reinstall required, state migrated in place), but **functionality byte-identical to v2.4.0**. The `/linkedin:*` commands are unchanged (frontmatter-namespaced, slug-independent). Catch-all skill dir renamed to match (`skills/linkedin-studio/`); the five functional skills unchanged. |
| **2.4.0** | 2026-05-29 | Editor's craft gate as an explicit pipeline phase. New **`editorial-reviewer` agent** (Opus) + **Step 5.5 — Editorial review** in `/linkedin:newsletter` (between fact-check and the persona sweep): two axes — **prosa-håndverk** (em-dash density, verbatim repetition, postulated numbers, contradictions, versal-tic) + **narrativ-arkitektur** (concrete instantiation, theory-anchored hypotheses, series-title symmetry, equal action per addressee, un-overloaded conclusion); ≤10 flags BLOCK/REWORK/NICE as direction; operator-gated via `SendUserFile`; mirrors Maskinrommet §C2. Motivated by Del 4 (every persona PASS, yet 8 fresh editor points, ~6/8 craft/architecture blind spots). `editorial-review` phase + additive `editorialReview` state. Pipeline 14 → 15 phases; 15 → 16 agents. New agent + fasit fixture + lint test the only new files; commands (24) unchanged. |