linkedin-studio/scripts
Kjell Tore Guttormsen 0907b2b92d feat(linkedin-studio): trend-store staleness nudge — SessionStart B-S3 [skip-docs]
SessionStart now warns (>=7d, warn-only) when the persistent trend store's
newest capture is stale, firing ONLY when the store already holds captures
(a never-scanned user is never nagged). Neutral wording — "scan for trends"
hits trend-spotter's own trigger; no hardcoded beat (de-niche invariant).

- store.ts: newestCaptureDate() — pure max-capturedAt staleness signal (SSOT)
- cli.ts: status [--json] subcommand (count + newest + daysStale)
- session-start.mjs: trendsNewestCapture() reads trends.json as raw JSON
  (no tsx spawn at session start) + the reminder line, beside import-staleness
- tests: +3 store tests (newestCaptureDate) + hook subprocess test (3 cases:
  >=7d fires, <7d silent, absent/empty silent + no crash)
- test-runner.sh: trends floor 21->24

Verified: trends 24/24 · all hook tests 131/131 · gate 89/0/0 · real render
confirms "Trend signals are N days old. Scan for trends…".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RigJBiRFNtFZKCz21qNbQ4
2026-06-23 12:23:53 +02:00
..
analytics refactor(linkedin-studio): M0-2 — storage.ts getDataRoot + external default (ANALYTICS_ROOT alias kept) 2026-06-18 11:12:11 +02:00
contract-gate feat(linkedin-studio): accumulation binding — ratify + §E foldIns (fix #1 slice 2) 2026-06-20 17:48:20 +02:00
specifics-bank feat(linkedin-studio): per-edition lived-specifics binding + kilder artifact (fix #2 slice 2) 2026-06-20 21:33:44 +02:00
trends feat(linkedin-studio): trend-store staleness nudge — SessionStart B-S3 [skip-docs] 2026-06-23 12:23:53 +02:00
check-model-consistency.mjs fix(linkedin-studio): S11 — model-name declaration drift + model-consistency lint guard 2026-05-30 15:05:37 +02:00
check-replace-safety.mjs fix(linkedin-studio): S13 — close S12 WARN ($-scalar + false-green test) + $-safety lint guard 2026-05-30 19:12:45 +02:00
test-runner.sh feat(linkedin-studio): trend-store staleness nudge — SessionStart B-S3 [skip-docs] 2026-06-23 12:23:53 +02:00