How leitwerk-dev/leitwerk works
Leitwerk is an AI-driven software-delivery control plane: an operator launches a process in the browser, the server prepares and runs its defined turns, and the operator follows results and makes decisions through completion. The map highlights durable orchestration, disposable worker execution, extension-authored processes, repository-change delivery, and external integrations. Relationships among unsampled subsystems are limited to explicit README statements; the excerpts provide additional evidence for repository wiring, launch preparation, event reporting, and GitHub client behavior.
Main entry points: app.ts Server API · repository-change-publication.ts Repository-change workflow · App.svelte Browser UI · repositories.ts Repository bundle
Components 19
Operator experience
- Browser UI
packages/ui/src/App.svelte
Durable control plane
- Shared contracts
packages/protocol/src/protocol.ts - Server API
packages/server/src/app.ts - Launch preparation
packages/server/src/launch-pipeline.ts - Process engine
packages/server/src/process-engine/engine.ts - SQLite persistence
packages/server/src/db/database.ts - Repository bundle
packages/server/src/db/repositories.ts - Worker event ingestion
packages/server/src/supervisor/worker-event-ingestor.ts
Turn execution
- Worker runtime
packages/worker/src/runtime/llm-turn-execution.ts - Worker runners
packages/worker-runners/src/docker-engine-client.ts
Process extensions
- Process authoring SDK
packages/process-sdk/src/define-process.ts - Extension runtime
packages/extension-runtime/src/extension-loader.ts - Repository-change workflow
extensions/coding/src/repository-change-publication.ts - Git finalization
extensions/coding/src/finalization-git-internal.ts - Repository reconciliation
extensions/coding/src/repository-reconciliation.ts - Publication receipts
extensions/coding/src/repository-publication-receipt.ts
External integrations
- GitHub client
extensions/github/src/client.ts
Other components
- Operator
- Git hosting services
Connections 22
- Operator → Browser UI: starts and reviews
README.md - Browser UI → Server API: sends requests
README.md - Server API → Browser UI: streams updates
README.md - Browser UI → Shared contracts: uses contracts
README.md - Server API → Shared contracts: uses contracts
README.md - Server API → Launch preparation: prepares launch
packages/server/src/launch-pipeline.ts - Launch preparation → Repository bundle: updates launch state
packages/server/src/launch-pipeline.ts - Server API → Process engine: controls processes
README.md - Process engine → Repository bundle: uses durable state
- Repository bundle → SQLite persistence: persists state
packages/server/src/db/repositories.ts - Process engine → Worker runtime: dispatches turns
README.md - Worker runtime → Worker runners: runs on
README.md - Worker runtime → Worker event ingestion: reports events
README.md - Worker event ingestion → Repository bundle: records progress
packages/server/src/supervisor/worker-event-ingestor.ts - Worker event ingestion → Server API: broadcasts updates
packages/server/src/supervisor/worker-event-ingestor.ts - Extension runtime → Process authoring SDK: assembles definitions
README.md - Repository-change workflow → Process authoring SDK: defines workflow
README.md - Repository-change workflow → Git finalization: finalizes changes
extensions/coding/src/repository-change-publication.ts - Repository-change workflow → Repository reconciliation: reconciles repository
extensions/coding/src/repository-change-publication.ts - Repository-change workflow → Publication receipts: tracks publication
extensions/coding/src/repository-change-publication.ts - Repository-change workflow → GitHub client: uses provider client
- GitHub client → Git hosting services: calls GitHub
extensions/github/src/client.ts