# sdyckjq-lab/llm-wiki-skill architecture

> Architecture diagram of the GitHub repository sdyckjq-lab/llm-wiki-skill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sdyckjq-lab/llm-wiki-skill
- Repository: https://github.com/sdyckjq-lab/llm-wiki-skill

## Overview

llm-wiki turns source material and conversations into a linked local knowledge base, then supports retrieval, reading, analysis, and graph exploration. The workbench path runs from a user action in the React app through registered API calls and server routes to knowledge-base, conversation, or agent services; results return as pages, artifacts, or graph views. The shared graph engine serves both workbench and offline graph outputs. README capabilities guide the broader subsystem map; sampled excerpts confirm selected UI, API, retrieval, graph-rendering, and rename behavior, but do not establish every service-level call.

Main entry points: [`workbench/server/src/app.ts`](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/app.ts) (HTTP app), [`workbench/web/src/App.tsx`](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/App.tsx) (Workbench app), [`workbench/server/src/agent.ts`](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/agent.ts) (Agent runtime), [`packages/graph-engine/src/index.ts`](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/graph-engine/src/index.ts) (Graph engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Workbench interface"]
  node_app["Workbench app<br/>[App.tsx]"]
  node_search["Page search<br/>[SearchPanel.tsx]"]
  node_graphui["Graph reader<br/>[GraphReader.tsx]"]
  node_apiclient["API client<br/>[client.ts]"]
end

subgraph group_server["Workbench services"]
  node_serverapp["HTTP app<br/>[app.ts]"]
  node_prompt["Prompt routes<br/>[prompt.ts]"]
  node_graphroutes["Graph routes<br/>[graph.ts]"]
  node_renameroutes["Rename routes<br/>[graph-renames.ts]"]
  node_kbservice["Knowledge bases<br/>[knowledge-bases.ts]"]
  node_agent["Agent runtime<br/>[agent.ts]"]
  node_contracts["Shared contracts<br/>[index.ts]"]
end

subgraph group_knowledge["Knowledge workflows"]
  node_retrieval["Knowledge retrieval<br/>[retrieval.ts]"]
  node_pages["Page access<br/>[pages.ts]"]
  node_wiki[("Knowledge files")]
  node_batch["Batch digestion<br/>[batch.ts]"]
  node_artifacts["Artifacts<br/>[artifacts.ts]"]
end

subgraph group_graph["Graph platform"]
  node_graphengine["Graph engine<br/>[index.ts]"]
  node_pipeline["Render pipeline<br/>[render-pipeline.ts]"]
  node_controller["Graph interactions<br/>[controller.ts]"]
  node_rename["Rename preview"]
end

node_user(("User"))
node_modelprovider(("Model provider"))

node_user -->|"uses"| node_app
node_app -->|"requests"| node_apiclient
node_search -->|"selects page"| node_app
node_graphui -->|"renders graph"| node_graphengine
node_apiclient -->|"HTTP requests"| node_serverapp
node_serverapp -->|"dispatches"| node_prompt
node_serverapp -->|"dispatches"| node_graphroutes
node_serverapp -->|"dispatches"| node_renameroutes
node_serverapp -->|"uses schemas"| node_contracts
node_prompt -->|"invokes"| node_agent
node_graphroutes -->|"uses graph model"| node_graphengine
node_renameroutes -->|"previews rename"| node_rename
node_agent -->|"retrieves context"| node_retrieval
node_retrieval -->|"loads pages"| node_pages
node_pages -->|"reads"| node_wiki
node_agent -->|"sends prompts"| node_modelprovider
node_agent -->|"saves outputs"| node_artifacts
node_batch -->|"digests sources"| node_wiki
node_graphengine -->|"prepares rendering"| node_pipeline
node_controller -->|"updates interaction state"| node_pipeline
node_app -->|"starts digestion"| node_batch
node_app -->|"manages libraries"| node_kbservice

click node_app "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/App.tsx"
click node_search "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/components/SearchPanel.tsx"
click node_graphui "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/components/GraphReader.tsx"
click node_apiclient "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/lib/api/client.ts"
click node_serverapp "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/app.ts"
click node_prompt "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/routes/prompt.ts"
click node_graphroutes "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/routes/graph.ts"
click node_renameroutes "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/routes/graph-renames.ts"
click node_kbservice "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/knowledge-bases.ts"
click node_agent "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/agent.ts"
click node_retrieval "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/retrieval.ts"
click node_pages "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/pages.ts"
click node_batch "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/digest/batch.ts"
click node_artifacts "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/artifacts.ts"
click node_graphengine "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/graph-engine/src/index.ts"
click node_pipeline "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/graph-engine/src/render/render-pipeline.ts"
click node_controller "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/graph-engine/src/render/controller.ts"
click node_rename "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/graph-rename-preview.ts"
click node_contracts "https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/workbench-contracts/src/index.ts"

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_app,node_search,node_graphui,node_apiclient,node_user toneBlue
class node_serverapp,node_prompt,node_graphroutes,node_renameroutes,node_kbservice,node_agent,node_contracts toneAmber
class node_retrieval,node_pages,node_wiki,node_batch,node_artifacts toneMint
class node_graphengine,node_pipeline,node_controller,node_rename toneRose
class node_modelprovider toneIndigo
```

## Components

### Workbench interface

- [Workbench app](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/App.tsx): `workbench/web/src/App.tsx`
- [Page search](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/components/SearchPanel.tsx): `workbench/web/src/components/SearchPanel.tsx`
- [Graph reader](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/components/GraphReader.tsx): `workbench/web/src/components/GraphReader.tsx`
- [API client](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/web/src/lib/api/client.ts): `workbench/web/src/lib/api/client.ts`

### Workbench services

- [HTTP app](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/app.ts): `workbench/server/src/app.ts`
- [Prompt routes](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/routes/prompt.ts): `workbench/server/src/routes/prompt.ts`
- [Graph routes](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/routes/graph.ts): `workbench/server/src/routes/graph.ts`
- [Rename routes](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/routes/graph-renames.ts): `workbench/server/src/routes/graph-renames.ts`
- [Knowledge bases](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/knowledge-bases.ts): `workbench/server/src/knowledge-bases.ts`
- [Agent runtime](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/agent.ts): `workbench/server/src/agent.ts`
- [Shared contracts](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/workbench-contracts/src/index.ts): `packages/workbench-contracts/src/index.ts`

### Knowledge workflows

- [Knowledge retrieval](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/retrieval.ts): `workbench/server/src/retrieval.ts`
- [Page access](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/pages.ts): `workbench/server/src/pages.ts`
- **Knowledge files**
- [Batch digestion](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/digest/batch.ts): `workbench/server/src/digest/batch.ts`
- [Artifacts](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/artifacts.ts): `workbench/server/src/artifacts.ts`

### Graph platform

- [Graph engine](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/graph-engine/src/index.ts): `packages/graph-engine/src/index.ts`
- [Render pipeline](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/graph-engine/src/render/render-pipeline.ts): `packages/graph-engine/src/render/render-pipeline.ts`
- [Graph interactions](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/packages/graph-engine/src/render/controller.ts): `packages/graph-engine/src/render/controller.ts`
- [Rename preview](https://github.com/sdyckjq-lab/llm-wiki-skill/blob/main/workbench/server/src/graph-rename-preview.ts): `workbench/server/src/graph-rename-preview.ts`

### Other components

- **User**
- **Model provider**

## Connections

- User → Workbench app: uses
- Workbench app → API client: requests
- Page search → Workbench app: selects page
- Graph reader → Graph engine: renders graph
- API client → HTTP app: HTTP requests
- HTTP app → Prompt routes: dispatches
- HTTP app → Graph routes: dispatches
- HTTP app → Rename routes: dispatches
- HTTP app → Shared contracts: uses schemas
- Prompt routes → Agent runtime: invokes
- Graph routes → Graph engine: uses graph model
- Rename routes → Rename preview: previews rename
- Agent runtime → Knowledge retrieval: retrieves context
- Knowledge retrieval → Page access: loads pages
- Page access → Knowledge files: reads
- Agent runtime → Model provider: sends prompts
- Agent runtime → Artifacts: saves outputs
- Batch digestion → Knowledge files: digests sources
- Graph engine → Render pipeline: prepares rendering
- Graph interactions → Render pipeline: updates interaction state
- Workbench app → Batch digestion: starts digestion
- Workbench app → Knowledge bases: manages libraries
