Active priorities live in CLAUDE.md; the active build-out plan is CLOUD_PROVIDERS.md.
Cloud-only refactor (June 2026): Talyn is now a GitHub PR-management app that delegates work to cloud coding agents. The bundled daemon, local/remote environments, in-process agents, permission gates, and continuous build are gone. The phased history below (Phases 1–20) describes the app that was — kept for the record, not a TODO list. Current work is tracked in the Priority Queue / Backlog / Known Gaps sections only.
Instructions: Update this list as work progresses. Mark items completed with
[x]. Add new items as discovered.
- Cloud provider abstraction: remaining follow-ups (see
CLOUD_PROVIDERS.md). The seam is done. Talyn Fleet is live. PostHog Code is retired (step 1 done 2026-11-15). Codex Cloud is deferred (no server-to-server API), and Claude Code was removed in9c5689f37c.- Step 2: delete the PostHog Code provider. Step 1 hides it for everyone with the
posthog-code-retiredflag (fallback ON). Existing connections still run. Before the delete, move or stop the workspaces that still have a PostHog Code row. The delete covers:- the provider module:
services/cloudProviders/posthog/,services/posthogCode/androutes/posthog.ts, with their tests; - the code review spill onto PostHog Code in
services/codeReview/executor.ts, and its poller; - the PostHog Code hop in
services/cloudProviders/quotaFailover.ts; - the
posthog_codeoption in the loop editor and the loop validator, and theposthog_codedefault inemptyLoopInput(the MCPcreate_looptool now picks the fleet while the flag is on); - the PostHog Code settings card, onboarding option and retirement notice in web, desktop and mobile;
- the
posthogCodeRetiredflag,POSTHOG_CODE_RETIRED, and the helpers inservices/posthogCodeRetirement.tsandpackages/shared/src/posthogCodeRetirement.ts; - the
POSTHOG_OAUTH_*setup indocs/SETUP.md§ 6b and the CIMD route inapps/marketing/app/oauth-client/.
- the provider module:
- The deferred
TranscriptSource/TranscriptConvertergeneralisation. - Measure the real ChatGPT access-token lifetime. It decides whether server-side Codex refresh is worth its ToS exposure.
- Step 2: delete the PostHog Code provider. Step 1 hides it for everyone with the
Desktop generalisation: done. Each PR row has a per-task agent menu, and the Settings cards and default agent follow the provider list.Multi-instance safety (advisory locks): resolved in Session 65 (services/advisoryLock.ts). See Known Gaps below.- Auth polish (Phase 18.2 leftovers) — proper
talyn loginPKCE flow, CLI refresh-token rotation, and the invite flow (workspaces_usersjoin table + invitation tokens). Without invites it isn't really multi-tenant, justTALYN_ALLOWED_EMAILS. - Desktop test coverage:
QUALITY_PARITY.mdTier 1. The renderer has 240+ test files inapps/desktop/src/__tests__. The strategy is inTESTING.md: keep the frontend layer small and test where the logic lives.
- Phase 2: space subscriptions, filtered WebSocket events, and presence across replicas.
- Phase 4: connect the space UI to subscriptions and presence helpers. Web
555af9c0be, desktop602fa0bf9e, mobile48b606e37c(subscribe_spaceandpresenceover the WebSocket,usePresenceHeartbeat). Space composer parity inf825ae4421.
Consolidated billing only. No workspace is shared, and none is planned (Tom's call). This does not replace the invite flow above, which is about workspace access.
- Seats bound to the numeric GitHub id, one team per person. Named seats are assigned by GitHub username.
- Polar seat-based checkout, seat-count changes, team portal and invoices. Webhook routing that never touches the buyer's
users.plan. - Settings → Billing → Team on web and desktop.
- Polar setup (2026-09-30): "Talyn Team - Monthly" and "Talyn Team - Annual" exist in the production Polar org as volume-tier seat prices: 1–4 seats $15, 5–9 $14, 10–24 $13, 25+ $12 a seat a month (annual is 10×).
POLAR_PRODUCT_ID_TEAM_*is set on Railway production. A one-seat team is allowed (Tom's call), at the same price as the personal plan. - Spike: does the production GitHub App grant org Members: read?
docs/SETUP.mdsays yes andgithub.tssays no. Org-linked seats depend on the answer. - Org-linked seats: link a GitHub org, auto-seat verified members while seats remain, opt-in auto-grow up to a cap, daily re-verification sweep (with debugBus poller).
- UpgradeModal: a "Buying for a team?" link to Settings → Billing, behind the flag.
- UpgradeModal: "your team has no free seats" when an org seat is full (comes with org-linked seats).
- Operator console: teams list, comp a team through
teams.plan_overridewith an audit reason. - Analytics:
team_created,team_checkout_started,team_seats_assigned,team_seat_removed,team_seat_count_changed,team_left,team_offer_opened. - Launch: flip
teamstoavailability: 'general', then publish prices on the pricing page (Teams band CTA to checkout, a Team column inPlanTable,OfferSchema).
AI review of a pull request with the findings in the app, and a fix you choose.
It was behind the code-review flag. The flag was removed on 2026-10-26, so
every account has code review. See the session note in SESSIONS.md for the design and the reasoning.
- The sandbox seam (
dispatchSandboxRun), so booting a microVM is not a task-only capability. Addsrepo.targetRefandtimeoutSec, neither of which Talyn had ever sent. - Four tables (migration
0068), the insert-as-claim concurrency design, and the carry-forward dedupe key. - Shared vocabulary: presets, phases, severities, the findings parser, the progress arithmetic.
- The engine — pure
decide, executor, coalescing evaluator, poller, reconciler, triggers — on the merge-queue v2 shape, no workflow engine. - The findings tab and the PR-row phase bar, in both forks.
- The fix run: one run per selection, one push, one optional summary comment.
- Flag, the cycle cap, the auto-review feature gate, the settings card.
- The merge-queue park on an unresolved blocker.
- Automatic review on a new head, for Unlimited.
- Onboarding: a wizard step for new users, a once-ever modal for everyone else.
Follow-ups, in the order they are worth doing:
- Measure before setting the budgets. Record cost, wall clock and turns
per unit across the first twenty real reviews, then set
maxTurnsandmaxBudgetUsdfrom observed p95. A guessed cap truncates the good reviews and saves nothing on the bad ones. - Settle
repo.targetRef. Dispatch one unit with it and one without against a large repository; compare the golden layer and time-to-first-event. If it forces a re-clone, the review must check the branch out from the prompt instead — minutes per unit on a monorepo, times six units. - Is the lens roster earning its cost? Measure how many findings each lens
contributes that survive judging, and the cross-lens overlap from
seenCount. Above ~60% overlap, Standard should be two lenses plus the sweep, and that is a decision the data makes. - Chunking threshold. One lens over a large PR whole versus in pieces; compare findings-per-file and the judge's rejection rate. The current file-count split is provisional and marked as such in the code.
- Diff hunk inside a finding card.
sliceUnifiedHunkno longer exists in the code. The card shows the path and the explanation but not the code. Write a new helper if this is still wanted. - Posting findings to the PR. "Post to PR" posts one
COMMENTreview, with inline comments where the finding is verified and in the diff (e440a33c73). -
inlineCommentstoggle. The setting is stored and has a toggle on all three apps, but nothing in the backend reads it: Post to PR always decides inline versus body from the diff. Wire it, or drop the toggle. - MCP submission channel (v2). Removes prose-parsing and lets findings arrive incrementally. Needs a streamable-HTTP MCP endpoint and a per-run scoped credential; the text parser stays regardless, because the fall-back provider has no MCP.
- Announce it. The flag went to
availability: 'general', which replayed the withheldcode-reviewhighlights. The flag itself was removed on 2026-10-26.
-
Review priority — a ranked Reviews tab, learned per person (2026-09-21). A third sort mode behind the
reviewPriorityPostHog flag (fallback OFF,availability: 'gated', audience: Tom only). A hard gate (blocking_others→actionable→waiting_on_author→not_ready) then points within it, computed bypackages/shared/src/prPriority.tsand applied server-side (services/reviewPriority/score.ts) so the ordering can be changed in a backend deploy rather than a desktop release, and so the desktop and web forks cannot disagree about an ORDER. The relevance term is a per-viewer L2 pairwise-logistic model fitted from that person's own GitHub review history (services/reviewPriority/{backfill,trainer,sweep}.ts, migrations0061+0062), gated at 150 events and a 3pp lift over the shipped prior, clamped below the age ramp so affinity can never bury a PR indefinitely. Open follow-ups below. -
Review-ranking benchmark and first pooled models (2026-09-21). The maintained lab compares conditional logit, personal coefficients, LambdaMART, and CatBoost. CatBoost won validation and tied request recency on the later replay. The stricter direct-request cohort cannot be compared with the old 53.4%. The earlier recency-ceiling and production-uplift claims are withdrawn. See
REVIEW_RANKING.md. -
Local review snapshots (2026-09-21). Web and desktop record full queues, visible rows, and in-app opens. Collection uses the existing
reviewPriorityaudience. An export button downloads the bounded local log. A checker rejects incomplete snapshots. No new snapshot events leave the device automatically. -
Prospective ranking pipeline and shared neural model (2026-09-21). Added scoped review collection, strict labels, local content encoding, and a shared queue model. Personal adjustments need a separate validation gain. Four forward windows and private JSON artifacts support the next experiment. Production ranking remains unchanged.
-
Larger ranking replay and personal fallback experiment (2026-09-21). Collected 51,765 repository histories and compared twelve models. Selected models gain 61 hits over recency across 997 informative choices. The equal-reviewer gain remains uncertain, and the focus reviewer regresses. An exploratory fallback retains 20 extra hits and preserves that reviewer's baseline. See the report. No model was promoted.
-
Production ranking trial infrastructure (2026-09-22). Add a fixed shared candidate, central observations, submission reconciliation, and descriptive reports. Keep readiness gates and score limits. Roll out through a separate candidate flag. See the protocol.
Follow-ups now that review priority has shipped:
-
Exact production score replay (2026-09-21). Record server profile hashes, numeric scoring inputs, and repository scope. Replay the actual serving scorer and comparator. Exclude unknown scope and agent-operated snapshots from human outcome attribution. A live capture check found 77 team requests among 79 candidates, outside the direct-request benchmark's scope.
-
Longer local capture (2026-09-21). Archive snapshots in IndexedDB for up to 30 days within a per-workspace size limit. Keep the smaller fallback log. Exports report retention losses and archive failures. Current content for 79 observed candidates was captured and encoded locally for later observations.
-
Review decision timing (2026-09-21). Record creation and submission separately. Use earlier snapshots for ranking choices. Keep unfinished reviews as censoring evidence and session conversion as a separate measure. Twenty live identity and timestamp checks matched stored history.
-
Observed team requests and batched outcomes (2026-09-22). Retain matched team names in private local snapshots. Read scoped reviews across batches of 50 PRs, with pagination and identity checks. Keep the REST collector for independent comparisons. Request events alone failed to reproduce current team requests on seven of 79 audited PRs.
-
Preserve active direct requests after prior reviews (2026-09-22). Correct poll reconciliation and webhook refreshes. A live check found two direct requests that the previous rule would exclude. Comment-only reviews can leave a direct request active, which also limits the historical replay's request-round policy.
-
Collect prospective outcomes and complete provenance. Use the collector on fresh human decisions. Record authoritative request rounds. Treat exposure, opens, and submitted reviews as separate observations.
-
Evaluate the complete production order. Include readiness gates, score caps, and waiting-time policy. Compare PR creation recency and request recency separately. The component benchmark does not establish a defect in the age ramp.
-
Measure activity and content features. The lab now supports observed content vectors and recent reviews. Test them on fresh decisions. Compare code-specialized encoders next. Intervening reviews do not prove exposure.
-
Measure shared neural ranking, then compare attention and a teacher. The shared network and guarded personal adjustments are implemented. Fresh outcomes must establish their value. Keep human outcomes as evaluation labels and score complete queues.
-
Validate a future winner. Freeze a future evaluation period and target a five-point Hit@3 gain over the strongest baseline. Require a positive paired confidence bound, then useful product outcomes before promotion.
-
Status pills on the Reviews row. The
minevariant has renderedPRReviewPill+PRStatusPill+ the unresolved-threads chip all along; thereviewvariant renders only a requester chip, so the tab hides the very state you triage on. Needs no flag and is worth doing on its own merits. -
Make Priority the default for all users. New client builds reset the old sort preference once. Later choices remain saved.
-
Snooze / pin / dismiss. Gmail's ablation found personalising the THRESHOLD beat personalising the model. A sort has no threshold, so it does not transfer today — but it would the moment this becomes a bucketed or filtered view.
-
Announce it. The
review-priorityflag isavailability: 'general'(releaseScopes: ['reviews']), so its highlights are no longer withheld. -
Talyn Fleet released to every workspace (Session 136, 2026-09-16). The
talyn-fleetPostHog flag's email condition became an empty property list at 100%, and the register entry'savailabilitywentgated→general, which replays the withheld backlog of fleet highlights. The flag stays in place as a kill switch and as the way to take the hardware away from one account.fallbackstays OFF and now deliberately disagrees withavailability: finite hardware must not open to everybody because PostHog is unreachable. Capacity overflow falls back to PostHog Code where the workspace has it — except for a loop, which pins its provider and fails visibly instead. Open follow-up: make the fleet front and centre over PostHog Code in onboarding and marketing. -
Loops — recurring prompts on a cron schedule (Session 122, 2026-09-12). A named rule: a prompt, a repository, an agent + model, a cron expression and an IANA timezone. Every firing creates an ordinary
code_writingcloud task. Behind theloopsPostHog flag, fallback OFF (LOOPS_ENABLED=trueis how to run it locally). Backend:services/loops/{store,runs,dispatch,scheduler}.ts+routes/loops.ts+ migration0054. UI: the Loops tab on the desktop and the web fork. Free plan keeps 3 per owner (Session 123). A loop can be given internet access, off by default and fleet-only (Session 125). Open follow-ups below.
Follow-ups now that Loops has shipped:
- A loop over several repositories.
createCloudTaskrequires onerepositoryId, so a loop pins one repo. "Sweep every repo in this workspace" is a real ask that would mean N tasks per firing — and therefore N times the plan-limit pressure, which is a product decision before it is a technical one. - Templates for the prompt field. The editor is a blank textarea; the shipped prompt templates (
packages/shared/src/promptTemplates.ts) are the obvious source of starters, and "sweep yesterday's failing checks" should not have to be typed from scratch. - Surface the loop on the task it created.
metadata.loopis written and nothing reads it yet — the task screen should say which schedule asked for the run and link back to it. - A timezone picker rather than a shortlist. The editor offers eleven common zones plus the browser's; anybody outside that set has to have their zone already stored.
- Split view — mobile, docs and release — web and desktop show several sessions side by side behind the
split-viewflag (2026-11-11). Not on mobile: a phone has no room for two transcripts, so revisit for tablets when the flag is released. Before flippingavailabilityto'general', add a "Several sessions side by side" section toapps/marketing/content/docs/sessions.md, and consider pane shortcuts (move focus between panes) and remembering panes per workspace. - Text file attachments — mobile picker — web and desktop attach UTF-8 text files (2026-11-16). Mobile shows them in the transcript, but cannot pick one: that needs
expo-document-picker, a native module, so a new store build. Add it with the next native build, and send the file astext/plainunder its own name, as the web does. - Analytics panel — token / cost usage — surface an Analytics tab aggregating per-workspace spend, per-task spend + token breakdown, per-model mix, and a trend chart from whatever usage data each cloud provider's transcript/run exposes. Inspiration: how PostHog / Linear surface "insights" around usage.
- Approve / Request changes on web and desktop — all three apps have them on a pull request that asks for your review (
POST /pull-requests/:id/review, sent as the person's own GitHub review). Web and desktop open a dialog from the PR detail header (2026-11-10). - Show logged-in user in the app chrome:
UserChipin the sidebar shows the GitHub username and avatar. Desktopa11a73387c, web27135bb7b5. - Auto-connect GitHub from the Supabase login session. Users now sign in with GitHub, then connect it again under Integrations.
Supabase returns
session.provider_tokenwithreposcope. Store that token for the workspace and skip the second flow. - Load-bearing eslint-disables — a few
eslint-disable-next-line/@ts-ignoresites exist (middleware/auth.tsnamespace augmentation,apps/desktop/src/main/main.tsconsole usage, Electron ERB build scripts). All intentional and low-risk; noted for a future "lint-cleanup" pass if it's ever worth the churn. - Workspace endpoint returns empty
repos+integrations— Fixed 2026-04-19. - Change default ports — Changed from 3001 to 4747 to avoid conflicts with common dev servers
- Fix ESLint configuration — Removed broken 'erb' extends, simplified config, fixed all lint errors
- Diff renderer — swap diff2html for Shiki-based
@pierre/diffs— syntax-highlighted hunks via<PatchDiff>. Dropped diff2html + DOMPurify. (2026-04-23) - Pre-commit hook — husky + lint-staged run the same ESLint CI runs, only on staged files. (2026-04-23)
Obsoleted by the cloud-only refactor / later sessions (kept for history):
Per-tool allowlist patterns (— the permission system (Bash(git *)-style)permissionService,tool_allowlist, Approve/Deny cards) was removed; cloud providers gate their own runs.Duplicate "Stop" button on running tasks— resolved by the Session 52 task-screen action audit; Abort renders once, beside the terminal.Task detail screen is sluggish— fixed in Session 24 (per-frametask:eventcoalescing + memoizedBlockView).Inbox 3-dots menu does nothing— the Inbox was removed end-to-end in Session 43.Per-task "+NN -MM" badge— shipped 2026-04-23, then removed with the local git working tree; provider PRs carry the diff now.XTerm input disabled in strict-autonomous mode/Coder environments/Terminal output blanks on task switch— all tied to the deleted PTY/XTerm/local-env paths.
-
Desktop testing: the renderer has 240+ test files in
apps/desktop/src/__tests__. The strategy is indocs/TESTING.md, which has no phases. It keeps the frontend layer small. -
Launch decisions (Session 65 audit): access model (allowlist vs invites — no invite flow exists);
stable vs prerelease update channel(Session 96: the stable release ships nightly with the full arch matrix and nothing publishes pre-releases; the in-app picker is now a no-op to remove or repurpose); error-tracking/uptime alerting (process handlers log, nothing pages);docs/SETUP.mdrewrite (predates the cloud-only refactor).Repo codename exposure— renamedGilbert09/owl→Gilbert09/talyn(Session 65; GitHub redirects keep old release feeds + git remotes working — never reuse theowlname). -
Scale-out follow-ups (pre ~50 workspaces): the reconcile sweep iterates workspaces serially and outgrows its 5-min interval; no cross-workspace GraphQL dedupe for shared-org installations (Search budget saturation); no task/transcript retention sweep;
requireAuthdoes an uncached Supabase round-trip per request. -
Pending-failure follow-up (Session 118):
toPublicMergeQueuepublishes trunk'spending_failureastesting, because desktop builds from before Session 118 crash on a state they don't know. DroppublicExternalStateonce those builds have aged out; the amber "Queue: pending failure" pill then shows on the comment channel too, not only off thetrunk-pending-failurelabel. -
Stack batch follow-ups (Session 115): when the external queue ejects a batch, the fix run is dispatched at the SUBMITTED rung even though trunk's bisection may blame a lower one — the run is handed the stack in its prompt and has to place the fix itself. Routing it at the rung trunk names is the obvious next step. A covered rung's plan is also only refreshed by the 60s reconciler, so "queued with #N" can lag a batch that ended by up to a minute — waking the sibling groups directly was tried and reverted, because detached walks that schedule each other never let the process go idle (it hung CI for 100 minutes; see Session 115).
-
Merge stack follow-ups (Session 85, now only the SERIAL drain): batching bypasses all of this where the repo's queue takes stacks — it is what a branch-shaped stack, an ungated base, and a repo whose provider refused the batch still run. Stack enqueue inherits the workspace merge method, and
squashis the hazard — a squash-landed parent leaves its commits only on the child's branch, so the retarget'supdate_branchconflicts and a paid cloud fix run does the rebase (it gets an explicit hint, but defaulting stack enqueue tomergewould sidestep it entirely — open product call). No production exercise yet: the drain is covered end-to-end against pglite with a mocked GitHub, but nobody has pointed it at a real stack. The reconciler has no counter for entries parked inawaiting_stackbeyond a day.
Resolved:
Stacked PRs have to be landed by hand— Session 85: the merge queue parks each member inawaiting_stackbehind the PR its base belongs to, retargets it onto the real base when that lands, and drains the chain bottom-up.POST /:id/merge-queue/stackqueues the whole thing in one call. Session 115: where the branch the stack lands on is behind a merge queue that takes stacks (trunk.io + GitHub native stacked PRs), the whole stack is handed over as ONE submission instead — the provider tests and lands every rung in a single CI round, so an N-deep stack costs one test cycle rather than N.Multi-instance safety (advisory locks)— Session 65: xact-scopedpg_try_advisory_xact_lockguards (services/advisoryLock.ts) on all five side-effectful loops + a blocking lock on the drizzle migrator; xact-scoped because session locks break through Supabase's transaction pooler.API rate limiting on the hosted backend— Session 65:trust proxy+ per-IP limits on/mcp(300/min) and the authenticated API surface (1000/min, ~10x the densest legit desktop poll).Backend-down UX— Session 65: the desktop's backend-unreachable screen auto-retries with capped backoff + manual retry, and transitions in on recovery.MacOS notarization— verified working (Session 65 audit): shipped Talyn.app checks out as Developer ID-signed, hardened-runtime,spctlnotarized/accepted.Credential encryption at rest— integration tokens are AES-GCM envelopes viaservices/tokenCrypto.ts(TALYN_TOKEN_KEY); used by GitHub + PostHog Code credentials.Backend bundling for release/Release packaging— the backend is hosted (Railway, Phase 18.4); the desktop artifact doesn't need to ship it.Multi-step agent state recovery— no local agents to recover; cloud providers own run durability, the poller reconciles status.
Everything below this line is pre-refactor history (the local-execution / daemon / continuous-build era). Phases 1–20 are preserved as a record of how the app was built; many of the subsystems they describe no longer exist.
-
1.1 Project Structure Setup (COMPLETED)
- Restructured to monorepo:
apps/desktop,packages/backend,packages/shared - Create backend directory with TypeScript + Node.js setup
- Create shared types package
- Add Tailwind CSS to renderer
- Add shadcn/ui with initial components (button, card, badge, scroll-area)
- Set up path aliases for clean imports
- Configure concurrent dev script (frontend + backend)
- Restructured to monorepo:
-
1.2 Core Data Models & Types (COMPLETED)
- Define
Workspacetype (id, name, repos[], integrations, settings) - Define
Environmenttype (id, name, type: local|ssh|coder, connection config, status) - Define
Agenttype (id, environmentId, status, currentTask, terminal output) - Define
Tasktype (id, workspaceId, type: manual|automated, status, priority, assignedAgent) - Define
InboxItemtype (id, type, source, priority, data, createdAt) - Define WebSocket event types
- Define
-
1.3 Database Layer (COMPLETED)
- Set up SQLite with better-sqlite3
- Create migrations system
- Initial schema: workspaces, environments, tasks, inbox_items, settings, agents, repositories, integrations
- CRUD operations for each entity
-
1.4 Backend Server (COMPLETED)
- Express + WebSocket server setup
- REST endpoints for CRUD operations (workspaces, environments, tasks, agents, inbox)
- WebSocket events for real-time updates
- Health check endpoint
- Error handling middleware
-
1.5 IPC & Communication Layer (COMPLETED — using HTTP/WebSocket)
- Extend Electron IPC channels (deferred — HTTP works for local)
- WebSocket client in renderer for backend communication
- Typed event system for real-time updates
- Connection state management (auto-reconnect, subscription management)
-
1.6 Basic UI Shell (COMPLETED)
- Main layout: sidebar + content area
- Workspace selector in sidebar
- Three-panel view: Inbox | Terminals | Queue
- Empty states for each panel
- Dark mode by default
- Resizable panels (deferred)
-
2.1 SSH Connection Layer (COMPLETED)
- SSH2 integration in backend
- Connection pooling
- Reconnection handling
- Connection status monitoring
- SSH key/agent auth support
-
2.2 Environment Service (COMPLETED)
- Add environment API
- Test connection
- Environment health checks (periodic ping)
- Remove environment
- Environment status events via WebSocket
-
2.3 Environment UI (COMPLETED — basic)
- "Add Environment" modal (with SSH config)
- Environment list in sidebar
- Connection status indicators (in sidebar)
- Quick actions (connect, disconnect, remove)
-
2.4 Local Environment (COMPLETED)
- Local machine as default environment
- Spawn local processes
- PTY handling for local terminals
-
3.1 Terminal Infrastructure (COMPLETED)
- xterm.js integration
- Terminal component with proper sizing (FitAddon)
- PTY over SSH (via ssh2 shell)
- Terminal multiplexing (multiple sessions per environment)
- Terminal state persistence
-
3.2 Terminal Panel UI (REFACTORED — merged into Tasks Panel)
-
Agent list (terminal tabs)— Removed, tasks list replaces this - Terminal status indicators (color-coded) — Now on task cards
-
New agent button + modal— Removed, tasks spawn their own agents - Stop button — Now on running tasks
- Terminal view — Now embedded in TaskDetail when task is running
-
-
3.3 Claude Agent Service (COMPLETED)
- Spawn
claudeCLI process on environment - Stream stdout/stderr to terminal
- Parse Claude output for state detection: Idle, Working, Awaiting input, Tool use, Completed, Error
- Send input to Claude process
- Agent lifecycle management (start, stop)
- Spawn
-
3.4 Agent Status Detection (COMPLETED)
- Regex patterns for Claude output parsing
- State machine for agent status
- "Needs attention" detection (questions, errors)
- Status change events via WebSocket
-
3.5 Agent Panel UI (REFACTORED — agents are internal, UI moved to Tasks)
-
Agent cards— Task cards now show agent status when running - Color-coded by attention needed — On task cards
- Quick input for questions — In TaskTerminal component
-
Start Agent modal— Removed, "Start Task" button starts agents - TaskTerminal component — Shows terminal when task is in_progress
-
-
4.1 Task Service (COMPLETED)
- Create task (manual or automated)
- Task prioritization algorithm
- Task assignment to available agents
- Task status transitions
- Task history
-
4.2 Queue Panel UI (COMPLETED — now primary view)
- Task list grouped by status (queued, in progress, completed)
- Create task form (CreateTaskModal)
- Task details view with terminal when running
- Drag-and-drop reordering
- Task actions: queue, unqueue, cancel, start, stop, send input
- TaskTerminal component for running tasks
- Agent status indicators on task cards
-
4.3 Automated Task Runner (COMPLETED)
- Watch for queued tasks
- Assign to idle agents
- Monitor task progress
- Handle task completion/failure
- Retry logic
-
4.4 Task Templates
- Pre-defined task types (PR feedback, CI fix, etc.)
- Template variables
- Template UI
-
5.1 Inbox Service (COMPLETED)
- Inbox item CRUD
- Priority calculation
- Mark as read/done
- Snooze functionality
- Inbox item sources (agents, integrations)
-
5.2 Inbox Panel UI (COMPLETED — basic)
- Inbox list sorted by priority
- Item type icons
- Quick actions per item type
- Filter/search
- Bulk actions (API ready, UI needs wiring)
-
5.3 Agent → Inbox Integration (COMPLETED)
- Agent questions create inbox items
- Agent completions create review items
- Agent errors create attention items
-
6.1 GitHub OAuth (COMPLETED)
- OAuth flow implementation (authorization URL, callback, code exchange)
- Token storage (in integrations table)
- Token refresh (not needed for GitHub — tokens don't expire)
- Scope management (repo, read:user, read:org)
-
6.2 GitHub Service (COMPLETED — REST API)
- REST client setup (using fetch)
- List repositories
- PR queries (list, get single)
- CI status queries (check runs)
- PR comment creation
- GraphQL client (deferred — REST sufficient for now)
- Webhook handling (deferred)
-
6.3 PR Monitoring (COMPLETED)
- Watch configured repos for PR activity (polling every 60s)
- New review comments → inbox
- CI status changes → inbox (on failure)
- PR merge ready → inbox
-
6.4 PR Actions (COMPLETED)
- View PR details (PRDetailModal with files, checks, branches)
- Create PR from agent work (API endpoint ready)
- Merge PR (with merge/squash/rebase options)
- Approve/Request changes (review submission)
-
6.5 GitHub UI (COMPLETED)
- Connect GitHub button (in Integrations > GitHub)
- Connection status display (shows connected user)
- Disconnect button
- Repository selector (in Settings > Workspace > Watched Repositories)
- PR list widget (PRListWidget with checks status)
- CI status indicators (check status icons in PR list)
- Dedicated GitHub panel in sidebar
- Install the Slack app and connect a workspace through OAuth.
- Link a Slack account to a Talyn account.
- Start personal sessions with an emoji, mention, or direct message.
- Create channel rules for new messages. The
slackChannelRulesflag controls rollout. - Reply in a thread or react when a channel rule matches.
- Add Linear as a rule source, with GitHub Issues. The
issueRulesflag controls rollout (2026-11-12). - Add Sentry as a rule source.
- Add PostHog Inbox (self-driving reports) as a rule source: poller, ingest by report id, filters, daily cap, dry run. The
posthogInboxRulesflag controls rollout (2026-11-14). - PostHog Inbox: give the Inbox its own PostHog connection (the
posthog_inboxrow, its own OAuth on the shared callback, or a personal API key), so a new workspace can connect PostHog while PostHog Code is retired. A PostHog Code grant with the Inbox scopes still serves as a fallback (2026-11-16). - PostHog Inbox step 2: claim the report in PostHog before the session starts, attach the pull request URL to the claim, and release the claim when the work ends without a pull request or the pull request closes without a merge. Needs
inbox:writeandtask:write. Claim state shows in the run history (2026-11-16). - PostHog Inbox step 3: receive PostHog's
$signals_report_readypush (a PostHog webhook destination) and callingestPostHogReportwith only the report id. The poller becomes a 30-minute reconcile while pushes arrive (2026-11-16). - PostHog Inbox backlog: browse older matching reports (7, 30 or 90 days) and start work on up to 20 of them ("Run selected"). Manual runs show who started them. MCP tools list and run the backlog. Mobile shows the backlog read-only (2026-11-16).
- PostHog Inbox push on mobile: make and rotate the webhook URL natively (mobile shows the last push read-only today).
- PostHog Inbox on mobile: an editor (mobile shows the rules read-only today).
- Add a generic inbound webhook source.
-
8.1 PostHog Connection
- API key configuration
- Project selection
- Connection testing
-
8.2 PostHog Service
- Insights API queries
- Events API queries
- Alerts/annotations
-
8.3 Metrics Dashboard
- Key metrics widget
- Configurable metrics
- Trend indicators
- Click-through to PostHog
-
8.4 PostHog Alerts
- Monitor for anomalies
- Alert thresholds
- Alerts → inbox
-
9.1 Workspace Service (COMPLETED — basic)
- Create workspace (
routes/workspaces.ts+useWorkspaceActions) - Configure repos (
routes/repositories.ts+ Settings panel) - Configure integrations per workspace (integrations table + Settings panel)
- Workspace switching (Sidebar workspace selector + store)
- Multi-workspace tabs (deferred to 9.3)
- Create workspace (
-
9.2 Workspace UI (COMPLETED — basic)
- Workspace settings panel (SettingsPanel with Workspace section)
- Add/remove repos
- Integration toggles (UI ready, not wired to backend)
- Workspace deletion
-
9.3 Multi-Workspace
- Workspace tabs/windows
- Cross-workspace search
- Workspace templates
-
10.1 Context Analysis
- Parse repository structure
- Identify common patterns
- Extract project metadata
-
10.2 Smart TODOs
- Auto-suggest tasks from PR review comments, TODO comments, GitHub issues, Slack threads
- Group related tasks
- Priority suggestions
-
10.3 Automation Rules
- Rule definition (trigger → action)
- Built-in rules: PR review received → task; CI failure → fix task; Slack mention → inbox item
- Custom rule builder
- Rule UI
-
10.4 Background Planning
- Use Claude to plan work
- Generate task breakdown
- Estimate complexity
- Suggest implementation order
-
11.1 Settings Service (PARTIALLY COMPLETED)
- Workspace-scoped preferences (autoAssignTasks, maxConcurrentAgents)
- Integration credentials storage (integrations table — plaintext currently)
- Encrypt integration credentials at rest
- Top-level user preferences (theme is in localStorage, no user-level store)
- Default behaviors per task type
-
11.2 Settings UI (COMPLETED — basic)
- Settings panel (SettingsPanel component)
- Sections: Workspace, Environments, Integrations (Appearance deferred)
- Import/export settings
-
11.3 Keyboard Shortcuts
- Global shortcuts
- Panel navigation
- Quick actions
- Customizable bindings
-
12.1 Notifications
- Desktop notifications
- Notification preferences
- Do not disturb mode
-
12.2 Onboarding
- First-run wizard
- Environment setup guide
- Integration connection flow
-
12.3 Error Handling
- Global error boundary
- Error reporting
- Recovery options
-
12.4 Performance
- Terminal virtualization
- Database optimization
- Memory management
-
12.5 Testing (IN PROGRESS — Phase A + B + most of C landed)
- See
docs/TESTING.mdfor the full plan (stack, layers, CI wiring, rollout) - Phase A: Vitest on backend; desktop Jest setup fixed for headless CI
- Phase B: Backend service tests — migrations, status detection, gitService (+ commit/push/stash/reset extensions), taskQueue (+ slot-guard), environment. Fake-environment harness at
src/__tests__/helpers/fakeEnvironment.ts. - Phase B cont'd: agentService lifecycle + init + cleanupStaleAgents, agentStructured (start/stop/sendMessage/resumeRun/truncation), prMonitor, ai, websocket, taskFileWatcher, daemonProxyHandler, daemonAutoUpdate, taskPullRequest, gitContext, claudeCli, commitMessagePrefetch, github, middleware/auth.
- Phase C (mostly done): routes/tasks lifecycle + live-diff, routes/inbox, routes/backlog, routes/daemon, routes/permission, routes/github, routes/repositories, routes/environments. A few small routes still uncovered.
- Daemon package tests: config, executor, git, version, proxyServer, wsClient, selfUpdate (98 tests across 7 files).
- Phases D and E (frontend tests, Playwright E2E) are superseded.
TESTING.mdwas rewritten and has no phases. See it for the current plan.
- See
-
12.6 Documentation
- User guide
- Developer docs
- API documentation
-
12.7 Multi-Tenant Backend (Future)
- User authentication (Phase 18.2 — Supabase GitHub OAuth, JWT middleware, owner_id on top-level tables, RLS, desktop login + CLI/MCP bearer token)
- Data isolation (owner_id scoping via workspaces/environments, RLS as defense in depth)
- API rate limiting
- Deployment configuration
- Invite flow (TODO) — today anyone with a GitHub account can sign up to a fresh instance; self-hosters use
TALYN_ALLOWED_EMAILSto lock down. Need a properworkspaces_usersjoin table, invitation tokens, and UI for inviting teammates before this is truly multi-tenant.
-
12.8 Appearance (COMPLETED)
- Light mode theme
- Theme toggle in settings (Appearance section)
- System theme detection (auto)
- Persist theme preference (localStorage)
Reference: https://github.com/PostHog/code for patterns
-
13.1 Interactive Claude Terminal (COMPLETED)
- Full interactive mode (not just --print)
- Bidirectional communication with Claude CLI
- Continue conversation after task starts
- Terminal stays active for follow-up questions
- Always-visible input field for sending messages
-
13.2 Native UI Overlays
- Detect when Claude presents options (numbered choices)
- Render clickable buttons for options
- One-click approval/rejection for proposed changes
- Permission request UI (accept/reject tool use)
- Feedback input with quick templates
-
13.3 Smart Task Creation (COMPLETED)
- Remove required name/description fields (prompt-first for automated tasks)
- Auto-generate task name from prompt (Haiku LLM call via AI service)
- Show generating indicator while creating
- Allow editing generated name (in collapsed section)
-
13.4 Repository Context (COMPLETED)
- Repository selector in CreateTaskModal
- Spawn Claude in correct repo directory for task (via workingDirectory)
- Support multiple repos per workspace
- Auto-clone repos on environment setup (optional) — deferred
-
14.1 Task Branch Management (COMPLETED)
- Auto-create branch when code-writing task starts (
fastowl/{id}-{slug}) - Track branch per task in database
- Auto-checkout branch when resuming task
- One active task per repo per environment (DONE —
findTaskHoldingEnvRepoSlotintaskQueue.ts; both scheduler and/startrefuse to stomp)
- Auto-create branch when code-writing task starts (
-
14.2 Work State Preservation (COMPLETED)
- Before starting new task: base branch is fetched and fast-forwarded via
gitService.prepareTaskBranch - Detect uncommitted changes (gitService.hasUncommittedChanges)
-
prepareTaskBranchrefuses to start on a dirty tree — the (env, repo) slot should have prevented it; surface the inconsistency rather than branch off half-written state - Stash utility available (gitService.stashChanges)
- Before starting new task: base branch is fetched and fast-forwarded via
-
14.3 Branch Lifecycle (COMPLETED — core flow)
- Delete local branch after approve — branch is pushed to origin then removed locally so the env+repo slot is free
- Push branch to remote on approve (
gitService.pushBranchcalled from/approve) - Rejected work preserved under
refs/fastowl/rejected/<taskId>viagitService.stashToBackupRef(recoverable withgit checkout -b <name> <ref>) - List task branches in UI (deferred — not needed once approve→push→delete lands)
-
14.4 PR Creation from Task (PARTIAL — commit+push landed; PR button deferred)
- Approve commits the working tree with an LLM-generated message (Haiku via
generateCommitMessage) and pushes to origin — remote branch is ready for a PR - Editable commit message modal in
ApproveTaskModal.tsx— shift-click Approve to bypass - "Create PR" button on completed tasks (deferred —
gh pr createwrapper) - Pre-fill PR title/description from task metadata (deferred)
- Link PR to task in UI (deferred)
- Approve commits the working tree with an LLM-generated message (Haiku via
-
14.5 Live file-change view (COMPLETED)
- Per-file diff endpoints (
GET /:id/diff/files,GET /:id/diff/file?path=...) -
TaskFilesPanelcomponent — file list + per-file diff viewer; in-flight write pulse fromtool_useevents - Terminal/Files tabs in the running-task view; Files tab replaces the inline diff in awaiting_review
- Live
task:files_changedWS event driven bytaskFileWatcher— debounces ontool_usefor Edit/Write/MultiEdit/NotebookEdit/Bash
- Per-file diff endpoints (
-
14.6 Future: parallel tasks per repo via git worktrees (DEFERRED)
- Reasoning: worktrees would drop the (env, repo) single-slot constraint and let multiple tasks work the same repo simultaneously. The blocker is per-worktree dependency state — each worktree needs its own
node_modules/ build artifacts, which is painful in monorepos (posthog/posthog, etc.). Keep single-slot for now; revisit if users hit the queue-behind-awaiting-review pain.
- Reasoning: worktrees would drop the (env, repo) single-slot constraint and let multiple tasks work the same repo simultaneously. The blocker is per-worktree dependency state — each worktree needs its own
-
14.7 Future: resume task from a different environment
- Periodic
git push -f origin refs/fastowl/wip/<taskId>from the env running the task; "Move to env X" action fetches + checks out on the target. Lightweight; tackle after users ask for it.
- Periodic
-
15.1 Conversation Logging (COMPLETED — raw terminal output)
- Persist all terminal output to task record (tasks.terminal_output column, append-only)
- Store structured conversation (user messages, agent responses, tool calls) — deferred
- Persist agent state snapshots — deferred
- ndJson format for efficient append — chose plain-text column for simplicity
-
15.2 Session Resume
- Reconstruct conversation state from logs
- Resume Claude session with context (if Claude CLI supports)
- Fallback: start new session with conversation summary
- "Continue where I left off" functionality
-
15.3 Task History UI (COMPLETED — basic)
- View full conversation history for any task (TerminalHistory component in TaskDetail)
- Scroll through past terminal output (XTerm in read-only mode)
- Collapsible section (expand/collapse toggle)
- Collapsible tool use sections (requires structured log — deferred)
- Search within task history — deferred
-
15.4 Agent Reuse (Investigate)
- Research: Can Claude CLI sessions be paused/frozen?
- Research: MCP session persistence capabilities
- If possible: implement session serialization
- If not: implement context summarization for new sessions
-
16.1 Task Type System (COMPLETED)
- Define task types: code_writing, pr_response, pr_review, manual (TaskType union in shared)
- Type-specific behaviors (isAgentTask helper; queue auto-processes anything !== 'manual')
- Type icons in CreateTaskModal and QueuePanel (Sparkles/MessageSquare/Eye/Hand)
- Type-specific prompt placeholders in CreateTaskModal
- Type-specific default prompts/templates (deferred — just placeholders for now)
- Migration 005 renames existing 'automated' → 'code_writing'
-
16.2 Approval Gates (COMPLETED)
- "Awaiting Review" status routed through (existing
awaiting_reviewTaskStatus) - Approve/Reject buttons in TaskDetail for awaiting_review tasks
- "Ready for Review" button in TaskTerminal stops agent + transitions to awaiting_review
- Agent session close (code === 0) now routes agent tasks to awaiting_review instead of completed
- Reject resets working tree to base, preserves rejected work under
refs/fastowl/rejected/<taskId>, re-queues the task withbranchcleared so the next attempt gets a freshprepareTaskBranch - Show diff of changes before approve — replaced inline
TaskDiffwithTaskFilesPanel(per-file list + diff viewer) that updates live viatask:files_changed - Commit message review modal with LLM-generated default (Haiku, see
generateCommitMessage), shift-click to bypass - Push only after approval —
/approvecommits the working tree, pushes to origin, then cleans up the local branch - Comments on approval (deferred)
- "Awaiting Review" status routed through (existing
-
16.3 PR Response Task Type
- Triggered by PR comment notifications
- Auto-checkout PR branch
- Review comments and implement changes
- Wait for approval before pushing
- Auto-create if configured in automation rules
-
16.4 PR Review Task Type
- Review someone else's PR
- Suggest review comments (not post immediately)
- Show suggested comments in UI
- User approves which comments to post
- Batch post approved comments
-
16.5 Task Completion Model (COMPLETED)
- Agent tasks: complete only after user approval (approve button in awaiting_review)
- Status flow: in_progress → awaiting_review → completed/queued (rejected)
- Manual-task completion UX (still uses generic status picker — minor polish)
-
17.1 Automation Rules — shipped as Workflows (Session 117, allow-listed)
- A generic rule instead of three hard-coded ones: on these PR lifecycle events, matching these conditions, do these actions. The three bullets this used to list are now things a user writes — comment on a PR → run a prompt; checks failed → run a prompt; review requested → run a skill.
- Every PR lifecycle event GitHub sends us, on every PR in a watched repo (not only tracked ones), read from the webhook payload
- Actions: labels (add/remove), reviewers, assignees, comment, run a skill, run a prompt, add to My PRs, add to the merge queue
- Author/actor matching by exact login, humans only, or bots only
- Configured per workspace, with a run history and derived stats
- Free plan keeps 3 workflows per owner (Session 121); Unlimited keeps as many as you like. Counts definitions, gated on creation only, pre-empted client-side off the billing snapshot
- The editor takes a raw skill key rather than using the skill picker
- No way to test-fire a workflow against a PR by hand
-
17.2 Auto-Start Behavior (Session 117)
- A workflow's task actions dispatch immediately — there is no "create it but do not start it" any more, because the Inbox that would have held it was removed in Session 43
- Rate limiting:
max_runs_per_pr_per_hourper workflow (a loop breaker, counted fromworkflow_runs), plusactivePrTaskIdso a PR never gets a second concurrent run, plus the plan's own in-flight cap - Per-workflow schedules / quiet hours
-
17.3 Notification Preferences (Session 17, basic)
- Desktop OS notifications for
awaiting_reviewtransitions — fires a native notification via the renderer'sNotificationAPI (Electron auto-bridges to macOS Notification Center / Windows Action Center / Linux libnotify) - Toggle in Settings → Appearance → Notifications; preference persisted in localStorage
- Only fires on true status transitions (not idempotent restates)
- Per-task-type notification settings — deferred (currently only awaiting_review)
- Digest mode (batch notifications) — deferred
- Desktop OS notifications for
Goal: move from local-only SQLite backend to a hosted control plane (Supabase Postgres + containerized Node server) with a local daemon on the user's machine that handles environment/agent execution. Preserves local-first execution while enabling cross-device state, multi-user auth, and proper productionization.
Reference architecture: hosted server owns state + integrations; local daemon owns SSH/PTY/Claude CLI execution; they communicate via an authenticated outbound WebSocket tunnel from the daemon to the server.
-
18.1 DB abstraction + Postgres/Supabase migration
- Pick a TypeScript ORM with migration tooling — recommended: Drizzle ORM + drizzle-kit
- Define schema in Drizzle, translate existing
db/index.tsmigrations (001-005) into Drizzle migration files - Introduce a
DatabaseClientinterface so routes/services don't depend onbetter-sqlite3directly - Add Supabase project + wire
DATABASE_URLenv var -
npm run db:migratescript (drizzle-kit migrate);npm run db:generatefor new migrations - Keep SQLite as the local-mode default (single-user path) during transition
-
18.2 Auth + multi-tenancy
- Supabase Auth with GitHub OAuth (reuses existing GitHub integration)
- Add
user_idcolumn on workspaces, environments, tasks, inbox_items, integrations, repositories - Enforce user scoping in every route handler (Supabase RLS policies + server-side checks)
- Login UI in desktop app (sign in with GitHub → receive JWT → store in secure local storage)
- Auth middleware on Express routes + WebSocket upgrade
-
18.3 Split backend into server + daemon
- [~] New
packages/server— hosted control plane. 18.3.A landed the daemon-on-the-other-side of the split; dropping ssh2/node-pty from the backend waits until legacylocal/sshenv types are deprecated. - New
packages/daemon—@talyn/daemonworkspace withexecutor.ts,git.ts,wsClient.ts,config.ts,proxyServer.ts. Session 15–16. - Wire protocol in
@talyn/shared/daemonProtocol.ts: hello / request-response / events + proxy_http_request. Session 15–16. - Daemon auth: one-shot pairing token → long-lived device token (SHA-256 hash stored). Session 15.
- Option-1 HTTP relay for CLI/MCP inside tasks: daemon runs a localhost HTTP proxy; child processes' REST calls tunnel over the daemon's authenticated WS. Backend accepts internal-auth headers (randomBytes(48) secret, timingSafeEqual) alongside JWT. No user JWT ever lives on the VM. Session 16.
- Scheduler/backlog recognise daemon envs:
daemonRegistryupdatesenvironments.statuson connect/disconnect; backlog + continuousBuildScheduler treat connected daemon envs as eligible fallbacks. Session 16. - Bundled daemon: installed as a launchd/systemd user service by the Electron app on first launch (Session 19 Slices 2+3). Runs outside Electron's lifetime, so quitting the app doesn't kill in-flight tasks.
- [~] Deployable daemon:
fastowl-daemondistributable to VMs (Session 17)- Single-file binary — cross-compiled via
bun build --compilefor darwin-arm64/x64, linux-x64/arm64, win-x64 (Session 19 Slice 1); shipped inside the Electron.appviaextraResources. - Systemd unit / launchd plist for auto-start — generated by
scripts/install-daemon.sh - Self-register with hosted server on first run using a one-time pairing token from the desktop app — pairing flow works end-to-end from the new "Add Environment" UI
- Single-file binary — cross-compiled via
- [~] Remote install flow: originally shipped as SSH auto-install (Session 17); replaced in Session 19 Slice 5 with a "paste this one-liner on the VM" pairing flow when env types collapsed to
local | remoteand ssh2 was dropped.- Desktop UI: simplified pairing modal — name the env, mint pairing token, show install one-liner, poll until daemon dials in
- Health check: desktop polls env status after install, flips to "connected" when the daemon dials back via
daemonRegistry.register - Uninstall flow: symmetric — app menu → "Uninstall Talyn daemon and quit…" for the local daemon; bundled
scripts/fastowl-uninstall.shfor the.app(Session 19 Slice 7).
- [~] New
-
18.4 Deployment (Session 14)
- Multi-stage Dockerfile at repo root — Node 22 slim, copies pre-built node_modules from builder to avoid re-running install-scripts (keeps node-pty/ssh2 native bindings without runtime build tools)
-
railway.toml— DOCKERFILE builder,/healthhealthcheck, on-failure restart - Hosted at
https://prod.talyn.dev, projectTalyn, servicefastowl-backend - Service variables:
DATABASE_URL(transaction pooler, not direct — Railway has no IPv6),SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY,TALYN_ALLOWED_EMAILS,NODE_ENV - Migrations run on startup via drizzle-orm migrator;
build:copy-migrationspostbuild script puts.sqlfiles intodist/ - Rate limiting on public API (per-user) — future
-
18.5 CI for hosted backend (Session 14, partial)
-
.github/workflows/deploy-backend.yml— path-filtered to backend/shared/Dockerfile, usesRAILWAY_TOKENsecret - Separate staging vs production environments (Railway environments feature) — future
- Automated Supabase branch creation for PR previews — future
- Rollback procedure documented — future
-
-
18.6 Desktop app integration (mostly Session 13 + 14)
- Replace hardcoded
http://localhost:4747with configurable server URL (TALYN_API_URLenv, webpack EnvironmentPlugin, loaded via dotenv) - Desktop points at Railway by default; local fallback via
.envoverride - Graceful degradation when backend unreachable (App.tsx renders "Backend is unreachable" screen)
- First-run flow: choose "Cloud (hosted)" vs "Self-hosted/local" mode — future, not required for production
- Encrypt stored JWT at rest via OS keychain (Electron safeStorage API) — future, localStorage persists fine for MVP
- Replace hardcoded
-
18.7 Data migration for existing users
- One-click "Sync to cloud" flow reads local SQLite and pushes to hosted Postgres
- Preserve task history, inbox items, workspace config
-
18.8 Observability — PostHog
- PostHog is the single product analytics + error tracking + logs platform for Talyn; no separate Sentry/Datadog/etc.
- Structured logging on server (pino), shipped to PostHog via log-to-events
- Error tracking via PostHog error tracking (server + daemon + Electron renderer + main process)
- Product analytics events: task created, task approved/rejected, env added, integration connected, time-to-first-agent
- PostHog session replay for desktop UX debugging (opt-in only)
- Railway platform metrics → PostHog (CPU/mem/request counts) via webhook or periodic push
- Dashboards: cohort retention, error rate by route, approval latency histogram
- Self-host PostHog or PostHog Cloud — defer decision; cloud is faster to start
Tools that speed up the dev loop. Add/maintain as we go.
-
19.1 MCP servers for Claude Code
- GitHub MCP (
@modelcontextprotocol/server-github) — query repo state, PRs, issues, runs - Supabase MCP (
@supabase/mcp-server-supabase) — query hosted DB schema and rows during dev - PostHog MCP — query analytics/errors from the editor
- Filesystem MCP (optional) — scoped to the repo root
- Document the MCP setup in
docs/SETUP.md
- GitHub MCP (
-
19.2 Scripts + DX polish
-
npm run db:reset— drop the local SQLite DB and recreate via migrations -
npm run db:seed— optional seed data for demo purposes -
npm run logs— tail backend + desktop main-process logs in one stream - Pre-commit hook (husky + lint-staged) for typecheck + eslint on changed files only
-
-
19.3 Local
claudeCLI smoke harness- Fixture transcripts + a test harness that replays them into
agent.analyzeOutput()to catch regressions
- Fixture transcripts + a test harness that replays them into
Point Talyn at a TODO document and it works through the list — one task per item, each with its own git branch, each gated by human approval. See
docs/CONTINUOUS_BUILD.mdfor the full feature doc.
-
20.1 Backlog data model + markdown parser (COMPLETED)
-
backlog_sources+backlog_itemstables (migrations 006, 007) - Markdown checklist parser with heading-scoped sections, nesting,
(blocked)detection - Stable external IDs (hash of text + parent) so reordering doesn't churn state
- Source sync: read file via
environmentService.exec, upsert items, retire missing ones - REST at
/api/v1/backlogfor sources CRUD + sync + item list - 18 unit/service tests (parser + service)
-
-
20.2 Continuous Build scheduler (COMPLETED)
- Domain EventEmitter (
services/events.ts) so backend services can react totask:statustransitions without going through websocket - Scheduler subscribes to
task:status, updates backlog item claim/completion, and spawns the next unblocked item when slots are available - Workspace-level
continuousBuild.{ enabled, maxConcurrent, requireApproval }settings - Manual-kick endpoint
POST /api/v1/backlog/schedule - Periodic tick (60s) as a safety net for missed events
- 8 scheduler tests (on/off, cap, approval gate, claim/release, disabled-source skip)
- Domain EventEmitter (
-
20.3 Desktop UI (COMPLETED)
- New Continuous Build section in Settings: toggle + concurrent cap + approval gate
- Source management: add/delete markdown_file sources with per-source environment
- Backlog items view with live status chips (pending/in-flight/done/blocked)
- "Run scheduler" button
-
20.4 Talyn CLI (task-spawns-task) (COMPLETED)
- New
packages/cliworkspace publishing thetalynbinary - Commands:
task create/list/ready,backlog sources/sync/items/schedule,ping - Agent service injects
TALYN_API_URL(local),TALYN_WORKSPACE_ID,TALYN_TASK_IDas inline env vars on spawn so child Claudes inherit context - 3 CLI client tests + 4 backend env-prefix tests
- New
-
20.5 SSH VM support (COMPLETED — documentation, code path, and one-command bootstrap)
- Env prefix skips
TALYN_API_URLfor SSH environments (remote.bashrcsets it instead) -
docs/SSH_VM_SETUP.mdwith three networking options (SSH reverse tunnel, LAN bind, backend-on-VM) and troubleshooting -
scripts/bootstrap-vm.sh— idempotent one-command VM install - End-to-end user verification on the real VM (requires user action)
- Env prefix skips
-
20.8 Option 3 — deterministic completion for autonomous tasks (COMPLETED)
- Autonomous tasks (those with
metadata.backlogItemId) spawnclaude --print --permission-mode acceptEdits <prompt>via the existingbash -cnon-interactive path - Process exit = completion signal. No prompt-based signaling, no hook, no sentinel
- Interactive tasks keep the existing PTY + prompt-delivery flow
- Scheduler
buildPromptrewritten: tells Claude to stop responding when done (exit is the signal) - Fix: SSH
pty:closenow carries the real exit code; agent close handler forwards it - Fix: scheduler skips sources whose target environment isn't connected
- Autonomous tasks (those with
-
20.6 Talyn MCP server (COMPLETED)
- New
packages/mcp-serverworkspace using@modelcontextprotocol/sdkover stdio - Seven tools:
talyn_create_task,talyn_list_tasks,talyn_mark_ready_for_review,talyn_list_backlog_items,talyn_list_backlog_sources,talyn_sync_backlog_source,talyn_schedule - Tools pick up
TALYN_WORKSPACE_ID/TALYN_TASK_IDfrom env so child Claudes call them argument-free - Registration instructions in
docs/SETUP.md(Talyn MCP section) - 7 handler tests
- New
-
20.7 Nice-to-haves (deferred)
- GitHub issues as a backlog source type
- Linear projects as a backlog source type
- Priority inference from source context (currently every item is
medium) - Cross-source scheduling priority (currently iterates in creation order)
- Structured
<!-- depends-on: ... -->annotations for blocked items