Amaru LightContributing
Architecture
The components of the Amaru Light daemon, including scheduler, ticket sources, forge, agent drivers, workspace, checks, store, web UI and prompt guard.
Amaru Light is one Rust binary, amaru, plus the separate amaru-guard crate. A deterministic
orchestrator decides what happens to each ticket; no language model picks the work. The daemon polls
GitHub (60 seconds by default) and uses no webhooks.
Components
| Component | Role | Implementation |
|---|---|---|
| Scheduler | Intake, the ticket queue, worker slots, polling pull requests and retention | src/scheduler/ |
| Lifecycle | One ticket's steps, its session and review rounds | src/lifecycle/ |
| Ticket source | List, claim, comment on and label issues; dependencies | GitHub through gh, Jira through curl (src/forge/) |
| Forge | Push branches, open pull requests, read reviews and checks, reply | GitHub through gh (src/forge/) |
| Agent drivers | Start and resume sessions, stream events, cancel | Claude Code, Codex and IBM Bob (src/agent/) |
| Workspace | Mirror clone, one worktree per ticket, retention | Git worktrees (src/worktree.rs, src/cleanup.rs) |
| Checks | The project's commands, with timeouts | Shell (src/checks.rs) |
| Store | Tickets, states, session IDs and the event log | SQLite (src/db.rs) |
| Web interface | The pages and JSON API served by amaru serve | src/web/, assets in web/ |
| Prompt guard | Screens untrusted text before the agent reads it | src/guard.rs, src/lifecycle/screen.rs, crate guard/ |
Modules
| Module | Role |
|---|---|
bin/amaru.rs, app.rs | Command line and wiring |
contract.rs, prompts.rs | The result file and the prompts |
process.rs | Child processes |
ticket.rs, settings.rs | Ticket states and configuration |
login/, setup/, install.rs | Signing agent CLIs in, setting them up and installing them |
The prompts in prompts/ are compiled into the binary and can be overridden per installation.
Based on README.md, docs/design.md and the src/
tree. Where design.md predates the code (it lists only Claude Code and Codex, and says the daemon
has no HTTP interface), this page follows the code.
Next steps
- How it works: the lifecycle these components run.
- Development: build and test your change.