You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adopt Symphony's poll-and-dispatch daemon. A long-running shipcode process polls GitHub Issues filtered by label (`shipcode-ready` by default), sorts candidates, and dispatches pipelines until concurrency caps are hit. Lets users feed shipcode work via issue triage instead of clicking Run for each issue. Foundation for headless / EC2 deployment (#60).
Implementation Checklist
New `apps/desktop/src/main/daemon.ts` (or split into `apps/cli`) with a poll loop
Loop every `pollIntervalMs` calls `gh issue list --label --state open --json number,title,body,state,labels,createdAt`
Candidates filtered by: not in `running`, not in `claimed`, not terminal, blocker rule passes
Candidates sorted by priority asc (label-derived or null last), createdAt oldest, number asc
Dispatch loop reserves slots until `max_concurrent_agents` (and per-state cap when present)
Problem Statement
Shipcode is GUI-only today. Each pipeline starts when the user clicks Run on a kanban card. There is no way to leave shipcode running unattended and have it consume new work as it appears. This blocks autonomous batch operation and overnight runs.
Goals
Daemon mode entry point (CLI or settings toggle).
Polls GitHub Issues with configurable label every `pollIntervalMs` (default 30000).
Multi-repo dispatch in one tick (single-repo for v1).
Replacing the desktop GUI — daemon coexists, GUI uses the same scheduler.
User Stories
As a solo founder running shipcode overnight, I want to label issues `shipcode-ready` and have shipcode consume them under a concurrency cap, so my queue progresses without my supervision. Acceptance:
Adding the label to an open issue causes shipcode to start a pipeline within `pollIntervalMs`.
With cap 2 and 5 labeled issues, only 2 pipelines run; remaining 3 dispatch as slots free.
Closing an issue removes it from candidate set.
Adding the blocked-by relationship to a non-terminal blocker prevents dispatch until blocker resolves.
Functional Requirements
New `apps/desktop/src/main/daemon.ts` (or split into `apps/cli`) with a poll loop.
Loop every `pollIntervalMs` calls `gh issue list --label --state open --json number,title,body,state,labels,createdAt`.
Candidates filtered by: not in `running`, not in `claimed`, not terminal, blocker rule passes.
Candidates sorted by priority asc (label-derived or null last), createdAt oldest, number asc.
Dispatch loop reserves slots until `max_concurrent_agents` (and per-state cap when present).
CLI flag or settings toggle starts the daemon; without it, current GUI-driven mode behaves as today.
tests: new `apps/desktop/src/main/daemon.test.ts` (or `packages/pipeline/src/daemon.test.ts`) covering poll, dispatch, sort, blocker rule, cap, API failure.
manual: start daemon against a test repo with 3 labeled issues and cap 2; verify dispatch behavior end-to-end.
Risks & Open Questions
Label name collision with team conventions — ensure ready label is configurable.
Priority extraction: GitHub has no first-class priority field — derive from labels (`p1`/`p2`/`p3`) or keep null.
Daemon mode under Electron app lifecycle vs standalone Node process — pick one for v1; standalone Node is closer to Symphony's model and unlocks Run ShipCode on EC2 #60.
PRD: daemon-mode-label-dispatch
Executive Summary
Adopt Symphony's poll-and-dispatch daemon. A long-running shipcode process polls GitHub Issues filtered by label (`shipcode-ready` by default), sorts candidates, and dispatches pipelines until concurrency caps are hit. Lets users feed shipcode work via issue triage instead of clicking Run for each issue. Foundation for headless / EC2 deployment (#60).
Implementation Checklist
Problem Statement
Shipcode is GUI-only today. Each pipeline starts when the user clicks Run on a kanban card. There is no way to leave shipcode running unattended and have it consume new work as it appears. This blocks autonomous batch operation and overnight runs.
Goals
Non-Goals
User Stories
Acceptance:
Functional Requirements
Non-Functional Requirements
Success Criteria
Out of Scope
Dependencies
Verification Plan
Risks & Open Questions