# rishu765/mna_deal_intelligence architecture

> Architecture diagram of the GitHub repository rishu765/mna_deal_intelligence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rishu765/mna_deal_intelligence
- Repository: https://github.com/rishu765/mna_deal_intelligence

## Overview

This repository is an educational six-system M&A decision-support portfolio, not one monolithic application. An analyst’s deal request enters Project 6, which plans and routes work to bounded research, screening, valuation, and diligence systems; it then reconciles specialist outputs, supports analyst review, and produces grounded synthesis. The README documents the portfolio handoffs and major capabilities. Some internal stage links are shown as unverified where the sampled excerpts do not establish runtime calls.

Main entry points: [`06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/adapters/base.py`](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/adapters/base.py) (Specialist adapters), [`03_comparable_companies_valuation/src/ma_comparable_valuation/api/app.py`](https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/api/app.py) (Valuation API), [`06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/reconciliation.py`](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/reconciliation.py) (Result reconciliation), [`01_company_document_intelligence/src/ma_company_intelligence/api/app.py`](https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/api/app.py) (Research API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_docs["Document research"]
  node_p1_api["Research API<br/>[app.py]"]
  node_p1_service["Research service<br/>[service.py]"]
  node_p1_chunks["Document chunks<br/>[chunks.py]"]
  node_p1_research["Structured research<br/>[research.py]"]
end

subgraph group_screening["Target sourcing"]
  node_p2_api["Sourcing API<br/>[app.py]"]
  node_p2_thesis["Acquisition thesis<br/>[thesis.py]"]
  node_p2_discovery["Target discovery<br/>[service.py]"]
  node_p2_profile["Target profiles<br/>[profile.py]"]
  node_p2_screen["Screen and rank<br/>[service.py]"]
  node_p2_workflow["Review workflow<br/>[graph.py]"]
end

subgraph group_comps["Trading comps"]
  node_p3_ingest["Peer data assembly<br/>[ingestion.py]"]
  node_p3_normalize["Metric normalization<br/>[normalization.py]"]
  node_p3_valuation["Trading comps valuation<br/>[valuation.py]"]
  node_p3_api["Valuation API<br/>[app.py]"]
end

subgraph group_precedents["Transaction precedents"]
  node_p4_pipeline["Deal research pipeline<br/>[pipeline.py]"]
  node_p4_extract["Transaction extraction<br/>[pipeline.py]"]
  node_p4_precedent["Precedent valuation<br/>[service.py]"]
  node_p4_api["Precedent API<br/>[app.py]"]
end

subgraph group_diligence["Due diligence"]
  node_p5_ingest["VDR ingestion<br/>[ingestion.py]"]
  node_p5_retrieval["Evidence retrieval<br/>[service.py]"]
  node_p5_financial["Financial diligence<br/>[analytics.py]"]
  node_p5_specialists["Specialist analysis<br/>[coordinator.py]"]
  node_p5_workflow["Review and report<br/>[graph.py]"]
  node_p5_api["Diligence API<br/>[app.py]"]
end

subgraph group_orchestration["Deal orchestration"]
  node_p6_api["Deal API<br/>[app.py]"]
  node_p6_plan["Intent and planning<br/>[planning.py]"]
  node_p6_graph["Workflow orchestration<br/>[graph.py]"]
  node_p6_adapters["Specialist adapters<br/>[base.py]"]
  node_p6_reconcile["Result reconciliation<br/>[reconciliation.py]"]
  node_p6_review["Human review<br/>[nodes.py]"]
  node_p6_synthesis["Deal synthesis<br/>[synthesis.py]"]
end

node_analyst(("Analyst"))

node_analyst -->|"submits request"| node_p6_api
node_p6_api -->|"starts run"| node_p6_graph
node_p6_graph -.->|"plans work"| node_p6_plan
node_p6_graph -->|"invokes specialists"| node_p6_adapters
node_p6_adapters -->|"routes capability"| node_p1_api
node_p6_adapters -->|"routes capability"| node_p2_api
node_p6_adapters -->|"routes capability"| node_p3_api
node_p6_adapters -->|"routes capability"| node_p4_api
node_p6_adapters -->|"routes capability"| node_p5_api
node_p1_api -->|"calls research"| node_p1_service
node_p1_service -.->|"indexes chunks"| node_p1_chunks
node_p1_service -.->|"requests research"| node_p1_research
node_p2_api -->|"parses thesis"| node_p2_thesis
node_p2_api -->|"builds shortlist"| node_p2_screen
node_p2_discovery -.->|"enriches targets"| node_p2_profile
node_p2_workflow -.->|"supports review"| node_p2_screen
node_p3_ingest -->|"assembles metrics"| node_p3_normalize
node_p3_api -->|"runs valuation"| node_p3_valuation
node_p3_ingest -.->|"supplies peer snapshots"| node_p3_valuation
node_p4_pipeline -.->|"indexes deal research"| node_p4_extract
node_p4_api -.->|"runs precedent workflow"| node_p4_precedent
node_p5_ingest -.->|"prepares evidence"| node_p5_retrieval
node_p5_retrieval -.->|"provides evidence"| node_p5_specialists
node_p5_specialists -.->|"supports analysis"| node_p5_financial
node_p5_workflow -.->|"coordinates analysis"| node_p5_specialists
node_p6_adapters -.->|"returns results"| node_p6_reconcile
node_p6_reconcile -->|"raises conflicts"| node_p6_review
node_p6_review -->|"enables synthesis"| node_p6_synthesis
node_p1_api -.->|"shares research context"| node_p3_api
node_p1_api -.->|"shares document evidence"| node_p5_api
node_p2_api -.->|"shares target context"| node_p3_api
node_p3_api -->|"supplies valuation"| node_p6_reconcile
node_p4_api -->|"supplies precedents"| node_p6_reconcile
node_p5_api -->|"supplies diligence"| node_p6_reconcile

click node_p1_api "https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/api/app.py"
click node_p1_service "https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/application/service.py"
click node_p1_chunks "https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/domain/chunks.py"
click node_p1_research "https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/generation/research.py"
click node_p2_api "https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/api/app.py"
click node_p2_thesis "https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/thesis.py"
click node_p2_discovery "https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/discovery/service.py"
click node_p2_profile "https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/profile.py"
click node_p2_screen "https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/screening/service.py"
click node_p2_workflow "https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/workflow/graph.py"
click node_p3_ingest "https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/ingestion.py"
click node_p3_normalize "https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/normalization.py"
click node_p3_valuation "https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/valuation.py"
click node_p3_api "https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/api/app.py"
click node_p4_pipeline "https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/pipeline.py"
click node_p4_extract "https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/extraction/pipeline.py"
click node_p4_precedent "https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/precedent/service.py"
click node_p4_api "https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/api/app.py"
click node_p5_ingest "https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/vdr/ingestion.py"
click node_p5_retrieval "https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/retrieval/service.py"
click node_p5_financial "https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/financial/analytics.py"
click node_p5_specialists "https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/specialists/coordinator.py"
click node_p5_workflow "https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/workflow_final/graph.py"
click node_p5_api "https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/api/app.py"
click node_p6_api "https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/api/app.py"
click node_p6_plan "https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/planning.py"
click node_p6_graph "https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/orchestration/graph.py"
click node_p6_adapters "https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/adapters/base.py"
click node_p6_reconcile "https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/reconciliation.py"
click node_p6_review "https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/orchestration/nodes.py"
click node_p6_synthesis "https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/synthesis.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_p1_api,node_p1_service,node_p1_chunks,node_p1_research toneBlue
class node_p2_api,node_p2_thesis,node_p2_discovery,node_p2_profile,node_p2_screen,node_p2_workflow toneAmber
class node_p3_ingest,node_p3_normalize,node_p3_valuation,node_p3_api toneMint
class node_p4_pipeline,node_p4_extract,node_p4_precedent,node_p4_api toneRose
class node_p5_ingest,node_p5_retrieval,node_p5_financial,node_p5_specialists,node_p5_workflow,node_p5_api,node_analyst toneIndigo
class node_p6_api,node_p6_plan,node_p6_graph,node_p6_adapters,node_p6_reconcile,node_p6_review,node_p6_synthesis toneTeal
```

## Components

### Document research

- [Research API](https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/api/app.py): `01_company_document_intelligence/src/ma_company_intelligence/api/app.py`
- [Research service](https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/application/service.py): `01_company_document_intelligence/src/ma_company_intelligence/application/service.py`
- [Document chunks](https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/domain/chunks.py): `01_company_document_intelligence/src/ma_company_intelligence/domain/chunks.py`
- [Structured research](https://github.com/rishu765/mna_deal_intelligence/blob/main/01_company_document_intelligence/src/ma_company_intelligence/generation/research.py): `01_company_document_intelligence/src/ma_company_intelligence/generation/research.py`

### Target sourcing

- [Sourcing API](https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/api/app.py): `02_target_screening_sourcing/src/ma_target_screening/api/app.py`
- [Acquisition thesis](https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/thesis.py): `02_target_screening_sourcing/src/ma_target_screening/thesis.py`
- [Target discovery](https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/discovery/service.py): `02_target_screening_sourcing/src/ma_target_screening/discovery/service.py`
- [Target profiles](https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/profile.py): `02_target_screening_sourcing/src/ma_target_screening/profile.py`
- [Screen and rank](https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/screening/service.py): `02_target_screening_sourcing/src/ma_target_screening/screening/service.py`
- [Review workflow](https://github.com/rishu765/mna_deal_intelligence/blob/main/02_target_screening_sourcing/src/ma_target_screening/workflow/graph.py): `02_target_screening_sourcing/src/ma_target_screening/workflow/graph.py`

### Trading comps

- [Peer data assembly](https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/ingestion.py): `03_comparable_companies_valuation/src/ma_comparable_valuation/ingestion.py`
- [Metric normalization](https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/normalization.py): `03_comparable_companies_valuation/src/ma_comparable_valuation/normalization.py`
- [Trading comps valuation](https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/valuation.py): `03_comparable_companies_valuation/src/ma_comparable_valuation/valuation.py`
- [Valuation API](https://github.com/rishu765/mna_deal_intelligence/blob/main/03_comparable_companies_valuation/src/ma_comparable_valuation/api/app.py): `03_comparable_companies_valuation/src/ma_comparable_valuation/api/app.py`

### Transaction precedents

- [Deal research pipeline](https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/pipeline.py): `04_precedent_transactions/src/ma_precedent_transactions/pipeline.py`
- [Transaction extraction](https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/extraction/pipeline.py): `04_precedent_transactions/src/ma_precedent_transactions/extraction/pipeline.py`
- [Precedent valuation](https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/precedent/service.py): `04_precedent_transactions/src/ma_precedent_transactions/precedent/service.py`
- [Precedent API](https://github.com/rishu765/mna_deal_intelligence/blob/main/04_precedent_transactions/src/ma_precedent_transactions/api/app.py): `04_precedent_transactions/src/ma_precedent_transactions/api/app.py`

### Due diligence

- [VDR ingestion](https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/vdr/ingestion.py): `05_ai_due_diligence/src/ma_due_diligence/vdr/ingestion.py`
- [Evidence retrieval](https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/retrieval/service.py): `05_ai_due_diligence/src/ma_due_diligence/retrieval/service.py`
- [Financial diligence](https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/financial/analytics.py): `05_ai_due_diligence/src/ma_due_diligence/financial/analytics.py`
- [Specialist analysis](https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/specialists/coordinator.py): `05_ai_due_diligence/src/ma_due_diligence/specialists/coordinator.py`
- [Review and report](https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/workflow_final/graph.py): `05_ai_due_diligence/src/ma_due_diligence/workflow_final/graph.py`
- [Diligence API](https://github.com/rishu765/mna_deal_intelligence/blob/main/05_ai_due_diligence/src/ma_due_diligence/api/app.py): `05_ai_due_diligence/src/ma_due_diligence/api/app.py`

### Deal orchestration

- [Deal API](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/api/app.py): `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/api/app.py`
- [Intent and planning](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/planning.py): `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/planning.py`
- [Workflow orchestration](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/orchestration/graph.py): `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/orchestration/graph.py`
- [Specialist adapters](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/adapters/base.py): `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/adapters/base.py`
- [Result reconciliation](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/reconciliation.py): `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/reconciliation.py`
- [Human review](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/orchestration/nodes.py): `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/orchestration/nodes.py`
- [Deal synthesis](https://github.com/rishu765/mna_deal_intelligence/blob/main/06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/synthesis.py): `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/synthesis.py`

### Other components

- **Analyst**

## Connections

- Analyst → Deal API: submits request (evidence: `README.md`)
- Deal API → Workflow orchestration: starts run (evidence: `06_mna_deal_intelligence_super_agent/src/ma_deal_intelligence/api/app.py`)
- Workflow orchestration → Intent and planning: plans work
- Workflow orchestration → Specialist adapters: invokes specialists
- Specialist adapters → Research API: routes capability (evidence: `README.md`)
- Specialist adapters → Sourcing API: routes capability (evidence: `README.md`)
- Specialist adapters → Valuation API: routes capability (evidence: `README.md`)
- Specialist adapters → Precedent API: routes capability (evidence: `README.md`)
- Specialist adapters → Diligence API: routes capability (evidence: `README.md`)
- Research API → Research service: calls research (evidence: `01_company_document_intelligence/src/ma_company_intelligence/api/app.py`)
- Research service → Document chunks: indexes chunks
- Research service → Structured research: requests research
- Sourcing API → Acquisition thesis: parses thesis (evidence: `02_target_screening_sourcing/src/ma_target_screening/api/app.py`)
- Sourcing API → Screen and rank: builds shortlist (evidence: `02_target_screening_sourcing/src/ma_target_screening/api/app.py`)
- Target discovery → Target profiles: enriches targets
- Review workflow → Screen and rank: supports review
- Peer data assembly → Metric normalization: assembles metrics (evidence: `03_comparable_companies_valuation/src/ma_comparable_valuation/ingestion.py`)
- Valuation API → Trading comps valuation: runs valuation (evidence: `03_comparable_companies_valuation/src/ma_comparable_valuation/api/app.py`)
- Peer data assembly → Trading comps valuation: supplies peer snapshots
- Deal research pipeline → Transaction extraction: indexes deal research
- Precedent API → Precedent valuation: runs precedent workflow
- VDR ingestion → Evidence retrieval: prepares evidence
- Evidence retrieval → Specialist analysis: provides evidence
- Specialist analysis → Financial diligence: supports analysis
- Review and report → Specialist analysis: coordinates analysis
- Specialist adapters → Result reconciliation: returns results
- Result reconciliation → Human review: raises conflicts (evidence: `README.md`)
- Human review → Deal synthesis: enables synthesis (evidence: `README.md`)
- Research API → Valuation API: shares research context (evidence: `README.md`)
- Research API → Diligence API: shares document evidence (evidence: `README.md`)
- Sourcing API → Valuation API: shares target context (evidence: `README.md`)
- Valuation API → Result reconciliation: supplies valuation (evidence: `README.md`)
- Precedent API → Result reconciliation: supplies precedents (evidence: `README.md`)
- Diligence API → Result reconciliation: supplies diligence (evidence: `README.md`)
