# Pocock A full-window Herdr setup for markdown-driven work. Spaces and their git worktrees run down the left under your machines, the agents list sits below them, tabs across the top carry Files, Changes and a new **Scratch** panel that turns a repo's `.scratch/` issue tracker into a status board you can drag tickets through. Clicking a ticket opens its markdown beside the board, and a status chip rewrites the ticket's `Status:` line. ![Pocock](preview.png) ## What you see Left to right: - **Sidebar, 268 px** (min 44, max 480, not resizable by drag): a 46 px brand bar that drags the window, the spaces list and the agents list splitting the height evenly (min 90 px each), and a 69 px footer. Sidebar background is the theme's `chrome`. - **Spaces list** (`spaces-ideas`): one row per space with a coloured avatar tile and its name. A worktree's space is nested under its repo, with branch, ahead/behind and uncommitted-change counts. Machine headings appear when more than one machine is known. A `+` on the row makes a new space. `ctrl-shift-b` folds the sidebar to a 44 px rail (76 px on macOS). - **Agents list** (shipped `agents`): agent rows by status, with the working spinner and blocked/done dots. - **Tab bar, 42 px** (`tabs-ideas`): one pill per tab with the program's icon; working tabs show a spinner, blocked/done tabs a dot. On the right: `+` (new tab menu), **Files**, **Changes**, **Scratch** panel buttons. On Windows the window buttons join that right-hand group as vector icons. - **Panes** are cards: radius 10, 8 px gap between them, 1 px `border`, accent border while focused, a 30 px header on top that is always shown (`pane` mod), and a lone pane is framed too. Terminals keep 14 px vertical / 12 px horizontal padding. - **Right panel, 368 px** (min 280, max 900, hidden at first): a stack holding Files, Changes and Scratch; opened by the tab-bar buttons. - **Status bar, 28 px** (shipped `workspace-status`): machine, branch and agent count. The layout sets no theme, colours or fonts: the person's `settings.json` decides all of them. Root background is `canvas`, dividers are 1 px `border`, the window title bar is hidden (the layout draws its own) and macOS traffic lights sit at 12,16. ## How it behaves - **Spaces**: click a row to switch. Right-click opens the space menu (rename, colour, close, …). Drag a row to reorder it within its machine. The `+` beside a row opens **Grill an idea** for that space: a 420 px dialog with one text field. Enter or Grill starts a new tab in that space, in the folder of its first terminal, running `pi` with `/grill-with-docs ` as its first message. Esc cancels. The idea dialog is only offered on spaces that are not worktrees. - **Tabs**: click to select, double-click to rename, drag to reorder, right-click for the tab menu; the wheel over the bar goes to the next/previous tab. `+` opens the shipped new-tab menu (terminal or any installed agent). - **Panels**: Files, Changes and Scratch share one right-hand panel, one at a time. Clicking the active panel's button closes the panel; clicking another switches to it and opens the panel. The choice is remembered per space — switching spaces restores that space's last panel, closed if it had none. Scratch is always on the bar, even when the welcome's `workspace.panels` setting leaves out Files. - **Scratch board**: reads `.scratch//issues/*.md` of the shown space's repo (a remote space is read over its machine). One column per `Status:` value, in this order: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `claimed`, `resolved`, `wontfix`, plus any other value the tracker uses; empty columns are hidden. A feature filter appears when more than one `.scratch//` exists. - Each card shows the ticket number and title, its `Blocked by:` list (green when every blocker is `resolved`/`wontfix`, orange/red while one is open), and `done/total` from its `- [ ]`/`- [x]` checkboxes. An accent dot marks a ticket that is unblocked and not claimed/resolved/wontfix. - Click a card to open it: the lower half renders the ticket's markdown, with the ticket's path, a close `×`, and a row of status chips. Clicking a chip rewrites the `Status:` line in the file (bold formatting preserved) and the card moves to that column. - Saves in an editor or by an agent show up at once (folder watch), with a 10-second poll as a fallback. - The panel is narrow by default, so the board stacks the columns as sections with full-width cards; drag the panel wider than about 560 px and it becomes a horizontal kanban with 228 px columns. - Status editing only writes on the local machine. On a space on another machine the board still reads, but a status chip explains that editing needs a local space. ## Built from The layout `layouts/pocock.json` is a root `row` whose children are: - `sidebar` (`column`, 268 px): `brand` (`workspace-chrome`, 46 px, `window_drag`) → `sidebar-lists` (`column`, `spaces` at `spaces-ideas` weight 1 min 90, `agents` at shipped `agents` weight 1 min 90) → `sidebar-footer` (`workspace-chrome` with `props: {footer: true}`, 69 px). - `work` (`column`): `tabs` (`tabs-ideas`, 42 px, `window_drag`) → `work-body` (`row`, padding 8, gap 8) holding `main` (`{tab: "active"}` with the `pane` frame above, `lone: true`) and `panel` (`column`, 368 px, hidden; `panel-body` is a `stack` of `files`, `changes`, `scratch`) → `status` (`workspace-status`, 28 px). Mods in this folder: - **`tabs-ideas`** — clone of Herdr's `tabs`: the tab pills, drag/rename/right-click, the `+` menu, and the three panel buttons. It appends `scratch` to the enabled panel list and adds the Scratch button with `mods/tabs-ideas/scratch.svg`. Uses shipped `menu`, `new-menu`, `pane`, `files`, `changes` assets; window-button SVGs are its own. - **`spaces-ideas`** — clone of Herdr's `spaces` with worktree nesting and a per-space Grill button. Opens `grill-input` as a dialog; draws with `mods/workspace-chrome/*.svg`. - **`grill-input`** — the idea dialog: `InputState` + `Input`, Enter/Grill runs `tab.new {space, folder, argv: ["pi"], task: "/grill-with-docs "}`, Esc closes the overlay. - **`scratch-board`** — the board. `exec("git", ["rev-parse", "--show-toplevel"])` finds the repo, then three `grep -r` passes over `.scratch` (headings/`Status:`/`Blocked by:`, then checkbox totals and done counts); `readTextFile`/`writeTextFile` read and move a ticket; `watchFolder(.scratch)` plus `cx.timer.every(10000)` refresh it; `TextView.markdown` renders the detail; `run("layout.…")` is not used, the tab bar drives the panel. Shipped mods used as-is: `workspace-chrome`, `agents`, `pane`, `files`, `changes`, `workspace-status`, `menu`, `new-menu`. Art: `mods/tabs-ideas/scratch.svg` is a three-column board glyph drawn in the text colour; everything else reuses Herdr's icons. ## Watch out - **Scratch assumes a convention**: `.scratch//issues/*.md`, each with a `Status:` line (bold `**Status:**` is fine) and optionally `**Blocked by:** 02, 05` plus `- [ ]` checkboxes. Without that tracker the panel says "No tickets in .scratch yet". The ticket format is documented in this repo's `docs/agents/issue-tracker.md` (not shipped here). - **grep is required** for the board's scan, so it is POSIX/macOS/Linux only; on Windows the panel reports an error. Status writes are local-only. - **The Scratch button ignores `workspace.panels`** on purpose: `tabs-ideas` appends it to whatever the welcome chose, so Files can stay hidden while Scratch is available. - **The board reads the shown space's repo**, not the folder the layout was made in: a space whose terminals are in a subdirectory still finds the repo root via `git rev-parse`. - **The panel is hidden until a button is clicked**; its width (368 px) is what decides stacked sections vs columns (threshold 560 px). Column width is 228 px. - **Shipped mods by name**: this layout expects `workspace-chrome`, `agents`, `pane`, `files`, `changes`, `workspace-status`, `menu` and `new-menu` to exist. New Herdr versions may change them; the bundled clones are not updated automatically. - **The idea button needs `pi`** on the machine (installed or on the login-shell PATH); without it the new tab shows an error toast and exits. - **Sizes are written at zoom 1.** With a narrower window the sidebar may be folded; on macOS the 46 px brand bar leaves the traffic lights at 12,16. ## Done when - `herdr-app check` passes for `tabs-ideas`, `spaces-ideas`, `grill-input` and `scratch-board`. - After `herdr-app do layout.switch --name pocock`: the sidebar, agents list, tab bar with Files/Changes/Scratch and the status bar all draw, and `herdr-app status` lists no errors. - In a space whose repo has `.scratch/sofa/issues/`, clicking **Scratch** shows the seven tickets under their `Status:` sections, with `blocked by 02` green on a resolved blocker. - Clicking a card renders its markdown and the status chips; clicking `ready-for-agent` rewrites its `Status:` line and the card moves to a new column, and the panel remembers Scratch for that space after switching away and back.