Implemented topology · v2

archie-core

Single-daemon architecture: poll GitHub for labelled issues, route through label-driven workflows, run gated AI agent loops via ai-sdk, and deliver reviewed PRs -- all in-process with SQLite crash recovery and an SSE observability dashboard.

External Daemon Engine Storage Events
Issue → PR flowGitHub polled · label-driven routing · gated agent stages · deterministic git ops · crash recovery
Export
archie-core implemented architecture GitHub is polled by the archied daemon. Issues are enqueued in SQLite and claimed one at a time. Label-driven routing selects a workflow (bootstrap, implement, tdd, feasibility). Workflow stages run sequentially: prepare clones a worktree, then agent stages run gated ai-sdk/agentloop runs against LLM providers, deterministic stages commit, push, apply diff caps, and open PRs. An in-process event bus fans observability events to a SQLite event log and an SSE dashboard. Crash recovery re-queues stale running tasks on startup. FORGE · EXTERNAL LLM · EXTERNAL ARCHIE-CORE PLATFORM FORGE GitHub Issues · PRs · Labels EXTERNAL LLM Providers OpenAI · Anthropic · Ollama DAEMON archied Poll · Enqueue · Claim Route · Process · Reconcile Crash recovery · Startup WORKFLOW ENGINE 4 Workflows bootstrap · implement tdd · feasibility Label-driven routing RUNTIME ai-sdk agentloop · runtime · core STORE SQLite · WAL mode Tasks · Transitions · Event log GIT OPS Worktree Manager Clone · Branch · Commit · Push GIT_ASKPASS auth OBSERVABILITY Event Bus In-process · Bounded subs DASHBOARD SSE Web UI Live task board · Events STAGE COMPOSITION bootstrap prepare → marker → commit → PR implement plan → build → commit → PR tdd analyse → repro → fix → PR feasibility assess → PRD → waiting_human poll PR SQL route git agent HTTPS resp publish event log SSE sub

01 · Task flow

Label-driven, in-process execution

archied polls GitHub for issues matching the configured trigger (assignee, label, or either). Each issue becomes a SQLite-tracked task, claimed one at a time, and routed to a workflow by issue labels -- no LLM involved in routing. All stages run sequentially inside the daemon process.

02 · Failure boundaries

Environmental constraints, not prompt rules

The quality gate, test-file protection (TDD fix stage), and diff-size cap are code enforcement -- not "please don't do that" in the system prompt. Crashed daemons re-queue stale running tasks on startup. Parks are never silent: every parked task posts a comment with the reason and gate output.

03 · Design decisions

Deterministic git, fresh worktrees

The model never runs git -- worktree operations (clone, branch, commit, push, diff, cleanup) are deterministic steps, not agent tools. Every task gets a fresh clone under ~/.local/share/archie/work/. Tokens are tracked per task and emitted in observability events, but not budgeted beyond the agent loop's own limits.