# chincai-org/taylor-hackerdorm-domarthon architecture

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

- Interactive diagram: https://gitdiagram.com/chincai-org/taylor-hackerdorm-domarthon
- Repository: https://github.com/chincai-org/taylor-hackerdorm-domarthon

## Overview

Sharpmon is a customer-support harness optimization service. Users create a benchmark-backed tree, inspect a parent harness and its history through the web UI or MCP, submit bounded parent-relative changes, and receive an automatically evaluated child node; regressions remain recorded but cannot be used as parents. The map includes the documented REST, MCP, and web surfaces, plus harness import/runtime and model-chat capabilities. Some route and frontend internals were not sampled, so those links rely on README documentation; optional external integrations are shown separately.

Main entry points: [`app/mcp_server.py`](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/mcp_server.py) (MCP tools), [`app/services/evaluator.py`](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/evaluator.py) (Rollout and council evaluator), [`app/main.py`](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/main.py) (FastAPI application), [`app/services/tree_creation.py`](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/tree_creation.py) (Tree initialization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Product interfaces"]
  node_application["FastAPI application<br/>[main.py]"]
  node_rest_api["REST API<br/>[main.py]"]
  node_tree_routes["Tree endpoints<br/>[trees.py]"]
  node_deepseek_routes["DeepSeek endpoints<br/>[deepseek.py]"]
  node_mcp_tools["MCP tools<br/>[mcp_server.py]"]
  node_web_pages["Gallery and tree pages"]
end

subgraph group_optimization["Harness optimization"]
  node_tree_creation["Tree initialization<br/>[tree_creation.py]"]
  node_harness_import["Harness import and validation<br/>[importer.py]"]
  node_harness_model["Harness formats and runtime<br/>[dsh.py]"]
  node_change_builder["Suggested changes"]
  node_tree_digest["Tree history digest<br/>[tree_digest.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_evaluator["Rollout and council evaluator<br/>[evaluator.py]"]
  node_model_client["LLM client<br/>[deepseek_client.py]"]
  node_tool_runtime["Agent tool runtime<br/>[tool_runtime.py]"]
end

subgraph group_storage["Persistence"]
  node_repository["Tree repository<br/>[repository.py]"]
  node_database_models["Tree and benchmark records<br/>[models.py]"]
  node_database[("SQL database<br/>[engine.py]")]
end

node_optimizer(("Workbuddy optimizer"))
node_web_user(("Web user"))
node_candidate_service{{"Candidate agent service"}}
node_judge_models{{"Judge model council"}}

node_web_user -->|"opens pages"| node_application
node_optimizer -->|"uses MCP"| node_mcp_tools
node_application -->|"mounts API"| node_rest_api
node_application -->|"mounts MCP"| node_mcp_tools
node_application -->|"renders pages"| node_web_pages
node_rest_api -->|"registers routes"| node_tree_routes
node_rest_api -->|"registers routes"| node_deepseek_routes
node_tree_routes -->|"creates trees"| node_tree_creation
node_mcp_tools -->|"creates trees"| node_tree_creation
node_mcp_tools -->|"applies changes"| node_change_builder
node_mcp_tools -->|"builds digest"| node_tree_digest
node_tree_creation -->|"imports harness"| node_harness_import
node_tree_creation -->|"serializes harness"| node_harness_model
node_tree_creation -->|"persists tree"| node_repository
node_mcp_tools -->|"evaluates children"| node_evaluator
node_deepseek_routes -->|"requests chat"| node_model_client
node_deepseek_routes -->|"executes tools"| node_tool_runtime
node_model_client -->|"runs tool calls"| node_tool_runtime
node_evaluator -->|"requests judgments"| node_model_client
node_evaluator -->|"sends rollout"| node_candidate_service
node_evaluator -->|"sends ballots"| node_judge_models
node_evaluator -->|"stores scores"| node_repository
node_repository -->|"queries records"| node_database_models
node_database -->|"creates tables"| node_database_models
node_application -->|"initializes tables"| node_database
node_web_user -->|"creates trees"| node_tree_routes
node_web_pages -->|"loads tree data"| node_tree_routes
node_mcp_tools -->|"reads tree state"| node_repository
node_harness_import -->|"validates format"| node_harness_model
node_evaluator -.->|"calls candidate API"| node_candidate_service

click node_application "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/main.py"
click node_rest_api "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/api/main.py"
click node_tree_routes "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/api/routes/trees.py"
click node_deepseek_routes "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/api/routes/deepseek.py"
click node_mcp_tools "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/mcp_server.py"
click node_web_pages "https://github.com/chincai-org/taylor-hackerdorm-domarthon/tree/main/app/web/templates"
click node_tree_creation "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/tree_creation.py"
click node_harness_import "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/harness/importer.py"
click node_harness_model "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/harness/dsh.py"
click node_change_builder "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/harness/suggested_changes.py"
click node_tree_digest "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/tree_digest.py"
click node_evaluator "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/evaluator.py"
click node_model_client "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/deepseek_client.py"
click node_tool_runtime "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/tool_runtime.py"
click node_repository "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/db/repository.py"
click node_database_models "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/db/models.py"
click node_database "https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/db/engine.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_application,node_rest_api,node_tree_routes,node_deepseek_routes,node_mcp_tools,node_web_pages,node_web_user toneBlue
class node_tree_creation,node_harness_import,node_harness_model,node_change_builder,node_tree_digest toneAmber
class node_evaluator,node_model_client,node_tool_runtime toneMint
class node_repository,node_database_models,node_database toneRose
class node_optimizer,node_candidate_service,node_judge_models toneIndigo
```

## Components

### Product interfaces

- [FastAPI application](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/main.py): `app/main.py`
- [REST API](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/api/main.py): `app/api/main.py`
- [Tree endpoints](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/api/routes/trees.py): `app/api/routes/trees.py`
- [DeepSeek endpoints](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/api/routes/deepseek.py): `app/api/routes/deepseek.py`
- [MCP tools](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/mcp_server.py): `app/mcp_server.py`
- [Gallery and tree pages](https://github.com/chincai-org/taylor-hackerdorm-domarthon/tree/main/app/web/templates): `app/web/templates`

### Harness optimization

- [Tree initialization](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/tree_creation.py): `app/services/tree_creation.py`
- [Harness import and validation](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/harness/importer.py): `app/harness/importer.py`
- [Harness formats and runtime](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/harness/dsh.py): `app/harness/dsh.py`
- [Suggested changes](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/harness/suggested_changes.py): `app/harness/suggested_changes.py`
- [Tree history digest](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/tree_digest.py): `app/services/tree_digest.py`

### Evaluation

- [Rollout and council evaluator](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/evaluator.py): `app/services/evaluator.py`
- [LLM client](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/deepseek_client.py): `app/services/deepseek_client.py`
- [Agent tool runtime](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/services/tool_runtime.py): `app/services/tool_runtime.py`

### Persistence

- [Tree repository](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/db/repository.py): `app/db/repository.py`
- [Tree and benchmark records](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/db/models.py): `app/db/models.py`
- [SQL database](https://github.com/chincai-org/taylor-hackerdorm-domarthon/blob/main/app/db/engine.py): `app/db/engine.py`

### Other components

- **Workbuddy optimizer**
- **Web user**
- **Candidate agent service**
- **Judge model council**

## Connections

- Web user → FastAPI application: opens pages (evidence: `README.md`)
- Workbuddy optimizer → MCP tools: uses MCP (evidence: `README.md`)
- FastAPI application → REST API: mounts API (evidence: `app/main.py`)
- FastAPI application → MCP tools: mounts MCP (evidence: `app/main.py`)
- FastAPI application → Gallery and tree pages: renders pages (evidence: `app/main.py`)
- REST API → Tree endpoints: registers routes (evidence: `app/api/main.py`)
- REST API → DeepSeek endpoints: registers routes (evidence: `app/api/main.py`)
- Tree endpoints → Tree initialization: creates trees (evidence: `app/api/routes/trees.py`)
- MCP tools → Tree initialization: creates trees (evidence: `app/mcp_server.py`)
- MCP tools → Suggested changes: applies changes (evidence: `app/mcp_server.py`)
- MCP tools → Tree history digest: builds digest (evidence: `app/mcp_server.py`)
- Tree initialization → Harness import and validation: imports harness (evidence: `app/services/tree_creation.py`)
- Tree initialization → Harness formats and runtime: serializes harness (evidence: `app/services/tree_creation.py`)
- Tree initialization → Tree repository: persists tree (evidence: `app/services/tree_creation.py`)
- MCP tools → Rollout and council evaluator: evaluates children (evidence: `app/mcp_server.py`)
- DeepSeek endpoints → LLM client: requests chat (evidence: `app/api/routes/deepseek.py`)
- DeepSeek endpoints → Agent tool runtime: executes tools (evidence: `app/api/routes/deepseek.py`)
- LLM client → Agent tool runtime: runs tool calls (evidence: `app/services/deepseek_client.py`)
- Rollout and council evaluator → LLM client: requests judgments (evidence: `app/services/evaluator.py`)
- Rollout and council evaluator → Candidate agent service: sends rollout
- Rollout and council evaluator → Judge model council: sends ballots (evidence: `app/services/evaluator.py`)
- Rollout and council evaluator → Tree repository: stores scores (evidence: `app/services/evaluator.py`)
- Tree repository → Tree and benchmark records: queries records (evidence: `app/db/repository.py`)
- SQL database → Tree and benchmark records: creates tables (evidence: `app/db/engine.py`)
- FastAPI application → SQL database: initializes tables (evidence: `app/main.py`)
- Web user → Tree endpoints: creates trees (evidence: `README.md`)
- Gallery and tree pages → Tree endpoints: loads tree data (evidence: `README.md`)
- MCP tools → Tree repository: reads tree state (evidence: `app/mcp_server.py`)
- Harness import and validation → Harness formats and runtime: validates format (evidence: `app/harness/importer.py`)
- Rollout and council evaluator → Candidate agent service: calls candidate API
