Skip to content

Specification

1. Product contract

Build a self-hosted Pi metaharness that combines interactive coding, remote execution, plugin interfaces, and scheduled background work.

One persistent session must be accessible from terminal, desktop web, and mobile PWA. A task card, notification, and conversation must reference the same work.

The primary acceptance journey:

Create a task on the phone. The coordinator dispatches it to a host, creates a repo-local worktree, and starts Pi with extensions. A plugin asks a question. Answer on desktop; all clients reflect the answer. Attach from terminal, take over, then return the session to automation. The task finishes into Review. A notification opens the result. Restarting the coordinator never duplicates the run.

This is an implementation specification, not a mockup brief. Build real persistence, execution, synchronization, and failure handling.

2. Inspiration map and boundaries

Sources establish precedents. Requirements below define this product’s behavior. Do not assume a source implements features beyond what is specifically identified.

Before implementation, record the source revision or documentation access date used. Do not depend blindly on moving upstream branches.

Source Specific precedent Adopt in this product Deliberate boundary
Pi Agent Dashboard integration Server-owned plugin state and serialized IntentNode UI trees Server-authoritative adapter state; portable components rendered on all clients Do not assume arbitrary terminal UI is automatically convertible
Paseo provider contract Pi process-backed RPC; bridging select/input/editor/confirm; native session imports Explicit runtime capabilities, supported interaction bridging, native session identity Build a Pi-focused integration rather than copying a multi-provider abstraction wholesale
Paseo orchestration Agents managed by ID, remote hosts, profiles, fresh scheduled sessions, continuing heartbeats Stable session addressing; distinguish new scheduled work from continuation Do not expose every orchestration capability as unconstrained agent authority
Paradev tasks Task management connected to agent workspaces Tasks launch or reference ordinary coding workspaces A board is a view of task state, not the execution engine
Paradev automations Schedule/event-triggered runs produce live workspaces users can continue Automated and interactive work use the same workspace/session model V1 supports simple rules, not a broad external integration marketplace
OpenChamber Cross-device projects/sessions, review, server-side goals, scheduling Coding view with conversation and changes; reconnectable work; bounded continuation Multi-model races, Fusion, and browser-design tools are deferred
OpenChamber goals Goal execution continues server-side and has pause/resume and limits Explicit continuation policy, visible budget, takeover distinct from stop An agent/auditor claim is not sufficient proof that a task passed acceptance
Orca mobile Structured mobile chat, questions, files, source control, workspace/agent creation Mobile is an actionable coding surface, including review Raw terminal emulation is not the primary phone experience
Omnigent mobile Terminal/browser/phone access to shared sessions and a configured server Device-independent session access and central discovery No requirement to adopt its agent runtime or policy system
Pi plugin suite Existing questions, planning, tool gates, subagents, background work, review and terminal customizations Real compatibility fixtures and prioritized adapter coverage No blanket compatibility claim without testing
Agent host containers (common self-hosting practice) Execution against actual host development environments Native host agents with local credentials/configuration Coordinator containers do not need the host home or Docker socket
Repository-contained worktree convention Repo-contained worktrees and coexistence with other tools <repo>/.worktrees/<branch-slug> plus discovery No central hidden worktree directory
Web Notifications API Tags and notification click handling Session-keyed notification replacement and deep links OS delivery and removal remain best effort
WebKit Web Push Home Screen PWA push and user permission Explicit mobile notification onboarding No guaranteed silent background processing
Pi Durable Separate durable task/extension architecture Reserve room for a future runtime implementation No v1 integration or ordinary-plugin compatibility promise

Herdr supplies the workflow concept of repository/worktree grouping and persistent session navigation. Treat that as an owner requirement, not an assertion about Herdr’s internal architecture.

Vibe Kanban is a historical board-oriented precedent, not a deployment dependency. Its shutdown announcement makes lifecycle ownership particularly relevant.

3. Scope and fixed decisions

Required

  • Standalone and hub-connected operation.
  • Native macOS/Linux host agents.
  • Docker Compose coordinator.
  • Responsive web/PWA, terminal client, scriptable CLI.
  • Single sign-on and passkey sign-in, browser-approved terminals, device revocation.
  • Remote headless execution.
  • Repo-local worktrees and discovery.
  • Persistent Pi conversations.
  • Plugin- and user-provided adapters.
  • Tasks, dependencies, scheduling, webhooks, bounded continuation.
  • Kanban, coding, attention, queue, and automation views.
  • Coordinated notifications.
  • Human takeover and return to automation.
  • Backup, restore, diagnostics, migrations.

Assumptions

  • Single owner, multiple trusted devices and hosts.
  • Pi is the harness; do not build another agent loop.
  • One Pi process owns each live session: managed by PiFi, or started by the user and enrolled.
  • The terminal interface is a new client of the managed session. Stock Pi TUI preservation is not required.
  • Arbitrary Pi terminal widgets need adapters.
  • Import inactive existing Pi sessions. A running Pi is adopted only when it enrols itself through the PiFi extension; unmanaged processes are never attached to.
  • Viewing can move across devices; execution stays on its host.
  • Closing clients never stops execution.

Deferred

Native apps, public relay service, other harnesses, Pi Durable, team permissions, live host migration, arbitrary workflow graphs, browser automation, multi-model races, full IDE editing, and automatic Git merging/deployment.

4. Architecture and implementation stack

Use a TypeScript monorepo:

  • Node.js supported LTS.
  • Fastify HTTP/WebSocket services.
  • SQLite WAL with explicit migrations.
  • React web client.
  • Maintained terminal UI library.
  • Shared runtime-validated protocol schemas.
  • Standards-based Web Push.
  • Vitest and Playwright.

Suggested packages:

  • coordinator
  • host-agent
  • web
  • terminal
  • cli
  • protocol
  • pi-runtime
  • adapter-sdk
  • adapter-examples
  • test-fixtures

Coordinator

Owns identities, host/project directory, tasks, scheduling, dispatch, attention, presence, push subscriptions, and client synchronization.

Host agent

Owns Pi processes, native session handles, repositories, worktrees, local credentials, command receipts, and an event outbox.

Hosts connect outbound to the coordinator.

Deployment

Standalone runs a coordinator and local host agent; remote hosts may register.

Hub-connected runs the coordinator in Compose with persistent storage; native host agents register with it.

Both use identical protocols and schemas. Schedules execute in standalone mode while its coordinator is awake.

Support direct HTTPS over LAN/VPN/reverse proxy. Supply Traefik-compatible deployment guidance. QR enrollment does not provide network connectivity.

The coordinator needs neither the host home mount nor Docker socket.

5. Data model and authority

Entity Essential fields
Project ID, name, repository identity, profiles, workspace/concurrency defaults
Checkout Project, host, absolute clone path, Git common-directory identity
Workspace Checkout, path, branch/base, managed/discovered provenance, Git state
Session Native handle, host/workspace, profile snapshot, runtime state, linked run
Task Objective, acceptance criteria, project, dependencies, priority, state, policy
Run Task/session, dispatch key, attempt, limits, control revision, outcome
Automation Trigger, filters, task template, grouping/overlap/missed-run policy
Scope Name, mode, projects, pins, and optionally a GitHub source: GitHub connection, owner, repositories, optional board, follow mode, backlog columns, write-back; its tracked issues link to branches
Tracked issue Scope, issue, project, priority, parent and sub-issue count, linked branches, branch and workspace worked on, pull request, board column
Interaction Session, ID/revision, payload, allowed responses, resolution
Attention item Session/task, reason, severity, acknowledgment
Device Identity, credentials, presence, push subscription, revocation
Client herdr/tmux session id (or another client module’s), device, optional host, recorded binding (none, all, scope), shown sessions, last report

A branch (project + branch name) is derived from workspaces, sessions and tracked issues and never stored; a session may be its branch’s chosen primary (model.md).

Coordinator owns task/automation decisions. Host owns process state and filesystem truth. Pi owns native conversation history. Coordinator caches presentation history.

Use stable IDs, versioned events, sequence numbers, and idempotency keys.

Hosts persist important events before sending. Clients reconnect with a cursor; server returns missed events or a snapshot plus subsequent events.

Do not order events solely by timestamps.

6. Runtime behavior

Runtime states:

starting, idle, running, waiting_input, interrupted, failed, stopped.

Connectivity is separate:

connected, reconnecting, unreachable.

Required operations: create, attach, detach, prompt, supported steering, queue follow-up, answer, abort, resume, archive, import inactive session.

All client commands are serialized by the host.

Interaction answers atomically match ID and revision. A second answer returns “Already answered” and the accepted result.

Drafts are device-local and session-keyed.

Unexpected runtime exit preserves the native handle and marks interruption. Resumption must retain identity; failure must never silently create a new session.

Do not automatically replay uncertain side effects after crashes.

Upstream compatibility gate

Before building the full UI:

  1. Inspect current Pi APIs.
  2. Pin a tested version range.
  3. Implement real question/answer, abort, resume, and reconnect tests.
  4. Record supported capabilities.
  5. Expose unsupported capabilities honestly.

Never invent Pi RPC methods.

7. Adapter contract

Resolution precedence:

  1. Project override.
  2. Owner override.
  3. Plugin-provided adapter.
  4. Generic renderer.

Manifest includes ID/version, target extension/version range, protocol version, server entry, optional custom web renderer, and capabilities.

Adapters support tool cards, forms, panels, commands, progress, subagent links, semantic attention, persistent state, and validated actions.

Portable components:

  • Text/markdown/code/diff.
  • Lists/tables.
  • Select/multiselect.
  • Text/multiline input.
  • Confirmation/form.
  • Actions.
  • Progress.
  • Sections/tabs.
  • File/session references.
  • Contract v2: checklist, facts, rows, badge, sections that start closed, and http(s) links.

Contract v2 (adapters.md) adds, without changing version 1: a tool view (the verb, target, counts and detail of a tool call’s one-line row, or hiding it), trackers above the input and a badge on the navigator row, and a dialog’s kind (question, approval or plan). Host and coordinator, and coordinator and client, negotiate it; anything that did not gets the same data in its version 1 shape.

State remains server-authoritative.

Custom web renderers use isolated frames and a restricted message bridge without application credentials. Server adapter code is trusted installed code, not sandboxed code.

Unknown tools show generic arguments/output/status.

Unsupported interaction displays a compatibility error and available alternatives. Never auto-approve or silently drop it.

Ship real compatibility tests for representative structured questions, approval gates, persistent panels, and subagent events. Record precise tested plugin versions.

8. Workspaces

Managed worktrees use:

<repo>/.worktrees/<branch-slug>

Discover external worktrees through machine-readable Git output.

Validate paths, branch names, collisions, repository identity, and common-directory ownership.

Default to one writer per workspace; allow explicit shared use.

Show branch/base, dirty state, active sessions, linked tasks, and setup status.

Setup hooks stream output and surface failure.

A .worktreeinclude file at the repository root (gitignore syntax) lists ignored files, such as .env, to copy into each new managed worktree. Only files that match and that Git already ignores are copied; existing files are kept, and a copy failure removes the new worktree.

Finishing a session never deletes its workspace. A project can opt in to removing worktrees whose pull request has merged (clean, HEAD at the merged head, no running session, for ten minutes); see scopes.md.

Removal checks active sessions, dirty files, and unmerged changes. Destructive overrides are explicit.

No implicit manipulation of unrelated Compose projects.

9. Task and automation semantics

Task states:

Backlog → Ready → In progress → Review → Done

Also support Canceled. Blocked is an additional condition with a reason.

Moving to Ready authorizes dispatch if project automation is enabled.

A completed agent turn does not complete the task. Default successful outcome is Review.

Eligibility

Require satisfied dependencies, available host, capacity, workspace access, valid configuration, and no existing dispatch.

Detect dependency cycles.

Persist dispatch before contacting host. Host persists the dispatch key and reuses the same execution for duplicate requests.

Reconcile uncertain launches before retrying. Never fail over an unreachable run automatically.

Triggers

Manual, one-time timestamp, timezone-aware cron, authenticated webhook, dependency completion.

Persist occurrence IDs to prevent duplicate schedule execution.

Missed-run policies: skip or run once on return.

Overlap policies: skip, queue one pending occurrence, or append to existing tracked work.

Automation modes

  • Fresh task/run.
  • Continue task selected by explicit grouping key.
  • Watch with attention only on relevant changes.

Routine recurring successes stay in automation history rather than flooding the board.

Limits

Separate infrastructure retries, agent continuation, and new attempts after feedback.

Continuation defaults off. When enabled, require objective, maximum continuations, and elapsed-time limit. Enforce supported token/cost limits and disclose unavailable accounting.

Acceptance may require configured checks or human review.

Takeover

Join observes and permits input.

Take over suspends automatic continuations, retries, and successor launches.

Return to automation explicitly restores policy.

Stop aborts current execution.

Takeover increments a control revision checked before automated commands. Detach does not resume automation.

10. Web application design system

These are binding product decisions, not copied upstream layouts.

Responsive behavior

  • Desktop: at least 1200 CSS pixels.
  • Compact/tablet: 768–1199.
  • Mobile: below 768.
  • Verify at 1440×900, 1024×768, 390×844, and 360×740.

Support system light/dark themes with restrained surfaces, clear borders, readable text, and no decorative dashboard charts.

Use text plus icons for status. Never rely on color alone.

Touch targets: at least 44×44 CSS pixels. Respect safe areas and on-screen keyboards.

Touch gestures (phone): gestures are shortcuts for controls that are also on screen, never the only way to do something. Long-press opens an item’s actions (session rows, Board and task cards, your own messages); the item sinks or highlights while held, and no text selection starts. Menus open as native-style action sheets: grouped cards, settings as switches, destructive actions last, a Cancel button, drag down to close. A session row swipes left to reveal More and Archive (Stop while it runs; a long swipe runs the outer one, and Archive offers Undo) and right to reveal Rename (and Clear when it needs input). An attention item swipes right to open its session and left to clear or dismiss it. The Board and Tasks lists swipe sideways between columns, empty ones included, and the tab underline (or a segmented control’s selection) follows the finger. In a session, swipe left from the chat to Changes, PR and Details, and right back to the chat and then to the session list. In the installed iOS app, swiping from the left edge goes back. Tapping the current bottom tab scrolls its list to the top. Haptics confirm a committed swipe or long-press where the device has them.

Use consistent terminology: task, run, session, workspace, host.

Desktop global rail: 64 pixels wide, labeled on expansion.

Destinations:

  • Sessions.
  • Board (branches).
  • Attention.
  • Tasks.
  • Queue.
  • Automations.
  • Settings.

Mobile bottom navigation: Sessions, Board, Attention, More by default; More contains Tasks, Queue, Automations, and Settings. The order of the destinations and which of them the bottom bar shows (one to four, beside More) are set per device, in Settings > This device > Navigation or with Edit on the More page: drag a page by its handle (or move it with the arrow keys); a page dropped into a full bar pushes the bar’s last one under More. The desktop rail lists every destination in the same order. When Attention is under More, More shows its count.

Hide bottom navigation while composing with the keyboard; preserve access through Back/header controls.

Persist filters, selected project, pane sizes, and last session per device.

Canonical routes:

  • /code/:sessionId
  • /board
  • /tasks
  • /tasks/:taskId
  • /attention
  • /queue
  • /automations/:automationId

Interactions can be addressed with a session-route query parameter. Deep links survive authentication and reconnect.

11. Desktop coding view

Layout

Three main panes after the global rail:

  1. Navigator: 264 pixels default, resizable 220–360.
  2. Conversation: flexible, minimum 420.
  3. Inspector: 380 default, resizable 320–600; collapsible.

At compact widths, inspector overlays or replaces conversation temporarily; do not compress all three panes into unusable columns.

Each row is one session, including separate sessions on the same branch or on different hosts (see model.md). Rows link to their own conversations; branches without sessions are on the Board, not in this list.

Desktop and phone share the same session list presentation (see Session list): status icon, title, compact activity time, identity, state, applicable annotations and badges. Questions and failures appear by default; Show session details adds run location and ordinary reply previews.

View options choose one Group by dimension: None, Project, Host or Status. None has no headings; the others use noncollapsible headings with no nested groups. Project headings offer New session; host headings show connectivity and offer Only this as a run-location filter shortcut. Status headings use each session’s attention state; the catch-all is Other sessions. All rows share one left edge.

Sort by is independent of grouping: Recent activity, Newest, Name or Status, with Needs input first unless turned off. Activity is the individual session’s activity. Subagents are hidden unless Show subagents is on; then each is a peer row labeled Subagent. Rows show title, textual status, last activity and attention indicator. Show session details includes reported terminal information and, when not duplicated by a Host heading, host information. A row on an issue’s branch shows #N; in a tracker’s view, a session there only while live shows “No issue”. The open session remains visible when excluded by scope, run location or status, marked with the reason; search and the subagent setting still apply. Retained rows do not increase counts, and the empty state appears above them when there are no matches.

Both surfaces default to None / Recent activity / Active / details off, while honoring independently saved browser preferences. The header offers New session, a native Scope picker with Edit/New/reset items, search, Active / Needs input / Current / Archived with session counts (Archived shows none; it loads pages from the coordinator and searches there), and View options. Desktop keeps a directly focusable search field (including /); phone uses tap-to-open search and touch gestures. The command palette stays on Cmd/Ctrl+K. Controls adapt to the navigator’s width without duplicating focusable elements.

Filter by run location is available independently of grouping, with Any location, non-revoked hosts and currently reported terminals on those hosts. A client filter matches sessions running there now, not stopped sessions’ remembered locations. A saved client filter with no live matches remains visible and clearable. When set, Run location appears with its own clear action; it combines with scope, search and status filters. Once two filters are set, a single Clear resets them all. Counts reflect matching sessions, not branches; Open latest session needing input targets a matching session. The scope’s description is its tooltip; what it contains and where it is shown are in its Edit dialog. Until there is a host and a project, the header holds only the title and New session (disabled, its tooltip says why), and Pi history suggestions are one line under the empty state (“7 repositories found in your Pi history”, Review) linking to Settings > Projects, which lists them in full.

Empty state: “Add a project” and “Connect a host,” based on what is missing. With a filter that leaves nothing, the empty state names the filter and offers to clear it; a terminal filter lists only Pi running there now.

New session offers Write a prompt and From an issue. Write a prompt keeps the optional prompt, project, workspace (main checkout by default; New worktree suggests a branch), host, Pi profile and advanced settings. From an issue shows a GitHub repository’s open issues when one repo is selected under All work or a manual project scope. In a source scope, the repository choice only narrows the tracked list. A single-repository scope sets the destination without another selector. Selecting an issue opens its read-only preview; Start session creates or reuses the branch/worktree and opens a session without sending issue text. An optional instruction makes the action Start and send. An existing primary opens instead of creating a duplicate. The selected scope’s projects come first. In a GitHub scope, a session that will not stay says so. With a host run-location filter, the host defaults to it when the project has a checkout there and it is online; when the session will run elsewhere, or the filter is a client, the dialog says it will not be listed until the run-location filter is cleared. Show the resulting branch/path above Start session; Cmd/Ctrl+Enter starts. When the chosen workspace already has a session, the primary action is Open session: no new session starts, and a typed prompt waits in that session’s composer. “Start another session in this branch” is an explicit checkbox. Do not require a task.

Conversation header

One row: the session title, then runtime status and automation-control state, then branch, host, issue and project as the width allows (what does not fit is in the inspector’s Details and in Session info), then the actions.

Actions:

  • Open linked task.
  • Take over / Return to automation.
  • Stop, when running: in the session menu. The composer’s round button is the primary Stop.
  • Session menu: rename, archive, primary session of this branch, new session in this branch, pin to a scope, link to issue / unlink from #N (a worktree branch and a not-started issue), native-session information.

Attach is navigation to this view, not an action that creates a process.

Transcript

The transcript reads as a document: your messages, Pi’s replies, and one line per tool call.

Your message is a right-aligned card with its time and actions under it; a long one folds to eight lines behind Show full message. A reply is plain prose with no header.

A tool call is one line: a verb and what it acted on (Read src/a.ts, Edited src/b.ts +12 −3, Ran pnpm test), the tool’s own name when PiFi has no verb for it, and failed when it failed. Opening the line shows the detail for its kind (a command and its output, an edit as a diff, a written or read file, a search and its results, or any other tool’s arguments and output) with the tool’s name, status and elapsed time. An adapter’s tool card shows under its line, open. The host and the tool’s adapter can describe the line (contract v2 tool views): an edit shows its real diff with line numbers, a failed command its exit code, and a plugin’s tool its own verb, counts and detail; an adapter can also hide a line that something else on screen stands for.

A finished turn folds its tool calls, thinking and interim text into one line (Worked for 2m 14s · edited 2 files · ran 3 commands · 1 failed); the final reply stays outside the fold. While Pi runs, a Working… line with the elapsed time ends the transcript. Settings > This device > Tool activity chooses Detailed (nothing folds), Normal, or Summary (a running turn folds too).

Maintain scroll position when the user reads history. Show “Jump to latest” with unseen-event count; do not pull the viewport downward.

A pending question, approval or plan answer is not in the transcript: it is docked above the composer. A plan awaiting approval keeps its text in the transcript and its answers in the dock. Once answered, the transcript shows one line where it was asked: the question and the answer. When the dialog’s adapter says it is a question and the host knows its tool call, that call’s line is not drawn; an approval keeps the line of the call it approves. At full size the dock shows the whole plan, with its outline and answers, in place of the transcript.

Subagents appear as linked rows/cards with status. Opening one uses the same session interface where supported.

Composer

One card with one row of controls under the draft: a + menu (images, commands, and on a phone the camera and dictation), dictation on desktop, the model and effort pills where the host supports them, a context ring, and one round button.

The round button sends when Pi is idle. While Pi works it is Stop when the draft is empty, and Send with a small Stop beside it when there is a draft. Settings > This device > While Pi is working chooses what Send does then: Queue (the default: Pi reads the message when the turn ends) or Steer (delivered between tool calls, only when the runtime supports it). Cmd/Ctrl+Enter, or the + menu, does the other. Unsupported steering is never offered.

Desktop Enter sends; Shift+Enter adds a newline. Allow configuration.

The context ring shows how full the context is and opens the context tokens, the session’s tokens and cost, the subscription limits and Compact now.

Above the card, top to bottom: the pending question (Needs input) with its form or answers, one at a time with a pager when several wait; a tracker row with a Changes pill (the count of uncommitted files when there are any; it opens Changes) the adapters’ trackers (a title with its count, current step and a status mark; each opens its detail), the Status tracker for statuses no adapter presents, and the adapters’ pills (each opens its panel); and the queued messages, steering first, with Edit queue to take them back into the draft where the host supports it. With a question in the dock, the number keys 1 to 9 pick an option when focus is not in a text field; an approval never takes keys. A suggested next message from Pi is a chip in the card that fills an empty draft. On a phone, while a question waits and the draft is empty, the card, tracker row and footer give way to one Message Pi row (with Stop while Pi runs); tapping it brings the composer back. A full-size dock does the same on every screen.

Show takeover state clearly.

Inspector

Tabs:

  • Changes: the diff against the base branch, with the branch’s commits; pick one commit or only uncommitted work to narrow it.
  • Files.
  • Details.
  • PR, when the branch has one.
  • One tab per adapter panel placed in the inspector.

Changes: changed-file list, added/deleted counts, selected diff, refresh state, review comments.

Files: read-only browsing in v1.

Details: objective, criteria, dependencies, limits, run history, takeover controls; then the extensions’ own panels, and an Extensions line that opens the adapter compatibility diagnostics (loaded when opened; ?tab=extensions opens it).

Review comments can be collected and sent as one follow-up. Do not silently send each comment immediately.

12. Mobile coding view

Layout

One primary surface at a time. No miniature desktop sidebars.

The chat fills the screen. Header, one row:

  • Back to session list.
  • Session title (tap for the session’s facts).
  • Status.
  • A button with the changed-file count, which opens the panel.
  • Overflow menu, which also opens the Terminal.

The panel covers the chat and holds Changes, PR (when the branch has one) and Details behind one switcher. Its header has Back to chat, marked when a question is waiting. Opening the panel or the Terminal is a history entry, so Back returns to the chat; a ?tab= link opens the panel directly.

Chat

Same authoritative transcript and interactions as desktop.

A tool line opens its detail in a sheet, with the full output.

Composer remains above the keyboard, grows to approximately one-third of viewport height, then scrolls internally.

Mobile Return inserts a newline; use an explicit Send button.

Photos, the camera, dictation and commands are in the + menu.

A pending question is docked above the composer with visible submit and cancel. The dock has three sizes: folded to its title, half (it scrolls inside the dock past 45% of the screen height) and full, where it replaces the transcript. A plan or a long document opens full, as does any dialog whose adapter asks (display: "full"); others open half. Its title folds and unfolds it, Full screen switches to and from full, and on a phone dragging its header moves between sizes. It folds to its title while you type a message. The submit row stays pinned while the question scrolls. A question longer than 160 characters shows three lines with Show more, and in the half dock an option’s description shows two lines until it is chosen. A form with several questions shows one at a time, with numbered step chips. Multi-select must not require entering comma-separated numbers when an adapter supplies structured options.

Changes

Changed-file list first. Selecting a file opens a full-screen unified diff.

Provide previous/next file, line-comment selection, and collected feedback.

Use unified diff on mobile. Horizontal scrolling is confined to code blocks, not the page.

“Request changes” sends accumulated feedback and leaves the task in Review until a new attempt is requested.

“Accept task” is explicit and does not imply merge or push.

Details

Task criteria, host/workspace, subagents, limits, automation state, extension panels, and an Extensions line that opens the adapter diagnostics.

Take over, Return to automation, and Stop are separate labeled actions.

When a plugin panel is not mobile-compatible, show its fallback and exact limitation; never a blank panel.

Session list

The same grouping, sorting, rows, controls and filters as the desktop navigator adapt to the available width; fresh defaults are None / Recent activity / Active / details off. Saved phone and desktop preferences remain independent. Search opens on tap on the phone; desktop keeps a directly focusable field. Run location and Clear appear only when applicable.

Each session has its own row, with a status icon, up to two lines of title, project, branch, issue and state as applicable, and a compact activity time. Optional headings use only the selected grouping; there are no day sections or nested rows. Scope exceptions and adapter badges appear only when present; pending questions and failures show their preview by default. View options → Show session details also shows the run location and ordinary reply previews.

Start a new session from mobile using the same creation fields as desktop in a full-height sheet.

12a. Board (branches)

The Board offers Columns and Issue list. Both inherit the selected scope and support search and a repository refinement; a single-repository scope hides the redundant repository selector. Columns show the branch and its primary session, project, host, linked issue and pull request where available. Issue list uses the same inventory as New session, with Not started and either All open issues (live repository) or All tracked issues (scope/overview). Repository and issue number are the default order; a tracked source can supply an optional priority sort. The list names its coverage and distinguishes cached or failed reads from an empty list. Repository pages load on demand, and search only checks loaded issues. Selecting an issue title shows the description and original link without provisioning; open a primary or start a session explicitly. A linked branch with no worktree is not an unstarted issue. On return from a session, the list keeps its filters and position.

Columns:

  • Stage (default): Not started (tracked issues with no branch yet), Working, In review (an open pull request), Merged. Stages are derived facts and are not changed by dragging. Starting work is an explicit action.
  • GitHub board (a GitHub scope whose issues have a Projects board): one column per board column (a backlog column only when it has cards), then No status and Not on the board. Moving a card sets its board column on GitHub, only with the scope’s write-back on.

Invalid drops show the reason. Every move is also in the card’s Move to… menu (on the phone, the card’s ⋯ actions or a long-press); mobile shows one column at a time as tabs, and a sideways swipe changes column. The phone header is the title, search and a View sheet (scope, columns, worktrees without a session); a chosen scope also shows as a removable chip.

13. Desktop task board

Layout

Header: board title, project selector, search, filters, New task.

Secondary toolbar: automation enabled/paused status, queue count, sort, completed-task visibility.

Columns:

Backlog, Ready, In progress, Review, Done.

Each column is 288–360 pixels wide with a sticky title and count. Horizontal scrolling is allowed inside the board.

Canceled tasks appear through a filter, not a permanent default column.

A scope filters tasks by its projects (a GitHub scope: its repositories), or by pinned sessions; the scope selector says which.

Task cards

Show:

  • Title, at most two lines.
  • Project when viewing multiple projects.
  • Priority.
  • Current execution/blocked reason.
  • Host and branch when assigned.
  • Dependency count.
  • Attention indicator.
  • Last meaningful activity.

Do not show raw tokens or technical IDs by default.

Click opens a task drawer approximately 520 pixels wide. A separate “Open session” action opens coding view.

Task drawer

Sections:

  • Objective and acceptance criteria.
  • State and blocked explanation.
  • Current run and Open session.
  • Dependencies.
  • Host/profile/workspace policy.
  • Limits and completion policy.
  • Run history and activity.

Primary action depends on state:

  • Backlog: Make ready.
  • Ready: Run now, subject to eligibility.
  • In progress: Open session.
  • Review: Review changes.
  • Done: Reopen.

Drag semantics

Backlog to Ready authorizes dispatch.

Ready to Backlog removes eligibility if dispatch has not started.

Dragging running work backward opens a choice to pause automation or stop execution; never silently kills it.

Moving to Done requires acceptance confirmation when criteria/checks are unresolved.

Reject invalid transitions with a concrete reason. Provide equivalent menus and keyboard controls; dragging is never required.

14. Mobile task board

Default to one selected status column, with horizontally scrollable status tabs and counts.

Cards occupy full available width. Vertical scrolling remains natural.

Offer a grouped List toggle for users who want several statuses together.

Do not require precision drag-and-drop on mobile.

Card tap opens a full-screen task detail with:

  • Back navigation preserving board position.
  • Objective and criteria.
  • Status and blocked reason.
  • Open session.
  • Move task action sheet.
  • Dependencies and execution details.
  • Review/accept controls.

New task uses a compact form:

  1. Title and objective.
  2. Project.
  3. Save to Backlog or Make ready.

Advanced options inherit project defaults and expand on demand.

Making ready must preview whether work starts automatically.

Filters open a sheet; active filters appear as removable chips.

A board notification links directly to task detail or its pending interaction, not the board root.

15. Supporting views

Attention

Grouped by Needs input, Failed, Ready for review.

Each item shows project/task/session, reason, age, and direct action. A pending question is answered in place and looks as it does in a session’s dock: its title once, then the form (several questions one at a time). Number keys do not answer here, because several questions share the page.

Resolving a question updates the same runtime interaction. Acknowledging a notification does not resolve the underlying task.

Not filtered by the selected scope; says so while one is selected.

Queue

Running and queued sections.

Each queued row explains its wait: dependency, host offline, project limit, workspace occupied, scheduled time, or invalid configuration.

Allow priority changes and pause of future dispatch without terminating active runs.

Not filtered by the selected scope; says so while one is selected.

Automations

List with enabled state, trigger summary, next occurrence, last outcome, and failure count.

Editor fields:

  • Trigger.
  • Filters.
  • Task template.
  • Project/profile/host.
  • Fresh versus continue-existing.
  • Grouping.
  • Overlap.
  • Missed-run policy.
  • Limits and review policy.

Include a human-readable summary and “Preview resulting task.”

Provide history separate from development-board tasks.

Settings

Hosts, devices, projects, Pi profiles, adapters, notifications, backups, diagnostics.

Host detail shows capabilities, connectivity, checkout location, checkout mappings, and version compatibility. The connected Git provider (GitHub App or Personal Access Token connections) owns the active repository list, PR/issue/board APIs, and linked-branch creation, even with no hosts online. A host’s checkout location defaults to ~/Projects; saving it does not scan. Preparing a checkout previews reuse or a clone for confirmation. Clearing the location disables new managed clones without removing existing checkouts.

16. Notifications and presence

Attention state is authoritative; OS notifications are projections. See notifications.md.

One stable notification identity per session, updated in place and cleared when nothing is waiting on the owner (a question, a failure, a review, a finished turn, an expiring prompt cache). The most urgent wait is the one shown.

Content: project and session, the kind of wait, the question or the first line of the last reply, exact deep link, and a count of waiting sessions as the app icon badge.

Routing:

  1. Computers always receive.
  2. Phones and tablets receive only once no computer has seen input for the away time (a setting, default 5 minutes). Computer input is the web app’s own input and, on macOS, the host agent’s system-wide input idle time.
  3. Nothing new is sent for a session someone is watching.

Use expiring foreground/recent-interaction leases. Socket connection alone is not presence.

A held notification is delivered when presence changes, with one timer for the moment it would change by the clock alone.

Use notification tags, topics and clear/update where supported. Document platform limitations rather than promising guaranteed cross-device clearing.

Quiet hours and previews are the operating system’s (Focus, notification previews), not PiFi’s. Support the away time, permission status, and a test notification.

17. Security, pairing, and reliability

Single sign-on (required off localhost) or passkeys for browsers; terminals approved from a signed-in browser. Separate revocable device credentials. Separate host enrollment.

Provider credentials stay on execution hosts.

Authenticate connections, validate messages, restrict origins, protect browser mutations, and avoid shell interpolation of task content.

Custom server adapters are trusted code. Web renderers receive restricted capabilities.

Process privilege equals host-agent OS-user privilege; Docker coordinator deployment does not sandbox execution.

Persist dispatch receipts and reconcile uncertain launches.

On coordinator restart, hosts continue execution and replay events.

On host loss, show unreachable; do not fabricate completion or start a replacement elsewhere.

Use structured redacted logs, health endpoints, migrations, retention settings, and consistent backup/restore.

18. UI state requirements

Every primary view must implement:

  • Initial loading.
  • Empty state with next action.
  • Reconnecting with last-known-data indication.
  • Host unavailable.
  • Permission/interaction pending.
  • Unsupported capability.
  • Recoverable error with retry.
  • Irrecoverable error with diagnostics.
  • Successful mutation feedback.

Do not disable Send without explaining why.

Do not discard drafts on navigation, transient errors, or reconnect.

Do not use optimistic success for dispatch, destructive workspace actions, or approval resolution before acknowledgment.

Preserve browser Back behavior and accessible focus after drawers/sheets close.

19. Verification

Automated tests must cover:

  • Real Pi question/answer, resume, abort.
  • Simultaneous terminal/web access to one native session.
  • Interaction-answer races.
  • Dispatch deduplication after lost acknowledgment.
  • Coordinator restart during execution.
  • Host/process interruption.
  • Repo-local worktrees and external discovery.
  • Scheduler timezones, overlap, missed runs, dependencies.
  • Takeover racing an automatic continuation.
  • Adapter failure without approval bypass.
  • Enrollment expiration, reuse, and revocation.

Browser tests cover all four primary views at specified sizes:

  • Desktop coding.
  • Mobile coding.
  • Desktop board.
  • Mobile board.

Verify keyboard-only use, no accidental full-page horizontal overflow, mobile keyboard behavior, draft persistence, deep links, and notification routing.

Use real mobile/browser verification for OS notification behavior. If unavailable, mark that acceptance item unverified rather than substituting a simulated pass.

20. Delivery and implementation order

Implement:

  1. Protocol, persistence, host connection.
  2. Real Pi runtime and capability contract.
  3. Shared-session web/terminal vertical slice.
  4. Workspaces and worktrees.
  5. Adapters and representative plugin compatibility.
  6. Tasks, dispatch, takeover, review.
  7. Scheduling, webhooks, dependencies, continuation.
  8. Complete four primary UI views.
  9. Attention, presence, push, pairing.
  10. Compose, operations, backup/restore, acceptance verification.

Deliver runnable code, migrations, deployment files, adapter SDK/examples, tests, documentation, and an acceptance report.

Do not begin with disconnected polished mock screens. Do not label a feature complete because its button exists.

If upstream APIs prevent a requirement, identify the exact limitation and supported fallback. Never conceal a new conversation, lost approval, duplicate execution, or unsupported plugin interaction behind apparent success.