Case Study
Filament
A persuasion intelligence platform with 271 techniques across 10 categories. Real NLP, real graph algorithms, real statistics — built on the principle that transparency about influence is the best defense against its abuse.
The Premise
Influence is infrastructure
Persuasion isn't a dark art. It's infrastructure — the invisible architecture behind every political campaign, every product launch, every relationship negotiation, every military PSYOP framework. The problem isn't that influence techniques exist. The problem is that the people being influenced can't see them.
Filament makes the invisible visible. It catalogs 271 persuasion techniques across 10 categories — from Cialdini's reciprocity to cognitive biases to full-spectrum information operations — and gives you tools to identify them in the wild, understand their mechanics, design your own influence campaigns, and build defenses against campaigns targeting you.
The defense-first philosophy is non-negotiable. Every offensive technique in the database comes with corresponding defense strategies. Every analysis tool that can identify vulnerabilities can also identify your own. The app assumes its users are adults who deserve access to the same playbook that advertisers, intelligence agencies, and political operatives already use.
By the Numbers
271
Persuasion Techniques
10
Categories
69+
Features
9
Tool Categories
The Analysis Engine
Real algorithms, not AI guesses
There's a critical design decision that separates Filament from anything that just wraps an LLM. When the app tells you a text scores 67 on the Flesch-Kincaid readability scale, that's a deterministic formula applied to syllable counts and sentence lengths. When it identifies named entities in a document, that's NER pattern matching. When it measures sentiment, that's AFINN lexicon scoring with valence shifting. The user always knows what's math and what's interpretation.
The NLP pipeline runs real algorithms: TF-IDF for term importance, AFINN for sentiment analysis, Flesch-Kincaid for readability scoring, named entity recognition for actor extraction. These aren't approximations. They're the same techniques used in computational linguistics research, implemented from the specifications.
The graph layer is where it gets interesting. Influence networks are modeled as directed graphs where actors are nodes and influence relationships are weighted edges. PageRank identifies the most influential nodes. Louvain community detection finds clusters of coordinated actors. Brandes betweenness centrality reveals the bridges — the nodes whose removal would fragment the network. These aren't toy implementations. They run on networks with hundreds of nodes in real time.
Statistics layer: Monte Carlo simulation for outcome modeling, Bayesian updating for belief tracking over time, chi-squared tests for independence testing in influence campaigns. When the app says a pattern is significant, it means statistically significant, with a p-value you can inspect.
The Hard Parts
What made this difficult
- Graph algorithms at scale without a graph database PageRank, Louvain community detection, and Brandes centrality are typically run on dedicated graph databases like Neo4j. Filament implements them in pure JavaScript against PostgreSQL-backed adjacency lists. The challenge: maintaining acceptable performance on networks with hundreds of nodes while keeping the stack simple enough for a solo developer to maintain. Custom iterative convergence algorithms with configurable tolerance thresholds.
- Multi-modal influence analysis Influence campaigns don't operate in a single channel. A complete analysis might combine text sentiment from news articles, network topology from social graphs, temporal patterns from posting frequency, and linguistic fingerprints from writing style. Each modality has its own analysis pipeline, its own confidence metrics, and its own failure modes. Fusing them into a coherent assessment without false confidence is an unsolved problem in the field. The app is honest about that.
- Deception detection that admits its limits Stylometric fingerprinting compares writing samples across documents to detect authorship patterns. Benford's Law analysis flags statistically improbable number distributions. Bot scoring evaluates behavioral patterns against known automation signatures. Each method has known false-positive rates. The app reports confidence intervals, not verdicts. A high bot score isn't proof — it's a signal that warrants investigation.
- Adversarial wargaming simulation The simulation engine models influence campaigns as multi-turn strategic interactions. Attacker deploys techniques. Defender deploys countermeasures. Audience responds based on psychological profiles. Each round updates the influence graph, recalculates centrality metrics, and evaluates campaign effectiveness. Building a simulation that's useful without being misleading requires careful calibration of the response models.
- OSINT collection at ethical boundaries Filament collects open-source intelligence from news APIs, Reddit, and RSS feeds for analysis. The ethical line: collect what's public, analyze what's relevant, never store personal data, never enable harassment. The technical line: rate limiting, source attribution, data retention policies, and clear provenance chains so every analytical claim traces back to its source.
- Ethical guardrails that don't patronize The app teaches you how influence operations work. That knowledge is dual-use by definition. The guardrail philosophy: full transparency about capabilities and consequences, defense strategies for every offensive technique, and trust that informed users make better decisions than ignorant ones. The alternative — pretending this knowledge doesn't exist — only benefits the people who already have it.
The Defense Layer
Every weapon comes with a shield
The 271-technique database isn't an arsenal. It's an encyclopedia with a defensive index. Each technique entry includes: the mechanism (how it works psychologically), the deployment (how it's used in practice), the indicators (how to spot it), and the countermeasures (how to defend against it).
The vulnerability assessment tools work in both directions. You can analyze a target audience's susceptibility to specific techniques — or you can analyze your own. The same cognitive bias inventory that reveals exploitable patterns in others reveals them in you. That symmetry is intentional.
The adversarial wargaming isn't just for planners. It's a training simulator for defenders. Run a simulated information operation against your organization, see where the defenses fail, patch the vulnerabilities before someone exploits them for real. Red team yourself before someone else does.
Transparency about influence is the best defense against its abuse. The people who want this knowledge hidden are never the ones being protected by the hiding.
Filament bets that an informed population is harder to manipulate than an ignorant one. That's not idealism. It's game theory.
Architecture
How it's built
React frontend with TypeScript. Express API server. PostgreSQL for persistent storage — technique database, user analyses, influence network graphs. WebSocket connections for real-time collaborative analysis sessions and live simulation updates.
The NLP pipeline runs server-side for heavier operations (TF-IDF across large document corpora, batch entity extraction) and client-side for interactive analysis (real-time sentiment scoring, readability feedback as you type). Claude AI provides interpretive synthesis — connecting pattern detections from multiple analytical engines into coherent strategic assessments.
Graph algorithms are implemented as standalone modules with consistent interfaces: input an adjacency matrix, output ranked results with metadata. Swappable, testable, and independent of the storage layer. The same PageRank implementation works against a PostgreSQL-backed graph or an in-memory test fixture.
What I Learned
The honest retrospective
The hardest part of building Filament wasn't technical. It was epistemic. How do you build a tool that analyzes influence without that tool itself becoming an instrument of influence? The answer, imperfect but honest: show your work. Every score has a formula. Every detection has a confidence interval. Every claim traces to a source. The user is never asked to trust the tool — they're given the evidence to evaluate it.
Implementing graph algorithms from papers taught me more about algorithm design than any course ever did. PageRank's elegance is deceptive — the core algorithm is twenty lines of iterative matrix multiplication. The engineering is in convergence detection, dangling node handling, and performance optimization for sparse graphs. Louvain is similar: beautiful in concept, tricky in the details of modularity gain calculation.
The distinction between deterministic analysis and AI interpretation turned out to be the app's most important design decision. Users trust the sentiment scores because they can verify the math. They trust the AI synthesis because they can see it's built on top of verifiable components. Transparency compounds.
Building tools that make power structures visible is uncomfortable work. The techniques in this database are used every day by people who prefer you don't know about them. Making that knowledge accessible isn't neutral — it's a position. Filament's position is that you deserve to see the board.