# exengineer1/graphify architecture

> Architecture diagram of the GitHub repository exengineer1/graphify, 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/exengineer1/graphify
- Repository: https://github.com/exengineer1/graphify

## Overview

Graphify is an AI-assisted knowledge-graph builder for codebases and mixed research folders. A user invokes its skill or CLI; discovery classifies files, deterministic extraction handles code, and multimodal content is transcribed or sent through assistant-driven semantic extraction. The results are assembled, clustered, analyzed, and exported as an interactive graph, JSON, and report. Separate capabilities include URL ingestion, incremental watching, graph serving, and assistant-platform hooks. The README documents the overall passes; sampled source and the source index support only the specific internal links shown below.

Main entry points: [`graphify/watch.py`](https://github.com/exengineer1/graphify/blob/v4/graphify/watch.py) (Change watcher), [`graphify/__main__.py`](https://github.com/exengineer1/graphify/blob/v4/graphify/__main__.py) (CLI and commands), [`graphify/detect.py`](https://github.com/exengineer1/graphify/blob/v4/graphify/detect.py) (File discovery), [`graphify/build.py`](https://github.com/exengineer1/graphify/blob/v4/graphify/build.py) (Graph assembly)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entrypoints"]
  node_cli["CLI and commands<br/>[__main__.py]"]
  node_skill["Assistant skill<br/>[skill.md]"]
  node_hooks["Assistant hooks<br/>[hooks.py]"]
end

subgraph group_capture["Corpus capture"]
  node_discovery["File discovery<br/>[detect.py]"]
  node_url_ingest["URL ingestion<br/>[ingest.py]"]
  node_transcription["Audio transcription<br/>[transcribe.py]"]
  node_code_extract["AST extraction<br/>[extract.py]"]
  node_semantic_extract["Semantic extraction<br/>[skill.md]"]
  node_cache[("Extraction cache<br/>[cache.py]")]
end

subgraph group_graph["Graph processing"]
  node_graph_build["Graph assembly<br/>[build.py]"]
  node_validation["Graph validation<br/>[validate.py]"]
  node_clustering["Community clustering<br/>[cluster.py]"]
  node_analysis["Graph analysis<br/>[analyze.py]"]
end

subgraph group_outputs["Results and access"]
  node_report["Audit report<br/>[report.py]"]
  node_export["Graph exporters<br/>[export.py]"]
  node_artifacts["Graph outputs"]
  node_watcher["Change watcher<br/>[watch.py]"]
  node_server["Graph server<br/>[serve.py]"]
  node_wiki["Wiki generation<br/>[wiki.py]"]
end

node_user(("Developer"))

node_user -->|"invokes"| node_skill
node_user -->|"runs"| node_cli
node_skill -->|"starts graphing"| node_discovery
node_cli -->|"dispatches"| node_discovery
node_cli -->|"installs hooks"| node_hooks
node_cli -->|"dispatches"| node_url_ingest
node_cli -->|"dispatches"| node_watcher
node_cli -->|"dispatches"| node_server
node_discovery -->|"selects source"| node_code_extract
node_discovery -->|"selects corpus"| node_semantic_extract
node_url_ingest -.->|"saves source"| node_discovery
node_semantic_extract -->|"uses transcripts"| node_transcription
node_code_extract -->|"reuses results"| node_cache
node_code_extract -->|"supplies structure"| node_graph_build
node_semantic_extract -->|"supplies concepts"| node_graph_build
node_graph_build -->|"validates graph"| node_validation
node_graph_build -->|"clusters graph"| node_clustering
node_clustering -->|"provides communities"| node_analysis
node_analysis -->|"summarizes graph"| node_report
node_analysis -->|"provides analysis"| node_export
node_export -->|"writes outputs"| node_artifacts
node_watcher -->|"checks changes"| node_discovery
node_watcher -->|"re-extracts code"| node_code_extract
node_watcher -->|"rebuilds graph"| node_graph_build
node_watcher -->|"reclusters graph"| node_clustering
node_watcher -->|"reanalyzes graph"| node_analysis
node_watcher -->|"refreshes report"| node_report
node_watcher -->|"rewrites outputs"| node_export
node_server -->|"queries graph"| node_analysis
node_cli -.->|"dispatches"| node_wiki

click node_cli "https://github.com/exengineer1/graphify/blob/v4/graphify/__main__.py"
click node_skill "https://github.com/exengineer1/graphify/blob/v4/graphify/skill.md"
click node_hooks "https://github.com/exengineer1/graphify/blob/v4/graphify/hooks.py"
click node_discovery "https://github.com/exengineer1/graphify/blob/v4/graphify/detect.py"
click node_url_ingest "https://github.com/exengineer1/graphify/blob/v4/graphify/ingest.py"
click node_transcription "https://github.com/exengineer1/graphify/blob/v4/graphify/transcribe.py"
click node_code_extract "https://github.com/exengineer1/graphify/blob/v4/graphify/extract.py"
click node_semantic_extract "https://github.com/exengineer1/graphify/blob/v4/graphify/skill.md"
click node_cache "https://github.com/exengineer1/graphify/blob/v4/graphify/cache.py"
click node_graph_build "https://github.com/exengineer1/graphify/blob/v4/graphify/build.py"
click node_validation "https://github.com/exengineer1/graphify/blob/v4/graphify/validate.py"
click node_clustering "https://github.com/exengineer1/graphify/blob/v4/graphify/cluster.py"
click node_analysis "https://github.com/exengineer1/graphify/blob/v4/graphify/analyze.py"
click node_report "https://github.com/exengineer1/graphify/blob/v4/graphify/report.py"
click node_export "https://github.com/exengineer1/graphify/blob/v4/graphify/export.py"
click node_watcher "https://github.com/exengineer1/graphify/blob/v4/graphify/watch.py"
click node_server "https://github.com/exengineer1/graphify/blob/v4/graphify/serve.py"
click node_wiki "https://github.com/exengineer1/graphify/blob/v4/graphify/wiki.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_cli,node_skill,node_hooks toneBlue
class node_discovery,node_url_ingest,node_transcription,node_code_extract,node_semantic_extract,node_cache toneAmber
class node_graph_build,node_validation,node_clustering,node_analysis toneMint
class node_report,node_export,node_artifacts,node_watcher,node_server,node_wiki toneRose
class node_user toneIndigo
```

## Components

### User entrypoints

- [CLI and commands](https://github.com/exengineer1/graphify/blob/v4/graphify/__main__.py): `graphify/__main__.py`
- [Assistant skill](https://github.com/exengineer1/graphify/blob/v4/graphify/skill.md): `graphify/skill.md`
- [Assistant hooks](https://github.com/exengineer1/graphify/blob/v4/graphify/hooks.py): `graphify/hooks.py`

### Corpus capture

- [File discovery](https://github.com/exengineer1/graphify/blob/v4/graphify/detect.py): `graphify/detect.py`
- [URL ingestion](https://github.com/exengineer1/graphify/blob/v4/graphify/ingest.py): `graphify/ingest.py`
- [Audio transcription](https://github.com/exengineer1/graphify/blob/v4/graphify/transcribe.py): `graphify/transcribe.py`
- [AST extraction](https://github.com/exengineer1/graphify/blob/v4/graphify/extract.py): `graphify/extract.py`
- [Semantic extraction](https://github.com/exengineer1/graphify/blob/v4/graphify/skill.md): `graphify/skill.md`
- [Extraction cache](https://github.com/exengineer1/graphify/blob/v4/graphify/cache.py): `graphify/cache.py`

### Graph processing

- [Graph assembly](https://github.com/exengineer1/graphify/blob/v4/graphify/build.py): `graphify/build.py`
- [Graph validation](https://github.com/exengineer1/graphify/blob/v4/graphify/validate.py): `graphify/validate.py`
- [Community clustering](https://github.com/exengineer1/graphify/blob/v4/graphify/cluster.py): `graphify/cluster.py`
- [Graph analysis](https://github.com/exengineer1/graphify/blob/v4/graphify/analyze.py): `graphify/analyze.py`

### Results and access

- [Audit report](https://github.com/exengineer1/graphify/blob/v4/graphify/report.py): `graphify/report.py`
- [Graph exporters](https://github.com/exengineer1/graphify/blob/v4/graphify/export.py): `graphify/export.py`
- **Graph outputs**
- [Change watcher](https://github.com/exengineer1/graphify/blob/v4/graphify/watch.py): `graphify/watch.py`
- [Graph server](https://github.com/exengineer1/graphify/blob/v4/graphify/serve.py): `graphify/serve.py`
- [Wiki generation](https://github.com/exengineer1/graphify/blob/v4/graphify/wiki.py): `graphify/wiki.py`

### Other components

- **Developer**

## Connections

- Developer → Assistant skill: invokes (evidence: `README.md`)
- Developer → CLI and commands: runs (evidence: `README.md`)
- Assistant skill → File discovery: starts graphing (evidence: `README.md`)
- CLI and commands → File discovery: dispatches (evidence: `graphify/__main__.py`)
- CLI and commands → Assistant hooks: installs hooks (evidence: `graphify/__main__.py`)
- CLI and commands → URL ingestion: dispatches (evidence: `graphify/ingest.py`)
- CLI and commands → Change watcher: dispatches (evidence: `graphify/__main__.py`)
- CLI and commands → Graph server: dispatches (evidence: `graphify/__main__.py`)
- File discovery → AST extraction: selects source (evidence: `README.md`)
- File discovery → Semantic extraction: selects corpus (evidence: `README.md`)
- URL ingestion → File discovery: saves source
- Semantic extraction → Audio transcription: uses transcripts (evidence: `README.md`)
- AST extraction → Extraction cache: reuses results (evidence: `graphify/extract.py`)
- AST extraction → Graph assembly: supplies structure (evidence: `README.md`)
- Semantic extraction → Graph assembly: supplies concepts (evidence: `README.md`)
- Graph assembly → Graph validation: validates graph (evidence: `graphify/build.py`)
- Graph assembly → Community clustering: clusters graph (evidence: `README.md`)
- Community clustering → Graph analysis: provides communities (evidence: `graphify/analyze.py`)
- Graph analysis → Audit report: summarizes graph (evidence: `graphify/report.py`)
- Graph analysis → Graph exporters: provides analysis (evidence: `graphify/export.py`)
- Graph exporters → Graph outputs: writes outputs (evidence: `README.md`)
- Change watcher → File discovery: checks changes (evidence: `graphify/watch.py`)
- Change watcher → AST extraction: re-extracts code (evidence: `graphify/watch.py`)
- Change watcher → Graph assembly: rebuilds graph (evidence: `graphify/watch.py`)
- Change watcher → Community clustering: reclusters graph (evidence: `graphify/watch.py`)
- Change watcher → Graph analysis: reanalyzes graph (evidence: `graphify/watch.py`)
- Change watcher → Audit report: refreshes report (evidence: `graphify/watch.py`)
- Change watcher → Graph exporters: rewrites outputs (evidence: `graphify/watch.py`)
- Graph server → Graph analysis: queries graph (evidence: `graphify/serve.py`)
- CLI and commands → Wiki generation: dispatches
