This document turns the PRD into the current module boundaries, workflow terms, and implementation status for the local-first MVP.
routes- HTTP and WebSocket transport only
- validate inputs with shared contract schemas
- delegate all state changes to focused services
routes/tickets- split by concern into read/workspace, execution, lifecycle, and review registration modules
lib/event-hub- fan-out of backend events to WebSocket subscribers
lib/docker-runtime- Docker health checks, managed session-container lifecycle, and runtime image bootstrapping for Docker-only execution
lib/sqlite-store- shared SQLite bootstrap, schema setup, transaction helpers, and record mappers
- focused repositories for projects, drafts, tickets, sessions, structured events, and review artifacts
- preserves draft and ticket Markdown inside SQLite records instead of creating standalone ticket files
- workflow services for draft confirmation/refinement, ticket execution lifecycle, queue claiming, and project deletion
lib/execution-runtime- thin runtime facade over prompt building, adapter command assembly, validation runs, Docker session coordination, event publishing, and process/session wait helpers
packages/contracts- source of truth for API payloads and event envelopes
- Zod first, inferred types second
packages/db- reference SQLite schema only
- runtime persistence currently lives in the backend sqlite-store
- no business logic
Implemented now:
- local Fastify + React app with shared contracts, SQLite persistence, and websocket-driven board/session updates
- board workflow with
Draft,Ready,In progress,In review, andDone - compact project rail with per-project color tiles, neutral utility tiles, unread notification badges, and selected-project color accents across board actions
- project options for project color, agent CLI selection, Codex MCP server toggles, automatic agent review defaults, review defaults, preview commands, model overrides, and pre/post-worktree commands
- draft workflow with persisted Markdown drafts plus
Refine,Questions,Revert Refine, andCreate Ready - artifact-backed Markdown image references for pasted screenshots, preserved by stable
artifact_scope_idvalues across save, reload, refine, revert, and draft-to-ready promotion - execution workflow that starts a
readyticket into a persisted session, prepares a git worktree, supports immediate execution or a planning-first start, launches the selected Codex or Claude Code CLI inside Docker-backed PTY sessions, and keeps follow-up attempts on the same logical session/worktree - adapter-managed execution modes with planning-first runs using read-only behavior and implementation runs using workspace-write behavior
- review workflow that runs configured validation commands, generates a local review package and diff artifact, supports request-changes and resume, can launch automatic agent review reruns or one-off manual agent reviews, keeps
Create pull requestandDirect mergedisabled while AI review is still running, exposes card-level diff/terminal/preview/activity actions plus an inspector activity summary row that opensOverviewandTimelinetabs, supports copyable implementation and review prompts from the timeline, supports GitHub pull request creation and reconciliation, and merges directly fromreviewinto the target branch with cleanup - GitHub pull request creation can generate the PR body from the full review timeline context with the configured agent, then fall back to the local template if generation fails
- ticket lifecycle controls for archive/restore plus interrupted-session restart from scratch
- startup recovery preserves still-live managed Docker containers during cleanup, marks dead active sessions
interruptedfor manual resume on the same worktree, and marks stale agent review runs failed so they can be restarted cleanly
Not yet implemented:
- automatic UI reattachment to an already-running execution after an application restart
- richer validation configuration and review-time override handling beyond the current per-repository profiles
- remote branch cleanup and broader GitHub workflow automation beyond the current create/track/reconcile flow
- Board columns and ticket states use
Draft/draft,Ready/ready,In progress/in_progress,In review/review, andDone/done. - The draft-to-ready flow is "edit draft ->
RefineorQuestions-> optionalRevert Refine->Create Ready". - Execution sessions use
queued,running,paused_checkpoint,paused_user_control,awaiting_input,interrupted,failed, andcompleted. - The review flow is
ready -> in_progress -> review -> done, with request changes or resume moving work back intoin_progresson the same logical session/worktree. - Review tickets default to either
Direct mergeorCreate pull requestfrom the project setting; once a PR is linked, the review card switches into PR tracking instead of offering duplicate paths. - Projects can opt into automatic agent review reruns with a per-ticket run limit, and manual
Start agent reviewremains available when review work needs another pass. Create pull requestandDirect mergestay disabled while an AI review run is active for the ticket.- The compact left rail keeps inbox and create-project utility tiles gray by default; project tiles stay color-coded and the inbox tile only shifts into its attention color when unread actionable work exists.
- Tickets expose card-level
Diff,Terminal,Preview, andActivityactions. The inspector keeps a single clickable activity summary row that opens an activity modal withOverviewandTimelinetabs. Diff,Terminal, andPreviewrequire a prepared worktree, whileActivitystays available whenever a ticket still has a session, even after worktree cleanup.- The ticket-card
Terminalaction opens a plain ghostty-web shell at the worktree root, without take-over or restore-agent controls on that modal surface, and it stays unavailable only while a live agent process still owns the worktree. - The
Previewaction starts the ticket dev server when needed, opens a browser tab, and flips to a stop control while that dev server stays running. - The activity timeline shows newest items first and lets operators copy raw implementation prompts, AI review prompts, and other prompt-like Markdown entries straight from the UI.
- Docker-backed prompts and managed artifact paths are translated to in-container mount paths such as
/workspace/...and/walleyboard-home/...before they are passed to the agent runtime. - Completed tickets can be archived out of the active board and restored later.
- Interrupted in-progress work can either resume on the preserved worktree or restart from scratch after cleanup.
- Add richer validation configuration and override handling.
- Broaden GitHub automation beyond the current gh-backed create/track/reconcile flow.
- Decide whether interrupted sessions should auto-resume or stay manual after restart.
npm run sizecheck- enforces a 1500-line cap on non-test production source files in
apps/**/srcandpackages/**/src
- enforces a 1500-line cap on non-test production source files in
npm run lint- runs the size gate first and then workspace Biome checks
npm run typecheck- runs TypeScript checks across all workspaces
npm run test- runs the backend and web
node:testsuites from the repo root
- runs the backend and web
Representative current route surface.
GET /healthGET /projectsGET /projects/:projectIdGET /projects/:projectId/archived-ticketsGET /projects/:projectId/repository-branchesGET /projects/:projectId/repositoriesGET /projects/:projectId/ticketsGET /projects/:projectId/draftsGET /projects/:projectId/draft-artifacts/:artifactScopeId/:filenameGET /drafts/:draftId/eventsGET /tickets/:ticketIdGET /tickets/:ticketId/review-packageGET /tickets/:ticketId/review-runGET /tickets/:ticketId/review-runsGET /tickets/:ticketId/eventsGET /tickets/:ticketId/workspace/diffGET /tickets/:ticketId/workspace/previewGET /tickets/:ticketId/workspace/terminal(WebSocket)GET /sessions/:sessionIdGET /sessions/:sessionId/attemptsGET /sessions/:sessionId/logsPOST /projectsPATCH /projects/:projectIdPOST /projects/:projectId/updatePOST /projects/:projectId/deletePOST /draftsPOST /projects/:projectId/draft-artifactsPATCH /drafts/:draftIdPOST /drafts/:draftId/deletePOST /drafts/:draftId/refinePOST /drafts/:draftId/refine/revertPOST /drafts/:draftId/questionsPOST /drafts/:draftId/confirmPOST /tickets/:ticketId/startPOST /tickets/:ticketId/stopPOST /tickets/:ticketId/resumePOST /tickets/:ticketId/restartPOST /tickets/:ticketId/archivePOST /tickets/:ticketId/restorePOST /tickets/:ticketId/deletePOST /tickets/:ticketId/request-changesPOST /tickets/:ticketId/start-agent-reviewPOST /tickets/:ticketId/create-prPOST /tickets/:ticketId/mergePOST /tickets/:ticketId/reconcilePOST /tickets/:ticketId/workspace/previewPOST /tickets/:ticketId/workspace/preview/stopPOST /sessions/:sessionId/terminal/takeoverPOST /sessions/:sessionId/terminal/restore-agentPOST /sessions/:sessionId/checkpoint-responsePOST /sessions/:sessionId/inputGET /ws
draft.updateddraft.deleteddraft.readyticket.updatedticket.workspace.updatedticket.archivedticket.deletedsession.updatedsession.outputsession.checkpoint_requestedsession.input_requestedsession.summary_generatedreview_package.generatedvalidation.updatedpull_request.updatedstructured_event.createdcommand.rejected
- Project setup is real and persisted in SQLite, and repository validation commands can be configured during project setup.
- Projects use Docker as the only execution backend, plus project-level color, agent adapter, Codex MCP toggle, automatic review, review-default, preview-command, pre-worktree, post-worktree, and model-override settings.
- Minimum ticket-execution setup is Docker Desktop or Docker Engine installed, a running daemon, and
docker versionsucceeding in the backend shell environment. - Codex runs mount the host
~/.codexdirectory into Docker, and Claude Code runs mount the host~/.claudedirectory into Docker. - Draft and ticket Markdown are persisted in SQLite-backed records, while filesystem writes are reserved for artifacts, logs, summaries, and worktrees.
- Production source files are kept under a hard 1500-line cap through
scripts/check-production-file-sizes.mjs, and the root lint workflow runs that gate before Biome. - Board-visible work now uses the
Draft,Ready,In progress,In review, andDoneflow, with websocket updates keeping drafts, tickets, sessions, and review packages current in the UI. - The draft workflow is real and persisted: edit Markdown drafts, run
RefineorQuestions, optionallyRevert Refine, thenCreate Readyto promote the draft into areadyticket. - Pasted screenshots become artifact-backed Markdown image references stored under a stable
artifact_scope_id, so they survive save, reload, refine, revert, and ready-ticket promotion. - Starting a
readyticket creates a persisted session and first attempt, prepares a git worktree and working branch, and launches either immediate execution or a planning-first run. - Planning-first execution pauses in
paused_checkpoint/ awaiting-feedback mode, and approval or requested plan changes resume the same logical session on the prepared worktree. - Execution runs through the configured Docker-backed agent CLI with PTY-backed logs, live session input forwarding, explicit stop/resume, requested-changes retries, and a separate plain ghostty-web worktree terminal surfaced from the ticket card actions.
- Successful execution runs validation before review handoff, generates a local review package and persisted diff artifact, can launch automatic agent review reruns or one-off manual agent reviews, surfaces review-ready and waiting action cards, and moves the ticket to
review. - The session workspace UI now uses ticket-card action icons for diff, terminal, preview, and full activity. The inspector keeps only a single activity summary row that opens an activity modal with
OverviewandTimelinetabs, and activity remains reachable even after merge cleanup clears worktree state. - The activity timeline renders newest entries first and supports copying raw implementation prompts, AI review prompts, and similar Markdown prompt content directly from the timeline cards.
- The compact project rail keeps project tiles color-coded, leaves utility tiles gray by default, and surfaces actionable-notification counts plus unread emphasis without turning read-only inbox states into fresh alerts.
- From
review, local direct merge to the target branch is implemented, including worktree and local-branch cleanup plus automatic merge-conflict fallback that moves work back toin_progresswhen recovery cannot finish the merge safely. - GitHub pull request creation, linked PR tracking, and scheduled/manual reconciliation are implemented through
gh, including merge completion and changes-requested follow-up handling. PR creation now asks the configured agent to draft the PR body from ticket details, patch context, session summaries, review runs, and ticket events before falling back to the local template. - Completed tickets can be archived and later restored into the active board, and interrupted sessions can be restarted from scratch after tearing down the preserved workspace.
- Ticket deletion stops active work when needed, removes persisted ticket/session metadata, and deletes walleyboard-owned local artifacts such as worktrees, local branches, summaries, review outputs, and validation directories.
- Backend startup keeps still-live managed Docker containers out of cleanup, marks dead active sessions and attempts
interrupted, preserves the existing worktree and branch for manual resume, and marks stale running agent reviews failed so they can be restarted cleanly. - Docker-backed prompts and persisted artifacts are normalized to container-visible paths before they are handed to agent runs, so review prompts and related artifacts do not leak host absolute paths.