Case Study

Civic Filament

Your community has already agreed. They just don't know it yet. An AI-powered platform that reveals the 70% agreement hiding beneath every civic debate — then gives you the tools to make your government act on it.

Status Launched (Web Alpha) · Native iOS + Android Scaffolded
Role Solo Developer
Stack React · Claude API · PWA · IndexedDB

Every civic listening tool is architecturally broken

Social media algorithms surface the most divisive 30% of opinion because outrage drives clicks. The 70% of latent agreement is invisible by design. Surveys flatten the richness of human values into a thumbs-up or a 1–5 rating — a "no" could mean a dozen different things, and nobody is asked which one. Town halls are biased toward people with time, confidence, and access. The loudest voice wins, not the most representative one.

Meanwhile, the accountability infrastructure that's supposed to pressure elected officials into responsiveness barely exists. Campaign finance filings live in one database. Vote records live in another. Budget line items live in a third. Newspaper coverage lives in a fourth. By the time a concerned citizen cross-references them, the hearing is over and the vote is taken.

The result: governments routinely vote against supermajority consensus while claiming to represent "a divided community." The disagreement is manufactured. The data to expose it exists. It's just scattered across incompatible systems that nobody is paid to connect.

45+

Features

6

Categories

10

Universal Value Types

16D

Value Embeddings

8

Bias Types Detected

7

Transparency Dimensions

13

Accountability Events

$0

For Communities

High-fidelity listening, then hard accountability

Civic Filament replaces the survey with a conversation. An AI mediator trained in Motivational Interviewing and Nonviolent Communication conducts adaptive 3–7 turn interviews, extracting underlying values instead of surface positions. Eight cognitive biases — status quo, availability, anchoring, NIMBY, loss aversion, confirmation, bandwagon, zero-sum — are detected in real time and gently counteracted. A "no" on a bike lane becomes: supports cycling infrastructure conditionally, requires parking mitigation, core value is economic vitality.

Thousands of those conversations are then clustered not by for/against but by value similarity. Schwartz's 10 universal value types mapped into 16-dimensional embeddings. DBSCAN clustering to find natural group boundaries without pre-specifying how many groups exist. Bayesian confidence intervals on every finding, so you know exactly how certain each claim is.

The output isn't a report that sits on a shelf. It's a living accountability layer: vote alignment scoring, campaign finance correlation, budget-value alignment, transparency grading, FOIA generators for 5 state templates plus federal, governance scorecards, and a predictive model for who will vote against their constituents. Insight becomes pressure. Pressure becomes change.

The AI that listens harder than humans can

Most disagreements are the same underlying need expressed through different cultural vocabularies. "Defund the police" and "Back the blue" both contain people who want safe neighborhoods with accountable public servants. The language is incompatible. The values aren't. Finding that signal at community scale is the core problem Civic Filament solves.

As participants talk, a live panel renders their emerging values with growing confidence bars. Parallel model calls extract values in real time; a separate verification pass runs the extraction three times at different settings, and if the results disagree, the finding is flagged as ambiguous rather than reported as fact. The Discourse Quality Index scores each conversation across five dimensions — higher-quality conversations carry more weight in the synthesis.

After the interview, each participant is shown someone who appears to disagree with them but shares their underlying values. Position divergence times value overlap equals an empathy score; an AI-generated narrative bridge explains what the two people actually have in common. Polarization is a product of the tools we use to measure it. Better tools produce less of it.

Moneyball for democracy

Once consensus is measured, every vote an official takes can be scored against it. Representation Alignment produces a civic credit score: "Council Member X aligned 34% across 6 issues." Not partisan — just data. Promise-keeping is tracked through a 13-event, 6-phase accountability timeline that logs drift between what was committed to and what was delivered, and flags skipped phases automatically.

Campaign Finance Correlation runs Pearson correlation between donation amounts and vote-against-consensus rate. "Officials receiving over $5K from real estate voted against housing consensus 83% of the time." Budget-Value Alignment maps line items to community priorities and surfaces the gaps: "94% consensus on safety, 8% of budget." Transparency Scoring grades governance process quality across 7 dimensions and detects potential open meetings law violations.

The correlations aren't abstract — they run against real data. OpenStates for legislator records and vote histories. FEC and OpenSecrets for federal campaign finance. ProPublica for congressional behavior. Municipal Socrata and ArcGIS portals for budget line items and local vote records. The platform is only as sharp as the feeds behind it, which is why the feeds are first-class infrastructure, not a footnote.

The Predictive Model is the piece that unnerves people. A logistic regression trained on donations, tenure, prior alignment, absenteeism, and committee assignments predicts which officials will vote against their constituents before the vote happens. Outcomes are logged back in and the model recalibrates. Over time it gets more accurate — which is exactly the point.

When the newspaper says "divided" but the data shows 82% agreement, that gap is now measurable. When an official accepts $5K from a developer and then votes against the housing consensus, that pattern is now priced. When a promised 15% affordable-units commitment is delivered as 8%, the enforceability-weighted score updates automatically.

Make manufactured disagreement expensive. That's the design philosophy.

The advocacy toolkit, auto-generated

A report nobody reads changes nothing. Civic Filament turns the consensus dataset into the artifacts organizers actually use: 2-minute and 5-minute testimony scripts pre-filled with community data and counter-argument rebuttals, complete legal petitions where every demand cites a specific agreement percentage, state-specific FOIA requests across 5 state templates plus federal (with appeal letters if denied), and one-click regulatory comments backed by thousands of interviews.

The Policy Simulator lets an elected official drag conditions into a proposal and watch predicted support shift in real time. "Add a trial period: +28%. Add parking mitigation: +25%." A Pareto frontier optimizer surfaces the cheapest path to a supermajority. Coalition Builder identifies which organizations share underlying values and drafts shared platform statements natural alliances can sign. Power Mapping names the decision-makers, what influences them, and what to say.

Rights-Based Mapping ties consensus to 7 legal frameworks — ADA, Fair Housing, Civil Rights, EPA Environmental Justice, UDHR, and two more. Legal teeth, not just moral mandate. And an 11-event-type monitoring rule engine fires alerts when tracked issues appear on agendas, votes happen, or deadlines approach. The watchdog never sleeps because the watchdog is software.

What made this difficult

  • Counterfactual re-clustering on live data "What if we only counted people within 2 blocks? What if we weighted by Discourse Quality Index minimum? What if we excluded the last 30 days?" Every counterfactual re-runs the full DBSCAN clustering on a filtered and weighted subset of perspectives, then regenerates consensus statements and Bayesian confidence intervals on the fly. Making that interactive — not a 15-minute batch job — required careful incremental clustering, memoized embeddings, and the discipline to treat the synthesis as a queryable object rather than a static output.
  • Real-time consensus formation over SSE Watching consensus crystallize live is the feature that sells the product, and it's also a distributed state problem dressed as a UI animation. Server-Sent Events stream four event types — perspective_added, consensus_changed, gap_closed, threshold_crossed — with a 30-second heartbeat, while the clustering engine decides which incoming perspectives actually move a cluster boundary enough to rebroadcast. Get it wrong and every interview retriggers the whole dashboard.
  • Bias-adjusted AI-mediated interviews The mediator has to ask open-ended questions, detect eight cognitive bias patterns in real time, adapt its system prompt to gently counteract them, and adjust confidence weights accordingly (floor 0.5 so nothing is ever fully dismissed). The adaptive 3–7 turn interview has to know when it has enough signal and stop — because a bored participant is a noisy participant. Knowledge Gap Steering then pushes future interviews toward the parts of value-space the synthesis hasn't sampled yet.
  • Cryptographic provenance via Merkle trees Every finding has to be mathematically auditable. Journalists, researchers, and opposing counsel all need to be able to verify that the "82% agreement" claim is backed by actual interview hashes that weren't tampered with after the fact. Building a Merkle-tree audit trail over a live synthesis that's constantly ingesting new perspectives — while keeping individual responses privacy-preserving — is a genuinely non-obvious architecture problem.
  • Offline-first IndexedDB sync across a multi-stage pipeline Communities without reliable internet still need the platform. Every interview, every local consensus snapshot, every advocacy artifact has to persist to IndexedDB and reconcile with the server when connectivity returns — without losing perspectives, double-counting them, or corrupting the Merkle provenance chain. Anonymous session tokens in localStorage plus full-state IndexedDB persistence after each message is the easy part. The hard part is merge semantics.

How it's built

React frontend shipped as a Progressive Web App — installable on phone, works offline, no app store required. Native iOS and Android builds are scaffolded through Capacitor, with Xcode and Android Studio projects ready to ship; the web and mobile surfaces share the same consensus engine, the same methodology, the same Merkle-backed audit trail. Claude (Sonnet for the mediator, Haiku for parallel value extraction and natural-language querying) handles the AI surface. IndexedDB for local persistence, Supabase Auth for verified accounts on top of anonymous session tokens. The Web Speech API handles voice input with graceful fallback; a self-hosted Kokoro TTS endpoint reads content aloud for participants who can't read comfortably, have visual impairment, or come from oral traditions. Participation shouldn't require literacy.

The synthesis engine runs 16-dimensional value embeddings through DBSCAN clustering, layered with Bayesian Beta-Binomial confidence scoring and incremental re-clustering for new perspectives. Server-Sent Events push live dashboard updates. Haversine distance and Gaussian proximity weighting power the spatial intelligence layer; GeoJSON export feeds city GIS systems directly. A full REST API exposes JSON, Markdown, and GeoJSON exports for researchers and integrators.

The methodology itself is the architecture's north star: Motivational Interviewing (OARS), Nonviolent Communication, Schwartz Value Theory, Steiner's Discourse Quality Index, Toulmin Argumentation, Fishkin's Deliberative Polling, Bayesian credible intervals instead of p-values, and Merkle-tree cryptographic provenance. Not vibes. Peer-reviewed methods, implemented and shipped.

React PWA Claude API IndexedDB Server-Sent Events DBSCAN Bayesian Stats Merkle Trees Web Speech API Kokoro TTS Capacitor Supabase OpenStates FEC API OpenSecrets GeoJSON Framer Motion REST API

The question isn't whether your community agrees

It's whether anyone has bothered to ask — with a tool built to actually hear the answer, at a price communities can afford, on infrastructure that works in a church basement with no wifi. Civic Filament is free forever for communities because the people doing accountability work shouldn't have to outbid the people they're holding accountable.

The platform launched to the web in alpha. Native iOS and Android builds are scaffolded through Capacitor and ready to ship. Every finding is cryptographically auditable, every piece of methodology is published, every artifact is exportable. There are no proprietary black boxes between a community and the claims being made on its behalf.

The disagreement was manufactured. The consensus was always there. Civic Filament is the infrastructure for surfacing it — and for making sure the people elected to represent it actually do.

Back to Portfolio