?

For contributors and integrators

The developer guide covers everything you need to modify rousseau or embed its agent loop in your own binary. If you only want to run rousseau, read the User Guide instead.

Pages

Page Topic
Architecture Layered architecture: agent, provider, tools, transport, cli. Module boundaries.
Add a transport Implement transport.Transport and register it in the CLI.
Add a provider Implement agent.Provider (and optionally agent.StreamingProvider).
Add a tool Implement tools.Tool and wire it into the registry.
Testing Dependency injection via interfaces, fake generators, coverage thresholds.
Contributing PR checklist, commit style, quality gate.

Repository layout

cmd/rousseau/                 Entry point (signal handling + Execute)
internal/agent/               Session, Message, Turn, agent loop, Provider interfaces, compression
internal/cli/                 Cobra command tree (chat, per-transport commands, doctor, status, cron, mcp, skills, init, version)
internal/config/              Viper-based; flag > env > file > default precedence
internal/cron/                robfig/cron/v3 scheduler goroutine with durable job storage
internal/llm/anthropic/       Direct Anthropic API provider with cache markers
internal/llm/bedrock/         AWS Bedrock provider
internal/llm/claudecli/       Subprocess provider (claude CLI + JSON parser)
internal/llm/openai/          OpenAI-compatible provider
internal/llm/vertex/          Google Vertex AI provider
internal/mcp/                 MCP server (JSON-RPC 2.0 over stdio, spec 2024-11-05)
internal/skills/              agentskills.io-style skill loader + composition
internal/state/               Store interface + Summary type
internal/state/sqlite/        SQLite implementation (WAL, JIDMap, claude cache, FTS5 recall, cron table)
internal/tools/               Tool interface + concurrency-safe Registry
internal/tools/builtin/       read, write, edit, grep, bash
internal/transport/           Transport interface + Router
internal/transport/{whatsapp,signal,telegram,matrix,slack,discord,sms,imessage,email}/
                              Nine transport adapters
internal/tui/                 Bubble Tea model
docker/                       Dockerfile, Podman Quadlet unit
docs/                         Roadmap, gap analysis
examples/embed-agent/         Minimal library-embedding example

Dependency direction

agent depends only on interfaces exposed by tools, on its own Provider types, and on the standard library. Concrete providers, stores, and transports depend on agent — never the reverse.

This is enforced by convention and by the CI lint gate. If you find yourself needing to import a concrete provider from agent, you are doing something the layering does not sanction; step back.

Quality gate

Every commit must pass, locally and in CI:

  • go vet ./...
  • golangci-lint run (18 linters, exact pins in .golangci.yml)
  • go test -race -count=1 -covermode=atomic ./... on Linux and macOS
  • Coverage floor (currently 75% total; core packages sit 85–100%)
  • govulncheck ./...
  • CodeQL static analysis (Go)
  • Reproducible-build verification

Run the gate locally with make check.

Next

Type to search 150+ pages. Ranking: BM25 with title/description boost.