# sidvsingh1407/workflow-daignosis architecture

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

- Interactive diagram: https://gitdiagram.com/sidvsingh1407/workflow-daignosis
- Repository: https://github.com/sidvsingh1407/workflow-daignosis

## Overview

The repository contains two substantial, distinct systems: the README-described Google Apps Script lead-intelligence product, and the Python `awde_kg` enterprise-workflow knowledge-graph builder. The lead workflow discovers public signals, extracts and scores leads, deduplicates them, and stores results in Sheets; the Python CLI selects catalog datasets, builds graph records from samples, then validates the output. The Remotion files describe a separate small video composition. Relationships for the Apps Script system follow README descriptions; Python call links use sampled code or the source index, so unsampled implementation details are not inferred.

Main entry points: [`Main.gs`](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/Main.gs) (Pipeline runner), [`awde_kg/graph.py`](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/graph.py) (Graph construction), [`awde_kg/cli.py`](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/cli.py) (Graph CLI), [`awde_kg/validate.py`](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/validate.py) (Graph validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lead["Lead intelligence"]
  node_pipeline["Pipeline runner<br/>[Main.gs]"]
  node_query["Search query generator"]
  node_dispatch["Source dispatcher"]
  node_enrichment["Company enrichment"]
  node_extract["Lead extraction<br/>[LeadExtractor.gs]"]
  node_scoring["Lead scoring<br/>[LeadScoring.gs]"]
  node_duplicates["Duplicate detection<br/>[DuplicateEngine.gs]"]
  node_sheets["Sheets storage<br/>[GoogleSheets.gs]"]
  node_workbook[("Lead workbook")]
  node_dashboard["Dashboard and statistics<br/>[Dashboard.gs]"]
end

subgraph group_sources["Signal sources"]
  node_adapters["Public source adapters<br/>[RSSFetcher.gs]"]
  node_news["News filtering<br/>[NewsFetcher.gs]"]
end

subgraph group_kg["Knowledge graph"]
  node_cli["Graph CLI<br/>[cli.py]"]
  node_catalog["Catalog loading<br/>[catalog.py]"]
  node_ranking["Dataset selection<br/>[scoring.py]"]
  node_builder["Graph construction<br/>[graph.py]"]
  node_classifier["Process classification<br/>[classifier.py]"]
  node_diagnostic["Friction diagnosis<br/>[diagnostic.py]"]
  node_mapper["Capability mapping"]
  node_architect["Blueprint generation<br/>[architect.py]"]
  node_taxonomy["Process taxonomy<br/>[taxonomy.py]"]
  node_blueprintcheck["Blueprint normalization"]
  node_validator["Graph validation<br/>[validate.py]"]
  node_config["Build configuration<br/>[config.py]"]
  node_graphdata[("Graph JSONL files")]
end

subgraph group_video["Video composition"]
  node_composition["Video composition<br/>[Composition.tsx]"]
  node_root["Composition registration<br/>[Root.tsx]"]
end

node_operator(("Operator"))
node_gemini["Gemini API"]
node_hf["Hugging Face catalog"]

node_operator -->|"runs"| node_pipeline
node_pipeline -->|"generates queries"| node_query
node_pipeline -->|"runs adapters"| node_dispatch
node_dispatch -->|"dispatches sources"| node_adapters
node_adapters -->|"filters news"| node_news
node_pipeline -->|"enriches companies"| node_enrichment
node_pipeline -->|"extracts leads"| node_extract
node_pipeline -->|"scores leads"| node_scoring
node_pipeline -->|"checks duplicates"| node_duplicates
node_pipeline -->|"writes results"| node_sheets
node_sheets -->|"stores records"| node_workbook
node_dashboard -->|"reads metrics"| node_workbook
node_query -->|"requests queries"| node_gemini
node_enrichment -->|"requests enrichment"| node_gemini
node_extract -->|"structures evidence"| node_gemini
node_cli -->|"loads catalog"| node_catalog
node_catalog -.->|"reads catalog"| node_hf
node_cli -->|"selects records"| node_ranking
node_cli -->|"builds graph"| node_builder
node_cli -->|"validates graph"| node_validator
node_builder -->|"classifies samples"| node_classifier
node_builder -->|"diagnoses friction"| node_diagnostic
node_builder -->|"maps capabilities"| node_mapper
node_builder -->|"generates blueprints"| node_architect
node_classifier -->|"uses taxonomy"| node_taxonomy
node_architect -->|"uses tiers"| node_config
node_validator -->|"validates blueprints"| node_blueprintcheck
node_validator -->|"reads graph files"| node_graphdata
node_builder -.->|"writes graph data"| node_graphdata
node_root -->|"registers component"| node_composition

click node_pipeline "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/Main.gs"
click node_query "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/SearchQueryGenerator.gs"
click node_dispatch "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/PlatformDispatcher.gs"
click node_adapters "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/RSSFetcher.gs"
click node_news "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/NewsFetcher.gs"
click node_enrichment "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/CompanyEnrichment.gs"
click node_extract "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/LeadExtractor.gs"
click node_scoring "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/LeadScoring.gs"
click node_duplicates "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/DuplicateEngine.gs"
click node_sheets "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/GoogleSheets.gs"
click node_dashboard "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/Dashboard.gs"
click node_cli "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/cli.py"
click node_catalog "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/catalog.py"
click node_ranking "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/scoring.py"
click node_builder "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/graph.py"
click node_classifier "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/classifier.py"
click node_diagnostic "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/diagnostic.py"
click node_mapper "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/capability_mapper.py"
click node_architect "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/architect.py"
click node_taxonomy "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/taxonomy.py"
click node_blueprintcheck "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/blueprint_validator.py"
click node_validator "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/validate.py"
click node_config "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/config.py"
click node_graphdata "https://github.com/sidvsingh1407/workflow-daignosis/tree/main/data/graph"
click node_composition "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/my-video/src/Composition.tsx"
click node_root "https://github.com/sidvsingh1407/workflow-daignosis/blob/main/my-video/src/Root.tsx"

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_pipeline,node_query,node_dispatch,node_enrichment,node_extract,node_scoring,node_duplicates,node_sheets,node_workbook,node_dashboard toneBlue
class node_adapters,node_news toneAmber
class node_cli,node_catalog,node_ranking,node_builder,node_classifier,node_diagnostic,node_mapper,node_architect,node_taxonomy,node_blueprintcheck,node_validator,node_config,node_graphdata,node_gemini toneMint
class node_composition,node_root toneRose
class node_operator,node_hf toneIndigo
```

## Components

### Lead intelligence

- [Pipeline runner](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/Main.gs): `Main.gs`
- [Search query generator](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/SearchQueryGenerator.gs): `SearchQueryGenerator.gs`
- [Source dispatcher](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/PlatformDispatcher.gs): `PlatformDispatcher.gs`
- [Company enrichment](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/CompanyEnrichment.gs): `CompanyEnrichment.gs`
- [Lead extraction](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/LeadExtractor.gs): `LeadExtractor.gs`
- [Lead scoring](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/LeadScoring.gs): `LeadScoring.gs`
- [Duplicate detection](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/DuplicateEngine.gs): `DuplicateEngine.gs`
- [Sheets storage](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/GoogleSheets.gs): `GoogleSheets.gs`
- **Lead workbook**
- [Dashboard and statistics](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/Dashboard.gs): `Dashboard.gs`

### Signal sources

- [Public source adapters](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/RSSFetcher.gs): `RSSFetcher.gs`
- [News filtering](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/NewsFetcher.gs): `NewsFetcher.gs`

### Knowledge graph

- [Graph CLI](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/cli.py): `awde_kg/cli.py`
- [Catalog loading](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/catalog.py): `awde_kg/catalog.py`
- [Dataset selection](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/scoring.py): `awde_kg/scoring.py`
- [Graph construction](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/graph.py): `awde_kg/graph.py`
- [Process classification](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/classifier.py): `awde_kg/classifier.py`
- [Friction diagnosis](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/diagnostic.py): `awde_kg/diagnostic.py`
- [Capability mapping](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/capability_mapper.py): `awde_kg/capability_mapper.py`
- [Blueprint generation](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/architect.py): `awde_kg/architect.py`
- [Process taxonomy](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/taxonomy.py): `awde_kg/taxonomy.py`
- [Blueprint normalization](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/blueprint_validator.py): `awde_kg/blueprint_validator.py`
- [Graph validation](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/validate.py): `awde_kg/validate.py`
- [Build configuration](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/awde_kg/config.py): `awde_kg/config.py`
- [Graph JSONL files](https://github.com/sidvsingh1407/workflow-daignosis/tree/main/data/graph): `data/graph`

### Video composition

- [Video composition](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/my-video/src/Composition.tsx): `my-video/src/Composition.tsx`
- [Composition registration](https://github.com/sidvsingh1407/workflow-daignosis/blob/main/my-video/src/Root.tsx): `my-video/src/Root.tsx`

### Other components

- **Operator**
- **Gemini API**
- **Hugging Face catalog**

## Connections

- Operator → Pipeline runner: runs (evidence: `README.md`)
- Pipeline runner → Search query generator: generates queries (evidence: `README.md`)
- Pipeline runner → Source dispatcher: runs adapters (evidence: `README.md`)
- Source dispatcher → Public source adapters: dispatches sources (evidence: `README.md`)
- Public source adapters → News filtering: filters news (evidence: `README.md`)
- Pipeline runner → Company enrichment: enriches companies (evidence: `README.md`)
- Pipeline runner → Lead extraction: extracts leads (evidence: `README.md`)
- Pipeline runner → Lead scoring: scores leads (evidence: `README.md`)
- Pipeline runner → Duplicate detection: checks duplicates (evidence: `README.md`)
- Pipeline runner → Sheets storage: writes results (evidence: `README.md`)
- Sheets storage → Lead workbook: stores records (evidence: `README.md`)
- Dashboard and statistics → Lead workbook: reads metrics (evidence: `README.md`)
- Search query generator → Gemini API: requests queries (evidence: `README.md`)
- Company enrichment → Gemini API: requests enrichment (evidence: `README.md`)
- Lead extraction → Gemini API: structures evidence (evidence: `README.md`)
- Graph CLI → Catalog loading: loads catalog (evidence: `awde_kg/cli.py`)
- Catalog loading → Hugging Face catalog: reads catalog
- Graph CLI → Dataset selection: selects records (evidence: `awde_kg/cli.py`)
- Graph CLI → Graph construction: builds graph (evidence: `awde_kg/cli.py`)
- Graph CLI → Graph validation: validates graph (evidence: `awde_kg/cli.py`)
- Graph construction → Process classification: classifies samples (evidence: `awde_kg/graph.py`)
- Graph construction → Friction diagnosis: diagnoses friction (evidence: `awde_kg/graph.py`)
- Graph construction → Capability mapping: maps capabilities (evidence: `awde_kg/graph.py`)
- Graph construction → Blueprint generation: generates blueprints (evidence: `awde_kg/graph.py`)
- Process classification → Process taxonomy: uses taxonomy (evidence: `awde_kg/classifier.py`)
- Blueprint generation → Build configuration: uses tiers (evidence: `awde_kg/architect.py`)
- Graph validation → Blueprint normalization: validates blueprints (evidence: `awde_kg/validate.py`)
- Graph validation → Graph JSONL files: reads graph files (evidence: `awde_kg/validate.py`)
- Graph construction → Graph JSONL files: writes graph data
- Composition registration → Video composition: registers component (evidence: `my-video/src/Root.tsx`)
