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

Architecture Overview

Redshank is structured as a Cargo workspace of four crates:

CrateRole
redshank-coreDomain model, ports, application layer, adapters
redshank-cliclap binary entry point
redshank-tuiratatui TUI event loop and renderer
redshank-fetchers34 data fetcher implementations

Internal layout (redshank-core)

The internal layout follows hexagonal DDD with explicit CQRS:

src/
  domain/          # Pure types — zero I/O, zero async
  ports/           # Trait interfaces (inbound + outbound)
  application/
    commands/      # Mutating CQRS handlers + IdempotencyKey
    queries/       # Read-only CQRS handlers
    services/      # Orchestration (agent engine, condensation)
  adapters/
    providers/     # LLM provider impls (Anthropic, OpenAI-compat)
    tools/         # WorkspaceTools (filesystem, shell, web, patching)
    persistence/   # SQLite session store

Dependency rule

No domain type may reference an adapter or application type. The compiler enforces this: redshank-core/Cargo.toml has zero I/O crates (tokio, reqwest, sqlx) as non-optional direct dependencies.

Further reading