# shashuec/conversai-coding-agent-challenge architecture

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

- Interactive diagram: https://gitdiagram.com/shashuec/conversai-coding-agent-challenge
- Repository: https://github.com/shashuec/conversai-coding-agent-challenge

## Overview

This repository presents a coding-agent challenge: the product is an agent that uses a supplied model and constrained repository tools to solve issue-style tasks. Its intended workflow is to inspect and focus source context, request and validate edits, run tests, use failures for repair, then stop. The README documents the interfaces and runner behavior; the agent and runtime source were not sampled, so internal call wiring is limited to those documented contracts.

Main entry points: [`agent.py`](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py) (Solve loop), [`runtime.py`](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/runtime.py) (Repository tools), [`run_practice.py`](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/run_practice.py) (Challenge runner), [`practice-repo`](https://github.com/shashuec/conversai-coding-agent-challenge/tree/main/practice-repo) (Task repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Agent orchestration"]
  node_solve["Solve loop<br/>[agent.py]"]
  node_context["Context selection<br/>[agent.py]"]
  node_edit["Edit validation<br/>[agent.py]"]
  node_stopping["Retry and stopping<br/>[agent.py]"]
end

subgraph group_interfaces["Supplied interfaces"]
  node_tools["Repository tools<br/>[runtime.py]"]
  node_repo["Task repository"]
  node_tests["Test execution<br/>[runtime.py]"]
end

subgraph group_evaluation["Task evaluation"]
  node_runner["Challenge runner<br/>[run_practice.py]"]
end

node_task_author(("Task author"))
node_model(("Fixed model"))

node_task_author -->|"submits task"| node_runner
node_runner -->|"calls solve"| node_solve
node_solve -->|"selects context"| node_context
node_context -->|"inspects files"| node_tools
node_tools -->|"reads files"| node_repo
node_solve -->|"asks model"| node_model
node_model -->|"returns proposal"| node_solve
node_solve -->|"validates edits"| node_edit
node_edit -->|"writes patches"| node_tools
node_tools -->|"changes source"| node_repo
node_solve -->|"runs tests"| node_tools
node_tools -->|"executes tests"| node_tests
node_tests -->|"returns failures"| node_solve
node_solve -->|"checks progress"| node_stopping

click node_runner "https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/run_practice.py"
click node_solve "https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py"
click node_context "https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py"
click node_edit "https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py"
click node_stopping "https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py"
click node_tools "https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/runtime.py"
click node_repo "https://github.com/shashuec/conversai-coding-agent-challenge/tree/main/practice-repo"
click node_tests "https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/runtime.py"

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_solve,node_context,node_edit,node_stopping toneBlue
class node_tools,node_repo,node_tests toneAmber
class node_runner toneMint
class node_task_author toneRose
class node_model toneIndigo
```

## Components

### Agent orchestration

- [Solve loop](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py): `agent.py`
- [Context selection](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py): `agent.py`
- [Edit validation](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py): `agent.py`
- [Retry and stopping](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/agent.py): `agent.py`

### Supplied interfaces

- [Repository tools](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/runtime.py): `runtime.py`
- [Task repository](https://github.com/shashuec/conversai-coding-agent-challenge/tree/main/practice-repo): `practice-repo`
- [Test execution](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/runtime.py): `runtime.py`

### Task evaluation

- [Challenge runner](https://github.com/shashuec/conversai-coding-agent-challenge/blob/main/run_practice.py): `run_practice.py`

### Other components

- **Task author**
- **Fixed model**

## Connections

- Task author → Challenge runner: submits task
- Challenge runner → Solve loop: calls solve
- Solve loop → Context selection: selects context
- Context selection → Repository tools: inspects files
- Repository tools → Task repository: reads files
- Solve loop → Fixed model: asks model
- Fixed model → Solve loop: returns proposal
- Solve loop → Edit validation: validates edits
- Edit validation → Repository tools: writes patches
- Repository tools → Task repository: changes source
- Solve loop → Repository tools: runs tests
- Repository tools → Test execution: executes tests
- Test execution → Solve loop: returns failures
- Solve loop → Retry and stopping: checks progress
