# yadavmandeep/veratum architecture

> Architecture diagram of the GitHub repository yadavmandeep/veratum, 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/yadavmandeep/veratum
- Repository: https://github.com/yadavmandeep/veratum

## Overview

Veratum is an AI-coding-agent harness: an agent starts a scoped task, consults project memory and dependency impact, makes changes, runs verification, and must pass a completion gate before reporting done. Its CLI provides the core runtime; MCP and editor hooks expose that runtime to supported hosts. The knowledge-graph branch builds and queries workspace relationships and exports graph views. The README documents capabilities not visible in the sampled implementation; links for those flows are cited to it, while source-level links are limited to explicit excerpts.

Main entry points: [`engine/veratum_cli.py`](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py) (Runtime CLI), [`engine/veratum_graph.py`](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_graph.py) (Graph build and query), [`engine/mcp_server.py`](https://github.com/yadavmandeep/veratum/blob/main/engine/mcp_server.py) (MCP server), [`adapters`](https://github.com/yadavmandeep/veratum/tree/main/adapters) (Supported IDEs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Agent interfaces"]
  node_skill["Veratum skill<br/>[SKILL.md]"]
  node_mcp["MCP server<br/>[mcp_server.py]"]
  node_hooks["Antigravity hooks<br/>[_veratum_bridge.py]"]
  node_idehosts["Supported IDEs"]
end

subgraph group_workflow["Engineering workflow"]
  node_cli["Runtime CLI<br/>[veratum_cli.py]"]
  node_contracts["Scope contracts<br/>[veratum_cli.py]"]
  node_impact["Impact analysis<br/>[veratum_cli.py]"]
  node_checkpoints["Shadow checkpoints<br/>[veratum_cli.py]"]
  node_verification["Verification and gate<br/>[veratum_cli.py]"]
end

subgraph group_graph["Knowledge graph"]
  node_codeindex["Code index<br/>[veratum_cli.py]"]
  node_graphengine["Graph build and query<br/>[veratum_graph.py]"]
  node_graphexport["Graph exports<br/>[veratum_export.py]"]
end

subgraph group_state["Project state"]
  node_memory[("Project memory<br/>[brain.json]")]
end

node_agent(("Coding agent"))
node_workspace["Project workspace"]

node_agent -->|"requests work"| node_skill
node_skill -->|"guides workflow"| node_cli
node_agent -->|"invokes tools"| node_mcp
node_mcp -->|"dispatches commands"| node_cli
node_idehosts -->|"exposes tools"| node_mcp
node_idehosts -->|"runs hooks"| node_hooks
node_hooks -->|"delegates events"| node_cli
node_workspace -->|"receives changes"| node_cli
node_cli -->|"locks scope"| node_contracts
node_cli -->|"checks blast radius"| node_impact
node_cli -->|"creates checkpoints"| node_checkpoints
node_cli -->|"runs verification"| node_verification
node_verification -->|"gates completion"| node_agent
node_cli -->|"maintains memory"| node_memory
node_cli -->|"indexes workspace"| node_codeindex
node_cli -->|"loads graph commands"| node_graphengine
node_graphengine -->|"dispatches exports"| node_graphexport
node_agent -->|"queries graph"| node_graphengine
node_graphengine -->|"maps workspace"| node_workspace

click node_skill "https://github.com/yadavmandeep/veratum/blob/main/skills/veratum/SKILL.md"
click node_mcp "https://github.com/yadavmandeep/veratum/blob/main/engine/mcp_server.py"
click node_hooks "https://github.com/yadavmandeep/veratum/blob/main/adapters/antigravity/hooks/_veratum_bridge.py"
click node_cli "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py"
click node_contracts "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py"
click node_impact "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py"
click node_checkpoints "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py"
click node_verification "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py"
click node_memory "https://github.com/yadavmandeep/veratum/blob/main/.veratum/brain.json"
click node_codeindex "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py"
click node_graphengine "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_graph.py"
click node_graphexport "https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_export.py"
click node_idehosts "https://github.com/yadavmandeep/veratum/tree/main/adapters"

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_skill,node_mcp,node_hooks,node_idehosts toneBlue
class node_cli,node_contracts,node_impact,node_checkpoints,node_verification toneAmber
class node_codeindex,node_graphengine,node_graphexport toneMint
class node_memory toneRose
class node_agent,node_workspace toneIndigo
```

## Components

### Agent interfaces

- [Veratum skill](https://github.com/yadavmandeep/veratum/blob/main/skills/veratum/SKILL.md): `skills/veratum/SKILL.md`
- [MCP server](https://github.com/yadavmandeep/veratum/blob/main/engine/mcp_server.py): `engine/mcp_server.py`
- [Antigravity hooks](https://github.com/yadavmandeep/veratum/blob/main/adapters/antigravity/hooks/_veratum_bridge.py): `adapters/antigravity/hooks/_veratum_bridge.py`
- [Supported IDEs](https://github.com/yadavmandeep/veratum/tree/main/adapters): `adapters`

### Engineering workflow

- [Runtime CLI](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py): `engine/veratum_cli.py`
- [Scope contracts](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py): `engine/veratum_cli.py`
- [Impact analysis](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py): `engine/veratum_cli.py`
- [Shadow checkpoints](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py): `engine/veratum_cli.py`
- [Verification and gate](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py): `engine/veratum_cli.py`

### Knowledge graph

- [Code index](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_cli.py): `engine/veratum_cli.py`
- [Graph build and query](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_graph.py): `engine/veratum_graph.py`
- [Graph exports](https://github.com/yadavmandeep/veratum/blob/main/engine/veratum_export.py): `engine/veratum_export.py`

### Project state

- [Project memory](https://github.com/yadavmandeep/veratum/blob/main/.veratum/brain.json): `.veratum/brain.json`

### Other components

- **Coding agent**
- **Project workspace**

## Connections

- Coding agent → Veratum skill: requests work (evidence: `README.md`)
- Veratum skill → Runtime CLI: guides workflow (evidence: `README.md`)
- Coding agent → MCP server: invokes tools (evidence: `README.md`)
- MCP server → Runtime CLI: dispatches commands (evidence: `engine/mcp_server.py`)
- Supported IDEs → MCP server: exposes tools (evidence: `README.md`)
- Supported IDEs → Antigravity hooks: runs hooks (evidence: `README.md`)
- Antigravity hooks → Runtime CLI: delegates events (evidence: `adapters/antigravity/hooks/_veratum_bridge.py`)
- Project workspace → Runtime CLI: receives changes (evidence: `README.md`)
- Runtime CLI → Scope contracts: locks scope (evidence: `README.md`)
- Runtime CLI → Impact analysis: checks blast radius (evidence: `README.md`)
- Runtime CLI → Shadow checkpoints: creates checkpoints (evidence: `engine/veratum_cli.py`)
- Runtime CLI → Verification and gate: runs verification (evidence: `README.md`)
- Verification and gate → Coding agent: gates completion (evidence: `README.md`)
- Runtime CLI → Project memory: maintains memory (evidence: `README.md`)
- Runtime CLI → Code index: indexes workspace (evidence: `engine/veratum_cli.py`)
- Runtime CLI → Graph build and query: loads graph commands (evidence: `engine/veratum_graph.py`)
- Graph build and query → Graph exports: dispatches exports (evidence: `engine/veratum_export.py`)
- Coding agent → Graph build and query: queries graph (evidence: `README.md`)
- Graph build and query → Project workspace: maps workspace (evidence: `README.md`)
