- WelcomeBanner.tsx: guest-only dismissible onboarding card on dashboard (localStorage pv_seen_welcome, Browse Bills CTA, X dismiss) - useDashboard: add !!token to query key so login/logout triggers a fresh fetch without manual refresh - ARCHITECTURE.md: WelcomeBanner component, auth-aware query keys, v0.6.1 feature history entry - Roadmap: mark welcome banner items complete - Add MVP planning notes (Phase 3-6 roadmap draft) Co-Authored-By: Jack Levy
3.8 KiB
Phase 3 — Personal Workflow & Context
Focus: Allowing users to organize data and adding the "Cross-Bill" intelligence layer.
-
Collections / Watchlists:
collectionstable for public/private bill groupings shareable via UUID tokens. -
Personal Notes: Private
bill_notestable to store user stances, tags, and pinned insights on bill detail pages. -
Cross-Bill Referencing (New):
-
Extraction: Update LLM prompts to identify and extract related bill identifiers (e.g., "H.R. 1234") from text.
-
Referential Table: Implement
bill_referencesto map source-to-target bill relationships with context quotes. -
Ghost Hydration: Create the
/api/admin/bills/hydrateendpoint to fetch and analyze referenced bills not currently in the DB. -
UI Hover Previews: Use
Radix UIpopovers in theBriefPanelto show snapshots of referenced legislation without leaving the page.
-
-
Weekly Digest: Celery beat task to dispatch 7-day summaries of followed bills via ntfy and RSS.
Phase 4 — Accountability & Member Scoring
Focus: Deep-diving into legislative performance and voting records.
-
Votes & Committees: Fetch roll-call votes and committee actions from Congress.gov into a new
bill_votestable. -
Member Effectiveness Score: Nightly Celery task calculating scores based on sponsored bills, advancement milestones, and "bills enacted" metrics.
-
Bipartisan Progress Metric (Proposed): Enhance effectiveness scores by weighting co-sponsorship across party lines and committee movement in opposing chambers.
-
Representation Alignment: Neutral view showing how member votes align with a user’s followed topics.
Phase 5 — Systemic Intelligence
Focus: Enhancing search and providing broader legislative context.
-
Search Improvements: Add filters for bill type, status, chamber, and date; implement "Search within member bills".
-
Topic-Scoped Search: Allow users to search legislation exclusively within followed topics like "Healthcare" or "Energy".
-
Member Effectiveness Transparency: Display the "Member Effectiveness" formula on profile pages to maintain non-partisan trust.
Phase 6 — Desktop & Polish
Focus: Optimization for professional-grade power users.
-
Desktop View: Multi-column layout with sticky sidebars and expanded grids optimized for large screens.
-
Notification Channels v2: Expand beyond ntfy/RSS to include Discord webhooks, Telegram, and SMTP email.
-
Backfill Tasks: Automate
first_nameandlast_namepopulation for all member records.
🛠️ Updated Technical Implementation Details
Database Schema Updates
| Table | New Columns / Purpose |
|---|---|
bill_references |
source_id, target_id, context_quote to link related bills. |
bill_notes |
user_id, bill_id, content, stance, tags, pinned. |
collections |
user_id, name, slug, is_public for shared watchlists. |
bill_votes |
Stores roll-call data and results for accountability tracking. |
Enhanced LLM Pipeline
The llm_processor.py task will now perform a dual-pass:
-
Analysis: Generate the standard brief with citations and fact/inference labels.
-
Mapping: Extract bill IDs found in the text and insert them into the
bill_referencestable. If a target ID is missing from thebillstable, it triggers a low-priorityhydrate_billtask.
Performance Guardrails
-
Selective Hydration: The poller will only "Ghost Hydrate" referenced bills if they are from the current or previous Congress to prevent API exhaustion.
-
Cached Previews: Referenced bill snapshots for hover tooltips will be cached in Redis to minimize database hits during dashboard scrolling.