Canonical import and execution contract for authored benchmark and engineer scripts. Use when writing `benchmark_script.py` or `solution_script.py` that call validation, simulation, or submission helpers.
Use this skill when authoring build123d scripts that the runtime will execute or inspect.
benchmark_script.py: benchmark-owned geometry source. Treat it as read-only context in downstream engineer and reviewer stages.solution_script.py: engineer-authored implementation source.references/files.md for the workspace file map and artifact ownership rules.references/function_signatures.md for the current submission-helper signatures.../render-evidence/references/function_signatures.md for the current preview and point-pick helper signatures.Use top-level utils imports in authored scripts:
from utils.submission import (
validate_benchmark,
simulate_benchmark,
submit_benchmark_for_review,
validate_engineering,
simulate_engineering,
submit_solution_for_review,
)
from utils.metadata import PartMetadata, CompoundMetadata
from utils.preview import (
list_render_bundles,
objectives_geometry,
pick_preview_pixel,
pick_preview_pixels,
preview,
render_technical_drawing,
query_render_bundle,
)
shared.* paths are implementation internals. Do not use them in authored agent scripts.
For render evidence and point-pick workflows, prefer the namespaced helpers in utils.preview; use utils.visualize only as a compatibility alias when older code already references it. list_render_bundles() selects the exact bundle, query_render_bundle() returns compact bundle slices, and pick_preview_pixel() / pick_preview_pixels() resolve pixel-to-world evidence against the bundle-local snapshot.
The exact callable signatures live in the reference snapshots listed above; use those files instead of calling help(...) during every eval run.
For ordinary mechanical engineer scripts, keep imports minimal:
build123d plus utils.metadatautils.* imports only when the final geometry or task contract actually uses themresult = ....build() remains an optional compatibility helper, not the primary contract.benchmark_script.py.solution_script.py.environment or start with zone_. Those names are reserved for the scene root and simulator-generated objective bodies, and duplicate labels collide with MJCF mesh/body names.Use this sequence for benchmark-coder and engineer-coder evals:
benchmark_plan.md for benchmark-coder tasks or engineering_plan.md for engineer-coder tasks, plus todo.md, assembly_definition.yaml, and benchmark_definition.yaml.benchmark_script.py as read-only context before drafting the solution.skills/build123d-cad-drafting-skill/SKILL.md before the first geometry draft.skills/cots-parts/SKILL.md before drafting the part geometry or motion contract.skills/electronics-engineering/SKILL.md if the approved handoff explicitly contains an electronics section or the benchmark declares electronics_requirements. Motors alone do not imply an electronics task, and mechanical wire-routing placeholders do not qualify.solution_script.py draft compact and complete for the handoff. Prefer a direct result = ... binding and avoid extra helper files.py_compile or equivalentresult from the authored filefrom utils.submission import validate_benchmark, simulate_benchmark for benchmark scripts or validate_engineering, simulate_engineering for engineering scriptsvalidate_benchmark(result) / simulate_benchmark(result) or validate_engineering(result) / simulate_engineering(result) if validation passesjournal.md and stop diagnostics instead of widening into repo spelunking.fixed=True examples into the implementation unless the current task explicitly says you are authoring benchmark fixtures.utils.electronics, shared.*, or worker_heavy.* from the authored script.Location(...) through move, moved, or direct location assignment.part.position = (...) as the runtime placement contract.Choose the narrowest mode that matches the task contract.
Use when the workspace, validator, or seeded handoff expects the module to be imported safely.
result or build()Use only when the task explicitly allows direct execution side effects from the authored script.
validate_benchmark(...), simulate_benchmark(...), and submit_benchmark_for_review(...) or validate_engineering(...), simulate_engineering(...), and submit_solution_for_review(...) may live in the module body only when that execution model is explicitly part of the taskexecute_command(...) probe that imports result from the authored file and calls utils.submission.validate_benchmark(...) / simulate_benchmark(...) or validate_engineering(...) / simulate_engineering(...).execute_command(...) already runs from the seeded workspace root. Do not prepend cd /workspace or other host-specific workspace paths before those checks.if __name__ == "__main__": in authored scripts.benchmark_script.py, solution_script.py, todo.md, and renders/preview.png.benchmark_script.py, solution_script.py, journal.md, todo.md, renders/..., and simulation_result.json, not /benchmark_script.py, /solution_script.py, /journal.md, /todo.md, /renders/..., or /simulation_result.json.write_file(...).content string, simplify the script content first so the write_file(...) arguments remain valid JSON.write_file(...) is rejected for invalid JSON arguments, do not retry the same large payload. Write a compact import-safe stub first, then expand the file with smaller edit_file(...) replacements.ocp_vscode, and do not call show(...) from authored workspace scripts.todo.md is not a reason to stop early. Finish the required assembly unless a concrete blocker forces a partial handoff or refusal.py_compile check is not enough. Keep the authored file import-safe, then run one real probe against result and fix any runtime failure before stopping.submit_benchmark_for_review(result) or submit_solution_for_review(result) after validation and simulation succeed. This is not a shell helper and it is not a replacement for the validation/simulation checks.