# almogod/novuspipeline architecture

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

- Interactive diagram: https://gitdiagram.com/almogod/novuspipeline
- Repository: https://github.com/almogod/novuspipeline

## Overview

NovusPipeline is a local MCP service for modernizing a user-selected legacy codebase. Its main workflow indexes code relationships and test coverage, inspects a hotspot, detects smells, proposes behavior-preserving changes, verifies them with the target project’s tests, and prepares a scoped git PR. Separate capabilities include guideline retrieval and GNN-based smell analysis. The README documents the tool workflow; sampled excerpts clarify the modernizer, AST graph, RAG seeding, and local-LLM worker. Server wiring and several implementation details were not sampled, so documented but unsampled links cite the README.

Main entry points: [`server.py`](https://github.com/almogod/novuspipeline/blob/main/server.py) (MCP tools), [`local_llm.py`](https://github.com/almogod/novuspipeline/blob/main/local_llm.py) (LLM proposals), [`gnn_model.py`](https://github.com/almogod/novuspipeline/blob/main/gnn_model.py) (GNN classifier), [`train_gnn.py`](https://github.com/almogod/novuspipeline/blob/main/train_gnn.py) (GNN training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["MCP workflow"]
  node_server["MCP tools<br/>[server.py]"]
end

subgraph group_analysis["Code analysis"]
  node_context["Codebase index"]
  node_rule_engine["Smell detector<br/>[modernizer.py]"]
  node_ast_graph["AST graph builder<br/>[code_graph.py]"]
  node_gnn["GNN classifier<br/>[gnn_model.py]"]
  node_gnn_training["GNN training<br/>[train_gnn.py]"]
  node_gnn_evaluation["GNN evaluation<br/>[eval_gnn.py]"]
end

subgraph group_modernization["Modernization"]
  node_modernizer["Rule rewrites<br/>[modernizer.py]"]
  node_proposal["LLM proposals<br/>[local_llm.py]"]
  node_worker["Local model worker<br/>[llm_worker.py]"]
end

subgraph group_guidelines["Guideline retrieval"]
  node_rag[("Guideline retrieval<br/>[ingest_rag.py]")]
end

subgraph group_delivery["Verification and delivery"]
  node_tests["Workspace tests"]
  node_report["Modernization report<br/>[reporter.py]"]
  node_git["Git PR"]
end

node_user(("Engineer"))

node_user -->|"invokes tools"| node_server
node_server -->|"indexes context"| node_context
node_server -->|"analyzes code"| node_rule_engine
node_server -->|"runs GNN analysis"| node_gnn
node_server -->|"applies rewrites"| node_modernizer
node_server -->|"requests proposal"| node_proposal
node_server -->|"queries guidelines"| node_rag
node_server -->|"runs workspace tests"| node_tests
node_server -->|"formats report"| node_report
node_server -->|"creates PR"| node_git
node_context -->|"returns file context"| node_server
node_gnn_training -->|"builds training graphs"| node_ast_graph
node_gnn_training -->|"trains model"| node_gnn
node_gnn_evaluation -->|"builds evaluation graphs"| node_ast_graph
node_gnn_evaluation -->|"evaluates model"| node_gnn
node_proposal -->|"sends requests"| node_worker
node_worker -->|"returns generations"| node_proposal
node_modernizer -->|"detects smells"| node_rule_engine
node_rag -->|"serves guideline tools"| node_server

click node_server "https://github.com/almogod/novuspipeline/blob/main/server.py"
click node_context "https://github.com/almogod/novuspipeline/blob/main/codebase_context.py"
click node_rule_engine "https://github.com/almogod/novuspipeline/blob/main/modernizer.py"
click node_ast_graph "https://github.com/almogod/novuspipeline/blob/main/code_graph.py"
click node_gnn "https://github.com/almogod/novuspipeline/blob/main/gnn_model.py"
click node_gnn_training "https://github.com/almogod/novuspipeline/blob/main/train_gnn.py"
click node_gnn_evaluation "https://github.com/almogod/novuspipeline/blob/main/eval_gnn.py"
click node_modernizer "https://github.com/almogod/novuspipeline/blob/main/modernizer.py"
click node_proposal "https://github.com/almogod/novuspipeline/blob/main/local_llm.py"
click node_worker "https://github.com/almogod/novuspipeline/blob/main/llm_worker.py"
click node_rag "https://github.com/almogod/novuspipeline/blob/main/ingest_rag.py"
click node_report "https://github.com/almogod/novuspipeline/blob/main/reporter.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_server toneBlue
class node_context,node_rule_engine,node_ast_graph,node_gnn,node_gnn_training,node_gnn_evaluation toneAmber
class node_modernizer,node_proposal,node_worker toneMint
class node_rag toneRose
class node_tests,node_report,node_git,node_user toneIndigo
```

## Components

### MCP workflow

- [MCP tools](https://github.com/almogod/novuspipeline/blob/main/server.py): `server.py`

### Code analysis

- [Codebase index](https://github.com/almogod/novuspipeline/blob/main/codebase_context.py): `codebase_context.py`
- [Smell detector](https://github.com/almogod/novuspipeline/blob/main/modernizer.py): `modernizer.py`
- [AST graph builder](https://github.com/almogod/novuspipeline/blob/main/code_graph.py): `code_graph.py`
- [GNN classifier](https://github.com/almogod/novuspipeline/blob/main/gnn_model.py): `gnn_model.py`
- [GNN training](https://github.com/almogod/novuspipeline/blob/main/train_gnn.py): `train_gnn.py`
- [GNN evaluation](https://github.com/almogod/novuspipeline/blob/main/eval_gnn.py): `eval_gnn.py`

### Modernization

- [Rule rewrites](https://github.com/almogod/novuspipeline/blob/main/modernizer.py): `modernizer.py`
- [LLM proposals](https://github.com/almogod/novuspipeline/blob/main/local_llm.py): `local_llm.py`
- [Local model worker](https://github.com/almogod/novuspipeline/blob/main/llm_worker.py): `llm_worker.py`

### Guideline retrieval

- [Guideline retrieval](https://github.com/almogod/novuspipeline/blob/main/ingest_rag.py): `ingest_rag.py`

### Verification and delivery

- **Workspace tests**
- [Modernization report](https://github.com/almogod/novuspipeline/blob/main/reporter.py): `reporter.py`
- **Git PR**

### Other components

- **Engineer**

## Connections

- Engineer → MCP tools: invokes tools (evidence: `README.md`)
- MCP tools → Codebase index: indexes context (evidence: `README.md`)
- MCP tools → Smell detector: analyzes code (evidence: `README.md`)
- MCP tools → GNN classifier: runs GNN analysis (evidence: `README.md`)
- MCP tools → Rule rewrites: applies rewrites (evidence: `README.md`)
- MCP tools → LLM proposals: requests proposal (evidence: `README.md`)
- MCP tools → Guideline retrieval: queries guidelines (evidence: `README.md`)
- MCP tools → Workspace tests: runs workspace tests (evidence: `README.md`)
- MCP tools → Modernization report: formats report (evidence: `README.md`)
- MCP tools → Git PR: creates PR (evidence: `README.md`)
- Codebase index → MCP tools: returns file context (evidence: `README.md`)
- GNN training → AST graph builder: builds training graphs (evidence: `train_gnn.py`)
- GNN training → GNN classifier: trains model (evidence: `train_gnn.py`)
- GNN evaluation → AST graph builder: builds evaluation graphs (evidence: `eval_gnn.py`)
- GNN evaluation → GNN classifier: evaluates model (evidence: `eval_gnn.py`)
- LLM proposals → Local model worker: sends requests (evidence: `local_llm.py`)
- Local model worker → LLM proposals: returns generations (evidence: `llm_worker.py`)
- Rule rewrites → Smell detector: detects smells (evidence: `modernizer.py`)
- Guideline retrieval → MCP tools: serves guideline tools (evidence: `README.md`)
