# varundubey2804/outreach architecture

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

- Interactive diagram: https://gitdiagram.com/varundubey2804/outreach
- Repository: https://github.com/varundubey2804/outreach

## Overview

Outreach Agent researches companies and produces evidence-backed cold-email drafts for human review. The main workflow starts with a company list (or optional company discovery), gathers web evidence, verifies recipient and trigger facts, researches competitors and opportunities, selects ideas, drafts and fact-checks an email, then applies code-based format checks and writes review artifacts. The README documents these stages; the sampled agent excerpt confirms source collection, verification, drafting/checking, and output handling. Internal stage boundaries beyond the excerpts are therefore represented at the documented level.

Main entry points: [`discover.py`](https://github.com/varundubey2804/outreach/blob/main/discover.py) (Company discovery), [`agent.py`](https://github.com/varundubey2804/outreach/blob/main/agent.py) (Web evidence), [`profile.md`](https://github.com/varundubey2804/outreach/blob/main/profile.md) (Voice and email rules), [`config.json`](https://github.com/varundubey2804/outreach/blob/main/config.json) (Email configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Inputs and discovery"]
  node_company_list["Company list"]
  node_agent_cli["Agent CLI<br/>[agent.py]"]
  node_company_discovery["Company discovery<br/>[discover.py]"]
end

subgraph group_research["Company research"]
  node_web_evidence["Web evidence<br/>[agent.py]"]
  node_source_store[("Source ledger<br/>[agent.py]")]
  node_fact_verification["Fact verification<br/>[agent.py]"]
  node_competitor_research["Competitor research<br/>[agent.py]"]
  node_opportunity_research["Opportunity research<br/>[agent.py]"]
  node_idea_selection["Idea selection<br/>[agent.py]"]
  node_fact_ledger[("Verified fact ledger<br/>[agent.py]")]
  node_research_services{{"Search and page services"}}
end

subgraph group_composition["Email composition"]
  node_email_drafting["Email drafting<br/>[agent.py]"]
  node_claim_fact_check["Claim fact-check<br/>[agent.py]"]
  node_format_review["Format checks and rewrite<br/>[agent.py]"]
  node_voice_rules["Voice and email rules<br/>[profile.md]"]
  node_email_config["Email configuration<br/>[config.json]"]
  node_model_providers{{"Model providers"}}
end

subgraph group_artifacts["Review artifacts"]
  node_review_output["Email and review files<br/>[agent.py]"]
end

node_operator(("Outreach operator"))
node_company_sites{{"Company websites and news"}}

node_operator -->|"runs"| node_agent_cli
node_company_list -->|"supplies companies"| node_agent_cli
node_agent_cli -->|"dispatches discovery"| node_company_discovery
node_agent_cli -->|"starts research"| node_web_evidence
node_company_discovery -->|"searches sources"| node_research_services
node_company_discovery -->|"requests candidates"| node_model_providers
node_company_discovery -->|"checks websites"| node_company_sites
node_web_evidence -->|"fetches pages"| node_company_sites
node_web_evidence -->|"searches news"| node_research_services
node_web_evidence -->|"records sources"| node_source_store
node_source_store -->|"provides quotes"| node_fact_verification
node_fact_verification -->|"informs research"| node_competitor_research
node_competitor_research -->|"informs ideas"| node_opportunity_research
node_opportunity_research -->|"provides candidates"| node_idea_selection
node_idea_selection -->|"builds evidence"| node_fact_ledger
node_fact_ledger -->|"grounds draft"| node_email_drafting
node_email_drafting -->|"generates email"| node_model_providers
node_fact_ledger -->|"checks claims against"| node_claim_fact_check
node_email_drafting -->|"submits claims"| node_claim_fact_check
node_claim_fact_check -->|"passes draft"| node_format_review
node_format_review -->|"requests rewrites"| node_model_providers
node_voice_rules -->|"guides voice"| node_email_drafting
node_email_config -->|"sets constraints"| node_format_review
node_format_review -->|"writes review files"| node_review_output
node_review_output -->|"provides drafts"| node_operator

click node_agent_cli "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_company_discovery "https://github.com/varundubey2804/outreach/blob/main/discover.py"
click node_web_evidence "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_source_store "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_fact_verification "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_competitor_research "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_opportunity_research "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_idea_selection "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_fact_ledger "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_email_drafting "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_claim_fact_check "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_format_review "https://github.com/varundubey2804/outreach/blob/main/agent.py"
click node_voice_rules "https://github.com/varundubey2804/outreach/blob/main/profile.md"
click node_email_config "https://github.com/varundubey2804/outreach/blob/main/config.json"
click node_review_output "https://github.com/varundubey2804/outreach/blob/main/agent.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_company_list,node_agent_cli,node_company_discovery toneBlue
class node_web_evidence,node_source_store,node_fact_verification,node_competitor_research,node_opportunity_research,node_idea_selection,node_fact_ledger,node_research_services toneAmber
class node_email_drafting,node_claim_fact_check,node_format_review,node_voice_rules,node_email_config,node_model_providers toneMint
class node_review_output toneRose
class node_operator,node_company_sites toneIndigo
```

## Components

### Inputs and discovery

- **Company list**
- [Agent CLI](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Company discovery](https://github.com/varundubey2804/outreach/blob/main/discover.py): `discover.py`

### Company research

- [Web evidence](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Source ledger](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Fact verification](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Competitor research](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Opportunity research](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Idea selection](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Verified fact ledger](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- **Search and page services**

### Email composition

- [Email drafting](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Claim fact-check](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Format checks and rewrite](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`
- [Voice and email rules](https://github.com/varundubey2804/outreach/blob/main/profile.md): `profile.md`
- [Email configuration](https://github.com/varundubey2804/outreach/blob/main/config.json): `config.json`
- **Model providers**

### Review artifacts

- [Email and review files](https://github.com/varundubey2804/outreach/blob/main/agent.py): `agent.py`

### Other components

- **Outreach operator**
- **Company websites and news**

## Connections

- Outreach operator → Agent CLI: runs (evidence: `README.md`)
- Company list → Agent CLI: supplies companies (evidence: `README.md`)
- Agent CLI → Company discovery: dispatches discovery (evidence: `agent.py`)
- Agent CLI → Web evidence: starts research (evidence: `README.md`)
- Company discovery → Search and page services: searches sources (evidence: `discover.py`)
- Company discovery → Model providers: requests candidates (evidence: `discover.py`)
- Company discovery → Company websites and news: checks websites (evidence: `discover.py`)
- Web evidence → Company websites and news: fetches pages (evidence: `README.md`)
- Web evidence → Search and page services: searches news (evidence: `README.md`)
- Web evidence → Source ledger: records sources (evidence: `agent.py`)
- Source ledger → Fact verification: provides quotes (evidence: `README.md`)
- Fact verification → Competitor research: informs research (evidence: `README.md`)
- Competitor research → Opportunity research: informs ideas (evidence: `README.md`)
- Opportunity research → Idea selection: provides candidates (evidence: `README.md`)
- Idea selection → Verified fact ledger: builds evidence (evidence: `agent.py`)
- Verified fact ledger → Email drafting: grounds draft (evidence: `README.md`)
- Email drafting → Model providers: generates email (evidence: `README.md`)
- Verified fact ledger → Claim fact-check: checks claims against (evidence: `README.md`)
- Email drafting → Claim fact-check: submits claims (evidence: `README.md`)
- Claim fact-check → Format checks and rewrite: passes draft (evidence: `README.md`)
- Format checks and rewrite → Model providers: requests rewrites (evidence: `README.md`)
- Voice and email rules → Email drafting: guides voice (evidence: `README.md`)
- Email configuration → Format checks and rewrite: sets constraints (evidence: `README.md`)
- Format checks and rewrite → Email and review files: writes review files (evidence: `agent.py`)
- Email and review files → Outreach operator: provides drafts (evidence: `README.md`)
