# meviusisback/herdr-gh-board architecture

> Architecture diagram of the GitHub repository meviusisback/herdr-gh-board, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/meviusisback/herdr-gh-board
- Repository: https://github.com/meviusisback/herdr-gh-board

## Overview

Repos & Agents is a Herdr layout composed of 17 runtime mods. Its main workflow is configuring a repos folder, discovering repositories and agents in the spaces tree, then opening spaces or Git views to inspect or act on them; the wall provides a parallel live-agent view. Separate branches cover space/worktree creation, GitHub operations, and pane live testing. README statements support the product-level links; source excerpts show selected calls and helpers. Several mods were not excerpted, so their internal wiring is not inferred.

Main entry points: [`mods/spaces-tree/main.js`](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/main.js) (Spaces tree), [`mods/gh-git/main.js`](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/main.js) (Git panel), [`mods/gh-git/issues.js`](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/issues.js) (Issues and PRs), [`mods/pane-prompt/main.js`](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/pane-prompt/main.js) (Pane prompt)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sidebar["Sidebar and status"]
  node_settings["Repo settings<br/>[main.js]"]
  node_tree["Spaces tree<br/>[main.js]"]
  node_status["Agent status<br/>[main.js]"]
  node_space_status["Space status<br/>[main.js]"]
  node_agent_model["Agent model<br/>[agent-model.js]"]
  node_last_prompt["Last prompt<br/>[last-prompt.js]"]
  node_model_brand["Model branding<br/>[model-brand.js]"]
end

subgraph group_git["Git and GitHub"]
  node_git_panel["Git panel<br/>[main.js]"]
  node_issues["Issues and PRs<br/>[issues.js]"]
  node_git_format["Git formatting<br/>[format.js]"]
  node_issue_body["Issue body cleanup<br/>[body.js]"]
  node_space_git["Space Git actions<br/>[main.js]"]
  node_repo_create["Create GitHub repo<br/>[main.js]"]
  node_repo_menu["GitHub repo menu<br/>[main.js]"]
  node_github_menu["GitHub menu<br/>[main.js]"]
  node_worktree["Worktree actions<br/>[main.js]"]
  node_new_worktree["New worktree<br/>[main.js]"]
end

subgraph group_spaces["Spaces and launch"]
  node_space_new["New space<br/>[main.js]"]
  node_pinned_menu["Agent launch menu<br/>[main.js]"]
  node_launch_helpers["Launch helpers<br/>[live.js]"]
end

subgraph group_agents["Agent views"]
  node_tabs["Tab bar<br/>[main.js]"]
  node_wall["Agent wall<br/>[main.js]"]
  node_wall_set["Wall selection<br/>[set.js]"]
  node_wall_tile["Wall tile<br/>[main.js]"]
end

subgraph group_panes["Pane enhancements"]
  node_pane_prompt["Pane prompt<br/>[main.js]"]
  node_pane_live["Live test helpers<br/>[live.js]"]
  node_pi_prompt["Pi prompt reader<br/>[last-prompt.ts]"]
end

node_user(("User"))
node_git_tool{{"git"}}
node_gh_tool{{"gh and GitHub API"}}
node_herdr_core{{"Herdr core"}}
node_sqlite[("Agent SQLite stores")]

node_user -->|"sets repo folder"| node_settings
node_settings -->|"configures discovery"| node_tree
node_user -->|"browses repos"| node_tree
node_tree -->|"reads checkout state"| node_git_tool
node_tree -->|"reads model"| node_agent_model
node_tree -->|"reads prompt"| node_last_prompt
node_tree -->|"uses branding"| node_model_brand
node_tree -->|"shows agent state"| node_status
node_tree -->|"shows divergence"| node_space_status
node_user -->|"opens Git views"| node_git_panel
node_git_panel -->|"renders issues view"| node_issues
node_git_panel -->|"parses commit data"| node_git_format
node_issues -->|"uses repository helpers"| node_git_format
node_issues -.->|"cleans bodies"| node_issue_body
node_git_panel -->|"reads commit history"| node_git_tool
node_issues -->|"fetches issues and PRs"| node_gh_tool
node_user -->|"commits or merges"| node_space_git
node_user -->|"creates repository"| node_repo_create
node_repo_create -->|"creates and pushes"| node_gh_tool
node_user -.->|"opens repo actions"| node_repo_menu
node_user -.->|"opens GitHub actions"| node_github_menu
node_user -.->|"manages worktrees"| node_worktree
node_user -->|"starts worktree"| node_new_worktree
node_new_worktree -->|"creates checkout"| node_git_tool
node_new_worktree -->|"uses issue or PR"| node_gh_tool
node_user -->|"creates space"| node_space_new
node_user -->|"starts agent"| node_pinned_menu
node_pinned_menu -->|"uses live helpers"| node_launch_helpers
node_user -->|"switches tabs"| node_tabs
node_tabs -->|"toggles wall"| node_wall
node_wall -->|"selects agents"| node_wall_set
node_wall -->|"shows live terminals"| node_wall_tile
node_user -->|"starts live test"| node_pane_prompt
node_pane_prompt -->|"plans and probes"| node_pane_live
node_pane_prompt -.->|"reads pi prompt"| node_pi_prompt
node_pane_prompt -->|"queries agent stores"| node_sqlite
node_agent_model -->|"reads terminal screen"| node_herdr_core
node_last_prompt -->|"reads prompt stores"| node_sqlite

click node_settings "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/settings/main.js"
click node_tree "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/main.js"
click node_status "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/agents-status/main.js"
click node_space_status "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/space-status/main.js"
click node_agent_model "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/agent-model.js"
click node_last_prompt "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/last-prompt.js"
click node_model_brand "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/model-brand.js"
click node_git_panel "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/main.js"
click node_issues "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/issues.js"
click node_git_format "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/format.js"
click node_issue_body "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/body.js"
click node_space_git "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/space-git/main.js"
click node_repo_create "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-create/main.js"
click node_repo_menu "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-repos/main.js"
click node_github_menu "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/menu-gh/main.js"
click node_worktree "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/worktree-gh/main.js"
click node_new_worktree "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-new/main.js"
click node_space_new "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/space-new/main.js"
click node_pinned_menu "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/new-menu-pinned/main.js"
click node_launch_helpers "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/new-menu-pinned/live.js"
click node_tabs "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/tabs-gh/main.js"
click node_wall "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/agent-wall/main.js"
click node_wall_set "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/agent-wall/set.js"
click node_wall_tile "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/wall-tile/main.js"
click node_pane_prompt "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/pane-prompt/main.js"
click node_pane_live "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/pane-prompt/live.js"
click node_pi_prompt "https://github.com/meviusisback/herdr-gh-board/blob/main/mods/pane-prompt/pi/last-prompt.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_settings,node_tree,node_status,node_space_status,node_agent_model,node_last_prompt,node_model_brand,node_user toneBlue
class node_git_panel,node_issues,node_git_format,node_issue_body,node_space_git,node_repo_create,node_repo_menu,node_github_menu,node_worktree,node_new_worktree,node_sqlite toneAmber
class node_space_new,node_pinned_menu,node_launch_helpers,node_gh_tool toneMint
class node_tabs,node_wall,node_wall_set,node_wall_tile toneRose
class node_pane_prompt,node_pane_live,node_pi_prompt,node_git_tool,node_herdr_core toneIndigo
```

## Components

### Sidebar and status

- [Repo settings](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/settings/main.js): `mods/settings/main.js`
- [Spaces tree](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/main.js): `mods/spaces-tree/main.js`
- [Agent status](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/agents-status/main.js): `mods/agents-status/main.js`
- [Space status](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/space-status/main.js): `mods/space-status/main.js`
- [Agent model](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/agent-model.js): `mods/spaces-tree/agent-model.js`
- [Last prompt](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/last-prompt.js): `mods/spaces-tree/last-prompt.js`
- [Model branding](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/spaces-tree/model-brand.js): `mods/spaces-tree/model-brand.js`

### Git and GitHub

- [Git panel](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/main.js): `mods/gh-git/main.js`
- [Issues and PRs](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/issues.js): `mods/gh-git/issues.js`
- [Git formatting](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/format.js): `mods/gh-git/format.js`
- [Issue body cleanup](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-git/body.js): `mods/gh-git/body.js`
- [Space Git actions](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/space-git/main.js): `mods/space-git/main.js`
- [Create GitHub repo](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-create/main.js): `mods/gh-create/main.js`
- [GitHub repo menu](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-repos/main.js): `mods/gh-repos/main.js`
- [GitHub menu](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/menu-gh/main.js): `mods/menu-gh/main.js`
- [Worktree actions](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/worktree-gh/main.js): `mods/worktree-gh/main.js`
- [New worktree](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/gh-new/main.js): `mods/gh-new/main.js`

### Spaces and launch

- [New space](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/space-new/main.js): `mods/space-new/main.js`
- [Agent launch menu](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/new-menu-pinned/main.js): `mods/new-menu-pinned/main.js`
- [Launch helpers](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/new-menu-pinned/live.js): `mods/new-menu-pinned/live.js`

### Agent views

- [Tab bar](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/tabs-gh/main.js): `mods/tabs-gh/main.js`
- [Agent wall](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/agent-wall/main.js): `mods/agent-wall/main.js`
- [Wall selection](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/agent-wall/set.js): `mods/agent-wall/set.js`
- [Wall tile](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/wall-tile/main.js): `mods/wall-tile/main.js`

### Pane enhancements

- [Pane prompt](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/pane-prompt/main.js): `mods/pane-prompt/main.js`
- [Live test helpers](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/pane-prompt/live.js): `mods/pane-prompt/live.js`
- [Pi prompt reader](https://github.com/meviusisback/herdr-gh-board/blob/main/mods/pane-prompt/pi/last-prompt.ts): `mods/pane-prompt/pi/last-prompt.ts`

### Other components

- **User**
- **git**
- **gh and GitHub API**
- **Herdr core**
- **Agent SQLite stores**

## Connections

- User → Repo settings: sets repo folder (evidence: `README.md`)
- Repo settings → Spaces tree: configures discovery (evidence: `README.md`)
- User → Spaces tree: browses repos (evidence: `README.md`)
- Spaces tree → git: reads checkout state (evidence: `README.md`)
- Spaces tree → Agent model: reads model (evidence: `mods/spaces-tree/main.js`)
- Spaces tree → Last prompt: reads prompt (evidence: `mods/spaces-tree/main.js`)
- Spaces tree → Model branding: uses branding (evidence: `mods/spaces-tree/main.js`)
- Spaces tree → Agent status: shows agent state (evidence: `README.md`)
- Spaces tree → Space status: shows divergence (evidence: `README.md`)
- User → Git panel: opens Git views (evidence: `README.md`)
- Git panel → Issues and PRs: renders issues view (evidence: `mods/gh-git/main.js`)
- Git panel → Git formatting: parses commit data (evidence: `mods/gh-git/main.js`)
- Issues and PRs → Git formatting: uses repository helpers (evidence: `mods/gh-git/issues.js`)
- Issues and PRs → Issue body cleanup: cleans bodies (evidence: `mods/gh-git/issues.js`)
- Git panel → git: reads commit history (evidence: `README.md`)
- Issues and PRs → gh and GitHub API: fetches issues and PRs (evidence: `README.md`)
- User → Space Git actions: commits or merges (evidence: `README.md`)
- User → Create GitHub repo: creates repository (evidence: `README.md`)
- Create GitHub repo → gh and GitHub API: creates and pushes (evidence: `README.md`)
- User → GitHub repo menu: opens repo actions
- User → GitHub menu: opens GitHub actions
- User → Worktree actions: manages worktrees
- User → New worktree: starts worktree (evidence: `README.md`)
- New worktree → git: creates checkout (evidence: `README.md`)
- New worktree → gh and GitHub API: uses issue or PR (evidence: `README.md`)
- User → New space: creates space (evidence: `README.md`)
- User → Agent launch menu: starts agent (evidence: `README.md`)
- Agent launch menu → Launch helpers: uses live helpers (evidence: `mods/new-menu-pinned/main.js`)
- User → Tab bar: switches tabs (evidence: `README.md`)
- Tab bar → Agent wall: toggles wall (evidence: `mods/agent-wall/main.js`)
- Agent wall → Wall selection: selects agents (evidence: `mods/agent-wall/main.js`)
- Agent wall → Wall tile: shows live terminals (evidence: `README.md`)
- User → Pane prompt: starts live test (evidence: `README.md`)
- Pane prompt → Live test helpers: plans and probes (evidence: `mods/pane-prompt/main.js`)
- Pane prompt → Pi prompt reader: reads pi prompt
- Pane prompt → Agent SQLite stores: queries agent stores (evidence: `mods/pane-prompt/main.js`)
- Agent model → Herdr core: reads terminal screen (evidence: `mods/spaces-tree/agent-model.js`)
- Last prompt → Agent SQLite stores: reads prompt stores (evidence: `mods/spaces-tree/last-prompt.js`)
