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):
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:
Rule-based parsing - Regex patterns for common cap table formats
Table extraction - pdfplumber for structured table data
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)
| Field | Value |
| As-of Date | Aug 1, 2025 |
| Total Outstanding | 16,429,886 |
| Fully Diluted | 16,705,143 |
| Shareholders | 4 |
| Founder Ownership | 54.8% |
| Investor Ownership | 24.9% |
| Option Pool | 20.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):
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)
| Metric | Value |
| Projection Period | Jun 2025 - Dec 2029 |
| Starting ARR | $60K (Jun 2025) |
| Ending ARR | $62.6M (Dec 2029) |
| Growth | ~1000x over 5 years |
| Granularity | Monthly |
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 projectionsEach 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:
Competitive extractor (for
competitive_analysisdocs)Cap table extractor (for
cap_tabledocs)Financial extractor (for
financial_statementsandfinancial_projectionsdocs)
_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
uv pip install pandas openpyxl pdfplumberpandas - DataFrame operations for CSV/Excel parsing
openpyxl - Excel file support
pdfplumber - PDF table extraction
Files Changed Summary
New Files (2)
| File | Size | Purpose |
src/agents/dataroom/extractors/cap_table_extractor.py | ~500 lines | PDF/spreadsheet cap table parsing |
src/agents/dataroom/extractors/financial_extractor.py | ~450 lines | CSV/Excel/PDF financial parsing |
Modified Files (2)
| File | Changes | Purpose |
src/agents/dataroom/extractors/__init__.py | +4 lines | Export new extractors |
src/agents/dataroom/analyzer.py | +300 lines | Integration, 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
# 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.9sContributors
Implementation by Claude Code (Anthropic) with user guidance.