# RepSat - Legislative Branch OSINT Scanner

## What It Does

RepSat monitors the US Congress (House + Senate) for legislative activity, member behavior, and political developments. It's the legislative branch counterpart to Warsat's military/intelligence focus.

## Commands

| Command | Action |
|---------|--------|
| **"repsat scan"** | Run all monitors across House, Senate, and legislation |
| **"repsat scan house"** | House floor + House committees |
| **"repsat scan senate"** | Senate floor + Senate committees |
| **"repsat scan members"** | Individual member activity (key senators + representatives) |
| **"repsat scan legislation"** | Bill tracking, votes, major legislation |
| **"repsat scan influence"** | Lobbying, campaign finance, STOCK Act trades |
| **"repsat on/off"** | Master switch |

## Alert Levels

| Level | Meaning |
|-------|---------|
| 🔴 CRITICAL | Emergency session, major legislation passed, leadership change |
| 🟠 HIGH | Significant vote, committee markup, member scandal |
| 🟡 MEDIUM | Routine floor activity, hearing scheduled, member statement |
| 🟢 LOW | Baseline, no significant activity |

## Categories

| Category | Monitors |
|----------|----------|
| **house-floor** | Floor schedule, votes, suspension calendar |
| **senate-floor** | Floor schedule, votes, cloture motions, holds |
| **house-committees** | All standing committees (21) |
| **senate-committees** | All standing committees (19) |
| **key-senators** | Leadership, committee chairs, swing votes |
| **key-representatives** | Speaker, leadership, committee chairs |
| **legislation** | Major bills, votes, status changes |
| **influence** | Lobbying, campaign finance, stock trades |

## Data Sources

Primary (Tier 1): Congress.gov API, House.gov, Senate.gov, Clerk of House, Secretary of Senate, C-SPAN, GovInfo, ProPublica Congress API, GovTrack

Secondary (Tier 2): Member social media (X, Bluesky, Truth Social, YouTube), member websites, newsletters

Tertiary (Tier 3): Lobbying disclosures (LDA), FEC, OpenSecrets, STOCK Act filings (Capitol Trades, Quiver Quantitative)

## Execution Flow

1. **Check switch**: Read `memory/repsat-switch.json`. If disabled, exit.
2. **Category selection**: Based on command, select monitors to run.
3. **Search cascade**: For each monitor, execute search queries or API calls.
4. **Alert classification**: Apply thresholds, assign alert level.
5. **Compile report**: Aggregate findings into structured output.
6. **Log**: Save to `memory/repsat/scan-log.json`.

## Output Format

```
🏛️ REPSAT SCAN — [CATEGORY] — [TIMESTAMP]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[Alert Level] MONITOR NAME
- Finding: [what was found]
- Source: [where it came from]
- Significance: [why it matters]
```

## Files

- `references/monitors.json` — Monitor definitions with sources, queries, thresholds
- `scripts/repsat_scan.py` — Switch/log manager CLI (optional)
- `memory/repsat/scan-log.json` — Scan history
- `memory/repsat-switch.json` — Master switch

## API Keys Required

| Service | Purpose | Get Key |
|---------|---------|---------|
| Congress.gov | Bills, votes, members | https://api.data.gov/signup/ |
| ProPublica Congress | Member positions, statements | https://www.propublica.org/datastore/api/propublica-congress-api |
| OpenSecrets | Campaign finance, lobbying | https://www.opensecrets.org/api/admin/index.php |

Note: Many sources (House.gov, Senate.gov, C-SPAN) have RSS feeds that don't require API keys.

## N8N Integration

This skill is designed to work with N8N automation. The monitors.json file can be imported into N8N workflows for scheduled polling. Each source includes:
- API availability and auth method
- RSS availability
- Update frequency
- Recommended polling interval