linkedin-studio/agents
Kjell Tore Guttormsen e169c78710 feat(linkedin-studio): RE-R3a — persist relevance score on the store record + rank the morning brief on it [skip-docs]
R3 slice 1 (research-deepening). Stop discarding the relevance judgment the
trend-spotter already computes: persist a 4-field TrendScore {mode, dimensions,
composite, priority} on TrendRecord (schema v2->v3, additive lossless migrate),
computed by the existing score.ts composite()+band() (one owner, no new arithmetic),
threaded item->store; then rankForBrief sorts each bucket composite-first (sentinel
-1 for unscored) and renderBrief surfaces "· <priority> (<mode>)" per body entry
(briefSummary shows the band only). First-sight only; mode-blind ranking with the mode
shown so the operator can disambiguate instruments.

- score.ts: TrendScore + requiredDimensions(mode) (ordered) + scoreEnvelope (composes
  composite+band; throws on bad dim by contract)
- types.ts: SCHEMA_VERSION 2->3; TrendRecord.score?
- store.ts: TrendInput.score?; addTrend persists first-sight (duplicate keeps it);
  migrate comment v1->v2->v3 (logic unchanged, JSON.stringify preserves the field)
- item.ts: TrendItem.score?; normalizeItem validates (non-array score/dimensions + the
  mode's five dims in [1,10]) -> structured error never throw, carries validated dims;
  itemToInput -> scoreEnvelope (no throw on the capture path; direct call throws by contract)
- brief.ts: composite-primary comparator; band+mode render; exact ranking: descriptor
- cli.ts: capture persists score via itemToInput (doc-only); add/score paths unchanged
- agents/trend-spotter.md Step 4.5: capture batch carries the Step-2 dimensions
- gate: TRENDS_TESTS_FLOOR 104->146; new unconditional Section 16j; ASSERT floor 94->99

Tests: trends 146/146 (RED two-phase: logic-RED store/brief/cli; stub-first then
assertion-RED score/item). Gate green (Passed 114 / Failed 0; 113 checks >= 99).
Hook suite 139/139 untouched. Counts 27/19/29 unchanged. No new source file/agent/command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmHCQjJHUyWwxGAVVjNLgp
2026-06-24 14:05:27 +02:00
..
analytics-interpreter.md test(linkedin-studio): M0-16 — lint: EXPECT_REFS=26 + no-bare-path + no-pin + SC2 dry-run (R1) + drop 5 ANALYTICS_ROOT pins it caught 2026-06-18 13:11:50 +02:00
content-optimizer.md docs(linkedin-studio): M0-15 — repoint remaining prose families + route ab-tests/plans 2026-06-18 13:04:18 +02:00
content-planner.md feat(linkedin-studio): de-niche content framework + planner calendar — recast/rename to content-framework.md (B-S2a) [skip-docs] 2026-06-23 10:02:26 +02:00
content-repurposer.md refactor(linkedin-studio): S31b multiplier-scrub (commands + agents) — generic "Nx" claims -> SSOT 2026-06-20 09:34:20 +02:00
content-reviewer.md refactor(linkedin-studio): move agent fasit fixtures + tests out of agents/ (v0.5.3) 2026-06-24 13:29:57 +02:00
differentiation-checker.md feat(linkedin-studio): de-niche content framework + planner calendar — recast/rename to content-framework.md (B-S2a) [skip-docs] 2026-06-23 10:02:26 +02:00
editorial-reviewer.md refactor(linkedin-studio): move agent fasit fixtures + tests out of agents/ (v0.5.3) 2026-06-24 13:29:57 +02:00
engagement-coach.md refactor(linkedin-studio): S31c descriptive-%-scrub — platform-norm percentages asserted as fact -> SSOT 2026-06-20 09:54:44 +02:00
fact-checker.md feat(linkedin): v2.2.0 — harden longform gates from 2nd production run 2026-05-28 20:50:56 +02:00
fact-reviewer.md refactor(linkedin-studio): move agent fasit fixtures + tests out of agents/ (v0.5.3) 2026-06-24 13:29:57 +02:00
language-reviewer.md refactor(linkedin-studio): move agent fasit fixtures + tests out of agents/ (v0.5.3) 2026-06-24 13:29:57 +02:00
network-builder.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
persona-reviewer.md refactor(linkedin-studio): move agent fasit fixtures + tests out of agents/ (v0.5.3) 2026-06-24 13:29:57 +02:00
post-feedback-monitor.md refactor(linkedin-studio): S31c descriptive-%-scrub — platform-norm percentages asserted as fact -> SSOT 2026-06-20 09:54:44 +02:00
strategy-advisor.md feat(linkedin-studio): SB-S3d — operations.md ops centre (strategy-advisor reader) [skip-docs] 2026-06-23 21:28:26 +02:00
trend-spotter.md feat(linkedin-studio): RE-R3a — persist relevance score on the store record + rank the morning brief on it [skip-docs] 2026-06-24 14:05:27 +02:00
video-scripter.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
voice-scrubber.md docs(linkedin-studio): M0-15 — repoint remaining prose families + route ab-tests/plans 2026-06-18 13:04:18 +02:00
voice-trainer.md feat(linkedin-studio): SB-S1 wire voice-trainer to published-only + gate-enforce it [skip-docs] 2026-06-23 15:02:32 +02:00