Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

2. Monorepo structure with three crates

Date: 2026-04-22

Status

Accepted

Context

Cerebro needs to support multiple use cases: CLI usage for building dashboards, library usage for other tools, and OpenCode MCP integration.

Decision

We will use a Rust workspace with three crates:

  • cerebro — CLI application (main binary)
  • cerebro-core — Shared types and storage traits (library)
  • cerebro-mcp — MCP server for OpenCode integration (binary)

Consequences

Pros

  • Clear separation between CLI, library, and MCP concerns
  • cerebro-core can be used as a library by other tools
  • Each crate can evolve independently

Cons

  • Workspace complexity
  • More build artifacts to manage

Notes

See crates/ directory for actual structure.