Follow one run from specification to reward
OpenAnvil gives an AI a mobile app specification, lets it build the app, runs deterministic tests, and saves the complete result as reusable training data.
The whole system in one view
The runtime has one job: turn a trial and a model into a graded mobile app plus a complete evidence package.
One run, two entry paths, one evidence contract
Local and cloud launches converge on the same agent, grading, and artifact lifecycle.
A run, in logical execution order
Each row names the component that owns the step and the state of the current implementation.
spec.md and the files under contract/. Hidden tests and the reference app remain outside model context.LocalOrchestrator. Cloud runs use a thin HTTP client that calls API Gateway with the selected trial, platform, model, and safety limits.run_start event.Local and cloud runs share a contract
The storage location and launch mechanism change, but the run artifacts should keep the same shape.
CLI starts the loop directly
The orchestrator creates runs/<run-id>/, starts the model loop, and writes artifacts through LocalScribe. The CLI calls grading after the loop returns.
API and events start an isolated worker
The thin client calls API Gateway at cloud.api_url (default prod in yaml). The API Lambda records the run in S3 and emits an event. The control Lambda launches an EC2 worker through SSM, while S3Scribe preserves the run. Thin CLI now live-follows queued → provisioning → running → agent loop via GET /runs/{id} and /logs polling.
openanvil plain now shows a compact select UI for trial, target (default cloud-aws), platform (default both ios,android), provider with key status, model as Friendly (qualified). Arrow-key dropdown via curses when TTY, compact numbered fallback otherwise. Only prompts for missing inference key and OPENANVIL_API_KEY if not in env, with paste-friendly raw reader that bypasses 1024 char limit.The agent loop is small on purpose
OpenAnvil owns the environment and evidence. The model only decides which controlled action to take next.
The agent loop as a closed evidence cycle
Every action returns an observation and writes a durable trace before the next model turn.
What happens when the agent is done
Submission ends model work. It does not end the OpenAnvil run.
- 1Freeze the build output
The final app directory and submission summary become the candidate that grading evaluates.
- 2Close the agent evidence
The transcript records the terminal status, total steps, token use, and final submission.
- 3Start platform grading
Local mode invokes grading directly. Cloud mode is designed to route submit events through the grader queue.
- 4Calculate deterministic reward
Each hidden subtest contributes to one of four weighted grading tiers.
- 5Publish artifacts
The app, logs, screenshots, subtests, reward, and machine status become one durable run record.
- 6Clean up compute
The intended final step shuts down the simulator, VM, container, or ephemeral worker.
Every run becomes a reusable evidence package
Local disk and S3 use the same conceptual layout so readers do not need to know where the run executed.
<run>/
manifest.json
machine.json
transcript.jsonl
trajectory/
app/
logs/
grading/
logs/verifier/
reward.txt
grade.json
per_metric/Current implementation boundary
This checkpoint prevents the target architecture from being mistaken for shipped behavior.