Industrial Genome Platform

Component Architecture

Full stack from public signal ingestion through fingerprinting, classification, Studio UI, and commercial outreach engine.
April 2026 ~/projects/genome

System Architecture

Signal Source
FRED
St. Louis Fed CSV API. 40+ series. Free, no key. Industrial production, PPI, capacity utilization, freight.
signals/fred.py
Signal Source
Sector Bundles
16 industry-specific output signal sets. Differentiates entities by sector sensitivity to the same macro inputs.
signals/sectors.py
Signal Source — Planned
SEC EDGAR
Entity-specific financials. 10-Q/10-K revenue, COGS, inventory, capex. Enables company-level vs. sector-level fingerprinting.
signals/edgar.py
Signal Source — Planned
EIA / Baker Hughes
Energy production, rig count. For industrials with energy exposure: ag equipment, heavy equipment, chemicals.
signals/eia.py
Signal Store
Supabase PostgreSQL — project mngmqcmzscltyplnspvx
Tables: companies · signal_events · fingerprints · judgments. TimescaleDB upgrade path for hypertable partitioning when needed. Shared with ops-maturity and Market Intelligence projects.
api/db.py · api/persist.py
Core IP — Algorithm Layer
System ID Engine
Six fingerprint algorithms: latency (cross-correlation), gain (% change ratio), damping (detrended autocorr), oscillation (FFT + Nyquist cap), saturation (slope-change), volatility transmission (std ratio).
core/system_id.py
Core IP — Classification
Fingerprint + Archetype
Builds structured fingerprint from algorithm outputs. Priority-ordered rule set classifies into 7 archetypes. Peer cohort comparison by industry.
core/fingerprint.py · core/archetypes.py
Core IP — Inference
Judgment Engine
Fingerprint → constraint node → trajectory inference → probability-weighted implications → recommended actions with priority, impact, and time-to-effect.
core/hidden_state.py
API Layer
FastAPI — localhost:8000
POST /analyze (fingerprint + judgment pipeline, auto-FRED fallback if no signals provided) · GET /entities (Atlas list) · GET /entity/{id} (history + judgment) · GET /cohort/{industry} (peer data). Persists fingerprints and judgments to Supabase.
api/main.py · api/persist.py
Consumer — UI
Genome Studio
Next.js 15 app. Atlas scatter (gain × damping, colored by archetype). Entity detail: Judgment / Fingerprint / Trajectory / Report / Docs tabs. Analyze form for ad-hoc sequencing.
studio/ · localhost:3002
Consumer — Commercial
Outreach Engine
Targeting → genome reports → Gemini/Ollama message generation → email send (dry-run default) → response classification → strategy learning. CLI and batch runner.
commercial/ · cli.py
Consumer — Planned
Operating Command
COO-facing decision support. Real-time constraint detection, intervention simulation, action prioritization. Requires entity-specific signal ingestion (SEC EDGAR).
TBD

Repository Structure

genome/
core/ # The IP layer — system ID algorithms
system_id.py # latency, gain, damping, oscillation, saturation, vol_tx
fingerprint.py # FingerprintResult builder + signal bundle
archetypes.py # Priority-ordered rule classifier → 7 archetypes
hidden_state.py # Judgment engine → implications + actions
signals/ # Public signal ingestion
fred.py # FRED CSV API client + dedup
macro.py # Default macro input/output bundle
sectors.py # 16 industry-specific output signal bundles
api/ # FastAPI backend
main.py # Routes: /analyze /entities /entity /cohort
db.py # Supabase client singleton
persist.py # fingerprint + judgment persistence
commercial/ # Commercial outreach engine
targeting/service.py # PE firm targets + company selection
reporting/service.py # Genome report generation + persistence
outreach/service.py # Message generation (Ollama/Gemini)
outreach/sender.py # Email send (SendGrid stub, dry-run default)
outreach/response_parser.py # Inbound reply classification
orchestrator/engine.py # run_single / run_cycle / update_strategy
orchestrator/cli.py # CLI: run / single / report / targets
studio/ # Next.js 15 frontend
app/page.tsx # Atlas: scatter + entity list
app/entity/[id]/page.tsx # Entity detail (5 tabs)
app/analyze/page.tsx # Ad-hoc analyze form
app/docs/page.tsx # Documentation index
components/JudgmentPanel.tsx # Archetype + constraint explanation + actions
components/FingerprintRadar.tsx # Recharts radar chart
components/AtlasScatter.tsx # Recharts scatter, click-to-select
lib/taxonomy.ts # Archetype explanations + D1–X3 constraint labels
migrations/ # Supabase SQL migrations
001_initial_schema.sql
002_judgments.sql
003_add_industry.sql
004_commercial_schema.sql # targets, prospect_companies, outreach_*, strategy_state

Algorithm Details

Algorithm Method Key design decisions
estimate_latency Cross-correlation peak across lags 0–12 Series aligned by timestamp (_align()) before correlation. Different FRED series have different observation counts — inner join on shared dates, fallback to positional truncation.
estimate_gain Median ratio of output % change to input % change Uses % changes (not levels) for unit-agnosticism (WTI $/bbl vs INDPRO index). Confidence = min(1.0, n_moving_periods / 12). Filters near-zero input moves (threshold 1e-4).
estimate_damping 1 − mean(|autocorr|) of detrended residuals Detrend first (linear polyfit), then autocorr of residuals at lags 1–4. Uses absolute value — both positive persistence AND negative alternation indicate low damping. High autocorr = low damping.
estimate_oscillation FFT dominant frequency + spectral power fraction Nyquist cap: period > observation_window/2 is a trend artifact, not a cycle. Eliminates spurious 152-week "cycles" from 35-point series. Returns None if cap triggered.
estimate_saturation Slope-change detection via piecewise fit Identifies where output growth flattens relative to input growth. Returns threshold value and confidence.
estimate_volatility_transmission std(dy%) / std(dx%) Uses % changes for unit-agnosticism. Ratio > 1 = system amplifies shocks. < 1 = absorbs. Key fragile/resilient discriminator.

Database Schema

fingerprints
entity_id, entity_nametext
industrytext
gain, damping, latency_daysnumeric
oscillation_period_weeksnumeric
volatility_transmissionnumeric
saturation_thresholdnumeric
confidencejsonb
archetypetext
sequenced_attimestamptz
judgments
entity_id, fingerprint_idtext / uuid
industrytext
system_type, constraint_nodetext
trajectory, trajectory_horizon_weekstext / numeric
confidence, signal_strengthnumeric
implicationsjsonb[]
recommended_actionsjsonb[]
peer_comparisonjsonb
narrative_summary, report_texttext
targets
name, typetext (pe_firm / ma_advisor)
aum_bn, industry_focus[]numeric / text[]
statusnew|enriched|active|paused
outreach_messages
target_id, company_id, report_iduuid refs
subject, bodytext
statusdraft|sent|opened|replied
tone, messaging_styletext
outreach_responses
message_id, contact_iduuid refs
classificationinterested|not_now|unsubscribe|referral|no_signal
signal_strength0.0–1.0
next_actionfollow_up|demo|proposal|none
strategy_state (single row)
messaging_styleinsight_led | question_led
tonedirect | consultative | brief
max_daily_sendsinteger
performance_metricsjsonb
preferred_industriestext[]

Services & Deploy

Service
Stack
Start command
URL
API
FastAPI + uvicorn
uvicorn api.main:app --reload
localhost:8000
Studio
Next.js 15
npm run dev (studio/)
localhost:3002
Ollama (LLM)
llama3.2:3b local
ollama serve
localhost:11434
CLI
Python 3.12
.venv/bin/python3 -m commercial.orchestrator.cli