# migchw/llm-wiki-starter architecture

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

- Interactive diagram: https://gitdiagram.com/migchw/llm-wiki-starter
- Repository: https://github.com/migchw/llm-wiki-starter

## Overview

This repository is an investment-research wiki: evidence is captured into local Raw files, summarized and linked as research notes, reviewed, then used to draft and monitor theses. The dashboard is a read-only way to explore the same vault alongside market and earnings data. The README documents note-writing, review, and monitoring stages, but their agent/skill implementation and vault directories are absent from the supplied tree, so those nodes have no asserted source paths and uncertain wiring is omitted.

Main entry points: [`dashboard/lib/wiki-data.ts`](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/wiki-data.ts) (Vault index), [`scripts/fetch_source.py`](https://github.com/migchw/llm-wiki-starter/blob/master/scripts/fetch_source.py) (Source fetcher), [`dashboard/lib/wiki.ts`](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/wiki.ts) (Market and earnings data), [`dashboard/scripts/sync-market-data.mjs`](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/scripts/sync-market-data.mjs) (Market data sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Evidence capture"]
  node_fetcher["Source fetcher<br/>[fetch_source.py]"]
  node_rawcapture["Raw capture<br/>[raw_capture.py]"]
  node_rawvault[("Raw evidence")]
  node_inboxwatcher["Inbox watcher<br/>[watch_inbox.py]"]
end

subgraph group_research["Research knowledge"]
  node_sourcenote["Source Notes"]
  node_entities["Entities and Concepts"]
  node_review["Evidence review"]
  node_thesis["Investment Thesis"]
  node_wikitool["Wiki tool<br/>[wiki_tool.py]"]
end

subgraph group_monitor["Thesis monitoring"]
  node_monitoring["Thesis monitoring"]
  node_marketdata["Market data sync"]
  node_earningsdata["Earnings sync<br/>[sync-earnings.mjs]"]
end

subgraph group_dashboard["Read-only dashboard"]
  node_vaultindex[("Vault index<br/>[wiki-data.ts]")]
  node_marketstore[("Market and earnings data<br/>[wiki.ts]")]
  node_dashboard["Research dashboard<br/>[page.tsx]"]
  node_reader["Markdown reader<br/>[reader.tsx]"]
  node_library["Knowledge library<br/>[page.tsx]"]
  node_graph["Wiki graph<br/>[page.tsx]"]
  node_search["Full-text search<br/>[search.ts]"]
end

node_researcher(("Researcher"))
node_sources(("Web and documents"))
node_marketprovider(("Market data provider"))
node_earningsprovider(("Earnings data provider"))

node_researcher -->|"selects"| node_sources
node_sources -->|"provides source"| node_fetcher
node_researcher -->|"requests capture"| node_fetcher
node_fetcher -->|"passes content"| node_rawcapture
node_rawcapture -->|"writes evidence"| node_rawvault
node_researcher -->|"authors summary"| node_sourcenote
node_rawvault -->|"supports claims"| node_sourcenote
node_sourcenote -->|"links knowledge"| node_entities
node_researcher -->|"reviews evidence"| node_review
node_review -->|"supports draft"| node_thesis
node_researcher -->|"drafts thesis"| node_thesis
node_researcher -->|"runs reports"| node_monitoring
node_monitoring -->|"checks changes"| node_thesis
node_researcher -->|"monitors inbox"| node_inboxwatcher
node_inboxwatcher -->|"detects changes"| node_rawvault
node_researcher -->|"runs checks"| node_wikitool
node_marketdata -.->|"requests prices"| node_marketprovider
node_marketdata -->|"syncs quotes"| node_marketstore
node_earningsdata -.->|"requests results"| node_earningsprovider
node_earningsdata -->|"syncs scorecards"| node_marketstore
node_rawvault -->|"indexes notes"| node_vaultindex
node_vaultindex -->|"supplies research data"| node_dashboard
node_marketstore -->|"supplies metrics"| node_dashboard
node_vaultindex -->|"supplies documents"| node_reader
node_vaultindex -->|"supplies summaries"| node_library
node_vaultindex -->|"supplies links"| node_graph
node_vaultindex -->|"provides indexed chunks"| node_search

click node_fetcher "https://github.com/migchw/llm-wiki-starter/blob/master/scripts/fetch_source.py"
click node_rawcapture "https://github.com/migchw/llm-wiki-starter/blob/master/scripts/raw_capture.py"
click node_inboxwatcher "https://github.com/migchw/llm-wiki-starter/blob/master/scripts/watch_inbox.py"
click node_wikitool "https://github.com/migchw/llm-wiki-starter/blob/master/scripts/wiki_tool.py"
click node_marketdata "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/scripts/sync-market-data.mjs"
click node_earningsdata "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/scripts/sync-earnings.mjs"
click node_vaultindex "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/wiki-data.ts"
click node_marketstore "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/wiki.ts"
click node_dashboard "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/page.tsx"
click node_reader "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/read/%5Bslug%5D/reader.tsx"
click node_library "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/library/page.tsx"
click node_graph "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/graph/page.tsx"
click node_search "https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/search.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_fetcher,node_rawcapture,node_rawvault,node_inboxwatcher toneBlue
class node_sourcenote,node_entities,node_review,node_thesis,node_wikitool toneAmber
class node_monitoring,node_marketdata,node_earningsdata toneMint
class node_vaultindex,node_marketstore,node_dashboard,node_reader,node_library,node_graph,node_search toneRose
class node_researcher,node_sources,node_marketprovider,node_earningsprovider toneIndigo
```

## Components

### Evidence capture

- [Source fetcher](https://github.com/migchw/llm-wiki-starter/blob/master/scripts/fetch_source.py): `scripts/fetch_source.py`
- [Raw capture](https://github.com/migchw/llm-wiki-starter/blob/master/scripts/raw_capture.py): `scripts/raw_capture.py`
- **Raw evidence**
- [Inbox watcher](https://github.com/migchw/llm-wiki-starter/blob/master/scripts/watch_inbox.py): `scripts/watch_inbox.py`

### Research knowledge

- **Source Notes**
- **Entities and Concepts**
- **Evidence review**
- **Investment Thesis**
- [Wiki tool](https://github.com/migchw/llm-wiki-starter/blob/master/scripts/wiki_tool.py): `scripts/wiki_tool.py`

### Thesis monitoring

- **Thesis monitoring**
- [Market data sync](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/scripts/sync-market-data.mjs): `dashboard/scripts/sync-market-data.mjs`
- [Earnings sync](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/scripts/sync-earnings.mjs): `dashboard/scripts/sync-earnings.mjs`

### Read-only dashboard

- [Vault index](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/wiki-data.ts): `dashboard/lib/wiki-data.ts`
- [Market and earnings data](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/wiki.ts): `dashboard/lib/wiki.ts`
- [Research dashboard](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/page.tsx): `dashboard/app/page.tsx`
- [Markdown reader](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/read/%5Bslug%5D/reader.tsx): `dashboard/app/read/[slug]/reader.tsx`
- [Knowledge library](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/library/page.tsx): `dashboard/app/library/page.tsx`
- [Wiki graph](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/app/graph/page.tsx): `dashboard/app/graph/page.tsx`
- [Full-text search](https://github.com/migchw/llm-wiki-starter/blob/master/dashboard/lib/search.ts): `dashboard/lib/search.ts`

### Other components

- **Researcher**
- **Web and documents**
- **Market data provider**
- **Earnings data provider**

## Connections

- Researcher → Web and documents: selects
- Web and documents → Source fetcher: provides source
- Researcher → Source fetcher: requests capture
- Source fetcher → Raw capture: passes content
- Raw capture → Raw evidence: writes evidence
- Researcher → Source Notes: authors summary
- Raw evidence → Source Notes: supports claims
- Source Notes → Entities and Concepts: links knowledge
- Researcher → Evidence review: reviews evidence
- Evidence review → Investment Thesis: supports draft
- Researcher → Investment Thesis: drafts thesis
- Researcher → Thesis monitoring: runs reports
- Thesis monitoring → Investment Thesis: checks changes
- Researcher → Inbox watcher: monitors inbox
- Inbox watcher → Raw evidence: detects changes
- Researcher → Wiki tool: runs checks
- Market data sync → Market data provider: requests prices
- Market data sync → Market and earnings data: syncs quotes
- Earnings sync → Earnings data provider: requests results
- Earnings sync → Market and earnings data: syncs scorecards
- Raw evidence → Vault index: indexes notes
- Vault index → Research dashboard: supplies research data
- Market and earnings data → Research dashboard: supplies metrics
- Vault index → Markdown reader: supplies documents
- Vault index → Knowledge library: supplies summaries
- Vault index → Wiki graph: supplies links
- Vault index → Full-text search: provides indexed chunks
