# Project Context ## What This File Is This is the persistent context file for Claude Code. Keep it concise and useful. ## CLAUDE.md Maintenance Rules - Keep this file under 160 lines - Only record decisions, not explanations of common knowledge - When adding something, check if anything existing is now outdated and remove it - Use short bullet points, not paragraphs - No boilerplate or filler text - If a section grows past 10 items, consolidate or prune the least relevant ones - Format: what we chose + why in one line (e.g., "vanilla JS over React — embeddable, no build step") ## Stack - Python 3 (stdlib only) — fetch, parse, analyze, build_members, build_app, enrich_roster - pytest — classifier unit tests + KPI parity gate against legacy/ - Vanilla JS (IIFE, no framework, no bundler) — frontend must drop into 3rd-party hosts - Chart.js 4.4.0 + SortableJS 1.15.2 — vendored locally under `template/vendor/`, no CDN - Data source: clerk.house.gov XML + senate.gov XML (no API key); Congress.gov v3 API for roster enrichment (key in `.env`) ## Architecture Decisions - One unified vote-record schema for both chambers (`votes.jsonl`) — analyze.py is chamber-agnostic - analyze.py is pure (no I/O); consumed by `build_members.py` workers - `build_members.py` uses `multiprocessing.Pool` with initializer-shared records (no per-task serialization) - Per-member JSON written via tmp + os.replace (atomic); members/ dir wiped on each build to avoid stale files - `manifest.json` is the picker index AND carries per-member KPI dict (`k`) so ranking.html needs only one fetch - `build_app.py` inlines the full manifest as `