# pronative-ai/loop-graph-engg architecture

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

- Interactive diagram: https://gitdiagram.com/pronative-ai/loop-graph-engg
- Repository: https://github.com/pronative-ai/loop-graph-engg

## Overview

This .NET console app demonstrates three agent-workflow patterns: iterative code repair, DAG-based multi-agent development, and a human-approved deployment gate. Users select a walkthrough in the console; the entry point configures the LLM client and tracing, then dispatches to the selected flow. The graph walkthrough coordinates specialist stages through a shared workflow engine and state, while governance pauses deployment for operator approval. The README documents several capabilities whose implementation details are only partly sampled; edges below reflect documented or excerpted relationships, not inferred wiring.

Main entry points: [`src/Program.cs`](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Program.cs) (Menu Runtime), [`src/GraphParadigm/GraphWorkflowWalkthrough.cs`](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs) (Graph Walkthrough), [`src/Governance/MiddlewareGuardrail.cs`](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Governance/MiddlewareGuardrail.cs) (Approval Guardrail), [`src/LoopParadigm/LoopAgentWalkthrough.cs`](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/LoopParadigm/LoopAgentWalkthrough.cs) (Loop Walkthrough)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Console Runtime"]
  node_program["Menu Runtime<br/>[Program.cs]"]
end

subgraph group_loop["Loop Engineering"]
  node_loopflow["Loop Walkthrough"]
  node_workspace["Diagnostic Workspace"]
  node_terminal["Command Execution"]
end

subgraph group_graph["Graph Engineering"]
  node_graphflow["Graph Walkthrough"]
  node_engine["Workflow Engine<br/>[WorkflowGraph.cs]"]
  node_state["Workflow State"]
  node_architect["Architect Stage"]
  node_coders["Parallel Coders"]
  node_reviewer["Reviewer Stage"]
  node_deployment["Deployment Stage"]
end

subgraph group_gov["Governance"]
  node_guardrail["Approval Guardrail"]
  node_checkpoint[("Approval Store")]
end

subgraph group_ops["Shared Services"]
  node_llmconfig["LLM Configuration"]
  node_logger["Console Presentation<br/>[ConsoleLogger.cs]"]
  node_telemetry["Trace Configuration"]
end

node_operator(("Console User"))
node_gateway["LLM Gateway"]
node_human(("Human Operator"))
node_collector["OTLP Collector"]

node_operator -->|"selects walkthrough"| node_program
node_program -->|"creates client"| node_llmconfig
node_llmconfig -->|"connects to"| node_gateway
node_program -->|"dispatches to"| node_loopflow
node_program -->|"dispatches to"| node_graphflow
node_program -->|"dispatches to"| node_guardrail
node_loopflow -->|"uses tools"| node_workspace
node_workspace -->|"requests evaluation"| node_gateway
node_loopflow -->|"uses execution tool"| node_terminal
node_graphflow -->|"configures workflow"| node_engine
node_graphflow -->|"initializes state"| node_state
node_graphflow -->|"defines stages"| node_architect
node_architect -->|"fans out parallel"| node_coders
node_coders -->|"joins at review"| node_reviewer
node_reviewer -->|"gates on approval"| node_deployment
node_guardrail -->|"registers middleware"| node_engine
node_guardrail -->|"records decision"| node_checkpoint
node_human -->|"approves or rejects"| node_checkpoint
node_guardrail -->|"intercepts transition"| node_deployment
node_program -->|"initializes tracing"| node_telemetry
node_telemetry -->|"exports traces"| node_collector
node_llmconfig -->|"instruments client"| node_telemetry
node_program -->|"prints menu"| node_logger

click node_program "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Program.cs"
click node_llmconfig "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/LlmConfiguration.cs"
click node_loopflow "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/LoopParadigm/LoopAgentWalkthrough.cs"
click node_workspace "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/LoopParadigm/LoopDiagnosticWorkspace.cs"
click node_terminal "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/TerminalExecutionTool.cs"
click node_graphflow "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs"
click node_engine "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/WorkflowGraph.cs"
click node_state "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/CodingProjectState.cs"
click node_architect "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs"
click node_coders "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs"
click node_reviewer "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs"
click node_deployment "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs"
click node_guardrail "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Governance/MiddlewareGuardrail.cs"
click node_checkpoint "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/HumanCheckpointStore.cs"
click node_logger "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Shared/ConsoleLogger.cs"
click node_telemetry "https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Shared/TelemetryConfiguration.cs"

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_program,node_operator toneBlue
class node_loopflow,node_workspace,node_terminal toneAmber
class node_graphflow,node_engine,node_state,node_architect,node_coders,node_reviewer,node_deployment toneMint
class node_guardrail,node_checkpoint toneRose
class node_llmconfig,node_logger,node_telemetry,node_gateway,node_human,node_collector toneIndigo
```

## Components

### Console Runtime

- [Menu Runtime](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Program.cs): `src/Program.cs`

### Loop Engineering

- [Loop Walkthrough](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/LoopParadigm/LoopAgentWalkthrough.cs): `src/LoopParadigm/LoopAgentWalkthrough.cs`
- [Diagnostic Workspace](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/LoopParadigm/LoopDiagnosticWorkspace.cs): `src/LoopParadigm/LoopDiagnosticWorkspace.cs`
- [Command Execution](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/TerminalExecutionTool.cs): `src/TerminalExecutionTool.cs`

### Graph Engineering

- [Graph Walkthrough](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs): `src/GraphParadigm/GraphWorkflowWalkthrough.cs`
- [Workflow Engine](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/WorkflowGraph.cs): `src/WorkflowGraph.cs`
- [Workflow State](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/CodingProjectState.cs): `src/CodingProjectState.cs`
- [Architect Stage](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs): `src/GraphParadigm/GraphWorkflowWalkthrough.cs`
- [Parallel Coders](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs): `src/GraphParadigm/GraphWorkflowWalkthrough.cs`
- [Reviewer Stage](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs): `src/GraphParadigm/GraphWorkflowWalkthrough.cs`
- [Deployment Stage](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/GraphParadigm/GraphWorkflowWalkthrough.cs): `src/GraphParadigm/GraphWorkflowWalkthrough.cs`

### Governance

- [Approval Guardrail](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Governance/MiddlewareGuardrail.cs): `src/Governance/MiddlewareGuardrail.cs`
- [Approval Store](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/HumanCheckpointStore.cs): `src/HumanCheckpointStore.cs`

### Shared Services

- [LLM Configuration](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/LlmConfiguration.cs): `src/LlmConfiguration.cs`
- [Console Presentation](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Shared/ConsoleLogger.cs): `src/Shared/ConsoleLogger.cs`
- [Trace Configuration](https://github.com/pronative-ai/loop-graph-engg/blob/main/src/Shared/TelemetryConfiguration.cs): `src/Shared/TelemetryConfiguration.cs`

### Other components

- **Console User**
- **LLM Gateway**
- **Human Operator**
- **OTLP Collector**

## Connections

- Console User → Menu Runtime: selects walkthrough (evidence: `src/Program.cs`)
- Menu Runtime → LLM Configuration: creates client (evidence: `src/Program.cs`)
- LLM Configuration → LLM Gateway: connects to (evidence: `src/LlmConfiguration.cs`)
- Menu Runtime → Loop Walkthrough: dispatches to (evidence: `src/Program.cs`)
- Menu Runtime → Graph Walkthrough: dispatches to (evidence: `src/Program.cs`)
- Menu Runtime → Approval Guardrail: dispatches to (evidence: `src/Program.cs`)
- Loop Walkthrough → Diagnostic Workspace: uses tools (evidence: `src/LoopParadigm/LoopAgentWalkthrough.cs`)
- Diagnostic Workspace → LLM Gateway: requests evaluation (evidence: `src/LoopParadigm/LoopDiagnosticWorkspace.cs`)
- Loop Walkthrough → Command Execution: uses execution tool (evidence: `src/TerminalExecutionTool.cs`)
- Graph Walkthrough → Workflow Engine: configures workflow (evidence: `README.md`)
- Graph Walkthrough → Workflow State: initializes state (evidence: `src/GraphParadigm/GraphWorkflowWalkthrough.cs`)
- Graph Walkthrough → Architect Stage: defines stages (evidence: `README.md`)
- Architect Stage → Parallel Coders: fans out parallel (evidence: `src/GraphParadigm/GraphWorkflowWalkthrough.cs`)
- Parallel Coders → Reviewer Stage: joins at review (evidence: `README.md`)
- Reviewer Stage → Deployment Stage: gates on approval (evidence: `src/GraphParadigm/GraphWorkflowWalkthrough.cs`)
- Approval Guardrail → Workflow Engine: registers middleware (evidence: `src/Governance/MiddlewareGuardrail.cs`)
- Approval Guardrail → Approval Store: records decision (evidence: `src/Governance/MiddlewareGuardrail.cs`)
- Human Operator → Approval Store: approves or rejects (evidence: `src/HumanCheckpointStore.cs`)
- Approval Guardrail → Deployment Stage: intercepts transition (evidence: `src/Governance/MiddlewareGuardrail.cs`)
- Menu Runtime → Trace Configuration: initializes tracing (evidence: `src/Program.cs`)
- Trace Configuration → OTLP Collector: exports traces (evidence: `src/Shared/TelemetryConfiguration.cs`)
- LLM Configuration → Trace Configuration: instruments client (evidence: `src/LlmConfiguration.cs`)
- Menu Runtime → Console Presentation: prints menu (evidence: `src/Program.cs`)
