[Atlas] 'What changed this week' cross-quest auto-summary dashboard open

← Live Dashboard Artifact Framework
Dashboard diffing every quest's artifact counts week-over-week; KPI sparklines, top-mover diseases, weekly snapshot ledger.
Spec File

Effort: thorough

Goal

Most users return weekly, not daily. They want one page that answers
"What's new across all of SciDEX since I last looked?" Today we have
nothing. Build a whats-changed dashboard that diffs every quest's
artifact counts week-over-week and renders a single timeline.

This dashboard also serves as the trigger source for the brief-writer
auto-mode (q-synth-brief-writer-agent), the daily digest emit
(q-onb-daily-digest), and the agent-of-the-month award
(q-impact-agent-of-month).

Acceptance Criteria

☐ Dashboard slug whats-changed registered via
register_dashboard.
☐ view_spec_json with 6 data_sources, all using a shared
windows CTE that computes THIS_WEEK = (NOW() - INTERVAL '7
days')
vs. LAST_WEEK = (NOW() - INTERVAL '14 days', NOW() -
INTERVAL '7 days')
:
1. hypotheses_delta — count + avg composite_score change.
2. debates_delta — count + verdict-mix change (resolved /
deadlocked / awaiting).
3. markets_delta — count + total liquidity_usd change.
4. notebooks_delta — count + execution success rate change.
5. open_questions_delta — count opened + count answered + net
change in top-10.
6. top_movers — disease entities with the largest WoW change
in linked-artifact count (top 10 ascending + top 10
descending).
render.template = new whats_changed.html in _TEMPLATES.
Layout:
- Hero strip: 5 KPI cards (one per data-source #1-5) with
sparkline + WoW % delta + colored arrow.
- Top-movers grid: each disease card shows name, current count,
delta arrow, and top-1 hypothesis title from that disease.
- Footer: link to /brief/topic/<slug> for any disease whose
delta exceeds +20% — invokes brief-writer on demand.
cache_ttl_seconds=1800. A weekly snapshot (POST
/api/dashboard/{id}/snapshot) is auto-triggered every Monday
08:00 UTC by a systemd timer
scidex-whats-changed-weekly-snapshot.timer; the snapshot
ledger is the historical record of platform velocity.
☐ Pytest seeds two-week activity for 2 disease entities and
asserts the WoW deltas + top-mover ordering.
☐ Reachable at /dashboard/whats-changed; linked from the global
nav under "Activity" and from the homepage hero.

Approach

  • Build a single _window_counts(table, ts_col, scope) SQL helper
  • inline in the view_spec_json — the bulk of the spec is one CTE
    per artifact-type table.
  • Reuse _pc() ILIKE-escape from
  • q-live-ad-therapeutic-landscape.
  • Add whats_changed.html template; reuse sparkline JS from
  • q-live-market-liquidity-heatmap.
  • Wire scripts/seed_whats_changed_dashboard.py and the systemd
  • timer (under systemd/units/).
  • Expose /api/whats-changed/topics?min_delta_pct=20 JSON endpoint
  • to feed the brief-writer auto-mode.

    Dependencies

    • e352460b-2d76 — view_spec_json DSL.
    • Wave-1 Q-OPENQ — supplies #5 open-question source.
    • q-synth-brief-writer-agent (sibling) — consumes the
    /api/whats-changed/topics JSON endpoint.

    Work Log

    Sibling Tasks in Quest (Live Dashboard Artifact Framework) ↗