Title: SUMO Urban AM Peak Calibration
Domain: engineering — Urban & Spatial Planning

Summary: Repair and calibrate a submitted SUMO 1.26 AM-peak microsimulation package for a synthetic downtown network, then export the required submission tree and calibration report.

Task prompt:
You are working on a Linux VM to build a calibrated SUMO AM-peak submission for an urban grid sub-network.

Visible task files:
- `base/input/task_prompt.md`
- `base/input/calibration_report.schema.json`
- `base/input/output_contract.json`
- `base/input/examples/report_template.example.json`
- `base/input/starter_project/`
- `base/input/runtime_env/`
- `base/software/bootstrap_uv_env.sh`
- `base/software/python_with_task_deps.sh`
- `base/software/run_in_task_env.sh`

What you must do:
1. Read `base/input/task_prompt.md` and `base/input/output_contract.json` first.
2. Use the visible starter project under `base/input/starter_project` to repair the broken SUMO configuration, demand, signal timing, and vehicle-type setup.
3. If you want the staged Python environment, materialize it with `base/software/bootstrap_uv_env.sh` and run Python with `base/software/python_with_task_deps.sh`. Use `base/software/run_in_task_env.sh` for SUMO-facing commands inside that task-local environment.
4. Write the final submission tree under `base/output` with the required files at the documented locations.

Required output files:
- `base/output/network.net.xml`
- `base/output/additionals/bus_stops.add.xml`
- `base/output/additionals/tlsLogic.add.xml`
- `base/output/additionals/vtypes.add.xml`
- `base/output/demand/calibrated_od.xml`
- `base/output/demand/routes.rou.xml`
- `base/output/simulation/sumocfg.sumocfg`
- `base/output/calibration_report.json`
- `base/output/DECISIONS.md`

Rules:
- Do not modify files under `base/input`.
- Keep any runtime state you create outside `input/`; the staged wrappers already use `base/output/.runtime_state` by default.
- You do not need to submit simulation result folders; the evaluator re-runs your SUMO configuration itself.


The agent must:
Read the staged task prompt and output contract before editing the submission tree.
Repair the starter SUMO configuration, demand, signal timing, and vehicle-type files inside the writable output tree.
Use the staged runtime wrappers if Python or SUMO commands are needed inside the task-local environment.
Write the required submission files plus a truthful `calibration_report.json` and `DECISIONS.md`.

Software: SUMO
Python
uv
jsonschema
lxml

Input files:
name: task_prompt.md
format: markdown
path: input/task_prompt.md
description: Agent-visible benchmark brief describing the visible contract and repair goals.
name: output_contract.json
format: json
path: input/output_contract.json
description: Exact required output filenames and layout for the submission tree.
name: calibration_report.schema.json
format: json
path: input/calibration_report.schema.json
description: Schema for the required calibration report.
name: report_template.example.json
format: json
path: input/examples/report_template.example.json
description: Example structure for the required calibration report.
name: starter_project
format: SUMO project tree
path: input/starter_project
description: Visible starter microsimulation package that must be repaired and calibrated.
name: runtime_env
format: uv Python environment
path: input/runtime_env
description: Pinned optional Python runtime manifest used by the staged wrappers.