# genz A Herdr layout built around one tall sidebar: a photo header, spaces, a card-style agents list with a Settled shelf that puts finished agents away (by hand, or by themselves after 3 idle days), and a footer. The work area on the right has pill tabs with Files, Changes, Quota, SSH and Insights buttons folded behind a chevron, bordered pane cards, and a Pokémon strip at the very bottom (there is no status bar: the strip's corner shows the machine and branch). There is no scrollbar anywhere in the sidebar. ![genz](preview.png) ## What you see The window has no system title bar (`titlebar: "none"`; macOS lights at 12, 16). The tab bar and the brand row drag the window. The background is the theme's `canvas`. Fonts and sizes are not set by the layout: the person's `settings.json` decides them. The colors below are theme names. **Left sidebar**, 342 px wide, `chrome` background, 1 px `border` divider on its right. It can't be dragged to resize (`resizable: false`, min 44, max 480). Under 160 px wide every sidebar mod draws a compact rail. Top to bottom: 1. **Brand row**, 42 px. Background image `backgrounds/ocean-header.png` (a blue ocean-wave photo, `cover`). On it: the Kreat mark (`mods/genz-chrome/kreat.svg`, three waves stepping down from short to long, 20 px, drawn in `foreground` straight on the photo, no tile), the word "Kreat" (14 px, semibold, `foreground`), and at the right a 26 px square sidebar-toggle button (`#06162a8c`, `#06162acc` on hover, radius 6, `sidebar.svg` from `workspace-chrome`) that folds the sidebar to a 44 px rail and back. 2. **Spaces** and **Agents** share the space between the brand row and the footer. Header 38 px (10 px side padding), the same in both blocks: the **Spaces | Agents switch** (a `hover` track, 2 px padding, radius 7; two 22 px segments, radius 5, 12 px semibold; the shown one in `foreground` on `raised`, the other `dim`, `foreground` on hover). "Spaces" carries the space count (`dim`, 10.5 px); "Agents" carries a `blocked` dot and count when any agent is blocked and a `working` spinner and count when any is working, so they show from the Spaces side too. Only one of the two blocks shows: the switch resizes the chosen one to weight 1 and the other to 0 px (`layout.resize`), so the hidden one keeps running (the agents list still orders and settles agents) and the choice is the layout's own, kept across restarts. Agents shows first. In the narrow rail the header is one 22 px button that shows the other list (`layers.svg` for Spaces, `bot.svg` for Agents). - **Spaces.** Header: the switch, then at the right a search button and a + button. Rows are 34 px (28 px for worktree children), radius 10, 8 px side padding. Each row has a 22 px radius-7 avatar with the space's first letter in white on one of six colors (`#22a99a`, `#e3814f`, `#5b8def`, `#8b7cf6`, `#3fae6a`, `#d9649a`, handed out least-used first and stored in shared `space.colors`). A space that isn't a saved project gets an outlined avatar with `dim` letter. The home space `~` shows a house tile and reads "Home". After the name, right-aligned and `dim` 11.5 px: repo and branch only when unusual (not `main`/`master`, not equal to the name), then `↑n` in `ansi2` and `↓n` in `ansi1`. A space with a working agent shows a small spinner at the row's end; blocked or done shows an 8 px dot in the `blocked` or `done` color. The active row has the `selected` background and a 3 px `accent` bar on its left edge. Worktree spaces are listed under their repo's row, joined by a thin curved line (`dim` at 33% alpha), with a count chip on the repo row ("2 ˅") that folds them. Clicking a repo row with no space of its own goes to a space already at its main checkout if there is one, else opens its saved project, else makes a space there. A repo at a drive's root (a stray `D:\.git`) counts as no repo: its spaces are plain rows and its `git status` is never run (it would walk the whole disk). An unnamed space outside a repo is called after the folder its first terminal is in now (`oot`), taken from `panes()` rather than from Herdr's name, which says "D:" for a drive-root repo and keeps a repo name it once saw until Herdr restarts. When another machine is known, each machine gets a foldable header row (this computer first), with its spaces indented under it. The list scrolls with the wheel and draws no scrollbar. 3. **Agents** (the other half of the switch above; with a `border` line on top only when both blocks show at once, as with an older saved size). Header: the switch, then a search button, a two-button switch (clock = Priority, layers = Grouped by project; the chosen one has a `raised` background inside a `hover` track), and a pen button (new agent). The list is described below. It draws no scrollbar and scrolls with the wheel. 4. **Settled shelf**, docked at the very bottom of the agents block, 1 px `border` on top. Header 32 px: a circle-check icon, "Settled", a count pill, then at the right a small pill `auto 3d` (or `auto off`) and a chevron. The pills show only while the header is hovered (`settledHover`); otherwise the header is just icon, label, count and chevron, like the other group headers. Folded by default. Open, it shows slim 30 px rows (agent icon 14 px, title 12.5 px in `muted`, and at the right how long ago it was settled, e.g. `5h`), at most 10 and then a `N more` / `Show less` row, inside a box that stops at 230 px and scrolls. Empty and open it says "Nothing yet. Agents idle for 3d land here." The header also has a second pill, `park off` (or `park 1d`, `park 7d`, `park 14d`, `park 30d`), left of the `auto` pill. Parked agents are listed after the settled ones on the same shelf: dim rows (75% opacity) with the agent icon, the title, and at the right an archive icon with the time since it was parked. The count pill counts settled plus parked. 5. **Footer**, 42 px, `chrome`, 1 px top border. One row of two 28 px buttons (radius 8, 14 px icon): Notes at the left, Settings at the right (with a 6 px `accent` dot when an app update is ready). In the narrow rail the two are stacked icons with their names as tooltips, and the footer block grows to 68 px; `genz-chrome` resizes its own block (`layout.resize` on `sidebar-footer`) whenever the sidebar crosses the rail width. There is deliberately no "Add machine" row. **Right side** (a column): - **Tab bar**, 42 px, `chrome`, 1 px bottom border. Tab pills of the active space: 29 px high, radius 7, 12.8 px text, program icon 14 px, name (max 170 px, truncated). The active pill has the `raised` background, a `border` outline, and a close x. A tab with a working agent shows a spinner, blocked or done a 6 px dot. **Focus:** the bar doesn't show every tab of the space, only the active one and every tab that needs you (blocked or done), in the space's own order; going between agents is the sidebar's job. `RECENT_TABS` (0) can keep that many most recently shown others on the bar too. When last shown is remembered per tab in localStorage `tab-seen` (pruned to live tabs). The rest wait behind a chip after the pills, `+N` and a `chevron-down` (26 px high, radius 6, 12 px text, `muted`; tooltip "N more tabs"); one leftover tab is shown instead of a `+1` chip. The chip is a gpui-base `Popover` (anchored `top_left`, controlled by `moreOpen`), not an overlay, because every new overlay copy keeps its memory: its list (280 px wide, max 360 px tall and scrolling, 4 px padding, radius 8, `popover` background, `border` outline) has a 28 px row per hidden tab with its icon, name, status mark and a close x; clicking a row selects the tab. The list is built only while open. After the pills: a `+` button (opens the `new-menu` popup, 250 x 512), then the tool group Files, Changes, Quota, SSH, Insights and the Poké Ball (26 px high, radius 6, 12 px text, 14 px icon; `selected` background while their panel, tab or strip is showing), ending in a 26 px chevron button. The group starts folded: only the tools that are on show, as 26 px icon squares with their name as a tooltip, beside an `ellipsis` (…) button. Clicking it unfolds the group: every tool with its label (the Poké Ball stays an icon), and the button turns to `chevron-right` to fold it again. Folded or not is remembered in localStorage `tools-open`. On Windows the three window buttons (minimize, maximize/restore, close) are drawn at the far right with the `win-*.svg` icons, after a 1 px × 16 px `border` rule (6 px margin each side) that keeps them apart from the app's buttons. - **Work body**, padded 8 px with an 8 px gap: the active tab's panes, each a card (radius 10, 1 px `border`, `background` fill, `accent` border while focused, 8 px gap between cards, the 30 px `pane` header on top only while the pointer is on the pane (`reveal: "hover"`, drawn over the terminal so it never resizes), a lone pane is framed too). Terminal padding 14 px vertical, 12 px horizontal. At its right the **side panel** (482 px, min 280, max 900), hidden at first, a stack of Files / Changes / Quota. - **No status bar.** The Pokémon strip is the bottom of the window. Its top left shows where the active space runs, across from Pet / Hide, but only when that says something: a `server` icon and the machine's name when the space is on another machine, and a `branch` icon and the branch when it has one (`·` between them); 11 px `muted`, on a `chrome` chip (6 px padding, radius 5) so a Pokémon walking under it doesn't show through. On this computer with no branch the corner stays empty. Folded, the 26 px bar starts with the same. - A 0 px block hosting the `projects` mod in `host` view (it draws nothing; it keeps the projects data and answers `projects.*` commands). ## How it behaves **Agent statuses in the agents list** (priority view; the agent is a card unless noted): - **blocked** ("Needs you"): top section, label in the `blocked` color with a dot. The card has a faint `blocked` tint (14% alpha, 22% on hover), the icon tile has an 11 px `blocked` dot on its corner (2 px ring in the row's color), and the title line ends with a "Needs you" pill (`blocked` text on 15% tint). - **done** (finished while you weren't looking): section "Done". Corner dot in `done`, title line ends with the word "Done" in `done`. Looking at it turns it idle in Herdr, but it stays in Done until you leave that card. - **working**: section "Working", shown in a tray docked under the list with its own top rule, capped to 3 cards with a `N more` / `Show less` row. The tile shows a spinning arc (13 px circle on the corner), the title line ends with how long it has been working (`4m`). - **idle**: section "Idle" (count pill, chevron). The title turns `muted` when it isn't focused, and the title line ends with how long it has been idle (`<1m`, `44m`, `3h`, `2d`), taken from the core's own state-change time. - **settled**: not in any section above; on the Settled shelf. - Pinned agents sit above all sections under a "Pinned" label, whatever their state. - Sections are sorted by urgency (blocked > done > working > idle), then most recently changed. A parent counts as its most urgent sub-agent. - In Grouped view the sections are the agent's project (or space) with a colored letter tile; the card's meta line then shows only the branch. **Card.** Its title is the tab's name when the tab is named and this is the tab's agent, so the card, the tab and the Pokémon read the same; else a Claude agent's own terminal title, else the tab or agent title. The focused card has the `selected` background and a 3 px `accent` bar on its left. Meta line (16 px, `dim`): colored 8 px dot and the project or space name, a pin icon when pinned, a server icon when the agent is on another machine, then a branch line (`branch.svg` + branch name). The dot and name show only while the list holds agents of more than one project or space; when they are all one place the card is a single line, unless it has a branch or another machine to show. **Card hover.** The title line ends with small 13 px icon buttons: **pin** (always), **settle** (`archive.svg` for an agent that can be parked, a local agent with a resume command; `circle-check.svg` otherwise; not shown while the agent or any sub-agent is working or blocked, nor when pinned), **close** (x; only for idle agents). Settle turns green on hover, close turns `blocked`. Then the status text. **Clicks.** Card or slim row: `pane.focus` that agent's pane. Right-click: `projects.agent-menu:
@,`. Pin: toggles the pin (kept in localStorage `pins`, pins of ended agents are dropped). Close: `pane.close` for the agent's pane; if it is the only pane of its space and other spaces exist, `space.close {confirmed: true}`; if it is the last space, a new tab is made first. Group headers and the Idle/Working headers fold their section. Claude sub-agents get a fold chip (bot icon + count) on the title line; with Claude sub-agents present a card starts folded. **Settling.** - Clicking the settle icon on an agent that can be parked parks it at once (see Park): settling alone keeps the program running, and a Claude Code holds about 500 MB. Its tooltip says "Settle and park". On any other agent it writes the label `settled=:` on the agent's terminal (`hc label
settled=...`). The card moves to the Settled shelf at once (before the core answers). A failed write shows an error notification and the card stays. - Every minute (and at the first render that has agents), any agent that is `idle`, not focused, not pinned, not already settled, with no working/blocked sub-agent, and idle for at least N days (default **3**) is settled the same way. "Idle for" is the core's `status_ms` from `hc get
--json` (asked once per local state change), so an agent idle for a week before the layout was installed counts as a week. The `auto 3d` pill on the shelf header steps through 1d, 3d, 7d, 14d, off and back (shared key `agents.settleDays`, `0` = off). - A settled agent comes back by itself when it is working or blocked again, or when its terminal's `turn` is higher than the turn stored in the label. Looking at it or clicking its row does not bring it back. The row's hover buttons are "Bring back" (`undo.svg`; removes the label and restarts its idle clock) and Close. - Settled agents are left out of the agent order used by `agent.next` / `agent.prev`. **Terminals** (a group at the end of the agents list, in both views; not drawn in the rail). - Members: every pane whose terminal is not an agent and has no parent terminal (helpers an agent started stay under their agent). Header: `icons/shell.svg` 12 px, "Terminals", a count pill, a 6 px `working` dot with a number when any of them runs a command, a chevron; clicking folds the group (localStorage `terms-open`). No terminals, no group. - A row is a card like an agent's (30 px tile with the program's icon, 13.5 px title, an 11.5 px line under it). Title: the command running in it; else the tab's name, when that name isn't automatic (a number, `tb…`, the terminal's address, the program's name) and this pane is the tab's first terminal; else the folder's name; else the program's. Under it: an 8 px square in the space's color and the space's name (the folder's name when the terminal is outside its space's folder; the program's name when the title already is the place), a server icon for another machine, then the branch. The tooltip adds the full folder. - Running: an 11 px `working` dot on the tile's corner, the title in `foreground`, and the title line ends with how long the command has run, in `working`. Idle: the title is `muted` and the line ends with the time since the terminal was last used: the latest of when you last left it (stamped when focus leaves, so a row doesn't jump while you are on it), when a command last started or ended in it, and when it was made. The focused row shows no time. Stamps are kept in localStorage `terms` (pruned to live terminals). - Order: running first (newest command first), then idle by last used. Idle rows past the first 5 fold into `N more` / `Show less`; the focused one always shows. - Click: `pane.focus` its pane. Hover on an idle row: a close x (the agent card's close: `pane.close`, or the space when it is its only pane). No close while a command runs. - What a shell runs: a terminal whose program isn't a shell is titled by its own argv. Otherwise the core's `foreground`, when that is another process than the shell. On Windows the core always reports the shell, so `mods/genz-agents/shell-procs.cs` is compiled once with .NET Framework's `csc.exe` into `data/genz-agents/shell-procs-.exe` and run with the local shells' pids every 5 s while the group can be seen (30 s otherwise). For each shell with a child process it prints the newest direct child's start time and command line (a child counts only if it started after its parent, so a reused pid isn't taken for one). `commandName` turns that into what was typed: `node …\npm-cli.js run dev` reads `npm run dev`, `cmd /c ""…\php.bat" artisan serve"` reads `php artisan serve`, and paths lose their folders. Without `csc.exe` the list still works, without commands. The list redraws only when the set of running commands changes. - The same list (running first, then idle) is shared as `globalThis.__genzTerminals = { at, list }` for the switcher: `projects.switch` shows the terminals after the agents (place, title, branch, `Running 5m` or the time since last used), filters them by command, tab name, folder, branch or the word "terminal", and goes to one with `pane.focus`. Its header counts `N agents · M terminals`. A list older than 90 s (another layout is showing) is ignored. **Keys** (put in `keys.json` under `global`): `ctrl-shift-a` `projects.switch` (agent and terminal switcher), `ctrl-shift-j` `projects.pick` (find project), `ctrl-shift-g` `projects.compose` (new agent), `ctrl-shift-enter` `projects.peek-go`, `ctrl-shift-q` `projects.peek-close`, `ctrl-shift-m` `mod.open:apple-notes`, `ctrl-shift-s` `genz-tabs.ssh` (to the SSH tab, opened if needed, with its search focused; again goes back to the tab you came from), and `ctrl-shift-b` `layout.toggle:sidebar` (hide or show the whole sidebar). **Tabs.** An unnamed tab takes the title its agent reports (cleaned of agent names, paths and generic words, max 80 characters) via `tab.rename`, and keeps following it while the name is still the one this code set (localStorage `auto-titles`; checked every 2 s, at most one rename per tab in 5 s). A tab named any other way (by the person, or by `projects` from the new agent's prompt) is never touched; clearing an auto name keeps it cleared. Double-click a pill renames it; drag a pill onto another to move it; right-click opens the `menu` popup; the wheel over the bar runs `tab.prev` / `tab.next`. The side panel remembers, per space, whether it was closed or which panel it showed. **Panel buttons.** Files / Changes / Quota: `layout.select {stack: "panel-body", child}` and `layout.show {id: "panel"}`; again hides. SSH: selects the space's tab named "SSH", else `tab.new {name: "SSH", mod: "ssh-hosts"}`. Insights: focuses the space's Insights tab, else `tab.new {name: "Insights", mod: "insights"}`. ## Built from Files of one folder: `layouts/genz.json`, `layouts/genz-preview.svg`, `backgrounds/ocean-header.png`, `keys.json`, `mods/*`. **Layout tree** (`layouts/genz.json`; root `preview: "layouts/genz-preview.svg"`, `background: "canvas"`, `terminal_padding: [14, 36]`, `divider: {width 1, color "border"}`, `titlebar: "none"`, `traffic_lights: [12, 16]`): ``` root row ├─ sidebar column size px 342, min 44, max 480, background "chrome", resizable false │ ├─ brand block genz-chrome px 42, window_drag, background {image ocean-header.png, cover} │ ├─ sidebar-lists column, resizable false (one child shows, the other is 0 px) │ │ ├─ spaces block genz-spaces px 0 (weight 1 when shown) │ │ └─ agents block genz-agents weight 1 (px 0 when Spaces shows) │ └─ sidebar-footer block genz-chrome {footer: true} px 68 └─ work column resizable false ├─ tabs block genz-tabs px 42, window_drag ├─ work-body row, padding 8, gap 8 │ ├─ main block {tab: "active", pane: {header {mod "pane", height 30, position "top", reveal "hover"}, │ │ background "background", border {1,"border"}, focus {1,"accent"}, radius 10, gap 8, lone true}} │ └─ panel column px 482, min 280, max 900, hidden true │ └─ panel-body stack, active "changes": blocks files (mod files), changes (mod changes), quota (mod quota) ├─ pokemon-agents block pokemon-agents px 112, min 26, max 240 └─ projects block projects {view: "host"} px 0 ``` **Mods** (each in `mods//`, `mod.json` has `"place": "none"`; icons referenced as `mods//x.svg`): - `genz-chrome`: brand row and, with `props.footer`, the footer. Uses `window()`, `layout()`, `updates()`, `run("layout.resize", {id: "sidebar", px})`, shared `sidebar.width` / `sidebar.collapsed`. Opens `apple-notes` with `mod.open` and `app.settings`. Own icons: `notes.svg`, `filter.svg`. - `genz-spaces`: the Spaces list. Uses `spaces()`, `panes()`, `machines()`, `hc(["machine","ls","--json"])`, `exec("git", ...)` (status --porcelain=v2 --branch, rev-parse), `watchFolder` on repos, `agents()` (only for the switch's counts, and not while Agents shows), `run("space.select" | "space.move" | "space.new" | "layout.resize")`, shared `space.colors`. Reads the projects cache at `globalThis.__wranglerProjects.known.projects`. Calls `projects.pick`, `projects.new-menu`, `projects.space-menu:|linked|main@x,y`, `projects.row-menu`, `projects.menu`, `projects.open`. Own icon: `house.svg`. Uses `overflow_y_scroll()` on an element with an `id` (no scrollbar). - `genz-agents`: the Agents list and Settled shelf, and the same Spaces | Agents switch as `genz-spaces` (`layout()` sizes and `layout.resize`). Uses `agents()`, `terminals()` (`labels.settled`, `turn`, `parent`), `panes()`, `focused()`, `spaces()`, `hc(["label", ...])`, `hc(["get", address, "--json"])` (`status_ms`), `setAgentOrder`, `notify`, `exec` (git; `sh` to list Claude sub-agent files), `readTextFile`, `watchFolder`, shared `agents.sort` ("priority" | "grouped") and `agents.settleDays`, localStorage `pins`, `changed`, `revived`, `settled-open`, `checkouts`. Calls `pane.focus`, `pane.close`, `space.close`, `tab.new`, `projects.switch`, `projects.compose`, `projects.agent-menu`, `projects.peek:
`. Reads `globalThis.__wranglerProjects.memo` for branches. Own icons: `bot.svg`, `undo.svg`. For the Terminals group: `terminals()` (`pid`, `foreground`, `argv`, `created_ms`), `exec` (the helper and, once, `csc.exe`), `fs` (`data/genz-agents/`), `window()`, localStorage `terms` and `terms-open`, and it writes `globalThis.__genzTerminals`. Own source: `shell-procs.cs`. Shipped icon: `icons/shell.svg`. Shipped icons used: `workspace-chrome/{spinner,circle-check,pin,pin-off,x,search,layers,clock,square-pen,branch,chevron-down,chevron-right,check,server}.svg`. The lists use `overflow_y_scroll()`, not `overflow_y_scrollbar()`. - `genz-tabs`: the tab bar (see above). Own icons: `win-min.svg`, `win-max.svg`, `win-restore.svg`, `win-close.svg`, `chevron-left.svg`, `chevron-right.svg`. localStorage `panels`, `auto-titles`, `tools-open`, `tab-seen`. Imports `Popover` from `gpui-base` for the `+N` list. Command `genz-tabs.ssh` (ctrl-shift-s) toggles the SSH tab and sends `ssh-hosts.focus`. Opens overlays `menu` and `new-menu`; icons from `files`, `changes`, `quota`, `ssh-hosts`, `insights`, `pane`. - Helper mods, bundled as they are and reached only through commands: `projects` (host: saved projects in `data/projects/projects.json`, git worktrees, new-agent flow, agent/space/row menus, peek; commands `projects.switch|pick|compose|peek|peek-go|peek-close|agent-menu|space-menu|row-menu|new-menu|menu|open|...`; it fills `globalThis.__wranglerProjects = {known, memo, ver}`), `projects-ui` (its dialogs, pickers, menus and peek bar), `quota` (a 9Router quota panel), `apple-notes` (a notes window), `insights` (usage analytics tab), `ssh-hosts` (an SSH host manager tab: All / Recent / colored groups, a keyboard-driven host list (↑↓, Enter connects, Shift+Enter splits, / search, N/E/D/C/Del), a detail panel with Connect, Open in split and the copyable ssh command, a host form with Default / Password / Key file login, delete with undo, LiteTerm Import / Export and ~/.ssh/config import, and normal / blur / dummy privacy modes; hosts in `data/ssh-hosts.json`, localStorage `sort`; ctrl-shift-s opens it), `pokemon-agents` (a strip at the bottom of the window where each agent roams as a pixel Pokémon; a name tag (status dot and title) shows under the hovered one and under those that need you, are done or are focused, the rest roam untagged, and tags never overlap; click to focus its agent, right-click or `pokemon-agents.pick` to choose which one; besides walking, standing and sleeping, each Pokémon gets the extras its SpriteCollab sheet has (sprites.js `CUTS`, facing you): `hop` while its agent needs you, `cheer` (Pose, else Nod, else Rotate) when it's done, `wake` once when a napper's agent stirs, and now and then a one-off at a stop (`charge`/`attack` while working, `sit`/`lookup`/`eat` while idle; `ACTS`, `ACT_CHANCE`); a one-off plays once (its GIF holds the last frame a moment, and each pose gets a new element id so its GIF starts from the first frame), and a Pokémon without an extra just stands; folded to a 26 px bar with its own Hide / Show button (remembered in localStorage `folded`, old height in `open-height`, via `layout.resize`), or hidden entirely with the Poké Ball button. Its Pet button (or `pokemon-agents.pet`, ctrl-shift-u) lets one Pokémon out as a floating pet: `openOverlay {kind: "window", frame: "none", key: "pokemon-pet", keep: true, props: {pet: true}}`, shared `pokemon-agents.pet`; it follows the agent that needs you, then the one that finished, then one at work (the focused one first), then the focused one; the strip lets it out again when it starts; it redraws when agents change (no polling), and once more when it dozes off: an idle agent's Pokémon naps 30 s after the agent last changed state (`SLEEP_AFTER`, the strip's too; a `done` agent stays awake with its ✓ until it's looked at); drag to move, double-click to go to the agent, × to put it back. It shows the same moods and one-offs as the strip (a one-off every 6–16 s). It doesn't walk around by itself, on purpose: a mod can't move an overlay, and every new overlay copy evaluates the module again and keeps that memory (about 200 KB a copy), so a pet that reopened itself a few px on at each step ran the shared mod runtime out of memory within minutes and broke every mod until Herdr restarted. The strip can also be hidden from the Poké Ball button in `genz-tabs` or `layout.toggle:pokemon-agents` (ctrl-shift-y), and it does no work while folded or hidden; sprites are downloaded from PokeAPI with `curl` and scaled with ImageMagick when present). - Shipped mods used: `pane` (pane header), `files`, `changes`, `workspace-chrome` (icons only), `menu`, `new-menu`, `worktree`, `toast`. **Programs it runs:** `git`, `hc`, `curl` (quota panel), `claude` (projects: branch naming and hooks), and on Windows `powershell` (only to wait: `Start-Sleep`), `csc.exe` from .NET Framework (once, to compile `shell-procs.cs`) and the helper it makes (it reads the process table, nothing else). `sh` is used only for other ssh machines. **Network:** the quota panel, to the 9Router server URL the person types in, and `pokemon-agents`, which fetches sprites from raw.githubusercontent.com (PokeAPI). **Art:** `backgrounds/ocean-header.png`; SVG icons inside each mod folder. ## Watch out - `overflow_y_scrollbar().mode("always")` is what draws the scrollbar. Use `overflow_y_scroll()` on an element that has an `.id(...)`; without the id the list does not scroll. - Pinned agents are never settled, by hand or by the sweep, and the settle button is hidden on them. If an agent that carries a settled label gets pinned, it is listed with the pins, not on the shelf. - `terminals()` has no `status_ms`. Ask `hc get
--json` for it, cache it per local state change, and use it only while the agent is `idle`; otherwise a stale value makes working agents look old. - Un-settling must restart the idle clock (stored in localStorage `revived`), or the next minute's sweep settles the agent again. - A settled label with `turn` lower than the terminal's current `turn` means new work: render must clear it. Write the label with the terminal's turn at that moment. - Don't call `cx.notify()` from `setSettled` while rendering (the render clears labels itself); notify in click handlers and timers. - `mod.open` on a `place: "none"` mod such as `genz-agents` opens it as a floating overlay. Don't use it to "reload" a mod. - The 342 px sidebar is what the preview was made with (it predates the Spaces | Agents switch and shows both lists); a zoom of 0.8 was used for the screenshot. - The pane header (30 px, `reveal: "hover"`) is drawn over the terminal and the terminal never resizes, so the first terminal row used to sit under it: in a fresh session the prompt was hidden while the pointer was on the pane. `terminal_padding` is `[horizontal, vertical]` in unscaled px (zoom does not change it), and only takes two numbers (a 4-number array is refused: "invalid length 4"). The vertical value, 36, clears the header with a small gap; the bottom gets the same. Changing the first value instead only widens the left and right gaps. - The settle button needs the agent to be finished. Working or blocked agents (or ones with a working sub-agent) don't get it. - On Windows the core reports the shell as a terminal's `foreground` whatever runs in it, a shell's `turn` never goes up and its `title` stays empty, so none of those say what a terminal runs or when it was last used: hence the helper and the stamps in the Terminals group. The first run of a freshly compiled helper can take ~25 s while antivirus looks at it; later runs take ~0.1 s. `herdr-app check` runs with no terminals, so it can't show a broken Terminals row: look at the real window (`herdr-app shot`). - The `projects` mod keeps `git config branch..wranglerTemp` and the `wrangler` log folder under `$XDG_STATE_HOME`; those names are from an earlier life of the mod and are kept so existing worktrees still work. - The quota panel stores the 9Router password as plain text in `data/9router-quota.json`. - Windows has no `mkdir`, `test`, `rm`, `readlink`, `sleep` or `sh` on the PATH Herdr runs commands with, and `exec("mkdir")` fails with "cannot run mkdir". That broke Open folder and New project. Do folders and files with `fs/promises` (`mkdir {recursive}`, `exists`, `readdir`, `readFile`, `unlink`, `rmdir`) and waits with `powershell -Command Start-Sleep`; keep the POSIX versions for non-Windows. Import every helper you use: `herdr-app check` does not catch an undefined name, the toast "mkdirp is not defined" does. - On Windows, `git rev-parse --show-toplevel` says `D:/` for a repo at a drive's root, with a trailing slash. Compared as-is with the common dir (`D:/.git`), every space on that drive looked like a worktree of a repo with no space of its own: they all sat under one "D:" row, and each click on that row made yet another "D:" space. Strip the slash before comparing. Herdr's own paths (`panes()` cwd, `spaces()` folder) use backslashes, git's use slashes: compare folders after `norm()` and take names with `base()`, which split on both. - The same on Windows in `projects`, `projects-ui` and `genz-agents`: a saved project's folder (`D:\Project\x`, from Herdr or the folder picker) never equalled git's top (`D:/Project/x`), so `projects.open` made another space each time instead of selecting the open one, a space in a project wasn't its project (Save layout said "Not a project", no colored avatar, agents not grouped under it), and a saved project was named after its whole path. There every folder is spelled with slashes (`slash()`) before it is compared, keyed or stored: `place()`, `expand()`/`tilde()` (with `home()`), `inside()`, `rel()`, terminal cwds. The host's checkout cache key `co||` uses that spelling, so whatever reads it (`checkoutOf` in projects-ui, the branch lookup in genz-agents) must too. `abs()` keeps `D:/x` as absolute, and a program's name drops its folder and `.exe` (`pwsh.exe` is a shell, `claude.exe` is Claude). - Park cannot know an agent's session id: Herdr does not expose it. That is why `pick` exists. Don't claim an exact resume. none on the layout itself; the Quota panel needs a 9Router server, Insights reads `~/.claude/projects` and `~/.codex/sessions` and is empty without them. ## Done when 1. `herdr-app check` passes on every folder in `mods/`. 2. `layout.switch {name: "genz"}` shows the layout and `herdr-app status` lists no errors. 3. The sidebar is 342 px wide, with the brand row (42 px) on top, Spaces or Agents in the middle (Agents first; the switch in the header flips them, and the choice survives a restart) and the 68 px footer (Notes, Settings; no Add machine) at the bottom, and no scrollbar shows in Spaces or Agents even with more rows than fit (the wheel still scrolls them). 4. Hovering an idle agent card shows three icons: pin, settle, close. Hovering a working agent shows pin only. The settle icon is the archive icon on a local Claude, Kiro, OpenCode, CodeBuddy or Codex agent, and clicking it closes that agent's tab and puts a dim parked row on the shelf. 5. On an agent with no resume command (a plain shell program reporting status), clicking settle moves the card out of its section into the Settled shelf; the count on the shelf header goes up by one, and `hc get
--json` shows a label `settled` of the form `:`. 6. Opening the shelf shows the settled agent as a slim row with its age; hovering shows "Bring back" and Close; Bring back returns the card to Idle and removes the label. 7. `hc label settled=:0` for an agent whose `turn` is above 0 makes the agent return to its section by itself. 8. The pill on the shelf header reads `auto 3d` at first and steps 1d, 3d, 7d, 14d, off, 1d on each click; `shared("agents.settleDays")` follows. 9. With `agents.settleDays` set to 1 and an idle agent whose `status_ms` is older than a day, the agent is on the shelf within a minute. 10. With three or more tabs in the space, the bar shows the active tab and any blocked or done ones, then `+N ⌄`; clicking it lists the others, a row selects its tab (which then joins the bar) and its x closes it. The bar has the pills, `+`, and a chevron; only the tools that are on (the Poké Ball while the strip shows) sit beside it. The chevron unfolds Files, Changes, Quota, SSH, Insights; Files opens the 482 px right panel, a second click hides it; the chevron folds them again and the choice survives a restart. 11. A blocked agent shows "Needs you" in the list and a dot on its tab; a done agent shows "Done". 12. On Windows, `projects.add:D:/some/folder` creates `data/projects/projects.json` with that folder as a project, and `projects.agent-start:{"id":"","where":"local","agent":"none"}` opens a space there, both without an error toast. 13. Hovering a settled row shows Bring back, Park and Close. Park on a Kiro agent removes its tab, and the shelf then shows a dim row with its title and an archive icon, and the count includes it. 14. Clicking that parked row opens a new tab in the old space running `kiro-cli chat --resume` (or `--resume-picker` when another agent shares the folder), the row disappears, and the new tab's agent appears in the list. 15. With shared `agents.parkDays` at 7 and an agent whose `settled=` label is 8 days old, it is parked within a minute. 16. With a git repo at `D:\` and an unnamed space whose first terminal is in `D:\Project\oot`, Spaces shows one plain row "oot" (no "D:" repo row above it). 17. On Windows, with a project saved as `D:\Project\`, `projects.open:` run twice makes one space there and then selects it (still one space), and that row in Spaces has a filled avatar. 18. With a plain shell tab open, the agents list ends with a "Terminals" group holding a card for it. `hc send "ping -n 30 localhost"` turns that card's title into `ping -n 30 localhost` within ~5 s, with a dot on its icon and a running count in the group's header; when the command ends the card reads its tab or folder name again, with `<1m`. 19. With more than five idle terminals the group shows five cards and an `N more` row. 20. `projects.switch` lists the terminals after the agents and its header reads `N agents · M terminals`.