linkedin-studio/agents
Kjell Tore Guttormsen 24775f4493 feat(linkedin-studio): RE-R1 — item-schema (B1) + triage-scorer (B2) as tested code behind CLI seam [skip-docs]
Lift the research engine's deterministic core out of agents/trend-spotter.md prose
into pure, tested TypeScript under scripts/trends/, behind a CLI seam the agent calls.

- B1 src/item.ts: TrendItem ingress envelope + normalizeItem/normalizeItems
  (required-field validation, topic normalize+dedupe via store's normalizeField,
  optional publishedAt ISO-validate). No id (store derives it); no store bridge
  (capturedAt injection is R2).
- B2 src/score.ts: per-mode weight consts mirroring the SSOT
  (references/trend-scoring-modes.md), composite (weighted sum, [1,10] guard),
  band (5-band map + exact SSOT action strings), triage (keep>=threshold, rank desc,
  annotate composite+band). Owns ONLY the arithmetic; the five judgment scores stay
  model-side.
- CLI normalize/score: JSON payload on STDIN, JSON to stdout (the existing --json
  output toggle is untouched); exit 2 on bad invocation, 0 otherwise.
- Wire trend-spotter.md to name 'src/cli.ts score' as the deterministic-step owner
  (prose pointer; the agent still supplies the five scores). Domain-general.
- Gate: TRENDS_TESTS_FLOOR 24->62; new unconditional Section 16g (score.ts both-mode
  weight-sets + trend-spotter scorer-pointer + non-vacuity self-test);
  ASSERT_BASELINE_FLOOR 84->87.

TDD: logic-RED proven (33/34 item+score fail on assertions, not module-not-found),
then GREEN (trends suite 62/62); CLI RED 2/4 -> GREEN 4/4. Full gate 102/0/0.
No store-schema change (SCHEMA_VERSION stays 1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmHCQjJHUyWwxGAVVjNLgp
2026-06-24 10:09:45 +02:00
..
__tests__ feat(linkedin-studio): v3.1.0 — Endring 9 adversarial review-pakke + per-artefakt personas 2026-05-29 13:01:24 +02:00
fixtures feat(linkedin-studio): v3.1.0 — Endring 9 adversarial review-pakke + per-artefakt personas 2026-05-29 13:01:24 +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 feat(linkedin-studio): make long-form review language configurable [skip-docs] 2026-05-30 00:55:04 +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 feat(linkedin-studio): make long-form review language configurable [skip-docs] 2026-05-30 00:55:04 +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 feat(linkedin-studio): v3.1.0 — Endring 9 adversarial review-pakke + per-artefakt personas 2026-05-29 13:01:24 +02:00
language-reviewer.md feat(linkedin-studio): make long-form review language configurable [skip-docs] 2026-05-30 00:55:04 +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 feat(linkedin): v2.2.0 — harden longform gates from 2nd production run 2026-05-28 20:50:56 +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-R1 — item-schema (B1) + triage-scorer (B2) as tested code behind CLI seam [skip-docs] 2026-06-24 10:09:45 +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