# austmsk/conclave architecture

> Architecture diagram of the GitHub repository austmsk/conclave, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/austmsk/conclave
- Repository: https://github.com/austmsk/conclave

## Overview

Conclave is a pre-Milestone 1 platform intended to turn GitHub issues into reviewed pull requests. Its documented user workflow is issue intake, code reading and planning, implementation and testing in isolated sandboxes, gating, and PR creation for human merge. The tree shows supporting areas for agents, LLM routing and providers, sandboxing, evaluation, gates, and persistence. The README documents the product stages, but the sampled entry points contain no implementation; internal runtime wiring is therefore not asserted.

Main entry points: [`internal/workflow`](https://github.com/austmsk/conclave/tree/main/internal/workflow) (Workflow coordination), [`internal/github/doc.go`](https://github.com/austmsk/conclave/blob/main/internal/github/doc.go) (GitHub issues), [`internal/llm/router.go`](https://github.com/austmsk/conclave/blob/main/internal/llm/router.go) (LLM routing and policy), [`internal/store/transition.go`](https://github.com/austmsk/conclave/blob/main/internal/store/transition.go) (State transitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Issue workflow"]
  node_github["GitHub issues<br/>[doc.go]"]
  node_orchestration["Workflow coordination"]
  node_codebase["Code reading"]
  node_planning["Change planning"]
  node_implementation["Change implementation"]
  node_testing["Change testing"]
  node_pr["Pull request"]
end

subgraph group_intelligence["Agents and models"]
  node_llmrouter["LLM routing and policy<br/>[router.go]"]
  node_llmpolicy["Repository model policy<br/>[policy.go]"]
  node_anthropic["Anthropic adapter<br/>[anthropic.go]"]
  node_fakeprovider["Replay provider<br/>[fake.go]"]
end

subgraph group_execution["Sandbox execution"]
  node_dockerprovider["Docker sandbox provider<br/>[provider.go]"]
  node_dockersandbox["Sandbox workspace<br/>[sandbox.go]"]
  node_sandboxspec["Sandbox specification<br/>[spec.go]"]
end

subgraph group_controls["Review and controls"]
  node_gate["Result gating<br/>[doc.go]"]
  node_contracts["Domain contracts"]
end

subgraph group_persistence["State and records"]
  node_transitions["State transitions<br/>[transition.go]"]
  node_repodirectory["Repository directory<br/>[repos.go]"]
  node_costledger["Cost ledger<br/>[costs.go]"]
  node_postgres[("PostgreSQL")]
end

node_owner(("Issue owner"))
node_human(("Human reviewer"))

node_owner -->|"opens issue"| node_github
node_github -->|"starts workflow"| node_orchestration
node_orchestration -->|"reads code"| node_codebase
node_orchestration -->|"plans change"| node_planning
node_orchestration -->|"implements change"| node_implementation
node_orchestration -->|"tests change"| node_testing
node_orchestration -->|"gates result"| node_gate
node_orchestration -->|"opens PR"| node_pr
node_human -->|"merges PR"| node_pr
node_llmrouter -->|"checks policy"| node_llmpolicy
node_repodirectory -->|"reads records"| node_postgres
node_costledger -->|"records costs"| node_postgres
node_transitions -->|"changes state"| node_postgres

click node_github "https://github.com/austmsk/conclave/blob/main/internal/github/doc.go"
click node_orchestration "https://github.com/austmsk/conclave/tree/main/internal/workflow"
click node_codebase "https://github.com/austmsk/conclave/tree/main/internal/repoindex"
click node_planning "https://github.com/austmsk/conclave/tree/main/internal/agent"
click node_implementation "https://github.com/austmsk/conclave/tree/main/internal/agent"
click node_testing "https://github.com/austmsk/conclave/tree/main/internal/activity"
click node_gate "https://github.com/austmsk/conclave/blob/main/internal/gate/doc.go"
click node_llmrouter "https://github.com/austmsk/conclave/blob/main/internal/llm/router.go"
click node_llmpolicy "https://github.com/austmsk/conclave/blob/main/internal/llm/policy.go"
click node_anthropic "https://github.com/austmsk/conclave/blob/main/internal/llm/anthropic/anthropic.go"
click node_fakeprovider "https://github.com/austmsk/conclave/blob/main/internal/llm/faketest/fake.go"
click node_dockerprovider "https://github.com/austmsk/conclave/blob/main/internal/sandbox/docker/provider.go"
click node_dockersandbox "https://github.com/austmsk/conclave/blob/main/internal/sandbox/docker/sandbox.go"
click node_sandboxspec "https://github.com/austmsk/conclave/blob/main/internal/sandbox/docker/spec.go"
click node_contracts "https://github.com/austmsk/conclave/tree/main/internal/contracts"
click node_transitions "https://github.com/austmsk/conclave/blob/main/internal/store/transition.go"
click node_repodirectory "https://github.com/austmsk/conclave/blob/main/internal/store/repos.go"
click node_costledger "https://github.com/austmsk/conclave/blob/main/internal/store/costs.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_github,node_orchestration,node_codebase,node_planning,node_implementation,node_testing,node_pr,node_human toneBlue
class node_llmrouter,node_llmpolicy,node_anthropic,node_fakeprovider toneAmber
class node_dockerprovider,node_dockersandbox,node_sandboxspec toneMint
class node_gate,node_contracts toneRose
class node_transitions,node_repodirectory,node_costledger,node_postgres,node_owner toneIndigo
```

## Components

### Issue workflow

- [GitHub issues](https://github.com/austmsk/conclave/blob/main/internal/github/doc.go): `internal/github/doc.go`
- [Workflow coordination](https://github.com/austmsk/conclave/tree/main/internal/workflow): `internal/workflow`
- [Code reading](https://github.com/austmsk/conclave/tree/main/internal/repoindex): `internal/repoindex`
- [Change planning](https://github.com/austmsk/conclave/tree/main/internal/agent): `internal/agent`
- [Change implementation](https://github.com/austmsk/conclave/tree/main/internal/agent): `internal/agent`
- [Change testing](https://github.com/austmsk/conclave/tree/main/internal/activity): `internal/activity`
- **Pull request**

### Agents and models

- [LLM routing and policy](https://github.com/austmsk/conclave/blob/main/internal/llm/router.go): `internal/llm/router.go`
- [Repository model policy](https://github.com/austmsk/conclave/blob/main/internal/llm/policy.go): `internal/llm/policy.go`
- [Anthropic adapter](https://github.com/austmsk/conclave/blob/main/internal/llm/anthropic/anthropic.go): `internal/llm/anthropic/anthropic.go`
- [Replay provider](https://github.com/austmsk/conclave/blob/main/internal/llm/faketest/fake.go): `internal/llm/faketest/fake.go`

### Sandbox execution

- [Docker sandbox provider](https://github.com/austmsk/conclave/blob/main/internal/sandbox/docker/provider.go): `internal/sandbox/docker/provider.go`
- [Sandbox workspace](https://github.com/austmsk/conclave/blob/main/internal/sandbox/docker/sandbox.go): `internal/sandbox/docker/sandbox.go`
- [Sandbox specification](https://github.com/austmsk/conclave/blob/main/internal/sandbox/docker/spec.go): `internal/sandbox/docker/spec.go`

### Review and controls

- [Result gating](https://github.com/austmsk/conclave/blob/main/internal/gate/doc.go): `internal/gate/doc.go`
- [Domain contracts](https://github.com/austmsk/conclave/tree/main/internal/contracts): `internal/contracts`

### State and records

- [State transitions](https://github.com/austmsk/conclave/blob/main/internal/store/transition.go): `internal/store/transition.go`
- [Repository directory](https://github.com/austmsk/conclave/blob/main/internal/store/repos.go): `internal/store/repos.go`
- [Cost ledger](https://github.com/austmsk/conclave/blob/main/internal/store/costs.go): `internal/store/costs.go`
- **PostgreSQL**

### Other components

- **Issue owner**
- **Human reviewer**

## Connections

- Issue owner → GitHub issues: opens issue
- GitHub issues → Workflow coordination: starts workflow
- Workflow coordination → Code reading: reads code
- Workflow coordination → Change planning: plans change
- Workflow coordination → Change implementation: implements change
- Workflow coordination → Change testing: tests change
- Workflow coordination → Result gating: gates result
- Workflow coordination → Pull request: opens PR
- Human reviewer → Pull request: merges PR
- LLM routing and policy → Repository model policy: checks policy (evidence: `internal/llm/router.go`)
- Repository directory → PostgreSQL: reads records (evidence: `internal/store/repos.go`)
- Cost ledger → PostgreSQL: records costs (evidence: `internal/store/costs.go`)
- State transitions → PostgreSQL: changes state (evidence: `internal/store/transition.go`)
