# synthiaresearch/goldilocks-bench-lite architecture

> Architecture diagram of the GitHub repository synthiaresearch/goldilocks-bench-lite, 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/synthiaresearch/goldilocks-bench-lite
- Repository: https://github.com/synthiaresearch/goldilocks-bench-lite

## Overview

Goldilocks Bench Lite evaluates whether coding agents fix warranted issues while leaving protected code untouched. The main workflow runs an agent against a task repository, grades its change against hidden behavioral and preservation checks, then aggregates run scores into act (A) and restraint (R). The task corpus spans TinyDB, JMESPath, and boltons. The README documents these capabilities; source excerpts are limited to TinyDB storage and database code, so task-internal runtime wiring is not expanded here.

Main entry points: [`scripts/run.py`](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/scripts/run.py) (Model runner), [`src/goldilocks/grade.py`](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/grade.py) (Change grader), [`src/goldilocks/adapter.py`](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/adapter.py) (Agent adapter), [`scripts/score.py`](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/scripts/score.py) (Score aggregator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runner["Agent Runs"]
  node_run["Model runner<br/>[run.py]"]
  node_adapter["Agent adapter<br/>[adapter.py]"]
end

subgraph group_corpus["Task Corpus"]
  node_tinydb["TinyDB tasks"]
  node_jmespath["JMESPath tasks"]
  node_boltons["boltons tasks"]
end

subgraph group_grading["Scoring"]
  node_baselines["Baseline policies<br/>[baselines.py]"]
  node_grader["Change grader<br/>[grade.py]"]
  node_score["Score aggregator<br/>[score.py]"]
end

node_user(("Benchmark user"))
node_model{{"Model API"}}
node_results["Run results"]
node_checks["Hidden checks"]

node_user -->|"starts run"| node_run
node_run -->|"invokes"| node_adapter
node_adapter -->|"requests completion"| node_model
node_run -->|"selects task"| node_tinydb
node_run -->|"selects task"| node_jmespath
node_run -->|"selects task"| node_boltons
node_run -->|"grades change"| node_grader
node_grader -->|"evaluates against"| node_checks
node_baselines -->|"supplies policies"| node_grader
node_run -->|"writes runs"| node_results
node_user -->|"requests scores"| node_score
node_score -->|"reads runs"| node_results

click node_run "https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/scripts/run.py"
click node_adapter "https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/adapter.py"
click node_tinydb "https://github.com/synthiaresearch/goldilocks-bench-lite/tree/main/tasks/gb-lad-d03/repo/tinydb"
click node_jmespath "https://github.com/synthiaresearch/goldilocks-bench-lite/tree/main/tasks/jm-gb-lad-e03/repo/jmespath"
click node_boltons "https://github.com/synthiaresearch/goldilocks-bench-lite/tree/main/tasks/bo-gb-lad-d05/repo/boltons"
click node_baselines "https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/baselines.py"
click node_grader "https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/grade.py"
click node_score "https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/scripts/score.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_run,node_adapter,node_user toneBlue
class node_tinydb,node_jmespath,node_boltons toneAmber
class node_baselines,node_grader,node_score,node_model toneMint
class node_results,node_checks toneIndigo
```

## Components

### Agent Runs

- [Model runner](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/scripts/run.py): `scripts/run.py`
- [Agent adapter](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/adapter.py): `src/goldilocks/adapter.py`

### Task Corpus

- [TinyDB tasks](https://github.com/synthiaresearch/goldilocks-bench-lite/tree/main/tasks/gb-lad-d03/repo/tinydb): `tasks/gb-lad-d03/repo/tinydb`
- [JMESPath tasks](https://github.com/synthiaresearch/goldilocks-bench-lite/tree/main/tasks/jm-gb-lad-e03/repo/jmespath): `tasks/jm-gb-lad-e03/repo/jmespath`
- [boltons tasks](https://github.com/synthiaresearch/goldilocks-bench-lite/tree/main/tasks/bo-gb-lad-d05/repo/boltons): `tasks/bo-gb-lad-d05/repo/boltons`

### Scoring

- [Baseline policies](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/baselines.py): `src/goldilocks/baselines.py`
- [Change grader](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/src/goldilocks/grade.py): `src/goldilocks/grade.py`
- [Score aggregator](https://github.com/synthiaresearch/goldilocks-bench-lite/blob/main/scripts/score.py): `scripts/score.py`

### Other components

- **Benchmark user**
- **Model API**
- **Run results**
- **Hidden checks**

## Connections

- Benchmark user → Model runner: starts run
- Model runner → Agent adapter: invokes
- Agent adapter → Model API: requests completion
- Model runner → TinyDB tasks: selects task
- Model runner → JMESPath tasks: selects task
- Model runner → boltons tasks: selects task
- Model runner → Change grader: grades change
- Change grader → Hidden checks: evaluates against
- Baseline policies → Change grader: supplies policies
- Model runner → Run results: writes runs
- Benchmark user → Score aggregator: requests scores
- Score aggregator → Run results: reads runs
