# mathming/hks930 architecture

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

- Interactive diagram: https://gitdiagram.com/mathming/hks930
- Repository: https://github.com/mathming/hks930

## Overview

ARC-Bench Agent is an Octos-based adapter that turns benchmark requirements into a generated web application and checks requirement acceptance. The main flow is documented as runner input through the Octos pipeline, with per-requirement verification; local tools also provide setup, grading, and coverage auditing. The README and excerpts establish the adapter/runtime, policy, prompts, and starter-template roles. Source excerpts are partial, so unshown pipeline internals and connections are omitted.

Main entry points: [`arc/main.py`](https://github.com/mathming/hks930/blob/main/arc/main.py) (ARC Adapter), [`arc/run-task-local.py`](https://github.com/mathming/hks930/blob/main/arc/run-task-local.py) (Local Task Runner), [`arc/verify_node.py`](https://github.com/mathming/hks930/blob/main/arc/verify_node.py) (Requirement Verifier), [`arc/grade-local.py`](https://github.com/mathming/hks930/blob/main/arc/grade-local.py) (Local Grader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Agent Execution"]
  node_main["ARC Adapter<br/>[main.py]"]
  node_policy["Execution Policy<br/>[arc-policy.toml]"]
  node_prompts["Agent Prompts"]
  node_octos["Octos Runtime"]
  node_stdio["Octos Protocol<br/>[octos_stdio.py]"]
  node_starter["Web Starter"]
end

subgraph group_acceptance["Acceptance Checks"]
  node_verifier["Requirement Verifier<br/>[verify_node.py]"]
  node_public_specs["Browser Specs"]
end

subgraph group_local["Local Evaluation"]
  node_local_runner["Local Task Runner<br/>[run-task-local.py]"]
  node_api_config["API Settings"]
  node_runtime_env["Runtime Environment<br/>[local_runtime.py]"]
  node_grader["Local Grader<br/>[grade-local.py]"]
  node_coverage["Coverage Audit<br/>[github_eval.py]"]
end

node_runner(("Benchmark Runner"))
node_app["Generated Web App"]

node_runner -->|"provides requirements"| node_main
node_main -->|"runs pipeline"| node_octos
node_main -->|"uses policy"| node_policy
node_main -->|"uses prompts"| node_prompts
node_main -->|"connects through"| node_stdio
node_main -->|"uses starter"| node_starter
node_octos -->|"generates"| node_app
node_main -->|"checks acceptance"| node_verifier
node_verifier -->|"verifies"| node_app
node_verifier -.->|"runs specs"| node_public_specs
node_local_runner -->|"launches"| node_main
node_local_runner -->|"resolves settings"| node_api_config
node_local_runner -->|"sets environment"| node_runtime_env
node_grader -.->|"grades"| node_app
node_grader -->|"audits coverage"| node_coverage

click node_main "https://github.com/mathming/hks930/blob/main/arc/main.py"
click node_policy "https://github.com/mathming/hks930/blob/main/arc/arc-policy.toml"
click node_prompts "https://github.com/mathming/hks930/tree/main/arc/prompts"
click node_stdio "https://github.com/mathming/hks930/blob/main/arc/octos_stdio.py"
click node_starter "https://github.com/mathming/hks930/tree/main/arc/template"
click node_verifier "https://github.com/mathming/hks930/blob/main/arc/verify_node.py"
click node_public_specs "https://github.com/mathming/hks930/tree/main/arc/public-tests"
click node_local_runner "https://github.com/mathming/hks930/blob/main/arc/run-task-local.py"
click node_api_config "https://github.com/mathming/hks930/blob/main/arc/local_api_config.py"
click node_runtime_env "https://github.com/mathming/hks930/blob/main/arc/local_runtime.py"
click node_grader "https://github.com/mathming/hks930/blob/main/arc/grade-local.py"
click node_coverage "https://github.com/mathming/hks930/blob/main/arc/github_eval.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_main,node_policy,node_prompts,node_octos,node_stdio,node_starter toneBlue
class node_verifier,node_public_specs toneAmber
class node_local_runner,node_api_config,node_runtime_env,node_grader,node_coverage toneMint
class node_runner,node_app toneIndigo
```

## Components

### Agent Execution

- [ARC Adapter](https://github.com/mathming/hks930/blob/main/arc/main.py): `arc/main.py`
- [Execution Policy](https://github.com/mathming/hks930/blob/main/arc/arc-policy.toml): `arc/arc-policy.toml`
- [Agent Prompts](https://github.com/mathming/hks930/tree/main/arc/prompts): `arc/prompts`
- **Octos Runtime**
- [Octos Protocol](https://github.com/mathming/hks930/blob/main/arc/octos_stdio.py): `arc/octos_stdio.py`
- [Web Starter](https://github.com/mathming/hks930/tree/main/arc/template): `arc/template`

### Acceptance Checks

- [Requirement Verifier](https://github.com/mathming/hks930/blob/main/arc/verify_node.py): `arc/verify_node.py`
- [Browser Specs](https://github.com/mathming/hks930/tree/main/arc/public-tests): `arc/public-tests`

### Local Evaluation

- [Local Task Runner](https://github.com/mathming/hks930/blob/main/arc/run-task-local.py): `arc/run-task-local.py`
- [API Settings](https://github.com/mathming/hks930/blob/main/arc/local_api_config.py): `arc/local_api_config.py`
- [Runtime Environment](https://github.com/mathming/hks930/blob/main/arc/local_runtime.py): `arc/local_runtime.py`
- [Local Grader](https://github.com/mathming/hks930/blob/main/arc/grade-local.py): `arc/grade-local.py`
- [Coverage Audit](https://github.com/mathming/hks930/blob/main/arc/github_eval.py): `arc/github_eval.py`

### Other components

- **Benchmark Runner**
- **Generated Web App**

## Connections

- Benchmark Runner → ARC Adapter: provides requirements (evidence: `README.md`)
- ARC Adapter → Octos Runtime: runs pipeline (evidence: `README.md`)
- ARC Adapter → Execution Policy: uses policy (evidence: `README.md`)
- ARC Adapter → Agent Prompts: uses prompts (evidence: `README.md`)
- ARC Adapter → Octos Protocol: connects through (evidence: `arc/main.py`)
- ARC Adapter → Web Starter: uses starter (evidence: `README.md`)
- Octos Runtime → Generated Web App: generates (evidence: `README.md`)
- ARC Adapter → Requirement Verifier: checks acceptance (evidence: `README.md`)
- Requirement Verifier → Generated Web App: verifies (evidence: `arc/verify_node.py`)
- Requirement Verifier → Browser Specs: runs specs
- Local Task Runner → ARC Adapter: launches (evidence: `arc/run-task-local.py`)
- Local Task Runner → API Settings: resolves settings (evidence: `arc/run-task-local.py`)
- Local Task Runner → Runtime Environment: sets environment (evidence: `arc/run-task-local.py`)
- Local Grader → Generated Web App: grades
- Local Grader → Coverage Audit: audits coverage (evidence: `arc/grade-local.py`)
