# karthik-56/jev-typesafe architecture

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

- Interactive diagram: https://gitdiagram.com/karthik-56/jev-typesafe
- Repository: https://github.com/karthik-56/jev-typesafe

## Overview

This repository is an experiment with JEV-style classification and MCP tool selection, not a finished user-facing product. Its clearest end-to-end workflow accepts a request, checks whether MCP routing applies, chooses a server and tool, then scores that selection. Separate scripts demonstrate department choice, urgency detection, severity scoring, and combined classification. The CLI remains a boilerplate greeting. The README lists no product capabilities; relationships here follow the sampled source and SOURCE INDEX, so unsampled integrations are not inferred.

Main entry points: [`src/JEV/jev_mcp_tool_selection.py`](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py) (MCP routing flow), [`src/JEV/jev_choice.py`](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_choice.py) (Department classification), [`src/JEV/jev_noul.py`](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_noul.py) (Urgency detection), [`src/JEV/jev_score.py`](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_score.py) (Severity scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entrypoint"]
  node_cli["Boilerplate CLI<br/>[cli.py]"]
end

subgraph group_routing["MCP selection"]
  node_mcp_flow["MCP routing flow"]
  node_server_catalog["Server and tool catalog<br/>[utils.py]"]
  node_routability["Routability check"]
  node_server_choice["Server selection"]
  node_tool_choice["Tool selection"]
  node_quality_score["Selection quality"]
end

subgraph group_demos["JEV demonstrations"]
  node_choice_demo["Department classification<br/>[jev_choice.py]"]
  node_noul_demo["Urgency detection<br/>[jev_noul.py]"]
  node_score_demo["Severity scoring<br/>[jev_score.py]"]
  node_combined_demo["Combined classification<br/>[jev_test1.py]"]
end

node_person(("User"))
node_typesafe{{"TypeSafe service"}}

node_person -->|"runs command"| node_cli
node_person -->|"enters request"| node_mcp_flow
node_mcp_flow -->|"loads catalog"| node_server_catalog
node_mcp_flow -->|"checks request"| node_routability
node_routability -->|"requests evaluation"| node_typesafe
node_routability -->|"continues if routable"| node_server_choice
node_server_choice -->|"requests choice"| node_typesafe
node_server_choice -->|"continues if confident"| node_tool_choice
node_tool_choice -->|"requests choice"| node_typesafe
node_tool_choice -->|"proceeds to scoring"| node_quality_score
node_quality_score -->|"requests score"| node_typesafe
node_person -->|"supplies sample issue"| node_choice_demo
node_choice_demo -->|"requests classification"| node_typesafe
node_person -->|"supplies sample issue"| node_noul_demo
node_noul_demo -->|"requests urgency"| node_typesafe
node_person -->|"supplies sample issue"| node_score_demo
node_score_demo -->|"requests score"| node_typesafe
node_person -->|"supplies sample issue"| node_combined_demo
node_combined_demo -->|"requests classification"| node_typesafe

click node_cli "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/cli.py"
click node_mcp_flow "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py"
click node_server_catalog "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/utils.py"
click node_routability "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py"
click node_server_choice "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py"
click node_tool_choice "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py"
click node_quality_score "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py"
click node_choice_demo "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_choice.py"
click node_noul_demo "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_noul.py"
click node_score_demo "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_score.py"
click node_combined_demo "https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_test1.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_person toneBlue
class node_mcp_flow,node_server_catalog,node_routability,node_server_choice,node_tool_choice,node_quality_score toneAmber
class node_choice_demo,node_noul_demo,node_score_demo,node_combined_demo toneMint
class node_typesafe toneIndigo
```

## Components

### CLI entrypoint

- [Boilerplate CLI](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/cli.py): `src/JEV/cli.py`

### MCP selection

- [MCP routing flow](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py): `src/JEV/jev_mcp_tool_selection.py`
- [Server and tool catalog](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/utils.py): `src/JEV/utils.py`
- [Routability check](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py): `src/JEV/jev_mcp_tool_selection.py`
- [Server selection](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py): `src/JEV/jev_mcp_tool_selection.py`
- [Tool selection](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py): `src/JEV/jev_mcp_tool_selection.py`
- [Selection quality](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_mcp_tool_selection.py): `src/JEV/jev_mcp_tool_selection.py`

### JEV demonstrations

- [Department classification](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_choice.py): `src/JEV/jev_choice.py`
- [Urgency detection](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_noul.py): `src/JEV/jev_noul.py`
- [Severity scoring](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_score.py): `src/JEV/jev_score.py`
- [Combined classification](https://github.com/karthik-56/jev-typesafe/blob/main/src/JEV/jev_test1.py): `src/JEV/jev_test1.py`

### Other components

- **User**
- **TypeSafe service**

## Connections

- User → Boilerplate CLI: runs command (evidence: `src/JEV/cli.py`)
- User → MCP routing flow: enters request (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- MCP routing flow → Server and tool catalog: loads catalog (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- MCP routing flow → Routability check: checks request (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- Routability check → TypeSafe service: requests evaluation (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- Routability check → Server selection: continues if routable (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- Server selection → TypeSafe service: requests choice (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- Server selection → Tool selection: continues if confident (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- Tool selection → TypeSafe service: requests choice (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- Tool selection → Selection quality: proceeds to scoring (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- Selection quality → TypeSafe service: requests score (evidence: `src/JEV/jev_mcp_tool_selection.py`)
- User → Department classification: supplies sample issue (evidence: `src/JEV/jev_choice.py`)
- Department classification → TypeSafe service: requests classification (evidence: `src/JEV/jev_choice.py`)
- User → Urgency detection: supplies sample issue (evidence: `src/JEV/jev_noul.py`)
- Urgency detection → TypeSafe service: requests urgency (evidence: `src/JEV/jev_noul.py`)
- User → Severity scoring: supplies sample issue (evidence: `src/JEV/jev_score.py`)
- Severity scoring → TypeSafe service: requests score (evidence: `src/JEV/jev_score.py`)
- User → Combined classification: supplies sample issue (evidence: `src/JEV/jev_test1.py`)
- Combined classification → TypeSafe service: requests classification (evidence: `src/JEV/jev_test1.py`)
