Lossless Changelog
component

Cap Table & Financial Extractors

Added two new extractors to the Dataroom Analyzer: Cap Table Extractor and Financial Extractor. These complete the core Phase 2 extractors for investment dataroom analysis.

Changelog - 2025-11-26 (#3)

Cap Table & Financial Extractors

Overview

Added two new extractors to the Dataroom Analyzer: Cap Table Extractor and Financial Extractor. These complete the core Phase 2 extractors for investment dataroom analysis.


New Feature: Cap Table Extractor

Purpose

Extract ownership structure, shareholders, option pools, and SAFEs from cap table documents (PDF and spreadsheet formats).

Implementation

Created src/agents/dataroom/extractors/cap_table_extractor.py (~500 lines):

PYTHON
def extract_cap_table_data(
    documents: List[Dict[str, Any]],
    use_llm: bool = True
) -> Optional[CapTableData]:
    """Extract cap table data from classified documents."""

def extract_from_pdf(file_path: Path, use_llm: bool = True) -> Optional[Dict[str, Any]]:
    """Extract cap table data from a PDF document."""

def extract_from_spreadsheet(file_path: Path, use_llm: bool = True) -> Optional[Dict[str, Any]]:
    """Extract cap table data from a spreadsheet (CSV/Excel)."""

Extraction Approach

Three-stage extraction:

  1. Rule-based parsing - Regex patterns for common cap table formats

  2. Table extraction - pdfplumber for structured table data

  3. LLM enhancement - Claude Sonnet for complex/ambiguous structures

Data extracted:

  • Shareholders (name, shares, ownership %, share class, investor type)

  • Total shares outstanding / fully diluted

  • Option pool (total, issued, available, percentage)

  • Share prices by round

  • SAFEs and convertible notes

  • As-of date

Testing Results (Hydden Cap Table)

FieldValue
As-of DateAug 1, 2025
Total Outstanding16,429,886
Fully Diluted16,705,143
Shareholders4
Founder Ownership54.8%
Investor Ownership24.9%
Option Pool20.3%
Capital Raised$4,150,000
Seed-1 Price$1.1224/share
Seed-2 Price$0.4849/share

New Feature: Financial Extractor

Purpose

Extract financial projections, P&L data, and key metrics from financial model documents (CSV, Excel, PDF).

Implementation

Created src/agents/dataroom/extractors/financial_extractor.py (~450 lines):

PYTHON
def extract_financial_data(
    documents: List[Dict[str, Any]],
    use_llm: bool = True
) -> Optional[FinancialData]:
    """Extract financial data from classified documents."""

def extract_from_csv(file_path: Path, use_llm: bool = True) -> Optional[Dict[str, Any]]:
    """Extract financial data from a CSV file."""

def extract_from_excel(file_path: Path, use_llm: bool = True) -> Optional[Dict[str, Any]]:
    """Extract financial data from an Excel file."""

Data Extracted

Income Statement:

  • Revenue / ARR / MRR (time series)

  • Gross profit and margin

  • Operating expenses (R&D, S&M, G&A)

  • EBITDA / Net income

Key Metrics:

  • Burn rate (monthly)

  • Runway (months)

  • Cash position

  • LTV/CAC ratio

Projections:

  • Multi-year forecasts

  • Monthly/quarterly granularity

  • Headcount projections

Testing Results (Hydden Financial Model)

MetricValue
Projection PeriodJun 2025 - Dec 2029
Starting ARR$60K (Jun 2025)
Ending ARR$62.6M (Dec 2029)
Growth~1000x over 5 years
GranularityMonthly

Output Structure Update

The dataroom analyzer now outputs 4 numbered artifact files:

output/Company-v0.0.1/
├── 0-dataroom-inventory.json/md    # Document inventory
├── 1-competitive-analysis.json/md  # Competitive landscape
├── 2-cap-table.json/md             # Cap table & ownership
└── 3-financial-analysis.json/md    # Financial projections

Each extractor produces both JSON (structured data) and Markdown (human-readable report).


New Report Formatters

Added two new markdown report formatters to analyzer.py:

format_cap_table_report()

  • Ownership summary table

  • Shareholder breakdown by type

  • Option pool details

  • SAFE/convertible note tables

  • Extraction notes

format_financial_report()

  • Key metrics summary

  • Time series tables for ARR/revenue

  • Gross margin tracking

  • EBITDA/net income

  • Headcount projections

  • Extraction notes


Integration Updates

_run_extractors() Updated

Now calls all three extractors:

  1. Competitive extractor (for competitive_analysis docs)

  2. Cap table extractor (for cap_table docs)

  3. Financial extractor (for financial_statements and financial_projections docs)

_extract_key_facts() Updated

Now extracts key facts from all three data types:

  • Competitive: competitor count, high-threat list, differentiator count

  • Cap Table: shareholder count, founder ownership %, option pool %

  • Financial: latest ARR, burn rate, runway, headcount


Dependencies Added

BASH
uv pip install pandas openpyxl pdfplumber
  • pandas - DataFrame operations for CSV/Excel parsing

  • openpyxl - Excel file support

  • pdfplumber - PDF table extraction


Files Changed Summary

New Files (2)

FileSizePurpose
src/agents/dataroom/extractors/cap_table_extractor.py~500 linesPDF/spreadsheet cap table parsing
src/agents/dataroom/extractors/financial_extractor.py~450 linesCSV/Excel/PDF financial parsing

Modified Files (2)

FileChangesPurpose
src/agents/dataroom/extractors/__init__.py+4 linesExport new extractors
src/agents/dataroom/analyzer.py+300 linesIntegration, formatters, key facts

Phase 2 Progress

Completed Extractors

  • Competitive Extractor - Battlecard synthesis

  • Cap Table Extractor - Ownership structure

  • Financial Extractor - Projections & metrics

Remaining Extractors

  • Team Extractor - Founder bios, backgrounds

  • Traction Extractor - Customer/revenue metrics


Usage

BASH
# Activate virtual environment
source .venv/bin/activate

# Run dataroom analyzer
python -m src.agents.dataroom.analyzer "data/Secure-Inputs/Hydden Dataroom" "Hydden"

# Output:
# 📁 Scanning dataroom...
#    Found 20 documents
# 🏷️  Classifying documents...
#    Classified 20 documents
# 🔍 Extracting competitive data from 9 documents...
#    ✓ Found 8 competitors
# 📊 Extracting cap table data from 1 documents...
#    ✓ Found 4 shareholders
# 💰 Extracting financial data from 1 documents...
#    ✓ Found financial projections
# ✓ Analysis complete in 257.9s

Contributors

Implementation by Claude Code (Anthropic) with user guidance.