feat: congress trades phase 2 — committee relevance, expanded politicians, trade links - #15
Merged
Merged
Conversation
…ians, trade links - Expand politician map from 20 to 30 members with committee assignments, chamber, state, and party data for each entry - Add committee↔sector relevance mapping (committee-sectors.json) - Add ticker↔sector mapping with 75+ commonly traded tickers - Apply 2x 'insider relevance' multiplier when a politician trades a stock in a sector their committee oversees - Add direction weighting for sale_full (1.75x), sale_partial (1.25x), and exchange (0.75x) trade types - Parse and include trade detail URLs from Capitol Trades HTML - Show committee context in formatted output for relevant trades - Include url in BriefingItem output for trade detail links - Add 22 new tests covering committee relevance scoring, politician map validation, ticker-sector lookups, direction weighting, and formatting Note: Capitol Trades HTML does not distinguish full vs partial sales. The sale_full/sale_partial weights are implemented but will only activate if Capitol Trades adds this distinction in the future.
- Remove retired/resigned members: Cathy McMorris Rodgers, Mark Green,
Marjorie Taylor Greene
- Mitch McConnell: multiplier 3→1, no longer leadership tier
- Nancy Pelosi: remove Financial Services (no committee assignments in 119th)
- Fix Cleo Fields: House not Senate, committees → Financial Services
- Fix John Curtis: committees updated to actual 119th assignments
- Add _lastReviewed timestamp to politician JSON
- Narrow Energy & Commerce sectors: drop 'tech' and 'pharma' (too broad)
- Implement tiered committee relevance: direct (2x) vs tangential (1.5x)
- committee-sectors.json now uses {direct, tangential} arrays
- Document intentionally empty committees (Small Business, Ethics)
- Log missing ticker sector at debug level
- Log sector relevance boost with politician/committee/ticker detail
- Add first-match semantics comment on getCommitteeRelevance
- Add URL selector fragility comment
- Add TODO for multi-sector ticker support
- Pass pre-computed committee relevance to calculateScore (avoid redundant calc)
- Tests import JSON modules directly instead of fs.readFileSync
chapati23
marked this pull request as ready for review
February 25, 2026 15:58
chapati23
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2: Congress Trades Enrichment
Changes
committee-sectors.jsonmaps committees to stock sectorsticker-sectors.jsonwith 75+ commonly traded tickerssale_full(1.75x),sale_partial(1.25x), andexchange(0.75x) typesArmed Services · $250K – $500K · ...)Limitations
sale_full/sale_partialweights are implemented but dormant until Capitol Trades adds this distinction.Tests