Topic meeting lean
#1126 extends the data-center reading (Data center meeting lean) to the other curated topics, so every topic story can draw the four-colour map (#1127).
In short
- What: for each meeting linked to a topic, Jev (TypeSafe's classifier) answers three questions: how the members of the public leaned, how the elected officials leaned, and what happened to an item on the topic.
- Which meetings: only those in
topic_transcript_linkfor that topic. Data centers keep their own screen. - What is read: only the passages that name the topic. The transcript is cut into chunks of about 10k tokens and up to 3 chunks containing the topic's keywords are sent, most keyword hits first. A long meeting's late public comment is read (#1145) and an unrelated first hour isn't paid for.
- What it is not: a count of speakers. Every lean is labelled "AI reading of meetings". Nothing is tied to a person.
The questions and which way "for" points
Each topic's wording lives in llm.typesafe.topic_lean.TOPICS and is hashed into its own question version, so
rewording one topic re-reads only that topic.
| Topic | "In favor" means in favor of |
|---|---|
| Short-term rentals | allowing short-term rentals (permits, fewer limits) |
| Flock and license plate readers | buying, keeping or expanding the cameras |
Gun control (slug guns) | a local gun-control measure: a limit on firearms (where guns may be carried or fired, sales, gun shows, shops or ranges near homes, safe storage, assault weapons, ghost guns). Against = defending gun rights or backing a Second Amendment sanctuary resolution |
| Pickleball | building, keeping or expanding the courts or venue |
| Water fluoridation | keeping or adding fluoride in the water |
| Bike lanes | building or keeping the lanes or paths |
Gun control is the one topic where "for" and "against" could each be read either way (against guns, or against gun
limits), so the site names both sides instead (#1237):
Favor gun limits (mostly_supportive) and Favor gun rights (mostly_opposed). The stored readings
(question_version 48468cc5296e, 7,036 meetings, 26 Nov 2026) were written by the gun-control question above, which
also leaves out tools called guns (nail, staple, radar guns), police buying or qualifying with their own service weapons,
a shooting with no limit debated, and gunshot detection such as ShotSpotter. That question is not yet on main's
topic_lean.py, which still holds an earlier "proposal before the body" wording: committing it is
#1239. The topic id (100005), slug and URL stay guns;
only the display name is "Gun control".
Labels: public_lean and official_lean are mostly_opposed, mostly_supportive, mixed or did_not_speak;
outcome is approved, denied, tabled_or_deferred, moratorium, discussed_no_action or no_item. A lean is
averaged only over the chunks where someone likely spoke on the topic, as for data centers.
Tables and flags
- Bronze:
bronze.bronze_transcript_topic_lean_jev, primary key (video_id, topic_id, question_version), created by the first run. Until thenstg_jev__transcript_topic_leanbuilds empty, so dbt runs keep passing. - Mart:
public.topic_meeting_lean, one row per (video_id, topic_id) under the topic's current question version, primary key (video_id, topic_id), foreign key topic_id →civicsearch_topic. Served on Neon (small). - Flags, with the data-center thresholds:
public_against(mostly opposed, P ≥ 0.7),public_for(mostly supportive, P ≥ 0.7),officials_sided_against_public(public mostly opposed, officials mostly supportive, outcome not a denial or a moratorium). - Served by
GET /api/topics/{topic_id}/state-map(the map) andGET /api/topics/{topic}/caption-facts(the caption).
Run it
Paid (Jev's per-token price). A run starts only on the owner's go-ahead for that run; read usage before and after and put the cost on #1126 (AGENTS.md).
python -m llm.typesafe.screen_transcripts --topic pickleball --limit 20 --dry-run # tokens and cost, nothing sent
python -m llm.typesafe.screen_transcripts --topic pickleball --limit 20 # a small first batch
python -m llm.typesafe.screen_transcripts --topic all --limit 100000 # every topic's linked meetings
cd dbt_project && dbt build --select stg_jev__transcript_topic_lean+ # then publish to Neon as usual
Positions shown on the stories (#1200)
Each meeting's reading is shown as one of four positions, in the topic's own words (web_app/src/utils/topicPositions.ts,
which restates the "for" column above; a vitest checks it against TOPICS):
- Against (
public_against: mostly opposed, P ≥ 0.7), e.g. "Want limits on short-term rentals", "Favor gun rights". - For (mostly supportive, P ≥ 0.7), e.g. "Want to allow short-term rentals", "Favor gun limits".
- Split (neutral): mixed, or a for/against lean under P 0.7.
- Missing: no reading yet, or
did_not_speak. Never shown as split.
A public_lean outside the question's choices (the water-fluoridation rows on 26 Nov 2026 carry oppose_local_choice
and similar, #1204) is in none of the four. The headline's conclusion and its thresholds:
Story captions.
Hand check
To do after the first run: 10 meetings per topic, read against the recording, the same way as the data-center check. Until it is written here, treat the colours as unverified, and in particular "public mostly supported" and "public split" (labelled so since #1190), which were about 2 of 4 right for data centers.