# polds/rapid-issue-triage architecture

> Architecture diagram of the GitHub repository polds/rapid-issue-triage, 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/polds/rapid-issue-triage
- Repository: https://github.com/polds/rapid-issue-triage
- Video tour (about a minute): https://gitdiagram.com/polds/rapid-issue-triage/video

## Overview

Rapid Issue Triage is a local Go application with an embedded, keyboard-first web UI for processing a Linear backlog. The principal workflow is to sync filtered issues and workspace metadata into a local SQLite index, present issues as a triage deck, and apply or undo actions; skips and snoozes remain local. Separate branches provide fast and pooled deep AI enrichment, macros, activity reports, settings, and update checks. The README documents capabilities beyond the sampled excerpts; those are represented where the tree supports a path, without assuming unverified internal call wiring.

Main entry points: [`internal/server/handlers.go`](https://github.com/polds/rapid-issue-triage/blob/main/internal/server/handlers.go) (Issue handlers), [`internal/store/store.go`](https://github.com/polds/rapid-issue-triage/blob/main/internal/store/store.go) (SQLite index), [`web/src/App.tsx`](https://github.com/polds/rapid-issue-triage/blob/main/web/src/App.tsx) (Web app), [`web/src/lib/store.tsx`](https://github.com/polds/rapid-issue-triage/blob/main/web/src/lib/store.tsx) (UI state and API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_webapp["Web app<br/>[App.tsx]"]
  node_triagepage["Triage deck<br/>[Triage.tsx]"]
  node_macropage["Macros<br/>[Macros.tsx]"]
  node_reportpage["Reports<br/>[Reports.tsx]"]
  node_settingspage["Settings<br/>[Settings.tsx]"]
  node_webstate["UI state and API<br/>[store.tsx]"]
end

subgraph group_api["Local application"]
  node_http["HTTP API<br/>[server.go]"]
  node_handlers["Issue handlers<br/>[handlers.go]"]
  node_operations["Triage operations<br/>[ops.go]"]
  node_updater["Update checker<br/>[update.go]"]
end

subgraph group_index["Index and state"]
  node_syncer["Background sync<br/>[syncer.go]"]
  node_sqlite[("SQLite index<br/>[store.go]")]
  node_issuequeue["Issue queue<br/>[issues.go]"]
  node_activity["Activity and reports<br/>[activity.go]"]
  node_macrostore["Macro storage<br/>[macros.go]"]
end

subgraph group_enrich["AI enrichment"]
  node_fastai["Fast enrichment<br/>[enrich.go]"]
  node_deeporch["Deep-run orchestrator<br/>[orchestrator.go]"]
  node_toolbox["Read-only toolbox<br/>[toolbox.go]"]
end

subgraph group_services["External services"]
  node_linearclient["Linear client<br/>[client.go]"]
  node_linear{{"Linear"}}
  node_claude{{"Claude CLI"}}
  node_github{{"GitHub releases"}}
end

node_person(("Triage user"))

node_person -->|"uses"| node_webapp
node_webapp -->|"renders"| node_triagepage
node_webapp -->|"renders"| node_macropage
node_webapp -->|"renders"| node_reportpage
node_webapp -->|"renders"| node_settingspage
node_triagepage -->|"reads and acts"| node_webstate
node_macropage -->|"manages macros"| node_webstate
node_reportpage -->|"loads reports"| node_webstate
node_settingspage -->|"loads settings"| node_webstate
node_webstate -->|"HTTP requests"| node_http
node_http -->|"dispatches"| node_handlers
node_handlers -->|"queries queue"| node_issuequeue
node_handlers -->|"runs actions"| node_operations
node_operations -->|"updates issues"| node_linearclient
node_operations -->|"logs actions"| node_activity
node_handlers -->|"manages macros"| node_macrostore
node_handlers -->|"requests enrichment"| node_fastai
node_handlers -->|"starts deep runs"| node_deeporch
node_handlers -->|"reads activity"| node_activity
node_syncer -->|"fetches issues and metadata"| node_linearclient
node_syncer -->|"writes index"| node_sqlite
node_issuequeue -->|"reads and writes"| node_sqlite
node_activity -->|"reads and writes"| node_sqlite
node_macrostore -->|"reads and writes"| node_sqlite
node_linearclient -->|"GraphQL requests"| node_linear
node_fastai -.->|"runs CLI"| node_claude
node_deeporch -->|"probes and dispatches"| node_toolbox
node_deeporch -.->|"runs scout and synthesis"| node_claude
node_toolbox -->|"reads Linear data"| node_linearclient
node_toolbox -->|"reads local data"| node_sqlite
node_deeporch -->|"persists runs and usage"| node_sqlite
node_http -->|"checks releases"| node_updater
node_updater -.->|"queries releases"| node_github
node_syncer -->|"indexes issues"| node_issuequeue

click node_webapp "https://github.com/polds/rapid-issue-triage/blob/main/web/src/App.tsx"
click node_triagepage "https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Triage.tsx"
click node_macropage "https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Macros.tsx"
click node_reportpage "https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Reports.tsx"
click node_settingspage "https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Settings.tsx"
click node_webstate "https://github.com/polds/rapid-issue-triage/blob/main/web/src/lib/store.tsx"
click node_http "https://github.com/polds/rapid-issue-triage/blob/main/internal/server/server.go"
click node_handlers "https://github.com/polds/rapid-issue-triage/blob/main/internal/server/handlers.go"
click node_operations "https://github.com/polds/rapid-issue-triage/blob/main/internal/server/ops.go"
click node_syncer "https://github.com/polds/rapid-issue-triage/blob/main/internal/syncer/syncer.go"
click node_sqlite "https://github.com/polds/rapid-issue-triage/blob/main/internal/store/store.go"
click node_issuequeue "https://github.com/polds/rapid-issue-triage/blob/main/internal/store/issues.go"
click node_activity "https://github.com/polds/rapid-issue-triage/blob/main/internal/store/activity.go"
click node_macrostore "https://github.com/polds/rapid-issue-triage/blob/main/internal/store/macros.go"
click node_linearclient "https://github.com/polds/rapid-issue-triage/blob/main/internal/linear/client.go"
click node_fastai "https://github.com/polds/rapid-issue-triage/blob/main/internal/ai/enrich.go"
click node_deeporch "https://github.com/polds/rapid-issue-triage/blob/main/internal/deep/orchestrator.go"
click node_toolbox "https://github.com/polds/rapid-issue-triage/blob/main/internal/deep/toolbox.go"
click node_updater "https://github.com/polds/rapid-issue-triage/blob/main/internal/update/update.go"

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_webapp,node_triagepage,node_macropage,node_reportpage,node_settingspage,node_webstate,node_person toneBlue
class node_http,node_handlers,node_operations,node_updater toneAmber
class node_syncer,node_sqlite,node_issuequeue,node_activity,node_macrostore toneMint
class node_fastai,node_deeporch,node_toolbox toneRose
class node_linearclient,node_linear,node_claude,node_github toneIndigo
```

## Components

### Web interface

- [Web app](https://github.com/polds/rapid-issue-triage/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Triage deck](https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Triage.tsx): `web/src/pages/Triage.tsx`
- [Macros](https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Macros.tsx): `web/src/pages/Macros.tsx`
- [Reports](https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Reports.tsx): `web/src/pages/Reports.tsx`
- [Settings](https://github.com/polds/rapid-issue-triage/blob/main/web/src/pages/Settings.tsx): `web/src/pages/Settings.tsx`
- [UI state and API](https://github.com/polds/rapid-issue-triage/blob/main/web/src/lib/store.tsx): `web/src/lib/store.tsx`

### Local application

- [HTTP API](https://github.com/polds/rapid-issue-triage/blob/main/internal/server/server.go): `internal/server/server.go`
- [Issue handlers](https://github.com/polds/rapid-issue-triage/blob/main/internal/server/handlers.go): `internal/server/handlers.go`
- [Triage operations](https://github.com/polds/rapid-issue-triage/blob/main/internal/server/ops.go): `internal/server/ops.go`
- [Update checker](https://github.com/polds/rapid-issue-triage/blob/main/internal/update/update.go): `internal/update/update.go`

### Index and state

- [Background sync](https://github.com/polds/rapid-issue-triage/blob/main/internal/syncer/syncer.go): `internal/syncer/syncer.go`
- [SQLite index](https://github.com/polds/rapid-issue-triage/blob/main/internal/store/store.go): `internal/store/store.go`
- [Issue queue](https://github.com/polds/rapid-issue-triage/blob/main/internal/store/issues.go): `internal/store/issues.go`
- [Activity and reports](https://github.com/polds/rapid-issue-triage/blob/main/internal/store/activity.go): `internal/store/activity.go`
- [Macro storage](https://github.com/polds/rapid-issue-triage/blob/main/internal/store/macros.go): `internal/store/macros.go`

### AI enrichment

- [Fast enrichment](https://github.com/polds/rapid-issue-triage/blob/main/internal/ai/enrich.go): `internal/ai/enrich.go`
- [Deep-run orchestrator](https://github.com/polds/rapid-issue-triage/blob/main/internal/deep/orchestrator.go): `internal/deep/orchestrator.go`
- [Read-only toolbox](https://github.com/polds/rapid-issue-triage/blob/main/internal/deep/toolbox.go): `internal/deep/toolbox.go`

### External services

- [Linear client](https://github.com/polds/rapid-issue-triage/blob/main/internal/linear/client.go): `internal/linear/client.go`
- **Linear**
- **Claude CLI**
- **GitHub releases**

### Other components

- **Triage user**

## Connections

- Triage user → Web app: uses
- Web app → Triage deck: renders
- Web app → Macros: renders
- Web app → Reports: renders
- Web app → Settings: renders
- Triage deck → UI state and API: reads and acts
- Macros → UI state and API: manages macros
- Reports → UI state and API: loads reports
- Settings → UI state and API: loads settings
- UI state and API → HTTP API: HTTP requests
- HTTP API → Issue handlers: dispatches
- Issue handlers → Issue queue: queries queue
- Issue handlers → Triage operations: runs actions
- Triage operations → Linear client: updates issues
- Triage operations → Activity and reports: logs actions
- Issue handlers → Macro storage: manages macros
- Issue handlers → Fast enrichment: requests enrichment
- Issue handlers → Deep-run orchestrator: starts deep runs
- Issue handlers → Activity and reports: reads activity
- Background sync → Linear client: fetches issues and metadata
- Background sync → SQLite index: writes index
- Issue queue → SQLite index: reads and writes
- Activity and reports → SQLite index: reads and writes
- Macro storage → SQLite index: reads and writes
- Linear client → Linear: GraphQL requests
- Fast enrichment → Claude CLI: runs CLI
- Deep-run orchestrator → Read-only toolbox: probes and dispatches
- Deep-run orchestrator → Claude CLI: runs scout and synthesis
- Read-only toolbox → Linear client: reads Linear data
- Read-only toolbox → SQLite index: reads local data
- Deep-run orchestrator → SQLite index: persists runs and usage
- HTTP API → Update checker: checks releases
- Update checker → GitHub releases: queries releases
- Background sync → Issue queue: indexes issues
