- ROADMAP.md: mark all v0.9.8–v0.9.10 items shipped; Phase 4 accountability features complete; v1.0 criteria all met; update to reflect current state as of v0.9.10 - DEPLOYING.md: add SMTP/email section, ENCRYPTION_SECRET_KEY entry, fix OPENAI_MODEL default (gpt-4o → gpt-4o-mini), add pocketveto.org reference - UPDATING.md: replace personal git remote with YOUR_GIT_REMOTE placeholder for public deployability - ARCHITECTURE.md: add member_scores table, alignment API, LLM Batch API, email unsubscribe, bill tab UI, topic tags constant, Fernet encryption pattern, feature history through v0.9.10 Authored by: Jack Levy
122 lines
8.2 KiB
Markdown
122 lines
8.2 KiB
Markdown
# PocketVeto — Roadmap
|
||
|
||
> Consolidated feature roadmap and release history. Shipped items reflect what is live as of v0.9.10.
|
||
|
||
---
|
||
|
||
## Shipped
|
||
|
||
### Foundation & Core Pipeline
|
||
- [x] Docker Compose stack — PostgreSQL, Redis, FastAPI, Celery, Next.js, Nginx fully containerized
|
||
- [x] Bill polling — Congress.gov incremental sync, filtered to legislation that can become law (`hr`, `s`, `hjres`, `sjres`)
|
||
- [x] Document fetching — GovInfo bill text retrieval with smart truncation for LLM token budgets
|
||
- [x] LLM analysis — multi-provider AI briefs (OpenAI, Anthropic, Gemini, Ollama) with amendment diffing
|
||
- [x] Citations — every key point and risk cites the bill section + verbatim quote; `cited_fact` / `inference` label
|
||
- [x] Citation UI — § chips expand inline with quote + GovInfo source link; "Inferred" badge on analytical items
|
||
- [x] News correlation — NewsAPI + Google News RSS articles linked to bills via topic tags
|
||
- [x] Trend scoring — composite zeitgeist score (0–100) from NewsAPI + Google News + Google Trends, nightly
|
||
- [x] Full-text search — PostgreSQL tsvector across bills and members
|
||
- [x] Multi-user auth — JWT email/password, admin role, user management panel
|
||
- [x] Admin panel — LLM provider/model switching, pipeline stats, external API health, manual task triggers
|
||
- [x] Bill type filtering — only legislation that can become law; 60-day seed window on fresh install
|
||
|
||
### Member Profiles & Mobile
|
||
- [x] Member profiles — bio, contact info, leadership roles, service history, sponsored/cosponsored counts
|
||
- [x] Member interest scoring — composite trend score (NewsAPI + GNews + pytrends), nightly; lazy-loaded on first profile view
|
||
- [x] Member news — articles correlated to members via name search
|
||
- [x] Mobile UI — responsive layout, slide-in drawer, hamburger header, touch-friendly controls
|
||
|
||
### Follows & Personalization
|
||
- [x] Follows — per-user bill, member, and topic follows
|
||
- [x] Follow modes — `neutral | pocket_veto | pocket_boost` with mode-selector UI and descriptions
|
||
- [x] Dashboard — personalized feed from followed bills/members/topics + trending
|
||
- [x] Public browsing — unauthenticated guests browse bills, members, topics, and trending; `AuthModal` gates interactive actions
|
||
- [x] Welcome banner — dismissible onboarding card for guests; `localStorage` dismiss state
|
||
|
||
### Bill Detail Features
|
||
- [x] Bill action pipeline — full legislative action history from Congress.gov; nightly batch + event-driven on change
|
||
- [x] Action timeline — full history with latest-action fallback while history loads
|
||
- [x] Amendment briefs — "What Changed" badge; collapsible version history panel
|
||
- [x] Bill text status indicators — Brief / Pending / No text badge on BillCard (single batch query)
|
||
- [x] Draft letter generator — select up to 3 cited brief points, generate constituent letter via configured LLM; ZIP not stored
|
||
- [x] Personal notes — private per-bill note with pin, auto-resize textarea; one note per user per bill
|
||
- [x] Sponsor linking — poller fetches bill detail for sponsor; backfill task for existing bills
|
||
- [x] "No bill text" state — shown on detail page when GovInfo has nothing published
|
||
|
||
### Collections & Sharing
|
||
- [x] Collections / Watchlists — named groups of bills, public/private, UUID share token; `CollectionPicker` popover on bill detail
|
||
- [x] Shareable brief links — `share_token` on `bill_briefs`; public `/share/brief/[token]` page, no login required
|
||
- [x] Shareable collection links — public `/share/collection/[token]` page, no login required
|
||
|
||
### Notifications
|
||
- [x] ntfy push — Celery dispatcher POSTs to user's ntfy topic; optional token/basic auth
|
||
- [x] RSS feed — private tokenized XML feed per user; always real-time
|
||
- [x] Quiet hours — local-time window (IANA timezone auto-detected by browser); events queued and sent as batch after window
|
||
- [x] Digest mode — bundled ntfy summary on daily or weekly schedule instead of per-event pushes
|
||
- [x] Weekly digest — Monday 8:30 AM UTC; 7-day summary of followed bill activity via ntfy + RSS
|
||
- [x] Change-driven alerts — `categorize_action()` maps action text to 6 named categories; all three follow types (bill, sponsor, topic) covered
|
||
- [x] Granular per-mode alert filters — 8 independently toggleable alert types per follow mode (Follow / Pocket Veto / Pocket Boost); preset defaults; tabbed UI with per-tab save
|
||
- [x] Roll-call votes — `bill_votes` + `member_vote_positions` tables; on-demand fetch from Congress.gov `/votes` endpoint; VotePanel on bill detail shows yea/nay bar + followed member positions
|
||
- [x] Email notifications — SMTP / Resend integration; HTML templates; one-click unsubscribe tokens; per-user opt-in (v0.9.10)
|
||
|
||
### UX & Polish
|
||
- [x] Party badges — solid red/blue/slate, readable in light and dark mode
|
||
- [x] Chamber badges — amber/gold for Senate, slate/silver for House
|
||
- [x] Fact vs inference labeling — `cited_fact` / `inference` on every cited point; backfill task for existing briefs
|
||
- [x] Following page — accordion sections, search, topic filters
|
||
- [x] Member search — "First Last" and "Last, First" both match via PostgreSQL `split_part()`
|
||
- [x] How It Works page — feature guide covering follow modes, alert filter customization, collections, notifications, AI briefs
|
||
- [x] Bill detail page tab UI — four tabs: Analysis, Timeline, Votes, Notes
|
||
- [x] Topic tag pills on bill detail and listing pages — clickable, filtered to 20 known topics
|
||
- [x] Collapsible sidebar — icon-only mode, `localStorage` persistence
|
||
- [x] Favicon — Landmark icon
|
||
- [x] LLM Batch API — OpenAI + Anthropic async batch endpoints; 50% cost reduction; state tracked in `AppSetting("llm_active_batch")`
|
||
|
||
---
|
||
|
||
## Up Next
|
||
|
||
### Phase 4 — Accountability
|
||
|
||
- [x] **Vote History & Timeline** — surface roll-call votes in the action timeline; add a "Votes" filter to the bills list so users can find bills that have had floor votes.
|
||
- [x] **Member Effectiveness Score** — nightly Celery task; transparent formula: sponsored bills, bills advanced through stages, co-sponsorships, committee participation, bills enacted. Stored in `member_scores`. Displayed on member profile with formula explanation.
|
||
- [x] **Representation Alignment View** — for each followed member, show how their votes and actions align with the user's followed topics. Neutral presentation — no scorecard framing.
|
||
|
||
### Phase 5 — Search & Polish
|
||
|
||
- [ ] **Search Improvements** — filters on global search (bill type, status, chamber, date range); search within a member's sponsored bills; topic-scoped search.
|
||
- [ ] **Desktop View** — wider multi-column layout for large screens: sticky sidebar, expanded grid, richer bill detail.
|
||
- [ ] **first_name / last_name Backfill** — Celery task to populate empty first/last from stored "Last, First" `name` field via split (affects ~10% of member records).
|
||
|
||
### Backlog
|
||
|
||
- [ ] **Notification Channels v2** — email (SMTP), Discord webhook, Telegram bot.
|
||
- [ ] **Cross-Bill Referencing** — extract referenced bill IDs from LLM briefs; `bill_references` table; hover preview popover in BriefPanel for referenced legislation.
|
||
- [ ] **Source Viewer Option B** — in-app bill text viewer with cited passage highlighted and scroll-to-anchor. Deferred pending UX review of the current GovInfo-link approach.
|
||
- [ ] **Raw Diff Panel** — `difflib` diff between stored document versions, shown as collapsible "Raw Changes" below the amendment brief. Zero API calls.
|
||
- [ ] **Shareable Collection Subscriptions** — "Follow this collection" so other users can subscribe to a public collection and get its bills added to their feed.
|
||
|
||
---
|
||
|
||
## v1.0 Definition
|
||
|
||
v1.0 ships when the following are all live:
|
||
|
||
- [x] Full bill pipeline (poll → fetch text → LLM brief → news → trend score)
|
||
- [x] Cited AI briefs with fact/inference labels
|
||
- [x] Follow modes (neutral / pocket_veto / pocket_boost)
|
||
- [x] Granular per-mode notification filters
|
||
- [x] Push (ntfy) + RSS + digest + quiet hours
|
||
- [x] Collections with share links
|
||
- [x] Shareable brief links
|
||
- [x] Personal notes
|
||
- [x] Draft letter generator
|
||
- [x] Public browsing (no account required to read)
|
||
- [x] Multi-user auth with admin panel
|
||
- [x] Member effectiveness score
|
||
- [x] Roll-call vote data
|
||
|
||
All other items above are post-v1.0.
|
||
|
||
All v1.0 criteria are met. v1.0 pending final code review and documentation pass.
|