← Docs Cockpit πŸ¦… Scout Bacino Investitori πŸ—‘ Basket πŸ“„ Report Analytics Vista tecnica Β· per chi sviluppa il sistema

Bridge Portfolio Β· Docs tecniche

Architettura, ADR, schema DB, agenti, cron e versioning. Vista per chi opera sul codice.

System v1.3.0 Β· β€”
Jump: Overview Architettura ADR Pipeline Agenti Pagine DB schema Cron Changelog

1 Β· Cos'Γ¨ Bridge Portfolio

Sistema multi-agente di scouting & enrichment continuo per il fondo Djungle Bridge.

Il sistema lavora su un bacino di 15.012 societΓ  italiane (registro startup e PMI innovative). Un funnel deterministico seleziona ~2.300 candidate; agenti AI le arricchiscono (financials, founder, causa stallo, modello di business); un cockpit operativo permette di comporre pacchetti per stadio della pipeline e dispatchare batch ai diversi tier di analisi.

Output finale: scoring 7-dimensioni in stile Bridge (controllabilitΓ , recuperabilitΓ , prodotto, break-even, unit economics, team, exit) + matrice di sinergie + mappa acquirenti.

2 Β· Architettura

Tre layer disaccoppiati: dati, runtime, dashboard.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ COWORK SCHEDULED TASKS (runtime esecutivo dei tier) β”‚ β”‚ Β· bridge-tier1-enrichment Β· bridge-team-enrichment β”‚ β”‚ Β· bridge-tier2-* (5 da impl) Β· bridge-tier3-scoring (da impl) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ pickup-by-batch β”‚ writeback append-only β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ SUPABASE (system of record Β· Postgres 17 Β· RLS Β· Realtime) β”‚ β”‚ Β· companies (15.012) Β· company_attributes_history Β· founders β”‚ β”‚ Β· agent_batches Β· agent_batch_runs Β· cohorts Β· scores β”‚ β”‚ Β· view: v_pipeline_stage Β· v_builder_company β”‚ β”‚ Β· RPC: bacino_dashboard() Β· active_batches_with_progress() β”‚ β”‚ Β· cron pg_cron: cleanup-orphan-batches (10min) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ supabase-js + RLS authenticated β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ DASHBOARD (Vercel Β· static SPA + standalone pages) β”‚ β”‚ Β· / (Cockpit Β· Dati Β· Agenti) Β· /builder Β· /bacino Β· /docs β”‚ β”‚ Β· auth: Supabase magic-link via Resend SMTP β”‚ β”‚ Β· domain: dashboard.djunglebridge.com β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3 Β· ADR implementati

Architecture Decision Records β€” ogni decisione tracciabile.

ADRTitoloStatoData
ADR-0001Sistema multi-agente (Supabase + Inngest + Managed Agents β†’ Cowork)Accepted Β· Implemented2026-05-15
ADR-001Pipeline Cockpit & Batch Simulator (opzione C, fase 1)Accepted Β· Implemented2026-05-31
ADR-002C.1 Foundation: schema agent_batches + cockpit + RealtimeAccepted Β· Side A done Β· Side B in Cowork2026-05-31
ADR-003Dashboard "Bacino Β· Profilo qualitativo"Accepted Β· Implemented2026-05-31
ADR-004Pacchetto Builder (anticipo C.2)Accepted Β· Implemented2026-05-31
ADR-006Founder enrichment + team-enrichment deep diveImplemented (prompt tier1 patched Β· team-enrichment task creato)2026-06-01
ADR-008Falco Β· scout conversazionale (sostituisce Builder)Accepted Β· Implemented Β· AGT-104 sync2026-06-02
ADR-009Bacino Β· Asset Queue + Conversation-first (sostituisce ADR-003)Accepted Β· Sprint 1 Implemented2026-06-03
ADR-010Investor View Β· cap-table completa + mappa investitori ↔ aziendeSprint 1+2+3 Implemented Β· backfill 234 inv Β· dedup via pg_trgm + UI merge Β· Sprint 1.5 patch tier1 pronto in PATCH-tier1-round-history.md2026-06-03
ADR-011Exclusion Basket Β· one-shot retroattivo, no regola persistenteSprint 1+2 Implemented Β· table + RPC bulk_exclude + reactivate + UI /basket.html Β· Sprint 1.5 patch tier2/3 pickup in PATCH-tier-exclusion-filter.md2026-06-03
ADR-012Batch Reports persistiti Β· ogni tier scrive il proprio reportSprint 1+2 Implemented Β· batch_reports + v_company_reports + v_team_activity esteso + UI /reports.html Β· Sprint 1.5 patch 7 prompt task in PATCH-tier-batch-report.md2026-06-03

In roadmap: ADR-001 fase C.3 (AI composer, trigger β‰₯30 pacchetti storici) Β· ADR-001 fase C.4 (predictive layer, trigger β‰₯30 outcome scoring).

4 Β· Pipeline stages

Derivati dalla view v_pipeline_stage a partire dalla presenza di dati nel DB.

StageCondizionePop. corrente
worklistfunnel_status='in_worklist' AND NOT enriched.tier1β€”
enrichedenriched.tier1=true Β· attributi base scrittiβ€”
tier2_in_progressalmeno 1 dei 4 tier2 ha scritto (gtm_*, bp_*, team dim, acquirer_targets)β€”
tier2_donetutti e 4 i tier2 fattiβ€”
scoredscores.total + scoring_model_id presenteβ€”
excludedfunnel_status != 'in_worklist'β€”

5 Β· Agenti (runtime Cowork)

Cowork esegue. Ogni task fa pickup da agent_batches WHERE agent_target=<suo nome> via FOR UPDATE SKIP LOCKED e scrive sulle tabelle standard.

Agent targetCowork taskTierScrive suStato
tier1-enrichmentbridge-tier1-enrichment-batch1company_attributes_history Β· signals Β· founders Β· founder_roles Β· companies.enriched.tier1Live + auto-feed
team-enrichmentbridge-team-enrichment1+ (deep dive)founders (bio + linkedin) Β· founder_rolesLive Β· pickup-only
tier2-commercialbridge-tier2-commercial2company_attributes_history (gtm_*)Da creare (Cowork)
tier2-bpbridge-tier2-bp2company_attributes_history (bp_*)Da creare (Cowork)
tier2-teambridge-tier2-team2scores.dimensions.teamDa creare (Cowork)
tier2-acquirerbridge-tier2-acquirer2acquirers Β· acquirer_targetsDa creare (Cowork)
tier3-scoringbridge-tier3-scoring3scores (7 dim + total + recommendation)Da creare (Cowork)
tier3-synergybridge-tier3-synergy3synergiesDa creare (Cowork)
falco Β· AGT-104edge function falco-chat β†’ Anthropic Sonnet 4.5 Β· system prompt sync da Djungle AgentOS (AGT-104)Scoutnessuna scrittura diretta Β· propone azioni che l'utente conferma (note, batch, direttive)Live Β· prompt AGT-104 sincronizzato 2026-06-02

6 Β· Pagine dashboard

Tutte su dashboard.djunglebridge.com, deploy Vercel, auth Supabase magic-link.

PaginaVocazioneThemeVersione
/ Β· CockpitDecisione operativa: stage funnel, active batches con progress, recent batches, drill-down per stage + dispatchDark1.3
/ Β· DatiLettura ranking worklist con search, dettaglio per societΓ  (attributi, founder, signals, score)Dark1.2
/ Β· Agenti at WorkStato agent_runs aggregato + run recentiDark1.0
/scout.htmlSostituisce Builder Β· chat conversazionale con Falco, voice (Web Speech it-IT), pannello live cohort, batch dispatch, activity drawer teamDark1.0
/builder.htmlComposizione per criterio Β· Deprecato redirect a /scout.html (ADR-008 Β§D2)β€”1.2 (legacy)
/bacino.htmlRiscritto Β· ADR-009 Β· Asset Queue top 20 ordinata per SPD v0.2 + KPI bar + actions (open/propose tier2/note/archive) + pointer a Scout per esplorazioni libereLight2.0
/bacino-legacy.html14 card statiche (donut, mercati, founder spotlight, signal stream) Β· Deprecato Β· sostituito da /bacino.html v2 (ADR-009 Β§D3)Light1.2 (legacy)
/docs.htmlQuesta paginaLight1.0

7 Β· Database schema (live)

Supabase project oxxxwbjocjkxcwglgpwn Β· Postgres 17 Β· region eu-west-1 Β· RLS attiva

Tabelle
β€”
View
β€”
Function
β€”
Migrations
β€”

Tabelle principali

TabellaCosa contiene
companiesAnagrafica startup + PMI innovative (15.012). Marker enriched.tier1 per Tier 1 done
company_attributes_historyStorico append-only attributi arricchiti (financials, prodotto, causa stallo, ...) con confidence e fonte
founders + founder_rolesEntitΓ  founder + relazione N:M con company; ruolo, equity %, LinkedIn, bio
signalsEvidenze grezze (news, post, comunicati) collegate a company/founder
scoring_models + scoresFramework di scoring versionato (pesi/soglie/bonus) + score Tier 3 con 7 dimensioni
synergies Β· acquirers Β· acquirer_targetsMatrice sinergie + buyer industriali/finanziari
agent_runsLog operativo di ogni sessione agente, alimenta "Agenti at Work"
agent_batches + agent_batch_runsPacchetto = unitΓ  decisionale del Cockpit. Status: queued/in_progress/done/failed/cancelled
cohorts + cohort_versionsScaffolding per cohort salvati dal Builder (selection_kind='cohort')
cockpit_presets7 preset di tesi del Builder (editoriale, modificabile via SQL)
funnel_stateEsito Funnel Tier 0 per ogni company (passed + reasons)
company_user_notes nuovo Β· ADR-008Note del team sui singoli asset (contesto soft, ognuno scrive le sue, tutti leggono). 3 autori ammessi: alessandro Β· giulietta Β· davide
agent_instructions nuovo Β· ADR-008Note promosse a direttive operative. Modificano sub_score di Β±15 punti max. Audit trail via source_note_id + promoted_by
user_activity_seen nuovoLast-seen-timestamp per ogni utente, usato dal badge "AttivitΓ  team"

Views & RPC

Migration history (live)

Caricamento…

8 Β· Cron pg_cron (live)

Job schedulati direttamente in Postgres.

Caricamento…

9 Β· Infrastruttura & sorgenti

ComponenteProviderNote
System of recordSupabase (Postgres 17)Project bridge-portfolio, region eu-west-1
Dashboard hostingVercelProject bridge-portfolio-dashboard Β· custom domain
Runtime agentiCowork (claude.ai)Scheduled tasks pickup-by-batch (ADR-002 Β§4)
Auth dashboardSupabase Auth + Resend SMTPMagic link via noreply@djunglebridge.com
Real-time UISupabase RealtimeChannel su agent_batches
Seed datiRegistro Imprese italianoSezioni "Startup innovative" (11.806) + "PMI innovative" (3.206)

10 Β· Changelog versioni

VersioneDataHighlights
1.3.02026-06-03ADR-010 v2 Investor View Β· 2 tabelle nuove (investors, investor_companies) con 8 ruoli (lead/co_invest/follower/angel/public/secondary_buyer/grant_provider/unknown) Β· helper _split_investor_names + trigger fn_populate_investors_from_round su company_attributes_history Β· backfill one-shot 136 round_ultimo β†’ 227 investors / 249 partecipazioni Β· vista v_investor_summary + RPC investitori_kpi / investor_detail Β· pagina /investitori.html con KPI bar, distribuzioni ruoli/tipi, tabella sortable + drill-down inline + chat pointer Falco Β· nav esteso
1.2.02026-06-03ADR-009 Bacino Asset Queue Β· pagina /bacino.html riscritta (vecchia versione preservata in bacino-legacy.html) Β· SPD v0.2 deterministico in v_asset_queue Β· v_bacino_kpi + RPC bacino_asset_queue/bacino_archive_from_queue Β· cards top 20 con razionale Falco (auto-fallback) + actions (open/propose tier2/note/archive) Β· scout supporta ?prefill=
1.1.02026-06-02ADR-008 Falco Β· edge function falco-chat live (Anthropic Sonnet 4.5) Β· pagina /scout.html con voice it-IT Β· 5 RPC Falco + helper RLS Β· v_team_activity + badge AttivitΓ  Β· 2 tabelle nuove (company_user_notes, agent_instructions) Β· Builder deprecato (redirect)
1.0.02026-06-01Doc consolidata + Bacino con drill-down tag mercati + nomi descrittivi (no piΓΉ lettere) + team-enrichment in dropdown
0.9.02026-06-01Cleanup orfani via pg_cron + dedup auto-feed duplicati Cowork Β· view Builder ottimizzata 1.300Γ—
0.8.02026-05-31ADR-004 Builder live Β· 7 preset di tesi Β· cohort scaffolding Β· ADR-003 Bacino live (16 sezioni RPC)
0.7.02026-05-31ADR-002 C.1 schema deployato Β· view v_pipeline_stage Β· Realtime su agent_batches
0.6.02026-05-20Cockpit MVP Β· dispatch manuale agent_batches Β· stage cards Β· drill-down
0.5.02026-05-20Detail view su singola societΓ  Β· search box Β· agent prompts v2 anti-contaminazione
0.4.02026-05-19Dashboard live su dashboard.djunglebridge.com Β· magic link Resend Β· 3 utenti
0.3.02026-05-17Provisioning 8 Managed Agents + vault MCP Β· primo test end-to-end (3 societΓ  enriched)
0.2.02026-05-17Orchestrator Inngest + dashboard scaffold Β· auth gate Β· RLS attiva
0.1.02026-05-15Schema iniziale (12 tabelle) Β· ETL 11.806 startup Β· Funnel Tier 0 Β· scoring model v1

Generato live Β· sorgenti: Supabase bridge-portfolio Β· vista compagna: Bacino