# ramachandrapetla/agentconflictbench architecture

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

- Interactive diagram: https://gitdiagram.com/ramachandrapetla/agentconflictbench
- Repository: https://github.com/ramachandrapetla/agentconflictbench

## Overview

AgentConflictBench is a research dataset and reproduction benchmark for detecting semantic failures when independently valid code patches are composed. Its central workflow selects an instance, applies each patch and the combined patch to a pinned upstream checkout, and checks the individual and composition oracles. The repository also provides dataset validation, metadata checks, Hugging Face export, and baseline feature/classifier analysis. The graph reflects documented workflows and sampled script behavior; it does not infer connections among unsampled instance contents.

Main entry points: [`instances/index.json`](https://github.com/ramachandrapetla/agentconflictbench/blob/main/instances/index.json) (Instance index), [`scripts/run_instance.py`](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/run_instance.py) (Instance runner), [`scripts/export_huggingface_dataset.py`](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/export_huggingface_dataset.py) (Hugging Face export), [`scripts/baseline_features.py`](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/baseline_features.py) (Baseline features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_benchmark["Benchmark data"]
  node_index["Instance index<br/>[index.json]"]
  node_instances["Patch instances"]
  node_schema["Metadata schema"]
end

subgraph group_reproduction["Reproduction"]
  node_runner["Instance runner<br/>[run_instance.py]"]
  node_checkout["Upstream checkout"]
end

subgraph group_quality["Dataset quality"]
  node_dataset_check["Dataset reproduction"]
  node_metadata_check["Metadata validation"]
  node_completeness["Instance completeness"]
end

subgraph group_research["Analysis and export"]
  node_features["Baseline features"]
  node_classifier["Baseline classifier"]
  node_dataset_stats["Dataset statistics<br/>[dataset_stats.py]"]
  node_table["Paper dataset table"]
  node_hf_export["Hugging Face export"]
  node_hf_dataset["Dataset package"]
end

node_researcher(("Benchmark user"))

node_researcher -->|"runs instance"| node_runner
node_runner -->|"reads patches and oracles"| node_instances
node_runner -->|"applies and tests"| node_checkout
node_dataset_check -->|"delegates reproduction"| node_runner
node_metadata_check -->|"validates against"| node_schema
node_completeness -->|"checks indexed instances"| node_index
node_features -->|"loads instances"| node_index
node_features -->|"reads tasks and patches"| node_instances
node_classifier -->|"scores feature rows"| node_features
node_dataset_stats -->|"summarizes instances"| node_index
node_table -->|"renders instance table"| node_index
node_hf_export -->|"loads dataset entries"| node_index
node_hf_export -->|"collects instance content"| node_instances
node_hf_export -->|"writes package"| node_hf_dataset

click node_index "https://github.com/ramachandrapetla/agentconflictbench/blob/main/instances/index.json"
click node_instances "https://github.com/ramachandrapetla/agentconflictbench/tree/main/instances"
click node_schema "https://github.com/ramachandrapetla/agentconflictbench/blob/main/schema/metadata.schema.json"
click node_runner "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/run_instance.py"
click node_dataset_check "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/validate_dataset.py"
click node_metadata_check "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/validate_metadata.py"
click node_completeness "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/check_instance_completeness.py"
click node_features "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/baseline_features.py"
click node_classifier "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/baseline_classifier.py"
click node_dataset_stats "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/dataset_stats.py"
click node_table "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/generate_dataset_table.py"
click node_hf_export "https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/export_huggingface_dataset.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_index,node_instances,node_schema,node_researcher toneBlue
class node_runner,node_checkout toneAmber
class node_dataset_check,node_metadata_check,node_completeness toneMint
class node_features,node_classifier,node_dataset_stats,node_table,node_hf_export,node_hf_dataset toneRose
```

## Components

### Benchmark data

- [Instance index](https://github.com/ramachandrapetla/agentconflictbench/blob/main/instances/index.json): `instances/index.json`
- [Patch instances](https://github.com/ramachandrapetla/agentconflictbench/tree/main/instances): `instances`
- [Metadata schema](https://github.com/ramachandrapetla/agentconflictbench/blob/main/schema/metadata.schema.json): `schema/metadata.schema.json`

### Reproduction

- [Instance runner](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/run_instance.py): `scripts/run_instance.py`
- **Upstream checkout**

### Dataset quality

- [Dataset reproduction](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/validate_dataset.py): `scripts/validate_dataset.py`
- [Metadata validation](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/validate_metadata.py): `scripts/validate_metadata.py`
- [Instance completeness](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/check_instance_completeness.py): `scripts/check_instance_completeness.py`

### Analysis and export

- [Baseline features](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/baseline_features.py): `scripts/baseline_features.py`
- [Baseline classifier](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/baseline_classifier.py): `scripts/baseline_classifier.py`
- [Dataset statistics](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/dataset_stats.py): `scripts/dataset_stats.py`
- [Paper dataset table](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/generate_dataset_table.py): `scripts/generate_dataset_table.py`
- [Hugging Face export](https://github.com/ramachandrapetla/agentconflictbench/blob/main/scripts/export_huggingface_dataset.py): `scripts/export_huggingface_dataset.py`
- **Dataset package**

### Other components

- **Benchmark user**

## Connections

- Benchmark user → Instance runner: runs instance (evidence: `README.md`)
- Instance runner → Patch instances: reads patches and oracles (evidence: `README.md`)
- Instance runner → Upstream checkout: applies and tests (evidence: `README.md`)
- Dataset reproduction → Instance runner: delegates reproduction (evidence: `scripts/validate_dataset.py`)
- Metadata validation → Metadata schema: validates against (evidence: `scripts/validate_metadata.py`)
- Instance completeness → Instance index: checks indexed instances (evidence: `scripts/check_instance_completeness.py`)
- Baseline features → Instance index: loads instances (evidence: `scripts/baseline_features.py`)
- Baseline features → Patch instances: reads tasks and patches (evidence: `scripts/baseline_features.py`)
- Baseline classifier → Baseline features: scores feature rows (evidence: `scripts/baseline_classifier.py`)
- Dataset statistics → Instance index: summarizes instances (evidence: `scripts/dataset_stats.py`)
- Paper dataset table → Instance index: renders instance table (evidence: `scripts/generate_dataset_table.py`)
- Hugging Face export → Instance index: loads dataset entries (evidence: `scripts/export_huggingface_dataset.py`)
- Hugging Face export → Patch instances: collects instance content (evidence: `scripts/export_huggingface_dataset.py`)
- Hugging Face export → Dataset package: writes package (evidence: `scripts/export_huggingface_dataset.py`)
