# vivek5200/ouroboros-v7 architecture

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

- Interactive diagram: https://gitdiagram.com/vivek5200/ouroboros-v7
- Repository: https://github.com/vivek5200/ouroboros-v7

## Overview

Ouroboros v7.1 coordinates constraint-checked code changes across three specialist agents and their sibling repositories, while a supervised GPU worker runs alongside the orchestrator. The main workflow is intent validation, specialist dispatch, and repository changes; crash detection adds persistent learning and worker recovery. README documentation supplies several relationships and capabilities not visible in the sampled bridge source, so those links reflect documentation rather than inspected call sites. The optional Agent Virtual Office integration is shown separately.

Main entry points: [`bin/ecc`](https://github.com/vivek5200/ouroboros-v7/blob/main/bin/ecc) (ECC Orchestrator), [`docker/supervisord.conf`](https://github.com/vivek5200/ouroboros-v7/blob/main/docker/supervisord.conf) (Process Supervisor), [`.ecc/hooks/post_tool_use.py`](https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/hooks/post_tool_use.py) (Crash Detection Hook), [`bin/office_bridge.py`](https://github.com/vivek5200/ouroboros-v7/blob/main/bin/office_bridge.py) (Office Bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_launch["Runtime Launcher<br/>[launch.sh]"]
  node_supervisor["Process Supervisor<br/>[supervisord.conf]"]
  node_ecc["ECC Orchestrator"]
  node_config["Agent Configuration<br/>[config.yaml]"]
  node_tdd["TDD Specialist<br/>[config.yaml]"]
  node_systems["Systems Specialist<br/>[config.yaml]"]
  node_rust["Rust Specialist<br/>[config.yaml]"]
  node_reports["Agent Reports<br/>[reports]"]
end

subgraph group_validation["Constraint Validation"]
  node_codegraph["Codegraph MCP"]
  node_laws["Architectural Laws<br/>[laws.json]"]
  node_context7["Context7 MCP"]
end

subgraph group_execution["Execution and Recovery"]
  node_core["Core Repository"]
  node_triton["Triton Repository"]
  node_dfg["DFG Repository"]
  node_worker["Triton Worker"]
  node_hook["Crash Detection Hook<br/>[post_tool_use.py]"]
  node_instincts["Crash Instincts"]
end

subgraph group_visibility["Optional Visualization"]
  node_office["Office Bridge<br/>[office_bridge.py]"]
end

node_user(("Engineer"))
node_api["Ox Alpha API"]
node_office_service["Agent Virtual Office"]

node_user -->|"starts runtime"| node_launch
node_launch -->|"starts processes"| node_supervisor
node_supervisor -->|"starts orchestrator"| node_ecc
node_supervisor -->|"starts and restarts"| node_worker
node_ecc -->|"requests model"| node_api
node_ecc -->|"loads agents"| node_config
node_ecc -->|"validates constraints"| node_codegraph
node_codegraph -->|"checks laws"| node_laws
node_ecc -->|"looks up documentation"| node_context7
node_ecc -->|"dispatches work"| node_tdd
node_ecc -->|"dispatches work"| node_systems
node_ecc -->|"dispatches work"| node_rust
node_tdd -->|"changes code"| node_core
node_systems -->|"changes code"| node_triton
node_rust -->|"changes code"| node_dfg
node_ecc -->|"records reports"| node_reports
node_hook -->|"records crashes"| node_instincts
node_hook -->|"triggers restart"| node_supervisor
node_ecc -.->|"pushes status"| node_office
node_hook -.->|"pushes incidents"| node_office
node_office -.->|"posts updates"| node_office_service

click node_launch "https://github.com/vivek5200/ouroboros-v7/blob/main/launch.sh"
click node_supervisor "https://github.com/vivek5200/ouroboros-v7/blob/main/docker/supervisord.conf"
click node_ecc "https://github.com/vivek5200/ouroboros-v7/blob/main/bin/ecc"
click node_config "https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml"
click node_codegraph "https://github.com/vivek5200/ouroboros-v7/blob/main/.mcp/servers/codegraph_server.py"
click node_laws "https://github.com/vivek5200/ouroboros-v7/blob/main/memory_seeds/laws.json"
click node_tdd "https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml"
click node_systems "https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml"
click node_rust "https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml"
click node_worker "https://github.com/vivek5200/ouroboros-v7/blob/main/bin/ouroboros-worker"
click node_hook "https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/hooks/post_tool_use.py"
click node_office "https://github.com/vivek5200/ouroboros-v7/blob/main/bin/office_bridge.py"
click node_reports "https://github.com/vivek5200/ouroboros-v7/tree/main/.ecc/reports"

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_launch,node_supervisor,node_ecc,node_config,node_tdd,node_systems,node_rust,node_reports toneBlue
class node_codegraph,node_laws,node_context7 toneAmber
class node_core,node_triton,node_dfg,node_worker,node_hook,node_instincts,node_api toneMint
class node_office toneRose
class node_user,node_office_service toneIndigo
```

## Components

### Orchestration

- [Runtime Launcher](https://github.com/vivek5200/ouroboros-v7/blob/main/launch.sh): `launch.sh`
- [Process Supervisor](https://github.com/vivek5200/ouroboros-v7/blob/main/docker/supervisord.conf): `docker/supervisord.conf`
- [ECC Orchestrator](https://github.com/vivek5200/ouroboros-v7/blob/main/bin/ecc): `bin/ecc`
- [Agent Configuration](https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml): `.ecc/config.yaml`
- [TDD Specialist](https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml): `.ecc/config.yaml`
- [Systems Specialist](https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml): `.ecc/config.yaml`
- [Rust Specialist](https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/config.yaml): `.ecc/config.yaml`
- [Agent Reports](https://github.com/vivek5200/ouroboros-v7/tree/main/.ecc/reports): `.ecc/reports`

### Constraint Validation

- [Codegraph MCP](https://github.com/vivek5200/ouroboros-v7/blob/main/.mcp/servers/codegraph_server.py): `.mcp/servers/codegraph_server.py`
- [Architectural Laws](https://github.com/vivek5200/ouroboros-v7/blob/main/memory_seeds/laws.json): `memory_seeds/laws.json`
- **Context7 MCP**

### Execution and Recovery

- **Core Repository**
- **Triton Repository**
- **DFG Repository**
- [Triton Worker](https://github.com/vivek5200/ouroboros-v7/blob/main/bin/ouroboros-worker): `bin/ouroboros-worker`
- [Crash Detection Hook](https://github.com/vivek5200/ouroboros-v7/blob/main/.ecc/hooks/post_tool_use.py): `.ecc/hooks/post_tool_use.py`
- **Crash Instincts**

### Optional Visualization

- [Office Bridge](https://github.com/vivek5200/ouroboros-v7/blob/main/bin/office_bridge.py): `bin/office_bridge.py`

### Other components

- **Engineer**
- **Ox Alpha API**
- **Agent Virtual Office**

## Connections

- Engineer → Runtime Launcher: starts runtime
- Runtime Launcher → Process Supervisor: starts processes
- Process Supervisor → ECC Orchestrator: starts orchestrator
- Process Supervisor → Triton Worker: starts and restarts
- ECC Orchestrator → Ox Alpha API: requests model
- ECC Orchestrator → Agent Configuration: loads agents
- ECC Orchestrator → Codegraph MCP: validates constraints
- Codegraph MCP → Architectural Laws: checks laws
- ECC Orchestrator → Context7 MCP: looks up documentation
- ECC Orchestrator → TDD Specialist: dispatches work
- ECC Orchestrator → Systems Specialist: dispatches work
- ECC Orchestrator → Rust Specialist: dispatches work
- TDD Specialist → Core Repository: changes code
- Systems Specialist → Triton Repository: changes code
- Rust Specialist → DFG Repository: changes code
- ECC Orchestrator → Agent Reports: records reports
- Crash Detection Hook → Crash Instincts: records crashes
- Crash Detection Hook → Process Supervisor: triggers restart
- ECC Orchestrator → Office Bridge: pushes status
- Crash Detection Hook → Office Bridge: pushes incidents
- Office Bridge → Agent Virtual Office: posts updates
