Official Codebase of 3DCodeVerse
Python
scene_blender: the agent writes every line of bpy — delete the harness library and the mode switch
gaoypeng31fca9c1fece
diff --git a/harness/CLAUDE.md b/harness/CLAUDE.mdindex 4fdd032b..7f70e283 100644--- a/harness/CLAUDE.md+++ b/harness/CLAUDE.md@@ -93,12 +93,11 @@ cd harness3dcodeverse make "..." --track static_object --language threejs --generator agy:gemini-4-argon3dcodeverse make "..." --track articulated_object --language urdf_blender3dcodeverse make "..." --track scene --language scene_threejs --rounds 2 --max-minutes 60-3dcodeverse make "..." --track scene --language scene_blender --rounds 2 --max-minutes 90 # bpy scene on Blender 5.2.2 (D105): harness-owned src/lib, Cycles judged frames+3dcodeverse make "..." --track scene --language scene_blender --rounds 2 --max-minutes 90 # bpy scene on Blender 5.2.2 (D105): every module the agent's, Cycles judged frames# Every track states REQUIREMENTS, never templates (D106 scene, D107 the rest, 2026-10-15): no language ships a cookbook, no inlined# recipes, placeholder skeletons; a prompt / skill keeps only interface, sandbox rules and measured thresholds, each contract.md ONE# executable interface example (tests/prompts/test_snippets_run.py), the craft as short optional practices in the skills (fences ≤ ~12 lines).3dcodeverse make "..." --variant argon # per-model prompt/skill overlay: prompts/variants/<name>/ + skills/variants/<name>/ (D105; C3D_VARIANT, C3D_VARIANTS='{"agy:gemini-4-argon": "argon"}')-3dcodeverse make "..." --track scene --language scene_blender --variant argon_raw # RAW mode (D113): no src/lib ships, argon writes every line of bpy ([knobs] scene_lib = false; C3D_SCENE_LIB)3dcodeverse make "neon rain on a window" --track graphics --language glsl_shader3dcodeverse make "..." --image ref.png --candidates 3 --rounds 2 --dim height=0.45 --must "three legs" --no-run3dcodeverse make "..." --no-pick # a run = baseline + --rounds refine rounds (fixed); make then picks a round → deliverable/ unless --no-pickdiff --git a/harness/codeverse3d/agents/cli_common.py b/harness/codeverse3d/agents/cli_common.pyindex 05fa3ac1..7631046f 100644--- a/harness/codeverse3d/agents/cli_common.py+++ b/harness/codeverse3d/agents/cli_common.py@@ -456,7 +456,7 @@ def _enforce_scope(s: Session) -> dict[str, str]:Post-hoc, because every backend is a vendor CLI and none has a write-time file gate(the in-process one that did was deleted 2026-08-28). Three layers:``job.read_only`` ALWAYS — harness-owned source the agent must call, never rewrite- (a scene's ``src/lib/``); ``job.write_roots`` ALWAYS — a CLI session used to be able+ (scene_threejs's ``src/lib/``); ``job.write_roots`` ALWAYS — a CLI session used to be ableto write and commit a root-level ``conftest.py``; then, for ``edit_only``, thenarrowing to ``files_hint`` + ``always_writable`` (a pre-existing file outside it isout of scope; new files stay allowed). Only safe because sessions on one workspacediff --git a/harness/codeverse3d/config.py b/harness/codeverse3d/config.pyindex a761171c..93bd70e8 100644--- a/harness/codeverse3d/config.py+++ b/harness/codeverse3d/config.py@@ -330,11 +330,6 @@ class Settings(BaseSettings):"prompt instead of editing it in context (docs/COST.md §30)")reference_diff: Flag = Field(default=True, description="the judge's reference-image mismatch pass")zone_layouts: Flag = Field(default=True, description="scene track: the L2 zone-layout planner calls")- scene_lib: Flag = Field(default=True, description="scene_blender: ship the harness-owned bpy library "- "(src/lib/*.py) into every workspace and let modules import it. OFF is RAW mode "- "(D113): no library ships, `lib.*` imports are lint ERRORs and the model writes "- "every mesh, material, light, world and motion in raw bpy / bmesh (variant "- "argon_raw sets it through its [knobs])")axis_repair: Flag = Field(default=True, description="articulated track: rewrite a joint axis the ""measured motion proves wrong, before the sweep renders")settle: Flag = Field(default=True, description="scene driver: the boot-time auto-seat")diff --git a/harness/codeverse3d/contracts/agent.py b/harness/codeverse3d/contracts/agent.pyindex fb67b834..9e896635 100644--- a/harness/codeverse3d/contracts/agent.py+++ b/harness/codeverse3d/contracts/agent.py@@ -81,7 +81,7 @@ class AgentJob(BaseModel):read_only: list[str] = Field(default_factory=list,description="harness-owned files inside write_roots the agent may read but never write "- "(src/lib/ for the scene languages: contracts.common.HARNESS_OWNED_SRC); enforced "+ "(scene_threejs's src/lib/: contracts.common.HARNESS_OWNED_SRC); enforced ""post-session: a write to one is reverted and the session failed",)shared_tree: bool = Field(diff --git a/harness/codeverse3d/contracts/common.py b/harness/codeverse3d/contracts/common.pyindex ec88a771..7466333d 100644--- a/harness/codeverse3d/contracts/common.py+++ b/harness/codeverse3d/contracts/common.py@@ -92,8 +92,6 @@ ENTRY_FILE: dict[Language, str] = {HARNESS_OWNED_SRC: dict[Language, tuple[str, ...]] = {# the effect library (D51): the agent imports and calls it, never rewrites it.Language.SCENE_THREEJS: ("src/lib/",),- # the small bpy library (DESIGN phase 4, D51 extended): same rule, same directory- Language.SCENE_BLENDER: ("src/lib/",),}diff --git a/harness/codeverse3d/languages/base.py b/harness/codeverse3d/languages/base.pyindex fb0b1461..513379eb 100644--- a/harness/codeverse3d/languages/base.py+++ b/harness/codeverse3d/languages/base.py@@ -82,7 +82,8 @@ class SceneRuntime(LanguageRuntime, Protocol):def lib_interface(self, ws: Workspace) -> str:"""The harness-owned ``src/lib/`` as facts, one line per module: the names it exports andtheir parameter lists, read off the files (D112: the env recovery's single-shot cannot open- them, and invented ``gravel`` / ``pavingPatch`` / a ``roughness=`` keyword)."""+ them, and invented ``gravel`` / ``pavingPatch`` / a ``roughness=`` keyword); ``""`` for a+ language that ships none."""...def check_env(self, ws: Workspace) -> str:diff --git a/harness/codeverse3d/languages/scene_blender/__init__.py b/harness/codeverse3d/languages/scene_blender/__init__.pyindex 6770d6ad..204f08c2 100644--- a/harness/codeverse3d/languages/scene_blender/__init__.py+++ b/harness/codeverse3d/languages/scene_blender/__init__.py@@ -20,7 +20,6 @@ import jsonimport loggingimport mathimport re-import shutilimport timefrom collections.abc import Sequencefrom pathlib import Path@@ -62,7 +61,6 @@ from codeverse3d.languages._common import (target_line,ws_rel,)-from codeverse3d.languages._js_lint import SIGNATURE_CHARSfrom codeverse3d.languages.blender import (BlenderNotFoundError,BpyCollector,@@ -151,12 +149,8 @@ def hero_files(ws: Workspace) -> list[Path]:ALLOWED_IMPORTS = frozenset({"bpy", "bmesh", "mathutils", "math", "random", "numpy", "itertools", "functools", "collections", "typing","dataclasses", "colorsys", "statistics", "operator", "enum", "copy", "__future__", "bpy_extras",- "env", "zones", "assets", "lib", # the workspace's own packages (src/ is on sys.path)+ "env", "zones", "assets", # the workspace's own packages (src/ is on sys.path)})-#: the package the harness library is imported as: allowed only while ``Settings.scene_lib`` ships it-LIB_PACKAGE = "lib"-#: raw mode (D113, ``scene_lib`` off): no ``src/lib`` ships, so ``lib`` is not a workspace package-RAW_ALLOWED_IMPORTS = ALLOWED_IMPORTS - {LIB_PACKAGE}#: the object track's floor + everything that reads a clock or the file system: a scene is#: deterministic by construction and the harness owns every fileFORBIDDEN_IMPORTS = frozenset(BASE_FORBIDDEN_IMPORTS | {"os", "sys", "pathlib", "time", "datetime", "tempfile",@@ -296,24 +290,18 @@ def _regate(findings: list[GateFinding], target: str) -> list[GateFinding]:return out-def _policy(c: BpyCollector, facts: _SceneFacts, *, target: str, role: str, lib: bool = True) -> list[GateFinding]:+def _policy(c: BpyCollector, facts: _SceneFacts, *, target: str, role: str) -> list[GateFinding]:out: list[GateFinding] = []E, W = Severity.ERROR, Severity.WARNdef _import_finding(kind: str, mod: str, line: int) -> GateFinding:- if mod == LIB_PACKAGE and not lib:- return _f(LintKind.BAD_IMPORT, E, f"`{mod}`: no harness library ships in raw mode (scene_lib off) — "- "the import fails in the build", line,- "write it in raw bpy / bmesh / mathutils; code several zones share goes in src/env.py "- "(`from env import ...`); an asset module is self-contained", target)if kind == "forbidden":return _f(LintKind.FORBIDDEN_IMPORT, E, f"forbidden import `{mod}`", line,"a scene uses bpy / bmesh / mathutils / math / numpy and ctx.rng(seed); no clock, no files", target)return _f(LintKind.BAD_IMPORT, W, f"unexpected import `{mod}` (not available in the build)", line,"use bpy, bmesh, mathutils, math, numpy and your own src/ modules", target)- out.extend(check_imports(c.imports, forbidden=FORBIDDEN_IMPORTS, allowed=ALLOWED_IMPORTS if lib else RAW_ALLOWED_IMPORTS,- make_finding=_import_finding))+ out.extend(check_imports(c.imports, forbidden=FORBIDDEN_IMPORTS, allowed=ALLOWED_IMPORTS, make_finding=_import_finding))for name, call in c.calls:for prefix, sev, kind, msg, hint in CALL_POLICY:if name.startswith(prefix):@@ -363,9 +351,8 @@ def _policy(c: BpyCollector, facts: _SceneFacts, *, target: str, role: str, lib:return out-def lint_scene_source(source: str, *, target: str, role: str, lib: bool = True) -> list[GateFinding]:- """Lint one scene module; ``role`` is ``entry`` / ``env`` / ``zone`` / ``asset`` / ``helper``; ``lib``- False is raw mode (D113): an import of the harness library is an ERROR."""+def lint_scene_source(source: str, *, target: str, role: str) -> list[GateFinding]:+ """Lint one scene module; ``role`` is ``entry`` / ``env`` / ``zone`` / ``asset`` / ``helper``."""tree, exc = safe_parse(source, target)if tree is None:msg, hint, line = describe_parse_failure(exc) # type: ignore[arg-type]@@ -374,7 +361,7 @@ def lint_scene_source(source: str, *, target: str, role: str, lib: bool = True)c.visit(tree)facts = _SceneFacts()facts.visit(tree)- out = _policy(c, facts, target=target, role=role, lib=lib)+ out = _policy(c, facts, target=target, role=role)out.extend(_regate(source_traps(c, source), target))out.extend(_exports(tree, target=target, role=role))return out@@ -408,10 +395,8 @@ def _role(ws: Workspace, p: Path) -> str:return "helper"-def lint(ws: Workspace, *, lib: bool = True) -> GateReport:- """Every ``src/**.py`` except the harness's own library (``src/lib/``, syntax only); passed iff no ERROR.- ``lib`` False is raw mode (D113): ``lib`` is no workspace package (a write under ``src/lib/`` is still- reverted, ``HARNESS_OWNED_SRC``)."""+def lint(ws: Workspace) -> GateReport:+ """Every ``src/**.py``; passed iff no ERROR."""t0 = time.monotonic()findings: list[GateFinding] = []if not (ws.root / ENTRY_REL).is_file():@@ -420,26 +405,16 @@ def lint(ws: Workspace, *, lib: bool = True) -> GateReport:for p in sorted(ws.src.rglob("*.py")) if ws.src.is_dir() else []:rel = ws_rel(ws, p)source = p.read_text(errors="replace")- if p.is_relative_to(ws.src / "lib"):- tree, exc = safe_parse(source, rel)- if tree is None:- msg, hint, line = describe_parse_failure(exc) # type: ignore[arg-type]- findings.append(_f(LintKind.SYNTAX, Severity.ERROR, msg, line, hint, rel))- continuerole = _role(ws, p)if role in ("zone", "asset") and p.stem != to_snake(p.stem):findings.append(_f(LintKind.NAMING, Severity.ERROR, f"module name '{p.name}' is not snake_case", None,f"rename it to {to_snake(p.stem)}.py", rel))- findings.extend(lint_scene_source(source, target=rel, role=role, lib=lib))+ findings.extend(lint_scene_source(source, target=rel, role=role))return GateReport.of(GATE, findings, duration_ms=int((time.monotonic() - t0) * 1000))# ===================================================================== starter treeSTARTER_DIR = Path(__file__).resolve().parent / "starter" / "src"-#: the harness-owned bpy library (``src/lib/*.py``, D51 for this language): shipped into EVERY-#: workspace by both skeleton paths; the model's index of it is prompts/scene_blender/effects_catalog.md-#: (tests/scene_runtime/test_skeleton.py pins the two to each other)-LIB_DIR = STARTER_DIR / "lib"ENV_FILE = "src/env.py"@@ -453,8 +428,9 @@ _TB_FRAME_RE = re.compile(r'File "(?P<file>[^"]+)", line (?P<line>\d+)')def env_frame(traceback_text: str) -> str:"""``src/env.py:N`` — the deepest frame of a Python traceback that is the env module's own, with itssource line when the traceback quotes it — or ``""`` when no frame is. ``check_env`` leads with it- when the raise surfaced inside a ``src/lib`` helper (D112 review: iteration 5 blender r1_04's- recovered env was reported as ``src/lib/mesh.py:69`` while its own bad call was ``env.py:287``)."""+ when the raise surfaced inside a module the env called — a ``bpy_extras`` helper, bmesh's own python+ (D112 review: a recovered env was reported at the helper's line while its own bad call was+ ``env.py:287``, and the repair single-shot writes env.py)."""lines = traceback_text.splitlines()found = ""for i, text in enumerate(lines):@@ -466,60 +442,17 @@ def env_frame(traceback_text: str) -> str:return found-def lib_files() -> list[Path]:- """The library modules shipped into a workspace, sorted (the package's ``__init__.py`` ships- too but names no calls, so the catalog does not list it)."""- return sorted(p for p in LIB_DIR.glob("*.py") if p.name != "__init__.py")---def lib_interface(ws: Workspace) -> str:- """The workspace's ``src/lib/`` surface, one line per module: every public top-level function- with its parameters as written, every public class and UPPER_CASE constant. Facts read off the- files — what a single-shot writer, which cannot open them, may call (D112)."""- rows: list[str] = []- lib = ws.src / "lib"- for p in sorted(lib.glob("*.py")) if lib.is_dir() else []:- if p.name == "__init__.py":- continue- try:- tree = ast.parse(p.read_text(errors="replace"))- except SyntaxError:- continue- names: list[str] = []- for node in tree.body:- if isinstance(node, ast.FunctionDef | ast.AsyncFunctionDef) and not node.name.startswith("_"):- sig = f"{node.name}({ast.unparse(node.args)})"- names.append(sig if len(sig) <= SIGNATURE_CHARS else sig[:SIGNATURE_CHARS - 2] + "…)")- elif isinstance(node, ast.ClassDef) and not node.name.startswith("_"):- names.append(node.name)- elif isinstance(node, ast.Assign):- names += [t.id for t in node.targets if isinstance(t, ast.Name) and t.id.isupper() and not t.id.startswith("_")]- if names:- rows.append(f"lib/{p.name} (lib.{p.stem}): " + ", ".join(names))- return "\n".join(rows)--def _put(path: Path, text: str, written: list[Path]) -> None:path.parent.mkdir(parents=True, exist_ok=True)path.write_text(text)written.append(path)-def _write_lib(ws: Workspace, written: list[Path]) -> None:- for src in sorted(LIB_DIR.glob("*.py")):- _put(ws.src / "lib" / src.name, src.read_text(), written)---def write_example(ws: Workspace, *, lib: bool = True) -> list[Path]:- """The complete plan-less starter scene (``starter/src/**/*.py``: entry, env, zones, assets- and the library) into ``ws.src`` — scene_threejs's ``write_example`` twin. Raises when the- starter tree is missing: an rglob over an absent directory writes nothing and reports- success, which is how a wheel without package data once shipped empty scenes- (tests/core/test_portability.py). Raises in raw mode (``lib`` False, D113) too: the example- is built on the library, and a raw run starts from a plan's stubs."""- if not lib:- raise ValueError("scene_blender raw mode (scene_lib off) needs a plan: the plan-less example scene is "- "built on the harness library (src/lib), which raw mode does not ship")+def write_example(ws: Workspace) -> list[Path]:+ """The complete plan-less starter scene (``starter/src/**/*.py``: entry, env, zones and assets)+ into ``ws.src`` — scene_threejs's ``write_example`` twin. Raises when the starter tree is+ missing: an rglob over an absent directory writes nothing and reports success, which is how a+ wheel without package data once shipped empty scenes (tests/core/test_portability.py)."""if not STARTER_DIR.is_dir():raise FileNotFoundError(f"scene_blender starter tree missing: {STARTER_DIR} — this install has no package data "@@ -546,37 +479,7 @@ def _v(v: Sequence[float], *, extents: bool = False) -> tuple[float, float, floaPLACEHOLDER_GROUND_SPANS = 3.0-#: what the env placeholder says of the toolbox, imports, and builds its plate with: (library, raw — D113).-#: Raw: the same plate in plain bpy / bmesh (GroundMat at the library's "6F6A60", linear), no library named.-_ENV_TOOLBOX = (- """ builds the brief's. The landform, the sky, the light and the atmosphere are yours. Raw bpy / bmesh is the- baseline; src/lib (terrain / sky / lighting / materials / architecture / water ... — the effects catalog) is- an OPTIONAL toolbox. Keep build_env and height_at.""",- """ builds the brief's. The landform, the sky, the light and the atmosphere are yours, in raw bpy / bmesh:- no harness library ships in this workspace. Keep build_env and height_at.""")-_ENV_IMPORTS = ("from lib import materials, terrain # the optional toolbox (the placeholder uses two of its calls)",- "import bmesh\nimport bpy")-_ENV_ROOM_NOTE = ("# named; it reads black without openings or practical lights); lib.architecture.room_shell is one way",- "# named; it reads black without openings or practical lights)")-_ENV_PLATE = (- """ ground_mat = materials.material("GroundMat", "6F6A60", roughness=0.95)- terrain.ground("Ground", ctx.collection, size=GROUND_SIZE, segments=32, height_at=height_at, material=ground_mat)""",- """ ground_mat = bpy.data.materials.new("GroundMat")- bsdf = ground_mat.node_tree.nodes["Principled BSDF"]- bsdf.inputs["Base Color"].default_value = (0.159, 0.144, 0.117, 1.0)- bsdf.inputs["Roughness"].default_value = 0.95- bm = bmesh.new()- bmesh.ops.create_grid(bm, x_segments=32, y_segments=32, size=GROUND_SIZE / 2)- for v in bm.verts:- v.co.z = height_at(v.co.x, v.co.y)- me = bpy.data.meshes.new("Ground")- bm.to_mesh(me)- bm.free()- me.materials.append(ground_mat)- ctx.collection.objects.link(bpy.data.objects.new("Ground", me))""")---def _env_source(plan: ScenePlan, *, lib: bool = True) -> str:+def _env_source(plan: ScenePlan) -> str:"""``src/env.py`` as an interface stub: the plan's data (bounds, interior, glazed, the sun theplan states), the two exports the wrapper calls, and a PLACEHOLDER body that builds ONE thing —a level plate named Ground past the plan span — and no world, no lamp, no atmosphere: as@@ -585,12 +488,9 @@ def _env_source(plan: ScenePlan, *, lib: bool = True) -> str:bounds' half-span + 15 m, fbm hills beyond, a mossy ground, a fog box, a room shell with oneceiling light): 30 of 30 iteration-0 scenes kept its shape; then a passing placeholder (aneutral sun at 45° / 35°, a haze) that any brief could keep for the same reason (the- de-templating of 2026-10-15). ``lib`` False (raw mode, D113): the same plate in raw bpy / bmesh and- no word of the library."""+ de-templating of 2026-10-15)."""from codeverse3d.languages.scene_threejs import sun_from_plan- k = 0 if lib else 1-c, e = _v(plan.bounds.center), _v(plan.bounds.extents, extents=True)span = max(e[0], e[1], 1.0)ground = round(span * PLACEHOLDER_GROUND_SPANS, 1)@@ -623,13 +523,14 @@ MEASURED: a world exists and an atmosphere exists — a world Volume or a boundeedge in any authored frame (judged; the census: standing geometry past 1.25 x the bounds' half-extent).PLACEHOLDER below: ONE level plate named Ground past the plan span, so the census has a surface — and NOworld, NO lamp, NO atmosphere: as written this module fails the probe and renders black until build_env-{_ENV_TOOLBOX[k]}+ builds the brief's. The landform, the sky, the light and the atmosphere are yours. Keep build_env and height_at."""-{_ENV_IMPORTS[k]}+import bmesh+import bpyBOUNDS = {{"center": ({fmt3(c)}), "extents": ({fmt3(e)})}}INTERIOR = {interior} # the plan's: an interior needs the enclosure the brief describes (openings, materials as- {_ENV_ROOM_NOTE[k]}+ # named; it reads black without openings or practical lights)GLAZED = {glazed} # the plan says the enclosure is glazed; its construction is the brief'sGROUND_SIZE = {ground} # the placeholder plate's side (m): 3 x the plan span, past the reach the fog gate measures{az_line}@@ -644,28 +545,26 @@ def height_at(x, y):def build_env(ctx):# PLACEHOLDER ground: a level plate following height_at — REPLACE with the brief's land (named Ground... / Terrain...)-{_ENV_PLATE[k]}+ ground_mat = bpy.data.materials.new("GroundMat")+ bsdf = ground_mat.node_tree.nodes["Principled BSDF"]+ bsdf.inputs["Base Color"].default_value = (0.159, 0.144, 0.117, 1.0)+ bsdf.inputs["Roughness"].default_value = 0.95+ bm = bmesh.new()+ bmesh.ops.create_grid(bm, x_segments=32, y_segments=32, size=GROUND_SIZE / 2)+ for v in bm.verts:+ v.co.z = height_at(v.co.x, v.co.y)+ me = bpy.data.meshes.new("Ground")+ bm.to_mesh(me)+ bm.free()+ me.materials.append(ground_mat)+ ctx.collection.objects.link(bpy.data.objects.new("Ground", me))# NO world, lamp or atmosphere here: the brief's go in this function (the docstring says what is measured)return {{"ground_material": ground_mat}}'''-#: the asset placeholder's imports and blockout: (library, raw — D113); ``str.format`` fields-_ASSET_BODY = (- """from lib.materials import material # optional toolbox: the placeholder uses it-from lib.mesh import Batch # optional: one way to build multi-material parts (raw bmesh is equally fine)---def build_{snake}(ctx, variant=0):- mat = material("{pascal}Mat", ({rgb}), roughness={rough}, metal={metal})- # PLACEHOLDER blockout at the planned size — REPLACE with the real thing (a single box fails the asset check);- # base on z = 0, front facing -Y.- b = Batch("{pascal}")- b.box(mat, (0.0, 0.0, {h2}), ({w}, {d}, {h}))- b.finish(ctx.collection, parent=False)- return ctx.collection-""",- """import bmesh+#: the asset placeholder's blockout (``str.format`` fields)+_ASSET_BODY = """import bmeshimport bpy@@ -687,10 +586,10 @@ def build_{snake}(ctx, variant=0):me.materials.append(mat)ctx.collection.objects.link(bpy.data.objects.new("{pascal}", me))return ctx.collection-""")+"""-def _asset_source(a: AssetPlan, *, lib: bool = True) -> str:+def _asset_source(a: AssetPlan) -> str:snake, pascal = to_snake(a.name), to_pascal(a.name)w, h, d = (max(0.05, float(v)) for v in a.approx_size_m) # plan order: width, height, depthrgb, rough, metal = finish_for(a.description)@@ -703,21 +602,11 @@ CONTRACT: build_{snake}(ctx, variant=0) -> bpy.types.Collection — link every pdescribes it at the judge's camera distance (judged) and measure about the size above (the asset check);parts, materials and construction are yours."""-{_ASSET_BODY[0 if lib else 1].format(snake=snake, pascal=pascal, rgb=fmt3(rgb), rough=rough, metal=metal,- w=f"{w:g}", d=f"{d:g}", h=f"{h:g}", h2=f"{h / 2:g}")}'''---#: the zone stub's line on assets and motion: (library, raw — D113)-_ZONE_TOOLS = (- """ Assets: ctx.assets['<snake>'] is a Collection — place collection-instance Empties of it (lib.scatter.instance- seats one on ctx.height_at; one way among others). Animation: keyframes or simple drivers (the build samples- frames 1 and 46 = t 0 / 1.5 s; motion between them is measured); lib.motion is an optional helper.""",- """ Assets: ctx.assets['<snake>'] is a Collection — place collection-instance Empties of it (instance_type- 'COLLECTION', seated on ctx.height_at). Animation: keyframes or simple drivers (the build samples frames 1 and- 46 = t 0 / 1.5 s; motion between them is measured).""")+{_ASSET_BODY.format(snake=snake, pascal=pascal, rgb=fmt3(rgb), rough=rough, metal=metal,+ w=f"{w:g}", d=f"{d:g}", h=f"{h:g}", h2=f"{h / 2:g}")}'''-def _zone_source(z: ZonePlan, assets: dict[str, AssetPlan], *, lib: bool = True) -> str:+def _zone_source(z: ZonePlan, assets: dict[str, AssetPlan]) -> str:"""The zone's interface and a TODO naming the plan's contents — no positions. The stub used totile the contents on a quarter-extent grid inside the bbox and say "keep them inside the bbox":the seed of the blocks-in-a-rectangle look (the de-templating of 2026-10-15)."""@@ -742,7 +631,9 @@ CONTRACT: build(ctx) -> bpy.types.Collection — ctx.collection is this zone's ((measured: scene_placement floating > 0.05 m outdoors / 0.02 m indoors, sunken > 0.10 m). The plannedcontents are measured against the plan bounds and this bbox (scene_placement: present, at the plan's size,not outside the bounds); scenery may continue past the bbox as the brief implies.-{_ZONE_TOOLS[0 if lib else 1]}+ Assets: ctx.assets['<snake>'] is a Collection — place collection-instance Empties of it (instance_type+ 'COLLECTION', seated on ctx.height_at). Animation: keyframes or simple drivers (the build samples frames 1 and+ 46 = t 0 / 1.5 s; motion between them is measured).TODO — this zone's planned contents, none placed yet:{todo_block}"""@@ -784,27 +675,22 @@ CAMERAS = ['''-def write_skeleton(ws: Workspace, plan: Plan | None = None, *, lib: bool = True) -> list[Path]:- """Starter files for a scene plan (the library, env, one module per zone and per procedural- asset, the assembled entry); ``public/assets/`` for the heroes. Without a plan the complete- example scene is the skeleton (``write_example``). ``lib`` False is raw mode (D113): no- ``src/lib/``, and stubs that import and name nothing of it."""+def write_skeleton(ws: Workspace, plan: Plan | None = None) -> list[Path]:+ """Starter files for a scene plan (env, one module per zone and per procedural asset, the+ assembled entry); ``public/assets/`` for the heroes. Without a plan the complete example scene+ is the skeleton (``write_example``)."""if plan is None:- return write_example(ws, lib=lib)+ return write_example(ws)if not isinstance(plan, ScenePlan):raise TypeError(f"scene_blender needs a ScenePlan, got {type(plan).__name__}")written: list[Path] = []- if lib:- _write_lib(ws, written)- else: # a skeleton re-run after the mode changed (the stage key holds it): no library left behind- shutil.rmtree(ws.src / "lib", ignore_errors=True)- _put(ws.root / ENV_FILE, _env_source(plan, lib=lib), written)+ _put(ws.root / ENV_FILE, _env_source(plan), written)assets = {to_snake(a.name): a for a in plan.assets}for a in plan.assets:if a.kind != "blender_glb":- _put(ws.root / asset_file(a), _asset_source(a, lib=lib), written)+ _put(ws.root / asset_file(a), _asset_source(a), written)for z in plan.zones:- _put(ws.root / zone_file(z.name), _zone_source(z, assets, lib=lib), written)+ _put(ws.root / zone_file(z.name), _zone_source(z, assets), written)_put(ws.root / ENTRY_REL, render_scene_py([to_snake(z.name) for z in plan.zones],[to_snake(a.name) for a in plan.assets if a.kind != "blender_glb"], [],list(plan.cameras[:6]), title=plan.title, summary=plan.summary), written)@@ -883,17 +769,6 @@ class SceneBlenderRuntime:self._settings = settings or get_settings()self._blender = blender- @property- def ships_lib(self) -> bool:- """``Settings.scene_lib`` of the run calling now (``prompts.variants.run_knob``: the user's statement,- else the active variant's knob — per thread, so parallel runs of one process never flip each- other): ``False`` is raw mode (D113) — no ``src/lib/`` in the skeleton, ``lib`` imports are lint- ERRORs, no library interface in any prompt. The scene track asks this runtime too- (``tracks.scene_assets.ships_lib``), so a run's skeleton, lint and prompts share one answer."""- from codeverse3d.prompts.variants import run_knob-- return bool(run_knob("scene_lib", self._settings))-# ------------------------------------------------------------------ layoutdef expected_files(self, plan: Plan | None) -> list[str]:return list(SCENE_FILES)@@ -902,13 +777,13 @@ class SceneBlenderRuntime:return scene_files_for(plan, target, alias=alias)def skeleton(self, ws: Workspace, plan: Plan | None) -> list[Path]:- return write_skeleton(ws, plan, lib=self.ships_lib)+ return write_skeleton(ws, plan)def lint(self, ws: Workspace) -> GateReport:- return lint(ws, lib=self.ships_lib)+ return lint(ws)def lib_interface(self, ws: Workspace) -> str:- return lib_interface(ws) if self.ships_lib else ""+ return "" # nothing harness-owned ships into a scene_blender workspacedef check_env(self, ws: Workspace) -> str:"""``""`` when ``src/env.py`` lints clean, runs ``build_env`` in Blender with nothing beside@@ -917,13 +792,13 @@ class SceneBlenderRuntime:in argon loop iteration 5, three recovered env.py modules failed at assembly (a ``curb_ mats``SyntaxError, an AttributeError, an unknown ``roughness=`` keyword) and two more that a scoperevert kept from assembly were broken too (``noise_ centered = ...`` did not parse; a tuple- rotation raised inside ``lib/mesh.py``)."""+ rotation raised inside a helper the env called)."""from codeverse3d.spatial.probes import unlitenv = ws.root / ENV_FILEif not env.is_file():return f"{ENV_FILE} does not exist"- own = [f for f in lint_scene_source(env.read_text(errors="replace"), target=ENV_FILE, role="env", lib=self.ships_lib)+ own = [f for f in lint_scene_source(env.read_text(errors="replace"), target=ENV_FILE, role="env")if f.severity == Severity.ERROR]if own:return "\n".join(f"{f.target}: {f.message}" + (f" ({f.fix_hint})" if f.fix_hint else "") for f in own[:6])@@ -941,8 +816,8 @@ class SceneBlenderRuntime:e = raised[0]at = f"{e.get('error_file') or ENV_FILE}:{e.get('error_line')}" if e.get("error_line") else ENV_FILEif (e.get("error_file") or ENV_FILE) != ENV_FILE and (own_at := env_frame(str(e.get("traceback") or ""))):- # the raise is inside a src/lib helper: the repair writes env.py, so the env's own- # call line leads and the helper's line stays as where it surfaced+ # the raise surfaced inside a module the env called: the repair writes env.py, so the+ # env's own call line leads and the helper's line stays as where it surfacedat = f"{own_at} (raised in {at})"return f"{at}: build_env raised {e.get('error_type')}: {str(e.get('error_message'))[:600]}"if not run.result.ok:diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/assets/crate.py b/harness/codeverse3d/languages/scene_blender/starter/src/assets/crate.pyindex 74fd4274..217eef19 100644--- a/harness/codeverse3d/languages/scene_blender/starter/src/assets/crate.py+++ b/harness/codeverse3d/languages/scene_blender/starter/src/assets/crate.py@@ -2,29 +2,43 @@CONTRACT: build_crate(ctx, variant=0) -> bpy.types.Collection — link every part into ctx.collection(named 'Crate'), built ONCE at the origin with its base on z = 0, front facing -Y. Zones place- collection instances of it (ctx.assets['crate']); never link it anywhere else.+ collection instances of it (ctx.assets['crate']); never link it anywhere else. An asset module is+ self-contained: it is built and checked without `env`."""-from lib.materials import material, woodgrain-from lib.mesh import Batch+import bmesh+import bpySIZE = 0.9+def _box(bm, center, size):+ geom = bmesh.ops.create_cube(bm, size=1.0)["verts"]+ bmesh.ops.scale(bm, vec=size, verts=geom)+ bmesh.ops.translate(bm, vec=center, verts=geom)++def build_crate(ctx, variant=0):- wood = woodgrain(material("CrateWood", "8A6A3F", roughness=0.8), dark="3A2A18", light="9A7A4A")+ wood = bpy.data.materials.new("CrateWood")+ bsdf = wood.node_tree.nodes["Principled BSDF"]+ bsdf.inputs["Base Color"].default_value = (0.54, 0.42, 0.25, 1.0)+ bsdf.inputs["Roughness"].default_value = 0.8s = SIZE * (1.0 + 0.08 * (variant % 3))post, slat = 0.06, 0.05rim = s * 0.87 + 0.14 # the top slat's top: the posts reach it, so a stacked crate rests on all four corners- b = Batch("Crate")+ bm = bmesh.new()for sx in (-1, 1):for sy in (-1, 1):- b.box(wood, (sx * (s / 2 - post / 2), sy * (s / 2 - post / 2), rim / 2), (post, post, rim))+ _box(bm, (sx * (s / 2 - post / 2), sy * (s / 2 - post / 2), rim / 2), (post, post, rim))for k in range(4): # three slats per side, a gap between themz = s * (0.12 + 0.25 * k) + 0.07for sy in (-1, 1):- b.box(wood, (0.0, sy * (s / 2 - slat / 2), z), (s - 2 * post, slat, 0.14))+ _box(bm, (0.0, sy * (s / 2 - slat / 2), z), (s - 2 * post, slat, 0.14))for sx in (-1, 1):- b.box(wood, (sx * (s / 2 - slat / 2), 0.0, z), (slat, s - 2 * post, 0.14))- b.box(wood, (0.0, 0.0, 0.025), (s - 0.02, s - 0.02, 0.05)) # the floor board- b.finish(ctx.collection, parent=False)+ _box(bm, (sx * (s / 2 - slat / 2), 0.0, z), (slat, s - 2 * post, 0.14))+ _box(bm, (0.0, 0.0, 0.025), (s - 0.02, s - 0.02, 0.05)) # the floor board+ me = bpy.data.meshes.new("Crate")+ bm.to_mesh(me)+ bm.free()+ me.materials.append(wood)+ ctx.collection.objects.link(bpy.data.objects.new("Crate", me))return ctx.collectiondiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/assets/lantern_post.py b/harness/codeverse3d/languages/scene_blender/starter/src/assets/lantern_post.pyindex 830753dd..6a645a30 100644--- a/harness/codeverse3d/languages/scene_blender/starter/src/assets/lantern_post.py+++ b/harness/codeverse3d/languages/scene_blender/starter/src/assets/lantern_post.py@@ -5,18 +5,56 @@ CONTRACT: build_lantern_post(ctx, variant=0) -> bpy.types.Collection — built Owith its base on z = 0; zones place collection instances (ctx.assets['lantern_post']). A lampinside the collection is instanced with it, so every post lights its own patch."""-from lib import architecture, lighting, materials-from lib.mesh import Batch+import bmesh+import bpy+from mathutils import Matrix+++def _principled(name, rgb, roughness=0.8, emission=0.0):+ mat = bpy.data.materials.new(name)+ bsdf = mat.node_tree.nodes["Principled BSDF"]+ bsdf.inputs["Base Color"].default_value = (*rgb, 1.0)+ bsdf.inputs["Roughness"].default_value = roughness+ if emission:+ bsdf.inputs["Emission Color"].default_value = (*rgb, 1.0)+ bsdf.inputs["Emission Strength"].default_value = emission+ return mat+++def _beam(bm, start, end, radius, slot, sides=8):+ """A cylinder from `start` to `end` (vertical, or horizontal along X), its faces on material `slot`."""+ sx, sy, sz = start+ ex, ey, ez = end+ length = ((ex - sx) ** 2 + (ey - sy) ** 2 + (ez - sz) ** 2) ** 0.5+ geom = bmesh.ops.create_cone(bm, segments=sides, radius1=radius, radius2=radius, depth=length, cap_ends=True)["verts"]+ faces = {f for v in geom for f in v.link_faces}+ if abs(ez - sz) < 1e-6: # a horizontal arm: lie the cylinder along X+ bmesh.ops.rotate(bm, cent=(0, 0, 0), matrix=Matrix.Rotation(1.5707963, 3, "Y"), verts=geom)+ bmesh.ops.translate(bm, vec=((sx + ex) / 2, (sy + ey) / 2, (sz + ez) / 2), verts=geom)+ for f in faces:+ f.material_index = slotdef build_lantern_post(ctx, variant=0):- wood = materials.woodgrain(materials.material("PostWood", "3A2A1A", roughness=0.85))- glow = materials.emissive("LanternGlow", "FFB270", 5.0)- b = Batch("LanternPost")- b.beam(wood, (0.0, 0.0, 0.0), (0.0, 0.0, 2.4), 0.06, sides=8)- b.beam(wood, (0.0, 0.0, 2.3), (0.45, 0.0, 2.3), 0.035, sides=6)- b.beam(wood, (0.0, 0.0, 1.95), (0.42, 0.0, 2.28), 0.025, sides=6)- architecture.lantern(b, glow, wood, (0.45, 0.0, 1.85), radius=0.17)- b.finish(ctx.collection, parent=False)- lighting.practical(ctx.collection, "LanternPostLight", (0.45, 0.0, 1.72), color="FFB270", energy=25.0, size=0.25)+ wood = _principled("PostWood", (0.23, 0.16, 0.10), roughness=0.85)+ glow = _principled("LanternGlow", (1.0, 0.70, 0.44), roughness=0.6, emission=5.0)+ bm = bmesh.new()+ _beam(bm, (0.0, 0.0, 0.0), (0.0, 0.0, 2.4), 0.06, 0) # the post+ _beam(bm, (0.0, 0.0, 2.3), (0.45, 0.0, 2.3), 0.035, 0, sides=6) # the bracket arm+ lantern = bmesh.ops.create_cube(bm, size=1.0)["verts"] # the paper lantern, hung from the arm's end+ bmesh.ops.scale(bm, vec=(0.26, 0.26, 0.34), verts=lantern)+ bmesh.ops.translate(bm, vec=(0.45, 0.0, 2.05), verts=lantern)+ for f in {f for v in lantern for f in v.link_faces}:+ f.material_index = 1+ me = bpy.data.meshes.new("LanternPost")+ bm.to_mesh(me)+ bm.free()+ me.materials.append(wood)+ me.materials.append(glow)+ ctx.collection.objects.link(bpy.data.objects.new("LanternPost", me))+ light = bpy.data.lights.new("LanternPostLight", "POINT") # the glow is the look; the lamp is the light+ light.energy, light.color, light.shadow_soft_size = 25.0, (1.0, 0.70, 0.44), 0.25+ lamp = bpy.data.objects.new("LanternPostLight", light)+ lamp.location = (0.45, 0.0, 1.85)+ ctx.collection.objects.link(lamp)return ctx.collectiondiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/env.py b/harness/codeverse3d/languages/scene_blender/starter/src/env.pyindex bcdc0497..6edb59ff 100644--- a/harness/codeverse3d/languages/scene_blender/starter/src/env.py+++ b/harness/codeverse3d/languages/scene_blender/starter/src/env.py@@ -5,37 +5,115 @@ Frame: Z up, -Y front, metres.CONTRACT: height_at(x, y) -> z is THE ground: the terrain mesh and every zone's seat use it.build_env(ctx) -> dict builds the world, lamps, ground and atmosphere into ctx.collection andreturns what zones may share (materials, water level, sun direction ...) — they read it as- ctx.env. Everything here comes from src/lib (lib.terrain / lib.sky / lib.lighting /- lib.materials); keep build_env and height_at when you rewrite it.+ ctx.env. Code the zones share (`material`, `linked`, `seat`) lives here: `from env import ...`."""import math-from lib import lighting, materials, sky, terrain+import bmesh+import bpyGROUND_SIZE = 160.0-FLAT_RADIUS = 48.0 # THIS example's landform: level under its hamlet, hills beyond — one landform among many; yours is the brief's+FLAT_RADIUS = 44.0 # THIS example's landform: level under its hamlet, hills beyond — one landform among many; yours is the brief'sSUN_AZIMUTH_DEG = 215.0 # compass angle of the sun: 0 = +X, 90 = +Y (the sky and the lamp share it)SUN_ELEVATION_DEG = 22.0BASIN = (-24.0, 2.0, 15.0, 1.2) # the lake's (x, y, radius, depth): zones/lakeside.py fills it to WATER_LEVELWATER_LEVEL = -0.3-SEED = 5-_RELIEF = terrain.make_height_at(seed=SEED, relief=2.5, scale=60.0, flat_radius=FLAT_RADIUS)+++def _smooth(t):+ t = max(0.0, min(1.0, t))+ return t * t * (3.0 - 2.0 * t)def height_at(x, y):- """z of the ground at (x, y): the relief minus a smooth-rimmed bowl under the lake."""+ """z of the ground at (x, y): level inside FLAT_RADIUS, rolling hills beyond, minus a smooth-rimmed bowl under the lake."""+ hills = 1.2 * math.sin(x / 23.0) * math.cos(y / 19.0) + 0.8 * math.sin((x + y) / 31.0)+ rise = _smooth((math.hypot(x, y) - FLAT_RADIUS) / 30.0)bx, by, br, bd = BASIN- d = math.hypot(x - bx, y - by) / br- t = max(0.0, min(1.0, (d - 0.3) / 0.7)) # a wide rim: banks under 15 % so props seat on them- bowl = bd * (1.0 - t * t * (3.0 - 2.0 * t))- return _RELIEF(x, y) - bowl+ bowl = bd * (1.0 - _smooth((math.hypot(x - bx, y - by) / br - 0.3) / 0.7)) # a wide rim: banks under 15 % so props seat on them+ return rise * (hills + 2.5 * rise) - bowl+++def material(name, rgb, roughness=0.8, noise_scale=3.0, darker=0.6):+ """A Principled material varied at two scales: a noise mixes `rgb` with a darker tone over metres and bumps it over centimetres."""+ mat = bpy.data.materials.new(name)+ nodes, links = mat.node_tree.nodes, mat.node_tree.links+ bsdf = nodes["Principled BSDF"]+ bsdf.inputs["Roughness"].default_value = roughness+ tone = nodes.new("ShaderNodeTexNoise")+ tone.inputs["Scale"].default_value = noise_scale * 0.1+ mix = nodes.new("ShaderNodeMix")+ mix.data_type = "RGBA"+ mix.inputs[6].default_value = (*rgb, 1.0)+ mix.inputs[7].default_value = (*(c * darker for c in rgb), 1.0)+ links.new(tone.outputs["Fac"], mix.inputs["Factor"])+ links.new(mix.outputs[2], bsdf.inputs["Base Color"])+ grain = nodes.new("ShaderNodeTexNoise")+ grain.inputs["Scale"].default_value = noise_scale * 12.0+ bump = nodes.new("ShaderNodeBump")+ bump.inputs["Strength"].default_value = 0.12+ links.new(grain.outputs["Fac"], bump.inputs["Height"])+ links.new(bump.outputs["Normal"], bsdf.inputs["Normal"])+ return mat+++def linked(ctx, name, bm, *mats):+ """`bm` as a mesh object named `name` with material slots `mats`, linked into ctx.collection (`bm` is freed)."""+ me = bpy.data.meshes.new(name)+ bm.to_mesh(me)+ bm.free()+ for mat in mats:+ me.materials.append(mat)+ ob = bpy.data.objects.new(name, me)+ ctx.collection.objects.link(ob)+ return ob+++def seat(ob, height_at, sink=0.0):+ """Rest a root built with its base on local z = 0 on the ground: the lowest ground under its footprint corners, minus `sink`."""+ r = max(ob.dimensions.x, ob.dimensions.y) / 2.0 if ob.type == "MESH" else 0.5+ x, y = ob.location.x, ob.location.y+ ob.location.z = min(height_at(x + dx, y + dy) for dx in (-r, 0.0, r) for dy in (-r, 0.0, r)) - sink+ return obdef build_env(ctx):- sky.sun_world(ctx.scene, elevation_deg=SUN_ELEVATION_DEG, azimuth_deg=SUN_AZIMUTH_DEG, strength=0.35, dust=2.5)- _, towards_sun = lighting.sun(ctx.collection, azimuth_deg=SUN_AZIMUTH_DEG, elevation_deg=SUN_ELEVATION_DEG,- color="FFC98A", energy=3.5, angle_deg=1.5)- ground_mat = materials.material("GroundMat", "4F5E39", roughness=0.92, noise_scale=5.0)- terrain.ground("Ground", ctx.collection, size=GROUND_SIZE, segments=112, height_at=height_at, material=ground_mat)- sky.haze(ctx.collection, (0.0, 0.0, 12.0), (GROUND_SIZE, GROUND_SIZE, 24.0), density=0.0025, color="D9C7A8")- return {"ground_material": ground_mat, "sun_direction": tuple(towards_sun), "water_level": WATER_LEVEL}+ world = bpy.data.worlds.new("GoldenHour")+ ctx.scene.world = world+ nodes, links = world.node_tree.nodes, world.node_tree.links+ sky = nodes.new("ShaderNodeTexSky")+ sky.sky_type = "MULTIPLE_SCATTERING"+ sky.sun_disc = False # the Sun lamp below casts the shadows: one sun, not two+ sky.sun_elevation = math.radians(SUN_ELEVATION_DEG)+ sky.sun_rotation = math.radians(SUN_AZIMUTH_DEG)+ sky.aerosol_density = 2.5+ nodes["Background"].inputs["Strength"].default_value = 0.35+ links.new(sky.outputs["Color"], nodes["Background"].inputs["Color"])++ sun = bpy.data.lights.new("Sun", "SUN")+ sun.energy, sun.color, sun.angle = 3.5, (1.0, 0.79, 0.54), math.radians(1.5)+ lamp = bpy.data.objects.new("Sun", sun) # a Sun shines down its own -Z+ lamp.rotation_euler = (math.radians(90.0 - SUN_ELEVATION_DEG), 0.0, math.radians(SUN_AZIMUTH_DEG + 90.0))+ ctx.collection.objects.link(lamp)+ el, az = math.radians(SUN_ELEVATION_DEG), math.radians(SUN_AZIMUTH_DEG)+ towards_sun = (math.cos(el) * math.cos(az), math.cos(el) * math.sin(az), math.sin(el))++ ground_mat = material("GroundMat", (0.31, 0.37, 0.22), roughness=0.92, noise_scale=5.0)+ bm = bmesh.new()+ bmesh.ops.create_grid(bm, x_segments=112, y_segments=112, size=GROUND_SIZE / 2) # size is the half-side+ for v in bm.verts:+ v.co.z = height_at(v.co.x, v.co.y)+ linked(ctx, "Ground", bm, ground_mat)++ haze = bpy.data.materials.new("Haze") # volume-only: the atmosphere the probe requires+ nodes = haze.node_tree.nodes+ nodes.remove(nodes["Principled BSDF"])+ vol = nodes.new("ShaderNodeVolumePrincipled")+ vol.inputs["Density"].default_value = 0.0025+ vol.inputs["Color"].default_value = (0.85, 0.78, 0.66, 1.0)+ haze.node_tree.links.new(vol.outputs["Volume"], nodes["Material Output"].inputs["Volume"])+ bm = bmesh.new()+ bmesh.ops.create_cube(bm, size=1.0)+ bmesh.ops.scale(bm, vec=(GROUND_SIZE, GROUND_SIZE, 24.0), verts=bm.verts)+ linked(ctx, "Atmosphere", bm, haze).location.z = 12.0+ return {"ground_material": ground_mat, "sun_direction": towards_sun, "water_level": WATER_LEVEL}diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/__init__.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/__init__.pydeleted file mode 100644index 892bb227..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/__init__.py+++ /dev/null@@ -1,7 +0,0 @@-"""src/lib — the harness-owned bpy starter library (D51 for scene_blender).--Shipped into every scene_blender workspace; an agent CALLS it (``from lib.mesh import Batch``)-and never edits it (writes under src/lib/ are reverted). The index is the effects catalog the-prompts carry (``prompts/scene_blender/effects_catalog.md``); the lint reads these files for-syntax only. Blender 5.2 LTS API only.-"""diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/architecture.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/architecture.pydeleted file mode 100644index d0e45a76..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/architecture.py+++ /dev/null@@ -1,499 +0,0 @@-"""lib/architecture.py — buildings, bridges, roofs, paving, room shells and signs.--Batch recipes stand on the ground z you pass (``center`` = (x, y, ground z), pass ``height_at(x, y)``);-the ridge / long axis runs along +X unless a ``direction`` says otherwise (compass degrees: 0 = +X,-90 = +Y, for a window's outward normal). Paving is 2 cm thick so a prop seated on ``height_at`` still-reads as resting on it (the gate's contact tolerance). ``room_shell`` (one enclosure, for ``src/env.py``)-names the lid ``Ceiling`` under a ``RoomShell`` root so the overview rig can lift it.-"""--from __future__ import annotations--import math-from collections.abc import Sequence-from typing import Any--import bpy-from mathutils import Matrix, Vector--from lib.materials import glass-from lib.mesh import box_geometry, mesh_object-from lib.noise import hash01--Vec3 = tuple[float, float, float]-_WALLS = ("front", "back", "left", "right")-_BAY, _BAR, _PANE = (1.6, 1.6, 2.4), 0.08, 0.02 # a glazed room_shell's default frame rhythm per world axis, bar section, glass (m)---def _yaw(direction_deg: float) -> Matrix:- """The rotation that turns a -Y-facing thing to face compass ``direction_deg``."""- return Matrix.Rotation(math.radians(direction_deg) + math.pi / 2, 4, "Z")---def arched_opening(batch: Any, mat: Any, center: Sequence[float], width: float, height: float, *, depth: float = 0.28,- thickness: float = 0.2) -> None:- """A round arch surround in a wall along X: two jambs ``thickness`` wide and an arch ring- over an opening ``width`` wide and ``height`` tall (to the crown), ``depth`` through the- wall, standing on ``center`` (x, y, ground z)."""- cx, cy, cz = (float(v) for v in center)- r_in, r_out = width / 2, width / 2 + thickness- jamb_h = max(0.1, height - r_in)- for sx in (-1, 1):- batch.box(mat, (cx + sx * (r_in + thickness / 2), cy, cz + jamb_h / 2), (thickness, depth, jamb_h))- n = 14- verts: list[Vec3] = []- faces: list[tuple[int, ...]] = []- for k in range(n + 1):- a = math.pi * k / n- ca, sa = math.cos(a), math.sin(a)- for yy in (cy - depth / 2, cy + depth / 2):- verts.append((cx + r_in * ca, yy, cz + jamb_h + r_in * sa))- verts.append((cx + r_out * ca, yy, cz + jamb_h + r_out * sa))- for k in range(n):- a = 4 * k- faces.append((a, a + 4, a + 5, a + 1)) # front face (-y)- faces.append((a + 2, a + 3, a + 7, a + 6)) # back face (+y)- faces.append((a + 1, a + 5, a + 7, a + 3)) # outer (extrados)- faces.append((a, a + 2, a + 6, a + 4)) # inner (intrados)- batch.add(mat, verts, faces)---def _slope(batch: Any, mats: Any, center: Sequence[float], width: float, depth: float, rise: float, side: int, rng_: Any,- *, style: str) -> None:- """One roof slope: a plank underlay plus tiles, built flat then tilted about X."""- tile, trim = mats- half = depth / 2- run = math.hypot(half, rise)- pitch = math.atan2(rise, half)- cx, cy, cz = (float(v) for v in center)- # local frame: x along the ridge, y from the eave (0) up the slope to the ridge (run), z the- # slope's outward normal; the +Y slope is the -Y one yawed 180° about the ridge's foot- flip = Matrix.Rotation(math.pi, 4, "Z") if side > 0 else Matrix.Identity(4)- m = Matrix.Translation((cx, cy + side * half, cz)) @ flip @ Matrix.Rotation(pitch, 4, "X")- view = batch.transformed(m)- view.box(trim, (0.0, run / 2, 0.02), (width + 0.4, run + 0.25, 0.04))- if style == "tiles":- tw, th = 0.34, 0.3- if (width / tw) * (run / th) > 1400:- k = math.sqrt((width / tw) * (run / th) / 1400)- tw, th = tw * k, th * k- cols, rows = max(1, int(width / tw)), max(1, int(run / th))- for r in range(rows):- for c in range(cols):- x = -width / 2 + tw * (c + 0.5) + (tw / 2 if r % 2 else 0.0)- y = th * (r + 0.5) + 0.1- view.box(tile, (x, y, 0.065 + 0.012 * rng_.uniform(-1, 1)), (tw * 0.96, th * 1.08, 0.03), rotation=rng_.uniform(-0.03, 0.03))- else:- pitch_w = 0.2- n = max(1, int(width / pitch_w))- for c in range(n + 1):- x = -width / 2 + pitch_w * c- view.beam(tile, (x, 0.0, 0.07), (x, run, 0.07), 0.08, sides=8)- if c < n:- view.beam(tile, (x + pitch_w / 2, 0.0, 0.0), (x + pitch_w / 2, run, 0.0), 0.08, sides=8)---def tiled_roof(batch: Any, tile: Any, trim: Any, center: Sequence[float], width: float, depth: float, rise: float, rng_: Any) -> None:- """A pitched roof with its ridge along X: eaves ``width`` x ``depth`` resting on ``center``- (x, y, eave z), ridge ``rise`` higher. Flat tiles (≤ 1 400 per slope: 17 k triangles)- over a plank underlay in ``trim``, a ridge beam on top."""- for side in (-1, 1):- _slope(batch, (tile, trim), center, width, depth, rise, side, rng_, style="tiles")- cx, cy, cz = (float(v) for v in center)- batch.box(trim, (cx, cy, cz + rise + 0.08), (width + 0.4, 0.22, 0.14))---def clay_roof(batch: Any, frame: Any, tiles: Any, timber: Any, center: Sequence[float], width: float, depth: float, rise: float,- rng_: Any) -> None:- """A pantile roof: half-round ``tiles`` rows over a ``frame`` underlay, rafter ends in- ``timber`` showing under the eaves; same footprint rule as ``tiled_roof``."""- for side in (-1, 1):- _slope(batch, (tiles, frame), center, width, depth, rise, side, rng_, style="clay")- cx, cy, cz = (float(v) for v in center)- batch.box(timber, (cx, cy, cz + rise + 0.1), (width + 0.5, 0.26, 0.16))- for i in range(max(2, int(width / 0.9)) + 1):- x = cx - width / 2 + width * i / max(1, int(width / 0.9))- for side in (-1, 1):- batch.box(timber, (x, cy + side * (depth / 2 + 0.05), cz - 0.12), (0.12, 0.5, 0.14))---def fret_window(batch: Any, wood: Any, paper: Any, x: float, y: float, z: float, width: float, height: float, direction: float, *,- pattern: int = 0) -> None:- """A latticed window ``width`` x ``height`` whose sill centre is at (x, y, z), facing- compass ``direction``: a frame and a fret in ``wood`` (``pattern`` 0 grid, 1 diagonal, 2- nested) over a ``paper`` pane."""- view = batch.transformed(Matrix.Translation((x, y, z)) @ _yaw(direction))- f, d = 0.06, 0.08- view.box(wood, (0.0, 0.0, f / 2), (width, d, f))- view.box(wood, (0.0, 0.0, height - f / 2), (width, d, f))- for sx in (-1, 1):- view.box(wood, (sx * (width / 2 - f / 2), 0.0, height / 2), (f, d, height))- bar = 0.025- if pattern == 1:- n = 4- for k in range(1, n):- t = k / n- view.beam(wood, (-width / 2 + width * t, 0.0, f), (width / 2, 0.0, height - f * (1.0 - t)), bar / 2, sides=4)- view.beam(wood, (-width / 2, 0.0, f + (height - 2 * f) * t), (width / 2 - width * t, 0.0, height - f), bar / 2, sides=4)- elif pattern == 2:- for k in range(1, 4):- w, h = width * (1.0 - k * 0.22), height * (1.0 - k * 0.22)- for sx in (-1, 1):- view.box(wood, (sx * w / 2, 0.0, height / 2), (bar, bar, h))- view.box(wood, (0.0, 0.0, height / 2 - h / 2), (w, bar, bar))- view.box(wood, (0.0, 0.0, height / 2 + h / 2), (w, bar, bar))- else:- for k in range(1, 3):- view.box(wood, (-width / 2 + width * k / 3, 0.0, height / 2), (bar, bar, height - 2 * f))- for k in range(1, 4):- view.box(wood, (0.0, 0.0, f + (height - 2 * f) * k / 4), (width - 2 * f, bar, bar))- verts, faces = box_geometry((0.0, d * 0.3, height / 2), (width - 2 * f, 0.004, height - 2 * f))- view.add(paper, verts, faces)---def timber_house(batch: Any, roofs: Any, x: float, y: float, width: float, depth: float, floors: int, mats: Any, rng_: Any,- index: int) -> float:- """A half-timbered house ``width`` (along X) x ``depth`` with ``floors`` storeys (2.8 m- each, upper ones jettied 0.2 m) on ground point (x, y, 0): walls, timber frame, a door and- fret windows on the front (-Y), a ``tiled_roof``. ``mats`` = {"wall", "timber", "door",- "window"}, ``roofs`` = {"tile", "trim"}; ``index`` varies the door side and the fret.- Returns the ridge height above the ground. ~6-12 k triangles."""- wall, timber, door, pane = mats["wall"], mats["timber"], mats["door"], mats["window"]- storey = 2.8- z0 = 0.0- for fl in range(max(1, int(floors))):- jetty = 0.2 * fl- w, dd = width + 2 * jetty, depth + 2 * jetty- zb = z0 + storey * fl- batch.box(wall, (x, y, zb + storey / 2), (w, dd, storey))- # sill beam and posts- batch.box(timber, (x, y - dd / 2 - 0.04, zb + 0.08), (w + 0.1, 0.1, 0.16))- batch.box(timber, (x, y - dd / 2 - 0.04, zb + storey - 0.08), (w + 0.1, 0.1, 0.16))- n_posts = max(2, int(w / 1.4))- for k in range(n_posts + 1):- px = x - w / 2 + w * k / n_posts- batch.box(timber, (px, y - dd / 2 - 0.04, zb + storey / 2), (0.14, 0.1, storey))- for sy in (-1, 1):- batch.box(timber, (x + sy * (w / 2 + 0.04), y - dd / 2 + dd * k / n_posts, zb + storey / 2), (0.1, 0.14, storey))- if fl == 0:- for k in range(n_posts):- ax = x - w / 2 + w * k / n_posts- bx = ax + w / n_posts- batch.beam(timber, (ax, y - dd / 2 - 0.04, zb + 0.16), (bx, y - dd / 2 - 0.04, zb + storey * 0.45), 0.05, sides=4)- # windows on the front, one per bay but the door bay on the ground floor- door_bay = index % n_posts- for k in range(n_posts):- wx = x - w / 2 + w * (k + 0.5) / n_posts- if fl == 0 and k == door_bay:- batch.box(door, (wx, y - dd / 2 - 0.02, zb + 1.05), (0.95, 0.06, 2.1))- continue- fret_window(batch, timber, pane, wx, y - dd / 2 - 0.02, zb + 0.9, 0.9, 1.2, -90.0, pattern=(index + k) % 3)- for sy in (-1, 1):- fret_window(batch, timber, pane, x + sy * (w / 2 + 0.02), y + dd * 0.15, zb + 0.9, 0.8, 1.1, 0.0 if sy > 0 else 180.0, pattern=index % 3)- top = z0 + storey * floors- jetty = 0.2 * (floors - 1)- rise = (depth + 2 * jetty) * 0.48- tiled_roof(batch, roofs["tile"], roofs["trim"], (x, y, top), width + 2 * jetty + 0.4, depth + 2 * jetty + 0.4, rise, rng_)- # gable infill under the roof at both ends- for sx in (-1, 1):- gx = x + sx * (width / 2 + jetty)- verts = [(gx, y - (depth / 2 + jetty), top), (gx, y + (depth / 2 + jetty), top), (gx, y, top + rise)]- batch.add(wall, verts, [(0, 1, 2) if sx > 0 else (0, 2, 1)])- return top + rise + 0.15---def _footing(batch: Any, mat: Any, center: Sequence[float], size: Sequence[float], height_at: Any) -> None:- """A foundation block of ``size`` (x, y, height) whose top is at ``center`` z: its bottom- meets the LOWEST of the ground under its four corners (``height_at``) so no corner floats on- a slope — the gate samples the corners; without ``height_at`` it is ``size[2]`` tall."""- cx, cy, cz = (float(v) for v in center)- sx, sy, h = (float(v) for v in size)- corners = ((-sx / 2, -sy / 2), (sx / 2, -sy / 2), (sx / 2, sy / 2), (-sx / 2, sy / 2))- if height_at is None:- bottoms = [cz - h] * 4- else: # a wedge: every corner 2 cm under its own ground, so a bank buries nothing deeper- bottoms = [min(float(height_at(cx + dx, cy + dy)) - 0.02, cz - 0.05) for dx, dy in corners]- verts = [(cx + dx, cy + dy, zb) for (dx, dy), zb in zip(corners, bottoms, strict=True)]- verts += [(cx + dx, cy + dy, cz) for dx, dy in corners]- batch.add(mat, verts, [(0, 3, 2, 1), (4, 5, 6, 7), (0, 1, 5, 4), (1, 2, 6, 5), (2, 3, 7, 6), (3, 0, 4, 7)])---def stone_bridge(batch: Any, stone: Any, dark: Any, *, center: Sequence[float], span: float = 27.6, width: float = 4.7,- rise: float = 3.9, height_at: Any = None) -> None:- """A hump-backed stone bridge along X over ``center`` (x, y, water / ground z): a barrel- arch (intrados in ``dark``) rising ``rise`` m, spandrels, a cambered deck and parapets in- ``stone``; the abutments' feet stand on the ``center`` z, or follow ``height_at`` under- their corners when given. ~2.6 k triangles."""- cx, cy, cz = (float(v) for v in center)- n = 24- ha = span * 0.36 # the arch's half-span- deck_h = rise + 0.9 # deck centre height above z- verts: list[Vec3] = []- faces: list[tuple[int, ...]] = []- # arch barrel: intrados (dark) as a strip of quads, spandrel walls as the strip up to the deck- for k in range(n + 1):- a = math.pi * k / n- xi, zi = cx - ha * math.cos(a), cz + rise * math.sin(a)- for yy in (cy - width / 2, cy + width / 2):- verts.append((xi, yy, zi))- for k in range(n):- a = 2 * k- faces.append((a, a + 1, a + 3, a + 2))- batch.add(dark, verts, faces, smooth=True)- sv: list[Vec3] = []- sf: list[tuple[int, ...]] = []- for yy in (cy - width / 2, cy + width / 2):- base = len(sv)- for k in range(n + 1):- a = math.pi * k / n- xi = cx - ha * math.cos(a)- sv.append((xi, yy, cz + rise * math.sin(a)))- sv.append((xi, yy, cz + deck_h - 0.35 * (xi - cx) ** 2 / (span / 2) ** 2 * deck_h))- for k in range(n):- a = base + 2 * k- sf.append((a, a + 2, a + 3, a + 1) if yy < cy else (a, a + 1, a + 3, a + 2))- batch.add(stone, sv, sf)- # deck (cambered), parapets and abutment blocks- m = 16- for k in range(m):- t0, t1 = k / m, (k + 1) / m- x0, x1 = cx - span / 2 + span * t0, cx - span / 2 + span * t1- h0 = cz + deck_h - 0.35 * (x0 - cx) ** 2 / (span / 2) ** 2 * deck_h- h1 = cz + deck_h - 0.35 * (x1 - cx) ** 2 / (span / 2) ** 2 * deck_h- slab = [(x0, cy - width / 2, h0), (x1, cy - width / 2, h1), (x1, cy + width / 2, h1), (x0, cy + width / 2, h0)]- batch.add(stone, slab, [(0, 1, 2, 3)])- for sy in (-1, 1):- yy = cy + sy * (width / 2 - 0.18)- batch.add(stone, [(x0, yy - 0.18, h0), (x1, yy - 0.18, h1), (x1, yy + 0.18, h1), (x0, yy + 0.18, h0),- (x0, yy - 0.18, h0 + 1.0), (x1, yy - 0.18, h1 + 1.0), (x1, yy + 0.18, h1 + 1.0), (x0, yy + 0.18, h0 + 1.0)],- [(0, 3, 2, 1), (4, 5, 6, 7), (0, 1, 5, 4), (1, 2, 6, 5), (2, 3, 7, 6), (3, 0, 4, 7)])- for sx in (-1, 1):- ax = cx + sx * (span / 2 - (span / 2 - ha) / 2)- _footing(batch, stone, (ax, cy, cz + deck_h * 0.65), (span / 2 - ha, width + 0.3, deck_h * 0.65), height_at)---def arched_footbridge(batch: Any, wood: Any, stone: Any, *, start: Sequence[float], end: Sequence[float], rise: float = 1.5,- height_at: Any = None) -> None:- """A wooden footbridge arching ``rise`` m from ``start`` to ``end`` (x, y, ground z): planks,- rails on posts, stone abutments standing on the two ground points (their corners follow- ``height_at`` when given — banks are rarely level). ~1.5 k triangles."""- a, b = Vector(tuple(float(v) for v in start)), Vector(tuple(float(v) for v in end))- d = b - a- L = max(0.5, d.length)- along = d.normalized()- side = Vector((-along.y, along.x, 0.0)).normalized()- n = max(4, int(L / 0.3))- w = 1.6- for k in range(n):- t = (k + 0.5) / n- p = a + d * t + Vector((0.0, 0.0, rise * math.sin(math.pi * t) + 0.08))- tangent = (along + Vector((0.0, 0.0, rise * math.pi * math.cos(math.pi * t) / L))).normalized()- m = Matrix.Translation(p) @ Matrix((side, tangent, side.cross(tangent))).transposed().to_4x4()- batch.transformed(m).box(wood, (0.0, 0.0, 0.0), (w, L / n * 0.92, 0.05))- for k in range(5):- t = k / 4- p = a + d * t + Vector((0.0, 0.0, rise * math.sin(math.pi * t) + 0.1))- for sy in (-1, 1):- foot = p + side * (sy * w / 2)- batch.beam(wood, foot, foot + Vector((0.0, 0.0, 1.0)), 0.04, sides=6)- for sy in (-1, 1):- pts = [a + d * (k / 12) + side * (sy * w / 2) + Vector((0.0, 0.0, rise * math.sin(math.pi * k / 12) + 1.1)) for k in range(13)]- for k in range(12):- batch.beam(wood, pts[k], pts[k + 1], 0.035, sides=6)- for p in (a, b):- _footing(batch, stone, (p.x, p.y, p.z + 0.3), (w + 0.4, 1.2, 0.3), height_at)---def tower(batch: Any, mat: Any, center: Sequence[float], radius: float, low: float, high: float, windows: Any, *, count: int = 8) -> None:- """A round tower about ``center`` (x, y) from z = ``low`` to ``high``: a tapering drum with- a battered base, ``count`` window insets in ``windows`` on two levels, and merlons on top."""- cx, cy = float(center[0]), float(center[1])- h = high - low- batch.lathe(mat, (cx, cy), [(radius * 1.15, low), (radius * 1.05, low + h * 0.12), (radius, low + h * 0.9), (radius * 1.08, high - 0.4),- (radius * 1.08, high), (0.0, high)], sides=24)- for level in (0.42, 0.72):- for k in range(max(1, int(count))):- a = math.tau * (k + 0.5 * (level > 0.5)) / count- m = Matrix.Translation((cx + math.cos(a) * radius * 0.98, cy + math.sin(a) * radius * 0.98, low + h * level)) @ Matrix.Rotation(a + math.pi / 2, 4, "Z")- batch.transformed(m).box(windows, (0.0, 0.0, 0.0), (0.35, 0.12, 0.9))- for k in range(max(6, int(count) * 2)):- a = math.tau * k / max(6, int(count) * 2)- m = Matrix.Translation((cx + math.cos(a) * radius * 1.0, cy + math.sin(a) * radius * 1.0, high + 0.3)) @ Matrix.Rotation(a, 4, "Z")- batch.transformed(m).box(mat, (0.0, 0.0, 0.0), (0.3, 0.45, 0.6))---def paving(batch: Any, mats: Sequence[Any], *, center: Sequence[float], inner_r: float, rings: int, seed: int) -> None:- """Fan-set paving: ``rings`` concentric rings of stones 0.4 m deep from ``inner_r`` outward- around ``center`` (x, y, ground z), 2 cm thick, cycling ``mats``; ``seed`` varies the- joints. A ring of radius r holds ~2πr / 0.35 stones."""- cx, cy, cz = (float(v) for v in center)- k = 0- for ring in range(max(1, int(rings))):- r0 = inner_r + 0.4 * ring- rm = r0 + 0.2- n = max(6, int(math.tau * rm / 0.35))- for i in range(n):- a = math.tau * (i + 0.5 * (ring % 2)) / n- j = 0.012 * hash01(k, seed)- w = math.tau * rm / n - 0.025 - j- batch.box(mats[k % len(mats)], (cx + rm * math.cos(a), cy + rm * math.sin(a), cz + 0.01), (0.38 - j, w, 0.02), rotation=a)- k += 1---def paving_grid(batch: Any, mats: Sequence[Any], center: Sequence[float], size: float | Sequence[float], stone: float | Sequence[float],- joint: float, rng_: Any) -> None:- """A rectangular grid of flagstones ``stone`` (m, or (x, y)) with ``joint`` m gaps over- ``size`` m around ``center`` (x, y, ground z), 2 cm thick, cycling ``mats`` with a jitter."""- sx, sy = (float(size), float(size)) if isinstance(size, (int, float)) else (float(size[0]), float(size[1]))- tx, ty = (float(stone), float(stone)) if isinstance(stone, (int, float)) else (float(stone[0]), float(stone[1]))- cx, cy, cz = (float(v) for v in center)- nx, ny = max(1, int(sx / (tx + joint))), max(1, int(sy / (ty + joint)))- k = 0- for i in range(nx):- for j in range(ny):- x = cx - sx / 2 + (tx + joint) * (i + 0.5)- y = cy - sy / 2 + (ty + joint) * (j + 0.5)- batch.box(mats[rng_.randrange(len(mats))], (x, y, cz + 0.01), (tx - rng_.uniform(0, joint * 0.5), ty - rng_.uniform(0, joint * 0.5), 0.02))- k += 1---def _slab(name: str, collection: Any, mat: Any, loc: Sequence[float], size: Sequence[float], parent: Any) -> Any:- v, f = box_geometry(loc, size)- ob = mesh_object(name, v, f, mat, collection)- ob.parent = parent- return ob---def room_shell(collection: Any, mat: Any, *, center: Sequence[float], extents: Sequence[float], thickness: float = 0.2,- openings: Sequence[Sequence[Any]] = (), glazed: bool = False) -> list[Any]:- """One enclosure: a rectangular room whose inner faces are the box ``center`` / ``extents`` (floor,- four walls and lid built OUTSIDE it) under a root Empty ``RoomShell``, the lid named ``Ceiling`` (the- overview rig lifts it) — for ``src/env.py``. Measured for ANY interior: it reads enclosed in the judged- frames (the finding is "not enclosed, a diorama on a flat plane"), nothing seats inside a wall- (placement gate), the lid is ``Ceiling`` under ``RoomShell``; a nave, a vault or an L-shaped loft is- built by hand to the same names. ``openings`` = ``(wall, offset, width, sill, head)`` rows — ``wall``- front/back/left/right (front = -Y), ``offset`` along the wall from its centre, ``sill``/``head`` above- the floor — cut as panels, no booleans. ``glazed`` makes a glass house: every wall panel and the lid- become a ``materials.glass`` pane casting no shadow on an iron-frame grid of ``mat`` bars (``_BAY`` /- ``_BAR`` rhythm; the sun comes through, the grid shadows the floor); the floor stays opaque ``mat``, a- pane is its panel's name + ``Glass``. Returns ``[root, floor, ceiling, walls…]`` (glazed: each panel's- frame then its pane)."""- cx, cy, cz = (float(v) for v in center)- ex, ey, ez = (float(v) for v in extents)- t = float(thickness)- z0, z1 = cz - ez / 2, cz + ez / 2- pane = (bpy.data.materials.get("RoomShellGlass") or glass("RoomShellGlass", color="E6F2F0")) if glazed else None- root = bpy.data.objects.new("RoomShell", None)- root.empty_display_size = 0.5- collection.objects.link(root)- out = [root, _slab("RoomShellFloor", collection, mat, (cx, cy, z0 - t / 2), (ex + 2 * t, ey + 2 * t, t), root)]- out += _slabs("Ceiling", collection, mat, pane, (cx, cy, z1 + t / 2), (ex + 2 * t, ey + 2 * t, t), 2, root)- # each wall: (name, axis along the wall, centre point, length)- walls = {"front": ("RoomShellWallFront", "x", (cx, cy - ey / 2 - t / 2), ex + 2 * t),- "back": ("RoomShellWallBack", "x", (cx, cy + ey / 2 + t / 2), ex + 2 * t),- "left": ("RoomShellWallLeft", "y", (cx - ex / 2 - t / 2, cy), ey),- "right": ("RoomShellWallRight", "y", (cx + ex / 2 + t / 2, cy), ey)}- cuts: dict[str, list[tuple[float, float, float, float]]] = {w: [] for w in _WALLS}- for row in openings:- wall, offset, width, sill, head = str(row[0]), float(row[1]), float(row[2]), float(row[3]), float(row[4])- # clamped into the wall: a head above the lid would invert the lintel into a slab ABOVE it (gate ERROR)- sill, head = max(0.0, min(sill, ez)), max(0.0, min(head, ez))- if wall in cuts and width > 0 and head > sill:- cuts[wall].append((offset, width, sill, head))- for wall in _WALLS:- name, axis, (wx, wy), length = walls[wall]- spec = (collection, mat, root, name, axis, wx, wy, t, pane)- segs = sorted(cuts[wall], key=lambda c: c[0])- edge = -length / 2- k = 0- for offset, width, sill, head in segs:- a, b = max(edge, offset - width / 2), min(length / 2, offset + width / 2)- _panel(out, spec, edge, a, z0, z1, f"_{k}")- if sill > 0:- _panel(out, spec, a, b, z0, z0 + sill, f"_{k}Sill")- if head < ez:- _panel(out, spec, a, b, z0 + head, z1, f"_{k}Lintel")- edge = b- k += 1- _panel(out, spec, edge, length / 2, z0, z1, "" if k == 0 else f"_{k}")- return out---def _panel(out: list[Any], spec: tuple[Any, ...], a: float, b: float, zb: float, zt: float, tag: str) -> None:- """One wall panel between ``a`` and ``b`` along the wall, ``zb``..``zt`` tall (skipped when- degenerate); ``spec`` = (collection, material, root, name, axis, wx, wy, thickness, pane)."""- collection, mat, root, name, axis, wx, wy, t, pane = spec- if b - a <= 1e-3 or zt - zb <= 1e-3:- return- mid = (a + b) / 2- loc = (wx + mid, wy, (zb + zt) / 2) if axis == "x" else (wx, wy + mid, (zb + zt) / 2)- size = (b - a, t, zt - zb) if axis == "x" else (t, b - a, zt - zb)- out.extend(_slabs(f"{name}{tag}", collection, mat, pane, loc, size, 1 if axis == "x" else 0, root))---def _slabs(name: str, collection: Any, mat: Any, pane: Any, loc: Sequence[float], size: Sequence[float], thin: int,- parent: Any) -> list[Any]:- """One opaque slab — or, with a ``pane`` material, its glazed twin: a ``_PANE`` glass sheet in- the slab's mid-plane that casts no shadow (the sun comes through), framed by ``mat`` bars on a- WORLD lattice (``_BAY`` apart: the grid runs on across neighbouring panels and around an- opening) plus a bar on every edge. ``thin`` = the thickness axis (0 x, 1 y, 2 z), known from- the face — never the smallest size: a sill can be narrower than the wall is thick."""- if pane is None:- return [_slab(name, collection, mat, loc, size, parent)]- c0, s0 = [float(v) for v in loc], [float(v) for v in size]- verts: list[Vec3] = []- faces: list[tuple[int, ...]] = []- depth = max(0.04, min(s0[thin], 0.15))- i, j = [k for k in range(3) if k != thin]- for along, across in ((i, j), (j, i)):- lo, hi = c0[across] - s0[across] / 2, c0[across] + s0[across] / 2- lines, v = [lo, hi], math.ceil((lo + 0.3) / _BAY[across]) * _BAY[across]- while v < hi - 0.3:- lines.append(v)- v += _BAY[across]- for at in lines:- c, s = list(c0), [0.0, 0.0, 0.0]- c[across] = at- s[thin], s[along], s[across] = depth, s0[along], _BAR- bv, bf = box_geometry(c, s)- base = len(verts)- verts += bv- faces += [tuple(base + n for n in f) for f in bf]- frame = mesh_object(name, verts, faces, mat, collection)- frame.parent = parent- sheet_ob = _slab(f"{name}Glass", collection, pane, c0, [_PANE if k == thin else s0[k] for k in range(3)], parent)- sheet_ob.visible_shadow = False- return [frame, sheet_ob]---def lantern(batch: Any, silk: Any, wood: Any, center: Sequence[float], *, radius: float = 0.35, length: float | None = None) -> None:- """A paper lantern centred at ``center`` (it hangs: tag the finished root ``free`` or put- it on a post): a ``silk`` body (make it ``materials.emissive``) with ``wood`` caps and a- hanging loop; ``length`` defaults to 2.4 x ``radius``."""- cx, cy, cz = (float(v) for v in center)- L = float(length) if length is not None else radius * 2.4- batch.lathe(silk, (cx, cy), [(0.0, cz - L / 2), (radius * 0.55, cz - L / 2 + 0.03), (radius, cz - L * 0.22), (radius, cz + L * 0.22),- (radius * 0.55, cz + L / 2 - 0.03), (0.0, cz + L / 2)], sides=24)- for zz in (cz - L / 2 - 0.02, cz + L / 2 + 0.02):- batch.lathe(wood, (cx, cy), [(0.0, zz - 0.02), (radius * 0.4, zz - 0.02), (radius * 0.4, zz + 0.02), (0.0, zz + 0.02)], sides=12)- batch.ring(wood, (cx, cy, cz + L / 2 + 0.1), (0.0, 1.0, 0.0), 0.06, 0.008, segments=16)---def text_mesh(name: str, collection: Any, body: str, loc: Sequence[float], size: float, mat: Any, *,- rotation: Sequence[float] = (math.pi / 2, 0.0, 0.0), align: str = "CENTER", extrude: float = 0.005) -> Any:- """Readable lettering: a text object saying ``body`` at ``loc``, ``size`` m tall letters,- standing up and facing -Y with the default ``rotation``; ``extrude`` gives it thickness.- Measured by the census like any mesh; a sign a camera can read."""- cu = bpy.data.curves.new(name, "FONT")- cu.body = str(body)- cu.size = float(size)- cu.extrude = float(extrude)- cu.align_x = align- if mat is not None:- cu.materials.append(mat)- ob = bpy.data.objects.new(name, cu)- ob.location = tuple(float(v) for v in loc)- ob.rotation_mode = "XYZ"- ob.rotation_euler = tuple(float(v) for v in rotation)- collection.objects.link(ob)- return obdiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/figure.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/figure.pydeleted file mode 100644index e3eefc5d..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/figure.py+++ /dev/null@@ -1,75 +0,0 @@-"""lib/figure.py — people as batch geometry: a figure, a dressed visitor, a crowd.--A figure is 1.72 x ``scale`` m tall and stands on ``center`` (x, y, ground z) facing -Y, turned-by ``heading`` (radians about Z; ``place.heading(a, b)`` gives the value that faces ``b``).-``pose`` 0 stands, 1 is a full walking stride (legs and arms swung). About 560 triangles; a-crowd of forty is one object.-"""--from __future__ import annotations--import math-from collections.abc import Sequence-from typing import Any--from mathutils import Matrix--_H = 1.72---def figure(batch: Any, cloth: Any, skin: Any, center: Sequence[float], *, scale: float = 1.0, heading: float = 0.0,- pose: float = 0.0) -> None:- """One person in ``cloth`` with ``skin`` hands and head, standing on ``center``."""- _person(batch, cloth, cloth, skin, center, scale=scale, heading=heading, pose=pose)---def visitor(batch: Any, cloth: Any, mats: Sequence[Any], center: Sequence[float], *, scale: float = 1.0, heading: float = 0.0,- pose: float = 0.0, variant: int = 0) -> None:- """A dressed figure: ``cloth`` for the coat, ``mats[variant]`` for the legs (a list of- trouser / skirt materials, cycled), ``mats[-1]`` for the skin when it holds two or more- — hand ``materials.tint`` copies to vary a crowd."""- pool = list(mats) or [cloth]- legs = pool[int(variant) % len(pool)]- skin = pool[-1] if len(pool) > 1 else cloth- _person(batch, cloth, legs, skin, center, scale=scale, heading=heading, pose=pose)---def crowd(batch: Any, mats: Sequence[Any], points: Sequence[Sequence[float]], rng_: Any, **kw: Any) -> None:- """A ``visitor`` at every (x, y, ground z) of ``points`` with a random heading, stride and- coat drawn from ``mats`` (the last is the skin); ``kw`` = ``scale``."""- pool = list(mats)- coats = pool[:-1] if len(pool) > 1 else pool- for i, p in enumerate(points):- visitor(batch, coats[rng_.randrange(len(coats))], pool, p, heading=rng_.uniform(0.0, math.tau),- pose=rng_.uniform(0.0, 1.0), variant=rng_.randrange(len(pool)) if pool else i, **kw)---def _person(batch: Any, coat: Any, legs: Any, skin: Any, center: Sequence[float], *, scale: float, heading: float, pose: float) -> None:- H = _H * float(scale)- cx, cy, cz = (float(v) for v in center)- view = batch.transformed(Matrix.Translation((cx, cy, cz)) @ Matrix.Rotation(float(heading), 4, "Z"))- swing = 0.45 * max(0.0, min(1.0, float(pose)))- hip_z, knee_z, ankle_z = 0.5 * H, 0.27 * H, 0.04 * H- for side, s in ((-1, 1.0), (1, -1.0)):- hx = side * 0.085 * H- fwd = -math.sin(swing * s) * (hip_z - ankle_z) # a stride goes along -Y (the front)- knee = (hx, fwd * 0.55, knee_z + 0.02 * H * abs(math.sin(swing)))- ankle = (hx, fwd, ankle_z)- view.beam(legs, (hx, 0.0, hip_z), knee, 0.065 * H, end=0.05 * H, sides=8)- view.beam(legs, knee, ankle, 0.05 * H, end=0.04 * H, sides=8)- view.box(skin, (hx, fwd - 0.05 * H, 0.02 * H), (0.08 * H, 0.15 * H, 0.04 * H))- # torso (a flattened lathe), neck, head- torso = view.transformed(Matrix.Diagonal((1.0, 0.68, 1.0, 1.0)))- torso.lathe(coat, (0.0, 0.0), [(0.13 * H, hip_z - 0.02 * H), (0.15 * H, 0.62 * H), (0.155 * H, 0.74 * H), (0.12 * H, 0.82 * H), (0.0, 0.835 * H)], sides=14)- view.beam(skin, (0.0, 0.0, 0.8 * H), (0.0, 0.0, 0.87 * H), 0.035 * H, sides=8)- view.sphere(skin, (0.0, 0.0, 0.925 * H), (0.07 * H, 0.075 * H, 0.085 * H), subdivision=2)- view.sphere(coat, (0.0, 0.01 * H, 0.95 * H), (0.072 * H, 0.077 * H, 0.065 * H), subdivision=1) # hair / cap- # arms, swung opposite to the legs- for side, s in ((-1, -1.0), (1, 1.0)):- sx = side * 0.19 * H- fwd = -math.sin(swing * s * 0.8) * 0.35 * H- elbow = (sx * 1.1, fwd * 0.5, 0.62 * H)- hand = (sx * 1.05, fwd, 0.47 * H)- view.beam(coat, (sx * 0.9, 0.0, 0.8 * H), elbow, 0.045 * H, end=0.04 * H, sides=8)- view.beam(coat, elbow, hand, 0.04 * H, end=0.032 * H, sides=8)- view.sphere(skin, hand, 0.035 * H, subdivision=1)diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/lighting.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/lighting.pydeleted file mode 100644index f78cac99..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/lighting.py+++ /dev/null@@ -1,110 +0,0 @@-"""lib/lighting.py — lamps as data objects (never ``bpy.ops.object.light_add``).--Units are Blender's: a Sun's ``energy`` is irradiance in W/m² (3-5 reads as daylight under AgX-at exposure 0, 0.3-1 as dusk), point / spot / area ``energy`` is Watts (a 45 W practical lights a-porch, 500-2000 W a hall). Compass angles: 0° = +X, 90° = +Y, like the skeleton's-``SUN_AZIMUTH_DEG``. The harness owns exposure (0) and the view transform (AgX): light the scene,-never the camera.-"""--from __future__ import annotations--import math-from collections.abc import Sequence-from typing import Any--import bpy-from mathutils import Vector--from lib.materials import rgba---def _rgb(color: str | Sequence[float]) -> tuple[float, float, float]:- c = rgba(color) if isinstance(color, str) else tuple(float(v) for v in color)- return (c[0], c[1], c[2])---def aim(obj: Any, target: Sequence[float]) -> None:- """Point ``obj``'s -Z axis (a lamp's beam, a camera's view) at ``target``."""- d = Vector(target) - Vector(obj.location)- if d.length < 1e-6:- return- obj.rotation_mode = "XYZ"- obj.rotation_euler = d.to_track_quat("-Z", "Y").to_euler()---def sun(collection: Any, *, azimuth_deg: float, elevation_deg: float, color: str | Sequence[float] = "FFCF9C",- energy: float = 3.0, angle_deg: float = 2.0, name: str = "Sun") -> tuple[Any, Vector]:- """A Sun lamp shining FROM compass ``azimuth_deg`` at ``elevation_deg``; returns- ``(lamp, towards_sun)`` — the unit vector zones can read as ``ctx.env["sun_direction"]``.- ``angle_deg`` is the disc's angular size (2° = soft natural shadow edges)."""- az, el = math.radians(azimuth_deg), math.radians(elevation_deg)- towards_sun = Vector((math.cos(el) * math.cos(az), math.cos(el) * math.sin(az), math.sin(el)))- lamp = bpy.data.lights.new(name, "SUN")- lamp.energy = float(energy)- lamp.color = _rgb(color)- lamp.angle = math.radians(angle_deg)- ob = bpy.data.objects.new(name, lamp)- ob.rotation_mode = "XYZ"- ob.rotation_euler = (-towards_sun).to_track_quat("-Z", "Y").to_euler()- collection.objects.link(ob)- return ob, towards_sun---def area_light(collection: Any, name: str, loc: Sequence[float], color: str | Sequence[float], energy: float, *,- size: float = 5.0, target: Sequence[float] | None = None, shape: str = "DISK") -> Any:- """An area lamp of ``size`` m (``shape`` SQUARE / RECTANGLE / DISK / ELLIPSE) at ``loc``,- aimed at ``target`` (straight down when None): a ceiling panel, a sky fill, a window."""- lamp = bpy.data.lights.new(name, "AREA")- lamp.shape = shape- lamp.size = float(size)- if shape in ("RECTANGLE", "ELLIPSE"):- lamp.size_y = float(size) * 0.5- lamp.energy = float(energy)- lamp.color = _rgb(color)- ob = bpy.data.objects.new(name, lamp)- ob.location = tuple(float(v) for v in loc)- collection.objects.link(ob)- if target is not None:- aim(ob, target)- return ob---def point_light(collection: Any, name: str, loc: Sequence[float], color: str | Sequence[float], energy: float, *,- radius: float = 0.05) -> Any:- """A point lamp; ``radius`` (m) softens its shadows (a bulb 0.05, a lantern 0.3)."""- lamp = bpy.data.lights.new(name, "POINT")- lamp.energy = float(energy)- lamp.color = _rgb(color)- lamp.shadow_soft_size = float(radius)- ob = bpy.data.objects.new(name, lamp)- ob.location = tuple(float(v) for v in loc)- collection.objects.link(ob)- return ob---def spot(collection: Any, name: str, loc: Sequence[float], color: str | Sequence[float], energy: float, *,- size_deg: float = 45.0, blend: float = 0.3, target: Sequence[float] | None = None) -> Any:- """A spot lamp with a ``size_deg`` cone and ``blend`` soft edge, aimed at ``target``."""- lamp = bpy.data.lights.new(name, "SPOT")- lamp.energy = float(energy)- lamp.color = _rgb(color)- lamp.spot_size = math.radians(size_deg)- lamp.spot_blend = float(blend)- lamp.shadow_soft_size = 0.1- ob = bpy.data.objects.new(name, lamp)- ob.location = tuple(float(v) for v in loc)- collection.objects.link(ob)- if target is not None:- aim(ob, target)- return ob---def practical(collection: Any, name: str, loc: Sequence[float], color: str | Sequence[float] = "FFB270", energy: float = 300.0, *,- size: float = 0.42, target: Sequence[float] | None = None) -> Any:- """The light a visible fixture throws (a lantern, a window, a brazier): a warm disc area lamp- of ``size`` m — pair it with an ``emissive`` skin on the fixture so the source reads.- ``energy`` is what the FRAME needs, not what the fixture looks like: measured on Blender 5.2.2- (the harness's Cycles/AgX settings, c3d-bpy-scene-lighting), two 45 W practicals leave a night- frame at mean luminance 0.05 (a dark_frame ERROR); ~300-500 W each at 2.5-3 m lights it."""- return area_light(collection, name, loc, color, energy, size=size, target=target, shape="DISK")diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/materials.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/materials.pydeleted file mode 100644index e28b0403..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/materials.py+++ /dev/null@@ -1,403 +0,0 @@-"""lib/materials.py — Principled materials without texture files (Blender 5.2 socket names).--Colours are sRGB hex strings (``"8A6A3F"``) converted to linear here, or an already-linear-(r, g, b) tuple. Procedural detail reads OBJECT texture coordinates, so a pattern keeps its-metre scale whatever the object's size. Under Cycles + AgX at exposure 0 a non-emissive-albedo belongs in 0.02-0.8 linear: pure black or pure white reads as a hole or a blown-surface. Never ``use_nodes`` (deprecated in 5.x: every material has a node tree).-"""--from __future__ import annotations--import colorsys-from collections.abc import Sequence-from typing import Any--import bpy--RGBA = tuple[float, float, float, float]---def _srgb_to_linear(c: float) -> float:- return c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4---def rgba(hex_color: str, alpha: float = 1.0) -> RGBA:- """``"RRGGBB"`` (sRGB, optional ``#``) → linear (r, g, b, alpha) for a colour socket."""- h = hex_color.strip().lstrip("#")- if len(h) == 3:- h = "".join(ch * 2 for ch in h)- r, g, b = (int(h[i:i + 2], 16) / 255.0 for i in (0, 2, 4))- return (_srgb_to_linear(r), _srgb_to_linear(g), _srgb_to_linear(b), float(alpha))---def _rgb(color: str | Sequence[float]) -> RGBA:- """A hex string or a linear (r, g, b[, a]) tuple as RGBA."""- if isinstance(color, str):- return rgba(color)- vals = [float(v) for v in color]- return (vals[0], vals[1], vals[2], vals[3] if len(vals) > 3 else 1.0)---def _scaled(c: RGBA, k: float) -> RGBA:- return (min(1.0, c[0] * k), min(1.0, c[1] * k), min(1.0, c[2] * k), c[3])---def _tree(mat: Any) -> tuple[Any, Any, Any, Any]:- nt = mat.node_tree- return nt, nt.nodes, nt.links, nt.nodes["Principled BSDF"]---def _coords(nodes: Any, links: Any, scale: float = 1.0) -> Any:- """Object-space coordinates scaled by ``scale`` (features per metre): the vector socket."""- tc = nodes.new("ShaderNodeTexCoord")- mp = nodes.new("ShaderNodeMapping")- mp.inputs["Scale"].default_value = (scale, scale, scale)- links.new(tc.outputs["Object"], mp.inputs["Vector"])- return mp.outputs["Vector"]---def _noise(nodes: Any, links: Any, vector: Any, scale: float = 1.0, detail: float = 4.0, roughness: float = 0.5) -> Any:- n = nodes.new("ShaderNodeTexNoise")- n.inputs["Scale"].default_value = float(scale)- n.inputs["Detail"].default_value = float(detail)- n.inputs["Roughness"].default_value = float(roughness)- if vector is not None:- links.new(vector, n.inputs["Vector"])- return n---def _mix(nodes: Any, links: Any, a: RGBA, b: RGBA, factor: Any) -> Any:- """``ShaderNodeMix`` (RGBA) between ``a`` and ``b`` driven by ``factor``: the colour output."""- m = nodes.new("ShaderNodeMix")- m.data_type = "RGBA"- m.inputs[6].default_value = a- m.inputs[7].default_value = b- links.new(factor, m.inputs[0])- return m.outputs[2]---def _bump(nodes: Any, links: Any, height: Any, bsdf: Any, strength: float = 0.1, distance: float = 0.05) -> None:- b = nodes.new("ShaderNodeBump")- b.inputs["Strength"].default_value = float(strength)- b.inputs["Distance"].default_value = float(distance)- links.new(height, b.inputs["Height"])- links.new(b.outputs["Normal"], bsdf.inputs["Normal"])---def _ramp(nodes: Any, links: Any, factor: Any, stops: Sequence[tuple[float, RGBA]], interpolation: str = "LINEAR") -> Any:- r = nodes.new("ShaderNodeValToRGB")- r.color_ramp.interpolation = interpolation- els = r.color_ramp.elements- els[0].position, els[0].color = stops[0]- els[1].position, els[1].color = stops[-1]- for pos, col in stops[1:-1]:- e = els.new(pos)- e.color = col- links.new(factor, r.inputs["Fac"])- return r.outputs["Color"]---def material(name: str, color: str | Sequence[float], roughness: float = 0.5, metal: float = 0.0, *,- noise_scale: float = 0.0, bump: float = 0.08, emission: float = 0.0) -> Any:- """A Principled material. ``noise_scale`` > 0 (features per metre) adds a subtle colour- breakup and a bump of ``bump`` strength; ``emission`` > 0 makes it glow in its own colour."""- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- col = _rgb(color)- bsdf.inputs["Base Color"].default_value = col- bsdf.inputs["Roughness"].default_value = float(roughness)- bsdf.inputs["Metallic"].default_value = float(metal)- if emission > 0:- bsdf.inputs["Emission Color"].default_value = col- bsdf.inputs["Emission Strength"].default_value = float(emission)- if noise_scale > 0:- vec = _coords(nodes, links, 1.0)- n = _noise(nodes, links, vec, scale=noise_scale, detail=5.0, roughness=0.55)- links.new(_mix(nodes, links, _scaled(col, 0.82), _scaled(col, 1.12), n.outputs["Fac"]), bsdf.inputs["Base Color"])- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=bump, distance=0.04)- return mat---def masonry(name: str, color: str | Sequence[float], mortar: str = "625D66", scale: float = 2.0) -> Any:- """Bricks in ``color`` with ``mortar`` joints, ``scale`` rows per metre (Brick texture on- object coordinates, so a wall of any size keeps brick-sized bricks)."""- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- col = _rgb(color)- br = nodes.new("ShaderNodeTexBrick")- br.inputs["Color1"].default_value = _scaled(col, 0.9)- br.inputs["Color2"].default_value = _scaled(col, 1.1)- br.inputs["Mortar"].default_value = _rgb(mortar)- br.inputs["Scale"].default_value = float(scale)- br.inputs["Mortar Size"].default_value = 0.025- br.inputs["Mortar Smooth"].default_value = 0.1- links.new(_coords(nodes, links, 1.0), br.inputs["Vector"])- links.new(br.outputs["Color"], bsdf.inputs["Base Color"])- bsdf.inputs["Roughness"].default_value = 0.85- _bump(nodes, links, br.outputs["Fac"], bsdf, strength=0.35, distance=0.02)- return mat---def limestone(name: str, color: str | Sequence[float], scale: float = 1.2) -> Any:- """Pale blotchy stone: noise colour breakup + a fine grain bump (``scale`` blotches / m)."""- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- col = _rgb(color)- vec = _coords(nodes, links, 1.0)- blotch = _noise(nodes, links, vec, scale=scale, detail=3.0, roughness=0.6)- grain = _noise(nodes, links, vec, scale=scale * 18.0, detail=6.0, roughness=0.7)- links.new(_mix(nodes, links, _scaled(col, 0.78), _scaled(col, 1.08), blotch.outputs["Fac"]), bsdf.inputs["Base Color"])- bsdf.inputs["Roughness"].default_value = 0.8- _bump(nodes, links, grain.outputs["Fac"], bsdf, strength=0.12, distance=0.01)- return mat---def ashlar(name: str, color: str | Sequence[float]) -> Any:- """Dressed stone blocks 1.2 x 0.4 m with thin joints."""- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- col = _rgb(color)- br = nodes.new("ShaderNodeTexBrick")- br.inputs["Color1"].default_value = _scaled(col, 0.92)- br.inputs["Color2"].default_value = _scaled(col, 1.06)- br.inputs["Mortar"].default_value = _scaled(col, 0.45)- br.inputs["Scale"].default_value = 1.0- br.inputs["Mortar Size"].default_value = 0.012- br.inputs["Brick Width"].default_value = 1.2- br.inputs["Row Height"].default_value = 0.4- links.new(_coords(nodes, links, 1.0), br.inputs["Vector"])- links.new(br.outputs["Color"], bsdf.inputs["Base Color"])- bsdf.inputs["Roughness"].default_value = 0.75- _bump(nodes, links, br.outputs["Fac"], bsdf, strength=0.3, distance=0.015)- return mat---def woodgrain(mat: Any, dark: str = "29190F", light: str = "805939", direction: Sequence[float] = (3, 0.1, 5)) -> Any:- """Give ``mat`` a stretched-noise grain between ``dark`` and ``light``; ``direction`` scales- the noise per axis (long along the grain, short across). Returns ``mat``."""- _, nodes, links, bsdf = _tree(mat)- tc = nodes.new("ShaderNodeTexCoord")- mp = nodes.new("ShaderNodeMapping")- mp.inputs["Scale"].default_value = tuple(float(v) for v in direction)- links.new(tc.outputs["Object"], mp.inputs["Vector"])- n = _noise(nodes, links, mp.outputs["Vector"], scale=4.0, detail=6.0, roughness=0.6)- ramp = _ramp(nodes, links, n.outputs["Fac"], [(0.35, _rgb(dark)), (0.65, _rgb(light))])- links.new(ramp, bsdf.inputs["Base Color"])- bsdf.inputs["Roughness"].default_value = 0.6- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=0.15, distance=0.01)- return mat---def chipped_paint(mat: Any, paint: str | Sequence[float], substrate: str | Sequence[float], scale: float = 6.0) -> Any:- """Paint in ``paint`` worn through to ``substrate`` in noisy patches (``scale`` patches / m)."""- _, nodes, links, bsdf = _tree(mat)- vec = _coords(nodes, links, 1.0)- n = _noise(nodes, links, vec, scale=scale, detail=4.0, roughness=0.65)- mask = _ramp(nodes, links, n.outputs["Fac"], [(0.42, (0, 0, 0, 1)), (0.5, (1, 1, 1, 1))])- m = nodes.new("ShaderNodeMix")- m.data_type = "RGBA"- m.inputs[6].default_value = _rgb(substrate)- m.inputs[7].default_value = _rgb(paint)- links.new(mask, m.inputs[0])- links.new(m.outputs[2], bsdf.inputs["Base Color"])- bsdf.inputs["Roughness"].default_value = 0.5- _bump(nodes, links, mask, bsdf, strength=0.25, distance=0.003)- return mat---def worn_alloy(name: str, color: str | Sequence[float], *, seed: int = 0, metal: float = 0.55) -> Any:- """Dull metal with streaky roughness; ``seed`` shifts the streak pattern."""- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- bsdf.inputs["Base Color"].default_value = _rgb(color)- bsdf.inputs["Metallic"].default_value = float(metal)- tc = nodes.new("ShaderNodeTexCoord")- mp = nodes.new("ShaderNodeMapping")- mp.inputs["Scale"].default_value = (1.0, 14.0, 1.0)- mp.inputs["Location"].default_value = (seed * 3.7, seed * 1.3, 0.0)- links.new(tc.outputs["Object"], mp.inputs["Vector"])- n = _noise(nodes, links, mp.outputs["Vector"], scale=3.0, detail=5.0, roughness=0.6)- rough = _ramp(nodes, links, n.outputs["Fac"], [(0.3, (0.25, 0.25, 0.25, 1)), (0.7, (0.7, 0.7, 0.7, 1))])- links.new(rough, bsdf.inputs["Roughness"])- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=0.05, distance=0.003)- return mat---def mineral_surface(name: str, color: str | Sequence[float], *, stone: bool = False) -> Any:- """Rock / soil in ``color``: mottled by noise; ``stone=True`` adds Voronoi crack lines."""- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- col = _rgb(color)- vec = _coords(nodes, links, 1.0)- n = _noise(nodes, links, vec, scale=2.5, detail=6.0, roughness=0.6)- base = _mix(nodes, links, _scaled(col, 0.7), _scaled(col, 1.15), n.outputs["Fac"])- if stone:- vor = nodes.new("ShaderNodeTexVoronoi")- vor.inputs["Scale"].default_value = 1.6- links.new(vec, vor.inputs["Vector"])- cracks = _ramp(nodes, links, vor.outputs["Distance"], [(0.0, (0.3, 0.3, 0.3, 1)), (0.08, (1, 1, 1, 1))])- m = nodes.new("ShaderNodeMix")- m.data_type = "RGBA"- m.blend_type = "MULTIPLY"- m.inputs[0].default_value = 1.0- links.new(base, m.inputs[6])- links.new(cracks, m.inputs[7])- base = m.outputs[2]- _bump(nodes, links, vor.outputs["Distance"], bsdf, strength=0.4, distance=0.02)- else:- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=0.2, distance=0.03)- links.new(base, bsdf.inputs["Base Color"])- bsdf.inputs["Roughness"].default_value = 0.9- return mat---def water(name: str, color: str = "163F4A", roughness: float = 0.12, scale: float = 0.8, *,- flow: Sequence[float] = (0.6, 0.2), ctx: Any = None) -> Any:- """A refracting water surface tinted ``color`` with rippled normals (``scale`` ripples / m);- with ``ctx`` the ripples drift ``flow`` m/s between ``ctx.times`` (keyframes on the mapping)."""- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- bsdf.inputs["Base Color"].default_value = _rgb(color)- bsdf.inputs["Roughness"].default_value = float(roughness)- bsdf.inputs["Transmission Weight"].default_value = 0.75- bsdf.inputs["IOR"].default_value = 1.33- bsdf.inputs["Coat Weight"].default_value = 0.3- tc = nodes.new("ShaderNodeTexCoord")- mp = nodes.new("ShaderNodeMapping")- mp.name = "FlowMapping"- links.new(tc.outputs["Object"], mp.inputs["Vector"])- n = _noise(nodes, links, mp.outputs["Vector"], scale=scale, detail=6.0, roughness=0.55)- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=0.08, distance=0.05)- if ctx is not None:- from lib.motion import scroll-- scroll(mp, (float(flow[0]), float(flow[1]), 0.0), ctx)- return mat---def clear_water(name: str) -> Any:- """Shallow, almost colourless water (a basin, a fountain bowl, a stream)."""- mat = water(name, color="9CC8CF", roughness=0.05, scale=1.4)- mat.node_tree.nodes["Principled BSDF"].inputs["Transmission Weight"].default_value = 0.95- return mat---def glass(name: str, color: str = "FFFFFF", roughness: float = 0.05, ior: float = 1.5) -> Any:- mat = bpy.data.materials.new(name)- _, _, _, bsdf = _tree(mat)- bsdf.inputs["Base Color"].default_value = _rgb(color)- bsdf.inputs["Roughness"].default_value = float(roughness)- bsdf.inputs["Transmission Weight"].default_value = 1.0- bsdf.inputs["IOR"].default_value = float(ior)- return mat---def foliage(name: str, color: str | Sequence[float], variants: int = 3) -> list[Any]:- """``variants`` leaf materials around ``color`` (hue and lightness spread, the spread a- photograph carries): give neighbouring trees different ones."""- base = _rgb(color)- h, l_, s = colorsys.rgb_to_hls(*base[:3])- out = []- n = max(1, int(variants))- for i in range(n):- t = (i / (n - 1) - 0.5) if n > 1 else 0.0- r, g, b = colorsys.hls_to_rgb((h + 0.045 * t) % 1.0, max(0.02, min(0.8, l_ * (1.0 + 0.35 * t))), max(0.0, min(1.0, s * (1.0 + 0.2 * t))))- mat = bpy.data.materials.new(f"{name}_{i}")- _, nodes, links, bsdf = _tree(mat)- bsdf.inputs["Base Color"].default_value = (r, g, b, 1.0)- bsdf.inputs["Roughness"].default_value = 0.6- bsdf.inputs["Specular IOR Level"].default_value = 0.3- n_ = _noise(nodes, links, _coords(nodes, links, 1.0), scale=30.0, detail=2.0, roughness=0.5)- links.new(_mix(nodes, links, (r * 0.75, g * 0.75, b * 0.75, 1.0), (min(1.0, r * 1.2), min(1.0, g * 1.2), min(1.0, b * 1.2), 1.0),- n_.outputs["Fac"]), bsdf.inputs["Base Color"])- out.append(mat)- return out---def snow(name: str = "Snow") -> Any:- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- bsdf.inputs["Base Color"].default_value = (0.86, 0.88, 0.92, 1.0)- bsdf.inputs["Roughness"].default_value = 0.55- bsdf.inputs["Subsurface Weight"].default_value = 0.2- bsdf.inputs["Subsurface Radius"].default_value = (0.3, 0.3, 0.35)- n = _noise(nodes, links, _coords(nodes, links, 1.0), scale=25.0, detail=5.0, roughness=0.6)- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=0.1, distance=0.01)- return mat---def ice(name: str = "Ice") -> Any:- mat = bpy.data.materials.new(name)- _, nodes, links, bsdf = _tree(mat)- bsdf.inputs["Base Color"].default_value = (0.8, 0.9, 0.97, 1.0)- bsdf.inputs["Roughness"].default_value = 0.18- bsdf.inputs["Transmission Weight"].default_value = 0.8- bsdf.inputs["IOR"].default_value = 1.31- n = _noise(nodes, links, _coords(nodes, links, 1.0), scale=3.0, detail=7.0, roughness=0.7)- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=0.3, distance=0.02)- return mat---def emissive(name: str, color: str | Sequence[float], strength: float) -> Any:- """A light-giving skin (a lantern paper, a sign, a window pane): ``strength`` 3-8 READS as a lit- fixture, 20+ as sun-bright — but it does not light a frame: measured on Blender 5.2.2 two- fixture-sized emitters at strength 5-80 left a night frame at mean luminance 0.03-0.05- (dark_frame). Pair every emissive fixture with ``lighting.practical`` for the light itself."""- mat = bpy.data.materials.new(name)- _, _, _, bsdf = _tree(mat)- col = _rgb(color)- bsdf.inputs["Base Color"].default_value = (0.02, 0.02, 0.02, 1.0)- bsdf.inputs["Emission Color"].default_value = col- bsdf.inputs["Emission Strength"].default_value = float(strength)- return mat---def volume(name: str, color: str | Sequence[float], density: float = 0.4, *, anisotropy: float = 0.3,- noise_scale: float = 0.0, emission: float = 0.0) -> Any:- """A Principled VOLUME with no surface: the only soft steam, smoke, dust, mist or spark haze- Cycles can draw. A sphere wearing it renders as a puff with no silhouette — a translucent- Principled BSDF skin, a metaball or a disc always has one (``hard_edged_particles``, 8 of 30- argon Blender scenes on 2026-10-15). Measured on Blender 5.2.2: 40 subdivision-3 puffs add- 0.7 s to a 32-spp GPU frame. ``density`` per metre — 0.15-0.35 steam and dust, 0.5-0.8 smoke;- ``noise_scale`` features / m breaks a plume up (3-6); ``emission`` > 0 lights sparks or a haze- from inside. A volume is lit like everything else: white steam under a dim world comes out- grey, so raise the world or give it ``emission`` 0.2-0.5."""- mat = bpy.data.materials.new(name)- nt = mat.node_tree- nodes, links = nt.nodes, nt.links- out = nodes["Material Output"]- for n in [n for n in nodes if n.bl_idname == "ShaderNodeBsdfPrincipled"]:- nodes.remove(n)- vol = nodes.new("ShaderNodeVolumePrincipled")- col = _rgb(color)- vol.inputs["Color"].default_value = col- vol.inputs["Density"].default_value = float(density)- vol.inputs["Anisotropy"].default_value = float(anisotropy)- if emission > 0:- vol.inputs["Emission Color"].default_value = col- vol.inputs["Emission Strength"].default_value = float(emission)- if noise_scale > 0:- n = _noise(nodes, links, _coords(nodes, links, 1.0), scale=float(noise_scale), detail=4.0, roughness=0.6)- mul = nodes.new("ShaderNodeMath")- mul.operation = "MULTIPLY"- mul.inputs[1].default_value = float(density) * 2.0- links.new(n.outputs["Fac"], mul.inputs[0])- links.new(mul.outputs[0], vol.inputs["Density"])- links.new(vol.outputs["Volume"], out.inputs["Volume"])- return mat---def tint(mat: Any, variant: float) -> Any:- """A copy of ``mat`` whose base colour is shifted by ``variant`` (-1..1: darker / lighter- and a touch of hue) — a crowd's coats, a street's shutters."""- out = mat.copy()- out.name = f"{mat.name}_v{variant:+.2f}"- bsdf = out.node_tree.nodes.get("Principled BSDF")- if bsdf is None or bsdf.inputs["Base Color"].is_linked:- return out- r, g, b, a = bsdf.inputs["Base Color"].default_value- h, l_, s = colorsys.rgb_to_hls(r, g, b)- r, g, b = colorsys.hls_to_rgb((h + 0.03 * variant) % 1.0, max(0.02, min(0.85, l_ * (1.0 + 0.3 * variant))), s)- bsdf.inputs["Base Color"].default_value = (r, g, b, a)- return outdiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/mesh.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/mesh.pydeleted file mode 100644index e30ff2fe..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/mesh.py+++ /dev/null@@ -1,339 +0,0 @@-"""lib/mesh.py — a Batch of geometry → a few mesh objects under ONE root.--Why a Batch: the placement census is per OBJECT and Cycles syncs per object — a prop built as-sixty bpy primitives is sixty placement rows and sixty objects, a prop built as one Batch is-ONE row (its root Empty) and one mesh per material. Nothing here touches ``bpy.ops``: vertices-and faces stay plain lists until ``finish`` writes them with ``from_pydata``.--Frame: Z up, -Y front, metres. Primitive ``loc`` is the CENTRE (``cone`` / ``lathe``: the base-on the axis); every finished object gets its origin at its base centre, so ``place.seat`` and-``place.face_toward`` act about the foot of the prop.-"""--from __future__ import annotations--import math-from collections.abc import Sequence-from typing import Any--import bmesh-import bpy-from mathutils import Matrix, Vector--Vec3 = tuple[float, float, float]-_SPHERES: dict[int, tuple[list[Vec3], list[tuple[int, ...]]]] = {}---def sphere_template(level: int) -> tuple[list[Vec3], list[tuple[int, ...]]]:- """A unit icosphere's (vertices, triangles): level 1 = 20 faces, 2 = 80, 3 = 320, 4 = 1280- (cached; copy before mutating)."""- level = max(1, min(5, int(level)))- if level not in _SPHERES:- bm = bmesh.new()- bmesh.ops.create_icosphere(bm, subdivisions=level, radius=1.0)- bm.verts.ensure_lookup_table()- bm.faces.ensure_lookup_table()- verts = [(v.co.x, v.co.y, v.co.z) for v in bm.verts]- faces = [tuple(v.index for v in f.verts) for f in bm.faces]- bm.free()- _SPHERES[level] = (verts, faces)- return _SPHERES[level]---def _axes(d: Vector) -> tuple[Vector, Vector]:- """Two unit vectors orthogonal to ``d`` (right-handed with it)."""- d = d.normalized()- helper = Vector((0.0, 0.0, 1.0)) if abs(d.z) < 0.9 else Vector((1.0, 0.0, 0.0))- u = d.cross(helper).normalized()- return u, d.cross(u).normalized()---def _ring(center: Vector, u: Vector, v: Vector, radius: float, sides: int, phase: float = 0.0) -> list[Vec3]:- out = []- for j in range(sides):- a = phase + math.tau * j / sides- p = center + u * (radius * math.cos(a)) + v * (radius * math.sin(a))- out.append((p.x, p.y, p.z))- return out---def _band(a: int, b: int, sides: int) -> list[tuple[int, ...]]:- """Quads between ring ``a`` and ring ``b`` (vertex offsets), outward for CCW rings."""- return [(a + j, a + (j + 1) % sides, b + (j + 1) % sides, b + j) for j in range(sides)]---def box_geometry(loc: Sequence[float], size: float | Sequence[float], rotation: float = 0.0) -> tuple[list[Vec3], list[tuple[int, ...]]]:- """A box centred at ``loc`` (yaw ``rotation`` radians about Z); 8 vertices, 6 quads."""- sx, sy, sz = (size, size, size) if isinstance(size, (int, float)) else size- hx, hy, hz = sx / 2, sy / 2, sz / 2- c, s = math.cos(rotation), math.sin(rotation)- verts = []- for x, y, z in ((-hx, -hy, -hz), (hx, -hy, -hz), (hx, hy, -hz), (-hx, hy, -hz),- (-hx, -hy, hz), (hx, -hy, hz), (hx, hy, hz), (-hx, hy, hz)):- verts.append((loc[0] + x * c - y * s, loc[1] + x * s + y * c, loc[2] + z))- faces = [(0, 3, 2, 1), (4, 5, 6, 7), (0, 1, 5, 4), (1, 2, 6, 5), (2, 3, 7, 6), (3, 0, 4, 7)]- return verts, faces---def lathe_geometry(xy: Sequence[float], profile: Sequence[Sequence[float]], sides: int = 32,- phase: float = 0.0) -> tuple[list[Vec3], list[tuple[int, ...]]]:- """``profile`` = [(radius, z), ...] revolved about the vertical axis through ``xy``; a radius- of 0 collapses to a point, an open end is capped."""- sides = max(3, int(sides))- verts: list[Vec3] = []- faces: list[tuple[int, ...]] = []- starts: list[int | None] = [] # ring start index, or the apex vertex index when r == 0- apex: list[bool] = []- for r, z in profile:- if r <= 1e-6:- starts.append(len(verts))- apex.append(True)- verts.append((float(xy[0]), float(xy[1]), float(z)))- else:- starts.append(len(verts))- apex.append(False)- verts.extend(_ring(Vector((xy[0], xy[1], z)), Vector((1, 0, 0)), Vector((0, 1, 0)), float(r), sides, phase))- for i in range(len(profile) - 1):- a, b = starts[i], starts[i + 1]- if apex[i] and apex[i + 1]:- continue- if apex[i]:- faces.extend((a, b + (j + 1) % sides, b + j) for j in range(sides))- elif apex[i + 1]:- faces.extend((a + j, a + (j + 1) % sides, b) for j in range(sides))- else:- faces.extend(_band(a, b, sides))- if not apex[0]:- faces.append(tuple(starts[0] + j for j in reversed(range(sides))))- if not apex[-1]:- faces.append(tuple(starts[-1] + j for j in range(sides)))- return verts, faces---def beam_geometry(a: Sequence[float], b: Sequence[float], radius: float, end: float | None = None,- sides: int = 8) -> tuple[list[Vec3], list[tuple[int, ...]]]:- """A capped cylinder from ``a`` to ``b`` (radius ``end`` at ``b`` for a taper)."""- sides = max(3, int(sides))- pa, pb = Vector(a), Vector(b)- d = pb - pa- if d.length < 1e-6:- d = Vector((0, 0, 1e-3))- u, v = _axes(d)- verts = _ring(pa, u, v, radius, sides) + _ring(pb, u, v, radius if end is None else end, sides)- faces = _band(0, sides, sides)- faces.append(tuple(reversed(range(sides))))- faces.append(tuple(range(sides, 2 * sides)))- return verts, faces---def torus_geometry(loc: Sequence[float], radius: float, tube: float, major: int = 64, minor: int = 8,- axis: Sequence[float] = (0.0, 0.0, 1.0)) -> tuple[list[Vec3], list[tuple[int, ...]]]:- """A torus centred at ``loc`` with its hole along ``axis``."""- major, minor = max(3, int(major)), max(3, int(minor))- rot = Vector((0.0, 0.0, 1.0)).rotation_difference(Vector(axis).normalized()).to_matrix()- centre = Vector(loc)- verts: list[Vec3] = []- for i in range(major):- a = math.tau * i / major- ring_c = Vector((radius * math.cos(a), radius * math.sin(a), 0.0))- radial = Vector((math.cos(a), math.sin(a), 0.0))- for j in range(minor):- t = math.tau * j / minor- p = ring_c + radial * (tube * math.cos(t)) + Vector((0.0, 0.0, tube * math.sin(t)))- p = centre + rot @ p- verts.append((p.x, p.y, p.z))- faces = []- for i in range(major):- i2 = (i + 1) % major- for j in range(minor):- j2 = (j + 1) % minor- faces.append((i * minor + j, i2 * minor + j, i2 * minor + j2, i * minor + j2))- return verts, faces---def sphere_geometry(loc: Sequence[float], scale: float | Sequence[float], subdivision: int = 1) -> tuple[list[Vec3], list[tuple[int, ...]]]:- sx, sy, sz = (scale, scale, scale) if isinstance(scale, (int, float)) else scale- verts, faces = sphere_template(subdivision)- return [(loc[0] + x * sx, loc[1] + y * sy, loc[2] + z * sz) for x, y, z in verts], list(faces)---class _Part:- __slots__ = ("faces", "material", "smooth", "verts")-- def __init__(self, material: Any) -> None:- self.material = material- self.verts: list[Vec3] = []- self.faces: list[tuple[int, ...]] = []- self.smooth: list[bool] = []---class Batch:- """Geometry accumulated per material; ``finish`` writes the objects.-- ``Batch("Oak_3")`` then ``b.box(...)``, ``b.beam(...)`` …; ``b.transformed(matrix)`` is a view- that transforms what is added through it (a figure facing ``heading``, a lantern hung at an- angle); ``b.finish(ctx.collection)`` returns ``[root, mesh, …]`` — the root is the placement- row and the thing to ``place.seat`` / tag ``root["placement"] = "free"``.- """-- def __init__(self, name: str) -> None:- self.name = str(name)- self._parts: dict[str, _Part] = {}- self._matrix: Matrix | None = None- self._root: Batch = self-- # ------------------------------------------------------------------ accumulation- def add(self, mat: Any, vertices: Sequence[Sequence[float]], faces: Sequence[Sequence[int]], smooth: bool | Sequence[bool] = False) -> int:- """Append raw geometry under material ``mat``; returns the part's vertex count before."""- key = mat.name if mat is not None else ""- part = self._root._parts.get(key)- if part is None:- part = self._root._parts[key] = _Part(mat)- base = len(part.verts)- if self._matrix is not None:- m = self._matrix- part.verts.extend(tuple(m @ Vector(v)) for v in vertices)- else:- part.verts.extend((float(v[0]), float(v[1]), float(v[2])) for v in vertices)- part.faces.extend(tuple(int(i) + base for i in f) for f in faces)- if isinstance(smooth, bool):- part.smooth.extend([smooth] * len(faces))- else:- flags = list(smooth)- part.smooth.extend(bool(flags[i]) if i < len(flags) else False for i in range(len(faces)))- return base-- def transformed(self, matrix: Matrix | Sequence[Sequence[float]]) -> Batch:- """A view of this batch whose additions are transformed by ``matrix`` first."""- view = Batch.__new__(Batch)- view.name = self.name- view._parts = self._root._parts- view._root = self._root- m = Matrix(matrix)- view._matrix = (self._matrix @ m) if self._matrix is not None else m- return view-- def box(self, mat: Any, loc: Sequence[float], size: float | Sequence[float], rotation: float = 0.0) -> None:- self.add(mat, *box_geometry(loc, size, rotation))-- def sphere(self, mat: Any, loc: Sequence[float], scale: float | Sequence[float], subdivision: int = 1) -> None:- self.add(mat, *sphere_geometry(loc, scale, subdivision), smooth=True)-- def lathe(self, mat: Any, xy: Sequence[float], profile: Sequence[Sequence[float]], sides: int = 32, phase: float = 0.0) -> None:- self.add(mat, *lathe_geometry(xy, profile, sides, phase), smooth=True)-- def cone(self, mat: Any, loc: Sequence[float], radius: float, height: float, top: float = 0.0, sides: int = 24) -> None:- """A cone / frustum standing on its base centre ``loc``."""- self.lathe(mat, (loc[0], loc[1]), [(radius, loc[2]), (top, loc[2] + height)], sides)-- def beam(self, mat: Any, a: Sequence[float], b: Sequence[float], radius: float, end: float | None = None, sides: int = 8) -> None:- self.add(mat, *beam_geometry(a, b, radius, end, sides), smooth=sides >= 12)-- def torus(self, mat: Any, loc: Sequence[float], radius: float, tube: float, major: int = 64, minor: int = 8) -> None:- self.add(mat, *torus_geometry(loc, radius, tube, major, minor), smooth=True)-- def ring(self, mat: Any, center: Sequence[float], normal: Sequence[float], radius: float, tube: float, segments: int = 96) -> None:- """A hoop of radius ``radius`` whose axis is ``normal`` (an arch rib, a wheel rim)."""- self.add(mat, *torus_geometry(center, radius, tube, segments, 8, axis=normal), smooth=True)-- # ------------------------------------------------------------------ output- def bounds(self) -> tuple[Vector, Vector] | None:- lo = Vector((math.inf, math.inf, math.inf))- hi = Vector((-math.inf, -math.inf, -math.inf))- seen = False- for part in self._root._parts.values():- for x, y, z in part.verts:- seen = True- lo.x, lo.y, lo.z = min(lo.x, x), min(lo.y, y), min(lo.z, z)- hi.x, hi.y, hi.z = max(hi.x, x), max(hi.y, y), max(hi.z, z)- return (lo, hi) if seen else None-- def finish(self, collection: Any, *, bevel: float = 0.0, parent: bool = True, name_prefix: str = "") -> list[Any]:- """Write one mesh object per material into ``collection``: under ONE root Empty named- after the batch (``parent=True``, the default — one placement row however many- materials), else the meshes alone. Every object's origin is the batch's base centre.- ``bevel`` > 0 adds a Bevel modifier (angle-limited) to each mesh."""- parts = [p for p in self._root._parts.values() if p.faces]- if not parts:- return []- lo, hi = self.bounds() # type: ignore[misc]- origin = Vector(((lo.x + hi.x) / 2, (lo.y + hi.y) / 2, lo.z))- base_name = f"{name_prefix}{self.name}"- out: list[Any] = []- root = None- if parent:- root = bpy.data.objects.new(base_name, None)- root.empty_display_size = 0.25- root.location = origin- collection.objects.link(root)- out.append(root)- for part in parts:- mat_tag = part.material.name.replace(" ", "") if part.material is not None else "Mesh"- name = f"{base_name}_{mat_tag}" if (parent or len(parts) > 1) else base_name- me = bpy.data.meshes.new(name)- me.from_pydata([(x - origin.x, y - origin.y, z - origin.z) for x, y, z in part.verts], [], part.faces)- me.update()- if len(me.polygons) == len(part.smooth):- me.polygons.foreach_set("use_smooth", part.smooth)- if part.material is not None:- me.materials.append(part.material)- ob = bpy.data.objects.new(name, me)- if root is not None:- ob.parent = root- else:- ob.location = origin- collection.objects.link(ob)- if bevel > 0:- mod = ob.modifiers.new("Bevel", "BEVEL")- mod.width = float(bevel)- mod.segments = 2- mod.limit_method = "ANGLE"- mod.angle_limit = math.radians(40.0)- out.append(ob)- return out---def mesh_object(name: str, vertices: Sequence[Sequence[float]], faces: Sequence[Sequence[int]], mat: Any, collection: Any,- *, smooth: bool = False) -> Any:- """One mesh object from raw lists, linked into ``collection`` (origin at the world origin)."""- me = bpy.data.meshes.new(name)- me.from_pydata([tuple(float(c) for c in v) for v in vertices], [], [tuple(int(i) for i in f) for f in faces])- me.update()- if smooth:- me.shade_smooth()- if mat is not None:- me.materials.append(mat)- ob = bpy.data.objects.new(name, me)- collection.objects.link(ob)- return ob---def curve_object(name: str, points: Sequence[Sequence[float]], radius: float, mat: Any, collection: Any,- *, cyclic: bool = False) -> Any:- """A tube along ``points`` (a POLY spline with a round bevel) — a rope, a cable, a vine."""- cu = bpy.data.curves.new(name, "CURVE")- cu.dimensions = "3D"- cu.bevel_depth = float(radius)- cu.bevel_resolution = 3- cu.use_fill_caps = True- sp = cu.splines.new("POLY")- sp.points.add(len(points) - 1)- for i, p in enumerate(points):- sp.points[i].co = (float(p[0]), float(p[1]), float(p[2]), 1.0)- sp.use_cyclic_u = bool(cyclic)- if mat is not None:- cu.materials.append(mat)- ob = bpy.data.objects.new(name, cu)- collection.objects.link(ob)- return ob---def parent_under(objects: Sequence[Any], collection: Any, name: str) -> Any:- """An Empty named ``name`` in ``collection`` that becomes the parent of ``objects`` (their- world poses kept): several objects as ONE placement row."""- root = bpy.data.objects.new(name, None)- root.empty_display_size = 0.25- collection.objects.link(root)- for ob in objects:- ob.parent = root- return rootdiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/motion.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/motion.pydeleted file mode 100644index 63591ec0..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/motion.py+++ /dev/null@@ -1,121 +0,0 @@-"""lib/motion.py — animation as DATA: keyframes on ``ctx.frame(t)`` and simple drivers.--The harness samples frame ``ctx.frame(t)`` for every ``t`` in ``ctx.times`` (0 and 1.5 s at 30-fps = frames 1 and 46) and reads the result off the saved .blend: nothing here runs Python at-render time. A driver expression must be in Blender's simple-expression subset (``frame``,-``sin`` / ``cos`` / ``min`` / ``max`` / ``clamp``, + - * /) — a Python driver evaluates to 0-under ``--factory-startup`` and fails the build census. Actions are slotted in 5.2: the-f-curves live in ``action.layers[0].strips[0].channelbag(slot)``.-"""--from __future__ import annotations--import math-from collections.abc import Sequence-from typing import Any--_AXES = {"X": 0, "Y": 1, "Z": 2}---def _frames(ctx: Any, t0: float | None = None, t1: float | None = None) -> tuple[int, int]:- times = tuple(ctx.times) if ctx is not None else (0.0, 1.5)- a = float(times[0] if t0 is None else t0)- b = float(times[-1] if t1 is None else t1)- return ctx.frame(a), ctx.frame(b)---def fcurves(id_data: Any) -> list[Any]:- """Every f-curve animating ``id_data`` (an object, a node tree, a shape key block)."""- ad = getattr(id_data, "animation_data", None)- act = ad.action if ad is not None else None- if act is None:- return []- out: list[Any] = []- for layer in act.layers:- for strip in layer.strips:- bag = strip.channelbag(ad.action_slot)- if bag is not None:- out.extend(bag.fcurves)- return out---def set_interpolation(id_data: Any, interpolation: str = "LINEAR") -> None:- """``LINEAR`` / ``BEZIER`` / ``CONSTANT`` on every keyframe of ``id_data``."""- for fc in fcurves(id_data):- for kp in fc.keyframe_points:- kp.interpolation = interpolation---def keyframe_path(obj: Any, points: Sequence[Sequence[float]], ctx: Any, *, t0: float = 0.0, t1: float | None = None,- interpolation: str = "LINEAR") -> None:- """Move ``obj`` through ``points`` (world positions of its origin) evenly between ``t0`` and- ``t1`` (default: the last of ``ctx.times``)."""- f0, f1 = _frames(ctx, t0, t1)- n = len(points)- for i, p in enumerate(points):- frame = f0 if n == 1 else round(f0 + (f1 - f0) * i / (n - 1))- obj.location = (float(p[0]), float(p[1]), float(p[2]))- obj.keyframe_insert("location", frame=frame)- obj.location = (float(points[0][0]), float(points[0][1]), float(points[0][2]))- set_interpolation(obj, interpolation)---def drift(obj: Any, delta: Sequence[float], ctx: Any) -> None:- """Translate ``obj`` by ``delta`` (m) over ``ctx.times``: a drifting boat, a rising balloon,- a falling leaf — linear."""- start = (float(obj.location[0]), float(obj.location[1]), float(obj.location[2]))- end = (start[0] + float(delta[0]), start[1] + float(delta[1]), start[2] + float(delta[2]))- keyframe_path(obj, [start, end], ctx)---def spin(obj: Any, axis: str = "Z", turns_per_s: float = 0.25, ctx: Any = None) -> None:- """Rotate ``obj`` about its ``axis`` forever: a simple driver ``frame * k`` (a windmill, a- waterwheel, a weather vane). Positive = counter-clockwise seen from +axis."""- fps = float(ctx.fps) if ctx is not None else 30.0- k = math.tau * float(turns_per_s) / fps- obj.rotation_mode = "XYZ"- fc = obj.driver_add("rotation_euler", _AXES[axis.upper()])- fc.driver.type = "SCRIPTED"- fc.driver.expression = f"frame*{k:.6f}"---def sway(obj: Any, axis: str, amplitude: float, period_s: float, ctx: Any) -> None:- """Rock ``obj`` ± ``amplitude`` radians about ``axis`` with period ``period_s``: a simple- driver ``sin(frame * w) * a`` around the current rotation (a hanging lantern, a mast)."""- fps = float(ctx.fps) if ctx is not None else 30.0- w = math.tau / (max(0.05, float(period_s)) * fps)- i = _AXES[axis.upper()]- obj.rotation_mode = "XYZ"- base = float(obj.rotation_euler[i])- fc = obj.driver_add("rotation_euler", i)- fc.driver.type = "SCRIPTED"- fc.driver.expression = f"{base:.6f}+sin(frame*{w:.6f})*{float(amplitude):.6f}"---def scroll(mapping_node: Any, velocity: Sequence[float], ctx: Any) -> None:- """Slide a Mapping node's Location by ``velocity`` (texture units per second) over- ``ctx.times``: moving water, drifting clouds, a flowing aurora — keyframes on the node- tree, linear."""- f0, f1 = _frames(ctx)- t0, t1 = float(ctx.times[0]), float(ctx.times[-1])- sock = mapping_node.inputs["Location"]- start = tuple(float(v) for v in sock.default_value)- sock.keyframe_insert("default_value", frame=f0)- sock.default_value = tuple(start[k] + float(velocity[k]) * (t1 - t0) for k in range(3))- sock.keyframe_insert("default_value", frame=f1)- sock.default_value = start- set_interpolation(mapping_node.id_data, "LINEAR")---def shape_key_sweep(obj: Any, key_name: str, ctx: Any, *, from_value: float = 0.0, to_value: float = 1.0) -> None:- """Drive shape key ``key_name`` of ``obj`` from ``from_value`` to ``to_value`` over- ``ctx.times`` (a sail filling, a flower opening) — linear keyframes on the key block."""- f0, f1 = _frames(ctx)- keys = obj.data.shape_keys- key = keys.key_blocks[key_name]- key.value = float(from_value)- key.keyframe_insert("value", frame=f0)- key.value = float(to_value)- key.keyframe_insert("value", frame=f1)- key.value = float(from_value)- set_interpolation(keys, "LINEAR")diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/noise.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/noise.pydeleted file mode 100644index 9fe54877..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/noise.py+++ /dev/null@@ -1,145 +0,0 @@-"""lib/noise.py — seeded noise on the CPU: hills, scatter masks, jitter. Pure python.--Deterministic in (coordinates, seed) on every machine, so a zone can seat on the env's-``height_at`` without reading the terrain mesh back. Gradient (Perlin) noise on a hashed-lattice: ``fbm2`` / ``fbm3`` return about -1..1, ``ridged`` 0..1. Cost: a 96 x 96 height-field with four octaves is ~60 ms — fine for the env's ground, too slow for a per-blade-query (use ``hash01`` for that).-"""--from __future__ import annotations--import math-import random-from collections.abc import Callable, Sequence--_MASK = 0xFFFFFFFF-#: the twelve Perlin gradient directions (edge midpoints of a cube)-_GRAD3: tuple[tuple[float, float, float], ...] = (- (1, 1, 0), (-1, 1, 0), (1, -1, 0), (-1, -1, 0), (1, 0, 1), (-1, 0, 1),- (1, 0, -1), (-1, 0, -1), (0, 1, 1), (0, -1, 1), (0, 1, -1), (0, -1, -1),-)---def rng(seed: int = 0) -> random.Random:- """THE seeded generator (``ctx.rng(seed)`` is the same object): never module-level random."""- return random.Random(seed)---def hash01(i: int, seed: int = 0) -> float:- """A uniform [0, 1) value from an integer and a seed — the lattice hash, also the cheapest- per-item jitter (``hash01(index, seed)`` costs nothing and never drifts between runs)."""- x = (int(i) * 0x27D4EB2D + int(seed) * 0x165667B1 + 0x9E3779B9) & _MASK- x = ((x ^ (x >> 15)) * 0x2C1B3C6D) & _MASK- x = ((x ^ (x >> 12)) * 0x297A2D39) & _MASK- return (x ^ (x >> 15)) / 4294967296.0---def _lattice(ix: int, iy: int, iz: int = 0) -> int:- return (ix * 1619 + iy * 31337 + iz * 6971) & _MASK---def _fade(t: float) -> float:- return t * t * t * (t * (t * 6.0 - 15.0) + 10.0)---def _grad2(ix: int, iy: int, seed: int, fx: float, fy: float) -> float:- a = hash01(_lattice(ix, iy), seed) * math.tau- return math.cos(a) * fx + math.sin(a) * fy---def _grad3(ix: int, iy: int, iz: int, seed: int, fx: float, fy: float, fz: float) -> float:- g = _GRAD3[int(hash01(_lattice(ix, iy, iz), seed) * 12.0) % 12]- return g[0] * fx + g[1] * fy + g[2] * fz---def noise2(x: float, y: float, seed: int = 0) -> float:- """One octave of 2-D gradient noise, about -1..1, period-free."""- x0, y0 = math.floor(x), math.floor(y)- fx, fy = x - x0, y - y0- u, v = _fade(fx), _fade(fy)- n00 = _grad2(x0, y0, seed, fx, fy)- n10 = _grad2(x0 + 1, y0, seed, fx - 1.0, fy)- n01 = _grad2(x0, y0 + 1, seed, fx, fy - 1.0)- n11 = _grad2(x0 + 1, y0 + 1, seed, fx - 1.0, fy - 1.0)- nx0 = n00 + u * (n10 - n00)- nx1 = n01 + u * (n11 - n01)- return max(-1.0, min(1.0, (nx0 + v * (nx1 - nx0)) * 1.4142))---def noise3(x: float, y: float, z: float, seed: int = 0) -> float:- """One octave of 3-D gradient noise, about -1..1 (boulder displacement, cloud density)."""- x0, y0, z0 = math.floor(x), math.floor(y), math.floor(z)- fx, fy, fz = x - x0, y - y0, z - z0- u, v, w = _fade(fx), _fade(fy), _fade(fz)-- def corner(dx: int, dy: int, dz: int) -> float:- return _grad3(x0 + dx, y0 + dy, z0 + dz, seed, fx - dx, fy - dy, fz - dz)-- x00 = corner(0, 0, 0) + u * (corner(1, 0, 0) - corner(0, 0, 0))- x10 = corner(0, 1, 0) + u * (corner(1, 1, 0) - corner(0, 1, 0))- x01 = corner(0, 0, 1) + u * (corner(1, 0, 1) - corner(0, 0, 1))- x11 = corner(0, 1, 1) + u * (corner(1, 1, 1) - corner(0, 1, 1))- y0v = x00 + v * (x10 - x00)- y1v = x01 + v * (x11 - x01)- return max(-1.0, min(1.0, (y0v + w * (y1v - y0v)) * 1.15))---def fbm2(x: float, y: float, *, octaves: int = 4, lacunarity: float = 2.0, gain: float = 0.5,- seed: int = 0) -> float:- """Fractal sum of ``octaves`` gradient octaves, normalised to about -1..1. Feature size is- 1 unit: call with ``x / scale_m``."""- total, amp, freq, norm = 0.0, 1.0, 1.0, 0.0- for o in range(max(1, int(octaves))):- total += amp * noise2(x * freq + o * 17.31, y * freq - o * 11.07, seed + o)- norm += amp- amp *= gain- freq *= lacunarity- return total / norm---def fbm3(x: float, y: float, z: float, *, octaves: int = 4, lacunarity: float = 2.0, gain: float = 0.5,- seed: int = 0) -> float:- """``fbm2`` in three dimensions (about -1..1)."""- total, amp, freq, norm = 0.0, 1.0, 1.0, 0.0- for o in range(max(1, int(octaves))):- total += amp * noise3(x * freq + o * 5.17, y * freq - o * 3.71, z * freq + o * 7.03, seed + o)- norm += amp- amp *= gain- freq *= lacunarity- return total / norm---def ridged(x: float, y: float, *, seed: int = 0, octaves: int = 5) -> float:- """Ridged multifractal, 0..1: sharp crests and rounded valleys (mountains, dune crests)."""- total, amp, freq, norm, weight = 0.0, 1.0, 1.0, 0.0, 1.0- for o in range(max(1, int(octaves))):- n = 1.0 - abs(noise2(x * freq + o * 13.7, y * freq + o * 9.1, seed + o))- n = n * n * weight- weight = max(0.0, min(1.0, n * 2.0))- total += n * amp- norm += amp- amp *= 0.5- freq *= 2.1- return max(0.0, min(1.0, total / norm))---def mountain_height(x: float, y: float, *, seed: int = 0, amplitude: float = 45.0, frequency: float = 0.013) -> float:- """A horizon ridge's height (m) at (x, y): ``amplitude`` x ridged noise of wavelength- ``1 / frequency`` m (the defaults give 45 m peaks about 80 m apart) — for a backdrop range- BEYOND the play area, never under the cameras."""- r = ridged(x * frequency, y * frequency, seed=seed)- return amplitude * r * r---def height_field(size: float | Sequence[float], segments: int, fn: Callable[[float, float], float]) -> list[float]:- """``fn(x, y)`` sampled on a ``(segments + 1)²`` grid centred at the origin, row-major- (y outer, x inner) — the order ``terrain.ground`` and ``mesh.mesh_object`` grids use."""- sx, sy = (float(size), float(size)) if isinstance(size, (int, float)) else (float(size[0]), float(size[1]))- n = max(1, int(segments))- out: list[float] = []- for iy in range(n + 1):- y = -sy / 2 + sy * iy / n- for ix in range(n + 1):- out.append(float(fn(-sx / 2 + sx * ix / n, y)))- return outdiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/place.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/place.pydeleted file mode 100644index 84d17138..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/place.py+++ /dev/null@@ -1,260 +0,0 @@-"""lib/place.py — seating, facing and the zone's own placement self-check.--The placement gate (``runtime_js/lib/host_placement.mjs``, run on the census GLB) samples up to-five FOOT COLUMNS per placed thing — the lowest vertex and the ±x / ±y extremes of the band-within max(2 cm, 5 %) of its height above its minimum — and reports a gap > 0.05 m outdoors-(0.02 m indoors) as floating, a burial > 0.10 m as sunk and AABB overlaps > 10 % of the-smaller box as interpenetration. ``seat`` uses the SAME columns, so what it seats the gate-reads as supported. World matrices are composed here from ``matrix_basis`` because-``obj.matrix_world`` is stale until the depsgraph evaluates (an object just given a-``location`` still reports the identity).-"""--from __future__ import annotations--import math-from collections.abc import Callable, Sequence-from typing import Any--import bpy-import numpy as np-from mathutils import Matrix, Vector--#: the gate's foot band: max(FOOT_BAND_MIN_M, FOOT_BAND_FRAC x height) above the lowest vertex-FOOT_BAND_MIN_M = 0.02-FOOT_BAND_FRAC = 0.05-CONTACT_M = 0.02-_EVALUATED_TYPES = ("CURVE", "FONT", "SURFACE", "META")---def world_matrix(obj: Any) -> Matrix:- """``obj``'s world matrix NOW (parent chain x ``matrix_basis``), not the depsgraph's last."""- m = obj.matrix_basis.copy()- if obj.parent is not None:- return world_matrix(obj.parent) @ obj.matrix_parent_inverse @ m- return m---def _mesh_points(obj: Any, matrix: Matrix, *, evaluated: bool) -> np.ndarray:- """World-space vertices of one object's own geometry (empty for a non-geometric object)."""- me = None- owner = None- if obj.type == "MESH" and (not evaluated or not obj.modifiers):- me = obj.data- elif obj.type == "MESH" or obj.type in _EVALUATED_TYPES:- owner = obj.evaluated_get(bpy.context.evaluated_depsgraph_get())- try:- me = owner.to_mesh()- except RuntimeError:- me = None- if me is None or len(me.vertices) == 0:- if owner is not None:- owner.to_mesh_clear()- return np.empty((0, 3), np.float64)- co = np.empty(len(me.vertices) * 3, np.float32)- me.vertices.foreach_get("co", co)- if owner is not None:- owner.to_mesh_clear()- pts = co.reshape(-1, 3).astype(np.float64)- m = np.array(matrix, np.float64)- return pts @ m[:3, :3].T + m[:3, 3]---def _collection_points(coll: Any, matrix: Matrix, *, evaluated: bool) -> list[np.ndarray]:- off = Vector(coll.instance_offset)- out = []- for o in coll.all_objects:- if o.type == "EMPTY" or o.hide_render:- continue- local = world_matrix(o)- local.translation = local.translation - off- out.append(_mesh_points(o, matrix @ local, evaluated=evaluated))- return out---def world_points(obj: Any, *, evaluated: bool = True) -> np.ndarray:- """World-space vertices of ``obj``, its children and (for a collection instance) its- source — the point set the gate measures as this placement row."""- parts: list[np.ndarray] = []- stack = [obj]- while stack:- o = stack.pop()- m = world_matrix(o)- if o.type == "EMPTY" and o.instance_type == "COLLECTION" and o.instance_collection is not None:- parts.extend(_collection_points(o.instance_collection, m, evaluated=evaluated))- else:- parts.append(_mesh_points(o, m, evaluated=evaluated))- stack.extend(o.children)- parts = [p for p in parts if len(p)]- return np.concatenate(parts) if parts else np.empty((0, 3), np.float64)---def bbox_world(obj: Any, *, evaluated: bool = True) -> tuple[Vector, Vector]:- """(min, max) corners of ``obj``'s geometry in world space (children and instances included);- a thing with no geometry answers its own location twice."""- pts = world_points(obj, evaluated=evaluated)- if not len(pts):- p = world_matrix(obj).translation- return Vector(p), Vector(p)- lo, hi = pts.min(axis=0), pts.max(axis=0)- return Vector(lo.tolist()), Vector(hi.tolist())---def foot_columns(points: np.ndarray, columns: int = 5) -> list[tuple[float, float, float]]:- """The gate's foot columns of a point set: lowest, min x, max x, min y, max y of the foot- band, deduplicated within 1 cm, up to ``columns``."""- if not len(points):- return []- zmin, zmax = float(points[:, 2].min()), float(points[:, 2].max())- band = points[points[:, 2] <= zmin + max(FOOT_BAND_MIN_M, FOOT_BAND_FRAC * (zmax - zmin))]-- def lowest_at(axis: int, sign: float) -> np.ndarray:- """The lowest band vertex at the band's extreme along ``axis`` (a sill beam's top and- bottom share an x: the top is not the foot)."""- extreme = (sign * band[:, axis]).max()- cand = band[sign * band[:, axis] >= extreme - 1e-4]- return cand[cand[:, 2].argmin()]-- picks = [band[band[:, 2].argmin()], lowest_at(0, -1.0), lowest_at(0, 1.0), lowest_at(1, -1.0), lowest_at(1, 1.0)]- out: list[tuple[float, float, float]] = []- for p in picks:- x, y, z = (float(v) for v in p)- if any(math.hypot(q[0] - x, q[1] - y) < 0.01 for q in out):- continue- out.append((x, y, z))- if len(out) >= max(1, int(columns)):- break- return out---def _drop(points: np.ndarray, height_at: Callable[[float, float], float], *, sink: float, columns: int) -> float:- """The vertical move that puts the first foot on the ground (every other column at or below- it): ``min`` over the columns of (ground - foot) - sink."""- cols = foot_columns(points, columns)- if not cols:- return 0.0- return min(float(height_at(x, y)) - z for x, y, z in cols) - float(sink)---def seat(obj: Any, height_at: Callable[[float, float], float], *, sink: float = 0.0, columns: int = 5) -> float:- """Move ``obj`` vertically so its lowest foot column rests on ``height_at`` (``sink`` m- deeper: an embedded rock, a driven post). Returns the move in metres. Seat the ROOT of a- prop (the Empty ``Batch.finish`` returns), whose z is a world z."""- dz = _drop(world_points(obj), height_at, sink=sink, columns=columns)- obj.location.z += dz- return dz---def seat_instance(empty: Any, source: Any, height_at: Callable[[float, float], float], *, sink: float = 0.0) -> float:- """``seat`` for a collection-instance Empty of ``source`` (its rotation and scale applied to- the source's geometry before the foot columns are read). Returns the move in metres."""- m = world_matrix(empty)- parts = [p for p in _collection_points(source, m, evaluated=True) if len(p)]- if not parts:- return 0.0- dz = _drop(np.concatenate(parts), height_at, sink=sink, columns=5)- empty.location.z += dz- return dz---def rest_on(obj: Any, support: Any, *, offset: float = 0.0) -> float:- """Seat ``obj`` on ``support`` (a table, a shelf, a wall top): its lowest point meets the- highest point of ``support`` under ``obj``'s footprint (+ ``offset``). Returns the move."""- pts = world_points(obj)- sup = world_points(support)- if not len(pts) or not len(sup):- return 0.0- lo, hi = pts.min(axis=0), pts.max(axis=0)- pad = 0.02- under = sup[(sup[:, 0] >= lo[0] - pad) & (sup[:, 0] <= hi[0] + pad) & (sup[:, 1] >= lo[1] - pad) & (sup[:, 1] <= hi[1] + pad)]- top = float(under[:, 2].max()) if len(under) else float(sup[:, 2].max())- dz = top + float(offset) - float(lo[2])- obj.location.z += dz- return dz---def heading(a: Sequence[float], b: Sequence[float]) -> float:- """The Z rotation (radians) that points a -Y-front object standing at ``a`` toward ``b``."""- return math.atan2(float(b[1]) - float(a[1]), float(b[0]) - float(a[0])) + math.pi / 2---def face_toward(obj: Any, target: Sequence[float]) -> float:- """Yaw ``obj`` (front = -Y) toward ``target``; returns the angle set."""- pos = world_matrix(obj).translation- ang = heading((pos.x, pos.y), target)- obj.rotation_mode = "XYZ"- obj.rotation_euler[2] = ang- return ang---def clear_of(objs: Sequence[Any], min_gap: float = CONTACT_M, *, overlap: float = 0.10) -> list[tuple[str, str, float]]:- """The zone's self-check: pairs of ``objs`` whose world AABBs overlap by more than- ``overlap`` of the smaller box (the gate's interpenetration threshold) as- ``(name_a, name_b, fraction)``; boxes merely within ``min_gap`` are contact, not reported."""- boxes = []- for o in objs:- lo, hi = bbox_world(o)- boxes.append((o.name, np.array(lo), np.array(hi)))- out: list[tuple[str, str, float]] = []- for i in range(len(boxes)):- na, la, ha = boxes[i]- for j in range(i + 1, len(boxes)):- nb, lb, hb = boxes[j]- if np.any(la - min_gap > hb) or np.any(lb - min_gap > ha):- continue- ov = np.minimum(ha, hb) - np.maximum(la, lb)- if np.any(ov <= 0):- continue- va = float(np.prod(np.maximum(ha - la, 0.01)))- vb = float(np.prod(np.maximum(hb - lb, 0.01)))- frac = float(np.prod(ov)) / min(va, vb)- if frac > overlap:- out.append((na, nb, round(frac, 3)))- return out---def clear_mask(objs: Sequence[Any], margin: float = 0.3) -> Callable[[float, float], float]:- """A ``scatter.poisson(mask=…)`` filter that keeps scatter points OUT of the footprints of- ``objs`` — their world AABBs grown by ``margin`` m: 0.0 inside one, 1.0 clear. Build it from- the roots placed by hand BEFORE the small stuff is scattered: 9 of the 13 Blender zones that- shipped an interpenetration ERROR in the argon loop's iteration 0 (2026-10-15) had scattered- a small prop into a cart, a rack, a shrub or a mound (100 % of the smaller box)."""- boxes: list[tuple[float, float, float, float]] = []- for o in objs:- lo, hi = bbox_world(o)- boxes.append((lo.x - margin, lo.y - margin, hi.x + margin, hi.y + margin))-- def mask(x: float, y: float) -> float:- for x0, y0, x1, y1 in boxes:- if x0 <= x <= x1 and y0 <= y <= y1:- return 0.0- return 1.0-- return mask---def keep_inside(obj: Any, bbox: tuple[Sequence[float], Sequence[float]]) -> Vector:- """Slide ``obj`` horizontally so its AABB stays within ``bbox`` = (centre, extents) — the- zone's plan box, in this frame. Returns the move."""- (cx, cy, _), (ex, ey, _) = bbox- lo, hi = bbox_world(obj)- move = Vector((0.0, 0.0, 0.0))- for k, c, e in ((0, cx, ex), (1, cy, ey)):- if lo[k] < c - e / 2:- move[k] = (c - e / 2) - lo[k]- elif hi[k] > c + e / 2:- move[k] = (c + e / 2) - hi[k]- obj.location.x += move.x- obj.location.y += move.y- return move---def unique_name(base: str, i: int) -> str:- """``Base_i`` — or the next free index when that object already exists (names are global- in Blender: a second ``Lantern_0`` would silently become ``Lantern_0.001``)."""- i = int(i)- name = f"{base}_{i}"- while name in bpy.data.objects:- i += 1- name = f"{base}_{i}"- return namediff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/scatter.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/scatter.pydeleted file mode 100644index 15079ce6..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/scatter.py+++ /dev/null@@ -1,183 +0,0 @@-"""lib/scatter.py — placing copies: collection instances and geometry-nodes clouds.--Two kinds of copy, and the gate treats them differently. ``instance`` / ``scatter`` make a-collection-instance Empty per copy, seated on ``height_at``: ONE placement row each (named,-measured for floating / sunk / interpenetration — what a bench, a cart or a tree deserves).-``gn_scatter`` makes an instance CLOUD on a surface (blades, pebbles, tufts: hundreds to tens-of thousands): one object, counted as instances in the census and EXEMPT from per-asset-placement because its copies ride the surface by construction. Blender 5.2 API: node inputs-are set with ``getattr(mod.properties.inputs, identifier).value``.-"""--from __future__ import annotations--import math-from collections.abc import Callable, Sequence-from typing import Any--import bpy--from lib.place import seat_instance, unique_name, world_matrix--HeightFn = Callable[[float, float], float]---def instance(collection: Any, source: Any, name: str, x: float, y: float, *, height_at: HeightFn, rot_z: float = 0.0,- scale: float = 1.0, sink: float = 0.0) -> Any:- """One placed copy of the Collection ``source`` (``ctx.assets["<snake>"]``): an instance- Empty named ``name`` at (x, y), yawed ``rot_z`` radians, seated on ``height_at`` (``sink``- m deeper). Returns the Empty — the placement row."""- ob = bpy.data.objects.new(name, None)- ob.instance_type = "COLLECTION"- ob.instance_collection = source- ob.empty_display_size = 0.25- ob.location = (float(x), float(y), 0.0)- ob.rotation_mode = "XYZ"- ob.rotation_euler = (0.0, 0.0, float(rot_z))- ob.scale = (float(scale), float(scale), float(scale))- collection.objects.link(ob)- seat_instance(ob, source, height_at, sink=sink)- return ob---def scatter(collection: Any, source: Any, prefix: str, points: Sequence[Sequence[float]], *, height_at: HeightFn, rng: Any,- rot: str | float = "random", scale: Sequence[float] = (1.0, 1.0)) -> list[Any]:- """``instance`` at every (x, y) of ``points``, named ``<prefix>_<i>``; ``rot`` ``"random"``- or a fixed yaw, ``scale`` a (min, max) range drawn per copy."""- out = []- for i, p in enumerate(points):- yaw = rng.uniform(0.0, math.tau) if rot == "random" else float(rot)- s = rng.uniform(float(scale[0]), float(scale[1])) if scale[0] != scale[1] else float(scale[0])- out.append(instance(collection, source, unique_name(prefix, i), float(p[0]), float(p[1]), height_at=height_at,- rot_z=yaw, scale=s))- return out---def poisson(rng: Any, *, area: Sequence[float], min_dist: float, max_count: int,- mask: Callable[[float, float], float] | None = None) -> list[tuple[float, float]]:- """Up to ``max_count`` points in ``area`` = (x0, y0, x1, y1) at least ``min_dist`` apart- (dart throwing); ``mask(x, y)`` 0..1 is the chance a candidate is kept (a shoreline, a- clearing). Deterministic for a seeded ``rng``."""- x0, y0, x1, y1 = (float(v) for v in area)- cell = max(1e-3, float(min_dist)) / math.sqrt(2.0)- grid: dict[tuple[int, int], tuple[float, float]] = {}- out: list[tuple[float, float]] = []- tries = max(1, int(max_count)) * 30- for _ in range(tries):- if len(out) >= max_count:- break- x, y = rng.uniform(x0, x1), rng.uniform(y0, y1)- if mask is not None and rng.uniform(0.0, 1.0) > float(mask(x, y)):- continue- gx, gy = int(math.floor((x - x0) / cell)), int(math.floor((y - y0) / cell))- ok = True- for i in range(gx - 2, gx + 3):- for j in range(gy - 2, gy + 3):- q = grid.get((i, j))- if q is not None and math.hypot(q[0] - x, q[1] - y) < min_dist:- ok = False- break- if not ok:- break- if ok:- grid[(gx, gy)] = (x, y)- out.append((x, y))- return out---def along_path(points: Sequence[Sequence[float]], n: int, *, jitter: float = 0.0, rng: Any = None) -> list[tuple[float, ...]]:- """``n`` points evenly spaced by arc length along the polyline ``points`` (2-D or 3-D,- returned the same way), each pushed up to ``jitter`` m sideways when ``rng`` is given."""- pts = [tuple(float(v) for v in p) for p in points]- if len(pts) == 1 or n <= 0:- return pts[:1] * max(0, n)- seg = [math.dist(pts[i], pts[i + 1]) for i in range(len(pts) - 1)]- total = sum(seg)- out: list[tuple[float, ...]] = []- for k in range(n):- d = total * (k / (n - 1) if n > 1 else 0.5)- i = 0- while i < len(seg) - 1 and d > seg[i]:- d -= seg[i]- i += 1- t = d / seg[i] if seg[i] > 0 else 0.0- a, b = pts[i], pts[i + 1]- p = [a[j] + (b[j] - a[j]) * t for j in range(len(a))]- if jitter > 0 and rng is not None:- dx, dy = b[0] - a[0], b[1] - a[1]- L = math.hypot(dx, dy) or 1.0- s = rng.uniform(-jitter, jitter)- p[0] += -dy / L * s- p[1] += dx / L * s- out.append(tuple(p))- return out---def grid(center: Sequence[float], size: float | Sequence[float], spacing: float, rng: Any, *, jitter: float = 0.3) -> list[tuple[float, float]]:- """A grid of (x, y) points ``spacing`` m apart over ``size`` m around ``center``, each moved- up to ``jitter`` x spacing (an orchard, a car park, a crowd that is not a lattice)."""- sx, sy = (float(size), float(size)) if isinstance(size, (int, float)) else (float(size[0]), float(size[1]))- cx, cy = float(center[0]), float(center[1])- nx, ny = max(1, int(sx / spacing)), max(1, int(sy / spacing))- out = []- for i in range(nx):- for j in range(ny):- x = cx - sx / 2 + spacing * (i + 0.5) + rng.uniform(-jitter, jitter) * spacing- y = cy - sy / 2 + spacing * (j + 0.5) + rng.uniform(-jitter, jitter) * spacing- out.append((x, y))- return out---def gn_scatter(name: str, collection: Any, surface: Any, instance_obj: Any, *, density: float, seed: int = 0,- align_normal: bool = True, scale_range: Sequence[float] = (0.8, 1.2)) -> Any:- """An instance cloud of ``instance_obj`` on the mesh of ``surface`` (a hidden patch that- follows the terrain, or any mesh): ``density`` copies per m², random yaw, ``scale_range``- per copy, aligned to the surface normal when ``align_normal``. Returns the host object- (named ``name``; it renders ONLY the instances — the surface stays the distribution- domain). ``instance_obj`` may be hidden: its geometry is copied, not its visibility."""- ng = bpy.data.node_groups.new(f"{name}Scatter", "GeometryNodeTree")- ng.interface.new_socket("Geometry", in_out="INPUT", socket_type="NodeSocketGeometry")- dens = ng.interface.new_socket("Density", in_out="INPUT", socket_type="NodeSocketFloat")- sd = ng.interface.new_socket("Seed", in_out="INPUT", socket_type="NodeSocketInt")- ng.interface.new_socket("Geometry", in_out="OUTPUT", socket_type="NodeSocketGeometry")- n, links = ng.nodes, ng.links- gi, go = n.new("NodeGroupInput"), n.new("NodeGroupOutput")- dist = n.new("GeometryNodeDistributePointsOnFaces")- dist.distribute_method = "RANDOM"- links.new(gi.outputs["Geometry"], dist.inputs["Mesh"])- links.new(gi.outputs["Density"], dist.inputs["Density"])- links.new(gi.outputs["Seed"], dist.inputs["Seed"])- info = n.new("GeometryNodeObjectInfo")- info.inputs["Object"].default_value = instance_obj- inst = n.new("GeometryNodeInstanceOnPoints")- links.new(dist.outputs["Points"], inst.inputs["Points"])- links.new(info.outputs["Geometry"], inst.inputs["Instance"])- yaw = n.new("FunctionNodeRandomValue")- yaw.data_type = "FLOAT_VECTOR"- yaw.inputs["Min"].default_value = (0.0, 0.0, 0.0)- yaw.inputs["Max"].default_value = (0.0, 0.0, math.tau)- links.new(gi.outputs["Seed"], yaw.inputs["Seed"])- euler = n.new("FunctionNodeEulerToRotation")- links.new(yaw.outputs["Value"], euler.inputs["Euler"])- if align_normal:- rot = n.new("FunctionNodeRotateRotation")- links.new(dist.outputs["Rotation"], rot.inputs["Rotation"])- links.new(euler.outputs["Rotation"], rot.inputs["Rotate By"])- links.new(rot.outputs["Rotation"], inst.inputs["Rotation"])- else:- links.new(euler.outputs["Rotation"], inst.inputs["Rotation"])- size = n.new("FunctionNodeRandomValue")- size.data_type = "FLOAT"- size.inputs["Min"].default_value = float(scale_range[0])- size.inputs["Max"].default_value = float(scale_range[1])- links.new(gi.outputs["Seed"], size.inputs["Seed"])- links.new(size.outputs["Value"], inst.inputs["Scale"])- links.new(inst.outputs["Instances"], go.inputs["Geometry"])- host = bpy.data.objects.new(name, surface.data)- host.matrix_world = world_matrix(surface)- collection.objects.link(host)- mod = host.modifiers.new("Scatter", "NODES")- mod.node_group = ng- getattr(mod.properties.inputs, dens.identifier).value = float(density)- getattr(mod.properties.inputs, sd.identifier).value = int(seed)- return hostdiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/sky.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/sky.pydeleted file mode 100644index b7a1d7e7..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/sky.py+++ /dev/null@@ -1,220 +0,0 @@-"""lib/sky.py — the world (sky), fog volumes and sky dressing. ENV ONLY for the world setters:-``scene.world`` belongs to ``src/env.py``'s ``build_env`` (the lint rejects it in a zone).--The census reads the world's background kind (``sky:MULTIPLE_SCATTERING`` / a hex colour / a-node) and the fog from either the world's Volume output or the largest volume-only box-(``haze``); a scene with neither reads as thin_atmosphere. Blender 5.2 facts: the physical-sky is ``MULTIPLE_SCATTERING`` (the old name raises), its dust knob is ``aerosol_density``, and-the sun disc is ON by default — ``sun_world`` turns it off because ``lighting.sun`` is the sun.-"""--from __future__ import annotations--import math-from collections.abc import Sequence-from typing import Any--import bpy--from lib.materials import rgba-from lib.mesh import mesh_object-from lib.noise import fbm2, rng---def _rgb(color: str | Sequence[float]) -> tuple[float, float, float, float]:- if isinstance(color, str):- return rgba(color)- v = [float(c) for c in color]- return (v[0], v[1], v[2], v[3] if len(v) > 3 else 1.0)---def _fresh_world(scene: Any, name: str) -> tuple[Any, Any, Any, Any]:- world = bpy.data.worlds.new(name)- scene.world = world- nt = world.node_tree- bg = nt.nodes.get("Background") or nt.nodes.new("ShaderNodeBackground")- out = nt.nodes.get("World Output") or nt.nodes.new("ShaderNodeOutputWorld")- if not out.inputs["Surface"].is_linked:- nt.links.new(bg.outputs["Background"], out.inputs["Surface"])- return world, nt.nodes, nt.links, bg---def sun_world(scene: Any, *, elevation_deg: float = 12.0, azimuth_deg: float = 125.0, strength: float = 0.2,- dust: float = 2.0) -> Any:- """A physical sky (MULTIPLE_SCATTERING) lit from compass ``azimuth_deg`` (0 = +X, 90 = +Y —- the same numbers as ``lighting.sun``, so the sky's bright side and the shadows agree) at- ``elevation_deg``; ``strength`` is the world's Background strength, ``dust`` the aerosol- density (1 clear, 2-4 hazy). The defaults are a hazy low afternoon — pass the brief's time- of day and weather; strength and dust together decide where a day frame lands in the judged- luminance band. The sun disc is off: the Sun lamp casts the shadows."""- world, nodes, links, bg = _fresh_world(scene, "Sky")- sky = nodes.new("ShaderNodeTexSky")- sky.sky_type = "MULTIPLE_SCATTERING"- sky.sun_disc = False- sky.sun_elevation = math.radians(elevation_deg)- sky.sun_rotation = math.radians(azimuth_deg - 90.0) # Blender: rotation 0 puts the sun at +Y- sky.aerosol_density = float(dust)- links.new(sky.outputs["Color"], bg.inputs["Color"])- bg.inputs["Strength"].default_value = float(strength)- return world---def night_world(scene: Any, color: str | Sequence[float] = "17273F", strength: float = 0.3) -> Any:- """A flat night world in ``color``. A black world fails the judged luminance floor (AgX has- nothing to lift); give it the brief's colour with some value — deep blue, sodium amber,- moonlit grey."""- world, _, _, bg = _fresh_world(scene, "NightSky")- bg.inputs["Color"].default_value = _rgb(color)- bg.inputs["Strength"].default_value = float(strength)- return world---def gradient_world(scene: Any, stops: Sequence[tuple[float, str | Sequence[float]]], *, clouds: bool = True,- strength: float = 0.7) -> Any:- """A sky graded from the horizon (position 0) to the zenith (1) through ``stops`` =- ``[(0.0, "F2C9A0"), (0.35, "7FA7D6"), (1.0, "1F4A8E")]``; ``clouds`` mottles the upper half- with noise. For dusk / dawn / stylised skies where the physical sky is wrong."""- world, nodes, links, bg = _fresh_world(scene, "GradientSky")- tc = nodes.new("ShaderNodeTexCoord")- sep = nodes.new("ShaderNodeSeparateXYZ")- links.new(tc.outputs["Generated"], sep.inputs["Vector"])- ramp = nodes.new("ShaderNodeValToRGB")- els = ramp.color_ramp.elements- ordered = sorted(((float(p), _rgb(c)) for p, c in stops), key=lambda s: s[0])- els[0].position, els[0].color = max(0.0, ordered[0][0]), ordered[0][1]- els[1].position, els[1].color = min(1.0, ordered[-1][0]), ordered[-1][1]- for pos, col in ordered[1:-1]:- e = els.new(max(0.0, min(1.0, pos)))- e.color = col- links.new(sep.outputs["Z"], ramp.inputs["Fac"]) # Generated z = 0 at the horizon, 1 at the zenith- colour = ramp.outputs["Color"]- if clouds:- n = nodes.new("ShaderNodeTexNoise")- n.inputs["Scale"].default_value = 2.5- n.inputs["Detail"].default_value = 6.0- n.inputs["Roughness"].default_value = 0.6- links.new(tc.outputs["Generated"], n.inputs["Vector"])- mask = nodes.new("ShaderNodeValToRGB")- mask.color_ramp.elements[0].position = 0.55- mask.color_ramp.elements[1].position = 0.75- links.new(n.outputs["Fac"], mask.inputs["Fac"])- math_node = nodes.new("ShaderNodeMath")- math_node.operation = "MULTIPLY"- links.new(mask.outputs["Color"], math_node.inputs[0])- links.new(sep.outputs["Z"], math_node.inputs[1])- mix = nodes.new("ShaderNodeMix")- mix.data_type = "RGBA"- mix.inputs[7].default_value = (0.9, 0.9, 0.92, 1.0)- links.new(colour, mix.inputs[6])- links.new(math_node.outputs["Value"], mix.inputs[0])- colour = mix.outputs[2]- links.new(colour, bg.inputs["Color"])- bg.inputs["Strength"].default_value = float(strength)- return world---def haze(collection: Any, loc: Sequence[float], size: float | Sequence[float], density: float = 0.003,- color: str | Sequence[float] = "ADC9E1", name: str = "Atmosphere") -> Any:- """A bounded fog volume: a box centred at ``loc`` of ``size`` m (a number, or (x, y, z))- whose only material is a Principled Volume (``density`` per metre: 0.002 clear valley air,- 0.01 morning mist, 0.03 a dense fog bank). Volume-only, so the census reports it as fog,- not matter. A box rather than a world volume because a world volume over a large scene- swallows the sun (whether the sun still reaches the frame shows in the luminance band);- size and place it for the brief — a valley floor, a riverbank, the whole site."""- sx, sy, sz = (size, size, size) if isinstance(size, (int, float)) else size- hx, hy, hz = sx / 2, sy / 2, sz / 2- cx, cy, cz = (float(v) for v in loc)- verts = [(cx + x, cy + y, cz + z) for x, y, z in ((-hx, -hy, -hz), (hx, -hy, -hz), (hx, hy, -hz), (-hx, hy, -hz),- (-hx, -hy, hz), (hx, -hy, hz), (hx, hy, hz), (-hx, hy, hz))]- faces = [(0, 3, 2, 1), (4, 5, 6, 7), (0, 1, 5, 4), (1, 2, 6, 5), (2, 3, 7, 6), (3, 0, 4, 7)]- mat = bpy.data.materials.new(f"{name}Fog")- nt = mat.node_tree- nt.nodes.remove(nt.nodes["Principled BSDF"])- fog = nt.nodes.new("ShaderNodeVolumePrincipled")- fog.inputs["Density"].default_value = float(density)- fog.inputs["Color"].default_value = _rgb(color)- fog.inputs["Anisotropy"].default_value = 0.3- nt.links.new(fog.outputs["Volume"], nt.nodes["Material Output"].inputs["Volume"])- return mesh_object(name, verts, faces, mat, collection)---def aurora(name: str, collection: Any, center: Sequence[float], *, span: float = 560.0, height: float = 72.0, seed: int = 0,- strength: float = 0.24, ctx: Any = None) -> Any:- """A curtain of aurora: a wavy emissive ribbon ``span`` m long and ``height`` m tall hung at- ``center`` (x, y, altitude). Tagged ``placement = "free"`` (it is in the sky); with ``ctx``- the glow drifts along the ribbon between ``ctx.times``."""- n = 48- verts: list[tuple[float, float, float]] = []- faces: list[tuple[int, ...]] = []- cx, cy, cz = (float(v) for v in center)- for i in range(n + 1):- t = i / n- x = cx - span / 2 + span * t- y = cy + 18.0 * fbm2(t * 3.0, seed * 0.37, octaves=3, seed=seed)- lift = 6.0 * fbm2(t * 5.0 + 11.0, seed * 0.11, octaves=2, seed=seed + 1)- verts.append((x, y, cz + lift))- verts.append((x, y, cz + height + lift * 1.5))- for i in range(n):- a = 2 * i- faces.append((a, a + 2, a + 3, a + 1))- mat = bpy.data.materials.new(f"{name}Glow")- nt = mat.node_tree- nodes, links = nt.nodes, nt.links- bsdf = nodes["Principled BSDF"]- nodes.remove(bsdf)- emit = nodes.new("ShaderNodeEmission")- emit.inputs["Strength"].default_value = float(strength) * 8.0- tc = nodes.new("ShaderNodeTexCoord")- mp = nodes.new("ShaderNodeMapping")- mp.name = "FlowMapping"- mp.inputs["Scale"].default_value = (0.02, 0.02, 0.05)- links.new(tc.outputs["Object"], mp.inputs["Vector"])- noise = nodes.new("ShaderNodeTexNoise")- noise.inputs["Scale"].default_value = 1.0- noise.inputs["Detail"].default_value = 4.0- links.new(mp.outputs["Vector"], noise.inputs["Vector"])- ramp = nodes.new("ShaderNodeValToRGB")- els = ramp.color_ramp.elements- els[0].position, els[0].color = 0.35, (0.05, 0.9, 0.45, 1.0)- els[1].position, els[1].color = 0.75, (0.5, 0.2, 0.9, 1.0)- links.new(noise.outputs["Fac"], ramp.inputs["Fac"])- links.new(ramp.outputs["Color"], emit.inputs["Color"])- # fade to nothing along the bottom edge and where the noise is dark- sep = nodes.new("ShaderNodeSeparateXYZ")- links.new(tc.outputs["Generated"], sep.inputs["Vector"])- fade = nodes.new("ShaderNodeMath")- fade.operation = "MULTIPLY"- links.new(sep.outputs["Z"], fade.inputs[0])- links.new(noise.outputs["Fac"], fade.inputs[1])- transparent = nodes.new("ShaderNodeBsdfTransparent")- mix = nodes.new("ShaderNodeMixShader")- links.new(fade.outputs["Value"], mix.inputs["Fac"])- links.new(transparent.outputs["BSDF"], mix.inputs[1])- links.new(emit.outputs["Emission"], mix.inputs[2])- links.new(mix.outputs["Shader"], nodes["Material Output"].inputs["Surface"])- mat.surface_render_method = "BLENDED"- ob = mesh_object(name, verts, faces, mat, collection)- ob["placement"] = "free"- if ctx is not None:- from lib.motion import scroll-- scroll(mp, (0.6, 0.0, 0.0), ctx)- return ob---def stars(batch: Any, mat: Any, *, seed: int = 0, count: int = 900, radius: float = 600.0) -> None:- """``count`` star quads on a dome of ``radius`` m above the horizon, added to ``batch`` with- an ``emissive`` ``mat``. Name the batch ``Stars…`` (sky-named and 1 km wide, so the census- files it as sky) and tag its root ``["placement"] = "free"``."""- r = rng(seed)- for _ in range(max(0, int(count))):- az = r.uniform(0.0, math.tau)- el = math.asin(r.uniform(0.08, 1.0))- size = r.uniform(0.6, 1.8)- cx, cy, cz = radius * math.cos(el) * math.cos(az), radius * math.cos(el) * math.sin(az), radius * math.sin(el)- # a quad facing the origin: span two directions orthogonal to the radial line- ux, uy = -math.sin(az), math.cos(az)- vx, vy, vz = -math.sin(el) * math.cos(az), -math.sin(el) * math.sin(az), math.cos(el)- verts = [(cx + (ux * a + vx * b) * size, cy + (uy * a + vy * b) * size, cz + vz * b * size)- for a, b in ((-1, -1), (1, -1), (1, 1), (-1, 1))]- batch.add(mat, verts, [(0, 1, 2, 3)])diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/terrain.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/terrain.pydeleted file mode 100644index cbebcc2c..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/terrain.py+++ /dev/null@@ -1,191 +0,0 @@-"""lib/terrain.py — the ground and the rock that sits on it.--INTERFACE: ``src/env.py`` exports ``height_at(x, y) -> z``, the one ground truth the zones,-``place.seat`` / ``scatter.instance`` and the placement gate sample. Any function with that-signature qualifies — a slope, a terrace, a valley floor, a riverbed, whatever land the brief-describes; ``make_height_at`` below is one optional landform, not the ground. Batch recipes-(``boulder``, ``talus``, ``basalt_column`` …) stand their lowest vertex ON the ``center`` z you-pass — pass ``height_at(x, y)``.-"""--from __future__ import annotations--import math-from collections.abc import Callable, Sequence-from typing import Any--from lib.mesh import mesh_object, sphere_template-from lib.noise import fbm2, fbm3, hash01, rng--HeightFn = Callable[[float, float], float]---def _smoothstep(e0: float, e1: float, x: float) -> float:- t = max(0.0, min(1.0, (x - e0) / (e1 - e0))) if e1 > e0 else (1.0 if x >= e1 else 0.0)- return t * t * (3.0 - 2.0 * t)---def make_height_at(*, seed: int = 0, relief: float = 3.0, scale: float = 60.0, flat_radius: float = 0.0,- base: float = 0.0) -> HeightFn:- """One landform among many: rolling fbm hills of up to ``relief`` m above ``base`` with- features ``scale`` m wide, and — only when asked — a level pad within ``flat_radius`` m of- the origin (0 = no pad; the hills blend in over ``scale`` m beyond it). Whether a pad- exists, where it sits and what the land does beyond it is the brief's: for a slope, a- terrace, a ridge, a riverbed, write your own ``height_at`` — only the signature is the- contract. What is measured: every seated object rests on ``height_at`` within the placement- gate's contact tolerance, and a camera's eye stays above the ground under it (the frame- gate's ``camera_underground``) — lift the camera, not the land."""- blend = max(1.0, scale)- pad = max(0.0, float(flat_radius))-- def height_at(x: float, y: float) -> float:- n = 0.5 + 0.5 * fbm2(x / scale, y / scale, octaves=4, seed=seed)- if pad <= 0.0:- return base + relief * n- r = math.hypot(x, y)- if r <= pad:- return base- return base + _smoothstep(pad, pad + blend, r) * relief * n-- return height_at---def ground(name: str, collection: Any, *, size: float | Sequence[float], segments: int, height_at: HeightFn,- material: Any, center: Sequence[float] = (0.0, 0.0), smooth: bool = True) -> Any:- """The terrain mesh: a ``size`` m grid (a number, or (x, y)) of ``segments`` cells around- ``center`` following ``height_at``. Extent, shape and resolution are the brief's, within- the triangle budget (2 x ``segments`` ** 2); what is measured is that no authored camera sees- a hard world edge, a terrain cliff or a missing horizon (rubric ``world_edge_visible``), so- the ground reaches whatever closes the view. Name it ``Ground…`` / ``Terrain…``: the census- classifies the ground by name and shape, and the placement gate seats on it."""- sx, sy = (float(size), float(size)) if isinstance(size, (int, float)) else (float(size[0]), float(size[1]))- n = max(1, int(segments))- cx, cy = float(center[0]), float(center[1])- verts = []- for iy in range(n + 1):- y = cy - sy / 2 + sy * iy / n- for ix in range(n + 1):- x = cx - sx / 2 + sx * ix / n- verts.append((x, y, float(height_at(x, y))))- faces = []- for iy in range(n):- for ix in range(n):- a = iy * (n + 1) + ix- faces.append((a, a + 1, a + n + 2, a + n + 1))- return mesh_object(name, verts, faces, material, collection, smooth=smooth)---def cliff(name: str, collection: Any, *, length: float, height: float, height_at: HeightFn, material: Any,- seed: int = 0) -> Any:- """A rock face ``length`` m long along +X (centred on the origin, facing -Y) and ``height``- m tall, its foot on ``height_at`` and its face broken by ledges; move / rotate the object- to place it. ~2 400 triangles."""- nx, nz = max(2, int(length / 1.5)), max(2, int(height / 1.2))- verts = []- for iz in range(nz + 1):- v = iz / nz- for ix in range(nx + 1):- u = ix / nx- x = -length / 2 + length * u- bulge = 1.4 * fbm2(u * 6.0, v * 4.0, octaves=4, seed=seed) + 0.6 * (1.0 - v)- ledge = 0.35 * math.sin(v * 9.0 + fbm2(u * 3.0, 7.0, octaves=2, seed=seed) * 2.0)- z = float(height_at(x, 0.0)) + height * v + (0.0 if iz == 0 else 0.4 * fbm2(u * 9.0, v * 9.0, octaves=2, seed=seed + 3))- verts.append((x, -bulge - ledge, z))- # a back wall and a top so the face is a closed slab- top = len(verts)- for ix in range(nx + 1):- x = -length / 2 + length * ix / nx- verts.append((x, 2.5, float(height_at(x, 2.5)) + height + 0.3))- faces = []- for iz in range(nz):- for ix in range(nx):- a = iz * (nx + 1) + ix- faces.append((a, a + nx + 1, a + nx + 2, a + 1))- for ix in range(nx):- a = nz * (nx + 1) + ix- faces.append((a, a + 1, top + ix + 1, top + ix))- return mesh_object(name, verts, faces, material, collection, smooth=True)---def _sphere_cloud(center: Sequence[float], scale: Sequence[float], seed: int, detail: int, *, rough: float = 0.28, squash: float = 0.6- ) -> tuple[list[tuple[float, float, float]], list[tuple[int, ...]]]:- """An icosphere displaced by fbm3, flattened underneath, standing on ``center`` z."""- verts, faces = sphere_template(detail)- out = []- sx, sy, sz = scale- for x, y, z in verts:- d = 1.0 + rough * fbm3(x * 1.7 + seed, y * 1.7, z * 1.7 - seed, octaves=3, seed=seed)- out.append((x * d * sx, y * d * sy, (z * d * sz) if z >= 0 else z * d * sz * squash))- zmin = min(v[2] for v in out)- cx, cy, cz = (float(c) for c in center)- return [(cx + x, cy + y, cz + (z - zmin)) for x, y, z in out], list(faces)---def boulder(batch: Any, mat: Any, center: Sequence[float], scale: float | Sequence[float], *, seed: int = 0, detail: int = 3) -> None:- """A rock of ``scale`` m (a number, or (x, y, z) extents) standing on ``center`` z;- ``detail`` 2 = 80 triangles (a field), 3 = 320 (near the camera), 4 = 1 280 (a hero)."""- s = (scale, scale, scale * 0.8) if isinstance(scale, (int, float)) else tuple(float(v) for v in scale)- v, f = _sphere_cloud(center, (s[0] / 2, s[1] / 2, s[2] / 2), seed, detail)- batch.add(mat, v, f, smooth=True)---def rock_field(batch: Any, mat: Any, center: Sequence[float], radius: float, count: int, height_at: HeightFn, rng_: Any) -> None:- """``count`` boulders of 0.3-1.4 m scattered within ``radius`` of ``center`` (x, y), each- standing on ``height_at`` — 80 triangles apiece."""- cx, cy = float(center[0]), float(center[1])- for i in range(max(0, int(count))):- a, r = rng_.uniform(0.0, math.tau), radius * math.sqrt(rng_.uniform(0.0, 1.0))- x, y = cx + r * math.cos(a), cy + r * math.sin(a)- s = rng_.uniform(0.3, 1.4)- boulder(batch, mat, (x, y, float(height_at(x, y))), (s, s * rng_.uniform(0.7, 1.2), s * rng_.uniform(0.5, 0.8)),- seed=int(rng_.uniform(0, 10_000)) + i, detail=2)---def talus(batch: Any, mat: Any, center: Sequence[float], scale: float, seed: int) -> None:- """A scree heap ``scale`` m across standing on ``center`` z: ~40 small rocks piled in a cone- (the lower ones on the ground, the upper ones on the heap) — ~800 triangles."""- r = rng(seed)- cx, cy, cz = (float(c) for c in center)- heap_h = scale * 0.45- for i in range(40):- a, d = r.uniform(0.0, math.tau), math.sqrt(r.uniform(0.0, 1.0))- x, y = cx + d * scale / 2 * math.cos(a), cy + d * scale / 2 * math.sin(a)- surface = heap_h * max(0.0, 1.0 - d) ** 1.3- s = scale * r.uniform(0.08, 0.2)- boulder(batch, mat, (x, y, cz + surface * 0.85), (s, s * r.uniform(0.6, 1.0), s * 0.7), seed=seed * 7 + i, detail=1)---def basalt_column(batch: Any, materials: Sequence[Any], center: Sequence[float], radius: float, height: float, rng_: Any,- lean: Sequence[float] = (0.0, 0.0)) -> None:- """A cluster of hexagonal basalt columns within ``radius`` of ``center`` (x, y, ground z),- the tallest ``height`` m, cycling ``materials``; ``lean`` (dx, dy per metre of height) tilts- the whole cluster. Each column is 8 quads."""- cx, cy, cz = (float(c) for c in center)- step = max(0.3, radius / 2.6)- k = 0- for i in range(-3, 4):- for j in range(-3, 4):- x = cx + step * (i + 0.5 * (j % 2))- y = cy + step * 0.866 * j- if math.hypot(x - cx, y - cy) > radius:- continue- h = height * (0.35 + 0.65 * (1.0 - math.hypot(x - cx, y - cy) / radius)) * rng_.uniform(0.75, 1.0)- r = step * 0.52- top = [(x + r * math.cos(a) + lean[0] * h, y + r * math.sin(a) + lean[1] * h, cz + h) for a in- (math.tau * s / 6 for s in range(6))]- bottom = [(x + r * math.cos(a), y + r * math.sin(a), cz) for a in (math.tau * s / 6 for s in range(6))]- verts = bottom + top- faces = [(s, (s + 1) % 6, 6 + (s + 1) % 6, 6 + s) for s in range(6)] + [tuple(range(6, 12))]- batch.add(materials[k % len(materials)], verts, faces)- k += 1---def shoreline_mask(x: float, y: float, water_level: float, height_at: HeightFn) -> float:- """0 under water, 1 half a metre above it, smooth between — a scatter mask that keeps- reeds on the bank and trees off the beach."""- return _smoothstep(0.0, 0.5, float(height_at(x, y)) - float(water_level))---def jitter(i: int, seed: int = 0) -> float:- """-1..1 from an index: the cheap per-item variation (``hash01``) in signed form."""- return hash01(i, seed) * 2.0 - 1.0diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/vegetation.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/vegetation.pydeleted file mode 100644index 271ac9c8..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/vegetation.py+++ /dev/null@@ -1,229 +0,0 @@-"""lib/vegetation.py — trees, shrubs, ferns, grass and flower beds as batch geometry.--A crown is LEAVES: hundreds of small leaf cards in a volume, never one displaced ball — a-closed blob has no silhouette, lets no light through and carries one hue. Every recipe stands-on the z you pass (``loc`` / ``center`` = the ground point: pass ``height_at(x, y)``); counts-are capped so a tree costs 3-9 k triangles (``max_leaves``). Ground cover that must be dense-(blades, tufts) goes through ``grass_patch`` = a geometry-nodes instance cloud, which the-census counts as instances and the placement gate leaves alone.-"""--from __future__ import annotations--import math-from collections.abc import Callable, Sequence-from typing import Any--from mathutils import Vector--from lib.materials import material-from lib.mesh import mesh_object, sphere_template-from lib.noise import rng-from lib.scatter import gn_scatter--HeightFn = Callable[[float, float], float]-Vec3 = tuple[float, float, float]-_CROWN = { # kind: (trunk share of the height, crown rx / height, crown rz / height, leaf size, crown lift)- "broadleaf": (0.40, 0.30, 0.32, 0.17, 0.0),- "oak": (0.33, 0.44, 0.30, 0.20, 0.02),- "cypress": (0.08, 0.13, 0.46, 0.12, 0.0),- "pine": (0.30, 0.26, 0.35, 0.14, 0.0),-}---def _leaf(center: Vector, normal: Vector, size: float, base: int) -> tuple[list[Vec3], list[tuple[int, ...]]]:- n = normal.normalized()- helper = Vector((0.0, 0.0, 1.0)) if abs(n.z) < 0.9 else Vector((1.0, 0.0, 0.0))- u = n.cross(helper).normalized() * size- v = n.cross(u).normalized() * size- pts = [center - u - v, center + u - v, center + u + v, center - u + v]- return [(p.x, p.y, p.z) for p in pts], [(base, base + 1, base + 2, base + 3)]---def _leaf_cloud(batch: Any, mat: Any, center: Vector, radii: Sequence[float], count: int, size: float, r: Any,- *, shell: float = 0.55) -> None:- """``count`` leaf cards inside the ellipsoid ``radii`` about ``center``, biased to the- outer ``shell`` (the inside of a crown is never seen); one ``add`` for the whole cloud."""- verts: list[Vec3] = []- faces: list[tuple[int, ...]] = []- rx, ry, rz = radii- for _ in range(max(0, int(count))):- d = Vector((r.gauss(0.0, 1.0), r.gauss(0.0, 1.0), r.gauss(0.0, 1.0)))- if d.length < 1e-6:- continue- d.normalize()- rad = shell + (1.0 - shell) * r.uniform(0.0, 1.0) ** 0.5- p = center + Vector((d.x * rx * rad, d.y * ry * rad, d.z * rz * rad))- normal = d + Vector((r.uniform(-0.6, 0.6), r.uniform(-0.6, 0.6), r.uniform(-0.6, 0.6)))- v, f = _leaf(p, normal, size * 0.5 * r.uniform(0.7, 1.3), len(verts)) # size = the card's full side- verts.extend(v)- faces.extend(f)- batch.add(mat, verts, faces)---def tree(batch: Any, loc: Sequence[float], height: float, bark: Any, foliage: Any, *, seed: int = 0, kind: str = "broadleaf",- max_leaves: int = 4000) -> None:- """A tree ``height`` m tall standing on ``loc`` (x, y, ground z): a tapered trunk, 4-7- branches and a crown of leaf cards (``broadleaf`` / ``oak`` / ``cypress``) or tiered- needle cones (``pine``). 3-9 k triangles; ``max_leaves`` caps the crown."""- r = rng(seed)- x, y, z = (float(v) for v in loc)- kind = kind if kind in _CROWN else "broadleaf"- trunk_share, krx, krz, leaf, lift = _CROWN[kind]- trunk_h = height * trunk_share- r0 = max(0.04, height * (0.028 if kind == "cypress" else 0.036))- batch.lathe(bark, (x, y), [(r0 * 1.3, z), (r0, z + 0.25), (r0 * 0.72, z + trunk_h), (r0 * 0.3, z + trunk_h + height * 0.28)], sides=10)- crown_c = Vector((x, y, z + trunk_h + height * krz * (1.0 + lift)))- radii = (height * krx, height * krx * r.uniform(0.85, 1.0), height * krz)- if kind == "pine":- tiers = 5- for k in range(tiers):- t = k / (tiers - 1)- base_z = z + trunk_h * 0.7 + (height - trunk_h * 0.7) * t * 0.78- rad = height * krx * (1.0 - 0.75 * t) * r.uniform(0.9, 1.1)- batch.cone(foliage, (x, y, base_z), rad, height * 0.28 * (1.0 - 0.3 * t), top=rad * 0.08, sides=14)- return- for _ in range(r.randint(4, 7)):- a = r.uniform(0.0, math.tau)- start = Vector((x, y, z + trunk_h * r.uniform(0.75, 1.0)))- end = crown_c + Vector((math.cos(a) * radii[0] * 0.55, math.sin(a) * radii[1] * 0.55, r.uniform(-0.2, 0.5) * radii[2]))- batch.beam(bark, start, end, r0 * 0.35, end=r0 * 0.12, sides=6)- count = min(int(max_leaves), int(height * height * (34 if kind != "cypress" else 48)))- _leaf_cloud(batch, foliage, crown_c, radii, count, leaf, r)---def shrub(batch: Any, bark: Any, foliage: Any, center: Sequence[float], *, scale: float = 1.0, seed: int = 0) -> None:- """A bush ~1.1 x ``scale`` m tall standing on ``center``: a few stems and 140 leaf cards."""- r = rng(seed)- x, y, z = (float(v) for v in center)- for _ in range(4):- a, d = r.uniform(0.0, math.tau), r.uniform(0.1, 0.4) * scale- batch.beam(bark, (x, y, z), (x + math.cos(a) * d, y + math.sin(a) * d, z + r.uniform(0.6, 0.9) * scale), 0.02 * scale, end=0.008, sides=5)- _leaf_cloud(batch, foliage, Vector((x, y, z + 0.62 * scale)), (0.55 * scale, 0.5 * scale, 0.5 * scale), 140, 0.11 * scale, r, shell=0.45)---def leaf_spray(batch: Any, foliage: Any, center: Sequence[float], rng_: Any, *, radius: float = 0.32, count: int = 35) -> None:- """``count`` leaf cards within ``radius`` of ``center`` (a vine knot, a creeper on a wall)."""- _leaf_cloud(batch, foliage, Vector(tuple(float(v) for v in center)), (radius, radius, radius), count, radius * 0.35, rng_, shell=0.2)---def _strip(batch: Any, mat: Any, spine: Sequence[Vector], widths: Sequence[float], up: Vector) -> None:- """A ribbon of quads along ``spine`` (its width across ``up`` x direction)."""- verts: list[Vec3] = []- faces: list[tuple[int, ...]] = []- for i, p in enumerate(spine):- d = (spine[min(i + 1, len(spine) - 1)] - spine[max(i - 1, 0)])- side = d.cross(up).normalized() * (widths[i] / 2) if d.length > 1e-6 else Vector((widths[i] / 2, 0, 0))- verts.append((p.x - side.x, p.y - side.y, p.z - side.z))- verts.append((p.x + side.x, p.y + side.y, p.z + side.z))- for i in range(len(spine) - 1):- a = 2 * i- faces.append((a, a + 1, a + 3, a + 2))- batch.add(mat, verts, faces, smooth=True)---def fern(batch: Any, mat: Any, center: Sequence[float], *, scale: float = 1.0, seed: int = 0) -> None:- """A fern of 7 arching fronds, ~0.8 x ``scale`` m across, standing on ``center``."""- r = rng(seed)- x, y, z = (float(v) for v in center)- for k in range(7):- a = math.tau * k / 7 + r.uniform(-0.2, 0.2)- L = scale * r.uniform(0.55, 0.85)- spine = []- widths = []- for i in range(9):- t = i / 8- spine.append(Vector((x + math.cos(a) * L * t, y + math.sin(a) * L * t, z + 0.02 + L * 0.7 * t * (1.25 - t))))- widths.append(0.22 * scale * math.sin(math.pi * min(1.0, t + 0.08)) ** 0.6)- _strip(batch, mat, spine, widths, Vector((0.0, 0.0, 1.0)))---def tropical(batch: Any, leaves: Any, stem: Any, center: Sequence[float], *, scale: float = 1.0, seed: int = 0) -> None:- """A banana-like plant ~2.3 x ``scale`` m tall standing on ``center``: a stem and seven- broad arching leaves."""- r = rng(seed)- x, y, z = (float(v) for v in center)- top = z + 1.4 * scale- batch.beam(stem, (x, y, z), (x, y, top), 0.07 * scale, end=0.05 * scale, sides=8)- for k in range(7):- a = math.tau * k / 7 + r.uniform(-0.25, 0.25)- L = scale * r.uniform(1.1, 1.5)- spine = []- widths = []- for i in range(10):- t = i / 9- spine.append(Vector((x + math.cos(a) * L * t, y + math.sin(a) * L * t, top + L * (0.55 * t - 0.75 * t * t))))- widths.append(0.42 * scale * math.sin(math.pi * min(1.0, t * 0.85 + 0.1)) ** 0.7)- _strip(batch, leaves, spine, widths, Vector((0.0, 0.0, 1.0)))---def grass_clump(batch: Any, mats: Any, x: float, y: float, z: float, rng_: Any) -> None:- """A tuft of 12 leaning blades 0.25-0.45 m tall at (x, y, z); ``mats`` a material or a- list (one picked per blade). 24 triangles."""- pool = list(mats) if isinstance(mats, (list, tuple)) else [mats]- for _ in range(12):- a, lean, h = rng_.uniform(0.0, math.tau), rng_.uniform(0.15, 0.5), rng_.uniform(0.25, 0.45)- w = 0.014- bx, by = x + rng_.uniform(-0.08, 0.08), y + rng_.uniform(-0.08, 0.08)- tip = (bx + math.cos(a) * lean * h, by + math.sin(a) * lean * h, z + h)- mid = (bx + math.cos(a) * lean * h * 0.35, by + math.sin(a) * lean * h * 0.35, z + h * 0.55)- px, py = -math.sin(a) * w, math.cos(a) * w- verts = [(bx - px, by - py, z), (bx + px, by + py, z), (mid[0] + px * 0.6, mid[1] + py * 0.6, mid[2]),- (mid[0] - px * 0.6, mid[1] - py * 0.6, mid[2]), tip]- batch.add(pool[rng_.randrange(len(pool))], verts, [(0, 1, 2, 3), (3, 2, 4)])---def perennial_bed(batch: Any, center: Sequence[float], radius: float, height_at: HeightFn, foliage: Any, petals: Any, rng_: Any) -> None:- """A flower bed within ``radius`` of ``center`` (x, y): 20 grass clumps and 30 flower heads- on stems, each standing on ``height_at``. ~1 100 triangles."""- cx, cy = float(center[0]), float(center[1])- for _ in range(20):- a, d = rng_.uniform(0.0, math.tau), radius * math.sqrt(rng_.uniform(0.0, 1.0))- x, y = cx + d * math.cos(a), cy + d * math.sin(a)- grass_clump(batch, foliage, x, y, float(height_at(x, y)), rng_)- sv, sf = sphere_template(1)- for _ in range(30):- a, d = rng_.uniform(0.0, math.tau), radius * math.sqrt(rng_.uniform(0.0, 1.0))- x, y = cx + d * math.cos(a), cy + d * math.sin(a)- z = float(height_at(x, y))- h = rng_.uniform(0.25, 0.5)- batch.beam(foliage, (x, y, z), (x, y, z + h), 0.006, sides=4)- s = rng_.uniform(0.03, 0.05)- batch.add(petals, [(x + vx * s, y + vy * s, z + h + vz * s * 0.6) for vx, vy, vz in sv], list(sf), smooth=True)---def _blade(name: str, collection: Any, height: float, color: str) -> Any:- """The hidden blade a grass cloud copies: three tapered quads leaning +Y, base at z = 0."""- h, w = float(height), 0.02- verts = [(-w, 0, 0), (w, 0, 0), (w * 0.7, h * 0.12, h * 0.45), (-w * 0.7, h * 0.12, h * 0.45),- (w * 0.35, h * 0.3, h * 0.8), (-w * 0.35, h * 0.3, h * 0.8), (0, h * 0.5, h)]- faces = [(0, 1, 2, 3), (3, 2, 4, 5), (5, 4, 6)]- blade = mesh_object(name, verts, faces, material(f"{name}Mat", color, roughness=0.65), collection)- blade.location = (0.0, 0.0, -200.0)- blade.hide_render = True- blade.hide_viewport = True- return blade---def grass_patch(name: str, collection: Any, surface: Any, *, blade: Any = None, density: float = 5.0, seed: int = 0,- height: float = 0.3, color: str = "4A6B2A") -> Any:- """Grass over ``surface`` (a mesh object — make a hidden ground patch with- ``terrain.ground(..., center=…, size=…)`` and ``hide_render = True`` so it follows the- terrain without drawing a second ground): ``density`` blades per m², ``height`` m tall in- ``color``, or your own ``blade`` object. One geometry-nodes instance cloud (exempt from- per-asset placement); 3 quads per blade — a 12 x 12 m patch at density 5 is ~720 blades."""- src = blade if blade is not None else _blade(f"{name}Blade", collection, height, color)- return gn_scatter(name, collection, surface, src, density=density, seed=seed, align_normal=True, scale_range=(0.7, 1.3))---def tree_stand(collection: Any, batch: Any, positions: Sequence[Sequence[float]], height_at: HeightFn, rng_: Any, **tree_kw: Any) -> list[Any]:- """Trees at every (x, y) of ``positions`` standing on ``height_at``, added to ``batch`` and- finished into ``collection`` as ONE object (a copse, a treeline): returns the objects.- ``tree_kw`` = ``bark`` and ``foliage`` (required), ``height`` (varied ±20 %), ``kind``,- ``max_leaves``."""- bark, foliage = tree_kw.pop("bark"), tree_kw.pop("foliage")- base_h = float(tree_kw.pop("height", 7.0))- for x, y in ((float(p[0]), float(p[1])) for p in positions):- tree(batch, (x, y, float(height_at(x, y))), base_h * rng_.uniform(0.8, 1.2), bark, foliage,- seed=rng_.randrange(1_000_000), **tree_kw)- return batch.finish(collection)diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/lib/water.py b/harness/codeverse3d/languages/scene_blender/starter/src/lib/water.pydeleted file mode 100644index 631657b4..00000000--- a/harness/codeverse3d/languages/scene_blender/starter/src/lib/water.py+++ /dev/null@@ -1,191 +0,0 @@-"""lib/water.py — water surfaces, falls, jets and spray.--A water surface is ONE refracting plane (``materials.water``); the renderer refracts the bed-through it, so give it a bed (the ground, a basin). Name water things ``…Water`` / ``…Pond``-/ ``…Lake``: the census files a water-named surface as a backdrop and a foot in it as-"on water" (a boat, a jetty post), never floating or sunk. Falls and jets are foam sheets-and thin tubes — no fluid solver; with ``ctx`` their texture drifts between ``ctx.times``.-"""--from __future__ import annotations--import math-from collections.abc import Callable, Sequence-from typing import Any--import bpy--from lib.materials import _bump, _noise, _ramp-from lib.materials import water as water_material-from lib.mesh import Batch, mesh_object-from lib.motion import drift, scroll-from lib.noise import fbm2, rng-from lib.place import unique_name--G = 9.81---def foam_shader(name: str) -> Any:- """White water: a rough, slightly translucent surface with noisy alpha (edges thin out)."""- mat = bpy.data.materials.new(name)- nt = mat.node_tree- nodes, links, bsdf = nt.nodes, nt.links, nt.nodes["Principled BSDF"]- bsdf.inputs["Base Color"].default_value = (0.9, 0.94, 0.97, 1.0)- bsdf.inputs["Roughness"].default_value = 0.75- bsdf.inputs["Transmission Weight"].default_value = 0.2- tc = nodes.new("ShaderNodeTexCoord")- mp = nodes.new("ShaderNodeMapping")- mp.name = "FlowMapping"- mp.inputs["Scale"].default_value = (2.0, 2.0, 0.6)- links.new(tc.outputs["Object"], mp.inputs["Vector"])- n = _noise(nodes, links, mp.outputs["Vector"], scale=3.0, detail=5.0, roughness=0.6)- alpha = _ramp(nodes, links, n.outputs["Fac"], [(0.3, (0.15, 0.15, 0.15, 1)), (0.7, (0.95, 0.95, 0.95, 1))])- links.new(alpha, bsdf.inputs["Alpha"])- _bump(nodes, links, n.outputs["Fac"], bsdf, strength=0.3, distance=0.02)- mat.surface_render_method = "BLENDED"- return mat---def water_surface(name: str, collection: Any, *, size: float | Sequence[float], level: float, material: Any = None,- ripple: float = 0.045, seed: int = 0, height_fn: Callable[[float, float], float] | None = None) -> Any:- """A ``size`` m water plane at z = ``level`` with ``ripple`` m of gentle swell, centred on- the origin (move the object to place it). With ``height_fn`` the cells where the ground- stands more than 0.25 m above the water are dropped, so a lake never pokes through its- banks. Default material: ``materials.water``. ~4 600 triangles."""- sx, sy = (float(size), float(size)) if isinstance(size, (int, float)) else (float(size[0]), float(size[1]))- n = 48- verts = []- keep = []- for iy in range(n + 1):- y = -sy / 2 + sy * iy / n- for ix in range(n + 1):- x = -sx / 2 + sx * ix / n- verts.append((x, y, float(level) + ripple * fbm2(x * 0.35, y * 0.35, octaves=3, seed=seed)))- keep.append(height_fn is None or float(height_fn(x, y)) <= level + 0.25)- faces = []- for iy in range(n):- for ix in range(n):- a = iy * (n + 1) + ix- quad = (a, a + 1, a + n + 2, a + n + 1)- if any(keep[i] for i in quad):- faces.append(quad)- used = sorted({i for f in faces for i in f})- remap = {old: new for new, old in enumerate(used)}- mat = material if material is not None else water_material(f"{name}Mat")- return mesh_object(name, [verts[i] for i in used], [tuple(remap[i] for i in f) for f in faces], mat, collection, smooth=True)---def pool_height(x: float, y: float, *, level: float = -0.25) -> float:- """A ``height_at`` for things that float: the water ``level`` everywhere (seat a boat, a- lily pad or a lantern with ``place.seat(obj, lambda x, y: pool_height(x, y, level=-0.25))``)."""- return float(level)---def _sheet(name: str, collection: Any, mat: Any, origin: Sequence[float], across: Sequence[float], along: Sequence[float],- width: float, height: float, *, seed: int, speed: float, offset: float) -> Any:- """One falling sheet: top edge ``width`` wide at ``origin`` (centre of the lip), falling- ``height`` with a parabolic throw along ``along``; rows wobble with noise."""- rows, cols = 24, 8- ax, ay = float(across[0]), float(across[1])- lx, ly = float(along[0]), float(along[1])- ox, oy, oz = (float(v) for v in origin)- verts = []- for r in range(rows + 1):- drop = height * r / rows- throw = speed * math.sqrt(2.0 * drop / G) + offset- for c in range(cols + 1):- u = c / cols - 0.5- wob = 0.05 * height * fbm2(u * 4.0 + seed, r / rows * 3.0, octaves=2, seed=seed)- x = ox + ax * u * width + lx * (throw + wob)- y = oy + ay * u * width + ly * (throw + wob)- verts.append((x, y, oz - drop))- faces = [(r * (cols + 1) + c, r * (cols + 1) + c + 1, (r + 1) * (cols + 1) + c + 1, (r + 1) * (cols + 1) + c)- for r in range(rows) for c in range(cols)]- return mesh_object(name, verts, faces, mat, collection, smooth=True)---def waterfall(name: str, collection: Any, center: Sequence[float], *, width: float, height: float, seed: int = 0,- ctx: Any = None, layers: int = 4) -> list[Any]:- """A fall ``width`` m wide dropping ``height`` m onto ``center`` (x, y, z of the impact —- the pool level), the lip ``height`` above it; ``layers`` foam sheets staggered outward,- all under one root Empty (one placement row, its foot at the impact). Flow is toward -Y.- With ``ctx`` the foam streams down between ``ctx.times``. ~400 triangles per layer."""- cx, cy, cz = (float(v) for v in center)- root = bpy.data.objects.new(name, None)- root.empty_display_size = 0.25- root.location = (cx, cy, cz)- collection.objects.link(root)- mat = foam_shader(f"{name}Foam")- out = [root]- for k in range(max(1, int(layers))):- sheet = _sheet(f"{name}Sheet_{k}", collection, mat, (cx, cy, cz + height), (1.0, 0.0), (0.0, -1.0), width * (1.0 + 0.06 * k),- height, seed=seed + k, speed=0.9 + 0.25 * k, offset=0.08 * k)- sheet.parent = root- sheet.matrix_parent_inverse = root.matrix_basis.inverted()- out.append(sheet)- if ctx is not None:- scroll(mat.node_tree.nodes["FlowMapping"], (0.0, 0.0, -2.5), ctx)- return out---def hanging_fall(name: str, collection: Any, outlet: Sequence[float], along: Sequence[float], across: Sequence[float], *,- width: float, height: float, seed: int = 0, ctx: Any = None) -> list[Any]:- """A single sheet from an ``outlet`` (x, y, z of a spout, a gutter, a broken aqueduct)- thrown along the unit direction ``along`` (x, y) and ``width`` m wide along ``across``,- falling ``height`` m. Root Empty at the outlet; tag it ``["placement"] = "free"`` when it- hangs over nothing. With ``ctx`` the foam streams down."""- ox, oy, oz = (float(v) for v in outlet)- root = bpy.data.objects.new(name, None)- root.empty_display_size = 0.25- root.location = (ox, oy, oz)- collection.objects.link(root)- mat = foam_shader(f"{name}Foam")- sheet = _sheet(f"{name}Sheet", collection, mat, (ox, oy, oz), across, along, width, height, seed=seed, speed=1.2, offset=0.0)- sheet.parent = root- sheet.matrix_parent_inverse = root.matrix_basis.inverted()- if ctx is not None:- scroll(mat.node_tree.nodes["FlowMapping"], (0.0, 0.0, -2.5), ctx)- return [root, sheet]---def droplets(batch: Any, mat: Any, center: Sequence[float], width: float, bottom: float, rng_: Any, count: int = 260) -> None:- """``count`` tiny tetrahedra (spray, drips, sparks) in a cloud ``width`` m wide centred on- ``center`` (x, y, z), its lowest at z = ``bottom``; 4 triangles each."""- cx, cy, cz = (float(v) for v in center)- top = cz + (cz - float(bottom))- s = 0.012- for _ in range(max(0, int(count))):- x, y = cx + rng_.uniform(-width / 2, width / 2), cy + rng_.uniform(-width / 2, width / 2)- z = rng_.uniform(float(bottom) + s, top)- verts = [(x + s, y + s, z + s), (x - s, y - s, z + s), (x - s, y + s, z - s), (x + s, y - s, z - s)]- batch.add(mat, verts, [(0, 1, 2), (0, 3, 1), (0, 2, 3), (1, 3, 2)])---def fountain_jets(batch: Any, collection: Any, water_mat: Any, *, center: Sequence[float], nozzle_r: float, landing_r: float,- count: int = 14, rise: float = 1.85, ctx: Any = None, seed: int = 0) -> Any:- """``count`` parabolic jets from a ring of radius ``nozzle_r`` to one of ``landing_r``- around ``center`` (x, y, z of the basin's water level), peaking ``rise`` m up, as thin- tubes in ``batch`` plus a spray cloud at the landing ring. With ``ctx`` a second spray- cloud is finished into ``collection`` (tagged free) and falls between ``ctx.times``;- returned, else None. ~220 triangles per jet."""- cx, cy, cz = (float(v) for v in center)- r = rng(seed)- for i in range(max(1, int(count))):- a = math.tau * i / count + r.uniform(-0.05, 0.05)- pts = []- for k in range(13):- t = k / 12- rad = nozzle_r + (landing_r - nozzle_r) * t- z = cz + 4.0 * rise * t * (1.0 - t)- pts.append((cx + rad * math.cos(a), cy + rad * math.sin(a), z))- for k in range(12):- batch.beam(water_mat, pts[k], pts[k + 1], 0.02, sides=6)- droplets(batch, water_mat, (cx, cy, cz + 0.22), landing_r * 2.2, cz + 0.01, r, count=140)- if ctx is None:- return None- spray = Batch(unique_name(f"{batch.name}Spray", 0))- droplets(spray, water_mat, (cx, cy, cz + rise * 0.55), landing_r * 1.6, cz + rise * 0.2, r, count=160)- objs = spray.finish(collection)- objs[0]["placement"] = "free"- drift(objs[0], (0.0, 0.0, -rise * 0.3), ctx)- return objs[0]diff --git a/harness/codeverse3d/languages/scene_blender/starter/src/scene.py b/harness/codeverse3d/languages/scene_blender/starter/src/scene.pyindex 33de7429..11f5d551 100644--- a/harness/codeverse3d/languages/scene_blender/starter/src/scene.py+++ b/harness/codeverse3d/languages/scene_blender/starter/src/scene.py@@ -1,7 +1,6 @@"""src/scene.py — ASSEMBLED BY THE HARNESS (codeverse3d assembler). Edit env / zones / assetsinstead; re-assembly overwrites this file.-EXAMPLE: a lakeside hamlet at golden hour — the plan-less starter scene (every zone and asset is-built from src/lib; read them as worked examples of the library).+EXAMPLE: a lakeside hamlet at golden hour — the plan-less starter scene.The harness builds the scene in one Blender process: env.build_env(ctx); every hero GLB and assetmodule (build_<snake>(ctx)); then every zone's build(ctx) — each on its own (a zone that raises isdiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/zones/hamlet.py b/harness/codeverse3d/languages/scene_blender/starter/src/zones/hamlet.pyindex d094ac4e..c6c65413 100644--- a/harness/codeverse3d/languages/scene_blender/starter/src/zones/hamlet.py+++ b/harness/codeverse3d/languages/scene_blender/starter/src/zones/hamlet.py@@ -1,60 +1,67 @@-"""src/zones/hamlet.py — zone "Hamlet": two half-timbered houses around a paved yard, lantern-posts, a signpost and a few villagers.+"""src/zones/hamlet.py — zone "Hamlet": two gabled houses around a yard, lantern posts, a signpost+and a few crates.CONTRACT: build(ctx) -> bpy.types.Collection — ctx.collection is this zone's; every PLACED thing-is ONE root object in it (a Batch root, an instance Empty), named <Name>_<i>, seated on-ctx.height_at. Assets are collection instances of ctx.assets['<snake>'] (lib.scatter.instance).+is ONE root object in it (a mesh, a collection-instance Empty), named <Name>_<i>, seated on+ctx.height_at. Assets are collection instances of ctx.assets['<snake>']."""-from lib import architecture, figure, materials, mesh, place, scatter+import bmesh+import bpy+from env import linked, material, seatSEED = 11HOUSES = ((-2.0, 14.0, 7.0, 5.5, 2), (9.5, 15.0, 6.0, 5.0, 1)) # x, y, width, depth, floors-YARD = (4.0, 7.0)+++def _house(ctx, name, x, y, w, d, floors, wall, tile):+ """A box of `floors` storeys under a gabled roof: one mesh, two material slots, base on local z = 0."""+ h = 2.8 * floors+ bm = bmesh.new()+ body = bmesh.ops.create_cube(bm, size=1.0)["verts"]+ bmesh.ops.scale(bm, vec=(w, d, h), verts=body)+ bmesh.ops.translate(bm, vec=(0.0, 0.0, h / 2), verts=body)+ rise, eave = 0.45 * w, 0.35+ v = [bm.verts.new(p) for p in ((-w / 2 - eave, -d / 2 - eave, h), (w / 2 + eave, -d / 2 - eave, h), (w / 2 + eave, d / 2 + eave, h),+ (-w / 2 - eave, d / 2 + eave, h), (0.0, -d / 2 - eave, h + rise), (0.0, d / 2 + eave, h + rise))]+ roof = [bm.faces.new(f) for f in ((v[0], v[1], v[4]), (v[2], v[3], v[5]), (v[1], v[2], v[5], v[4]), (v[3], v[0], v[4], v[5]))]+ for f in roof:+ f.material_index = 1+ ob = linked(ctx, name, bm, wall, tile)+ ob.location = (x, y, 0.0)+ return seat(ob, ctx.height_at)def build(ctx):rng = ctx.rng(SEED)- h = ctx.height_at- wall = materials.limestone("HamletWall", "D8CDB4")- timber = materials.woodgrain(materials.material("HamletTimber", "4A3220", roughness=0.75))- tile = materials.material("HamletTile", "7A4A3A", roughness=0.85, noise_scale=4.0)- pane = materials.glass("HamletPane", "DDE6EE", roughness=0.1)- door = materials.chipped_paint(materials.material("HamletDoor", "2F5F8F", roughness=0.5), "2F5F8F", "6B5A48")- stones = [materials.limestone("YardStone", "A79F8E", scale=3.0), materials.limestone("YardStoneDark", "8E867A", scale=3.0)]- mats = {"wall": wall, "timber": timber, "door": door, "window": pane}- roofs = {"tile": tile, "trim": timber}-+ wall = material("HamletWall", (0.78, 0.72, 0.60), roughness=0.9, noise_scale=2.0, darker=0.8)+ tile = material("HamletTile", (0.42, 0.25, 0.20), roughness=0.85, noise_scale=4.0)+ timber = material("HamletTimber", (0.26, 0.18, 0.11), roughness=0.75, noise_scale=6.0)for i, (x, y, w, d, floors) in enumerate(HOUSES):- b = mesh.Batch(place.unique_name("House", i))- architecture.timber_house(b, roofs, x, y, w, d, floors, mats, rng, i)- root = b.finish(ctx.collection)[0]- place.seat(root, h) # built at z = 0; the ground may not be exactly there-- yard = mesh.Batch("Yard_0")- architecture.paving(yard, stones, center=(YARD[0], YARD[1], h(*YARD)), inner_r=0.8, rings=7, seed=SEED)- yard.finish(ctx.collection)-- post = mesh.Batch("Signpost_0")- post.beam(timber, (10.0, 6.0, h(10.0, 6.0)), (10.0, 6.0, h(10.0, 6.0) + 2.3), 0.06, sides=8)- post.box(timber, (10.0, 6.0, h(10.0, 6.0) + 2.0), (1.6, 0.06, 0.45))- root = post.finish(ctx.collection)[0]- sign = architecture.text_mesh("SignText_0", ctx.collection, "OLD MILL INN", (10.0, 5.95, h(10.0, 6.0) + 1.85), 0.22,- materials.material("SignPaint", "F2E6C8", roughness=0.6))- sign.parent = root # the text rides the post: one placement row- sign.matrix_parent_inverse = place.world_matrix(root).inverted()-- coats = [materials.material("CoatRed", "7A2E2E", roughness=0.85), materials.material("CoatBlue", "2E4A7A", roughness=0.85),- materials.material("CoatGreen", "4A6A3A", roughness=0.85), materials.material("Skin", "D9A880", roughness=0.6)]- folk = mesh.Batch("Villagers_0")- spots = [(2.5, 4.0), (6.0, 3.0), (7.5, 9.5), (-1.0, 9.0)]- figure.crowd(folk, coats, [(x, y, h(x, y)) for x, y in spots], rng)- folk.finish(ctx.collection)+ _house(ctx, f"House_{i}", x, y, w, d, floors, wall, tile)++ bm = bmesh.new() # the signpost: a post and its board, one mesh+ post = bmesh.ops.create_cone(bm, segments=8, radius1=0.06, radius2=0.06, depth=2.3)["verts"]+ bmesh.ops.translate(bm, vec=(0.0, 0.0, 1.15), verts=post)+ board = bmesh.ops.create_cube(bm, size=1.0)["verts"]+ bmesh.ops.scale(bm, vec=(1.6, 0.06, 0.45), verts=board)+ bmesh.ops.translate(bm, vec=(0.0, 0.0, 2.0), verts=board)+ sign = linked(ctx, "Signpost_0", bm, timber)+ sign.location = (10.0, 6.0, 0.0)+ seat(sign, ctx.height_at)++ def instance(source, name, x, y, yaw): # a collection-instance Empty = ONE placement row+ ob = bpy.data.objects.new(name, None)+ ob.instance_type, ob.instance_collection = "COLLECTION", source+ ob.location, ob.rotation_euler = (x, y, ctx.height_at(x, y)), (0.0, 0.0, yaw)+ ctx.collection.objects.link(ob)+ return oblantern = ctx.assets.get("lantern_post")if lantern is not None:- scatter.scatter(ctx.collection, lantern, "LanternPost", [(-1.0, 4.5), (9.0, 3.5), (12.5, 10.5)], height_at=h, rng=rng, rot=0.0)+ for i, (x, y) in enumerate(((-1.0, 4.5), (9.0, 3.5), (12.5, 10.5))):+ instance(lantern, f"LanternPost_{i}", x, y, 0.0)crate = ctx.assets.get("crate")if crate is not None:- for i, (x, y, yaw) in enumerate(((3.6, 14.5, 0.3), (4.5, 15.2, 1.2), (13.2, 13.5, 0.0))):- scatter.instance(ctx.collection, crate, place.unique_name("Crate", i), x, y, height_at=h, rot_z=yaw)+ for i, (x, y) in enumerate(((3.4, 14.3), (5.2, 15.8), (13.4, 13.5))):+ instance(crate, f"Crate_{i}", x, y, rng.uniform(0.0, 1.5))return ctx.collectiondiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/zones/lakeside.py b/harness/codeverse3d/languages/scene_blender/starter/src/zones/lakeside.pyindex d518fabd..5e07b373 100644--- a/harness/codeverse3d/languages/scene_blender/starter/src/zones/lakeside.py+++ b/harness/codeverse3d/languages/scene_blender/starter/src/zones/lakeside.py@@ -1,11 +1,12 @@-"""src/zones/lakeside.py — zone "Lakeside": the lake in the env's basin, a wooden footbridge over-its edge, shore rocks, reeds and a willow.+"""src/zones/lakeside.py — zone "Lakeside": the lake in the env's basin, drifting slowly, and shore rocks.CONTRACT: build(ctx) -> bpy.types.Collection — every placed thing is ONE root object seated onctx.height_at; the water is a water-named surface (the census files it as a backdrop and a footin it as on water)."""-from lib import architecture, materials, mesh, terrain, vegetation, water+import bmesh+import bpy+from env import linked, materialSEED = 21LAKE = (-24.0, 2.0) # == env.BASIN's centre@@ -13,37 +14,35 @@ LAKE = (-24.0, 2.0) # == env.BASIN's centredef build(ctx):rng = ctx.rng(SEED)- h = ctx.height_atlevel = float(ctx.env.get("water_level", -0.3))- lake = water.water_surface("LakeWater", ctx.collection, size=(34.0, 34.0), level=level,- material=materials.water("LakeWaterMat", color="1A3F4A", ctx=ctx),- height_fn=lambda x, y: h(x + LAKE[0], y + LAKE[1]))- lake.location = (LAKE[0], LAKE[1], 0.0)-- rock = materials.mineral_surface("ShoreRock", "6F6A60", stone=True)- rocks = mesh.Batch("ShoreRocks_0")- terrain.rock_field(rocks, rock, (LAKE[0] + 13.0, LAKE[1] - 7.0), 4.5, 14, h, rng)- terrain.boulder(rocks, rock, (LAKE[0] + 11.0, LAKE[1] + 10.0, h(LAKE[0] + 11.0, LAKE[1] + 10.0)), 1.6, seed=3)- rocks.finish(ctx.collection)-- wood = materials.woodgrain(materials.material("BridgeWood", "5A4330", roughness=0.8))- stone = materials.ashlar("BridgeStone", "9A9080")- bridge = mesh.Batch("Footbridge_0")- start, end = (LAKE[0] + 12.7, LAKE[1] - 12.7), (LAKE[0] + 8.5, LAKE[1] - 8.5) # bank top → the shallows- architecture.arched_footbridge(bridge, wood, stone, start=(*start, h(*start)), end=(*end, h(*end)), rise=1.1, height_at=h)- bridge.finish(ctx.collection)-- reed_bed = terrain.ground("ReedSurface", ctx.collection, size=(9.0, 6.0), segments=6, height_at=h, material=None,- center=(LAKE[0] + 13.5, LAKE[1] + 5.0))- reed_bed.hide_render = True # the distribution domain only: the cloud draws- reed_bed.hide_viewport = True- vegetation.grass_patch("Reeds_0", ctx.collection, reed_bed, density=5.0, seed=SEED, height=1.2, color="6B7A3A")-- bark = materials.material("WillowBark", "4A3A2A", roughness=0.9, noise_scale=6.0)- leaves = materials.foliage("WillowLeaf", "6A8A3A", variants=2)- willow = mesh.Batch("Willow_0")- wx, wy = LAKE[0] + 16.5, LAKE[1] + 1.0- vegetation.tree(willow, (wx, wy, h(wx, wy)), 7.5, bark, leaves[0], seed=SEED, kind="broadleaf", max_leaves=1800)- willow.finish(ctx.collection)+ water = bpy.data.materials.new("LakeWaterMat") # a dielectric: transmission, not metal+ bsdf = water.node_tree.nodes["Principled BSDF"]+ bsdf.inputs["Base Color"].default_value = (0.10, 0.25, 0.29, 1.0)+ bsdf.inputs["Roughness"].default_value = 0.05+ bsdf.inputs["Transmission Weight"].default_value = 1.0+ bm = bmesh.new()+ bmesh.ops.create_grid(bm, x_segments=16, y_segments=16, size=17.0)+ lake = linked(ctx, "LakeWater", bm, water)+ lake.location = (LAKE[0], LAKE[1], level)+ lake.keyframe_insert("location", frame=ctx.frame(0.0)) # the surface drifts 0.3 m between the judged frames+ lake.location.x += 0.3+ lake.keyframe_insert("location", frame=ctx.frame(1.5))+ action = lake.animation_data.action+ for fc in action.layers[0].strips[0].channelbag(action.slots[0]).fcurves:+ for k in fc.keyframe_points:+ k.interpolation = "LINEAR"++ rock = material("ShoreRock", (0.44, 0.42, 0.38), roughness=0.95, noise_scale=8.0)+ for i in range(10): # irregular masses along the east bank, part sunk (a rock may)+ r = rng.uniform(0.4, 1.0)+ bm = bmesh.new()+ bmesh.ops.create_icosphere(bm, subdivisions=2, radius=r)+ bmesh.ops.scale(bm, vec=(rng.uniform(0.8, 1.5), rng.uniform(0.7, 1.3), rng.uniform(0.5, 0.8)), verts=bm.verts)+ for v in bm.verts:+ v.co *= 1.0 + 0.12 * (rng.random() - 0.5)+ bmesh.ops.translate(bm, vec=(0.0, 0.0, -min(v.co.z for v in bm.verts)), verts=bm.verts) # base on local z = 0+ ob = linked(ctx, f"Rock_{i}", bm, rock)+ x, y = LAKE[0] + 13.0 + (1.8 if i % 2 else -1.8) + rng.uniform(-0.3, 0.3), LAKE[1] - 9.0 + 2.2 * i # spaced: no two share a box+ ob.location = (x, y, ctx.height_at(x, y) - 0.08 * r) # its lowest vertex is under its centre: a little in, as a rock mayreturn ctx.collectiondiff --git a/harness/codeverse3d/languages/scene_blender/starter/src/zones/orchard.py b/harness/codeverse3d/languages/scene_blender/starter/src/zones/orchard.pyindex e81c087b..73817ff4 100644--- a/harness/codeverse3d/languages/scene_blender/starter/src/zones/orchard.py+++ b/harness/codeverse3d/languages/scene_blender/starter/src/zones/orchard.py@@ -1,37 +1,51 @@-"""src/zones/orchard.py — zone "Orchard": a stand of apple trees, a hedge, a flower bed and-harvest crates (instances of the crate asset).+"""src/zones/orchard.py — zone "Orchard": a stand of apple trees and harvest crates (instances of+the crate asset).CONTRACT: build(ctx) -> bpy.types.Collection — every placed thing is ONE root object seated on-ctx.height_at (lib.vegetation recipes stand on the z you pass; lib.scatter seats instances).+ctx.height_at."""-from lib import materials, mesh, scatter, vegetation+import bmesh+import bpy+from env import linked, material, seatSEED = 31CENTER = (20.0, -12.0)-def build(ctx):- rng = ctx.rng(SEED)- h = ctx.height_at- bark = materials.material("OrchardBark", "4A3524", roughness=0.9, noise_scale=6.0)- leaves = materials.foliage("OrchardLeaf", "4F7A2E", variants=3)-- rows = scatter.grid(CENTER, (16.0, 12.0), 4.5, rng, jitter=0.2)- vegetation.tree_stand(ctx.collection, mesh.Batch("AppleTrees_0"), rows, h, rng, bark=bark, foliage=leaves[1],- height=4.5, kind="broadleaf", max_leaves=700)+def _tree(ctx, name, x, y, height, bark, leaves, rng):+ """A trunk under two overlapping crown lobes: one mesh, two material slots, base on local z = 0."""+ bm = bmesh.new()+ trunk = bmesh.ops.create_cone(bm, segments=8, radius1=0.16, radius2=0.10, depth=height * 0.5)["verts"]+ bmesh.ops.translate(bm, vec=(0.0, 0.0, height * 0.25), verts=trunk)+ for dx, dy, dz, r in ((0.0, 0.0, height * 0.68, height * 0.32), (rng.uniform(-0.6, 0.6), rng.uniform(-0.6, 0.6), height * 0.8, height * 0.24)):+ crown = bmesh.ops.create_icosphere(bm, subdivisions=2, radius=r)["verts"]+ bmesh.ops.scale(bm, vec=(1.15, 1.0, 0.85), verts=crown)+ bmesh.ops.translate(bm, vec=(dx, dy, dz), verts=crown)+ for f in {f for v in crown for f in v.link_faces}:+ f.material_index = 1+ ob = linked(ctx, name, bm, bark, leaves)+ ob.location = (x, y, 0.0)+ ob.rotation_euler.z = rng.uniform(0.0, 6.28)+ return seat(ob, ctx.height_at)- hedge = mesh.Batch("Hedge_0")- for i, (x, y) in enumerate(scatter.along_path([(10.0, -3.5), (30.0, -3.5)], 10)):- vegetation.shrub(hedge, bark, leaves[i % 3], (x, y, h(x, y)), scale=1.1, seed=SEED + i)- hedge.finish(ctx.collection)- petals = materials.material("Petals", "D94A6A", roughness=0.7)- bed = mesh.Batch("FlowerBed_0")- vegetation.perennial_bed(bed, (12.5, -19.0), 2.0, h, leaves[0], petals, rng)- bed.finish(ctx.collection)+def build(ctx):+ rng = ctx.rng(SEED)+ bark = material("OrchardBark", (0.29, 0.21, 0.14), roughness=0.9, noise_scale=6.0)+ leaves = material("OrchardLeaf", (0.31, 0.48, 0.18), roughness=0.7, noise_scale=10.0, darker=0.5)+ i = 0+ for row in range(3): # the planted grid, jittered a little+ for col in range(4):+ x = CENTER[0] - 6.75 + 4.5 * col + rng.uniform(-0.3, 0.3)+ y = CENTER[1] - 4.5 + 4.5 * row + rng.uniform(-0.3, 0.3)+ _tree(ctx, f"AppleTree_{i}", x, y, rng.uniform(3.8, 5.0), bark, leaves, rng)+ i += 1crate = ctx.assets.get("crate")if crate is not None:- spots = scatter.poisson(rng, area=(24.0, -22.0, 30.0, -16.0), min_dist=1.6, max_count=5)- scatter.scatter(ctx.collection, crate, "HarvestCrate", spots, height_at=h, rng=rng, scale=(0.85, 1.1))+ for i, (x, y) in enumerate(((25.0, -21.0), (27.2, -19.4), (29.0, -21.6))):+ ob = bpy.data.objects.new(f"HarvestCrate_{i}", None) # a collection-instance Empty = ONE placement row+ ob.instance_type, ob.instance_collection = "COLLECTION", crate+ ob.location, ob.rotation_euler = (x, y, ctx.height_at(x, y)), (0.0, 0.0, rng.uniform(0.0, 1.5))+ ctx.collection.objects.link(ob)return ctx.collectiondiff --git a/harness/codeverse3d/languages/wrappers/render_bpy_scene.py b/harness/codeverse3d/languages/wrappers/render_bpy_scene.pyindex 76da0f75..9bdf0489 100644--- a/harness/codeverse3d/languages/wrappers/render_bpy_scene.py+++ b/harness/codeverse3d/languages/wrappers/render_bpy_scene.py@@ -233,12 +233,12 @@ def hide_fog_boxes(scene: Any) -> list[Any]:"""Render-hide every bounded fog volume and return those objects (restore with ``hide_render = False``).WHY. The ``no_fog`` views are the judge's placement views: ``unlink_world_volume`` takes the world's- Volume out, but ``lib.sky.haze`` — what 30/30 iteration-0 and 14/15 iteration-2 Blender envs used —- builds the fog as a volume-only BOX, which those views kept, so the judge read floating / sunken /+ Volume out, but 30/30 iteration-0 and 14/15 iteration-2 Blender envs built the fog as a+ volume-only BOX, which those views kept, so the judge read floating / sunken /interpenetration through 0.003-0.008 /m of haze over a few hundred metres (2026-10-15: theiteration-2 overview tiles came out milky). A fog box is a mesh every material of which isvolume-only (``_census_glb.is_volume_only``, the census's own test) and whose largest evaluated- bbox side is >= ``FOG_BOX_MIN_M``; a soft particle (``lib.materials.volume`` on a small Batch) is+ bbox side is >= ``FOG_BOX_MIN_M``; a soft particle (a volume-only material on a small mesh) issmaller and stays. Linked library data and already hidden objects are left alone."""depsgraph = bpy.context.evaluated_depsgraph_get()boxes = []@@ -261,8 +261,7 @@ ROOM_SHELL_PREFIX, LID_PREFIX = "RoomShell", "Ceiling"def lift_lids(scene: Any, camera: Any) -> list[Any]:"""Render-hide every room shell lid under ``camera`` and return those objects (restore with``hide_render = False``). A lid is a mesh object named ``Ceiling…`` whose parent is named- ``RoomShell…`` (what ``lib.architecture.room_shell`` builds — the prompts promise the author- the rig lifts it by name) and whose evaluated world-space bbox top is below the camera's+ ``RoomShell…`` (the prompts promise the author the rig lifts it by name) and whose evaluated world-space bbox top is below the camera'sz: ``scene_host.skyLayersBelow``'s rule, so both languages' overview tiles show the sameinterior. An author's own roof, a lid the camera is under, an already hidden lid andlinked library data (never written) stay."""diff --git a/harness/codeverse3d/languages/wrappers/run_bpy_scene.py b/harness/codeverse3d/languages/wrappers/run_bpy_scene.pyindex 50e24fa6..e80294b5 100644--- a/harness/codeverse3d/languages/wrappers/run_bpy_scene.py+++ b/harness/codeverse3d/languages/wrappers/run_bpy_scene.py@@ -63,7 +63,7 @@ from run_bpy import MEMORY_HINT, clear_scene, render_fingerprint, save_blend #REPORT_NAME, FACTS_NAME = "bpy_build.json", "bpy_census.json"GLB_NAME, BLEND_NAME = "census.glb", "scene.blend"#: the workspace packages a scene imports from ``src/`` (purged before every run: never a stale module)-PACKAGES = ("env", "zones", "assets", "lib")+PACKAGES = ("env", "zones", "assets")ASSETS_COLLECTION, CAMERAS_COLLECTION = "_Assets", "_Cameras"_ERROR_KEYS = ("error_type", "error_message", "error_file", "error_line", "error_source")diff --git a/harness/codeverse3d/prompts/catalog.py b/harness/codeverse3d/prompts/catalog.pyindex 4e047bdc..a8ec379f 100644--- a/harness/codeverse3d/prompts/catalog.py+++ b/harness/codeverse3d/prompts/catalog.py@@ -34,13 +34,13 @@ PROMPT_DIRS: dict[Language, str] = {Language.URDF_BLENDER: "urdf"}def language_prompt(language: Language, name: str) -> str:"""``<dir>/<name>`` under ``prompts/`` — THE path of a language's ``contract.md`` and- ``system.md`` (and the scene languages' ``effects_catalog.md`` / ``asset.md``)."""+ ``system.md`` (and the scene languages' ``asset.md``, scene_threejs's ``effects_catalog.md``)."""return f"{PROMPT_DIRS.get(language, language.value)}/{name}"def language_text(language: Language, name: str) -> str:"""The text of :func:`language_prompt`, or ``""`` for a file the language does not ship- (only the two scene languages ship an effects catalog / ``asset.md``). No language ships+ (the two scene languages ship ``asset.md``, scene_threejs an effects catalog). No language shipsa cookbook (D107, owner 2026-10-15): interface and language facts are in ``contract.md`` /``system.md``, the craft in the skills as short optional practices."""try:diff --git a/harness/codeverse3d/prompts/scene_blender/asset.md b/harness/codeverse3d/prompts/scene_blender/asset.mdindex be0349a6..c7dc353e 100644--- a/harness/codeverse3d/prompts/scene_blender/asset.md+++ b/harness/codeverse3d/prompts/scene_blender/asset.md@@ -1,11 +1,10 @@You write ONE self-contained Blender bpy asset module for a larger scene — a factory`build_<snake>(ctx, variant=0)` that builds every part of the prop into `ctx.collection` (aCollection the harness created for it, active, and the value it returns) at the origin, base-on z = 0, front facing −Y, metres. Raw bpy / bmesh / mathutils only: no file IO, no image+on z = 0, front facing −Y, metres. bpy / bmesh / mathutils only: no file IO, no imageloading, no lights, no cameras, no world; the lint warns on `bpy.ops.mesh.primitive_*` in a-loop. Imports: `bpy`, `bmesh`, `mathutils`, `math`, and the scene's shipped bpy library-`from lib.<module> import …` when the task sheet names one of its calls — it is harness code-that ships with every scene, not an outside package.+loop. Imports: `bpy`, `bmesh`, `mathutils`, `math`; every part, material and motion of the prop+is code in this file.The module is built once by the harness in an isolated Blender process (a raise is reportedwith its line and the asset is NOT AVAILABLE to the zones), then placed by the zones as@@ -15,7 +14,10 @@ by its origin, and a wrong name or an off-origin footprint fails every placementthis file. It is judged as a prop at scene distance: it must be recognisable as what thesheet names (its silhouette and the features a person would name), and a single flat greymaterial is graded `placeholder_material` — every surface carries a Principled material-(`Base Color`, `Roughness`, `Metallic`) that matches what it is. Keep it under the triangle+(`Base Color`, `Roughness`, `Metallic`) that matches what it is, varied at more than one scale+(broad tone and wear plus fine grain or bump) where the real material varies. A natural thing+has an organic silhouette: a tree branches into limbs carrying leaf or needle cards, a rock is+irregular — never a primitive standing in for it. Keep it under the trianglebudget the sheet states and give every part a unique PascalCase name.Write the one file completely and stop. No commentary, no extra files.diff --git a/harness/codeverse3d/prompts/scene_blender/contract.md b/harness/codeverse3d/prompts/scene_blender/contract.mdindex bdc1d6e7..f038e8f7 100644--- a/harness/codeverse3d/prompts/scene_blender/contract.md+++ b/harness/codeverse3d/prompts/scene_blender/contract.md@@ -6,9 +6,11 @@ src/scene.py ASSEMBLED BY THE HARNESS — data only (ZONES / ASSETS /src/env.py def height_at(x, y) -> z def build_env(ctx) -> dict (world, light, ground, atmosphere; the enclosure of an interior)src/zones/<snake>.py def build(ctx) -> bpy.types.Collection (everything linked into ctx.collection, the zone's own Collection)src/assets/<snake>.py def build_<snake>(ctx, variant=0) -> bpy.types.Collection (built ONCE at the origin, base on z = 0, front facing −Y)-src/lib/*.py HARNESS-OWNED bpy library — an optional toolbox: import and call, never edit (a write to it is reverted; the catalog ships with every brief)public/assets/<snake>.glb heroes the harness built as objects — imported for you into ctx.assets['<snake>']```+Every mesh, material, light, world and motion is bpy / bmesh / mathutils you write. Code several+zones share lives in `src/env.py` (`from env import …`); an asset module is self-contained — it is+built and checked on its own.The harness builds the scene in ONE Blender 5.2 process (`--factory-startup`, an emptied scene,metric units, fps=30, the frame range 1..46, every random source seeded) in this order, each@@ -48,9 +50,8 @@ width × depth × height here (the plan's width × height × depth, reordered).## Allowed imports`bpy`, `bmesh`, `mathutils` (Vector, Matrix, Euler, noise), `math`, `numpy` (only through`numpy.random.default_rng(seed)` for randomness), `itertools`, `functools`, `collections`,-`dataclasses`, `colorsys`, and the workspace's own packages: `from lib.<module> import …`,-`from env import …` (zones may read whatever `env` defines at module level). Nothing else-resolves in the build.+`dataclasses`, `colorsys`, and the workspace's own package `env`: `from env import …` (zones may+read whatever `env` defines at module level). Nothing else resolves in the build.## FORBIDDEN (the lint's policy table; each is an ERROR that fails the build gate)`bpy.ops.render.*`, `bpy.ops.wm.*` (open/save/append/link), `bpy.ops.export_*`,@@ -72,7 +73,7 @@ material already carries `Principled BSDF` and `Material Output`), `sky_type = '`'MULTIPLE_SCATTERING'`, with `aerosol_density`), the boolean solver `'FAST'` (`FLOAT` / `EXACT` /`MANIFOLD`), `mod["Socket_2"] = v` for geometry-nodes inputs (`getattr(mod.properties.inputs,"Socket_2").value = v`), `Action.fcurves` (actions are slotted:-`action.layers[0].strips[0].channelbag(action.slots[0]).fcurves`, or `lib.motion.fcurves`),+`action.layers[0].strips[0].channelbag(action.slots[0]).fcurves`),`Mesh.calc_normals()` and `use_auto_smooth` (`me.shade_smooth()` or `f.smooth = True` per face),the Principled inputs `Specular` / `Subsurface` / `Transmission` / `Emission` (now `Specular IORLevel`, `Subsurface Weight`, `Transmission Weight`, `Coat Weight`, `Sheen Weight`, `Emission Color`@@ -81,27 +82,33 @@ inputs 6 / 7 are the colours, output 2 the result; the mix input is `Factor`, noBackground mode: `bpy.context.object` / `selected_objects` are empty after `bpy.data.objects.new`— keep your own references. `bm.verts[i]` raises before `ensure_lookup_table()` after anytopology change. A fresh object's `matrix_world` is identity until the view layer updates-(`lib.place.world_matrix`, or `bpy.context.view_layer.update()` before reading it; parent with a-RELATIVE `location`).+(compose `parent.matrix_world @ child.matrix_basis` yourself, or call `bpy.context.view_layer.update()`+before reading it; parent with a RELATIVE `location`). Geometry nodes: a new `GeometryNodeTree`+has no `inputs` / `outputs` and no nodes — its sockets are `ng.interface.new_socket(name,+in_out='INPUT' | 'OUTPUT', socket_type='NodeSocketGeometry')`, and the `NodeGroupInput` /+`NodeGroupOutput` nodes are yours to add and link; `obj.modifiers.new(name, 'NODES').node_group = ng`.## What the renderer does with what you buildCycles at 32 samples + OpenImageDenoise, AgX, exposure 0, 1024 × 576; no post chain and nobloom: an emissive surface at strength 3–8 reads as a lamp, 20+ whites the frame out(`blown_frac`), and a lamp beside it is what lights the wall. A SURFACE shader always has asilhouette: in Cycles a soft particle (steam, smoke, dust, spray) renders without an edge only-as a Principled VOLUME (`lib.materials.volume`); a translucent puff, metaball, torus or disc is-graded `hard_edged_particles`. The census is the evaluated depsgraph: modifiers, geometry+as a VOLUME — a material whose only linked output is the Material Output's `Volume`, fed by a+`ShaderNodeVolumePrincipled`; a translucent puff, metaball, torus or disc is graded+`hard_edged_particles`. The census is the evaluated depsgraph: modifiers, geometrynodes and instances count as they render; a volume-only mesh is fog, never a placed thing.Triangle budgets: 15,000 per asset, 40,000 per hero, 3,000,000 unique for the scene (aninstance cloud counts its instances rendered, its source once).## Motion-Animation is DATA in the `.blend`: keyframes on `ctx.frame(t)` for the two times in-`ctx.times` (`lib.motion.keyframe_path`, `drift`, `sway`, `shape_key_sweep`), or a SIMPLE-driver of `frame` (`lib.motion.spin`: `frame * 0.1` — sin / cos / min / max / clamp / lerp,-`+ - * /`, comparisons; nothing that needs Python, which a `--factory-startup` build silently-evaluates to 0). Set `keyframe_points[].interpolation = 'LINEAR'` for motion that should-read at t = 1.5 as a travel, not an ease. The harness differences the two frames per camera+Animation is DATA in the `.blend`: `obj.keyframe_insert(data_path, frame=ctx.frame(t))` for the+two times in `ctx.times` (a location, a rotation, a shape-key value, a node input), or a SIMPLE+driver of `frame` (`fc = obj.driver_add("rotation_euler", 2)`, `fc.driver.expression = "frame * 0.1"`+— sin / cos / min / max / clamp / lerp, `+ - * /`, comparisons; nothing that needs Python, which a+`--factory-startup` build silently evaluates to 0). Keys live on the slotted action:+`a = obj.animation_data.action`, then `a.layers[0].strips[0].channelbag(a.slots[0]).fcurves`; set+each `keyframe_points[].interpolation = 'LINEAR'` for motion that should read at t = 1.5 as a+travel, not an ease. The harness differences the two frames per cameraand reports the number (a camera moves at ≥ 0.4 % of its pixels changed by > 8/255; none movingis the `no_motion` ERROR, the judge's `nothing_moves`). Amplitudes that have registeredat 1024 × 576: ≥ 0.10 rad of rotation, ≥ 0.05 m of travel per 1.5 s, a particle / leaf / boat@@ -110,8 +117,8 @@ at 1024 × 576: ≥ 0.10 rad of rotation, ≥ 0.05 m of travel per 1.5 s, a part## NamingPascalCase object names, globally unique — a Blender object name is global, so a second`Lantern_0` becomes `Lantern_0.001` and the placement table then reports a prop nobody-planned: number every placed copy with `lib.place.unique_name(base, i)` (`Lantern_0`,-`Lantern_1`…) and never reuse a base another zone uses. The census classifies by name: a+planned: number every placed copy `f"{base}_{i}"` (`Lantern_0`, `Lantern_1`…) and never reuse a+base another zone uses. The census classifies by name: aground / terrain mesh is `Ground…` / `Terrain…`, water `Water…`, and anything meant as distantbackdrop (if the brief's place has one) `Sky…` — a sky-named mesh wider than 50 m is filed asbackdrop, not content, so the overview cameras frame the content; an interior's shell is@@ -126,15 +133,19 @@ than 2 things float); a foot buried deeper than 0.10 m is `sunken` (an ERROR atfifth of the thing's height — rocks, posts and bushes may sit partly in; stairs and ramps mayfollow the slope; a foot at or under water is fine); a bbox touching nothing is `unsupported`;two boxes sharing more than 10% of the smaller one's volume is `interpenetration` (an ERROR at 35%).-`lib.place.seat(obj, ctx.height_at)` samples the same foot columns the gate does (gap ≤ 0.02 m-after); `lib.scatter.instance(..., height_at=ctx.height_at)` seats as it places;-`lib.place.clear_of(objs)` is the pair check. A thing resting on one corner with the others in+The feet are the gate's foot band: the root's evaluated vertices within max(0.02 m, 5 % of its+height) of its lowest one, sampled as up to 5 columns (the lowest vertex and the band's ±x / ±y+extremes). Seating is yours to compute: take the root's world-space vertices (its own, its+children's, and for a collection-instance Empty the source collection's through the Empty's+matrix), keep that band, and move the root by the smallest `ctx.height_at(x, y) - z` over it —+the lowest-hanging foot then touches (a gap ≤ 0.02 m is contact) and none floats. The pair check is yours too: keep any two+roots' world bounding boxes from sharing more than 10% of the smaller one. A thing resting on one corner with the others inthe air (four or more foot columns, at most one touching, the worst gap > 0.05 m) is`cantilevered` (a WARN). `obj["placement"] = "free"` exempts a thing MEANTto hang in the air (a bird, a lantern on a chain, a kite) — nothing else: the gate reports theshare of placed things tagged free and warns past 25%, errors past 50%. Geometry-nodes instance-clouds (`lib.vegetation.grass_patch`, `lib.scatter.gn_scatter`) are counted as instances and-exempt per asset, like scatter is. A PLANNED content is also measured against the plan bounds+clouds (an Instance on Points tree over a ground patch) are counted as instances and exempt per+asset. A PLANNED content is also measured against the plan bounds(`out_of_bounds`, a WARN: entirely outside them by more than max(5 m, 10 % of the span); scenery thatcontinues the place past the bounds is never reported) and an asset placedat a size other than the plan's (beyond 2.5 × is a WARN, 4 × an ERROR).@@ -165,18 +176,29 @@ its line.## InteriorsA plan with `interior: true`: the enclosure (floor, walls, lid) is `src/env.py`'s, with the lidmeshes named `RoomShell…` / `Ceiling…`; it must read enclosed from every authored camera and be-lit inside (the frame gate); the floating threshold indoors is 0.02 m. `lib.architecture.room_shell`-builds a box with openings; the room's shape and extent are the brief's. Zones dress the inside;+lit inside (the frame gate); the floating threshold indoors is 0.02 m. The room's shape, its+openings and its extent are the brief's, built in `build_env`. Zones dress the inside;a partition, counter or alcove a zone needs is the zone's, seated and clear of the shell.+## Realism (judged; the gates above measure the rest)+Surfaces are photoreal: every large surface varies at more than one scale — broad tone and wear+over metres AND fine grain or bump over centimetres — in a node tree you wire (Noise / Voronoi /+Wave textures through Mix and Bump nodes); one constant colour per surface is+`placeholder_material` / `flat_ground`. Natural things have organic silhouettes: a tree is a+trunk branching into limbs that carry leaf or needle cards, a rock an irregular asymmetric mass —+never a cone, a ball on a stick or a cube standing in for one (`asset_quality_detail`); one+shape stamped many times is `monotonous_vegetation`. The world+continues past the content in every authored frame (`world_edge`, `fog_short`; judged+`world_edge_visible`).+## Two modules the harness builds as-is (the interface shown once; the content is a harbour, yours is the brief's)`src/env.py````python"""src/env.py — the environment of `Harbour at dusk`: world, sun, ground, atmosphere."""-from lib.lighting import sun-from lib.materials import material-from lib.sky import haze, sun_world-from lib.terrain import ground+import math++import bmesh+import bpySUN_AZIMUTH_DEG, SUN_ELEVATION_DEG = 250.0, 8.0 # the plan's light (compass 0 = +X, 90 = +Y); zones may `from env import` theseWORLD_M = 320.0 # how far this place's land and air reach (plan span 100 m): the brief's number@@ -186,38 +208,62 @@ def height_at(x, y): # THE ground: any function of (x, y) the brief's landformreturn -2.0 * min(1.0, x / 25.0) if x >= 0.0 else 0.04 * max(0.0, -45.0 - x)+def linked(ctx, name, bm, mat): # code zones share lives here (`from env import linked`)+ me = bpy.data.meshes.new(name)+ bm.to_mesh(me)+ bm.free()+ me.materials.append(mat)+ ctx.collection.objects.link(ob := bpy.data.objects.new(name, me))+ return ob++def build_env(ctx):- sun_world(ctx.scene, elevation_deg=SUN_ELEVATION_DEG, azimuth_deg=SUN_AZIMUTH_DEG, strength=0.25, dust=3.0)- _, towards_sun = sun(ctx.collection, azimuth_deg=SUN_AZIMUTH_DEG, elevation_deg=SUN_ELEVATION_DEG, color="FFB070", energy=2.5)- ground_mat = material("GroundMat", "4A5A33", roughness=1.0, noise_scale=0.35)- ground("Ground", ctx.collection, size=WORLD_M, segments=160, height_at=height_at, material=ground_mat) # past every camera's fog- haze(ctx.collection, (0.0, 0.0, 15.0), (WORLD_M, WORLD_M, 30.0), density=1.0 / WORLD_M, color="D9703A") # 1/density ≥ span/1.5- return {"ground_material": ground_mat, "sun_direction": tuple(towards_sun), "water_level": 0.0}+ ctx.scene.world = bpy.data.worlds.new("Dusk") # REQUIRED: a world — its sky is the brief's (§ Blender 5.2 API facts)+ sun = bpy.data.objects.new("Sun", bpy.data.lights.new("Sun", "SUN")) # REQUIRED: a lamp; a Sun shines down its own -Z+ sun.rotation_euler = (math.radians(90.0 - SUN_ELEVATION_DEG), 0.0, math.radians(SUN_AZIMUTH_DEG + 90.0))+ ctx.collection.objects.link(sun)+ ground = bpy.data.materials.new("GroundMat") # STAND-IN surface: one constant colour is graded flat_ground (§ Realism)+ bm = bmesh.new()+ bmesh.ops.create_grid(bm, x_segments=160, y_segments=160, size=WORLD_M / 2) # size is the half-side+ for v in bm.verts: # REQUIRED: the ground samples height_at, which zones seat on+ v.co.z = height_at(v.co.x, v.co.y)+ linked(ctx, "Ground", bm, ground)+ haze = bpy.data.materials.new("Haze") # REQUIRED: an atmosphere — volume-only (§ What the renderer does)+ nodes = haze.node_tree.nodes+ nodes.remove(nodes["Principled BSDF"])+ vol = nodes.new("ShaderNodeVolumePrincipled")+ vol.inputs["Density"].default_value = 1.0 / WORLD_M # 1 / density >= span / 1.5 (fog_short)+ haze.node_tree.links.new(vol.outputs["Volume"], nodes["Material Output"].inputs["Volume"])+ bm = bmesh.new()+ bmesh.ops.create_cube(bm, size=1.0)+ bmesh.ops.scale(bm, vec=(WORLD_M, WORLD_M, 30.0), verts=bm.verts)+ linked(ctx, "Atmosphere", bm, haze).location.z = 15.0+ return {"ground_material": ground, "water_level": 0.0}````src/zones/quay.py````python"""src/zones/quay.py — zone "Quay": the granite quay deck with its bollards."""-from lib.materials import material-from lib.mesh import Batch-from lib.place import clear_of, seat, unique_name-from lib.scatter import instance+import bmesh+import bpy++from env import linkedCENTRE, DECK_TOP, N_BOLLARDS = (-20.0, 0.0), 1.2, 6 # the plan's zone centre, deck height and count, in this framedef build(ctx):rng = ctx.rng(11)- granite = material("QuayGranite", "6E6A63", roughness=0.9, noise_scale=0.6)- b = Batch("QuayDeck") # one mesh per material, one placement row- b.box(granite, (CENTRE[0], CENTRE[1], DECK_TOP / 2), (40.0, 60.0, DECK_TOP))- deck = b.finish(ctx.collection, parent=False)[0]- seat(deck, ctx.height_at) # its lowest vertices meet the ground- placed = [deck]+ granite = bpy.data.materials.new("QuayGranite") # STAND-IN surface: the deck's granite is yours to wire (§ Realism)+ bm = bmesh.new()+ bmesh.ops.create_cube(bm, size=1.0)+ bmesh.ops.scale(bm, vec=(40.0, 60.0, DECK_TOP), verts=bm.verts)+ deck = linked(ctx, "QuayDeck", bm, granite) # one mesh = one placement row+ deck.location = (*CENTRE, ctx.height_at(*CENTRE) + DECK_TOP / 2) # its lowest vertices on the (level) groundfor i in range(N_BOLLARDS): # where the plan puts them: along the water edge, ON the deck- x, y = CENTRE[0] + 18.0 + rng.uniform(-0.2, 0.2), CENTRE[1] - 25.0 + i * 10.0- placed.append(instance(ctx.collection, ctx.assets["bollard"], unique_name("Bollard", i), x, y,- height_at=lambda px, py: DECK_TOP, rot_z=rng.uniform(0.0, 6.283)))- for a, b_, frac in clear_of(placed): # [] here — nothing shares more than 10 % of the smaller box- print("quay: fix the overlap", a, "x", b_, f"{frac:.0%}")+ copy = bpy.data.objects.new(f"Bollard_{i}", None) # a collection-instance Empty = one placement row+ copy.instance_type, copy.instance_collection = "COLLECTION", ctx.assets["bollard"]+ copy.location = (CENTRE[0] + 18.0 + rng.uniform(-0.2, 0.2), CENTRE[1] - 25.0 + i * 10.0, DECK_TOP) # the deck top is its ground+ copy.rotation_euler.z = rng.uniform(0.0, 6.283)+ ctx.collection.objects.link(copy)return ctx.collection```diff --git a/harness/codeverse3d/prompts/scene_blender/effects_catalog.md b/harness/codeverse3d/prompts/scene_blender/effects_catalog.mddeleted file mode 100644index 6ff4ac27..00000000--- a/harness/codeverse3d/prompts/scene_blender/effects_catalog.md+++ /dev/null@@ -1,101 +0,0 @@-# The shipped bpy library — an optional toolbox--`src/lib/` is in your workspace already: thirteen modules of Blender 5.2 LTS bpy-that build, seat, light and animate what a scene needs. They are not an-outside package — they are harness code shipped into the workspace, so-importing them is allowed where "never import a helper SDK" still forbids-everything else (and a write to `src/lib/` is reverted).--These calls are available and already pass the gates (seating, naming, the 5.2-API). Use them, extend them or write your own raw bpy / bmesh — only the gates-and the brief decide. `Batch` from `lib/mesh.py` (plain vertex and face lists)-is one way to build a many-part prop as one object; `bpy.data` + `bmesh` is another.--Import with the package path from any file — `src/env.py`, `src/zones/x.py`-and `src/assets/x.py` all say `from lib.materials import material` or-`from lib import mesh, place` (`src/` is on the path; the modules import each-other the same way).--| Want | Call |-| --- | --- |-| noise on the CPU, a seeded generator, a cheap per-item jitter | `rng(seed)` (THE random: never the module-level `random`) · `hash01(i, seed=0)` 0..1 from an index · `fbm2(x, y, *, octaves=4, lacunarity=2.0, gain=0.5, seed=0)` / `fbm3(x, y, z, *, …)` gradient noise about -1..1 with 1 unit = one feature (call with `x / scale_m`) · `ridged(x, y, *, seed=0, octaves=5)` 0..1 crests · `mountain_height(x, y, *, seed=0, amplitude=45.0, frequency=0.013)` a ridge line in metres · `height_field(size, segments, fn)` a row-major grid of samples — `lib/noise.py`; pure python: a 96 x 96 field with four octaves is ~60 ms, so keep heavy fields to the env |-| a prop built from parts as ONE object (one placement row, one mesh per material) | `Batch(name)` then `.box(mat, loc, size, rotation=0.0)` (loc = centre, 12 triangles) · `.sphere(mat, loc, scale, subdivision=1)` (level 1 = 20 triangles, 2 = 80, 3 = 320, 4 = 1 280) · `.lathe(mat, xy, profile, sides=32, phase=0.0)` (profile = [(radius, z), …], capped) · `.cone(mat, loc, radius, height, top=0.0, sides=24)` (loc = base centre) · `.beam(mat, a, b, radius, end=None, sides=8)` (a capped tube; `end` tapers) · `.torus(mat, loc, radius, tube, major=64, minor=8)` · `.ring(mat, center, normal, radius, tube, segments=96)` (a hoop about `normal`) · `.add(mat, vertices, faces, smooth=False)` raw lists · `.transformed(matrix)` a view whose additions are transformed (a figure turned to its heading) · `.finish(collection, *, bevel=0.0, parent=True, name_prefix="")` → `[root, mesh, …]`: ONE root Empty named after the batch (the placement row; `root["placement"] = "free"` for a hanging thing), origin at the base centre; `parent=False` for an asset's own collection · `mesh_object(name, vertices, faces, mat, collection, *, smooth=False)` · `curve_object(name, points, radius, mat, collection, *, cyclic=False)` a rope / cable / vine · `sphere_template(level)` an icosphere's lists · `parent_under(objects, collection, name)` several objects as one row — `lib/mesh.py`; metres, Z up, -Y front |-| a textured Principled material without a texture file | `material(name, color, roughness=.5, metal=0.0, *, noise_scale=0.0, bump=.08, emission=0.0)` (hex `"8A6A3F"` or a linear tuple; `noise_scale` features / m adds breakup + bump) · `masonry(name, color, mortar="625D66", scale=2.0)` rows / m · `limestone(name, color, scale=1.2)` · `ashlar(name, color)` 1.2 x 0.4 m blocks · `woodgrain(mat, dark="29190F", light="805939", direction=(3,.1,5))` on an existing material · `chipped_paint(mat, paint, substrate, scale=6)` · `worn_alloy(name, color, *, seed=0, metal=.55)` · `mineral_surface(name, color, *, stone=False)` rock / soil, cracks when `stone` · `water(name, color="163F4A", roughness=.12, scale=.8, *, flow=(0.6,0.2), ctx=None)` ONE refracting surface (give it a bed; ripples drift with `ctx`) · `clear_water(name)` a basin · `glass(name, color="FFFFFF", roughness=.05, ior=1.5)` · `foliage(name, color, variants=3)` → a LIST of leaf materials (give neighbours different ones) · `snow(name="Snow")` · `ice(name="Ice")` · `emissive(name, color, strength)` a light-giving skin (3-8 reads as a lamp) · `tint(mat, variant)` a shifted copy (-1..1) · `volume(name, color, density=.4, *, anisotropy=.3, noise_scale=0.0, emission=0.0)` a Principled VOLUME with no surface — the only edgeless steam / smoke / dust / spark haze Cycles can draw (the contract's renderer facts); a cloud of `Batch` spheres wearing it is one root — `lib/materials.py`; patterns read OBJECT coordinates so they keep their metre scale; albedos outside 0.02-0.8 linear push the frame toward dark_frame / blown |-| the ground, hills, rock | `make_height_at(*, seed=0, relief=3.0, scale=60.0, flat_radius=0.0, base=0.0)` → one landform among many: rolling fbm hills of up to `relief` m, features `scale` m wide, a level pad only if you pass `flat_radius`; return it from env.py, compose it into your own terrain, or write any function of (x, y) — only the signature is the contract · `ground(name, collection, *, size, segments, height_at, material, center=(0,0), smooth=True)` the terrain mesh (name it `Ground…`; 96 segments = 18 k triangles) · `cliff(name, collection, *, length, height, height_at, material, seed=0)` a rock face along +X (~2.4 k) · `boulder(batch, mat, center, scale, *, seed=0, detail=3)` standing on `center` z (80 / 320 / 1 280 triangles at detail 2 / 3 / 4) · `rock_field(batch, mat, center, radius, count, height_at, rng)` 80 apiece · `talus(batch, mat, center, scale, seed)` a scree heap (~800) · `basalt_column(batch, materials, center, radius, height, rng, lean=(0,0))` a hexagonal cluster (~300) · `shoreline_mask(x, y, water_level, height_at)` 0 in the water, 1 half a metre up — `lib/terrain.py`; every recipe's `center` is the GROUND point: pass `height_at` (x, y) |-| the sky, fog, night dressing (world setters are ENV ONLY) | `sun_world(scene, *, elevation_deg=12.0, azimuth_deg=125.0, strength=.2, dust=2.0)` the physical MULTIPLE_SCATTERING sky, compass 0 = +X / 90 = +Y like the Sun lamp, disc off (the lamp is the sun) · `night_world(scene, color="17273F", strength=.3)` · `gradient_world(scene, stops, *, clouds=True, strength=.7)` stops = `[(0, "F2C9A0"), (1, "1F4A8E")]` horizon → zenith · `haze(collection, loc, size, density=.003, color="ADC9E1", name="Atmosphere")` a bounded fog box (volume-only: the census reports it as fog, never as matter; 0.002 clear, 0.01 mist, 0.03 fog) · `aurora(name, collection, center, *, span=560, height=72, seed=0, strength=.24, ctx=None)` a curtain at `center` (x, y, altitude), tagged free — NAME it with a sky word (`"AuroraSky"`) so the census files it as sky · `stars(batch, mat, *, seed=0, count=900, radius=600)` into a batch named `Stars…` with an `emissive` mat; tag its root free — `lib/sky.py`; no clouds volume, no moon disc |-| lamps | `sun(collection, *, azimuth_deg, elevation_deg, color="FFCF9C", energy=3.0, angle_deg=2.0, name="Sun")` → `(lamp, towards_sun)`, W/m² (3-5 day, 0.3-1 dusk have passed the frame gate) · `area_light(collection, name, loc, color, energy, *, size=5.0, target=None, shape="DISK")` Watts · `point_light(collection, name, loc, color, energy, *, radius=.05)` · `spot(collection, name, loc, color, energy, *, size_deg=45.0, blend=.3, target=None)` · `practical(collection, name, loc, color="FFB270", energy=300, *, size=.42, target=None)` the light a visible fixture throws (pair it with an `emissive` skin) · `aim(obj, target)` — `lib/lighting.py`; exposure and the view transform are the harness's: light the scene, never the camera |-| water: a lake, a fall, jets, spray | `water_surface(name, collection, *, size, level, material=None, ripple=0.045, seed=0, height_fn=None)` ONE plane at z = `level` centred on the origin — move the object; `height_fn` drops cells where the ground stands above the water (name it `…Water` / `…Lake`: a foot in it is "on water", never floating; ~4.6 k) · `pool_height(x, y, *, level=-.25)` a `height_at` for things that float · `waterfall(name, collection, center, *, width, height, seed=0, ctx=None, layers=4)` foam sheets dropping onto `center` (the impact level), flow toward -Y, ~400 per layer · `hanging_fall(name, collection, outlet, along, across, *, width, height, seed=0, ctx=None)` one sheet from a spout · `fountain_jets(batch, collection, water_mat, *, center, nozzle_r, landing_r, count=14, rise=1.85, ctx=None, seed=0)` parabolic tubes + spray (~220 per jet) · `droplets(batch, mat, center, width, bottom, rng, count=260)` 4 triangles each · `foam_shader(name)` — `lib/water.py`; no fluid solver, no caustics: a fall is sheets whose texture streams with `ctx` |-| trees, shrubs, ferns, grass, flowers | `tree(batch, loc, height, bark, foliage, *, seed=0, kind="broadleaf", max_leaves=4000)` kinds broadleaf / oak / cypress / pine — a crown of leaf CARDS (3-9 k triangles; `max_leaves` caps it; pine ≈ 350) · `shrub(batch, bark, foliage, center, *, scale=1.0, seed=0)` (~300) · `leaf_spray(batch, foliage, center, rng, *, radius=.32, count=35)` a vine knot · `fern(batch, mat, center, *, scale=1.0, seed=0)` · `tropical(batch, leaves, stem, center, *, scale=1.0, seed=0)` · `grass_clump(batch, mats, x, y, z, rng)` 12 blades · `perennial_bed(batch, center, radius, height_at, foliage, petals, rng)` (~1.1 k) · `grass_patch(name, collection, surface, *, blade=None, density=5.0, seed=0, height=.3, color="4A6B2A")` a geometry-nodes instance CLOUD on `surface` (a hidden `terrain.ground` patch: `hide_render = True`) — exempt from per-asset placement, 3 quads per blade · `tree_stand(collection, batch, positions, height_at, rng, bark=…, foliage=…, height=7.0, kind=…)` a copse as ONE object — `lib/vegetation.py`; every `loc` / `center` is the ground point |-| buildings, roofs, bridges, paving, a room, lettering | `timber_house(batch, roofs, x, y, width, depth, floors, mats, rng, index)` half-timbered, `mats` = {wall, timber, door, window}, `roofs` = {tile, trim}; returns the ridge height (≤ 14 k) · `tiled_roof(batch, tile, trim, center, width, depth, rise, rng)` ridge along X on `center` (x, y, eave z) · `clay_roof(batch, frame, tiles, timber, center, width, depth, rise, rng)` pantiles · `fret_window(batch, wood, paper, x, y, z, width, height, direction, *, pattern=0)` facing compass `direction` · `arched_opening(batch, mat, center, width, height, *, depth=.28, thickness=.2)` · `stone_bridge(batch, stone, dark, *, center, span=27.6, width=4.7, rise=3.9, height_at=None)` hump-backed along X (~700) · `arched_footbridge(batch, wood, stone, *, start, end, rise=1.5, height_at=None)` (~1 k; give it `height_at` on a bank) · `tower(batch, mat, center, radius, low, high, windows, *, count=8)` · `paving(batch, mats, *, center, inner_r, rings, seed)` fan-set rings, 2 cm thick (~350 per ring) · `paving_grid(batch, mats, center, size, stone, joint, rng)` flagstones · `room_shell(collection, mat, *, center, extents, thickness=.2, openings=(), glazed=False)` a box interior's floor, walls and `Ceiling` under a `RoomShell` root (env.py; openings = `(wall, offset, width, sill, head)`; `glazed=True` is a glass house — a conservatory, a greenhouse, a glass atrium: every wall panel and the lid become `materials.glass` panes that cast no shadow on an iron-frame grid of `mat` bars, so the sun comes through and the frame's grid shadows the floor, which stays an opaque slab of `mat`; the names stay, a pane being its panel's name + `Glass`) · `lantern(batch, silk, wood, center, *, radius=.35, length=None)` (~550; an `emissive` silk) · `text_mesh(name, collection, body, loc, size, mat, *, rotation=(pi/2,0,0), align="CENTER", extrude=.005)` readable lettering (~300 per letter) — `lib/architecture.py`; `center` / (x, y) sit on the ground z you pass |-| placing copies: instances and clouds | `instance(collection, source, name, x, y, *, height_at, rot_z=0.0, scale=1.0, sink=0.0)` ONE seated collection-instance Empty of `ctx.assets["<snake>"]` (the placement row) · `scatter(collection, source, prefix, points, *, height_at, rng, rot="random", scale=(1,1))` one per point, named `<prefix>_<i>` · `poisson(rng, *, area, min_dist, max_count, mask=None)` points in (x0, y0, x1, y1) at least `min_dist` apart; `mask` of (x, y) → 0..1 keeps a region clear · `along_path(points, n, *, jitter=0.0, rng=None)` · `grid(center, size, spacing, rng, *, jitter=.3)` · `gn_scatter(name, collection, surface, instance_obj, *, density, seed=0, align_normal=True, scale_range=(.8,1.2))` an instance cloud (pebbles, tufts, hundreds+) — one object, exempt from per-asset placement — `lib/scatter.py`; a cloud cannot be measured per copy: anything the plan COUNTS (a bench, a cart, a tree) is an `instance` |-| seating, facing, the zone's own placement check | `seat(obj, height_at, *, sink=0.0, columns=5)` drop a ROOT until its lowest foot column rests on the ground (the gate's own columns: lowest + ±x / ±y of the foot band) · `seat_instance(empty, source, height_at, *, sink=0.0)` · `rest_on(obj, support, *, offset=0.0)` a lantern on a table · `bbox_world(obj, *, evaluated=True)` (min, max) incl. children and instances · `face_toward(obj, target)` / `heading(a, b)` for -Y-front things · `clear_of(objs, min_gap=.02, *, overlap=0.10)` → `[(a, b, fraction)]` AABB overlaps the gate would call interpenetration: run it on your roots before returning · `clear_mask(objs, margin=.3)` → an (x, y) mask for the scatter module's poisson `mask` argument that keeps scatter points out of the placed roots' footprints (+ `margin` m) · `keep_inside(obj, bbox)` the plan's box · `unique_name(base, i)` `Base_i`, bumped past an existing name (names are global in Blender) · `world_matrix(obj)` the matrix NOW (`obj.matrix_world` is stale until the depsgraph runs) — `lib/place.py`; contact is 2 cm, floating starts at 5 cm outdoors / 2 cm indoors, sunk at 10 cm |-| a person, a crowd | `figure(batch, cloth, skin, center, *, scale=1.0, heading=0.0, pose=0.0)` 1.72 m, facing -Y turned by `heading`, `pose` 0 standing → 1 striding (~530) · `visitor(batch, cloth, mats, center, *, scale=1.0, heading=0.0, pose=0.0, variant=0)` a coat over `mats[variant]` legs, `mats[-1]` the skin · `crowd(batch, mats, points, rng, scale=1.0)` one per (x, y, z) — `lib/figure.py`; no faces, no hands with fingers: a figure reads at 3 m and beyond |-| motion between t = 0 and 1.5 s | `keyframe_path(obj, points, ctx, *, t0=0.0, t1=None, interpolation="LINEAR")` · `drift(obj, delta, ctx)` a boat, a balloon, a leaf · `spin(obj, axis="Z", turns_per_s=.25, ctx=None)` a SIMPLE driver `frame * k` (a wheel, a vane) · `sway(obj, axis, amplitude, period_s, ctx)` a SIMPLE driver, a sine of `frame` (a hanging lantern, a mast) · `scroll(mapping_node, velocity, ctx)` a texture that flows · `shape_key_sweep(obj, key_name, ctx, *, from_value=0.0, to_value=1.0)` a sail filling · `fcurves(id_data)` / `set_interpolation(id_data, interpolation="LINEAR")` the 5.2 slotted-action curves — `lib/motion.py`; keyframes land on `ctx.frame(t)`; a driver that needs Python evaluates to 0 in the build and fails it |--## Six facts about all of them--**1. Collection, name, seed.** Every factory takes the collection it links into-(`ctx.collection` — never `bpy.context.collection`), a name, and a `seed` or-`rng` wherever it draws: the same seed gives the same scene on every machine,-and `ctx.rng(seed)` is the only randomness the lint accepts. Names are global in-Blender: `place.unique_name("Lantern", i)` — a duplicate silently becomes-`Lantern_0.001` and reads as a stray instance.--**2. Seating is measured.** A placed thing is a ROOT object in the zone's-collection: a `Batch.finish` root, a `scatter.instance` Empty, a-`mesh_object`. The gate samples its foot columns against what is under them:-a gap over 5 cm (2 cm indoors) is floating, a burial over 10 cm is sunk, an AABB-overlap over 10 % of the smaller box is interpenetration, and a measured-defect caps the score. Batch recipes stand on the ground z you pass-(`height_at` (x, y)); instances seat themselves; anything else can go through-`place.seat(root, ctx.height_at)` or your own seating. `obj["placement"] = "free"`-only for a thing that really hangs or flies — the gate reports the share of-free-tagged assets.--**3. Motion is data on `ctx.frame(t)`.** Keyframes through `lib.motion`, or a-simple driver of `frame`; never `frame_set`, handlers or Python drivers. The-harness renders `ctx.times` = 0 and 1.5 s and reads the .blend it saved.--**4. The world belongs to `src/env.py`.** `sun_world` / `night_world` /-`gradient_world` run in `build_env` and nowhere else (the lint rejects a world in-a zone); zones add the local lights their place has and may read what `build_env`-returned (`ctx.env`). A sky world and a Sun lamp agree when they share the same-azimuth / elevation.--**5. Instances versus clouds.** A thing the plan counts (a bench, a cart, a-tree) is one root the gate can name — a `scatter.instance` of its asset-collection is the ready-made one. Ground cover by the hundred (blades, pebbles,-tufts) can be a `gn_scatter` / `grass_patch` cloud: one object, counted as-instances, exempt from per-asset placement. A thing the plan counts must be ONE-root object (the placement row and the census are per root): a `Batch`, a parent-Empty over parts, or a collection instance — never twenty loose primitives.--**6. Import only what you call.** `from lib.materials import material, woodgrain`-— not a module's whole export list; every later round has to read the imports.--## What differs on this renderer--* **Cycles, 32 samples + OpenImageDenoise, AgX at exposure 0**, 1024 x 576,- the harness's settings (the lint rejects `scene.render` / `scene.cycles`- writes). There is NO post chain and NO bloom: an `emissive` skin at- strength 3-8 reads as a lamp, 20+ as a sun-bright source, and a lamp beside it- (`lighting.practical`) is what actually lights the wall. Non-emissive albedos- outside **0.02-0.8** linear push the frame gate toward dark / blown.-* **The census is the evaluated depsgraph**: modifiers, geometry nodes and- instances count exactly as they render; a volume-only material is fog, not- matter (the `haze` box never appears as a placed thing). Unique triangles- are capped at 3 M; a tree is 3-9 k, a two-storey house ~10 k, so a hamlet and- a wood fit with room to spare.-* **Blender 5.2 API facts the library already follows** (the contract lists- them): no `use_nodes`; `ShaderNodeMix` (not MixRGB) with RGBA on inputs 6 / 7- and output 2; the Principled sockets are `Emission Color` / `Emission Strength`- / `Transmission Weight` / `Coat Weight` / `Specular IOR Level`; the sky is- `MULTIPLE_SCATTERING` with `aerosol_density`; boolean solvers are MANIFOLD /- EXACT / FLOAT; geometry-nodes inputs are- `getattr(mod.properties.inputs, "Socket_2").value = v`; actions are slotted- (`lib.motion.fcurves`, not `action.fcurves`); `obj.matrix_world` is stale until- the depsgraph runs (`lib.place.world_matrix`).-* **One refracting water plane, no planar reflector budget to spend**: Cycles- refracts and reflects whatever is there. Water that refracts needs a bed- below its level in `height_at` (whatever shape the brief's water has) so there- is something to see through it.diff --git a/harness/codeverse3d/prompts/scene_blender/system.md b/harness/codeverse3d/prompts/scene_blender/system.mdindex 97264454..36d4c2b7 100644--- a/harness/codeverse3d/prompts/scene_blender/system.md+++ b/harness/codeverse3d/prompts/scene_blender/system.md@@ -1,7 +1,8 @@-You are a Blender bpy author writing RAW python modules for a multi-file scene that a+You are a Blender bpy author writing the python modules of a multi-file scene that aheadless harness builds and renders in Blender 5.2 LTS (Cycles, AgX). No SDKs, no add-ons,no file IO, no network: `bpy`, `bmesh`, `mathutils`, `math`, `numpy` and the workspace's own-`lib.*` / `env` modules, nothing else. The harness owns the process, the render settings,+`env` / `zones` / `assets` modules, nothing else. Every mesh, material, light, world and motion+in the scene is code you write. The harness owns the process, the render settings,the cameras, the frame clock and the export — you build geometry, materials, lights, theworld and the motion into the Collection you are handed. What the scene looks like — itslandform, its layout, how it closes the horizon, where its light comes from — is the brief's@@ -13,7 +14,6 @@ and yours; the harness states what it measures and how.| `src/assets/<snake>.py` | `build_<snake>(ctx, variant=0) -> Collection` | once each, at the origin, base on z = 0 → `ctx.assets['<snake>']` || `src/zones/<snake>.py` | `build(ctx) -> Collection` | once each, into `ctx.collection`; a raise drops THAT zone only || `src/scene.py` | nothing — harness data | the entry; re-assembly overwrites it |-| `src/lib/*.py` | nothing — harness library | an optional toolbox you may import and call (the catalog is in every brief) |What the gates measure — deterministically, on the census of the built scene, before anypicture is judged:@@ -22,10 +22,11 @@ picture is judged:above what is under it (0.02 m indoors) is `floating`, a foot buried past 0.10 m is`sunken`, two boxes sharing more than 10% of the smaller one is `interpenetration`, abbox touching nothing is `unsupported` — ERRORS at 0.08 m / 0.20 m / 35%.- `lib.place.seat(obj, ctx.height_at)` and `lib.scatter.instance(..., height_at=ctx.height_at)`- seat through the same foot columns the gate samples; your own seating passes the same way.- `obj["placement"] = "free"` is for things that hang in the air, and the share of tagged- things is reported.+ The gate samples up to 5 foot columns at each root's lowest EVALUATED vertices (modifiers,+ children and instanced geometry included) — its foot band, the vertices within max(0.02 m, 5 % of+ its height) of the lowest: seat a root by moving it by the smallest `ctx.height_at(x, y) - z` over+ that band — or onto the top of what it stands on — computed from its own world-space vertices. `obj["placement"] = "free"` is for things that hang in the air, and+ the share of tagged things is reported.* **Frames.** Every authored camera at t = 0 and t = 1.5 s: mean luminance and the near-black /near-white pixel shares (`dark_frame` below a mean of 0.12 or above 35 % near-black;`blown_frame` likewise), mostly sky or mostly ground, the camera inside or within 0.5 m of@@ -83,7 +84,21 @@ What holds whatever the brief is:lint warns on `bpy.ops.mesh.primitive_*` inside a loop (each call rebuilds the scene state).* **Split the scene across modules** as the contract says, link everything into`ctx.collection`, and keep every import resolvable in the build. A module that raises- takes its whole zone out of the picture.+ takes its whole zone out of the picture. Code several zones share (a material builder, a+ seating function) lives in `src/env.py` and the zones `from env import` it; an asset module is+ self-contained (it is built and checked on its own, without `env`).++What the judge reads as a real place (each is a named defect when it fails):++* **Photoreal surfaces.** Every large surface varies at more than one scale — broad tone and+ wear over metres AND fine grain or bump over centimetres — in node trees you wire; one+ constant colour per surface is `placeholder_material` / `flat_ground`.+* **Organic silhouettes.** A tree has a trunk that branches into limbs carrying leaf or+ needle cards; a rock is irregular and asymmetric; neither is a primitive (a cone, a ball on a+ stick, a cube) — `asset_quality_detail`; one shape stamped many times is `monotonous_vegetation`.+* **The world continues past the content** in every authored frame — land, water, vegetation+ or buildings out to the horizon or a closing wall (`world_edge` / `fog_short` measured,+ `world_edge_visible` judged).A simple scene that is seated, lit and legible beats an elaborate one that floats in thedark. Get the floor and the light right; spend everything after that on the brief.diff --git a/harness/codeverse3d/prompts/system/harness_contract.md b/harness/codeverse3d/prompts/system/harness_contract.mdindex b788b327..edcab061 100644--- a/harness/codeverse3d/prompts/system/harness_contract.md+++ b/harness/codeverse3d/prompts/system/harness_contract.md@@ -24,8 +24,8 @@ artifacts/ harness output (object.glb, renders/, gates/, measurement.json). REshader files with `THREE.FileLoader` — exactly as your language contract shows. Writing files staysforbidden everywhere.A language contract may ALSO ship harness-owned modules inside your own `src/` and tell- you to call them (`scene_threejs`: `src/lib/*.js`; `scene_blender`: `src/lib/`). Those are not an SDK import — they- are code the harness wrote into your workspace. Call them; never rewrite them.+ you to call them (`scene_threejs`: `src/lib/*.js`). Those are not an SDK import — they are code+ the harness wrote into your workspace. Call them; never rewrite them.## 2. Code is truthdiff --git a/harness/codeverse3d/prompts/tracks/plan_scene_bpy.j2 b/harness/codeverse3d/prompts/tracks/plan_scene_bpy.j2index 27e49813..bda0c48d 100644--- a/harness/codeverse3d/prompts/tracks/plan_scene_bpy.j2+++ b/harness/codeverse3d/prompts/tracks/plan_scene_bpy.j2@@ -14,29 +14,13 @@ skeleton, their briefs, the layouts): you never write Z-up numbers, and `environLANGUAGE CONTRACT THE BUILDERS WILL FOLLOW:{{ contract }}-SHIPPED BPY LIBRARY (optional toolbox):-The scene workspace already contains, under `src/lib/`: `noise.py` (`fbm2`, `ridged`,-`mountain_height`, `height_field`), `mesh.py` (`Batch`: box / sphere / lathe / cone / beam / torus,-`mesh_object`, `curve_object`), `materials.py` (`material`, `masonry`, `limestone`, `woodgrain`,-`chipped_paint`, `worn_alloy`, `water`, `glass`, `foliage`, `snow`, `ice`, `emissive`),-`terrain.py` (`make_height_at`, `ground`, `cliff`, `boulder`, `rock_field`, `talus`,-`basalt_column`), `sky.py` (`sun_world`, `night_world`, `gradient_world`, `haze`, `aurora`,-`stars`), `lighting.py` (`sun`, `area_light`, `point_light`, `spot`, `practical`), `water.py`-(`water_surface`, `waterfall`, `hanging_fall`, `fountain_jets`, `droplets`), `vegetation.py`-(`tree`: broadleaf / cypress / oak / pine, `shrub`, `fern`, `tropical`, `grass_patch`,-`perennial_bed`, `tree_stand`), `architecture.py` (`arched_opening`, `tiled_roof`, `clay_roof`,-`fret_window`, `timber_house`, `stone_bridge`, `arched_footbridge`, `tower`, `paving`,-`room_shell`, `lantern`, `text_mesh`), `scatter.py` (`instance`, `scatter`, `poisson`,-`along_path`, `grid`, `gn_scatter`), `place.py` (`seat`, `rest_on`, `clear_of`, `unique_name`),-`figure.py` (`figure`, `visitor`, `crowd`) and `motion.py` (`keyframe_path`, `drift`, `spin`,-`sway`, `scroll`, `shape_key_sweep`). Use a call when its output fits the brief: name it, its-module and its dimensions in the owning zone description / environment / effects. An element the-library does not give in the form the brief wants (a carved stone, a fishing boat, a market stall,-a different kind of tree) is an asset built from scratch within the triangle budget below.-Interface: a `bpy` asset may compose a library call with its own parts (a shrine with a `tree(...)`-beside it) — name the call and its module (`tree`, `lib/vegetation.py`) in that asset's-description; a `blender_glb` hero cannot. Zone `contents` lists only actual asset names; library-effects a zone places itself belong in its prose, not in invented asset ids. Water and terrain+DESCRIBE, DO NOT PRESCRIBE — every mesh, material, lamp, world and motion is `bpy` / `bmesh` the+builders write, so describe each thing by what it IS — dimensions, parts,+materials with colours and how they vary (broad wear and fine grain), and the silhouette features a+person would name (a pine's whorled limbs carrying needle cards, a boulder's irregular facets) —+never by a call or a module. A thing repeated across zones (a tree species, a lamp post, a crate)+is an asset within the triangle budget below. Zone `contents` lists only actual+asset names; scenery a zone builds itself belongs in its prose, not in invented asset ids. Water and terrainshare ONE surface sampler (`height_at` from the environment) and every placed thing is seated onit or on what it stands on — the harness measures the gap. Geometry that exists only to continuethe world beyond the bounds is named with the `Sky` prefix (the census then keeps it out of thediff --git a/harness/codeverse3d/prompts/tracks/scene_asset_bpy.j2 b/harness/codeverse3d/prompts/tracks/scene_asset_bpy.j2index 3ca59349..370a6faf 100644--- a/harness/codeverse3d/prompts/tracks/scene_asset_bpy.j2+++ b/harness/codeverse3d/prompts/tracks/scene_asset_bpy.j2@@ -14,7 +14,7 @@ Scene: {{ spec_prompt }}- Description: {{ asset_description }}- Style of the whole scene: {{ style_notes or constraints }}-## Contract (raw bpy module; the harness builds it once and the zones instance it)+## Contract (a bpy module; the harness builds it once and the zones instance it){{ frame_doc }}{{ asset_contract }}- `{{ asset_file }}` must define `def build_{{ asset_file.rsplit('/', 1)[-1][:-3] }}(ctx, variant=0)` that links@@ -23,23 +23,23 @@ Scene: {{ spec_prompt }}(the check errors beyond 2.5 × or under 0.4 × on any axis; zones instance it at scale 1). Zone code places collection instances of `ctx.assets['{{ asset_file.rsplit('/', 1)[-1][:-3] }}']` bythat origin and never calls you.- Procedural mesh built in code (bmesh or `from_pydata`, any construction); every part carries a- Principled material with a real colour and roughness (`Base Color`, `Roughness`, `Metallic`;- `lib/materials.py` is one palette). Objects are uniquely named PascalCase: one root mesh, or- children parented under it at RELATIVE locations.+ Principled material with a real colour and roughness (`Base Color`, `Roughness`, `Metallic`), varied at+ more than one scale (broad tone and wear plus fine grain or bump) where the real material varies.+ Objects are uniquely named PascalCase: one root mesh, or children parented under it at RELATIVE+ locations. The module is self-contained: every part is `bpy` / `bmesh` / `mathutils` written in+ this file.+- A natural thing has an organic silhouette (judged): a tree is a trunk branching into limbs that carry+ leaf or needle cards, a rock an irregular asymmetric mass — never a cone, a ball on a stick or a cube+ standing in for one.- `variant` (0..n) and `ctx.rng(seed)` may vary details deterministically; `random.*` is a lint error.- At most 15000 triangles for the whole asset (it is instanced; the census counts them).- No lights, no cameras, no world, no file IO; the lint warns on `bpy.ops.mesh.primitive_*` in a loop;nothing outside the asset itself (no ground plane).- MOTION (only when the description names a moving part — a swinging lamp, a turning wheel): keyframe- that part's OWN rotation/location on `ctx.frame(0.0)` and `ctx.frame(1.5)` (LINEAR), or a simple- driver of `frame` (`frame * 0.2`); put the part's origin at its pivot. Amplitude must read at scene+ that part's OWN rotation/location on `ctx.frame(0.0)` and `ctx.frame(1.5)` (LINEAR, set on the slotted+ action's `layers[0].strips[0].channelbag(action.slots[0]).fcurves`), or a simple driver of `frame`+ (`frame * 0.2`); put the part's origin at its pivot. Amplitude must read at scenedistance (≥ 0.15 rad or ≥ 0.05 m registers in the frame difference).-{% if library_rows %}-- The sheet names shipped library calls — optional: `src/lib/` ships with the scene, so you may import- them (`from lib.vegetation import tree`) and compose what they build into `ctx.collection`; every- factory takes the collection, a name and a seed.-{{ library_rows }}-{% endif %}{% if skeleton_files is defined and skeleton_files %}## Current files (skeleton already in src/ — keep its structure, fill in every stub)diff --git a/harness/codeverse3d/prompts/tracks/scene_env_bpy.j2 b/harness/codeverse3d/prompts/tracks/scene_env_bpy.j2index 93c526d1..5ddbcb93 100644--- a/harness/codeverse3d/prompts/tracks/scene_env_bpy.j2+++ b/harness/codeverse3d/prompts/tracks/scene_env_bpy.j2@@ -10,25 +10,25 @@ Bounds (Z up, −Y front, metres — already converted from the plan): {{ bounds## This is a GLASS HOUSE — the enclosure is yoursThe place must read enclosed in glass from every authored camera and be lit by what comes through it(the frame gate's luminance band). Name the shell and lid meshes `RoomShell…` / `Ceiling…` so the-overview rig can lift the lid, and cut the plan's doors as openings. `room_shell(ctx.collection,-frame_mat, center=…, extents=…, thickness=0.2, openings=(…), glazed=True)` from `lib/architecture.py`-builds an iron-frame box with glass panes on the bounds' faces if that is the brief's shape; other-shapes are yours to build.+overview rig can lift the lid, and cut the plan's doors as openings. The frame, the panes (a thin+transmissive Principled material: `Transmission Weight` 1, low `Roughness`) and the house's shape+are yours to build here.{% elif interior %}## This is an INTERIOR — the enclosure is yoursAn interior must read enclosed from every authored camera (measured 2026-09-07 over six interior runswith no owner for walls and roof: every one was judged "not enclosed, a diorama on a flat plane",0.0–0.3) and be LIT INSIDE (the frame gate's luminance band; the sun is outside, so a closed roomwithout openings and lights reads black). Name the lid meshes `RoomShell…` / `Ceiling…` (the overview-rig lifts the lid by name); windows and doors are openings the zones glaze or frame.-`room_shell(ctx.collection, wall_mat, center=…, extents=…, thickness=0.2, openings=(…))` from-`lib/architecture.py` is the box option (an opening = face, centre along the wall / up from the floor,-size, metres); the room's shape and extent are the brief's.+rig lifts the lid by name); windows and doors are openings the zones glaze or frame. The room's+shape, its openings and its extent are the brief's, built here.{% endif %}## Contract{{ frame_doc }}{{ contract }}+The world, the lamps, the ground mesh, the atmosphere and every material are `bpy` / `bmesh` /+`mathutils` you write in this module. Helpers the zones should reuse (a material builder, a mesh-linking or seating function)+are module-level functions here; zones `from env import` them.### The harness assembles `{{ entry_file }}` and runs YOUR module like this — nothing else runs```python@@ -55,9 +55,9 @@ fails the lint. No cameras (the plan's), no `scene.render.*`, no frame changes.## What this module is graded on (the requirement, and how it is measured)1. **The ground reads as the brief's material**, not one flat untextured colour (judge `flat_ground`: no- blending, no wear, undressed seams). Paving, snow, sand, decking, mud, a tiled floor all count; a- height / slope / noise colour blend (`lib.terrain.ground` + `lib.materials.mineral_surface`) is one tool- among others.+ blending, no wear, undressed seams). Paving, snow, sand, decking, mud, a tiled floor all count, and the+ surface varies at more than one scale — broad tone, wear and slope / height bands over metres AND fine+ grain or bump over centimetres — in a node tree you wire on the ground's material.2. **The world does not end in view.** From no authored camera may the ground stop against the sky or abackdrop float (judge `world_edge_visible`; the frame census reports "terrain ends N m ahead"). Twogates measure it outdoors: `world_edge` (standing geometry must reach past 1.25 × the bounds'@@ -71,13 +71,18 @@ fails the lint. No cameras (the plan's), no `scene.render.*`, no frame changes.4. **Every authored frame lands in the exposure band** at the brief's time of day (`dark_frame`: meanluminance < 0.12 or > 35 % near-black, cap 0.55; blown frames likewise) and the light is not monochrome(judged). Cycles is physical. Starting values that have passed on a mid-albedo ground: a Sun of- 1–5 W/m² (a moon 0.05–0.3), a world (`lib.sky.sun_world`, or a deep colour for night) at strength- 0.1–0.6, fog density 0.003–0.008 (`lib.sky.haze`); a brief lit by fire, neon, storm or nothing sets- its own and reads `camera_checks.mean_lum`. Exposure is fixed at 0.+ 1–5 W/m² (a moon 0.05–0.3), a world (a Sky Texture with its sun disc off beside the Sun lamp, or a deep+ colour for night) at strength 0.1–0.6, fog density 0.003–0.008 (a volume-only box over the play area);+ a brief lit by fire, neon, storm or nothing sets its own and reads `camera_checks.mean_lum`. Exposure is+ fixed at 0.5. **Shadows read and shade carries colour** (judge `unlit_or_blown`, `lighting_atmosphere`: "flatshadows", "black shade"; the gate's `dark_frac`): a Sun `angle` of 1–3° with the sky world as fill is oneway; any fill lamp you add is yours to justify by the frame table.-6. No image textures, no file IO, no unseeded randomness (`ctx.rng(seed)`); the lint warns on `bpy.ops.mesh.primitive_*` in a loop.+6. **What continues the world reads as real** (judged): far trees are trunks branching into limbs that carry+ leaf or needle cards, far rocks and hills are irregular masses — never cones, balls on sticks or cubes+ standing in for them (`asset_quality_detail`), and never one shape stamped in a ring (`stamped_ring`,+ `monotonous_vegetation`).+7. No image textures, no file IO, no unseeded randomness (`ctx.rng(seed)`); the lint warns on `bpy.ops.mesh.primitive_*` in a loop.## DON'T- No assets or zones here (they come from other modules). No cameras. No `scene.*` render / view settings.@@ -95,16 +100,6 @@ world end anywhere in view, is the ground one flat colour, is the shade black?it prints: every authored camera must pass the exposure checks. `scene_probe` says whether the worldand the atmosphere were found.{% endif %}-{% if effects_catalog is defined and effects_catalog %}--{{ effects_catalog }}-{% endif %}-{% if lib_interface is defined and lib_interface %}--## What `src/lib/` exports (read from the files in this workspace)-{{ lib_interface }}-An import from `src/lib/` can bind only these names; a call passes only these parameters.-{% endif %}{% if env_check_error is defined and env_check_error %}## The previous single-shot of `{{ env_file }}` failed the harness's env checkdiff --git a/harness/codeverse3d/prompts/tracks/scene_refine_bpy.j2 b/harness/codeverse3d/prompts/tracks/scene_refine_bpy.j2index cf3f2c33..0e63f126 100644--- a/harness/codeverse3d/prompts/tracks/scene_refine_bpy.j2+++ b/harness/codeverse3d/prompts/tracks/scene_refine_bpy.j2@@ -48,8 +48,9 @@ Animation: {{ animation }}(`build_<asset>(ctx, variant=0)`).- A dropped zone / asset (`zone_error`, `asset_error`): fix the named line; never wrap the wholebuilder in try/except to hide it.-- Everything rests on `ctx.height_at(x, y)` or on its support (`lib.place.seat` or your own seating);- nothing floats, sinks or runs through a neighbour (`lib.place.clear_of`).+- Everything rests on `ctx.height_at(x, y)` or on its support (move the root by the smallest+ `ctx.height_at(x, y) - z` over its foot band: the world-space vertices within max(0.02 m, 5 % of its height) of its lowest); nothing floats, sinks or runs through a+ neighbour (compare world bounding boxes). Code zones share lives in `{{ env_file }}`.- No world or cameras outside `{{ env_file }}`, no file IO, no `random.*`, no Python drivers.## The recurring findings on this track — what each measures, and where the requirement is stated@@ -63,14 +64,14 @@ named view. The skills named below are in your session's skill list; the contra| a hard world edge against the sky, missing horizon | from no camera may the ground end against the sky (`world_edge_visible`; gates `world_edge` / `fog_short`); what continues the world is the brief's — street, sea, cliff, forest, wall, fog | contract § What else the gates measure; skill `c3d-scene-atmosphere` || the backdrop looks like flat / beige / untextured cut-outs | a distant backdrop needs volume and lighting consistent with the sky; aerial perspective is the fog's job, never a pre-tint (`placeholder_material`) | skill `c3d-scene-atmosphere` || a pond / terrace is a hard-edged plane sitting on the ground | water and terraces meet the ground without a visible seam: carving into `height_at` (`{{ env_file }}`) or dressing the seam (the zone) are options; water is named `…Water` | skill `c3d-scene-water`; skill `c3d-bpy-scene-placement` |-| `floating` / `sunken` / `interpenetration` / `unsupported` (the placement gate's metres) | `lib.place.seat` / `rest_on`, `clear_of` — or your own seating through the same foot columns; a rock may sit a third in, a crate may not | contract § Placement; skill `c3d-bpy-scene-placement` |+| `floating` / `sunken` / `interpenetration` / `unsupported` (the placement gate's metres) | move the root by the printed metres: its lowest evaluated vertices onto `ctx.height_at` or its support, boxes apart; a rock may sit a third in, a crate may not | contract § Placement; skill `c3d-bpy-scene-placement` || "camera is N m below ground level" / `camera_in_geometry` | the eye must be above the ground under it and ≥ 0.5 m from any surface: move the subject or the zone's placement; the landform is the brief's | contract § What else the gates measure |-| identical cones / stacked blocks / primitive repetition | identical copies and primitive stacks are what the judge reads (`monotonous_vegetation`); vary where the brief has natural variety, regular things stay regular | the zone brief § 2 |+| identical cones / stacked blocks / primitive repetition | identical copies and primitive stacks are what the judge reads (`monotonous_vegetation`); a tree branches into limbs carrying leaf or needle cards, a rock is irregular (`asset_quality_detail`); vary where the brief has natural variety, regular things stay regular | the zone brief § 2 || sparse, token, "a diorama on a plane", empty midground | the brief's stated counts are requirements (the census compares them); empty regions the brief would fill get what it implies (`undressed_scene`, `empty_midground`) | the zone brief § 1; skill `c3d-scene-composition` || flat / dark / monochrome light, black shade, `dark_frame` | measured per camera (`mean_lum` / `dark_frac` / `blown_frac`); the brief's time of day and light sources decide; the lighting skill lists starting values that have passed | skill `c3d-bpy-scene-lighting`; skill `c3d-scene-night` || frames at t=0 and t=1.5 identical, "nothing moves", `nothing_moves` | the frame difference is measured per camera: LINEAR keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` or `frame * k`; `python_driver` = a driver that needs Python, rewrite it | contract § Motion; skill `c3d-scene-motion` |-| `hard_edged_particles`, "sharp-edged quads / spheres / discs for steam, dust, sparks", the brief's "soft particle effect" must-item unverified | the finding measures sharp-edged particle geometry: in Cycles only a volume renders edgeless (`lib.materials.volume` on a `Batch` is one way), one root tagged free, moving ≥ 0.6 m | contract § What the renderer does |-| "plastic", "one grey material", `placeholder_material` | flags a surface with no authored colour / roughness; every surface needs a material that matches what it is (the lib palette is one source) | skill `c3d-bpy-scene-materials` |+| `hard_edged_particles`, "sharp-edged quads / spheres / discs for steam, dust, sparks", the brief's "soft particle effect" must-item unverified | the finding measures sharp-edged particle geometry: in Cycles only a volume renders edgeless (a `ShaderNodeVolumePrincipled` into the Material Output's `Volume`, no surface shader), one root tagged free, moving ≥ 0.6 m | contract § What the renderer does |+| "plastic", "one grey material", `placeholder_material` | flags a surface with no authored colour / roughness; every surface needs a material that matches what it is, varied at more than one scale (broad tone and wear plus fine grain or bump) | skill `c3d-bpy-scene-materials` || `zone_error` / `asset_error` (a dropped module) | the named `file:line` — fix the raise; Blender 5.2 facts (no `use_nodes`, `Factor` not `Fac`, `ShaderNodeMix`, `Action.fcurves` is gone, GN inputs via `mod.properties.inputs`) | contract § Blender 5.2 API facts |{% if current_files %}diff --git a/harness/codeverse3d/prompts/tracks/scene_zone_bpy.j2 b/harness/codeverse3d/prompts/tracks/scene_zone_bpy.j2index 8eab96de..c3335c31 100644--- a/harness/codeverse3d/prompts/tracks/scene_zone_bpy.j2+++ b/harness/codeverse3d/prompts/tracks/scene_zone_bpy.j2@@ -35,10 +35,10 @@ choice):## Assets available (sizes are measured, metres){{ asset_api }}-Place one with `instance(ctx.collection, ctx.assets['<snake>'], unique_name('Name', i), x, y,-height_at=ctx.height_at, rot_z=…)` from `lib/scatter.py` + `lib/place.py` (a collection-instance-Empty seated on the ground = ONE placement row), or scatter many with `scatter(...)`, or build your-own collection-instance Empties. Shared materials and the terrain come from the environment:+Place one as a collection-instance Empty — `bpy.data.objects.new(name, None)` with `instance_type =+'COLLECTION'` and `instance_collection = ctx.assets['<snake>']`, linked into `ctx.collection` and seated+on the ground (= ONE placement row); many copies are many Empties. Shared materials and the terrain+come from the environment:`ctx.env[...]` (the keys `build_env` returned), `ctx.height_at`; zones may also `from env import …`whatever `env.py` defines at module level. A hero GLB is already imported for you as`ctx.assets['<snake>']` — instance it, never import a file. There is no `ctx.rand` and no@@ -56,24 +56,28 @@ out = zones.<snake>.build(ctx) # the function MUST be```So `{{ zone_file }}` defines `def build(ctx) -> bpy.types.Collection` that links everything into`ctx.collection` and returns it. `build_{{ zone_name }}`, `main` and `register` are never called.-Animation is DATA: keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` and simple drivers of `frame`-(`lib/motion.py`); there is no per-frame hook.+Animation is DATA: keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` (their f-curves on the slotted+action: `action.layers[0].strips[0].channelbag(action.slots[0]).fcurves`) and simple drivers of+`frame`; there is no per-frame hook.## What this zone is graded on (the requirement, and how it is measured)1. **What the description names is here.** Counts the plan states are compared with the placementcensus (`missing_planned_element`, `empty_zone`), and a place that reads as sparse for what the briefdescribes is judged `undressed_scene`. Place props where the setting puts them; regular arrangements- only where the brief implies them. `lib.scatter` offers `scatter`, `along_path`, `poisson`, `grid`- if you want them.+ only where the brief implies them; scatter positions are yours to compute, seeded with `ctx.rng(seed)`.2. **Repeated natural elements read as individuals** from the cameras (judge `monotonous_vegetation`:- one shape stamped many times, in a ring or a grid). The lib's `tree` kinds, `shrub`, `fern`,- `boulder` seeds, `materials.tint` and per-instance rotation / scale are one way; regular things (a- colonnade, a row of bollards) stay regular.+ one shape stamped many times, in a ring or a grid). Source variants that differ in silhouette and hue+ (`build_<snake>(ctx, variant=k)`), per-instance rotation / scale and an Object Info `Random`-driven tint+ are ways; regular things (a colonnade, a row of bollards) stay regular. A tree is a trunk branching+ into limbs that carry leaf or needle cards, a rock an irregular asymmetric mass — never a cone, a ball+ on a stick or a cube standing in for one (`asset_quality_detail`).3. **Seated, and clear of each other — measured.** Every placed root object rests on the surface it- stands on (`lib.place.seat` / `rest_on`, or your own seating — the gate samples the foot columns):+ stands on (the gate samples up to 5 foot columns in its foot band — the evaluated vertices within+ max(0.02 m, 5 % of its height) of its lowest one: move the root by the smallest `ctx.height_at(x, y) - z`+ over that band's world-space vertices, or onto its support's top):a foot 0.05 m up is `floating` (ERROR at 0.08 m), 0.10 m under is `sunken` (ERROR at 0.20 m), two- boxes sharing > 10 % of the smaller one are `interpenetration` (ERROR at 35 %). Run- `lib.place.clear_of(objs)` over your roots AND the neighbours' placed things before you finish.+ boxes sharing > 10 % of the smaller one are `interpenetration` (ERROR at 35 %). Compare the world+ bounding boxes of your roots AND the neighbours' placed things pair by pair before you finish.`obj["placement"] = "free"` only for things that hang in the air; the share of tagged things isreported. A built thing on soil must not read as pasted on (judge `flat_ground`: undressed seams):a few centimetres of sink (the gate allows up to 0.10 m) or dressing along the seam are options; a@@ -81,8 +85,8 @@ Animation is DATA: keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` and simple dcameras — carving in `height_at` (the env's) or a built edge both work.4. **The cameras stay clear.** No authored camera may be inside or blocked by what this zone builds(`scene_views` camera_checks: nothing within 0.5 m of a lens, `camera_in_geometry`; 6 of 9 sight- rays within 1.5 m, `camera_blocked` — each an ERROR capped at 0.50). `lib.place.clear_mask` / a- poisson `mask` keeps scatter out of any region you choose. Framing is yours.+ rays within 1.5 m, `camera_blocked` — each an ERROR capped at 0.50): keep scatter points out of a+ radius around every lens. Framing is yours.5. **Motion that shows.** The harness DIFFERENCES the t=0 and t=1.5 frames per camera and reports thenumber: a camera moves when ≥ 0.4 % of its pixels change by more than 8/255 (or ≥ 0.08 % by morethan 60/255); no authored camera moving is `no_motion` (ERROR), the judge's `nothing_moves`.@@ -91,14 +95,17 @@ Animation is DATA: keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` and simple dleaf / boat ≥ 0.6 m per 1.5 s).6. **One root = one thing; names unique.** `check_placement` measures each root object in`ctx.collection` as one placed thing: a multi-part prop has one root (a mesh, a parent Empty, a- collection instance) and every root a unique name (`unique_name(base, i)`). Stay inside the triangle- budget `scene_probe` reports; collection instances and geometry-nodes clouds- (`lib.vegetation.grass_patch`, `lib.scatter.gn_scatter`) are the cheap ways to repeat, and the lint- warns on `bpy.ops.mesh.primitive_*` inside a loop.-7. **A soft particle has no silhouette.** In Cycles only a volume renders without an edge- (`lib.materials.volume`); a translucent surface puff, metaball, torus or disc is graded- `hard_edged_particles` and fails the brief's must-item. It is one root tagged free, and it moves- ≥ 0.6 m between the two frames.+ collection instance) and every root a unique name (`f"{base}_{i}"`). Stay inside the triangle+ budget `scene_probe` reports; collection instances and geometry-nodes clouds (an Instance on Points+ tree over a patch) are the cheap ways to repeat, and the lint warns on `bpy.ops.mesh.primitive_*`+ inside a loop.+7. **A soft particle has no silhouette.** In Cycles only a volume renders without an edge (a+ volume-only material: `ShaderNodeVolumePrincipled` into the Material Output's `Volume`, no surface+ shader); a translucent surface puff, metaball, torus or disc is graded `hard_edged_particles` and+ fails the brief's must-item. It is one root tagged free, and it moves ≥ 0.6 m between the two frames.+8. **Surfaces read as their material** (judged `placeholder_material`): every large surface varies at+ more than one scale — broad tone and wear over metres AND fine grain or bump over centimetres — in a+ node tree you wire; one constant colour per surface reads as a placeholder.## DON'T- No world, no sun, no cameras, no ground here (the env's; the lint rejects a world in a zone); the local@@ -115,10 +122,6 @@ deliberately airborne thing gets `obj["placement"] = "free"`) → fix → `build`scene_views` and LOOK at the frames against the brief, and read the MEASURED MOTION line it prints —STATIC means this zone's motion is below the threshold.{% endif %}-{% if effects_catalog is defined and effects_catalog %}--{{ effects_catalog }}-{% endif %}## Output{{ output_format }}diff --git a/harness/codeverse3d/prompts/variants.py b/harness/codeverse3d/prompts/variants.pyindex b2838037..3ce570bd 100644--- a/harness/codeverse3d/prompts/variants.py+++ b/harness/codeverse3d/prompts/variants.py@@ -44,16 +44,10 @@ log = logging.getLogger(__name__)VARIANTS_DIR: Path = Path(__file__).resolve().parent / "variants"#: the one file every variant must ship (its name, version, generators and knobs)VARIANT_FILE = "variant.toml"-#: ``[knobs]`` may set ONLY these ``Settings`` fields — the skills dials a variant tunes, and-#: ``scene_lib`` (D113: the scene_blender library off = raw mode). Applied like a profile-#: (``Settings.apply_profile``): a field the user stated themselves wins.-KNOB_FIELDS: frozenset[str] = frozenset({"skills_max", "skills_only", "scene_lib"})-_KNOB_TYPES: dict[str, type] = {"skills_max": int, "skills_only": str, "scene_lib": bool}-#: knobs decided PER RUN by :func:`run_knob` from the active variant (the ``ContextVar``), never written-#: onto a shared ``Settings`` by :func:`knobs_applied`: ``scene_lib`` changes which files ship and what-#: the lint passes, and the bench runs ``--parallel N`` runs as threads of one process sharing the-#: singleton — a write there flipped a sibling run between raw and library mode mid-run (D113 review)-RUN_KNOBS: frozenset[str] = frozenset({"scene_lib"})+#: ``[knobs]`` may set ONLY these ``Settings`` fields — the skills dials a variant tunes. Applied like a+#: profile (``Settings.apply_profile``): a field the user stated themselves wins.+KNOB_FIELDS: frozenset[str] = frozenset({"skills_max", "skills_only"})+_KNOB_TYPES: dict[str, type] = {"skills_max": int, "skills_only": str}#: files under an overlay that are documentation, never material a model sees: left out of the hashHASH_EXCLUDED: frozenset[str] = frozenset({"README.md"})@@ -247,26 +241,7 @@ def variant_block(name: str) -> dict[str, Any]:# --------------------------------------------------------------------------- knobs-def run_knob(field_name: str, settings: Settings | None = None) -> Any:- """A :data:`RUN_KNOBS` field's value for the code running NOW: the user's statement on ``settings``- (default the process's) wins; inside a run (:func:`activate` set the ``ContextVar``, per thread and- copied into fan-out) the active variant's ``[knobs]`` value, else the field's default — never the- shared attribute, which another thread's run may hold; outside any run, ``settings`` as it stands- (a tool-server process that applied its run's knobs, ``spatial.mcp_server.apply_run_knobs``)."""- if field_name not in RUN_KNOBS:- raise ValueError(f"{field_name!r} is not a per-run knob (RUN_KNOBS: {sorted(RUN_KNOBS)})")- s = settings if settings is not None else get_settings()- name = _ACTIVE.get()- if field_name in s.model_fields_set or name is None:- return getattr(s, field_name)- if name:- knobs = variant_info(name).knobs- if field_name in knobs:- return knobs[field_name]- return Settings.model_fields[field_name].default---def apply_variant_knobs(settings: Settings, info: VariantInfo, *, fields: frozenset[str] = KNOB_FIELDS) -> dict[str, Any]:+def apply_variant_knobs(settings: Settings, info: VariantInfo) -> dict[str, Any]:"""Set ``info.knobs`` (those in ``fields``) on ``settings`` as DEFAULTS, the way a profile is applied:a field the user stated (config file / ``C3D_*`` / an explicit constructor kwarg — ``model_fields_set``)is never touched, and the field-set is restored afterwards so a knob is not later mistaken for a@@ -274,7 +249,7 @@ def apply_variant_knobs(settings: Settings, info: VariantInfo, *, fields: frozenstated = set(settings.model_fields_set)applied: dict[str, Any] = {}for field_name, value in info.knobs.items():- if field_name not in fields or field_name in stated:+ if field_name in stated:continuesetattr(settings, field_name, value)applied[field_name] = value@@ -293,23 +268,18 @@ def knobs_applied(settings: Settings, info: VariantInfo | None) -> Iterator[dictcalling ``track.run`` twice), and since ``apply_variant_knobs`` keeps the field-set, the leakedvalue was indistinguishable from the default. On exit — whatever the block raised — every knobfield goes back to its prior value and its prior field-set membership; a statement the block made- to any OTHER field is kept. A :data:`RUN_KNOBS` field is never written (:func:`run_knob` reads it from- the active variant) but is yielded when it applies. Yields what was set, for the ``variant.active`` event."""- written = KNOB_FIELDS - RUN_KNOBS- prior = {field_name: getattr(settings, field_name) for field_name in written}- stated = set(settings.model_fields_set) & written- applied = apply_variant_knobs(settings, info, fields=written) if info is not None else {}- applied |= {k: v for k, v in (info.knobs.items() if info is not None else ())- if k in RUN_KNOBS and k not in settings.model_fields_set}+ to any OTHER field is kept. Yields what was set, for the ``variant.active`` event."""+ prior = {field_name: getattr(settings, field_name) for field_name in KNOB_FIELDS}+ stated = set(settings.model_fields_set) & KNOB_FIELDS+ applied = apply_variant_knobs(settings, info) if info is not None else {}try:yield appliedfinally:for field_name, value in prior.items():setattr(settings, field_name, value) # pydantic marks each as set: undone next line- settings.__pydantic_fields_set__ = (set(settings.model_fields_set) - written) | stated+ settings.__pydantic_fields_set__ = (set(settings.model_fields_set) - KNOB_FIELDS) | stated-__all__ = ["HASH_EXCLUDED", "KNOB_FIELDS", "RUN_KNOBS", "VARIANTS_DIR", "VARIANT_FILE", "VariantInfo", "activate",- "active_variant", "apply_variant_knobs", "knobs_applied", "list_variants", "resolve_variant", "run_knob",- "served_id",+__all__ = ["HASH_EXCLUDED", "KNOB_FIELDS", "VARIANTS_DIR", "VARIANT_FILE", "VariantInfo", "activate",+ "active_variant", "apply_variant_knobs", "knobs_applied", "list_variants", "resolve_variant", "served_id","variant_block", "variant_hash", "variant_info", "variant_root"]diff --git a/harness/codeverse3d/prompts/variants/argon_raw/README.md b/harness/codeverse3d/prompts/variants/argon_raw/README.mddeleted file mode 100644index d41c9747..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/README.md+++ /dev/null@@ -1,27 +0,0 @@-# argon_raw — scene_blender in raw mode for gemini-4-argon--This directory is a **variant** (D105) for the owner's game-world demo of 2026-10-17 (D113):-ALL scene modeling code is written by `agy:gemini-4-argon`. It is an overlay on-`codeverse3d/prompts/`: a file placed here shadows the base file of the same relative path for-every run that activates the variant, and a file that is not here is read from the base.--What it changes:--* `variant.toml` `[knobs] scene_lib = false` — **raw mode**: the scene_blender skeleton writes no- `src/lib/`, its stubs import nothing of it, a `lib` import is a lint ERROR, and no prompt- carries the library's interface or catalog rows. A user-stated `C3D_SCENE_LIB` still wins.-* `scene_blender/system.md`, `contract.md`, `asset.md`, `effects_catalog.md` and the bpy stage- templates (`tracks/scene_{env,zone,asset,refine}_bpy.j2`) and planner (`tracks/plan_scene_bpy.j2`)- — copies of the base files with every library reference replaced by what the gate measures- and what the author must do in raw bpy / bmesh, plus the realism requirements (multi-scale- procedural surfaces, organic silhouettes, a world that continues past the content).-* `system/harness_contract.md` — the base contract minus its line that every scene language- ships a library.-* The skills half lives in `codeverse3d/skills/variants/argon_raw/` (lib-free copies of the three- `c3d-bpy-scene-*` bundles; `routes.toml` with no rows).-* `variant_hash("argon_raw")` (`codeverse3d/prompts/variants.py`) covers both halves, this README- excluded; the run record names the variant, its version and that hash.--How a run picks it: `3dcode make "..." --track scene --language scene_blender --variant argon_raw`,-or `C3D_VARIANT=argon_raw`. Never a pattern over the model id (Law 4). It is meant for-scene_blender only: a scene_threejs run under it reads the base three.js prompts and its library.diff --git a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/asset.md b/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/asset.mddeleted file mode 100644index 6ba218a5..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/asset.md+++ /dev/null@@ -1,23 +0,0 @@-You write ONE self-contained Blender bpy asset module for a larger scene — a factory-`build_<snake>(ctx, variant=0)` that builds every part of the prop into `ctx.collection` (a-Collection the harness created for it, active, and the value it returns) at the origin, base-on z = 0, front facing −Y, metres. Raw bpy / bmesh / mathutils only: no file IO, no image-loading, no lights, no cameras, no world; the lint warns on `bpy.ops.mesh.primitive_*` in a-loop. Imports: `bpy`, `bmesh`, `mathutils`, `math` — no harness library ships in this scene, so-every part, material and motion of the prop is code you write here.--The module is built once by the harness in an isolated Blender process (a raise is reported-with its line and the asset is NOT AVAILABLE to the zones), then placed by the zones as-collection instances of `ctx.assets['<snake>']` — so the task sheet's exact function name, size-and `variant` contract outrank everything else: zone code places your Collection sight unseen-by its origin, and a wrong name or an off-origin footprint fails every placement, not just-this file. It is judged as a prop at scene distance: it must be recognisable as what the-sheet names (its silhouette and the features a person would name), and a single flat grey-material is graded `placeholder_material` — every surface carries a Principled material-(`Base Color`, `Roughness`, `Metallic`) that matches what it is, varied at more than one scale-(broad tone and wear plus fine grain or bump) where the real material varies. A natural thing-has an organic silhouette: a tree branches into limbs carrying leaf or needle cards, a rock is-irregular — never a primitive standing in for it. Keep it under the triangle-budget the sheet states and give every part a unique PascalCase name.--Write the one file completely and stop. No commentary, no extra files.diff --git a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/contract.md b/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/contract.mddeleted file mode 100644index 52e20fa5..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/contract.md+++ /dev/null@@ -1,270 +0,0 @@-# Scene (multi-file Blender bpy) authoring contract — track `scene`, language `scene_blender`--## Files (Blender 5.2 LTS python; Z up, −Y front, metres)-```-src/scene.py ASSEMBLED BY THE HARNESS — data only (ZONES / ASSETS / HEROES / CAMERAS); never edit it-src/env.py def height_at(x, y) -> z def build_env(ctx) -> dict (world, light, ground, atmosphere; the enclosure of an interior)-src/zones/<snake>.py def build(ctx) -> bpy.types.Collection (everything linked into ctx.collection, the zone's own Collection)-src/assets/<snake>.py def build_<snake>(ctx, variant=0) -> bpy.types.Collection (built ONCE at the origin, base on z = 0, front facing −Y)-public/assets/<snake>.glb heroes the harness built as objects — imported for you into ctx.assets['<snake>']-```-No harness library ships in this workspace: every mesh, material, light, world and motion is the-raw bpy / bmesh / mathutils you write (an import of `lib` is a lint ERROR: there is no such-package). Code several zones share lives in `src/env.py` (`from env import …`); an asset module-is self-contained — it is built and checked on its own.--The harness builds the scene in ONE Blender 5.2 process (`--factory-startup`, an emptied scene,-metric units, fps=30, the frame range 1..46, every random source seeded) in this order, each-builder in its own try/except: `env.build_env(ctx)`; every hero GLB imported; every-`assets.<snake>.build_<snake>(ctx)`; every `zones.<snake>.build(ctx)`. A builder that raises-is DROPPED with its `file:line` and everything it created is removed — the rest of the scene-still builds and is measured, so one bad zone costs that zone, not the round. A module that-raises on import (a bad top-level statement) is gone the same way; `build_<zone>(ctx)`,-`create()`, `main()` and `register()` are never called. Link every object into-`ctx.collection`: an object linked into `ctx.scene.collection` belongs to no zone and is-graded as the harness's. Then the harness adds the plan's cameras, hides the asset sources-(they render only through their collection instances), writes the census and the `.blend`, and-renders every camera at t = 0 and t = 1.5 s (frames 1 and 46) with Cycles (32 samples +-OpenImageDenoise, AgX view transform, exposure 0). Render settings, colour management,-cameras, the frame clock and file IO are the harness's: the lint rejects code that touches them.--## The `ctx` every builder receives (data, never verbs)-| field | what it is |-| --- | --- |-| `ctx.scene` | the bpy Scene (read it; its render settings are harness-owned) |-| `ctx.collection` | the Collection THIS builder links into — a zone's own (named after the zone, active, so `bpy.ops` primitives land in it), an asset's own, the scene root for `build_env` |-| `ctx.height_at(x, y)` | the ground: `env.height_at` once the env built, else flat 0. Seat every placed thing on it or on the surface it stands on |-| `ctx.env` | the dict `build_env` returned (shared materials, the water level, the sun direction…); `{}` before the env builds |-| `ctx.assets` | `{snake: Collection}` — every procedural asset the harness built and every hero it imported, at the origin, base on z = 0 |-| `ctx.rng(seed)` | `random.Random(seed)` — THE randomness a scene may use (`random.*` and unseeded numpy are lint ERRORS) |-| `ctx.fps`, `ctx.times` | 30 and (0.0, 1.5): the frame clock |-| `ctx.frame(t)` | `1 + round(t * fps)`: the frame that shows animation time t — keyframe on `ctx.frame(0.0)` and `ctx.frame(1.5)` |--## Frame and units-Z is UP, −Y is the FRONT, +X is the right; metres; the ground is `height_at(x, y)` around-z = 0. The PLAN you are handed was written in the Y-up GLB frame (the three.js convention) —-every number the harness prints in your brief (bounds, zone bboxes, camera positions,-layouts) is already converted to this frame; the plan's prose is not: where it says-"y = 1.2 m up" read z = 1.2, and where it says "+z towards the camera" read −y. Sizes are-width × depth × height here (the plan's width × height × depth, reordered).--## Allowed imports-`bpy`, `bmesh`, `mathutils` (Vector, Matrix, Euler, noise), `math`, `numpy` (only through-`numpy.random.default_rng(seed)` for randomness), `itertools`, `functools`, `collections`,-`dataclasses`, `colorsys`, and the workspace's own package `env`: `from env import …` (zones may-read whatever `env` defines at module level). Nothing else resolves in the build.--## FORBIDDEN (the lint's policy table; each is an ERROR that fails the build gate)-`bpy.ops.render.*`, `bpy.ops.wm.*` (open/save/append/link), `bpy.ops.export_*`,-`bpy.ops.import_*` (a hero is already imported), `bpy.ops.image.save`, `bpy.data.libraries`,-`bpy.data.cameras.new` / `bpy.ops.object.camera_add` (cameras are the plan's), any-`scene.render.*` / `scene.cycles.*` / `scene.eevee.*` / `scene.view_settings.*` /-`scene.display_settings.*` / `scene.camera` / `scene.frame_*` assignment, `frame_set`,-`bpy.app.handlers`, `bpy.app.timers`, a driver whose expression needs Python-(`driver.use_self`, attribute access, `**`, `%`, `noise.*` in an expression), the world-outside `src/env.py` (`bpy.data.worlds.new`, `scene.world =`), `random.*` and unseeded numpy,-`open()`, `os` / `sys` / `pathlib` / `time` / `datetime` / `subprocess` / `shutil` / `tempfile`-/ `glob` / `io`. The lint WARNS on `bpy.ops.mesh.primitive_*` inside a loop (every operator-call rebuilds the scene state) and on `bpy.ops.view3d.*` / `bpy.ops.screen.*` (no viewport in-background mode).--## Blender 5.2 API facts (each is a build error or a silent zero)-Removed: `use_nodes` (deprecated — materials, worlds and lights always have a node tree; a new-material already carries `Principled BSDF` and `Material Output`), `sky_type = 'NISHITA'` (it is-`'MULTIPLE_SCATTERING'`, with `aerosol_density`), the boolean solver `'FAST'` (`FLOAT` / `EXACT` /-`MANIFOLD`), `mod["Socket_2"] = v` for geometry-nodes inputs (`getattr(mod.properties.inputs,-"Socket_2").value = v`), `Action.fcurves` (actions are slotted:-`action.layers[0].strips[0].channelbag(action.slots[0]).fcurves`),-`Mesh.calc_normals()` and `use_auto_smooth` (`me.shade_smooth()` or `f.smooth = True` per face),-the Principled inputs `Specular` / `Subsurface` / `Transmission` / `Emission` (now `Specular IOR-Level`, `Subsurface Weight`, `Transmission Weight`, `Coat Weight`, `Sheen Weight`, `Emission Color`-+ `Emission Strength`), `ShaderNodeMixRGB` (it is `ShaderNodeMix` with `data_type = 'RGBA'`:-inputs 6 / 7 are the colours, output 2 the result; the mix input is `Factor`, not `Fac`).-Background mode: `bpy.context.object` / `selected_objects` are empty after `bpy.data.objects.new`-— keep your own references. `bm.verts[i]` raises before `ensure_lookup_table()` after any-topology change. A fresh object's `matrix_world` is identity until the view layer updates-(compose `parent.matrix_world @ child.matrix_basis` yourself, or call `bpy.context.view_layer.update()`-before reading it; parent with a RELATIVE `location`). Geometry nodes: a new `GeometryNodeTree`-has no `inputs` / `outputs` and no nodes — its sockets are `ng.interface.new_socket(name,-in_out='INPUT' | 'OUTPUT', socket_type='NodeSocketGeometry')`, and the `NodeGroupInput` /-`NodeGroupOutput` nodes are yours to add and link; `obj.modifiers.new(name, 'NODES').node_group = ng`.--## What the renderer does with what you build-Cycles at 32 samples + OpenImageDenoise, AgX, exposure 0, 1024 × 576; no post chain and no-bloom: an emissive surface at strength 3–8 reads as a lamp, 20+ whites the frame out-(`blown_frac`), and a lamp beside it is what lights the wall. A SURFACE shader always has a-silhouette: in Cycles a soft particle (steam, smoke, dust, spray) renders without an edge only-as a VOLUME — a material whose only linked output is the Material Output's `Volume`, fed by a-`ShaderNodeVolumePrincipled`; a translucent puff, metaball, torus or disc is graded-`hard_edged_particles`. The census is the evaluated depsgraph: modifiers, geometry-nodes and instances count as they render; a volume-only mesh is fog, never a placed thing.-Triangle budgets: 15,000 per asset, 40,000 per hero, 3,000,000 unique for the scene (an-instance cloud counts its instances rendered, its source once).--## Motion-Animation is DATA in the `.blend`: `obj.keyframe_insert(data_path, frame=ctx.frame(t))` for the-two times in `ctx.times` (a location, a rotation, a shape-key value, a node input), or a SIMPLE-driver of `frame` (`fc = obj.driver_add("rotation_euler", 2)`, `fc.driver.expression = "frame * 0.1"`-— sin / cos / min / max / clamp / lerp, `+ - * /`, comparisons; nothing that needs Python, which a-`--factory-startup` build silently evaluates to 0). Keys live on the slotted action:-`a = obj.animation_data.action`, then `a.layers[0].strips[0].channelbag(a.slots[0]).fcurves`; set-each `keyframe_points[].interpolation = 'LINEAR'` for motion that should read at t = 1.5 as a-travel, not an ease. The harness differences the two frames per camera-and reports the number (a camera moves at ≥ 0.4 % of its pixels changed by > 8/255; none moving-is the `no_motion` ERROR, the judge's `nothing_moves`). Amplitudes that have registered-at 1024 × 576: ≥ 0.10 rad of rotation, ≥ 0.05 m of travel per 1.5 s, a particle / leaf / boat-≥ 0.6 m. A hero GLB's own keyframed clip plays in every instance by itself.--## Naming-PascalCase object names, globally unique — a Blender object name is global, so a second-`Lantern_0` becomes `Lantern_0.001` and the placement table then reports a prop nobody-planned: number every placed copy `f"{base}_{i}"` (`Lantern_0`, `Lantern_1`…) and never reuse a-base another zone uses. The census classifies by name: a-ground / terrain mesh is `Ground…` / `Terrain…`, water `Water…`, and anything meant as distant-backdrop (if the brief's place has one) `Sky…` — a sky-named mesh wider than 50 m is filed as-backdrop, not content, so the overview cameras frame the content; an interior's shell is-`RoomShell…` / `Ceiling…` (the overview rig lifts the lid by name).--## Placement (the scene_placement gate, run on every build)-Every root object you link into a zone (a mesh, a parent Empty with children, a-collection-instance Empty) is ONE placement row. From its lowest evaluated vertices the gate-looks down for the nearest surface and up for one passing through it: a gap under the foot-larger than 0.05 m outdoors / 0.02 m indoors is `floating` (an ERROR at 0.08 m, or when more-than 2 things float); a foot buried deeper than 0.10 m is `sunken` (an ERROR at 0.20 m and a-fifth of the thing's height — rocks, posts and bushes may sit partly in; stairs and ramps may-follow the slope; a foot at or under water is fine); a bbox touching nothing is `unsupported`;-two boxes sharing more than 10% of the smaller one's volume is `interpenetration` (an ERROR at 35%).-The feet are the gate's foot band: the root's evaluated vertices within max(0.02 m, 5 % of its-height) of its lowest one, sampled as up to 5 columns (the lowest vertex and the band's ±x / ±y-extremes). Seating is yours to compute: take the root's world-space vertices (its own, its-children's, and for a collection-instance Empty the source collection's through the Empty's-matrix), keep that band, and move the root by the smallest `ctx.height_at(x, y) - z` over it —-the lowest-hanging foot then touches and none floats. The pair check is yours too: keep any two-roots' world bounding boxes from sharing more than 10% of the smaller one. A thing resting on one corner with the others in-the air (four or more foot columns, at most one touching, the worst gap > 0.05 m) is-`cantilevered` (a WARN). `obj["placement"] = "free"` exempts a thing MEANT-to hang in the air (a bird, a lantern on a chain, a kite) — nothing else: the gate reports the-share of placed things tagged free and warns past 25%, errors past 50%. Geometry-nodes instance-clouds (an Instance on Points tree over a ground patch) are counted as instances and exempt per-asset. A PLANNED content is also measured against the plan bounds-(`out_of_bounds`, a WARN: entirely outside them by more than max(5 m, 10 % of the span); scenery that-continues the place past the bounds is never reported) and an asset placed-at a size other than the plan's (beyond 2.5 × is a WARN, 4 × an ERROR).--## What else the gates measure-`scene_frames`: every authored camera's frame at both times — `dark_frame` (mean luminance-< 0.12 or > 35 % near-black, cap 0.55), `blown_frame` (> 20 % near-white), `flat_frame` (> 85 %-of the pixels in one luminance band; ERROR above 92 %), mostly sky / ground (an establishing-camera needs ≥ 20 % of its frame to be content, every other authored camera ≥ 10 %:-`content_small`), the camera inside geometry or within 0.5 m of a surface-(`camera_in_geometry`), 6 or more of its 9 sight rays ending within 1.5 m (`camera_blocked`), or-below the ground under it (`camera_underground`) — the camera findings cap the score at 0.50; an-eye less than 0.3 m above the ground is a `camera_low` WARN, more than 80 m above it-`camera_high`. `frame_motion`: the two frames are differenced per camera — a camera MOVES when-≥ 0.4 % of its pixels change by more than 8/255 (or ≥ 0.08 % by more than 60/255); no authored-camera moving is `no_motion` (ERROR), and the judge's `nothing_moves` follows it. A hero GLB-covering < 0.5 % of the frame in every authored camera is `hero_unseen` (ERROR; < 2 % in the-camera named for it, a WARN). `scene_probe` (from the census GLB and the bpy facts): unique-triangles over the scene ceiling (3,000,000), a Python driver or an app handler, no world / no-atmosphere (`no_fog`: neither a world Volume nor a bounded fog volume — mist is not read),-render settings touched. Outdoors, `fog_short` warns when 1 / density < span / 1.5 (the census-reads the volume's density: a density above 1.5 / span dissolves the world inside two thirds of-the plan span) and `world_edge` warns when no standing geometry reaches past 1.25 × the bounds'-half-extent — the world continues past the content in whatever form the brief's place has. A-hero that would not import is a WARN on its file; a zone / asset / env that raised is an ERROR on-its line.--## Interiors-A plan with `interior: true`: the enclosure (floor, walls, lid) is `src/env.py`'s, with the lid-meshes named `RoomShell…` / `Ceiling…`; it must read enclosed from every authored camera and be-lit inside (the frame gate); the floating threshold indoors is 0.02 m. The room's shape, its-openings and its extent are the brief's, built in `build_env`. Zones dress the inside;-a partition, counter or alcove a zone needs is the zone's, seated and clear of the shell.--## Realism (judged; the gates above measure the rest)-Surfaces are photoreal: every large surface varies at more than one scale — broad tone and wear-over metres AND fine grain or bump over centimetres — in a node tree you wire (Noise / Voronoi /-Wave textures through Mix and Bump nodes); one constant colour per surface is-`placeholder_material` / `flat_ground`. Natural things have organic silhouettes: a tree is a-trunk branching into limbs that carry leaf or needle cards, a rock an irregular asymmetric mass —-never a cone, a ball on a stick or a cube standing in for one (`asset_quality_detail`); one-shape stamped many times is `monotonous_vegetation`. The world-continues past the content in every authored frame (`world_edge`, `fog_short`; judged-`world_edge_visible`).--## Two modules the harness builds as-is (the interface shown once; the content is a harbour, yours is the brief's)-`src/env.py`-```python-"""src/env.py — the environment of `Harbour at dusk`: world, sun, ground, atmosphere."""-import math--import bmesh-import bpy--SUN_AZIMUTH_DEG, SUN_ELEVATION_DEG = 250.0, 8.0 # the plan's light (compass 0 = +X, 90 = +Y); zones may `from env import` these-WORLD_M = 320.0 # how far this place's land and air reach (plan span 100 m): the brief's number---def height_at(x, y): # THE ground: any function of (x, y) the brief's landform needs — here level quay land, a basin east, ground rising inland- return -2.0 * min(1.0, x / 25.0) if x >= 0.0 else 0.04 * max(0.0, -45.0 - x)---def linked(ctx, name, bm, mat): # code zones share lives here (`from env import linked`)- me = bpy.data.meshes.new(name)- bm.to_mesh(me)- bm.free()- me.materials.append(mat)- ctx.collection.objects.link(ob := bpy.data.objects.new(name, me))- return ob---def build_env(ctx):- ctx.scene.world = bpy.data.worlds.new("Dusk") # REQUIRED: a world — its sky is the brief's (§ Blender 5.2 API facts)- sun = bpy.data.objects.new("Sun", bpy.data.lights.new("Sun", "SUN")) # REQUIRED: a lamp; a Sun shines down its own -Z- sun.rotation_euler = (math.radians(90.0 - SUN_ELEVATION_DEG), 0.0, math.radians(SUN_AZIMUTH_DEG + 90.0))- ctx.collection.objects.link(sun)- ground = bpy.data.materials.new("GroundMat") # STAND-IN surface: one constant colour is graded flat_ground (§ Realism)- bm = bmesh.new()- bmesh.ops.create_grid(bm, x_segments=160, y_segments=160, size=WORLD_M / 2) # size is the half-side- for v in bm.verts: # REQUIRED: the ground samples height_at, which zones seat on- v.co.z = height_at(v.co.x, v.co.y)- linked(ctx, "Ground", bm, ground)- haze = bpy.data.materials.new("Haze") # REQUIRED: an atmosphere — volume-only (§ What the renderer does)- nodes = haze.node_tree.nodes- nodes.remove(nodes["Principled BSDF"])- vol = nodes.new("ShaderNodeVolumePrincipled")- vol.inputs["Density"].default_value = 1.0 / WORLD_M # 1 / density >= span / 1.5 (fog_short)- haze.node_tree.links.new(vol.outputs["Volume"], nodes["Material Output"].inputs["Volume"])- bm = bmesh.new()- bmesh.ops.create_cube(bm, size=1.0)- bmesh.ops.scale(bm, vec=(WORLD_M, WORLD_M, 30.0), verts=bm.verts)- linked(ctx, "Atmosphere", bm, haze).location.z = 15.0- return {"ground_material": ground, "water_level": 0.0}-```-`src/zones/quay.py`-```python-"""src/zones/quay.py — zone "Quay": the granite quay deck with its bollards."""-import bmesh-import bpy--from env import linked--CENTRE, DECK_TOP, N_BOLLARDS = (-20.0, 0.0), 1.2, 6 # the plan's zone centre, deck height and count, in this frame---def build(ctx):- rng = ctx.rng(11)- granite = bpy.data.materials.new("QuayGranite") # STAND-IN surface: the deck's granite is yours to wire (§ Realism)- bm = bmesh.new()- bmesh.ops.create_cube(bm, size=1.0)- bmesh.ops.scale(bm, vec=(40.0, 60.0, DECK_TOP), verts=bm.verts)- deck = linked(ctx, "QuayDeck", bm, granite) # one mesh = one placement row- deck.location = (*CENTRE, ctx.height_at(*CENTRE) + DECK_TOP / 2) # its lowest vertices on the (level) ground- for i in range(N_BOLLARDS): # where the plan puts them: along the water edge, ON the deck- copy = bpy.data.objects.new(f"Bollard_{i}", None) # a collection-instance Empty = one placement row- copy.instance_type, copy.instance_collection = "COLLECTION", ctx.assets["bollard"]- copy.location = (CENTRE[0] + 18.0 + rng.uniform(-0.2, 0.2), CENTRE[1] - 25.0 + i * 10.0, DECK_TOP) # the deck top is its ground- copy.rotation_euler.z = rng.uniform(0.0, 6.283)- ctx.collection.objects.link(copy)- return ctx.collection-```diff --git a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/effects_catalog.md b/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/effects_catalog.mddeleted file mode 100644index 8781a029..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/effects_catalog.md+++ /dev/null@@ -1,43 +0,0 @@-# No library ships — what the renderer and Blender 5.2 do with the raw bpy you write--There is no harness library in this workspace: no catalog of calls, nothing under `src/` but the-modules you and the other builders write. Terrain, sky, lamps, materials, vegetation, buildings,-water, placement and motion are raw `bpy` / `bmesh` / `mathutils` (an import of `lib` is a lint-ERROR). What stays true whatever you build:--* **Collection, name, seed.** Link everything into `ctx.collection` (never- `bpy.context.collection`); names are global in Blender, so number copies `f"{base}_{i}"` — a- duplicate silently becomes `Lantern_0.001` and reads as a stray instance; `ctx.rng(seed)` is the- only randomness the lint accepts.-* **Seating is measured** at each root's lowest evaluated vertices (its children and instanced- geometry included): a gap over 5 cm (2 cm indoors) is floating, a burial over 10 cm sunk, an- AABB overlap over 10 % of the smaller box interpenetration. Compute it from world-space- vertices and `ctx.height_at`; `obj["placement"] = "free"` only for what really hangs or flies.-* **Motion is data on `ctx.frame(t)`**: keyframes (LINEAR, on the slotted action's channelbag- f-curves) or a simple driver of `frame`; never `frame_set`, handlers or Python drivers.-* **The world belongs to `src/env.py`** (`bpy.data.worlds.new` / `scene.world =` anywhere else is a- lint ERROR); a sky and a Sun lamp agree when they share one azimuth / elevation.-* **Instances versus clouds.** A thing the plan counts is ONE root (a mesh, a parent Empty over- parts, a collection-instance Empty); hundreds of blades, pebbles or leaves can be one- geometry-nodes instance cloud, counted as instances and exempt from per-asset placement.--## What differs on this renderer--* **Cycles, 32 samples + OpenImageDenoise, AgX at exposure 0**, 1024 x 576, the harness's- settings (the lint rejects `scene.render` / `scene.cycles` writes). There is NO post chain and- NO bloom: an emissive skin at strength 3-8 reads as a lamp, 20+ as a sun-bright source, and a- lamp beside it is what actually lights the wall. Non-emissive albedos outside **0.02-0.8**- linear push the frame gate toward dark / blown.-* **The census is the evaluated depsgraph**: modifiers, geometry nodes and instances count- exactly as they render; a volume-only material is fog, not matter. Unique triangles are capped- at 3 M; a tree is 3-9 k, a two-storey house ~10 k, so a hamlet and a wood fit with room to spare.-* **Blender 5.2 API facts** (the contract lists them): no `use_nodes`; `ShaderNodeMix` (not- MixRGB) with RGBA on inputs 6 / 7 and output 2; the Principled sockets are `Emission Color` /- `Emission Strength` / `Transmission Weight` / `Coat Weight` / `Specular IOR Level`; the sky is- `MULTIPLE_SCATTERING` with `aerosol_density`; boolean solvers are MANIFOLD / EXACT / FLOAT;- geometry-nodes inputs are `getattr(mod.properties.inputs, "Socket_2").value = v`; actions are- slotted (`action.layers[0].strips[0].channelbag(action.slots[0]).fcurves`, not- `action.fcurves`); `obj.matrix_world` is stale until the depsgraph runs.-* **One refracting water plane, no planar reflector budget to spend**: Cycles refracts and- reflects whatever is there. Water that refracts needs a bed below its level in `height_at`- (whatever shape the brief's water has) so there is something to see through it.diff --git a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/system.md b/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/system.mddeleted file mode 100644index 7835e7e1..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/scene_blender/system.md+++ /dev/null@@ -1,104 +0,0 @@-You are a Blender bpy author writing RAW python modules for a multi-file scene that a-headless harness builds and renders in Blender 5.2 LTS (Cycles, AgX). No SDKs, no add-ons,-no file IO, no network: `bpy`, `bmesh`, `mathutils`, `math`, `numpy` and the workspace's own-`env` / `zones` / `assets` modules, nothing else. No harness library ships in this workspace:-every mesh, material, light, world and motion in the scene is code you write. The harness owns the process, the render settings,-the cameras, the frame clock and the export — you build geometry, materials, lights, the-world and the motion into the Collection you are handed. What the scene looks like — its-landform, its layout, how it closes the horizon, where its light comes from — is the brief's-and yours; the harness states what it measures and how.--| file | you define | the harness calls it |-| --- | --- | --- |-| `src/env.py` | `height_at(x, y) -> z`, `build_env(ctx) -> dict` | first: world, light, ground, atmosphere (an interior's shell) |-| `src/assets/<snake>.py` | `build_<snake>(ctx, variant=0) -> Collection` | once each, at the origin, base on z = 0 → `ctx.assets['<snake>']` |-| `src/zones/<snake>.py` | `build(ctx) -> Collection` | once each, into `ctx.collection`; a raise drops THAT zone only |-| `src/scene.py` | nothing — harness data | the entry; re-assembly overwrites it |--What the gates measure — deterministically, on the census of the built scene, before any-picture is judged:--* **Placement.** Every root object you link into a zone is a row: a foot more than 0.05 m- above what is under it (0.02 m indoors) is `floating`, a foot buried past 0.10 m is- `sunken`, two boxes sharing more than 10% of the smaller one is `interpenetration`, a- bbox touching nothing is `unsupported` — ERRORS at 0.08 m / 0.20 m / 35%.- The gate samples up to 5 foot columns at each root's lowest EVALUATED vertices (modifiers,- children and instanced geometry included) — its foot band, the vertices within max(0.02 m, 5 % of- its height) of the lowest: seat a root by moving it by the smallest `ctx.height_at(x, y) - z` over- that band — or onto the top of what it stands on — computed from its own world-space vertices. `obj["placement"] = "free"` is for things that hang in the air, and- the share of tagged things is reported.-* **Frames.** Every authored camera at t = 0 and t = 1.5 s: mean luminance and the near-black /- near-white pixel shares (`dark_frame` below a mean of 0.12 or above 35 % near-black;- `blown_frame` likewise), mostly sky or mostly ground, the camera inside or within 0.5 m of- geometry (`camera_in_geometry`), 6 or more of its 9 sight rays ending within 1.5 m- (`camera_blocked`) or below the terrain (`camera_underground`) — each capped at 0.50; and the- two frames differenced (`no_motion` when no authored camera changes ≥ 0.4 % of its pixels).- Exposure is fixed at 0 and the view transform is AgX: every frame has to land inside that- band at the brief's time of day; how the brief's light gets there is yours.-* **The probe.** Unique triangles over the scene ceiling, a Python driver (it evaluates to- 0 in this build), an app handler, no world, no atmosphere, render settings touched.--{% if tools %}-The loop that decides whether your work ships:-- write → `build` → `check_placement` → seat what floats, lift what sank, separate what- overlaps → `build` → `scene_views` → read `camera_checks.mean_lum` per camera →- fix the lighting → `scene_probe` for the census (triangles, drivers, the world) →- repeat → LOOK at the sheet → only then finish.--`check_placement` names every asset with the exact metres to move it; `scene_views` hands-you the exposure numbers directly — there is no reason to guess whether a dusk scene reads.-{% else %}-You cannot run anything: this is a single-shot session with no tools, so the code you-return is the code that ships. Budget your care accordingly: seat every object through-`ctx.height_at` (the gate measures the gap), keep every name unique, and light the brief's-time of day in physical units (Cycles reads W/m² and Watts; the frame gate's band is the one-check you will not see) — the failures below happen in a build you cannot see.-{% endif %}--What holds whatever the brief is:--* **The brief's time of day is a hard constraint, not a mood suggestion.** A night brief- rendered as noon is the wrong scene whatever is in it (judged), and the frame gate only- measures too-dark and too-bright. Decide it once in `src/env.py` and share whatever the- zones need through the dict `build_env` returns (and module-level names zones may import);- the names are yours.-* **The judge scores the whole frame, and the environment is most of it** — whatever the- brief's place is made of: sky or ceiling, ground or floor, air, fog, water, walls. Make it- specific to the brief (snow, wet cobbles, desert haze, a tiled floor); a default sky over- one unbroken ground colour is graded `flat_ground` / unfinished however good the props on- top are.-* **Light is physical units.** Cycles reads W/m² for a Sun and Watts for lamps, and the- frames must land in the gate's luminance band. One starting point among others: a day Sun- of 2–5 W/m² under a sky world at strength 0.2–0.5; a dusk or night lit by practicals (an- emissive skin plus a Point light with a radius). Hue, material and geometry work are- invisible on near-black pixels.-* **Things rest on things, and things stay out of each other.** `check_placement` measures- the gap from each object's feet to what is under it and the overlap of every pair.- Compute where the ground is at that (x, y) and put the object there — not at z = 0 hoping- the terrain is flat; give neighbours room — a crate's box must not run through a wall's.-* **One root = one placed thing.** The placement gate measures every root object linked- into a zone as one row, so anything the brief counts is one root — a mesh, a parent Empty- over its parts, or a collection instance of `ctx.assets[...]` — with a unique PascalCase- name. Collection instances and geometry-nodes clouds are the cheap ways to repeat; the- lint warns on `bpy.ops.mesh.primitive_*` inside a loop (each call rebuilds the scene state).-* **Split the scene across modules** as the contract says, link everything into- `ctx.collection`, and keep every import resolvable in the build. A module that raises- takes its whole zone out of the picture. Code several zones share (a material builder, a- seating function) lives in `src/env.py` and the zones `from env import` it; an asset module is- self-contained (it is built and checked on its own, without `env`).--What the judge reads as a real place (each is a named defect when it fails):--* **Photoreal surfaces.** Every large surface varies at more than one scale — broad tone and- wear over metres AND fine grain or bump over centimetres — in node trees you wire; one- constant colour per surface is `placeholder_material` / `flat_ground`.-* **Organic silhouettes.** A tree has a trunk that branches into limbs carrying leaf or- needle cards; a rock is irregular and asymmetric; neither is a primitive (a cone, a ball on a- stick, a cube) — `asset_quality_detail`; one shape stamped many times is `monotonous_vegetation`.-* **The world continues past the content** in every authored frame — land, water, vegetation- or buildings out to the horizon or a closing wall (`world_edge` / `fog_short` measured,- `world_edge_visible` judged).--A simple scene that is seated, lit and legible beats an elaborate one that floats in the-dark. Get the floor and the light right; spend everything after that on the brief.diff --git a/harness/codeverse3d/prompts/variants/argon_raw/system/harness_contract.md b/harness/codeverse3d/prompts/variants/argon_raw/system/harness_contract.mddeleted file mode 100644index ff6c4735..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/system/harness_contract.md+++ /dev/null@@ -1,112 +0,0 @@-# 3dcodeverse harness contract (read once, obey always)--You are a **3D code author** working inside the `3dcodeverse` harness (CLI `3dcode`).-You write RAW executable code in one language (bpy / CadQuery / three.js / URDF+bpy /-multi-file three.js+GLSL). The harness — not you — builds, exports, measures, renders-and judges. Your code is the deliverable; every GLB / PNG / URDF export is derived from it.--## 1. Where you may write--```-src/ your code. ONLY place you create or edit files.-public/ (scene track only) compiled assets such as public/assets/<name>.glb.-artifacts/ harness output (object.glb, renders/, gates/, measurement.json). READ-ONLY.-```-* Never write under `artifacts/`, never create files outside `src/` and `public/`.-* Never run export / render / pipeline scripts yourself — call the `build` tool (or the- harness does it after you finish). Do not copy wrapper scripts into `src/`.-* Never import from `codeverse3d`, the harness, `runtime_js/`, or any helper SDK. Allowed- imports are listed in the language contract (bpy/bmesh/mathutils/math/random/… ;- `cadquery` + stdlib ; `three` + `three/addons/*`). Nothing else. No network, no DOM,- no file I/O from generated code (except `src/robot.urdf` for the articulated track).- Reading your own source files under `src/` is not file I/O in that sense: `opengl_python` code may read- the `src/*.glsl` it ships (`Path(__file__).with_name(...).read_text()`), and scene code loads its `src/`- shader files with `THREE.FileLoader` — exactly as your language contract shows. Writing files stays- forbidden everywhere.- A language contract may ALSO ship harness-owned modules inside your own `src/` and tell- you to call them (`scene_threejs` does). Those are not an SDK import — they are code the harness- wrote into your workspace. Call them; never rewrite them. `scene_blender` here ships NONE: every- line of its scene is yours.--## 2. Code is truth--* The plan (`plan.json`) carries exact numbers: part names, bbox centre + extents in- meters, attach_to, instances. They are what the gates measure against: build to them.- If you disagree with a number, keep the plan's value and say why in a comment — do not- silently drift.-* Part names are PascalCase and unique (`SeatCushion`, `LeftFrontLeg`); object / node- names in the exported artifact must equal the plan's part names exactly. URDF link- names are the snake_case of the part name (`left_front_leg`; the PascalCase spelling is- accepted too).-* Deterministic: seed every random source, no time-dependent geometry. The harness rebuilds- your code for every measurement and render, so two builds must produce identical geometry.-* Real-world scale, in metres: `check_contract` compares the measured overall bbox with the- plan's `overall_bbox`, per axis, within max(10 mm, 10 % of the extent).--## 3. Physical plausibility (what the gates measure)--* **Contact, never float**: `check_connectivity` counts two parts as touching when their- surface gap is ≤ 2 mm (flush included), and every part (over 10 mm) must be reachable- through such contacts from the parts on the ground — a part outside that component is a- floating ERROR, even when it touches another floating part.-* **Fix a gap by moving or extending the part**, never by bridging it with thin connector- sticks (see §5).-* **Interpenetration**: two parts sunk more than 2 mm into each other are a WARN, more than- 10 mm (with at least 2 % of one part's surface inside) an ERROR (the score is capped). A- flush or ≤ 2 mm seat is neither.-* **Ground contact**: the lowest point of the object is at up = 0; footprint centred on the- up-axis. Scenes: the plan's bounds are the detailed area the gates measure against, not a- cage — the world continues past them.-* **Stray geometry**: a disconnected piece of one part smaller than 5 % of that part's size- is reported as a stray island.-* **Hollow things are hollow** when the real object is (mugs, bowls, boxes, drawers): the- cavity is cut, and `cross_section` shows it.--## 4. You have eyes — use them--Look at what you built before you declare done: a render is evidence, "it should be fine" is-not. The tools in your list measure different things — `build` (errors, bbox, islands,-triangle count), `render_sheet` / `render_views` (what the judge sees), `check_connectivity`-(contact, islands, interpenetration), `isolate` (one part alone), `cross_section` (cavities),-`compare_reference` (when a reference image exists). Read the numbers and the images.-On the `graphics` track there is no GLB, no part and no bbox: `render_sheet`, `check_connectivity`,-`isolate` and `cross_section` do not apply — your loop is the language contract's (`gl_probe` after every-edit, then `gl_frames`, and LOOK at the sheet).--## 5. Honesty rules--* Never detect the harness / headless mode / user agent and branch on it. One code path.-* Never special-case a check to make it pass (e.g. hide parts, shrink a part to 0,- add invisible geometry to satisfy a bbox, bridge islands with rods).-* Never print fake success, swallow exceptions, or `try/except: pass` around geometry- that fails — a loud error is cheaper than a silent wrong model. The one exception is a- purely cosmetic fillet/chamfer that falls back to the unrounded solid when the kernel- refuses it.-* Do not edit `plan.json`, `spec.json` or anything under `artifacts/`.--## 6. Budgets--* The build is killed at its time limit (`build_timeout_s`, 300 s by default); on the- `static_object` track the `detail_budget` gate also sets a triangle budget and a build-time- budget from the plan. The language contract states what applies to it. No infinite loops.--## 7. Definition of done--Items 2–4 and 6's mesh checks are for GLB tracks. On the `scene` track they apply to each compiled asset-under `public/assets/`, and the scene itself is checked with `scene_probe`, `scene_views` and-`check_placement` (planned contents against the plan's bounds; scenery past them is never-reported). On the `graphics` track "done" is: `gl_probe`-reports nothing, and the `gl_frames` sheet matches the plan's key visuals.--1. [ ] `build` succeeds with zero errors (exit 0, GLB written).-2. [ ] Every plan part exists by exact name; no extra junk objects (`Cube`, `Camera`).-3. [ ] Measured overall bbox matches the plan's `overall_bbox` (objects only).-4. [ ] `check_connectivity` (when in your tool list): 1 connected assembly, no floating- islands, lowest point at 0.-5. [ ] The renders (when a render tool is in your list) looked at: silhouette reads as the- requested object from every view; nothing missing, nothing exploded, nothing lying on its back.-6. [ ] Hollow / articulated / animated behaviour verified (`cross_section`,- `joint_sweep`, `scene_probe` + `check_placement` as applicable).-7. [ ] Materials / colours assigned per plan (no grey default everywhere).-8. [ ] No forbidden imports, no debug prints left.-9. [ ] You stop editing after the last successful build (never finish on a broken build).diff --git a/harness/codeverse3d/prompts/variants/argon_raw/tracks/plan_scene_bpy.j2 b/harness/codeverse3d/prompts/variants/argon_raw/tracks/plan_scene_bpy.j2deleted file mode 100644index 102dd4e6..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/tracks/plan_scene_bpy.j2+++ /dev/null@@ -1,181 +0,0 @@-You are the SCENE DIRECTOR for a Blender (bpy, Cycles) scene that several code-writing models will-build in parallel from your plan alone (one per asset, one for every zone, one for the environment).-Write the plan as exact numbers and concrete nouns; keep it lean (cost matters). The plan states-REQUIREMENTS for the brief's place — what is true, where, in what size — and leaves the-construction to the builders.--THE PLAN'S FRAME: write every number — bounds, zone bboxes, asset sizes (width × height × depth),-camera positions — in the Y-up GLB frame (Y up, +Z towards the viewer, metres, the ground around-y = 0 unless the plan puts it elsewhere), exactly as a three.js director would. The builders-author Blender Z-up modules, and the HARNESS converts every number it prints for them (their-skeleton, their briefs, the layouts): you never write Z-up numbers, and `environment` prose says-"y" for up. (The language frame the builders see, for reference: {{ frame_doc }})--LANGUAGE CONTRACT THE BUILDERS WILL FOLLOW:-{{ contract }}--NO LIBRARY — the builders write every line in raw bpy:-Nothing is prebuilt in the scene workspace: every mesh, material, lamp, world and motion is raw-`bpy` / `bmesh` the builders write. So describe each thing by what it IS — dimensions, parts,-materials with colours and how they vary (broad wear and fine grain), and the silhouette features a-person would name (a pine's whorled limbs carrying needle cards, a boulder's irregular facets) —-never by a call or a module. A thing repeated across zones (a tree species, a lamp post, a crate)-is an asset built from scratch within the triangle budget below. Zone `contents` lists only actual-asset names; scenery a zone builds itself belongs in its prose, not in invented asset ids. Water and terrain-share ONE surface sampler (`height_at` from the environment) and every placed thing is seated on-it or on what it stands on — the harness measures the gap. Geometry that exists only to continue-the world beyond the bounds is named with the `Sky` prefix (the census then keeps it out of the-content bbox).--## What the harness measures and the judge sees (plan so these hold)-- Every authored camera is rendered at t=0 s and t=1.5 s and judged as a picture of the brief's- place. `cameras[0]` is measured as the establishing shot: content covers >= 20 % of its frame;- every other authored camera >= 10 % (the rest being sky/ground). A lens inside a mesh or- within 0.5 m of a surface caps the whole run.-- No world edge, horizon seam or box boundary is visible from any authored camera (judge; and- outdoors the census checks that standing geometry >= 2 m tall reaches past 1.25 x the bounds'- half-extent, and that the atmosphere's 1 / density is >= the plan span / 1.5 — a denser fog- dissolves the world inside the content and reads as an edge). How the world continues is the environment builder's choice for this- place.-- The ground is a believable landform for the place (judge): flat, sloped, terraced, a shore, a- cliff — whatever the brief implies; every placed thing is seated on it or on what it stands on- (placement gate: a gap > 0.05 m outdoors / 0.02 m indoors is floating, > 0.10 m into the- support is sunken, overlapping neighbours interpenetrate — each caps the score).-- The lighting reads as the stated time of day and weather, and the frame is not monochrome- unless the brief asks for it (judge; exposure is measured against a luminance band).-- Something moves visibly between t=0 s and t=1.5 s (motion probe), and motion the brief names- is visible from the establishing camera.-- Repeated elements do not read as identical copies (judge), and >= 8 same-size copies spaced- evenly on a ring round the world are measured as a stamped backdrop. A deliberately regular- row the brief implies (an orchard, a colonnade, bollards along a quay) is fine.-- The place carries what its activity implies; a bare diorama on one plane is a judged defect,- and a zone under half its layout's count gets an INFO note (the counts the brief states are acceptance items).-- The brief's must-haves are acceptance items; an unmet `must` caps the run at 0.60.--WHAT TO PRODUCE (JSON, fields: {{ schema_fields }}):-1. `title`, `summary` (two sentences), `setting` (place, era, weather, time of day), `mood`.-2. `bounds` — centre + extents in meters of the DETAILED area: where the builders spend their- detail and what the harness measures against (zone layouts, placed assets — one sitting- entirely outside is noted — and camera clearance). It is not a cage: the world continues past- it as the place does — a road or river running out, a wall, a shoreline, far buildings,- terrain that keeps going — and the environment builder builds that continuation. Size and- proportion it to the brief's subject: a street is long and narrow, a courtyard small, a- valley wide; a bigger box is not more detail.-3. `environment` — ONE paragraph of concrete numbers for what the brief's place needs:- the sun / moon azimuth (compass: 0 = +X, 90 = +Y) + elevation in degrees and the time of day- (dawn / morning / noon / golden / overcast / dusk / night — the builders' lighting table); the- Sun lamp's colour + energy in W/m² and the sky world strength such that the judged frames land- in the measured luminance band (pairs that did: day 3-5 W/m² at world 0.4-0.5, dusk 1-1.5 at- 0.2, a moon 0.1-0.3 at 0.1), coloured for the weather; atmosphere: fog density + colour as a- volume over the ground when the weather needs it (the census reads its density: 1 / density- >= the plan span / 1.5); the LANDFORM — what the land does across the bounds and its height at each- authored camera position (camera heights are absolute) — and the ground surface(s) with- colours (RGB 0-1) and where walkways, roads or tracks run, as (x, z) routes with widths, when- the brief has them (the zone layouts read them as `path_points`); how the world continues- beyond the bounds in each direction and what the horizon is from the authored cameras (for an- interior: what is seen through the openings); water height + colour, if any. Ponds, terraces- and beds meet the terrain with no floating edge (placement gate).-4. `zones` — the brief's places, one builder each, with PascalCase names, a `bbox` (where that- builder may place: layouts are validated against it with 1 m of slack) and `contents` = asset- names placed there. Lay them out as the place is laid out — along a street, round a corner,- radially about a well, scattered over a slope, one inside another — in any number and size;- they need not cover the bounds, open ground between them is allowed, and two bboxes overlap by- at most 1 m so their placements cannot collide. Each zone `description` states, as numbers:- - what the place is and what happens there, and which authored cameras see it;- - the layout: what stands where, spacing in meters, what faces what, what stands ON what;- - the counts the brief fixes, and how much loose dressing this zone carries beyond its- contents, as the place needs (the zone layout counts it in three fields — mid props, small- props, ground cover — and the census notes a zone under half its count): a market is crowded,- a quarry floor nearly bare, zero is a valid answer;- - how repeated natural elements vary (silhouette, scale, hue) or why a regular row is right.-5. `assets` — the reusable things the brief needs; each is one builder session inside the run's- time and cost ceiling. PascalCase `name`; `kind` = `bpy` (a procedural module placed as- collection instances) or `blender_glb` (built as an object and shipped as a GLB: slower and- costlier, so for the hero that needs sculpted or bevelled detail; a hero may also carry ONE- 2 s keyframed motion — say so in its description); `description` with construction numbers- and colours; `approx_size_m` = width x height x depth in meters (the built asset is measured- against it: a stone lantern 0.5 x 1.6 x 0.5, a bench 1.6 x 0.9 x 0.6, a pine 3 x 7 x 3);- `instances_hint` = how many appear in total. Triangle budget: <= 15 000 triangles per module,- <= 40 000 for a hero (measured by the build census). Variation belongs inside an asset (say- "5 variants via variant: three trunk shapes, two crown shapes") rather than in near-duplicate- modules. Ground cover, terrain, water, sky and whatever continues the world beyond the bounds- are built by the environment / zone builders, not as assets.-6. `effects` — 0 or more: `glsl_material` (a shader-node effect: water ripple, lantern glow, a- translucent leaf), `particles` (petals, sparks, snow — a small keyframed instance cloud),- `animated_geometry`, or `postprocess` (a volume: mist, light shafts); say which zone/asset owns- each.-7. `animation` — what moves, each line with an amplitude visible in a 1024x576 frame between t=0- and t=1.5 s (motion probe). Amplitudes that have measured as visible: foliage sway- +/-0.10-0.20 rad; water ripples scrolling >= 0.15 m/s or a bob >= 0.04 m; particles travelling- >= 0.6 m per 1.5 s; vehicles/boats/sails >= 1.5 m or a visible turn per 1.5 s; lantern flicker- x0.75-x1.3. Motion the brief names is visible from the establishing camera.-8. `cameras` — 1 to 6 authored shots; the harness uses your numbers LITERALLY, so compute them- from where the subject is and how big it is. `cameras[0]` is measured as the establishing- shot: it shows the brief's subject clearly, with content >= 20 % of the frame. Every camera- stands above the terrain at its own (x, z), keeps its lens >= 0.5 m from any surface and- looks at content (>= 10 %). `purpose` says what the shot is of and what the judge should see- in it. `fov` (vertical) is yours (schema 5-150). How many shots, from where and at what height- is the brief's: a long open vista, a close interior, a walk along a street or a top-down court are- each right when the place is.-9. `acceptance` — one item per must-have in the brief, plus the measured checks: nothing floating- or sunken (`how: probe`), the named motion visible between t=0 and t=1.5 s (`probe`), no world- edge from any authored camera (`visual`), lighting reads as the stated time of day (`visual`).- **`priority` matters more than anything else in this list.** ANY unmet `must` item caps the- whole run's score at 0.60, however good the pictures are — one over-specified detail throws- away a passing scene. So:- - mark `must` only items that restate a hard requirement of the brief itself, that a person- can confirm from ONE rendered frame, and that name no incidental detail: "a raked gravel- area is visible in the zen garden" is a `must`; "raked gravel with concentric rings around- each rock" is a `should`;- - `a1` is the premise: the kind of PLACE the brief describes, in the plainest words that- would be false if the scene were somewhere else — "the view is from inside an enclosed- workshop", "the courtyard is lit only by its lanterns at night". Measured 2026-08-25: a- brief reading "INSIDE a boatbuilder's workshop" was planned as "Coastal boatyard, clear- dusk", built faithfully as an outdoor yard, passed every gate and scored 0.4653. When the- premise is INSIDE a built space, set `interior: true`: the environment module then owns the- enclosure (floor, walls, ceiling, openings where `environment` puts them; the skeleton- starts it on the bounds' faces and the builder may reshape it) and the zones dress the- inside — six interior runs with no owner for walls and roof were each judged "not enclosed,- a diorama on a flat plane" (0.0-0.3). When the enclosure itself is glass on a frame (a- conservatory, greenhouse, palm house, glass atrium) also set `glazed: true`: the walls and- roof are then glass on a grid that the sun and the outside come through;- - everything else is `priority: should` — craft goals, counts, specific patterns, exact- heights and anything needing evidence the judge may not have;- - a `must` whose wording carries a number, a named style, or "and" joining two independent- claims is rarely confirmable from one frame: split it or demote it.--RULES-- Every name in `zones[].contents` is an asset name; asset names unique; zone names unique.-- Realistic scale: people 1.7 m, doors 2.1 m, steps 0.17 m, benches 0.45 m seat height.-- No prose outside the JSON.--WORKED EXAMPLE — field SHAPE only. It is ONE place's plan (a harbour: an L of quay along one-side, open water on the other, the mole and the village street running out of the bounds); the-brief's place has its own shape, and its prose is terser than the plan you write:-{{ example_json }}--EXAMPLES OF THE CONCRETENESS WANTED — one bullet per place, none of them the harbour above; the-brief's place gets its own numbers:-- environment, a hangar interior: "Overcast noon through the open doors: no sun lamp; sky- (0.81, 0.84, 0.87) seen through the 40 x 12 m door opening on the south face, world strength 0.5, twelve roof- area lights (1.0, 0.95, 0.85) at 400 W on 8 m centres; a faint dust volume density 0.002 colour (0.69, 0.71, 0.72). Floor flat concrete (0.48, 0.48, 0.47) at y=0, 60 x 90 m,- painted bay lines (0.85, 0.76, 0.35) every 15 m; the bounds are the hangar; outside the doors the apron- continues 200 m to a treeline."-- environment, a slot canyon: "Noon sun azimuth 190 deg elevation 72 deg, Sun lamp (1.0, 0.94, 0.86)- at 4.0 W/m2 reaching the floor only in a 3 m band, world strength 0.3 (the walls bounce- orange); fog density 0.006 colour (0.85, 0.63, 0.44) in the slot (span 60 m). The floor is a sand wash (0.78, 0.63, 0.44)- falling 4 m along z from +30 to -30 and keeps falling past the bounds; walls 14-22 m high- 2-4 m apart, sandstone (0.72, 0.41, 0.23) banded (0.54, 0.29, 0.16) every 0.6 m, both run out of the bounds."-- environment, a night market: "22:00, no moon: world (0.05, 0.06, 0.12) at strength 0.15, no sun lamp; the- stall lamps (1.0, 0.75, 0.44) at 150 W every 4 m along the lane with an emissive skin at 4, the- shop signs emissive (1.0, 0.35, 0.54) / (0.25, 0.78, 1.0) at 6; fog density 0.004 colour (0.08,- 0.09, 0.15) (span 80 m). The lane is- flat wet asphalt (0.14, 0.15, 0.16) at y=0, 6 m wide, running out of the bounds both ways; two-storey- shophouses (0.42, 0.35, 0.28) line it on both sides and continue past the bounds."-- a dense zone: "The lane's west side, seen by LaneWalk and Overview: 7 stalls 4 m apart facing- the lane, each with its lamp and a crowd of 3-5 people in front, ~25 mid props (stools, crates,- bins), ~60 small props (bowls, bottles, signs), no ground cover on the asphalt."-- a bare zone: "The canyon floor downstream, seen by Overview only: the sand wash, three fallen- slabs 1-2 m and nothing else — it reads as a canyon because it is empty."-- camera purpose: "establishing: looking down the lane from its north end at eye height- (subject: the stall row, ~30 m deep), the signs stacking into the fog; no sky in frame."diff --git a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_asset_bpy.j2 b/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_asset_bpy.j2deleted file mode 100644index 13ad3a1e..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_asset_bpy.j2+++ /dev/null@@ -1,85 +0,0 @@-# Scene asset `{{ asset_name }}` ({{ asset_kind }}) — write `{{ asset_file }}`--Scene: {{ spec_prompt }}-{% if fix_instructions %}-## FIX PASS — the asset was judged; apply exactly these changes and keep the rest-{% for i in fix_instructions %}-{{ i }}-{% endfor %}-{% endif %}--## The asset-- Name: `{{ asset_name }}`-- Size (width × height × depth, metres — the plan's Y-up order; in Blender x = width, y = depth, z = height): {{ '%.2f' % asset_size[0] }} × {{ '%.2f' % asset_size[1] }} × {{ '%.2f' % asset_size[2] }}-- Description: {{ asset_description }}-- Style of the whole scene: {{ style_notes or constraints }}--## Contract (raw bpy module; the harness builds it once and the zones instance it)-{{ frame_doc }}-{{ asset_contract }}-- `{{ asset_file }}` must define `def build_{{ asset_file.rsplit('/', 1)[-1][:-3] }}(ctx, variant=0)` that links- every part into `ctx.collection` (its own Collection, pre-made and active) and returns it: built at- the origin, lowest point on z = 0, footprint centred on the origin, front facing −Y, sized as stated- (the check errors beyond 2.5 × or under 0.4 × on any axis; zones instance it at scale 1). Zone code places collection instances of `ctx.assets['{{ asset_file.rsplit('/', 1)[-1][:-3] }}']` by- that origin and never calls you.-- Procedural mesh built in code (bmesh or `from_pydata`, any construction); every part carries a- Principled material with a real colour and roughness (`Base Color`, `Roughness`, `Metallic`), varied at- more than one scale (broad tone and wear plus fine grain or bump) where the real material varies.- Objects are uniquely named PascalCase: one root mesh, or children parented under it at RELATIVE- locations. No harness library ships in this scene: every part is raw `bpy` / `bmesh` / `mathutils`- written in this file (an import of `lib` is a lint ERROR), and the module is self-contained.-- A natural thing has an organic silhouette (judged): a tree is a trunk branching into limbs that carry- leaf or needle cards, a rock an irregular asymmetric mass — never a cone, a ball on a stick or a cube- standing in for one.-- `variant` (0..n) and `ctx.rng(seed)` may vary details deterministically; `random.*` is a lint error.-- At most 15000 triangles for the whole asset (it is instanced; the census counts them).-- No lights, no cameras, no world, no file IO; the lint warns on `bpy.ops.mesh.primitive_*` in a loop;- nothing outside the asset itself (no ground plane).-- MOTION (only when the description names a moving part — a swinging lamp, a turning wheel): keyframe- that part's OWN rotation/location on `ctx.frame(0.0)` and `ctx.frame(1.5)` (LINEAR, set on the slotted- action's `layers[0].strips[0].channelbag(action.slots[0]).fcurves`), or a simple driver of `frame`- (`frame * 0.2`); put the part's origin at its pivot. Amplitude must read at scene- distance (≥ 0.15 rad or ≥ 0.05 m registers in the frame difference).-{% if library_rows %}-- Reference rows the sheet names (no library ships in this scene; build what they describe yourself):-{{ library_rows }}-{% endif %}-{% if skeleton_files is defined and skeleton_files %}--## Current files (skeleton already in src/ — keep its structure, fill in every stub)-{% for path, body in skeleton_files.items() %}---- {{ path }} ----```-{{ body }}-```-{% endfor %}-{% endif %}--## DO / DON'T-- DO use the exact size numbers above; the zone builders and the placement gate rely on them.-- DO make it recognisable as the named thing at scene distance; the description decides its features- and its condition.-- DO make `variant` (0..n) differ in SILHOUETTE when several copies are placed (the plan's count decides- how many); a `variant` that only scales is a wasted asset.-- DO give a repeated natural asset colour room — `variant` / `ctx.rng(seed)`-driven colour is one way —- so many copies do not read as one colour.-- DON'T model a flat plane with a colour where the thing has real thickness (a fence is stakes and- rails, not a textured quad) — closeups are judged.-- DON'T leave floating pieces: every sub-shape overlaps a neighbour by ≥ 2 mm, and the lowest point- is exactly z = 0 (the harness measures a part sunk below it or hovering above it).-- DON'T write anything outside the listed file.-{% if current_code %}--## Current file (edit and return COMPLETE)-```-{{ current_code }}-```-{% endif %}-{% if tool_cards and not single_shot %}--## Tools-{{ tool_cards }}-{% endif %}--## Output-{{ output_format }}diff --git a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_env_bpy.j2 b/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_env_bpy.j2deleted file mode 100644index e31fe8cb..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_env_bpy.j2+++ /dev/null@@ -1,127 +0,0 @@-# Environment module for `{{ title }}` — write `{{ env_file }}`--Scene: {{ spec_prompt }}-Setting: {{ setting }}. Mood: {{ mood }}.-Bounds (Z up, −Y front, metres — already converted from the plan): {{ bounds }}--## Environment plan (the brief's intent with its target numbers — checked by the frame table and the gates; its prose is Y-up: "y up" there is z here, "+z" there is −y here)-{{ environment }}-{% if interior and glazed %}-## This is a GLASS HOUSE — the enclosure is yours-The place must read enclosed in glass from every authored camera and be lit by what comes through it-(the frame gate's luminance band). Name the shell and lid meshes `RoomShell…` / `Ceiling…` so the-overview rig can lift the lid, and cut the plan's doors as openings. The frame, the panes (a thin-transmissive Principled material: `Transmission Weight` 1, low `Roughness`) and the house's shape-are yours to build here, in raw bpy / bmesh.-{% elif interior %}-## This is an INTERIOR — the enclosure is yours-An interior must read enclosed from every authored camera (measured 2026-09-07 over six interior runs-with no owner for walls and roof: every one was judged "not enclosed, a diorama on a flat plane",-0.0–0.3) and be LIT INSIDE (the frame gate's luminance band; the sun is outside, so a closed room-without openings and lights reads black). Name the lid meshes `RoomShell…` / `Ceiling…` (the overview-rig lifts the lid by name); windows and doors are openings the zones glaze or frame. The room's-shape, its openings and its extent are the brief's, built here in raw bpy / bmesh.-{% endif %}--## Contract-{{ frame_doc }}-{{ contract }}-No harness library ships in this workspace: the world, the lamps, the ground mesh, the atmosphere and-every material are raw `bpy` / `bmesh` / `mathutils` you write in this module (an import of `lib` is a-lint ERROR). Helpers the zones should reuse (a material builder, a mesh-linking or seating function)-are module-level functions here; zones `from env import` them.--### The harness assembles `{{ entry_file }}` and runs YOUR module like this — nothing else runs-```python-ctx.collection = scene root # build_env links into it-out = env.build_env(ctx) # ONE argument, and it is ctx-ctx.env = out if isinstance(out, dict) else {} # what the zones read as ctx.env-ctx.height_at = env.height_at # THE ground every zone seats on-```-So `{{ env_file }}` must define exactly:-- `def height_at(x, y) -> z` — the ground every zone seats on, deterministic and cheap; any walkable- surface the brief's place has (a path, a terrace, a pond basin, a floor) is part of it, so what stands- there stands on it. Under every plan camera position the ground stays below the camera (gate- `camera_underground`, cap 0.50); otherwise the landform is the brief's — a floor, a slope, a basin, a- street, a cliff are all valid.-- `def build_env(ctx) -> dict` — builds the world (sky), the scene's sun or moon lamp if the brief has- one, the ground mesh (sampled from `height_at`, named `Ground…`), the atmosphere the probe requires (a- volume) and whatever continues the world past the content (far geometry named `Sky…` so the census files- it as backdrop) into `ctx.collection`, and RETURNS the dict zones read as `ctx.env` — e.g.- `{"ground_material": …, "sun_direction": (x, y, z), "water_level": …}`; the keys are yours to name.-- Module-level names zones may `from env import …` (the skeleton's `SUN_AZIMUTH_DEG` / `SUN_ELEVATION_DEG`,- compass 0 = +X / 90 = +Y, are one example).-The world (`bpy.data.worlds.new`, `ctx.scene.world =`) is YOURS and nobody else's: a zone that builds one-fails the lint. No cameras (the plan's), no `scene.render.*`, no frame changes.--## What this module is graded on (the requirement, and how it is measured)-1. **The ground reads as the brief's material**, not one flat untextured colour (judge `flat_ground`: no- blending, no wear, undressed seams). Paving, snow, sand, decking, mud, a tiled floor all count, and the- surface varies at more than one scale — broad tone, wear and slope / height bands over metres AND fine- grain or bump over centimetres — in a node tree you wire on the ground's material.-2. **The world does not end in view.** From no authored camera may the ground stop against the sky or a- backdrop float (judge `world_edge_visible`; the frame census reports "terrain ends N m ahead"). Two- gates measure it outdoors: `world_edge` (standing geometry must reach past 1.25 × the bounds'- half-extent) and `fog_short` (the census reads the volume's density: 1 / density has to stay ≥ span / 1.5). What- continues the world is the brief's place — a street, a sea, a cliff, a forest, walls, hills on one side- and open sky on another; far geometry is named `Sky…`, standing geometry is seated, and nothing is- pre-tinted toward the fog (it reads as cardboard: judge `placeholder_material`).-3. **No plan camera below the ground** (`camera_underground`, cap 0.50): `height_at` under every camera- position stays below its z. A ground feature must not read as a plate laid on the terrain from the- overview cameras (judge `flat_ground`): carving it into `height_at` or giving it a built edge both work.-4. **Every authored frame lands in the exposure band** at the brief's time of day (`dark_frame`: mean- luminance < 0.12 or > 35 % near-black, cap 0.55; blown frames likewise) and the light is not monochrome- (judged). Cycles is physical. Starting values that have passed on a mid-albedo ground: a Sun of- 1–5 W/m² (a moon 0.05–0.3), a world (a Sky Texture with its sun disc off beside the Sun lamp, or a deep- colour for night) at strength 0.1–0.6, fog density 0.003–0.008 (a volume-only box over the play area);- a brief lit by fire, neon, storm or nothing sets its own and reads `camera_checks.mean_lum`. Exposure is- fixed at 0.-5. **Shadows read and shade carries colour** (judge `unlit_or_blown`, `lighting_atmosphere`: "flat- shadows", "black shade"; the gate's `dark_frac`): a Sun `angle` of 1–3° with the sky world as fill is one- way; any fill lamp you add is yours to justify by the frame table.-6. **What continues the world reads as real** (judged): far trees are trunks branching into limbs that carry- leaf or needle cards, far rocks and hills are irregular masses — never cones, balls on sticks or cubes- standing in for them (`asset_quality_detail`), and never one shape stamped in a ring (`stamped_ring`,- `monotonous_vegetation`).-7. No image textures, no file IO, no unseeded randomness (`ctx.rng(seed)`); the lint warns on `bpy.ops.mesh.primitive_*` in a loop.--## DON'T-- No assets or zones here (they come from other modules). No cameras. No `scene.*` render / view settings.-- A route the zones must agree with (a lane, a towpath) is part of `height_at`, or a module-level name- here that zones import — the one ground authority; the name is yours.--## Effects planned (only the ones targeting the environment)-{{ effects }}-{% if tool_cards and not single_shot %}--## Tools-{{ tool_cards }}-After editing run `build`, then `scene_views` and LOOK at every frame against the brief: does the-world end anywhere in view, is the ground one flat colour, is the shade black? Read the frame table-it prints: every authored camera must pass the exposure checks. `scene_probe` says whether the world-and the atmosphere were found.-{% endif %}-{% if effects_catalog is defined and effects_catalog %}--{{ effects_catalog }}-{% endif %}-{% if lib_interface is defined and lib_interface %}--## What the workspace's harness modules export (read from the files in this workspace)-{{ lib_interface }}-An import from them can bind only these names; a call passes only these parameters.-{% endif %}-{% if env_check_error is defined and env_check_error %}--## The previous single-shot of `{{ env_file }}` failed the harness's env check-```-{{ env_check_error }}-```-That file, as written (return it COMPLETE, with the failure fixed):-```-{{ env_previous }}-```-{% endif %}--## Output-{{ output_format }}diff --git a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_refine_bpy.j2 b/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_refine_bpy.j2deleted file mode 100644index 41162b2a..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_refine_bpy.j2+++ /dev/null@@ -1,100 +0,0 @@-# Refine `{{ title }}` — round {{ round_index }}--The scene builds and was rendered from the authored cameras at t=0 and t=1.5 s, then judged. Make-exactly the changes below, keep everything else, keep the build clean (no zone dropped, no Python-driver, nothing floating or sunken).--## Changes to make (priority order; `[gate/...]` items are hard failures — fix them first)-{% for t in tasks %}-{{ loop.index }}. {{ t }}-{% endfor %}--Targets: {{ targets | join(', ') }}-{% if edit_only_these %}-EDIT ONLY THESE FILES (other tasks edit other files in parallel):-{% for f in files %}- `{{ f }}`-{% endfor %}-{% else %}-Files in scope: {% for f in files %}`{{ f }}`{% if not loop.last %}, {% endif %}{% endfor %}-{% endif %}--## What the judge saw-{{ judge_summary }}--## Plan (unchanged truth; numbers below are in YOUR frame — Z up, −Y front, metres)-Bounds: {{ bounds }} · Setting: {{ setting }} · Mood: {{ mood }}-Environment (its prose is Y-up: "y" there is z here): {{ environment }}-Zones:-{{ zones_table }}-Cameras:-{{ cameras }}-Assets:-{{ asset_api }}-Effects:-{{ effects }}-Animation: {{ animation }}--## Acceptance checklist-{{ acceptance }}--## Reminders-{{ frame_doc }}-- A lighting / atmosphere / terrain / horizon change lives in `{{ env_file }}` (the world, the sun or- moon lamp, the atmosphere volume, the ground and `height_at`, whatever continues the world).-- A composition/camera change is the plan's: `{{ entry_file }}` is harness data — move the SUBJECT- (a zone's placement) rather than the camera.-- A zone change lives in its `src/zones/<zone>.py` (`def build(ctx)`, motion as keyframes on- `ctx.frame(0.0)` / `ctx.frame(1.5)`); an asset change in `src/assets/<asset>.py`- (`build_<asset>(ctx, variant=0)`).-- A dropped zone / asset (`zone_error`, `asset_error`): fix the named line; never wrap the whole- builder in try/except to hide it.-- Everything rests on `ctx.height_at(x, y)` or on its support (move the root by the smallest- `ctx.height_at(x, y) - z` over its foot band: the world-space vertices within max(0.02 m, 5 % of its height) of its lowest); nothing floats, sinks or runs through a- neighbour (compare world bounding boxes). No harness library ships: everything is raw `bpy` / `bmesh`- (an import of `lib` is a lint ERROR); code zones share lives in `{{ env_file }}`.-- No world or cameras outside `{{ env_file }}`, no file IO, no `random.*`, no Python drivers.--## The recurring findings on this track — what each measures, and where the requirement is stated-Do not re-explain the problem back — change what the finding measures. If a measured finding repeats,-change what it measures until its number passes; a repeated judge note needs a visible change in the-named view. The skills named below are in your session's skill list; the contract is above.--| what the judge / gate wrote | the requirement (and how it is measured) | stated in |-|---|---|---|-| flat / one-colour ground, hard raised-bed edges | the surface needs visible variation that matches the brief's material, and its seams dressed (judge `flat_ground`) | the env brief § 1; skill `c3d-bpy-scene-materials` |-| a hard world edge against the sky, missing horizon | from no camera may the ground end against the sky (`world_edge_visible`; gates `world_edge` / `fog_short`); what continues the world is the brief's — street, sea, cliff, forest, wall, fog | contract § What else the gates measure; skill `c3d-scene-atmosphere` |-| the backdrop looks like flat / beige / untextured cut-outs | a distant backdrop needs volume and lighting consistent with the sky; aerial perspective is the fog's job, never a pre-tint (`placeholder_material`) | skill `c3d-scene-atmosphere` |-| a pond / terrace is a hard-edged plane sitting on the ground | water and terraces meet the ground without a visible seam: carving into `height_at` (`{{ env_file }}`) or dressing the seam (the zone) are options; water is named `…Water` | skill `c3d-scene-water`; skill `c3d-bpy-scene-placement` |-| `floating` / `sunken` / `interpenetration` / `unsupported` (the placement gate's metres) | move the root by the printed metres: its lowest evaluated vertices onto `ctx.height_at` or its support, boxes apart; a rock may sit a third in, a crate may not | contract § Placement; skill `c3d-bpy-scene-placement` |-| "camera is N m below ground level" / `camera_in_geometry` | the eye must be above the ground under it and ≥ 0.5 m from any surface: move the subject or the zone's placement; the landform is the brief's | contract § What else the gates measure |-| identical cones / stacked blocks / primitive repetition | identical copies and primitive stacks are what the judge reads (`monotonous_vegetation`); a tree branches into limbs carrying leaf or needle cards, a rock is irregular (`asset_quality_detail`); vary where the brief has natural variety, regular things stay regular | the zone brief § 2 |-| sparse, token, "a diorama on a plane", empty midground | the brief's stated counts are requirements (the census compares them); empty regions the brief would fill get what it implies (`undressed_scene`, `empty_midground`) | the zone brief § 1; skill `c3d-scene-composition` |-| flat / dark / monochrome light, black shade, `dark_frame` | measured per camera (`mean_lum` / `dark_frac` / `blown_frac`); the brief's time of day and light sources decide; the lighting skill lists starting values that have passed | skill `c3d-bpy-scene-lighting`; skill `c3d-scene-night` |-| frames at t=0 and t=1.5 identical, "nothing moves", `nothing_moves` | the frame difference is measured per camera: LINEAR keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` or `frame * k`; `python_driver` = a driver that needs Python, rewrite it | contract § Motion; skill `c3d-scene-motion` |-| `hard_edged_particles`, "sharp-edged quads / spheres / discs for steam, dust, sparks", the brief's "soft particle effect" must-item unverified | the finding measures sharp-edged particle geometry: in Cycles only a volume renders edgeless (a `ShaderNodeVolumePrincipled` into the Material Output's `Volume`, no surface shader), one root tagged free, moving ≥ 0.6 m | contract § What the renderer does |-| "plastic", "one grey material", `placeholder_material` | flags a surface with no authored colour / roughness; every surface needs a material that matches what it is, varied at more than one scale (broad tone and wear plus fine grain or bump) | skill `c3d-bpy-scene-materials` |-| `zone_error` / `asset_error` (a dropped module) | the named `file:line` — fix the raise; Blender 5.2 facts (no `use_nodes`, `Factor` not `Fac`, `ShaderNodeMix`, `Action.fcurves` is gone, GN inputs via `mod.properties.inputs`) | contract § Blender 5.2 API facts |-{% if current_files %}--## Current file contents (edit and return each COMPLETE)-{% for path, body in current_files.items() %}---- {{ path }} ----```-{{ body }}-```-{% endfor %}-{% endif %}-{% if tool_cards and not single_shot %}--## Tools-{{ tool_cards }}-Run `build` → `check_placement` → fix → `build` after editing (and `scene_probe` for the census);-finish only when both are clean. `artifacts/scene_probe.json` is the probe driver's raw dump (thousands of-lines); `check_placement` returns the placement rows, each with its gap and the tolerance it was measured-against. `check_placement` measures floating / sunken / unsupported /-interpenetrating assets deterministically — its numbers, not your impression. `scene_views` prints the-frame table and the MEASURED MOTION per camera — use those numbers, not your impression.-{% endif %}--## Output-{{ output_format }}diff --git a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_zone_bpy.j2 b/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_zone_bpy.j2deleted file mode 100644index ef0d4d7e..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/tracks/scene_zone_bpy.j2+++ /dev/null@@ -1,133 +0,0 @@-# Zone `{{ zone_name }}` of `{{ title }}` — write `{{ zone_file }}`--Scene: {{ spec_prompt }} · Setting: {{ setting }} · Mood: {{ mood }}--## This zone-- Description (the brief's facts in it are binding; its counts are the layout's intent, checked against the placement census): {{ zone_description }}-- Bbox (Z up, −Y front, metres — already converted from the plan): {{ zone_bbox }} — placed assets are- measured against it and the plan bounds (a planned content entirely outside the bounds + max(5 m, 10 % of the- span) is `out_of_bounds`, a WARN; scenery may continue past them as the place implies); seat each on- the ground via `ctx.height_at(x, y)` or on the surface it stands on.-{% if interior %}- INTERIOR: the shell (floor, walls, lid) is `env.py`'s; a partition, counter or alcove this zone needs- is yours, seated and clear of the shell (placement gate). A window or door is an OPENING env cut:- glazing and door leaves go in the opening, not through the wall.-{% endif %}- Contents (asset names to place): {{ zone_contents | join(', ') if zone_contents else '(none — build local detail from bmesh)' }}-- Every asset in `ctx.assets` is a Collection AT THE SIZE the asset API states and is measured as ONE- object against the plan's `approx_size_m`: a WARN beyond 2.5 × (or under 1 / 2.5), an ERROR beyond 4 ×- (`scale`), and the judge's `wrong_scale` on top (measured 2026-09-08, round 0: a 1.15 m stove placed at- 3.60 m, 0.48 m oil lamps at 0.03 m — both cost the round). Never re-scale to fit or stretch a part of- an instance; a chimney, pipe or cable that must reach further is a SEPARATE object you add beside it.--{% if layout is defined and layout %}## Zone director's layout (the contents it names are measured as present; its positions and counts are the director's proposal, world metres (x, y) in THIS frame — keep them unless the place reads better otherwise)-{{ layout }}--{% endif %}Neighbouring zones (their builders place there; a thing of yours running into a thing of theirs is an-`interpenetration` row like any other):-{% for n in neighbours %}- {{ n }}-{% endfor %}-{% if shared is not defined or shared %}-Authored cameras that will photograph this scene (Z up, metres; nothing may sit inside or within-0.5 m of a lens — `scene_views` camera_checks, `camera_in_geometry` cap 0.50 — and no more than 5 of a-camera's 9 sight rays may end within 1.5 m, `camera_blocked`, the same cap; the framing is this zone's-choice):-{{ cameras }}--## Assets available (sizes are measured, metres)-{{ asset_api }}--Place one as a collection-instance Empty — `bpy.data.objects.new(name, None)` with `instance_type =-'COLLECTION'` and `instance_collection = ctx.assets['<snake>']`, linked into `ctx.collection` and seated-on the ground (= ONE placement row); many copies are many Empties. No harness library ships in this-workspace: everything this zone builds is raw `bpy` / `bmesh` / `mathutils` (an import of `lib` is a lint-ERROR). Shared materials and the terrain come from the environment:-`ctx.env[...]` (the keys `build_env` returned), `ctx.height_at`; zones may also `from env import …`-whatever `env.py` defines at module level. A hero GLB is already imported for you as-`ctx.assets['<snake>']` — instance it, never import a file. There is no `ctx.rand` and no-`ctx.materials`; randomness is `rng = ctx.rng(<seed>)`.--## Contract-{{ frame_doc }}-{{ contract }}--### The harness assembles `{{ entry_file }}` and runs YOUR module like this — nothing else runs-```python-ctx.collection = <this zone's own Collection, active> # bpy.ops primitives land in it-out = zones.<snake>.build(ctx) # the function MUST be named `build`, one argument-# a raise = this zone DROPPED (file:line reported), everything it made removed; the rest builds-```-So `{{ zone_file }}` defines `def build(ctx) -> bpy.types.Collection` that links everything into-`ctx.collection` and returns it. `build_{{ zone_name }}`, `main` and `register` are never called.-Animation is DATA: keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` (their f-curves on the slotted-action: `action.layers[0].strips[0].channelbag(action.slots[0]).fcurves`) and simple drivers of-`frame`; there is no per-frame hook.--## What this zone is graded on (the requirement, and how it is measured)-1. **What the description names is here.** Counts the plan states are compared with the placement- census (`missing_planned_element`, `empty_zone`), and a place that reads as sparse for what the brief- describes is judged `undressed_scene`. Place props where the setting puts them; regular arrangements- only where the brief implies them; scatter positions are yours to compute, seeded with `ctx.rng(seed)`.-2. **Repeated natural elements read as individuals** from the cameras (judge `monotonous_vegetation`:- one shape stamped many times, in a ring or a grid). Source variants that differ in silhouette and hue- (`build_<snake>(ctx, variant=k)`), per-instance rotation / scale and an Object Info `Random`-driven tint- are ways; regular things (a colonnade, a row of bollards) stay regular. A tree is a trunk branching- into limbs that carry leaf or needle cards, a rock an irregular asymmetric mass — never a cone, a ball- on a stick or a cube standing in for one (`asset_quality_detail`).-3. **Seated, and clear of each other — measured.** Every placed root object rests on the surface it- stands on (the gate samples up to 5 foot columns in its foot band — the evaluated vertices within- max(0.02 m, 5 % of its height) of its lowest one: move the root by the smallest `ctx.height_at(x, y) - z`- over that band's world-space vertices, or onto its support's top):- a foot 0.05 m up is `floating` (ERROR at 0.08 m), 0.10 m under is `sunken` (ERROR at 0.20 m), two- boxes sharing > 10 % of the smaller one are `interpenetration` (ERROR at 35 %). Compare the world- bounding boxes of your roots AND the neighbours' placed things pair by pair before you finish.- `obj["placement"] = "free"` only for things that hang in the air; the share of tagged things is- reported. A built thing on soil must not read as pasted on (judge `flat_ground`: undressed seams):- a few centimetres of sink (the gate allows up to 0.10 m) or dressing along the seam are options; a- ground feature (a pond, a bed, a terrace) must not read as a plate on the terrain from the overview- cameras — carving in `height_at` (the env's) or a built edge both work.-4. **The cameras stay clear.** No authored camera may be inside or blocked by what this zone builds- (`scene_views` camera_checks: nothing within 0.5 m of a lens, `camera_in_geometry`; 6 of 9 sight- rays within 1.5 m, `camera_blocked` — each an ERROR capped at 0.50): keep scatter points out of a- radius around every lens. Framing is yours.-5. **Motion that shows.** The harness DIFFERENCES the t=0 and t=1.5 frames per camera and reports the- number: a camera moves when ≥ 0.4 % of its pixels change by more than 8/255 (or ≥ 0.08 % by more- than 60/255); no authored camera moving is `no_motion` (ERROR), the judge's `nothing_moves`.- Keyframes on `ctx.frame(0.0)` / `ctx.frame(1.5)` (LINEAR) or a simple driver of `frame`; what moves- is the brief's (amplitudes that have registered at 1024 × 576: ≥ 0.10 rad, ≥ 0.05 m, a particle /- leaf / boat ≥ 0.6 m per 1.5 s).-6. **One root = one thing; names unique.** `check_placement` measures each root object in- `ctx.collection` as one placed thing: a multi-part prop has one root (a mesh, a parent Empty, a- collection instance) and every root a unique name (`f"{base}_{i}"`). Stay inside the triangle- budget `scene_probe` reports; collection instances and geometry-nodes clouds (an Instance on Points- tree over a patch) are the cheap ways to repeat, and the lint warns on `bpy.ops.mesh.primitive_*`- inside a loop.-7. **A soft particle has no silhouette.** In Cycles only a volume renders without an edge (a- volume-only material: `ShaderNodeVolumePrincipled` into the Material Output's `Volume`, no surface- shader); a translucent surface puff, metaball, torus or disc is graded `hard_edged_particles` and- fails the brief's must-item. It is one root tagged free, and it moves ≥ 0.6 m between the two frames.-8. **Surfaces read as their material** (judged `placeholder_material`): every large surface varies at- more than one scale — broad tone and wear over metres AND fine grain or bump over centimetres — in a- node tree you wire; one constant colour per surface reads as a placeholder.--## DON'T-- No world, no sun, no cameras, no ground here (the env's; the lint rejects a world in a zone); the local- lights the brief's place has are yours.-- No file IO, no image textures, no `random.*` (`ctx.rng(seed)`), no Python drivers, no `scene.*` settings.-- Do not place assets marked NOT AVAILABLE; do not edit other files.-{% if tool_cards and not single_shot %}--## Tools-{{ tool_cards }}-After editing run `build` → `check_placement` (it names every asset that floats, is sunken, touches-nothing or interpenetrates another, with the exact "lower X by 0.23 m onto Ground" fix; a-deliberately airborne thing gets `obj["placement"] = "free"`) → fix → `build` again, then-`scene_views` and LOOK at the frames against the brief, and read the MEASURED MOTION line it prints —-STATIC means this zone's motion is below the threshold.-{% endif %}-{% if effects_catalog is defined and effects_catalog %}--{{ effects_catalog }}-{% endif %}--## Output-{{ output_format }}-{% endif %}diff --git a/harness/codeverse3d/prompts/variants/argon_raw/variant.toml b/harness/codeverse3d/prompts/variants/argon_raw/variant.tomldeleted file mode 100644index 7d10255d..00000000--- a/harness/codeverse3d/prompts/variants/argon_raw/variant.toml+++ /dev/null@@ -1,20 +0,0 @@-# The `argon_raw` variant: gemini-4-argon writes EVERY line of a scene_blender scene. D113, 2026-10-17.-#-# Raw mode: no harness bpy library ships into the workspace (Settings.scene_lib off, the knob-# below), so every mesh, material, light, world and motion of the scene is the model's raw-# bpy / bmesh. The files beside this one shadow the scene_blender prompts (system, contract,-# asset, effects catalog), the four bpy stage templates and the bpy planner with copies that name-# no library; codeverse3d/skills/variants/argon_raw/ shadows the three bpy skill bundles likewise.-#-# Selection is explicit, never a regex over the model id:-# 3dcode make "..." --track scene --language scene_blender --variant argon_raw-# or C3D_VARIANT=argon_raw. `generators` below is informative.--[variant]-name = "argon_raw"-version = 1-generators = ["agy:gemini-4-argon"]-description = "gemini-4-argon on scene_blender in raw mode: no harness library, every line of bpy is the model's"--[knobs] # applied like a profile: a field the user stated (config.yaml / C3D_*) wins-scene_lib = false # no harness library in the skeleton; a `lib` import is a lint ERROR (D113)diff --git a/harness/codeverse3d/skills/_claims/c3d-bpy-scene-materials.toml b/harness/codeverse3d/skills/_claims/c3d-bpy-scene-materials.tomlindex d98e6712..87df9ff5 100644--- a/harness/codeverse3d/skills/_claims/c3d-bpy-scene-materials.toml+++ b/harness/codeverse3d/skills/_claims/c3d-bpy-scene-materials.toml@@ -1,5 +1,4 @@# This bundle quotes no number from live code: the socket names and node ids are Blender 5.2.2# facts (the languages/blender lint tables hold the rename list as strings, not numeric-# constants), the recipe arguments are the agent's (`<placeholders>`), and the lib defaults it-# relies on (glass IOR, foliage variants) are keyword defaults in src/lib/materials.py, which the-# grammar cannot pin. Nothing to pin; the file exists so the claims check finds an empty table.+# constants) and the recipe arguments are the agent's (`<placeholders>`). Nothing to pin; the+# file exists so the claims check finds an empty table.diff --git a/harness/codeverse3d/skills/c3d-bpy-scene-lighting/SKILL.md b/harness/codeverse3d/skills/c3d-bpy-scene-lighting/SKILL.mdindex 5f491eb7..8b5bc96b 100644--- a/harness/codeverse3d/skills/c3d-bpy-scene-lighting/SKILL.md+++ b/harness/codeverse3d/skills/c3d-bpy-scene-lighting/SKILL.md@@ -1,12 +1,12 @@---name: c3d-bpy-scene-lighting-description: "Use when lighting a scene_blender env, zone, refine or rebuild session, or when scene_frames called a Blender frame too dark, blown out or flat. The harness renders with Cycles under AgX at exposure 0 and owns every render setting, so lamp energies, the world strength and the albedos are the only dials. Gives what the frame gate measures with its thresholds, the exposure bands measured for sky, sun, night, practical and interior setups under this renderer, the interface facts (the world is build_env's, what the census counts as atmosphere, which ceilings the overview rig lifts), lib.sky and lib.lighting as an optional toolbox, why an emissive mesh is not a lamp at 32 samples, and how to prove the band on every camera including the harness rig."+description: "Use when lighting a scene_blender env, zone, refine or rebuild session, or when scene_frames called a Blender frame too dark, blown out or flat. The harness renders with Cycles under AgX at exposure 0 and owns every render setting, so lamp energies, the world strength and the albedos are the only dials. Gives what the frame gate measures with its thresholds, the exposure bands measured for sky, sun, night, practical and interior setups under this renderer, the interface facts (the world is build_env's, what the census counts as atmosphere, which ceilings the overview rig lifts), the sky, lamps and fog through bpy.data, why an emissive mesh is not a lamp at 32 samples, and how to prove the band on every camera including the harness rig."license: Apache-2.0compatibility: Blender 5.2.2 LTS headless, scene_blender runtime; Cycles 32 samples + OIDN, AgX view transform, look None, exposure 0 — all harness-owned (render_bpy_scene.setup_render).metadata:evidence: mixedevidence_note: 'The gate thresholds are read from live code (spatial/frame_metrics.py, runtime_js/lib/host_metrics.mjs) and the render setup from languages/wrappers/render_bpy_scene.py on 2026-10-14; the exposure bands were measured that day on Blender 5.2.2 LTS with that exact setup on a synthetic test scene (references/exposure-bands.md says how), not on run output. The corpus half is empty: the argon loop iteration 0 (2026-10-15) has not yet been tabulated per frame finding.'- verified: "2026-10-15"+ verified: "2026-10-17"target_metric: "bpy_exposure_findings"target_direction: "down"target_unit: "findings per run"@@ -69,47 +69,49 @@ picture pass are an order of magnitude stronger than the ones that make the fixtharness-owned lint ERROR. Zones add lamps.* **Requirement: one consistent sun direction, shadows that do not fight** (judged) **and everyframe in the band** (measured). A physical sky with its disc on plus a sun lamp measured 0.83,- washed, with doubled shadows; so did a second sun lamp in a zone. `lib.sky.sun_world(scene, elevation_deg=..., azimuth_deg=..., strength=..., dust=...)`- and `lib.lighting.sun(collection, azimuth_deg=..., elevation_deg=..., color=..., energy=..., angle_deg=...)`- are a matched pair (the world's disc off, the lamp casting the shadows, the same compass- angles); a hand-built world is fine when it meets the same. A dark day moves with the albedos+ washed, with doubled shadows; so did a second sun lamp in a zone. A matched pair is a world+ whose `ShaderNodeTexSky` (`sky_type = 'MULTIPLE_SCATTERING'`) has its sun disc off and a Sun+ lamp (`bpy.data.lights.new(name, "SUN")`, energy in W per square metre, `angle` for the+ softness) casting the shadows, both at the same compass angles; a Sun shines down its local+ -Z, so its rotation is the elevation's complement about X, then the azimuth plus 90 degrees+ about Z. A dark day moves with the albedosand the sun's `energy` more than with the world strength (the second and third rows).-* **The brief's hour decides the palette; the band still applies.** `lib.sky.gradient_world(scene, stops, clouds=..., strength=...)`- and `lib.sky.night_world(scene, color=..., strength=...)` with a low or cool `sun` are measured- ways to sit in it for dusk, overcast and night; a warm key under a cool sky (a sky texture+* **The brief's hour decides the palette; the band still applies.** A world Background fed by a+ ColorRamp over the view direction's Z (horizon to zenith), or a flat deep night colour at a low+ strength, with a low or cool Sun lamp, are measured ways to sit in it for dusk, overcast and+ night; a warm key under a cool sky (a sky texturegives that for free) is what keeps shade from reading black or the frame from reading oneorange tone (judged). Soft shadows come from a light's size (`angle` on a sun, `size` on anarea lamp), which is one lamp, not two.* **Interface: atmosphere is counted from the census.** The `no_fog` plan check fires when thecensus finds no volume at all; a volume-only mesh (only the Material Output's Volume socket- linked) counts, and the placement gate ignores it. `lib.sky.haze(collection, loc, size, density=..., color=...)`- makes one as a box; a local mist over a pond or a hollow, or a light shaft (a higher+ linked, fed by a `ShaderNodeVolumePrincipled`) counts, and the placement gate ignores it. A box+ mesh with that material is the simplest one; a local mist over a pond or a hollow, or a light shaft (a higher`Anisotropy` where the sun crosses an opening) is the same material on any volume-only mesh. Aworld volume over a large scene measured as swallowing the sun and flattening the frame. Howthick the air is, and its colour, is the brief's; `fog_short` warns when the density woulddissolve the plan's own span.-* **Lamps in zones are yours** — `lib.lighting.area_light`, `point_light`, `spot`, and- `practical(collection, name, loc, color=..., energy=..., size=..., target=...)`, a small soft- area lamp beside a lantern, window, fire or sign, aimed with `aim`. Its default energy is the- fixture's own glow on the surfaces beside it, not illumination that carries a frame: two of- them at that default measured `mean_lum` 0.05 (an ERROR); hundreds of watts each is where a- night frame passed. The lib creates lamps through `bpy.data.lights.new`; operators in a loop- are a hang-risk lint finding, and `bpy.ops.object.light_add` wants a view-layer context the- build does not give.+* **Lamps in zones are yours** — `bpy.data.lights.new(name, "AREA" | "POINT" | "SPOT")` on an+ object linked into `ctx.collection`; a "practical" is a small soft area lamp beside a lantern,+ window, fire or sign, aimed at what it lights. A glow-sized energy (tens of watts) lights the+ surfaces beside it, not a frame: two such lamps measured `mean_lum` 0.05 (an ERROR); hundreds+ of watts each is where a night frame passed. Create lamps through `bpy.data.lights.new`;+ operators in a loop are a hang-risk lint finding, and `bpy.ops.object.light_add` wants a+ view-layer context the build does not give.* **An emissive mesh is the look, not the light.** Cycles does scatter light from an emissivesurface, but a fixture-sized emitter throws almost nothing a frame can measure: two 0.15 memissive spheres at the strengths that make a lantern read as lit left the night frame at`mean_lum` 0.03, and at forty times that strength — white blobs — it was still an ERROR; the- same scene passed once each sphere had a 500 W `practical` beside it (reference, section 4).- Emission on the fixture (`lib.materials.emissive`), illumination in a lamp, and the emission- modest: AgX pulls a saturated emitter toward white, so a strong neon tube renders as a white bar.+ same scene passed once each sphere had a 500 W practical area lamp beside it (reference,+ section 4). Emission on the fixture (`Emission Color` with a modest `Emission Strength`),+ illumination in a lamp, and the emission modest: AgX pulls a saturated emitter toward white, so a strong neon tube renders as a white bar.* **Interiors.** The band applies on every authored camera inside, and the overview rig lifts alid it can identify: a mesh named `Ceiling…` whose parent is named `RoomShell…` and whoseevaluated bbox top is below the camera is hidden for that rig frame (`lift_lids` in- `render_bpy_scene`, the three.js host's rule). `lib.architecture.room_shell` builds a shell- named that way; a ceiling area lamp sized to the room measured 0.34-0.82 at 50-800 W, and an- emissive window pane with an `area_light` just inside it is one way to light a room by day. The- indoor placement tolerance is tighter, so a lamp on a table is a `rest_on` case too.+ `render_bpy_scene`, the three.js host's rule): name your shell that way. A ceiling area lamp+ sized to the room measured 0.34-0.82 at 50-800 W, and an emissive window pane with an area+ lamp just inside it is one way to light a room by day. The indoor placement tolerance is+ tighter, so a lamp on a table is seated on the table's top too.* **Albedo before light.** A ground whose Base Color is near black stays dark under any sun, and aplaster wall clips under the sun that lights a lawn correctly. The large surfaces' albedo is thestrong dial (the third row), the sun the weak one, the practicals the local one.@@ -120,15 +122,15 @@ Target: the "dim but lit" band on every authored camera — mean low, `lum_std`mostly black. Both ends fail: a sky-lit average on a lantern scene is a grey wash (a flat frame,and the judge's unlit-or-blown defect), and glowing fixtures with no lamps behind them are a blackframe with stickers. Measured on this renderer: a low night world, each fixture paired with a-`practical` at hundreds of watts so the pools overlap into a readable picture, dark materials+practical area lamp at hundreds of watts so the pools overlap into a readable picture, dark materialswith a low but non-zero Base Color and shadows left dark reached the band; a fill lamp that liftsthe mean pushed it to a flat wash.## The hero must be visibleThe frames gate also reports `hero_unseen` and `hero_small_in_its_camera`; a hero in shadow at-night is a hero the judge cannot find. Its own key — a `practical` or a `spot` aimed at it with-`aim(obj, target)` — and a look at its camera's frame.+night is a hero the judge cannot find. Its own key — a practical area lamp or a spot aimed at it (a Track To constraint, or a+rotation computed from the direction) — and a look at its camera's frame.## Prove itdiff --git a/harness/codeverse3d/skills/c3d-bpy-scene-lighting/references/exposure-bands.md b/harness/codeverse3d/skills/c3d-bpy-scene-lighting/references/exposure-bands.mdindex e48f96ab..39954cbb 100644--- a/harness/codeverse3d/skills/c3d-bpy-scene-lighting/references/exposure-bands.md+++ b/harness/codeverse3d/skills/c3d-bpy-scene-lighting/references/exposure-bands.md@@ -73,7 +73,7 @@ Flat dark-blue world (a night sky colour at strength 0.3), a = 0.3, no sun:| + two point lamps 3 m up, 100 W | 0.06 / 0.04 / 0.11 | 0.05 / 0.06 / 0.59 | ERROR || + two point lamps, 500 W | 0.13 / 0.12 / 0.07 | 0.14 / 0.13 / 0.21 | passes || + two point lamps, 2000 W | 0.25 / 0.22 / 0.04 | 0.28 / 0.20 / 0.09 | passes with room to spare |-| + two practical area lamps 2.5 m up, 45 W | 0.05 / 0.05 / 0.35 | 0.04 / 0.07 / 0.79 | ERROR: the lib's practical default is a glow, not illumination |+| + two practical area lamps 2.5 m up, 45 W | 0.05 / 0.05 / 0.35 | 0.04 / 0.07 / 0.79 | ERROR: a glow-sized lamp, not illumination || + two practicals, 150 W | 0.08 / 0.09 / 0.14 | 0.08 / 0.12 / 0.55 | ERROR on the eye camera; the overview is dim-but-lit || + two practicals, 500 W | 0.14 / 0.16 / 0.07 | 0.14 / 0.18 / 0.28 | passes || + two 0.15 m emissive spheres 2.5 m up, strength 5 (no lamps) | 0.03 / 0.04 / 0.57 | 0.01 / 0.03 / 0.99 | ERROR: the fixtures glow, the ground does not |@@ -89,18 +89,16 @@ emissive fixture is not that lamp: its strength decides how the fixture looks, amean barely moves until the fixture is a white blob, which the judge grades as blown.```python-from lib import lighting, materials, sky--def build_env(ctx): # a lantern-lit night, one way- sky.night_world(ctx.scene, color=<deep blue hex>, strength=<low>)- lighting.sun(ctx.collection, azimuth_deg=<behind the hero>, elevation_deg=<low>, color=<cool hex>,- energy=<a fraction of one>, name="Moon")- sky.haze(ctx.collection, <centre>, <size>, density=<thin>, color=<the sky colour>)--# in a zone: each fixture is a look (emissive) AND a light (practical)-mat = materials.emissive("LanternGlow", <warm hex>, <modest strength>)-lighting.practical(ctx.collection, "LanternLight_0", (x, y, z), color=<warm hex>,- energy=<hundreds of watts>, size=<the fixture's size>, target=<the ground below it>)+def lamp(ctx, name, kind, loc, color, watts, size=0.4): # a lantern-lit night, one way+ light = bpy.data.lights.new(name, kind)+ light.energy, light.color = watts, color+ if kind == "AREA":+ light.size = size+ ob = bpy.data.objects.new(name, light)+ ob.location = loc+ ctx.collection.objects.link(ob)+ return ob+# each fixture: an emissive skin (the look) AND lamp(ctx, f"LanternLight_{i}", "AREA", ..., <hundreds of W>)```## 5. Interiors@@ -119,13 +117,13 @@ Interiors need tens to hundreds of watts per lamp, and the failure mode above aflat band (one pale tone), not clipping — AgX refused to blow out even the 3000 W room.```python-from lib import architecture, lighting-def build_env(ctx): # a lit room- walls = architecture.room_shell(ctx.collection, <wall material>, center=<c>, extents=<e>, openings=<...>)- lighting.area_light(ctx.collection, "Ceiling_0", (<cx>, <cy>, <just under the ceiling>), <warm white hex>,- <tens to hundreds of watts>, size=<about a metre>, target=(<cx>, <cy>, 0.0), shape="SQUARE")- ...+ ... # the shell: walls, floor and a lid named Ceiling... under RoomShell...+ lid_lamp = bpy.data.lights.new("CeilingLight_0", "AREA")+ lid_lamp.energy, lid_lamp.size, lid_lamp.shape = <tens to hundreds of watts>, <about a metre>, "SQUARE"+ ob = bpy.data.objects.new("CeilingLight_0", lid_lamp)+ ob.location = (<cx>, <cy>, <just under the ceiling>) # an area lamp shines down its -Z+ ctx.collection.objects.link(ob)```## 6. The checkdiff --git a/harness/codeverse3d/skills/c3d-bpy-scene-materials/SKILL.md b/harness/codeverse3d/skills/c3d-bpy-scene-materials/SKILL.mdindex ca3add1f..aa638e43 100644--- a/harness/codeverse3d/skills/c3d-bpy-scene-materials/SKILL.md+++ b/harness/codeverse3d/skills/c3d-bpy-scene-materials/SKILL.md@@ -1,12 +1,12 @@---name: c3d-bpy-scene-materials-description: "Use in every scene_blender env, zone, asset or refine session that authors a surface — ground, walls, props, foliage, water, glass, a glowing sign, steam. Cycles renders every node you wire, but the harness's census reads only three Principled sockets, so no gate rewards material work and the judge penalises the lack of it. Gives the Blender 5.2 node facts (no use_nodes, the 4.x socket names, ShaderNodeMix), what the judge names and what it measures, lib.materials as an optional palette, variation across copies without identical twins, ground that varies where the brief's surface does, water, glass and emissive done as dielectrics and fixtures, soft particles as volumes, and what to zoom on before you finish."+description: "Use in every scene_blender env, zone, asset or refine session that authors a surface — ground, walls, props, foliage, water, glass, a glowing sign, steam. Cycles renders every node you wire, but the harness's census reads only three Principled sockets, so no gate rewards material work and the judge penalises the lack of it. Gives the Blender 5.2 node facts (no use_nodes, the 4.x socket names, ShaderNodeMix), what the judge names and what it measures, the node practices for multi-scale surfaces, variation across copies without identical twins, ground that varies where the brief's surface does, water, glass and emissive done as dielectrics and fixtures, soft particles as volumes, and what to zoom on before you finish."license: Apache-2.0compatibility: Blender 5.2.2 LTS headless, scene_blender runtime; Cycles 32 samples + OIDN under AgX (the harness's render settings), Principled BSDF 4.x socket names.metadata:evidence: mixed- evidence_note: 'The census facts are read from live code on 2026-10-14 (wrappers/_census_glb.py, wrappers/_census.py, the languages/blender lint tables verified against Blender 5.2.2 LTS) and the defect wording from the scene judge rubric; the recipes restate the scene_blender starter library. The corpus half is the argon loop iteration 0 of 2026-10-15 (30 scene_blender runs): 8 scenes built hard-edged particles from surface shaders.'- verified: "2026-10-15"+ evidence_note: 'The census facts are read from live code on 2026-10-14 (wrappers/_census_glb.py, wrappers/_census.py, the languages/blender lint tables verified against Blender 5.2.2 LTS) and the defect wording from the scene judge rubric. The corpus half is the argon loop iteration 0 of 2026-10-15 (30 scene_blender runs): 8 scenes built hard-edged particles from surface shaders.'+ verified: "2026-10-17"target_metric: "flat_principled_materials"target_direction: "down"target_unit: "materials whose Base Color, Roughness and Metallic are all unlinked constants (prospective census)"@@ -45,33 +45,31 @@ fact that does bite — a mesh with no material at all is warned as exporting grpolygon starts on slot 0, and the census warns about slots no polygon uses — the part wasauthored in four colours and exports in one.-## The palette — `lib.materials`, one option--Every call takes a name and returns a material; colours are sRGB hex strings (`rgba` decodes-them to linear). Procedural detail reads OBJECT coordinates, so `noise_scale` is features per-metre whatever the object's size, and the lib's own band for a non-emissive albedo is 0.02-0.8-linear: pure black reads as a hole, pure white as a blown surface. Nodes you wire yourself do the-same job (`references/principled-recipes.md` has the snippets).--| want | call |-|---|---|-| a surface with value variance | `material(name, color, roughness=..., metal=..., noise_scale=..., bump=..., emission=...)` — `noise_scale` above zero adds the low-contrast variation that stops a large surface reading as a flat placeholder (judged); where the brief's material has it |-| stone, brick, plaster | `masonry(name, color, mortar=..., scale=...)`, `limestone(name, color, scale=...)`, `ashlar(name, color)`, `mineral_surface(name, color, stone=...)` |-| wood | `woodgrain(mat, dark=..., light=..., direction=...)` on an existing material |-| worn paint, used metal | `chipped_paint(mat, paint, substrate, scale=...)`, `worn_alloy(name, color, seed=..., metal=...)` |-| foliage, snow, ice | `foliage(name, color, variants=3)` returns a LIST of variant materials; `snow(name)`, `ice(name)` |-| water | `water(name, color=..., roughness=..., scale=..., flow=..., ctx=ctx)` for a tinted, moving surface; `clear_water(name)` for shallow, almost colourless water (a basin, a bowl, a stream) |-| glass | `glass(name, color=..., roughness=..., ior=...)` |-| a glowing fixture | `emissive(name, color, strength)` — the look only; the light is a `practical` lamp (c3d-bpy-scene-lighting) |-| steam, smoke, dust, mist | `volume(name, color, density=..., anisotropy=..., noise_scale=..., emission=...)` — volume-only, no silhouette |-| a copy that is not a twin | `tint(mat, variant)` — a copy with its Base Color shifted, one per VARIANT and shared by that variant's copies; it leaves a LINKED Base Color alone, so a noise-mapped material gets its variant from `material` called with another colour |+## Surfaces in nodes — what reads as photoreal++Every material is a node tree you wire on `mat.node_tree`. What the judge reads+as real is variation at MORE THAN ONE SCALE, in object or generated coordinates so it is metres+whatever the object's size:++| scale | what carries it | nodes |+|---|---|---|+| metres — tone, wear, damp, sun-bleach | a low-frequency mask mixing two close colours | Noise texture (`Scale` ~0.2-1 per metre) into `ShaderNodeMix` (RGBA) |+| decimetres — courses, planks, patches | a pattern the material has | Brick / Wave / Voronoi texture, or a ColorRamp over noise |+| centimetres — grain, pores, grit | fine bump and roughness breakup | Noise / Voronoi (`Scale` 20-200) into `ShaderNodeBump` and through a Map Range into `Roughness` |++Keep non-emissive albedos inside 0.02-0.8 linear: pure black reads as a hole, pure white as a+blown surface. A copy is not a twin when its variant picks other colours or an Object Info+`Random` drives a small hue shift (below). A glowing fixture is `Emission Color` with a modest+`Emission Strength` — the look only; the light is a lamp (c3d-bpy-scene-lighting). Steam, smoke,+dust and mist are a volume-only material (below). Node snippets in+`references/principled-recipes.md`.## Variation without twinsCollection instances share the source collection's materials, so per-instance tinting is not"edit the material". Variation across copies comes from (a) several SOURCE variants —-`build_<snake>(ctx, variant=k)` picking a different `foliage` entry or `tint` — placed in-rotation, (b) per-instance scale and yaw from `lib.scatter.scatter`, and (c) for one material+`build_<snake>(ctx, variant=k)` building with other colours and another silhouette — placed in+rotation, (b) per-instance scale and yaw on each instance Empty, and (c) for one materialover many copies, an Object Info node's `Random` output driving a hue shift, which Cyclesevaluates per instance. The `stamped_ring` plan check measures rings of identical copies at oneradius, and the judge calls the result monotonous vegetation.@@ -80,42 +78,40 @@ radius, and the judge calls the result monotonous vegetation.Requirement (judged): the ground does not read as one flat untextured colour where the brief'ssurface would vary, and the seam where structures meet it does not read as a hard undressed line.-`lib.terrain.ground` takes ONE material, so the variation lives inside it or in the mesh's own+A ground mesh usually carries ONE material, so the variation lives inside it or in the mesh's ownattributes. Options, by what the brief's place has: a slope mix (the Geometry node's `Normal`,its Z through a ColorRamp into the mix factor) and a height mix (object Z from TextureCoordinate) for natural ground; a worn band as a noise-masked colour along the routes people-take; a darker or rougher apron, or ground cover (`gn_scatter`, `grass_patch`), at the feet of-big structures; a colour attribute on the ground mesh read by a Color Attribute node when the-bands are easier to paint per vertex than to compute per pixel; paving (`lib.architecture.paving`,-`paving_grid`) where the ground is built, not grown. A polished floor or a plaza that IS one+take; a darker or rougher apron, or ground cover (a geometry-nodes Instance on Points cloud), at the+feet of big structures; a colour attribute on the ground mesh read by a Color Attribute node when+the bands are easier to paint per vertex than to compute per pixel; paving (a Brick texture, or+modelled setts) where the ground is built, not grown. A polished floor or a plaza that IS onematerial is not a defect when its material reads as that material.## Water, glass, fog — dielectrics and volumes-* Water is a dielectric: `water` and `clear_water` set transmission, a low roughness and- `Metallic` at zero; a metallic mirror plane reads as chrome, not water. Moving water scrolls its- mapping node on `ctx.frame(t)` through `lib.motion.scroll`, which is why `water(..., ctx=ctx)`- wants the context.-* Glass is `glass`: full `Transmission Weight`, low roughness, the lib's default IOR. The bounce+* Water is a dielectric: `Transmission Weight` 1, a low roughness and `Metallic` at zero; a+ metallic mirror plane reads as chrome, not water. Moving water scrolls its Mapping node's+ `Location` input with keyframes on `ctx.frame(t)`.+* Glass: full `Transmission Weight`, roughness near zero, `IOR` about 1.45-1.5. The bouncebudget is the harness's, so a stack of transmissive layers along one sight line goes dark —one or two read.-* Fog is a VOLUME-ONLY material on any mesh (`lib.sky.haze` makes a box): only the Material- Output's Volume socket linked. A mesh with a surface shader as well is matter to the census — a+* Fog is a VOLUME-ONLY material on any mesh (a box is enough): only the Material Output's Volume+ socket linked. A mesh with a surface shader as well is matter to the census — ahuge placed asset enclosing everything — and the `no_fog` check does not count it as atmosphere.* Soft particles are volumes too. A surface shader always has a silhouette; 8 of the 30 argonBlender scenes of 2026-10-15 built steam from translucent ico-spheres, metaballs, stacked tori,- discs or polygon sparks and were graded `hard_edged_particles`. `lib.materials.volume` on a- cloud of spheres (one `Batch`, one object, tagged `placement = "free"`, moved with- `lib.motion.drift` or `sway` so the two judged frames differ) rendered with no edge, and 40- such puffs added 0.7 s to a 32-sample GPU frame; motes and sparks read as tiny `emissive`- spheres. Under a dim world a volume with zero `emission` comes out grey.+ discs or polygon sparks and were graded `hard_edged_particles`. A volume-only material on a+ cloud of spheres (one mesh, one object, tagged `placement = "free"`, keyframed so the two+ judged frames differ) rendered with no edge, and 40 such puffs added 0.7 s to a 32-sample GPU+ frame; motes and sparks read as tiny emissive spheres. Under a dim world a volume with zero `emission` comes out grey.## Emissive and metal under AgXAgX desaturates bright emitters toward white: a saturated sign needs a modest-`Emission Strength` and a coloured `practical` lamp beside it for the glow on the ground. Metals-need something to reflect — the sky world and the haze are what `worn_alloy` mirrors; a metal-under a black world is a black shape.+`Emission Strength` and a coloured area lamp beside it for the glow on the ground. Metals need+something to reflect — the sky world and the haze are what a worn metal mirrors; a metal under a+black world is a black shape.## Verify before you finishdiff --git a/harness/codeverse3d/skills/c3d-bpy-scene-materials/references/principled-recipes.md b/harness/codeverse3d/skills/c3d-bpy-scene-materials/references/principled-recipes.mdindex 6207b1d9..f3a11db1 100644--- a/harness/codeverse3d/skills/c3d-bpy-scene-materials/references/principled-recipes.md+++ b/harness/codeverse3d/skills/c3d-bpy-scene-materials/references/principled-recipes.md@@ -4,7 +4,7 @@ Companion to `c3d-bpy-scene-materials`. Socket names and node ids verified again5.2.2 LTS on 2026-10-14 (`codeverse3d/languages/blender/__init__.py` keeps the rename table thelint reports from). Every snippet assumes `mat = bpy.data.materials.new(name)` and`nodes, links = mat.node_tree.nodes, mat.node_tree.links`, `bsdf = nodes["Principled BSDF"]`.-Prefer the `lib.materials` call that does the same thing; write nodes only for what no call covers.+A material builder you reuse goes in `src/env.py` for the zones.## 1. Socket renames the lint reports@@ -38,8 +38,9 @@ links.new(noise.outputs["Fac"], bump.inputs["Height"])links.new(bump.outputs["Normal"], bsdf.inputs["Normal"])```-`lib.materials.material(name, color, noise_scale=..., bump=...)` wires exactly this; roughness-variation is the same noise into `Roughness` through a Map Range node.+Roughness variation is the same noise into `Roughness` through a Map Range node. For more than+one scale, add a second noise at a much larger `Scale` into the bump (grain) and keep the first+on the colour (tone); a Voronoi in between gives patches, cells or pebbles.## 3. Ground bands by slope and height@@ -101,14 +102,14 @@ vol.inputs["Density"].default_value = <0.002-0.02>links.new(vol.outputs["Volume"], nodes["Material Output"].inputs["Volume"])```-`lib.sky.haze(collection, loc, size, density=..., color=...)` builds this on a box; any mesh whose-only linked output is Volume is fog to the census. With the Surface socket linked as well it is a-placed asset to the gate. `lib.materials.volume` is the same shader with noise, for steam and mist.+Any mesh whose only linked output is Volume is fog to the census — a box over the play area is+the simplest. With the Surface socket linked as well it is a placed asset to the gate. The same+shader with a noise texture into `Density` is steam and mist.-## 7. Water and glass, as the lib sets them+## 7. Water and glass, the sockets that matter| material | the sockets that matter ||---|---|-| `water` / `clear_water` | `Transmission Weight` at one, `Roughness` low, `Metallic` zero, a bump from scrolled noise; the plane is named with a water word so feet on it count as on water |-| `glass` | `Transmission Weight` at one, `Roughness` near zero, `IOR` the lib's default; thin panes as single faces with a Solidify-free thickness read best at 32 samples |-| `emissive` | `Emission Color` and a modest `Emission Strength`; the illumination is a `practical` lamp |+| water | `Transmission Weight` at one, `Roughness` low, `Metallic` zero, a bump from scrolled noise; the plane is named with a water word so feet on it count as on water |+| glass | `Transmission Weight` at one, `Roughness` near zero, `IOR` about 1.45-1.5; thin panes as single faces with a Solidify-free thickness read best at 32 samples |+| emissive | `Emission Color` and a modest `Emission Strength`; the illumination is an area lamp beside it |diff --git a/harness/codeverse3d/skills/c3d-bpy-scene-placement/SKILL.md b/harness/codeverse3d/skills/c3d-bpy-scene-placement/SKILL.mdindex 912815d7..b347f0ff 100644--- a/harness/codeverse3d/skills/c3d-bpy-scene-placement/SKILL.md+++ b/harness/codeverse3d/skills/c3d-bpy-scene-placement/SKILL.md@@ -1,12 +1,12 @@---name: c3d-bpy-scene-placement-description: "Use in every scene_blender env, zone, refine or rebuild session that places anything, and whenever check_placement or the scene_placement gate reported a floating, sunken, unsupported, interpenetrating, cantilevered or out-of-bounds asset, too many free-tagged ones, or a world that ends at its bounds (world_edge). Everything placed is ONE row in a measured table and its feet are sampled against what is under them. Gives what the gate measures and on which geometry, how a collection instance differs from a geometry-nodes cloud, the requirements with their measurements, the lib.place / lib.scatter / lib.terrain calls as an optional toolbox that samples what the gate samples, the self-check, and the finding-to-fix table."+description: "Use in every scene_blender env, zone, refine or rebuild session that places anything, and whenever check_placement or the scene_placement gate reported a floating, sunken, unsupported, interpenetrating, cantilevered or out-of-bounds asset, too many free-tagged ones, or a world that ends at its bounds (world_edge). Everything placed is ONE row in a measured table and its feet are sampled against what is under them. Gives what the gate measures and on which geometry, how a collection instance differs from a geometry-nodes cloud, the requirements with their measurements, how to seat and check what the gate samples, the self-check, and the finding-to-fix table."license: Apache-2.0compatibility: Blender 5.2.2 LTS headless, scene_blender runtime; the gate measures the harness-written census GLB (the evaluated depsgraph), never the .blend.metadata:evidence: mixed- evidence_note: 'The instrument half is read from live code on 2026-10-14 (spatial/scene_placement.py, runtime_js/lib/host_placement.mjs, config.Placement, wrappers/_census_glb.py) and the lib calls from the scene_blender starter library. The corpus half is the argon loop iteration 0 of 2026-10-15 (30 scene_blender runs): 13 zones with an interpenetration ERROR, 9 of them a scatter into a hand-placed prop.'- verified: "2026-10-15"+ evidence_note: 'The instrument half is read from live code on 2026-10-14 (spatial/scene_placement.py, runtime_js/lib/host_placement.mjs, config.Placement, wrappers/_census_glb.py). The corpus half is the argon loop iteration 0 of 2026-10-15 (30 scene_blender runs): 13 zones with an interpenetration ERROR, 9 of them a scatter into a hand-placed prop.'+ verified: "2026-10-17"target_metric: "bpy_placement_errors"target_direction: "down"target_unit: "ERROR findings per run"@@ -29,11 +29,11 @@ direct child of a zone collection that has mesh descendants, and each one is ONE| what you build | rows | measured ||---|---|---|| a mesh object, with or without children | 1 — the whole subtree | yes |-| a collection-instance Empty (`lib.scatter.instance`) | 1 per placed copy | yes — its clones are sampled like a mesh |-| a multi-part prop under one root (a parent Empty, `Batch.finish`, `parent_under`, or joined meshes) | 1 | yes |+| a collection-instance Empty (`instance_type = 'COLLECTION'`) | 1 per placed copy | yes — its clones are sampled like a mesh |+| a multi-part prop under one root (a parent Empty, parts parented under one mesh, or joined meshes) | 1 | yes || twelve loose meshes that together are a hut | 12 | yes, each at its own feet |-| a geometry-nodes or particle cloud (`gn_scatter`, `grass_patch`) | 1, exempt as instanced | no — and never a support either |-| a volume-only mesh (`lib.sky.haze`, `lib.materials.volume`) | exempt as volumetric | no, and never a support or an overlap partner |+| a geometry-nodes or particle cloud (an Instance on Points tree) | 1, exempt as instanced | no — and never a support either |+| a volume-only mesh (a fog box, a steam puff) | exempt as volumetric | no, and never a support or an overlap partner || ground, water and sky by name and shape; a shell that swallows the content box | exempt as backdrop or enclosure | no || anything tagged `obj["placement"] = "free"`, or its whole zone collection | exempt as free | no — but counted, see below |@@ -68,43 +68,46 @@ tolerance its kind has; the judge grades the crop whatever the name.1. **Interface: one ground authority.** `height_at(x, y)` in `src/env.py` is the ground everyzone reads as `ctx.height_at`, and the ground mesh samples the same function. Any function of- (x, y) the brief's landform needs is fine: `lib.terrain.make_height_at` (rolling noise hills,- a level pad only if asked) is one option; a slope to a river from `lib.noise.fbm2`, a ridge from- `lib.noise.ridged`, a terrace, a quay stepping down to `lib.water.pool_height`, a plaza flat- everywhere are others, and `lib.terrain.ground` meshes whatever you hand it. A zone that- flattens its own patch to a different number is a bench buried on one side, floating on the other.+ (x, y) the brief's landform needs is fine: rolling hills from summed sines or+ `mathutils.noise.fractal`, a slope to a river, a ridge, a terrace, a quay stepping down to a+ basin, a plaza flat everywhere; the ground mesh is a grid whose vertices you set to it. A zone+ that flattens its own patch to a different number is a bench buried on one side, floating on+ the other.2. **Requirement: feet within the gate's gap tolerance of what is under them** (measured on the- census GLB at the foot columns). `lib.place.seat(obj, ctx.height_at, sink=...)` samples the- same columns and returns the move it made; `lib.scatter.instance(ctx.collection, ctx.assets["<snake>"], name, x, y, height_at=ctx.height_at, ...)`- places a copy already seated; a thing ON a thing — a cup on a table, a lantern on a post — is- `lib.place.rest_on(obj, support)`, because the gate measures the gap to the SUPPORT. Every- `lib.place` call reads the point set the gate measures, so pass the root. Any placement that- passes `check_placement` is acceptable.-3. **`sink` is tolerated for names that sink** — a rock, a post, a tree with modelled roots; the+ census GLB at the foot columns). Read the point set the gate reads — the root's world-space+ vertices, its children's, and for an instance Empty the source collection's through the+ Empty's matrix — keep the lowest ones, and move the root by the smallest+ `ctx.height_at(x, y) - z` over them. A thing ON a thing — a cup on a table, a lantern on a post+ — goes onto the support's top under its footprint, because the gate measures the gap to the+ SUPPORT. Any placement that passes `check_placement` is acceptable.+3. **Sinking is tolerated for names that sink** — a rock, a post, a tree with modelled roots; thewords file carries the list. A crate sunk "so it cannot float" is a `sunken` finding and acrop of a crate in the ground.-4. **Slopes.** `seat` rests the foot over the lowest ground and buries the rest, so a wide thing+4. **Slopes.** Seating by the smallest gap rests the foot over the lowest ground and buries the rest, so a wide thingon a slope comes back `sunken` uphill; placed at the ground height of its CENTRE, its downhillfeet hang: `cantilevered`. Options: a pad in `height_at` under it (the ground mesh follows),- seated segments, or a turn along the contour with `lib.place.face_toward`.+ seated segments, or a turn along the contour (a yaw about Z).5. **Requirement: a multi-part thing whose parts support each other is ONE row** — one directchild of the zone collection with the parts under it — or each part is seated on its own- support. A root Empty, joined meshes, `lib.mesh.parent_under` or- `lib.mesh.Batch.finish(ctx.collection, parent=True)` all do it; twelve loose meshes are twelve- rows and twelve overlap partners for each other.+ support. A root Empty with the parts parented under it at relative locations, or one mesh+ built from all of them, does it; twelve loose meshes are twelve rows and twelve overlap+ partners for each other.6. **Requirement: anything the brief or plan counts is a measured row** (a direct child of thezone collection with mesh descendants). Geometry-nodes and particle clouds are exempt fromplacement and are never supports, so nothing can rest on them; the plan-contents check counts- instances either way. `lib.scatter.instance` / `scatter` make rows; `gn_scatter` and- `grass_patch` make clouds — the toolbox for the hundreds (blades, pebbles, litter, a far treeline).+ instances either way. Collection-instance Empties make rows; a geometry-nodes Instance on+ Points tree makes a cloud — the way for the hundreds (blades, pebbles, litter, a far treeline).+ In 5.2 a new `GeometryNodeTree` has no sockets and no nodes: add them with+ `ng.interface.new_socket(name, in_out='INPUT' | 'OUTPUT', socket_type='NodeSocketGeometry')` and+ your own `NodeGroupInput` / `NodeGroupOutput` nodes (`NodeTree.inputs` / `.outputs` are gone).7. **`free` is for hanging and airborne things** — a bird, a kite, a lantern on a chain, a steamplume. The gate reports the share of free-tagged assets (`free_exempt`), and the judge'sfloating defect still sees a free-tagged crate in the air.8. **Requirement: a PLANNED content placed entirely outside the plan bounds is the`out_of_bounds` kind** (a WARN, past the bounds + max(5 m, 10 % of the span)). Everythingelse — terrain, water, far buildings, forest, the rest of the street — continues past the- bounds as the brief's place does and is never reported. `lib.place.keep_inside(obj, bbox)` with the zone's plan box as (centre, extents)- slides one back. A row far from its planned `approx_size_m` is the `scale` kind, and the fix+ bounds as the brief's place does and is never reported. Clamping its x / y into the zone's+ plan box slides one back. A row far from its planned `approx_size_m` is the `scale` kind, and the fixis the SOURCE asset's build, not the Empties.9. **Requirement (outdoor plans): the world continues past the bounds.** `world_edge` is aWARN when the farthest content or ground group at least 2 m tall reaches less than@@ -113,15 +116,15 @@ tolerance its kind has; the judge grades the crop whatever the name.(not a placement row) and named `Sky…` when wide, so the census classifies it as backdrop. Thecensus also measures `stamped_ring` — near-identical copies evenly on a circle round theworld's edge — which the judge calls a toy backdrop.-10. **Names are global in Blender.** `lib.place.unique_name(base, i)`; a second `Lantern_0`+10. **Names are global in Blender.** Number copies `f"{base}_{i}"`; a second `Lantern_0`becomes `Lantern_0.001` and the plan-contents check loses it.## The self-check, then the gate-`lib.place.clear_of(objs)` lists the pairs whose boxes overlap past the interpenetration band,-as (name, name, fraction) — over the zone's roots AND its scattered Empties. `lib.place.clear_mask(objs, margin=...)`-is a `scatter.poisson(mask=...)` filter that keeps scatter points out of the footprints of what-you placed by hand: 9 of the 13 Blender zones with an interpenetration ERROR in the argon loop's+Compare the world bounding boxes of the zone's roots AND its scattered Empties pair by pair:+the overlap volume over the smaller box's volume past the interpenetration band is a finding.+Drop every scatter point that falls inside the footprint (plus a margin) of what you placed by+hand: 9 of the 13 Blender zones with an interpenetration ERROR in the argon loop'siteration 0 (2026-10-15) had scattered a small prop into a cart, a rack, a shrub or a mound. Then`build`, then `check_placement`, which prints the findings with their fix hints and the table:@@ -131,7 +134,7 @@ Market/Bench_0 | +0.236 | Terrain | 0.000 | - | - | -interpenetration Market/Cart_1 × Market/Stall_0: 41% box, 23% inside```-The hint's number is the measured gap (`seat` applies it). A round whose last `check_placement`+The hint's number is the measured gap: move the root by it. A round whose last `check_placement`lists an ERROR is capped by the rubric on each one; a PASSED gate vetoes the judge's own floating claim.## Motion, and the feet@@ -139,8 +142,7 @@ lists an ERROR is capped by the rubric on each one; a PASSED gate vetoes the judThe census is taken at the build's current frame, so a moving thing is measured seated at everytime the harness samples (t = 0 and t = 1.5 s; the judge diffs the two frames and names`nothing_moves` when it sees no change). Motion is data: keyframes on `ctx.frame(t)` or a simple-driver of `frame` (`lib.motion.keyframe_path`, `drift`, `sway`, `spin`, `scroll`, `shape_key_sweep`-are these in one call; a driver that needs Python evaluates to 0 and the lint rejects it). A tree+driver of `frame` (a driver that needs Python evaluates to 0 and the lint rejects it). A treewith its origin at its base sways about its feet (a keyed rotation turns about the origin: putit at the hinge or hub). A boat drifting ON a water-named plane is `on_water`; a bird, a steamplume or a spark cloud built as one object is a `free` row.diff --git a/harness/codeverse3d/skills/c3d-bpy-scene-placement/references/finding-to-fix.md b/harness/codeverse3d/skills/c3d-bpy-scene-placement/references/finding-to-fix.mdindex 69218dff..97bd0b50 100644--- a/harness/codeverse3d/skills/c3d-bpy-scene-placement/references/finding-to-fix.md+++ b/harness/codeverse3d/skills/c3d-bpy-scene-placement/references/finding-to-fix.md@@ -2,22 +2,21 @@Companion to `c3d-bpy-scene-placement`. Read against `codeverse3d/spatial/scene_placement.py`,`runtime_js/lib/host_placement.mjs`, `codeverse3d/languages/wrappers/_census_glb.py` and the-`Placement` section of `codeverse3d/config.py` on 2026-10-14. The lib calls are the scene_blender-starter's (`src/lib/`, harness-owned: call it, never edit it) and are one way to meet each row;-any construction that passes `check_placement` is as good.+`Placement` section of `codeverse3d/config.py` on 2026-10-14. Each row's fix is a move you compute+from world-space vertices; any construction that passes `check_placement` is as good.## 1. Finding to fix| kind, and what the line says | severity | it means | what meets it ||---|---|---|---|-| `floating` — `X is floating 0.24 m above Terrain (touches nothing)` | WARN; ERROR past `floating_error_m`, or when more than `floating_error_count` assets float | the lowest foot column hangs in the air | lower it by the printed number: `lib.place.seat(obj, ctx.height_at)`, or `lib.place.rest_on(obj, support)` for a thing on a thing |+| `floating` — `X is floating 0.24 m above Terrain (touches nothing)` | WARN; ERROR past `floating_error_m`, or when more than `floating_error_count` assets float | the lowest foot column hangs in the air | lower it by the printed number: its lowest vertices onto `ctx.height_at`, or onto the support's top for a thing on a thing || `unsupported` — `X is unsupported: hovers 0.03 m above Terrain and touches nothing` | WARN | off the contact tolerance but inside the floating band | seat it; if it really hangs, tag it `obj["placement"] = "free"` || `sunken` — `X is sunken 0.31 m into Terrain` | WARN; ERROR past `sunk_error_m` when the burial also passes `sunk_error_frac` of the height | a foot column sits below the surface | raise it by the number, drop its `sink`, or — only if it is driven or grown in — give it a `partial_ok` name |-| `interpenetration` — `A and B overlap (41% of the smaller box; 23% of its vertices inside the other)` | WARN past `overlap_warn`, ERROR past `overlap_error` | two rows share volume | move the smaller one out, shrink one, remove one, or make them ONE row (`lib.mesh.parent_under`, one `Batch`, a joined mesh) |+| `interpenetration` — `A and B overlap (41% of the smaller box; 23% of its vertices inside the other)` | WARN past `overlap_warn`, ERROR past `overlap_error` | two rows share volume | move the smaller one out, shrink one, remove one, or make them ONE row (parts parented under one root, a joined mesh) || `cantilevered` — one column rests, the worst one hangs | WARN | a thing placed at its centre's ground height on a slope or a bump: the downhill feet hang | seat it (the lowest ground wins, the rest sink), a pad in `height_at`, seated segments, or a turn along the contour || `free_exempt` — too many assets tagged free | WARN past `free_exempt_warn`, ERROR past `free_exempt_error` | the tag is hiding things from the gate | untag everything that stands; `free` is for hanging and airborne things || `scale` — `each of the 6 lantern instances in Square/Lanterns measures 2.80 m but the plan sized lantern at ~0.60 m (4.7x)` | WARN, ERROR by factor | the asset is built at the wrong size | scale the SOURCE collection's build, not the Empties |-| `out_of_bounds` — `X (planned content 'bollard') sits entirely outside the plan bounds + 8 m` | WARN | a row carrying a PLANNED content's name lies wholly past the bounds plus max(5 m, 10 % of the span); unplanned scenery past the bounds is never reported | move it in (`lib.place.keep_inside(obj, bbox)` with the zone bbox is one way), or leave it if the brief puts it there and say so |+| `out_of_bounds` — `X (planned content 'bollard') sits entirely outside the plan bounds + 8 m` | WARN | a row carrying a PLANNED content's name lies wholly past the bounds plus max(5 m, 10 % of the span); unplanned scenery past the bounds is never reported | move it in (clamp its x / y into the zone bbox), or leave it if the brief puts it there and say so || `world_edge` — `the world ends at its bounds: the farthest standing geometry (>= 2 m tall) reaches N m from the bounds centre` | WARN | an outdoor plan whose content or ground groups at least 2 m tall all stop inside 1.25 × the bounds' half-extent | whatever the brief's horizon holds, continued past the bounds from the env and named `Sky…` when wide || `truncated` — `… and 4 more floating finding(s) not listed` | INFO | the report keeps the worst 8 per kind | fix the listed ones, rebuild, read the next batch |@@ -43,30 +42,38 @@ The census GLB writer walks the evaluated depsgraph; the placement table reads tSupports are the OTHER rows' meshes plus the terrain and floors: a lantern resting on a post ismeasured to the post, a crate on a jetty to the jetty, a boat on a water-named plane is on water.-`seat`, `seat_instance`, `rest_on`, `clear_of`, `clear_mask`, `keep_inside` and `bbox_world` all-read the same point set the gate measures — an object's own geometry, its children's and, for a-collection instance, the source collection's under the Empty's transform — so an instance Empty-is a valid argument to every one of them, and the root of a finished prop is the thing to seat.+Seat and check against the same point set the gate measures — an object's own geometry, its+children's and, for a collection instance, the source collection's under the Empty's transform —+so an instance Empty is seated by its source's vertices, and the root of a finished prop is the+thing to move.## 3. A worked zone, one way```python-from lib import place, scatter--def build(ctx):- rng, h = ctx.rng(11), ctx.height_at- bench = scatter.instance(ctx.collection, ctx.assets["bench"], place.unique_name("Bench", 0),- <x>, <y>, height_at=h, rot_z=<yaw>) # one Empty, seated: ONE row- mask = place.clear_mask([bench], margin=0.3) # scatter clear of it- pts = scatter.poisson(rng, area=(<x0>, <y0>, <x1>, <y1>), min_dist=<m>, max_count=<n>, mask=mask)- shrubs = scatter.scatter(ctx.collection, ctx.assets["shrub"], "Shrub", pts, height_at=h, rng=rng)- place.rest_on(<a lantern built in this zone, under one root>, bench) # measured to the BENCH- for a, b, frac in place.clear_of([bench, *shrubs]): print("overlap:", a, b, frac) # fix every pair- return ctx.collection+def feet(obj, dg): # the gate's foot band, world space, evaluated (modifiers count)+ inst = obj.instance_type == "COLLECTION" # an instance Empty: its source's meshes through its matrix+ m0 = obj.matrix_world if inst else Matrix() # (a mesh root with children: add theirs the same way)+ pts = []+ for o in (obj.instance_collection.all_objects if inst else [obj]):+ if o.type == "MESH":+ pts += [m0 @ o.matrix_world @ v.co for v in o.evaluated_get(dg).to_mesh().vertices]+ o.evaluated_get(dg).to_mesh_clear()+ z0, z1 = min(p.z for p in pts), max(p.z for p in pts)+ return [p for p in pts if p.z <= z0 + max(0.02, 0.05 * (z1 - z0))]++def seat(obj, height_at, dg): # the lowest-hanging foot touches, none floats+ obj.location.z += min(height_at(p.x, p.y) - p.z for p in feet(obj, dg))```-`Shrub` carries a `partial_ok` word, so a small `sink` on it is accepted; the bench and the-lantern carry no such word and are measured as they stand. A kite with `kite["placement"] = "free"`+`dg = bpy.context.evaluated_depsgraph_get()`, `Matrix` from `mathutils`. The band is the gate's:+the vertices within max(0.02 m, 5 % of the height) of the lowest, of which it samples up to 5+columns (the lowest and the band's ±x / ±y extremes).++`matrix_world` is current only after `bpy.context.view_layer.update()` (or compose the parent+chain yourself); a child or an instance Empty adds its own vertices through its own matrix.++A thing named `Shrub…` carries a `partial_ok` word, so a small sink on it is accepted; a bench or+a lantern carries no such word and is measured as it stands. A kite with `kite["placement"] = "free"`is airborne by design.## 4. The loopdiff --git a/harness/codeverse3d/skills/variants/argon_raw/README.md b/harness/codeverse3d/skills/variants/argon_raw/README.mddeleted file mode 100644index 61172cfb..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/README.md+++ /dev/null@@ -1,15 +0,0 @@-# argon_raw — the skills overlay for scene_blender in raw mode--The skills half of the `argon_raw` variant (D113, 2026-10-17; the prompts half is-`codeverse3d/prompts/variants/argon_raw/`). Raw mode ships no harness bpy library, so the three-base bundles that taught the library's calls are shadowed here by copies that teach the raw bpy-each call stood for, with the same names, frontmatter rules and measured numbers:--* `c3d-bpy-scene-placement` — seating from world-space vertices, the pairwise box check;-* `c3d-bpy-scene-lighting` — sky, Sun / area lamps and fog volumes through `bpy.data`;-* `c3d-bpy-scene-materials` — multi-scale procedural surfaces wired as nodes.--Their pinned numbers are the base bundles' (`_claims/` is looked up here first, then in the base-library, and these copies keep every claimed sentence). `routes.toml` has no rows: the base-table routes the shadowed bundles by name. The run record's `extra.variant.hash` covers this-directory (README excluded) together with the prompts overlay.diff --git a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-lighting/SKILL.md b/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-lighting/SKILL.mddeleted file mode 100644index e9d13112..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-lighting/SKILL.md+++ /dev/null@@ -1,141 +0,0 @@-----name: c3d-bpy-scene-lighting-description: "Use when lighting a scene_blender env, zone, refine or rebuild session, or when scene_frames called a Blender frame too dark, blown out or flat. The harness renders with Cycles under AgX at exposure 0 and owns every render setting, so lamp energies, the world strength and the albedos are the only dials. Gives what the frame gate measures with its thresholds, the exposure bands measured for sky, sun, night, practical and interior setups under this renderer, the interface facts (the world is build_env's, what the census counts as atmosphere, which ceilings the overview rig lifts), the sky, lamps and fog in raw bpy (no library ships in raw mode), why an emissive mesh is not a lamp at 32 samples, and how to prove the band on every camera including the harness rig."-license: Apache-2.0-compatibility: Blender 5.2.2 LTS headless, scene_blender runtime; Cycles 32 samples + OIDN, AgX view transform, look None, exposure 0 — all harness-owned (render_bpy_scene.setup_render).-metadata:- evidence: mixed- evidence_note: 'The argon_raw (D113) copy of the base bundle with every library call replaced by the raw bpy it stands for; the measurements are the base bundle''s. The gate thresholds are read from live code (spatial/frame_metrics.py, runtime_js/lib/host_metrics.mjs) and the render setup from languages/wrappers/render_bpy_scene.py on 2026-10-14; the exposure bands were measured that day on Blender 5.2.2 LTS with that exact setup on a synthetic test scene (references/exposure-bands.md says how), not on run output. The corpus half is empty: the argon loop iteration 0 (2026-10-15) has not yet been tabulated per frame finding.'- verified: "2026-10-17"- target_metric: "bpy_exposure_findings"- target_direction: "down"- target_unit: "findings per run"- target_measurable: "true"- target_baseline: "n=0 — the argon loop iteration 0 (2026-10-15, 30 scene_blender runs) is the first sample; not yet tabulated"------# Lighting a Cycles scene the frame gate will accept--## What is fixed, and what is measured--The harness renders the authored cameras and the first overview rig views with Cycles at 32-samples plus denoising, AgX view transform, look None, exposure 0 — and it owns every one of-those settings: an assignment to `scene.render`, `scene.cycles` or `scene.view_settings` is a lint-ERROR (harness-owned). There is no exposure knob. Lamp energies, the world strength and the-albedos are the whole of your control.--The gate (`scene_frames`) reads the Blender PNGs with the statistics it reads three.js frames-with — per camera `mean_lum`, `lum_std`, `dark_frac`, `blown_frac` and `modal_frac` in the-`camera_checks` of `metrics.json`:--| finding | fires when | authored camera | harness rig view |-|---|---|---|---|-| `dark_frame` | mean luminance below 0.12, or more than 35 % of the pixels near black | ERROR | WARN |-| `dark_frame`, "dim but lit" | dark by the mean, but with contrast (`lum_std`) of at least 0.12 and not mostly black | WARN | WARN |-| `blown_frame` | more than 20 % of the pixels pure white | ERROR | WARN |-| `flat_frame` | one luminance band holds more than 85 % of the frame | WARN; ERROR above 92 % | WARN |--An ERROR of each kind is a score ceiling in the scene rubric, and every finding's hint carries the-scene_blender wording (lamps, world nodes, `ctx.height_at`), not the three.js one. The rig views-(`overview_*`) are WARN-only; the judge reads those pictures too.--## The bands, measured on this renderer--Measured 2026-10-14 on Blender 5.2.2 LTS with the harness's exact render setup, on a synthetic-scene (a flat ground plane of linear albedo a and six boxes; an eye-level camera with sky in the-top third, and a camera at the overview rig's angle). Numbers are `mean_lum`; the full tables-and the other four statistics are in `references/exposure-bands.md`.--| setup | `mean_lum` | what it says |-|---|---|---|-| the multiple-scattering sky alone, sun disc ON (a hand-built world), strength 0.05 / 0.2 / 1.0 (eye camera) | 0.63 / 0.82 / 0.96 | with its disc the physical sky IS daylight at strength 0.05-0.1; at 1.0 the sky starts to clip |-| sky 0.2 with the disc off + ONE sun lamp at 1 / 3 / 10 W per square metre, a = 0.3 (overview) | 0.57 / 0.63 / 0.73 | the lamp is a weak dial under AgX |-| the same sun at 3, ground albedo 0.03 / 0.15 / 0.6 (overview) | 0.32 / 0.52 / 0.72 | albedo is the strong dial |-| sun lamp 3 with the sky's disc ALSO on (two suns) | 0.83 | the doubled sun: washed, shadows fight |-| dark-blue night world alone / with a moon sun of 0.2 / 0.5 | 0.02 / 0.06 / 0.10 | too dark, and evenly so: no low-key escape, because `lum_std` stays under 0.05 |-| that night + two practical area lamps 2.5 m up at 45 / 150 / 500 W | 0.05 / 0.08 / 0.14 | 45 W is a look, not a light; 500 W per lamp passes, with contrast |-| that night + two fixture-sized emissive spheres at strength 5 / 80 / 320, no lamps | 0.03 / 0.05 / 0.09 | emission does not carry a frame; it needs a lamp beside it |-| a closed 6 m room, one 1 m ceiling area lamp at 50 / 200 / 800 W | 0.34 / 0.61 / 0.82 | interiors are easy: tens to hundreds of watts |--Two things fall out of the table. Under any daylight world nothing is dark and the risk is the-other two kinds: a uniformly coloured ground seen from the overview rig sat in the flat band-(`modal_frac` 0.84-0.95) in every daylight row, so value variance on the ground and-shadow-casting content are what break it, not more light. And at night the lamps that make the-picture pass are an order of magnitude stronger than the ones that make the fixtures glow.--## Interface, requirements, and ways that measured inside the band--* **Interface: the world is `build_env`'s.** A world created or assigned anywhere else is a- harness-owned lint ERROR. Zones add lamps.-* **Requirement: one consistent sun direction, shadows that do not fight** (judged) **and every- frame in the band** (measured). A physical sky with its disc on plus a sun lamp measured 0.83,- washed, with doubled shadows; so did a second sun lamp in a zone. A matched pair is a world- whose `ShaderNodeTexSky` (`sky_type = 'MULTIPLE_SCATTERING'`) has its sun disc off and a Sun- lamp (`bpy.data.lights.new(name, "SUN")`, energy in W per square metre, `angle` for the- softness) casting the shadows, both at the same compass angles; a Sun shines down its local- -Z, so its rotation is the elevation's complement about X, then the azimuth plus 90 degrees- about Z. A dark day moves with the albedos- and the sun's `energy` more than with the world strength (the second and third rows).-* **The brief's hour decides the palette; the band still applies.** A world Background fed by a- ColorRamp over the view direction's Z (horizon to zenith), or a flat deep night colour at a low- strength, with a low or cool Sun lamp, are measured ways to sit in it for dusk, overcast and- night; a warm key under a cool sky (a sky texture- gives that for free) is what keeps shade from reading black or the frame from reading one- orange tone (judged). Soft shadows come from a light's size (`angle` on a sun, `size` on an- area lamp), which is one lamp, not two.-* **Interface: atmosphere is counted from the census.** The `no_fog` plan check fires when the- census finds no volume at all; a volume-only mesh (only the Material Output's Volume socket- linked, fed by a `ShaderNodeVolumePrincipled`) counts, and the placement gate ignores it. A box- mesh with that material is the simplest one; a local mist over a pond or a hollow, or a light shaft (a higher- `Anisotropy` where the sun crosses an opening) is the same material on any volume-only mesh. A- world volume over a large scene measured as swallowing the sun and flattening the frame. How- thick the air is, and its colour, is the brief's; `fog_short` warns when the density would- dissolve the plan's own span.-* **Lamps in zones are yours** — `bpy.data.lights.new(name, "AREA" | "POINT" | "SPOT")` on an- object linked into `ctx.collection`; a "practical" is a small soft area lamp beside a lantern,- window, fire or sign, aimed at what it lights. A glow-sized energy (tens of watts) lights the- surfaces beside it, not a frame: two such lamps measured `mean_lum` 0.05 (an ERROR); hundreds- of watts each is where a night frame passed. Create lamps through `bpy.data.lights.new`;- operators in a loop are a hang-risk lint finding, and `bpy.ops.object.light_add` wants a- view-layer context the build does not give.-* **An emissive mesh is the look, not the light.** Cycles does scatter light from an emissive- surface, but a fixture-sized emitter throws almost nothing a frame can measure: two 0.15 m- emissive spheres at the strengths that make a lantern read as lit left the night frame at- `mean_lum` 0.03, and at forty times that strength — white blobs — it was still an ERROR; the- same scene passed once each sphere had a 500 W practical area lamp beside it (reference,- section 4). Emission on the fixture (`Emission Color` with a modest `Emission Strength`),- illumination in a lamp, and the emission modest: AgX pulls a saturated emitter toward white, so a strong neon tube renders as a white bar.-* **Interiors.** The band applies on every authored camera inside, and the overview rig lifts a- lid it can identify: a mesh named `Ceiling…` whose parent is named `RoomShell…` and whose- evaluated bbox top is below the camera is hidden for that rig frame (`lift_lids` in- `render_bpy_scene`, the three.js host's rule): name your shell that way. A ceiling area lamp- sized to the room measured 0.34-0.82 at 50-800 W, and an emissive window pane with an area- lamp just inside it is one way to light a room by day. The indoor placement tolerance is- tighter, so a lamp on a table is seated on the table's top too.-* **Albedo before light.** A ground whose Base Color is near black stays dark under any sun, and a- plaster wall clips under the sun that lights a lawn correctly. The large surfaces' albedo is the- strong dial (the third row), the sun the weak one, the practicals the local one.--## Night: the band, not the floor--Target: the "dim but lit" band on every authored camera — mean low, `lum_std` at least 0.12, not-mostly black. Both ends fail: a sky-lit average on a lantern scene is a grey wash (a flat frame,-and the judge's unlit-or-blown defect), and glowing fixtures with no lamps behind them are a black-frame with stickers. Measured on this renderer: a low night world, each fixture paired with a-practical area lamp at hundreds of watts so the pools overlap into a readable picture, dark materials-with a low but non-zero Base Color and shadows left dark reached the band; a fill lamp that lifts-the mean pushed it to a flat wash.--## The hero must be visible--The frames gate also reports `hero_unseen` and `hero_small_in_its_camera`; a hero in shadow at-night is a hero the judge cannot find. Its own key — a practical area lamp or a spot aimed at it (a Track To constraint, or a-rotation computed from the direction) — and a look at its camera's frame.--## Prove it--`scene_views(cameras="all", times=[0.0])`, then read `camera_checks` per camera against the-first table: the same five numbers the gate uses. A Blender view costs seconds, so render once-per change, all cameras, and fix whatever the finding names on EVERY camera, rig views included.--Full measured tables, the night and interior setups as code: `references/exposure-bands.md`.diff --git a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-lighting/references/exposure-bands.md b/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-lighting/references/exposure-bands.mddeleted file mode 100644index 39954cbb..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-lighting/references/exposure-bands.md+++ /dev/null@@ -1,132 +0,0 @@-# Exposure bands under Cycles + AgX at exposure 0--Companion to `c3d-bpy-scene-lighting`. The thresholds are `codeverse3d/spatial/frame_metrics.py`'s-(read 2026-10-14); the pixel statistics are `runtime_js/lib/host_metrics.mjs`'s and are applied to-the Blender PNGs unchanged: luminance is the Rec. 709 weighting of the 8-bit sRGB pixels, "near-black" is the bottom few of the 256 levels, "pure white" is all three channels at the top, and the-modal band is the fullest of eight equal luminance bands.--## 1. The gate's numbers--| statistic | threshold | finding |-|---|---|---|-| `mean_lum` | below 0.12 | `dark_frame` (ERROR on an authored camera) |-| `dark_frac` | above 35 % | `dark_frame` |-| `lum_std` | at least 0.12 while dark by the mean and not mostly black | the same finding downgraded to "dim but lit", a WARN |-| `blown_frac` | above 20 % | `blown_frame` |-| `modal_frac` | above 85 % | `flat_frame` WARN; ERROR above 92 % on an authored camera |--A frame that is dark is not also reported flat; a frame can be dark by the mean with not one-near-black pixel, or bright on average and still fail on the black fraction — fix whichever one-the message names.--## 2. How the bands were measured--Blender 5.2.2 LTS, the harness's `setup_render` verbatim (Cycles, CUDA, 32 samples, adaptive,-OIDN, AgX, look None, exposure 0, sRGB 8-bit PNG), 192 x 108 pixels, 2026-10-14. Scene: a 200 m-ground plane of linear albedo a (roughness 0.85), six boxes 0.9-3 m of albedo 0.4. Cameras: eye-level 1.6 m looking slightly down with the sky in the top third (`eye`), and a camera 25 m out at-the overview rig's azimuth and elevation (`overview`). Sun elevation 35 degrees. These are bands-for a bare scene, not rules: real content adds shadow, colour and contrast.--## 3. Daylight--The multiple-scattering sky alone, sun disc on, a = 0.3:--| sky strength | eye `mean_lum` | overview `mean_lum` | note |-|---|---|---|---|-| 0.02 | 0.45 | 0.44 | an overcast-looking day |-| 0.05 | 0.63 | 0.62 | daylight |-| 0.1 | 0.74 | 0.73 | bright daylight |-| 0.2 | 0.82 | 0.82 | hazy, washed |-| 0.5 | 0.91 | 0.91 | the ground is pale |-| 1.0 | 0.96 | 0.96 | `blown_frac` 0.11 on the eye camera: the sky clips |--Sky at 0.2 with the disc off plus ONE sun lamp (overview camera):--| sun lamp (W per square metre) | a = 0.03 | a = 0.08 | a = 0.15 | a = 0.3 | a = 0.6 |-|---|---|---|---|---|---|-| 1 | 0.28 | 0.37 | 0.45 | 0.57 | 0.68 |-| 3 | 0.32 | 0.42 | 0.52 | 0.63 | 0.72 |-| 5 | 0.36 | 0.47 | 0.56 | 0.67 | 0.76 |-| 10 | 0.43 | 0.55 | 0.64 | 0.73 | 0.81 |--Read the rows and the columns against each other: a tenfold sun moves the frame by about 0.15,-a twentyfold albedo by about 0.4. The eye camera, with the sky in it, sat at 0.59-0.81 across-the same grid — the sky carries an eye-level frame's mean on its own. With the sky's disc left on-beside the lamp (sun 3, a = 0.3) the overview rose from 0.63 to 0.83: two suns.--`modal_frac` on the overview camera was 0.80-0.95 in every daylight row: a single-colour ground-lit evenly IS a flat frame by the gate's definition. Value variance on the ground, shadows from-content and a horizon in the frame are what move it, not the sun.--## 4. Night--Flat dark-blue world (a night sky colour at strength 0.3), a = 0.3, no sun:--| setup | eye `mean_lum` / `lum_std` / `dark_frac` | overview | verdict |-|---|---|---|---|-| world alone | 0.02 / 0.02 / 0.57 | 0.01 / 0.00 / 1.00 | `dark_frame` ERROR |-| + moon sun 0.05 | 0.03 / 0.01 / 0.57 | 0.03 / 0.01 / 1.00 | ERROR |-| + moon sun 0.2 | 0.06 / 0.02 / 0.02 | 0.07 / 0.02 / 0.08 | ERROR: dark by the mean, no contrast to rescue it |-| + moon sun 0.5 | 0.10 / 0.05 / 0.01 | 0.13 / 0.03 / 0.07 | eye ERROR, overview passes |-| + two point lamps 3 m up, 100 W | 0.06 / 0.04 / 0.11 | 0.05 / 0.06 / 0.59 | ERROR |-| + two point lamps, 500 W | 0.13 / 0.12 / 0.07 | 0.14 / 0.13 / 0.21 | passes |-| + two point lamps, 2000 W | 0.25 / 0.22 / 0.04 | 0.28 / 0.20 / 0.09 | passes with room to spare |-| + two practical area lamps 2.5 m up, 45 W | 0.05 / 0.05 / 0.35 | 0.04 / 0.07 / 0.79 | ERROR: a glow-sized lamp, not illumination |-| + two practicals, 150 W | 0.08 / 0.09 / 0.14 | 0.08 / 0.12 / 0.55 | ERROR on the eye camera; the overview is dim-but-lit |-| + two practicals, 500 W | 0.14 / 0.16 / 0.07 | 0.14 / 0.18 / 0.28 | passes |-| + two 0.15 m emissive spheres 2.5 m up, strength 5 (no lamps) | 0.03 / 0.04 / 0.57 | 0.01 / 0.03 / 0.99 | ERROR: the fixtures glow, the ground does not |-| + the same spheres at strength 20 / 80 | 0.03 / 0.04 / 0.51 and 0.05 / 0.05 / 0.30 | 0.02 / 0.04 / 0.93 and 0.04 / 0.06 / 0.78 | ERROR |-| + the same spheres at strength 320 (white blobs) | 0.09 / 0.10 / 0.08 | 0.09 / 0.11 / 0.38 | ERROR on the eye camera still |-| + spheres at strength 8 AND two 45 W practicals | 0.05 / 0.06 / 0.35 | 0.04 / 0.07 / 0.81 | ERROR |-| + spheres at strength 8 AND two 500 W practicals | 0.14 / 0.16 / 0.08 | 0.12 / 0.17 / 0.38 | the eye camera passes; the overview rig is a dim-but-lit WARN |--The low-key escape needs contrast: an evenly moonlit plane has `lum_std` far below 0.12 at every-moon strength and fails as unlit however blue it is. Practicals create the contrast; what they-need is energy — hundreds of watts a lamp a few metres up, over a ground that is not black. An-emissive fixture is not that lamp: its strength decides how the fixture looks, and the frame's-mean barely moves until the fixture is a white blob, which the judge grades as blown.--```python-def lamp(ctx, name, kind, loc, color, watts, size=0.4): # a lantern-lit night, one way- light = bpy.data.lights.new(name, kind)- light.energy, light.color = watts, color- if kind == "AREA":- light.size = size- ob = bpy.data.objects.new(name, light)- ob.location = loc- ctx.collection.objects.link(ob)- return ob-# each fixture: an emissive skin (the look) AND lamp(ctx, f"LanternLight_{i}", "AREA", ..., <hundreds of W>)-```--## 5. Interiors--A closed 6 m x 6 m x 3 m room (walls a = 0.6, floor a = 0.3, a table and a crate), one 1 m square-area lamp at the ceiling, an eye-level camera inside:--| lamp | `mean_lum` | `modal_frac` |-|---|---|---|-| 50 W | 0.34 | 0.45 |-| 200 W | 0.61 | 0.60 |-| 800 W | 0.82 | 0.85 |-| 3000 W | 0.94 | 0.89 |--Interiors need tens to hundreds of watts per lamp, and the failure mode above a few hundred is the-flat band (one pale tone), not clipping — AgX refused to blow out even the 3000 W room.--```python-def build_env(ctx): # a lit room- ... # the shell: walls, floor and a lid named Ceiling... under RoomShell...- lid_lamp = bpy.data.lights.new("CeilingLight_0", "AREA")- lid_lamp.energy, lid_lamp.size, lid_lamp.shape = <tens to hundreds of watts>, <about a metre>, "SQUARE"- ob = bpy.data.objects.new("CeilingLight_0", lid_lamp)- ob.location = (<cx>, <cy>, <just under the ceiling>) # an area lamp shines down its -Z- ctx.collection.objects.link(ob)-```--## 6. The check--`scene_views(cameras="all", times=[0.0])` writes `camera_checks` with the five statistics per-camera, authored and rig. Read them; then change one dial at a time.diff --git a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-materials/SKILL.md b/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-materials/SKILL.mddeleted file mode 100644index 5c9fc037..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-materials/SKILL.md+++ /dev/null@@ -1,124 +0,0 @@-----name: c3d-bpy-scene-materials-description: "Use in every scene_blender env, zone, asset or refine session that authors a surface — ground, walls, props, foliage, water, glass, a glowing sign, steam. Cycles renders every node you wire, but the harness's census reads only three Principled sockets, so no gate rewards material work and the judge penalises the lack of it. Gives the Blender 5.2 node facts (no use_nodes, the 4.x socket names, ShaderNodeMix), what the judge names and what it measures, the node practices for multi-scale surfaces in raw bpy (no library ships in raw mode), variation across copies without identical twins, ground that varies where the brief's surface does, water, glass and emissive done as dielectrics and fixtures, soft particles as volumes, and what to zoom on before you finish."-license: Apache-2.0-compatibility: Blender 5.2.2 LTS headless, scene_blender runtime; Cycles 32 samples + OIDN under AgX (the harness's render settings), Principled BSDF 4.x socket names.-metadata:- evidence: mixed- evidence_note: 'The argon_raw (D113) copy of the base bundle with every library call replaced by the node practice it stands for. The census facts are read from live code on 2026-10-14 (wrappers/_census_glb.py, wrappers/_census.py, the languages/blender lint tables verified against Blender 5.2.2 LTS) and the defect wording from the scene judge rubric. The corpus half is the argon loop iteration 0 of 2026-10-15 (30 scene_blender runs): 8 scenes built hard-edged particles from surface shaders.'- verified: "2026-10-17"- target_metric: "flat_principled_materials"- target_direction: "down"- target_unit: "materials whose Base Color, Roughness and Metallic are all unlinked constants (prospective census)"- target_measurable: "false"- target_baseline: "n=0 — the census does not yet record the count; the argon loop iteration 0 (2026-10-15) is the first sample once it does"------# Surfaces that read as a place — Principled recipes the census cannot see--## Who sees what--The judge sees Cycles pixels: every noise texture, bump and vertex colour you wire is in the-picture, and the rubric names the failures directly — `placeholder_material` (default-grey or-untextured flat surfaces, with a score ceiling of its own), `flat_ground` (one flat colour with-a hard undressed seam where objects meet it), `monotonous_vegetation` (one shape stamped many-times with no variation in hue or size) and `hard_edged_particles` (steam, smoke or sparks with a-silhouette) — under its `materials_shaders_effects` criterion. The deterministic side sees almost-nothing: the census GLB the gates read carries each material's Principled `Base Color`,-`Metallic` and `Roughness` default values only, and a LINKED socket exports as its default. So-no gate measures material work; this sheet is about the judge's picture, plus the one census-fact that does bite — a mesh with no material at all is warned as exporting grey.--## Blender 5.2 facts the lint checks--* `bpy.data.materials.new(name)` already carries a node tree with a Principled BSDF: reach into- `mat.node_tree.nodes["Principled BSDF"]`. A `use_nodes` line is not needed, and the lint- reports it as deprecated.-* Socket names are the 4.x ones — `Base Color`, `Roughness`, `Metallic`, `IOR`, `Alpha`,- `Normal`, `Emission Color` plus `Emission Strength`, `Transmission Weight`, `Coat Weight`,- `Sheen Weight`, `Subsurface Weight`, `Specular IOR Level`. The old `Specular`, `Transmission`,- `Emission`, `Subsurface` and `Clearcoat` keys raise, and the lint names the renamed ones for- you. `Specular Tint` is a colour, so assign a 4-tuple.-* Mixing colours is `ShaderNodeMix` with its data type set to RGBA (`Factor`, `A`, `B` in,- `Result` out); `ShaderNodeMixRGB` is gone.-* Per-face materials: set `material_index` on the bmesh faces BEFORE `bm.to_mesh`. Every new- polygon starts on slot 0, and the census warns about slots no polygon uses — the part was- authored in four colours and exports in one.--## Surfaces in raw nodes — what reads as photoreal--No library ships: every material is a node tree you wire on `mat.node_tree`. What the judge reads-as real is variation at MORE THAN ONE SCALE, in object or generated coordinates so it is metres-whatever the object's size:--| scale | what carries it | nodes |-|---|---|---|-| metres — tone, wear, damp, sun-bleach | a low-frequency mask mixing two close colours | Noise texture (`Scale` ~0.2-1 per metre) into `ShaderNodeMix` (RGBA) |-| decimetres — courses, planks, patches | a pattern the material has | Brick / Wave / Voronoi texture, or a ColorRamp over noise |-| centimetres — grain, pores, grit | fine bump and roughness breakup | Noise / Voronoi (`Scale` 20-200) into `ShaderNodeBump` and through a Map Range into `Roughness` |--Keep non-emissive albedos inside 0.02-0.8 linear: pure black reads as a hole, pure white as a-blown surface. A copy is not a twin when its variant picks other colours or an Object Info-`Random` drives a small hue shift (below). A glowing fixture is `Emission Color` with a modest-`Emission Strength` — the look only; the light is a lamp (c3d-bpy-scene-lighting). Steam, smoke,-dust and mist are a volume-only material (below). Node snippets in-`references/principled-recipes.md`.--## Variation without twins--Collection instances share the source collection's materials, so per-instance tinting is not-"edit the material". Variation across copies comes from (a) several SOURCE variants —-`build_<snake>(ctx, variant=k)` building with other colours and another silhouette — placed in-rotation, (b) per-instance scale and yaw on each instance Empty, and (c) for one material-over many copies, an Object Info node's `Random` output driving a hue shift, which Cycles-evaluates per instance. The `stamped_ring` plan check measures rings of identical copies at one-radius, and the judge calls the result monotonous vegetation.--## Ground: what `flat_ground` means--Requirement (judged): the ground does not read as one flat untextured colour where the brief's-surface would vary, and the seam where structures meet it does not read as a hard undressed line.-A ground mesh usually carries ONE material, so the variation lives inside it or in the mesh's own-attributes. Options, by what the brief's place has: a slope mix (the Geometry node's `Normal`,-its Z through a ColorRamp into the mix factor) and a height mix (object Z from Texture-Coordinate) for natural ground; a worn band as a noise-masked colour along the routes people-take; a darker or rougher apron, or ground cover (a geometry-nodes Instance on Points cloud), at the-feet of big structures; a colour attribute on the ground mesh read by a Color Attribute node when-the bands are easier to paint per vertex than to compute per pixel; paving (a Brick texture, or-modelled setts) where the ground is built, not grown. A polished floor or a plaza that IS one-material is not a defect when its material reads as that material.--## Water, glass, fog — dielectrics and volumes--* Water is a dielectric: `Transmission Weight` 1, a low roughness and `Metallic` at zero; a- metallic mirror plane reads as chrome, not water. Moving water scrolls its Mapping node's- `Location` input with keyframes on `ctx.frame(t)`.-* Glass: full `Transmission Weight`, roughness near zero, `IOR` about 1.45-1.5. The bounce- budget is the harness's, so a stack of transmissive layers along one sight line goes dark —- one or two read.-* Fog is a VOLUME-ONLY material on any mesh (a box is enough): only the Material Output's Volume- socket linked. A mesh with a surface shader as well is matter to the census — a- huge placed asset enclosing everything — and the `no_fog` check does not count it as atmosphere.-* Soft particles are volumes too. A surface shader always has a silhouette; 8 of the 30 argon- Blender scenes of 2026-10-15 built steam from translucent ico-spheres, metaballs, stacked tori,- discs or polygon sparks and were graded `hard_edged_particles`. A volume-only material on a- cloud of spheres (one mesh, one object, tagged `placement = "free"`, keyframed so the two- judged frames differ) rendered with no edge, and 40 such puffs added 0.7 s to a 32-sample GPU- frame; motes and sparks read as tiny emissive spheres. Under a dim world a volume with zero `emission` comes out grey.--## Emissive and metal under AgX--AgX desaturates bright emitters toward white: a saturated sign needs a modest-`Emission Strength` and a coloured area lamp beside it for the glow on the ground. Metals need-something to reflect — the sky world and the haze are what a worn metal mirrors; a metal under a-black world is a black shape.--## Verify before you finish--`scene_views(cameras="authored", times=[0.0])` and zoom one frame: a wall or a ground that is one-flat value where the brief's would not be needs variation; two copies you cannot tell apart-need variants; a grey default is a mesh that never got a material (the build output warns about-it by name). Then `scene_probe` for triangle counts — materials are free, geometry is not.--Node snippets — noise to bump, the slope mix, the Object Info tint, per-face slots, the-volume-only material, the socket rename table — in `references/principled-recipes.md`.diff --git a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-materials/references/principled-recipes.md b/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-materials/references/principled-recipes.mddeleted file mode 100644index 4b2b42e3..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-materials/references/principled-recipes.md+++ /dev/null@@ -1,116 +0,0 @@-# Principled recipes — the node snippets--Companion to `c3d-bpy-scene-materials`. Socket names and node ids verified against Blender-5.2.2 LTS on 2026-10-14 (`codeverse3d/languages/blender/__init__.py` keeps the rename table the-lint reports from). Every snippet assumes `mat = bpy.data.materials.new(name)` and-`nodes, links = mat.node_tree.nodes, mat.node_tree.links`, `bsdf = nodes["Principled BSDF"]`.-No library ships in raw mode: these are the nodes; a material builder you reuse goes in-`src/env.py` for the zones.--## 1. Socket renames the lint reports--| old key (raises) | 4.x / 5.x key |-|---|---|-| `Specular` | `Specular IOR Level` |-| `Subsurface` | `Subsurface Weight` |-| `Subsurface Color` | folded into `Base Color` |-| `Transmission` | `Transmission Weight` |-| `Transmission Roughness` | removed — use `Roughness` |-| `Emission` | `Emission Color`, with `Emission Strength` |-| `Clearcoat` | `Coat Weight` |-| `Sheen` | `Sheen Weight` |--`Specular Tint` and `Anisotropic` still exist; `Specular Tint` is an RGBA colour.--## 2. Value variance: noise into colour and bump--```python-noise = nodes.new("ShaderNodeTexNoise")-noise.inputs["Scale"].default_value = <features per metre: 2-5 cm at walking distance>-mix = nodes.new("ShaderNodeMix")-mix.data_type = "RGBA"-mix.inputs["A"].default_value = (<r>, <g>, <b>, 1.0) # the base colour-mix.inputs["B"].default_value = (<r2>, <g2>, <b2>, 1.0) # a few percent darker or warmer-links.new(noise.outputs["Fac"], mix.inputs["Factor"])-links.new(mix.outputs["Result"], bsdf.inputs["Base Color"])-bump = nodes.new("ShaderNodeBump")-bump.inputs["Strength"].default_value = <0.05-0.15 for stone and plaster>-links.new(noise.outputs["Fac"], bump.inputs["Height"])-links.new(bump.outputs["Normal"], bsdf.inputs["Normal"])-```--Roughness variation is the same noise into `Roughness` through a Map Range node. For more than-one scale, add a second noise at a much larger `Scale` into the bump (grain) and keep the first-on the colour (tone); a Voronoi in between gives patches, cells or pebbles.--## 3. Ground bands by slope and height--```python-geo = nodes.new("ShaderNodeNewGeometry")-sep = nodes.new("ShaderNodeSeparateXYZ")-links.new(geo.outputs["Normal"], sep.inputs["Vector"])-ramp = nodes.new("ShaderNodeValToRGB") # a ColorRamp: slope -> 0..1-ramp.color_ramp.elements[0].position = <cos of the rock angle> # element 1 a few hundredths higher: a soft edge-links.new(sep.outputs["Z"], ramp.inputs["Fac"])-mix = nodes.new("ShaderNodeMix")-mix.data_type = "RGBA"-links.new(ramp.outputs["Color"], mix.inputs["Factor"])-links.new(<rock colour node>.outputs["Result"], mix.inputs["A"])-links.new(<grass colour node>.outputs["Result"], mix.inputs["B"])-links.new(mix.outputs["Result"], bsdf.inputs["Base Color"])-```--Height bands use the Object output of a Texture Coordinate node, Z through a second ramp.-A worn route is a further colour masked by a low-frequency noise along its polyline. These are-options for natural ground; built ground (paving, a floor) carries its own material instead.--## 4. One material, many copies: the Object Info tint--```python-info = nodes.new("ShaderNodeObjectInfo")-hsv = nodes.new("ShaderNodeHueSaturation")-links.new(info.outputs["Random"], hsv.inputs["Hue"]) # 0..1 per object / instance-hsv.inputs["Saturation"].default_value = 1.0-links.new(<colour node>.outputs["Result"], hsv.inputs["Color"])-links.new(hsv.outputs["Color"], bsdf.inputs["Base Color"])-```--`Random` differs per instance in Cycles, so the shrubs placed from one source collection no-longer match; keep the hue swing small (a Map Range from `Random` into a narrow band around-0.5) or the copies look like different species.--## 5. Per-face slots, before `bm.to_mesh`--```python-me.materials.append(stone) # slot 0-me.materials.append(moss) # slot 1-for f in bm.faces:- f.material_index = 1 if f.normal.z > 0.7 else 0-bm.to_mesh(me)-```--The census reports a slot no polygon uses; assigning after `bm.to_mesh` goes through-`me.polygons` instead.--## 6. The volume-only box (fog the census recognises)--```python-mat = bpy.data.materials.new("Haze")-nodes, links = mat.node_tree.nodes, mat.node_tree.links-nodes.remove(nodes["Principled BSDF"]) # no surface shader at all-vol = nodes.new("ShaderNodeVolumePrincipled")-vol.inputs["Density"].default_value = <0.002-0.02>-links.new(vol.outputs["Volume"], nodes["Material Output"].inputs["Volume"])-```--Any mesh whose only linked output is Volume is fog to the census — a box over the play area is-the simplest. With the Surface socket linked as well it is a placed asset to the gate. The same-shader with a noise texture into `Density` is steam and mist.--## 7. Water and glass, the sockets that matter--| material | the sockets that matter |-|---|---|-| water | `Transmission Weight` at one, `Roughness` low, `Metallic` zero, a bump from scrolled noise; the plane is named with a water word so feet on it count as on water |-| glass | `Transmission Weight` at one, `Roughness` near zero, `IOR` about 1.45-1.5; thin panes as single faces with a Solidify-free thickness read best at 32 samples |-| emissive | `Emission Color` and a modest `Emission Strength`; the illumination is an area lamp beside it |diff --git a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-placement/SKILL.md b/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-placement/SKILL.mddeleted file mode 100644index 5d8bfd6e..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-placement/SKILL.md+++ /dev/null@@ -1,150 +0,0 @@-----name: c3d-bpy-scene-placement-description: "Use in every scene_blender env, zone, refine or rebuild session that places anything, and whenever check_placement or the scene_placement gate reported a floating, sunken, unsupported, interpenetrating, cantilevered or out-of-bounds asset, too many free-tagged ones, or a world that ends at its bounds (world_edge). Everything placed is ONE row in a measured table and its feet are sampled against what is under them. Gives what the gate measures and on which geometry, how a collection instance differs from a geometry-nodes cloud, the requirements with their measurements, how to seat and check in raw bpy what the gate samples (no library ships in raw mode), the self-check, and the finding-to-fix table."-license: Apache-2.0-compatibility: Blender 5.2.2 LTS headless, scene_blender runtime; the gate measures the harness-written census GLB (the evaluated depsgraph), never the .blend.-metadata:- evidence: mixed- evidence_note: 'The argon_raw (D113) copy of the base bundle with every library call replaced by the raw bpy it stands for. The instrument half is read from live code on 2026-10-14 (spatial/scene_placement.py, runtime_js/lib/host_placement.mjs, config.Placement, wrappers/_census_glb.py). The corpus half is the argon loop iteration 0 of 2026-10-15 (30 scene_blender runs): 13 zones with an interpenetration ERROR, 9 of them a scatter into a hand-placed prop.'- verified: "2026-10-17"- target_metric: "bpy_placement_errors"- target_direction: "down"- target_unit: "ERROR findings per run"- target_measurable: "true"- target_baseline: "n=30 scene_blender runs, argon loop iteration 0 (2026-10-15): 13 zones shipped an interpenetration ERROR; the per-run ERROR count is not yet tabulated"------# Everything sits on something — placement the gate can measure--**Read this if** you are writing a zone, the env, or fixing a `check_placement` finding. The-placement gate is deterministic (a hand's breadth of hover is an ERROR), every ERROR is a score-ceiling in the scene rubric, and the judge is handed a close-up crop of each measured finding.--## What is measured, and on what--The build writes a census GLB from the evaluated depsgraph (modifiers, geometry nodes and-instances included) and the gate reads that, never the `.blend`. A **placed thing** is every-direct child of a zone collection that has mesh descendants, and each one is ONE row:--| what you build | rows | measured |-|---|---|---|-| a mesh object, with or without children | 1 — the whole subtree | yes |-| a collection-instance Empty (`instance_type = 'COLLECTION'`) | 1 per placed copy | yes — its clones are sampled like a mesh |-| a multi-part prop under one root (a parent Empty, parts parented under one mesh, or joined meshes) | 1 | yes |-| twelve loose meshes that together are a hut | 12 | yes, each at its own feet |-| a geometry-nodes or particle cloud (an Instance on Points tree) | 1, exempt as instanced | no — and never a support either |-| a volume-only mesh (a fog box, a steam puff) | exempt as volumetric | no, and never a support or an overlap partner |-| ground, water and sky by name and shape; a shell that swallows the content box | exempt as backdrop or enclosure | no |-| anything tagged `obj["placement"] = "free"`, or its whole zone collection | exempt as free | no — but counted, see below |--Per row, from up to 5 **foot columns** taken from its lowest vertices — a table is measured at-its leg tips, not under its top:--* `ground_gap_m` — the vertical distance from the foot to the nearest surface of any OTHER mesh- below it (terrain, floor, table top), else to the census ground level.-* `sunk_m` — how far a foot sits below a surface that passes through the asset's own extent.-* `on_water` — a water-named surface at or above the foot: supported, never sunk.-* `attached` — another asset's box within contact distance: mounted, so a small gap is left alone.-* `gap_max_m`, `columns_resting`, `tilt_m` — how many columns rest, how far the worst hangs.--The kinds the report names, worst first: `floating` (a gap above the indoor or outdoor-tolerance; ERROR past `floating_error_m` or when more than `floating_error_count` assets float),-`unsupported` (a smaller gap, touching nothing: WARN), `sunken` (burial past `sunk_m`; ERROR past-`sunk_error_m` when it also swallows `sunk_error_frac` of the height), `interpenetration` (two-boxes overlapping more than `overlap_warn` of the smaller one, confirmed by `inside_frac` of its-vertices inside the other; ERROR past `overlap_error`), `cantilevered` (at most one of four or-more columns rests while the worst hangs: WARN) and `free_exempt` (the share of free-tagged-assets past `free_exempt_warn`, then `free_exempt_error`). Every threshold is a-`Settings.placement` field and the summary line of `check_placement` prints the values it used.-Interiors get the tighter tolerance; the plan's setting words decide that (`is_interior`).--Three exemptions are by NAME (`placement_words.json`, one file read by the gate and by the-boot-time settle): `buried_ok` words (pit, pool, well, trench) are never sunken; `slope_ok` words-(path, platform, stairs, terrace) follow the terrain; `partial_ok` words (rock, tree, post, fence,-pebble) may sink up to `partial_ok_frac` of their height. A thing named what it is gets the-tolerance its kind has; the judge grades the crop whatever the name.--## The requirements, and ways to meet them--1. **Interface: one ground authority.** `height_at(x, y)` in `src/env.py` is the ground every- zone reads as `ctx.height_at`, and the ground mesh samples the same function. Any function of- (x, y) the brief's landform needs is fine: rolling hills from summed sines or- `mathutils.noise.fractal`, a slope to a river, a ridge, a terrace, a quay stepping down to a- basin, a plaza flat everywhere; the ground mesh is a grid whose vertices you set to it. A zone- that flattens its own patch to a different number is a bench buried on one side, floating on- the other.-2. **Requirement: feet within the gate's gap tolerance of what is under them** (measured on the- census GLB at the foot columns). Read the point set the gate reads — the root's world-space- vertices, its children's, and for an instance Empty the source collection's through the- Empty's matrix — keep the lowest ones, and move the root by the smallest- `ctx.height_at(x, y) - z` over them. A thing ON a thing — a cup on a table, a lantern on a post- — goes onto the support's top under its footprint, because the gate measures the gap to the- SUPPORT. Any placement that passes `check_placement` is acceptable.-3. **Sinking is tolerated for names that sink** — a rock, a post, a tree with modelled roots; the- words file carries the list. A crate sunk "so it cannot float" is a `sunken` finding and a- crop of a crate in the ground.-4. **Slopes.** Seating by the smallest gap rests the foot over the lowest ground and buries the rest, so a wide thing- on a slope comes back `sunken` uphill; placed at the ground height of its CENTRE, its downhill- feet hang: `cantilevered`. Options: a pad in `height_at` under it (the ground mesh follows),- seated segments, or a turn along the contour (a yaw about Z).-5. **Requirement: a multi-part thing whose parts support each other is ONE row** — one direct- child of the zone collection with the parts under it — or each part is seated on its own- support. A root Empty with the parts parented under it at relative locations, or one mesh- built from all of them, does it; twelve loose meshes are twelve rows and twelve overlap- partners for each other.-6. **Requirement: anything the brief or plan counts is a measured row** (a direct child of the- zone collection with mesh descendants). Geometry-nodes and particle clouds are exempt from- placement and are never supports, so nothing can rest on them; the plan-contents check counts- instances either way. Collection-instance Empties make rows; a geometry-nodes Instance on- Points tree makes a cloud — the way for the hundreds (blades, pebbles, litter, a far treeline).- In 5.2 a new `GeometryNodeTree` has no sockets and no nodes: add them with- `ng.interface.new_socket(name, in_out='INPUT' | 'OUTPUT', socket_type='NodeSocketGeometry')` and- your own `NodeGroupInput` / `NodeGroupOutput` nodes (`NodeTree.inputs` / `.outputs` are gone).-7. **`free` is for hanging and airborne things** — a bird, a kite, a lantern on a chain, a steam- plume. The gate reports the share of free-tagged assets (`free_exempt`), and the judge's- floating defect still sees a free-tagged crate in the air.-8. **Requirement: a PLANNED content placed entirely outside the plan bounds is the- `out_of_bounds` kind** (a WARN, past the bounds + max(5 m, 10 % of the span)). Everything- else — terrain, water, far buildings, forest, the rest of the street — continues past the- bounds as the brief's place does and is never reported. Clamping its x / y into the zone's- plan box slides one back. A row far from its planned `approx_size_m` is the `scale` kind, and the fix- is the SOURCE asset's build, not the Empties.-9. **Requirement (outdoor plans): the world continues past the bounds.** `world_edge` is a- WARN when the farthest content or ground group at least 2 m tall reaches less than- 1.25 × the bounds' half-extent from the centre. Whatever the brief's horizon holds satisfies it- — a landform that keeps rising, a forest edge, far roofs, cliffs, a sea wall — built in the env- (not a placement row) and named `Sky…` when wide, so the census classifies it as backdrop. The- census also measures `stamped_ring` — near-identical copies evenly on a circle round the- world's edge — which the judge calls a toy backdrop.-10. **Names are global in Blender.** Number copies `f"{base}_{i}"`; a second `Lantern_0`- becomes `Lantern_0.001` and the plan-contents check loses it.--## The self-check, then the gate--Compare the world bounding boxes of the zone's roots AND its scattered Empties pair by pair:-the overlap volume over the smaller box's volume past the interpenetration band is a finding.-Drop every scatter point that falls inside the footprint (plus a margin) of what you placed by-hand: 9 of the 13 Blender zones with an interpenetration ERROR in the argon loop's-iteration 0 (2026-10-15) had scattered a small prop into a cart, a rack, a shrub or a mound. Then-`build`, then `check_placement`, which prints the findings with their fix hints and the table:--```-asset | gap to support (m) | support | sunk (m) | into | water | attached-Market/Bench_0 | +0.236 | Terrain | 0.000 | - | - | --interpenetration Market/Cart_1 × Market/Stall_0: 41% box, 23% inside-```--The hint's number is the measured gap: move the root by it. A round whose last `check_placement`-lists an ERROR is capped by the rubric on each one; a PASSED gate vetoes the judge's own floating claim.--## Motion, and the feet--The census is taken at the build's current frame, so a moving thing is measured seated at every-time the harness samples (t = 0 and t = 1.5 s; the judge diffs the two frames and names-`nothing_moves` when it sees no change). Motion is data: keyframes on `ctx.frame(t)` or a simple-driver of `frame` (a driver that needs Python evaluates to 0 and the lint rejects it). A tree-with its origin at its base sways about its feet (a keyed rotation turns about the origin: put-it at the hinge or hub). A boat drifting ON a water-named plane is `on_water`; a bird, a steam-plume or a spark cloud built as one object is a `free` row.--Worked zone, row provenance and the finding-to-fix table: `references/finding-to-fix.md`.diff --git a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-placement/references/finding-to-fix.md b/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-placement/references/finding-to-fix.mddeleted file mode 100644index 41ed319b..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/c3d-bpy-scene-placement/references/finding-to-fix.md+++ /dev/null@@ -1,87 +0,0 @@-# Finding to fix, where rows come from, and a worked zone--Companion to `c3d-bpy-scene-placement`. Read against `codeverse3d/spatial/scene_placement.py`,-`runtime_js/lib/host_placement.mjs`, `codeverse3d/languages/wrappers/_census_glb.py` and the-`Placement` section of `codeverse3d/config.py` on 2026-10-14. No library ships in raw mode: each-row's fix is a move you compute from world-space vertices; any construction that passes-`check_placement` is as good.--## 1. Finding to fix--| kind, and what the line says | severity | it means | what meets it |-|---|---|---|---|-| `floating` — `X is floating 0.24 m above Terrain (touches nothing)` | WARN; ERROR past `floating_error_m`, or when more than `floating_error_count` assets float | the lowest foot column hangs in the air | lower it by the printed number: its lowest vertices onto `ctx.height_at`, or onto the support's top for a thing on a thing |-| `unsupported` — `X is unsupported: hovers 0.03 m above Terrain and touches nothing` | WARN | off the contact tolerance but inside the floating band | seat it; if it really hangs, tag it `obj["placement"] = "free"` |-| `sunken` — `X is sunken 0.31 m into Terrain` | WARN; ERROR past `sunk_error_m` when the burial also passes `sunk_error_frac` of the height | a foot column sits below the surface | raise it by the number, drop its `sink`, or — only if it is driven or grown in — give it a `partial_ok` name |-| `interpenetration` — `A and B overlap (41% of the smaller box; 23% of its vertices inside the other)` | WARN past `overlap_warn`, ERROR past `overlap_error` | two rows share volume | move the smaller one out, shrink one, remove one, or make them ONE row (parts parented under one root, a joined mesh) |-| `cantilevered` — one column rests, the worst one hangs | WARN | a thing placed at its centre's ground height on a slope or a bump: the downhill feet hang | seat it (the lowest ground wins, the rest sink), a pad in `height_at`, seated segments, or a turn along the contour |-| `free_exempt` — too many assets tagged free | WARN past `free_exempt_warn`, ERROR past `free_exempt_error` | the tag is hiding things from the gate | untag everything that stands; `free` is for hanging and airborne things |-| `scale` — `each of the 6 lantern instances in Square/Lanterns measures 2.80 m but the plan sized lantern at ~0.60 m (4.7x)` | WARN, ERROR by factor | the asset is built at the wrong size | scale the SOURCE collection's build, not the Empties |-| `out_of_bounds` — `X (planned content 'bollard') sits entirely outside the plan bounds + 8 m` | WARN | a row carrying a PLANNED content's name lies wholly past the bounds plus max(5 m, 10 % of the span); unplanned scenery past the bounds is never reported | move it in (clamp its x / y into the zone bbox), or leave it if the brief puts it there and say so |-| `world_edge` — `the world ends at its bounds: the farthest standing geometry (>= 2 m tall) reaches N m from the bounds centre` | WARN | an outdoor plan whose content or ground groups at least 2 m tall all stop inside 1.25 × the bounds' half-extent | whatever the brief's horizon holds, continued past the bounds from the env and named `Sky…` when wide |-| `truncated` — `… and 4 more floating finding(s) not listed` | INFO | the report keeps the worst 8 per kind | fix the listed ones, rebuild, read the next batch |--The table under the findings stops at 400 assets or after 4 s of sampling and says so; a scene-that hits either limit has more placed rows than a judge can read anyway — fewer, merged rows,-with the hundreds as instanced clouds, is what fits.--## 2. Where a row comes from--The census GLB writer walks the evaluated depsgraph; the placement table reads the GLB:--* a collection-instance Empty becomes one node whose children are the instanced meshes — one- clone per placed copy, so each copy is a row sampled at its own feet;-* a mesh with children is its own group: the subtree is one row;-* any other instance cloud (geometry nodes, particles, dupli-verts) becomes one gpu-instancing- node per source mesh — an `InstancedMesh` to the gate, counted as instances and exempt from- per-asset placement, and never a support;-* custom properties of plain value travel as node extras, which is how `obj["placement"] = "free"`- reaches the gate; a property on the zone's collection exempts the whole zone;-* an object whose every material is volume-only is fog: not indexed, not a support, not an- overlap partner, and the `no_fog` check counts it as atmosphere.--Supports are the OTHER rows' meshes plus the terrain and floors: a lantern resting on a post is-measured to the post, a crate on a jetty to the jetty, a boat on a water-named plane is on water.--Seat and check against the same point set the gate measures — an object's own geometry, its-children's and, for a collection instance, the source collection's under the Empty's transform —-so an instance Empty is seated by its source's vertices, and the root of a finished prop is the-thing to move.--## 3. A worked zone, one way--```python-def feet(obj, dg): # the gate's foot band, world space, evaluated (modifiers count)- inst = obj.instance_type == "COLLECTION" # an instance Empty: its source's meshes through its matrix- m0 = obj.matrix_world if inst else Matrix() # (a mesh root with children: add theirs the same way)- pts = []- for o in (obj.instance_collection.all_objects if inst else [obj]):- if o.type == "MESH":- pts += [m0 @ o.matrix_world @ v.co for v in o.evaluated_get(dg).to_mesh().vertices]- o.evaluated_get(dg).to_mesh_clear()- z0, z1 = min(p.z for p in pts), max(p.z for p in pts)- return [p for p in pts if p.z <= z0 + max(0.02, 0.05 * (z1 - z0))]--def seat(obj, height_at, dg): # the lowest-hanging foot touches, none floats- obj.location.z += min(height_at(p.x, p.y) - p.z for p in feet(obj, dg))-```--`dg = bpy.context.evaluated_depsgraph_get()`, `Matrix` from `mathutils`. The band is the gate's:-the vertices within max(0.02 m, 5 % of the height) of the lowest, of which it samples up to 5-columns (the lowest and the band's ±x / ±y extremes).--`matrix_world` is current only after `bpy.context.view_layer.update()` (or compose the parent-chain yourself); a child or an instance Empty adds its own vertices through its own matrix.--A thing named `Shrub…` carries a `partial_ok` word, so a small sink on it is accepted; a bench or-a lantern carries no such word and is measured as it stands. A kite with `kite["placement"] = "free"`-is airborne by design.--## 4. The loop--```-build -> check_placement -> fix every ERROR, then the deepest WARN -> build-```--`check_placement` reads the census of the last build; `rebuild=true` re-takes the census when-you doubt it. A round that ends on an ERROR is capped by the rubric on each one.diff --git a/harness/codeverse3d/skills/variants/argon_raw/routes.toml b/harness/codeverse3d/skills/variants/argon_raw/routes.tomldeleted file mode 100644index d9689764..00000000--- a/harness/codeverse3d/skills/variants/argon_raw/routes.toml+++ /dev/null@@ -1,3 +0,0 @@-# The `argon_raw` variant's routing table (D113, 2026-10-17) — EMPTY: the base table routes the-# three shadowed c3d-bpy-scene-* bundles by name. Row kinds and their typing: see-# codeverse3d/skills/variants/argon/routes.toml and codeverse3d/skills/__init__.py::parse_routes.diff --git a/harness/codeverse3d/spatial/mcp_server.py b/harness/codeverse3d/spatial/mcp_server.pyindex aa3cf187..c1e9f6b5 100644--- a/harness/codeverse3d/spatial/mcp_server.py+++ b/harness/codeverse3d/spatial/mcp_server.py@@ -63,30 +63,6 @@ def build_context(workspace: Path, *, track: str = "", language: str = "", roundreturn ctx-def apply_run_knobs(ctx: ToolContext) -> dict[str, Any]:- """The workspace run's variant ``[knobs]`` on this process's settings, for the server's lifetime.-- WHY: the run applies a variant's knobs in ITS process only (``tracks.lifecycle._apply_variant``),- and this server is a separate process serving that one workspace — so ``argon_raw``'s- ``scene_lib = false`` (D113) never reached the session's own ``build`` lint, which then passed a- ``lib`` import the round's lint fails. The variant is the run's: the spec's frozen- ``options.variant``, else the process switch resolved by the spec's generator- (``BaseTrack.variant_for``). A user-stated field still wins (``apply_variant_knobs``); an unknown- or unreadable variant applies nothing."""- from codeverse3d.config import get_settings- from codeverse3d.prompts.variants import apply_variant_knobs, resolve_variant, variant_info-- spec = spec_dict(ctx)- settings = get_settings()- try:- name = str((spec.get("options") or {}).get("variant") or "").strip() or resolve_variant(- settings, str((spec.get("backends") or {}).get("generator") or ""))- return apply_variant_knobs(settings, variant_info(name)) if name else {}- except ValueError as e:- print(f"variant knobs not applied: {e}", file=sys.stderr)- return {}--def encode_image(path: str, max_side: int = MAX_IMAGE_SIDE) -> str | None:"""PNG → base64 (downscaled so the long side is ≤ ``max_side``); None if unreadable."""try:@@ -243,7 +219,6 @@ def main(argv: list[str] | None = None) -> int:print(f"workspace not found: {ws}", file=sys.stderr)return 2ctx = build_context(ws, track=ns.track, language=ns.language, round_index=ns.round_index)- apply_run_knobs(ctx)if ns.list:print(json.dumps([{"name": t.name, "description": t.description, "schema": t.schema()} for t in list_tools(track=ctx.track, language=ctx.language)], indent=1))return 0diff --git a/harness/codeverse3d/spatial/scene_placement.py b/harness/codeverse3d/spatial/scene_placement.pyindex 02151a21..ae340275 100644--- a/harness/codeverse3d/spatial/scene_placement.py+++ b/harness/codeverse3d/spatial/scene_placement.py@@ -269,36 +269,16 @@ LANGUAGE_WORDS: dict[str, dict[str, str]] = {"place": "place a collection-instance Empty of ctx.assets['<snake>']","in_zone": "as a root object linked into the zone's collection","free_exempt": ('obj["placement"] = "free" is for hanging / airborne things only (a bird, a hung lantern, a drone): '- "delete the tag on everything that stands on something and seat it with ctx.height_at(x, y) / lib.place.seat"),- "cantilever": ("seat every foot: follow the ground with ctx.height_at(x, y) at each corner (lib.place.seat), "- "sink it a few cm, or shorten the overhang"),+ "delete the tag on everything that stands on something and seat it with ctx.height_at(x, y) at its "+ "lowest evaluated vertices"),+ "cantilever": ("seat every foot: follow the ground with ctx.height_at(x, y) at each corner (its lowest evaluated "+ "vertex on the lowest ground under it), sink it a few cm, or shorten the overhang"),},}-#: scene_blender in raw mode (D113, ``Settings.scene_lib`` off): the hints that name ``lib.place.seat``-#: say what it does instead — no harness library ships, and an import of it is a lint ERROR-RAW_BPY_WORDS: dict[str, str] = {- "free_exempt": ('obj["placement"] = "free" is for hanging / airborne things only (a bird, a hung lantern, a drone): '- "delete the tag on everything that stands on something and seat it with ctx.height_at(x, y) at its "- "lowest evaluated vertices"),- "cantilever": ("seat every foot: follow the ground with ctx.height_at(x, y) at each corner (its lowest evaluated "- "vertex on the lowest ground under it), sink it a few cm, or shorten the overhang"),-}---def _ships_lib() -> bool:- """The process's run's ``scene_lib`` (``prompts.variants.run_knob``, the rule the runtime follows)."""- from codeverse3d.prompts.variants import run_knob-- return bool(run_knob("scene_lib"))--def placement_words(language: str | None) -> dict[str, str]:- words = LANGUAGE_WORDS.get(str(language or "scene_threejs"), LANGUAGE_WORDS["scene_threejs"])- if str(language) == "scene_blender" and not _ships_lib():- return {**words, **RAW_BPY_WORDS}- return words+ return LANGUAGE_WORDS.get(str(language or "scene_threejs"), LANGUAGE_WORDS["scene_threejs"])def _f(sev: Severity, msg: str, *, target: str, hint: str = "", kind: str, **data: Any) -> GateFinding:diff --git a/harness/codeverse3d/tracks/generation.py b/harness/codeverse3d/tracks/generation.pyindex 7c6b9640..52fa1d86 100644--- a/harness/codeverse3d/tracks/generation.py+++ b/harness/codeverse3d/tracks/generation.py@@ -184,7 +184,7 @@ def write_files(``only`` (an ``edit_only`` task's file scope, entry included when owned) skips apath that ALREADY EXISTS and is not listed — new files stay allowed; ``frozen``- (the language's harness-owned files and directories, e.g. a scene's ``src/lib/``) is+ (the language's harness-owned files and directories, e.g. scene_threejs's ``src/lib/``) isskipped outright (``is_harness_owned``, the CLI side's rule).The single-shot envelope has no write-time gate, so this is where a scoped task isstopped from rewriting a sibling's file — the mirror of the CLI backends' post-hoc@@ -751,7 +751,7 @@ def _envelope_scope(ws: Workspace, task: GenerationTask) -> tuple[set[str] | Nondef _read_only(language: str) -> list[str]:- """The harness-owned files of the language (``src/lib/`` for the scene languages): every session+ """The harness-owned files of the language (scene_threejs's ``src/lib/``): every sessionof the run — baseline, refine, repair — may read them, none may write them."""try:return list(HARNESS_OWNED_SRC.get(Language(language), ()))diff --git a/harness/codeverse3d/tracks/lifecycle.py b/harness/codeverse3d/tracks/lifecycle.pyindex 2479be51..f111ffe5 100644--- a/harness/codeverse3d/tracks/lifecycle.py+++ b/harness/codeverse3d/tracks/lifecycle.py@@ -187,12 +187,8 @@ def _skeleton(track: BaseTrack, ctx: RunContext) -> list[str]:def _skeleton_key(ctx: RunContext) -> dict[str, Any]:- """The plan and language — and, in scene_blender raw mode only (D113), ``scene_lib: False``: a resume- that changed the mode writes the skeleton again instead of keeping the other mode's ``src/lib``.- Library mode adds nothing, so every existing cache key stands."""- from codeverse3d.tracks.scene_assets import ships_lib-- return {"plan": ctx.plan, "language": ctx.language.value, **({} if ships_lib(ctx) else {"scene_lib": False})}+ """The plan and language."""+ return {"plan": ctx.plan, "language": ctx.language.value}#: the buildable placeholder of every file the plan namesdiff --git a/harness/codeverse3d/tracks/prompting.py b/harness/codeverse3d/tracks/prompting.pyindex caf916e9..197b49b9 100644--- a/harness/codeverse3d/tracks/prompting.py+++ b/harness/codeverse3d/tracks/prompting.py@@ -285,7 +285,7 @@ def current_files(ctx: RunContext, rels: Sequence[str], max_chars: int = MAX_SKELETON_CHARS) -> dict[str, str]:"""``{rel: text}`` for the files that exist, trimmed to ``max_chars`` in total. The- language's harness-owned files (``HARNESS_OWNED_SRC``, e.g. a scene's ``src/lib/``) are+ language's harness-owned files (``HARNESS_OWNED_SRC``, e.g. scene_threejs's ``src/lib/``) arenever inlined: the single-shot prompt once showed one as an editable skeleton file whileevery write to it is refused."""owned = set(HARNESS_OWNED_SRC.get(ctx.language, ()))diff --git a/harness/codeverse3d/tracks/scene.py b/harness/codeverse3d/tracks/scene.pyindex 691c143f..3e8afbae 100644--- a/harness/codeverse3d/tracks/scene.py+++ b/harness/codeverse3d/tracks/scene.py@@ -61,7 +61,6 @@ from codeverse3d.tracks.scene_assets import (asset_api_summary,read_dedupe_note,run_asset_stage,- ships_lib,)from codeverse3d.tracks.zone_layout import layout_block, layout_zonesfrom codeverse3d.workspace import Workspace@@ -257,7 +256,7 @@ class SceneTrack(BaseTrack):assets = {k: AssetResult.model_validate(v) if isinstance(v, dict) else v for k, v in (ctx.extra.get("assets") or {}).items()}alias = read_dedupe_note(ctx.ws)ctx.extra["assets"], ctx.extra["asset_alias"] = assets, alias- return asset_api_summary(plan, assets, alias, language=ctx.language, lib=ships_lib(ctx))+ return asset_api_summary(plan, assets, alias, language=ctx.language)# ---- degradation ------------------------------------------------------def _strategy(self, ctx: RunContext, stage: str) -> RunContext:@@ -343,8 +342,8 @@ class SceneTrack(BaseTrack):CHECKED (D112): the written module counts only once the runtime's env check passes(``SceneRuntime.check_env``: its lint, a build with nothing beside it, something that lightsit); a failure gets ONE repair single-shot with the check's words and the file fed back (the- asset ladder's single-shot + repair). Both prompts carry the ``src/lib/`` interface- (``SceneRuntime.lib_interface``) — names and parameter lists, read off the files. Iteration 5+ asset ladder's single-shot + repair). Both prompts carry the ``src/lib/`` interface of a language+ that ships one (``SceneRuntime.lib_interface``) — names and parameter lists, read off the files. Iteration 5(2026-10-16): 7 of 21 unchecked recoveries were broken or unlit (a SyntaxError, a non-existent``gravel`` export, a ``roughness=`` keyword no function takes) and reached round 0 as anassembly without env. A module that still fails is replaced by what was there before (thediff --git a/harness/codeverse3d/tracks/scene_assets.py b/harness/codeverse3d/tracks/scene_assets.pyindex 4f4c9e5f..9e9ad593 100644--- a/harness/codeverse3d/tracks/scene_assets.py+++ b/harness/codeverse3d/tracks/scene_assets.py@@ -111,24 +111,8 @@ class AssetResult(BaseModel):-def ships_lib(ctx: RunContext) -> bool:- """``Settings.scene_lib`` of the run: is the harness's bpy library in this workspace? ``False`` is- raw mode (D113) — only scene_blender reads it (scene_threejs always ships its library). The run's- real runtime answers (``SceneBlenderRuntime.ships_lib``): the skeleton it wrote and the lint it runs- are the facts the prompts must match; a stand-in runtime (a rig) falls back to the same rule over- ``ctx.settings`` (``prompts.variants.run_knob``)."""- from codeverse3d.languages.scene_blender import SceneBlenderRuntime- from codeverse3d.prompts.variants import run_knob-- if ctx.language != Language.SCENE_BLENDER:- return True- if isinstance(ctx.runtime, SceneBlenderRuntime):- return ctx.runtime.ships_lib- return bool(run_knob("scene_lib", ctx.settings))--def asset_api_summary(plan: ScenePlan, results: dict[str, AssetResult], alias: dict[str, str] | None = None, *,- language: Language = Language.SCENE_THREEJS, lib: bool = True) -> str:+ language: Language = Language.SCENE_THREEJS) -> str:"""What zone/composer tasks need to know about each asset (names + sizes + how to get it),in the words of the scene language that places them.@@ -137,8 +121,7 @@ def asset_api_summary(plan: ScenePlan, results: dict[str, AssetResult], alias: dthe ``opts.variant`` the zone must pass. bpy: the harness builds EVERY module (a mergedtwin's shim included) and imports every hero before any zone runs, so each is a Collectionat ``ctx.assets['<snake>']`` to place as a collection instance — the zone never imports or- calls a factory, and a merged twin needs no variant number. ``lib`` False (bpy raw mode, D113): the- placing line names the collection-instance Empty itself, not the library call."""+ calls a factory, and a merged twin needs no variant number."""alias = alias or {}lines = []for a in plan.assets:@@ -159,9 +142,7 @@ def asset_api_summary(plan: ScenePlan, results: dict[str, AssetResult], alias: dlines.append(f"- {a.name}: preloaded at `ctx.assets['{to_snake(a.name)}']` (clone it; GLB public/assets/{to_snake(a.name)}.glb), "f"base at y=0, {s}{motion}{status}")if lines and language is Language.SCENE_BLENDER:- place = ("place it with `lib.scatter.instance(ctx.collection, ctx.assets['<snake>'], name, x, y, "- "height_at=ctx.height_at)` (a collection-instance Empty seated on the ground = ONE placement row)." if lib else- "place it as a collection-instance Empty (`bpy.data.objects.new(name, None)` with `instance_type = 'COLLECTION'` "+ place = ("place it as a collection-instance Empty (`bpy.data.objects.new(name, None)` with `instance_type = 'COLLECTION'` ""and `instance_collection = ctx.assets['<snake>']`), linked into ctx.collection and seated on ""ctx.height_at(x, y) = ONE placement row.")lines.insert(0, "Sizes are width × height × depth in metres, the plan's Y-up order: in your Blender frame x = width, "@@ -774,24 +755,20 @@ def _scene_context(ctx: RunContext) -> dict[str, Any]:return {"spec_prompt": brief, "constraints": ctx.extra.get("scene_style") or "(none)"} if brief else {}-#: what names a library row, per scene language: the factory right after a backtick and the module-#: it lives in. three.js: a camelCase call (``makeTree(``, ``patchWind``) — a bare lowercase one-#: (``seat``, ``block``) is an ordinary word in a sheet — and ``lib/tree.js``. bpy: the library is-#: snake_case (``tree(``, ``water_surface(``) and ``lib/vegetation.py``; a sheet that says "a stone-#: water trough" draws the water row too, which costs a line and never misleads.+#: what names a library row (scene_threejs, the one language with a library): the factory right after a+#: backtick — a camelCase call (``makeTree(``, ``patchWind``); a bare lowercase one (``seat``, ``block``)+#: is an ordinary word in a sheet — and the module it lives in (``lib/tree.js``)._CATALOG_RES: dict[Language, tuple[re.Pattern[str], re.Pattern[str]]] = {Language.SCENE_THREEJS: (re.compile(r"`([a-z]+[A-Z]\w*)[(`]"), re.compile(r"`lib/(\w+\.js)`")),- Language.SCENE_BLENDER: (re.compile(r"`([a-z_][a-z0-9_]*)\("), re.compile(r"`lib/(\w+\.py)`")),}-def library_rows(description: str, language: Language = Language.SCENE_THREEJS, *, lib: bool = True) -> str:+def library_rows(description: str, language: Language = Language.SCENE_THREEJS) -> str:"""The effects-catalog rows of the library factories an asset sheet names, by call or by module(D100): a module asset may compose ``src/lib/``, and a single-shot writer cannot open themodule to learn the call — the rows carry it. The whole catalog is a zone-sized prompt.- ``""`` for a language without a catalog (a blender hero), and with ``lib`` False (bpy raw mode,- D113: no library ships, so no row may name one)."""- if language not in _CATALOG_RES or not lib:+ ``""`` for a language without a library (scene_blender, a blender hero)."""+ if language not in _CATALOG_RES:return ""call_re, module_re = _CATALOG_RES[language]words = set(re.findall(r"\w+(?:\.\w+)*", description))@@ -804,7 +781,7 @@ def _asset_prompt(ctx: RunContext, asset: AssetPlan, rel: str, *, language: Langfiles = list(files or [rel])prompt = render(asset_template(language), **base_prompt_context(ctx, asset_name=asset.name, asset_kind=asset.kind, asset_description=asset.description, asset_size=asset.approx_size_m,- library_rows=library_rows(asset.description, language, lib=ships_lib(ctx)),+ library_rows=library_rows(asset.description, language),asset_file=rel, asset_files=files, asset_language=language.value, fix_instructions=[], current_code="",# a single-shot hero has to see the multi-file skeleton it is filling in, like a static objectskeleton_files=skeleton_files(ctx) if (ctx.single_shot and len(files) > 1) else {},@@ -922,22 +899,18 @@ BPY_CHECK_ZONE = "check"def _bpy_check_workspace(ws: Workspace, rel: str, snake: str) -> Workspace:"""A throw-away workspace under ``_assets/`` (git-ignored, beside the hero sub-workspaces)holding only what one module's build needs: an entry that lists this asset alone, the- module, the harness library it may import (none in raw mode, D113: an absent ``src/lib``- copies nothing), and the probe zone. Rebuilt from scratch on every check so a module's last- attempt never shadows its next."""+ module and the probe zone. Rebuilt from scratch on every check so a module's last attempt+ never shadows its next."""from codeverse3d.languages.scene_blender import render_scene_pyscratch = Workspace(ws.root / "_assets" / f"{snake}_check")if scratch.root.exists():shutil.rmtree(scratch.root)- for sub in ("assets", "zones", "lib"):+ for sub in ("assets", "zones"):(scratch.src / sub).mkdir(parents=True, exist_ok=True)scratch.artifacts.mkdir(parents=True, exist_ok=True)(scratch.root / ENTRY_FILE[Language.SCENE_BLENDER]).write_text(render_scene_py([], [snake], [], []))shutil.copyfile(ws.root / rel, scratch.src / "assets" / f"{snake}.py")- lib = ws.src / "lib"- for src in sorted(lib.glob("*.py")) if lib.is_dir() else []:- shutil.copyfile(src, scratch.src / "lib" / src.name)(scratch.src / "zones" / f"{BPY_CHECK_ZONE}.py").write_text(f'"""The harness\'s probe zone: one instance of {snake}, so the census GLB measures it."""\n'"import bpy\n\n\n"diff --git a/harness/docs/ARCHITECTURE.md b/harness/docs/ARCHITECTURE.mdindex 68e11a36..9e6dceb7 100644--- a/harness/docs/ARCHITECTURE.md+++ b/harness/docs/ARCHITECTURE.md@@ -15,7 +15,7 @@ of the language — for four **tracks**:|---|---|---|| `static_object` | `blender` (bpy), `cadquery`, `threejs` | code + canonical `object.glb` (+stl/step) || `articulated_object` | `urdf_blender` (bpy link meshes + hand-written URDF) | code + `robot.urdf` + `meshes/*.glb` (raw link frames) + `object.glb` (node hierarchy with joint extras) |-| `scene` | `scene_threejs` (multi-file three.js + GLSL; optional bpy-built GLB assets), `scene_blender` (bpy on a harness-owned library) | `src/**` + `public/assets/*.glb` + renders + probes |+| `scene` | `scene_threejs` (multi-file three.js + GLSL; optional bpy-built GLB assets), `scene_blender` (multi-file bpy, every module the agent's) | `src/**` + `public/assets/*.glb` + renders + probes || `graphics` | `glsl_shader` (Shadertoy-style fragment shader), `opengl_python` (raw moderngl + GLSL, multi-pass) | shader/program source + judged animation frames + sheet + GIF + frame metrics |…driven by any of these backends behind two protocols:@@ -108,10 +108,7 @@ codeverse3d/scene_blender render driver (render_bpy_scene) and what they share (_wrapper_common,_census, _census_glb, _finite — the NaN / inf check on everything a Blender wrapper writes).scene_blender/starter/src/ is its example scene (scene.py, env.py, zones/{hamlet, lakeside,- orchard}.py, assets/{crate, lantern_post}.py) and lib/ the harness-owned bpy library (noise,- mesh, materials, terrain, sky, lighting, water, vegetation, architecture, scatter, place,- figure, motion), indexed by prompts/scene_blender/effects_catalog.md; Settings.scene_lib off- is RAW mode (the argon_raw variant): no lib/ ships, a `lib` import is a lint ERROR+ orchard}.py, assets/{crate, lantern_post}.py)spatial/ node.py, render.py, observe.py, tool_common.py (shared tool plumbing),render_scene.py (judge view subset, content-fitted orbit), render_blender.py (scene_blender:Blender pixels under a GPU slot + CPU fallback, the same metrics.json),@@ -247,7 +244,7 @@ Authoritative text lives in `codeverse3d/prompts/<lang>/contract.md` (+ `system.prompts carry is `prompts/scene_threejs/effects_catalog.md`. `src/lib/` is committed with`src/`, so the deliverable and the dataset sample carry it.* **scene_blender**: the same shape in bpy (`src/scene.py`, `src/env.py`, `src/zones/*.py`,- `src/assets/*.py`) on the harness-owned `src/lib/` bpy library; judged frames render in Cycles.+ `src/assets/*.py`), every module the agent's; judged frames render in Cycles.* **glsl_shader**: `src/shader.frag` (+ optional `src/common.glsl`, `src/buffer_a.frag` forfeedback) — the agent never writes `#version`, uniform declarations or `out vec4`; the harnessheader provides `u_time/u_resolution/u_mouse/u_frame/u_prev/u_noise/u_buffer_a` (+ Shadertoydiff --git a/harness/docs/RUNBOOK.md b/harness/docs/RUNBOOK.mdindex ae92d47b..b2c94a6b 100644--- a/harness/docs/RUNBOOK.md+++ b/harness/docs/RUNBOOK.md@@ -53,8 +53,7 @@ Useful flags (`3dcode make --help`):* `--variant NAME` — a per-model prompt/skill overlay (`codeverse3d/prompts/variants/<name>/` +`codeverse3d/skills/variants/<name>/`), frozen on `spec.options.variant` so `resume` and`judge` read the same files; default `C3D_VARIANT`, else `C3D_VARIANTS` keyed by the exact- generator id, else the base prompts. `--variant argon_raw` on `--language scene_blender` is- RAW mode: no harness bpy library ships and the model writes every line of bpy.+ generator id, else the base prompts.Expected cost/time with gemini-3.8-flash: object tracks ≈ $0.7–0.9 and 12–36 min for baseline +1 refine; best-of-2 single-shot ≈ $0.25 / 8 min; graphics single-shot ≈ $0.05 / 2 min per judged@@ -225,7 +224,7 @@ storm's rows (`--redo-status error,infra_failed,budget`) rather than reading thewave: templates are read at render time, so a live worker on old python renders the new file.* **A per-model variant**: `codeverse3d/prompts/variants/<name>/variant.toml` (`[variant]` name =the directory name, version, generators, description; optional `[knobs]` — `skills_max`,- `skills_only`, `scene_lib` — applied as defaults, a user-stated field wins) beside the prompt+ `skills_only` — applied as defaults, a user-stated field wins) beside the promptfiles that shadow the base ones by relative path (a template there may `include` a basefile), and `codeverse3d/skills/variants/<name>/` for bundles that shadow base bundles by name,their `_claims/`, and `routes.toml` (`[[boost]]` skill + delta, `[[disable]]` rule, `[[route]]`diff --git a/harness/tests/orchestrator_tracks/test_env_stage_honest.py b/harness/tests/orchestrator_tracks/test_env_stage_honest.pyindex 62c9602a..87f04cf4 100644--- a/harness/tests/orchestrator_tracks/test_env_stage_honest.py+++ b/harness/tests/orchestrator_tracks/test_env_stage_honest.py@@ -116,7 +116,10 @@ def test_a_recovery_that_fails_its_check_gets_one_repair_with_the_error_and_the_out = track._env_stage(ctx)assert out["ok"] and out["files"] == [rel] and "+ repair" in out["notes"], outassert list(prompts) == ["env", "env.recover", "env.recover.repair"], list(prompts)- assert "lib/fake.js: makeFake(opts = {})" in prompts["env.recover"]+ if language is Language.SCENE_THREEJS: # the one language with a library: its recovery prompt carries the index+ assert "lib/fake.js: makeFake(opts = {})" in prompts["env.recover"]+ else:+ assert "lib/fake.js" not in prompts["env.recover"], "scene_blender ships no library: nothing to index"assert "lib/fake.js" not in prompts["env"], "the session opens the library itself"repair = prompts["env.recover.repair"]assert f"{rel}: {ctx.runtime.ENV_BROKEN} found" in repair and f"# {ctx.runtime.ENV_BROKEN} env" in repairdiff --git a/harness/tests/prompts/manifest.json b/harness/tests/prompts/manifest.jsonindex 5f113f05..38a68e7f 100644--- a/harness/tests/prompts/manifest.json+++ b/harness/tests/prompts/manifest.json@@ -11,7 +11,7 @@"chat:planner:planner/messages": {"bytes": 1328, "sha256": "313c87553cf38df423dc9245a8af4cca5a41a844b489e13a5dc08e8c44eabba5"},"chat:planner:planner/sampling": {"bytes": 10001, "sha256": "0ff37a3ae43fdf878dd0911a9954d57e49365ad788c84818ea01d350310ab401"},"chat:planner:planner/system": {"bytes": 20030, "sha256": "45dccfcf72b4c6e46b7ceeaae8af0ebddf6f6e6b5970cda5fe900aa47682bf06"},- "context:runs/run/files": {"bytes": 45788, "sha256": "994ab7a132562070b8aaed99aec9b984eb871e3b3dd767b71c7b0aec2f0a222a"},+ "context:runs/run/files": {"bytes": 45730, "sha256": "e317d817f6eeae64383e6e85433580ffaea0c7e50ab14033e5a3e4cbf0890be8"},"job:baseline@r00/prompt": {"bytes": 19680, "sha256": "60580670e903b8d76bdad9f76ffb88dcdd42b923a30348858cd5724dd4eb2e2d"},"job:baseline@r00/scope": {"bytes": 383, "sha256": "7187fd726a9f499668ae3df0399ed4a3e08b7cb7a9de5ba753b8775448ea876e"},"job:baseline@r00/system": {"bytes": 3271, "sha256": "29f5a9b2e7b9a879be58963ce95ae6fbec7460dae6785d542b214d6b850e21f4"},@@ -72,9 +72,9 @@"chat:planner:planner/messages": {"bytes": 348, "sha256": "f50fc3cdf3a426fc9c9b830b6e68d2cfe9fd9b7125550362b018f9c9b454b25c"},"chat:planner:planner/sampling": {"bytes": 3421, "sha256": "918170272cea656e8c542c54b777c57d1a4567a8cc36a0c1cd825cb81a01b9bb"},"chat:planner:planner/system": {"bytes": 11919, "sha256": "194d0e2a724c4799816033228af15cac568dd51c14ed85bff9c94ae5ba281866"},- "context:runs/run/_cand/c0/files": {"bytes": 32408, "sha256": "51c869ee3e50de5f07b165fd818af922c2e427ef818a2e31a3b22b3246571cfd"},- "context:runs/run/_cand/c1/files": {"bytes": 32408, "sha256": "51c869ee3e50de5f07b165fd818af922c2e427ef818a2e31a3b22b3246571cfd"},- "context:runs/run/files": {"bytes": 32408, "sha256": "51c869ee3e50de5f07b165fd818af922c2e427ef818a2e31a3b22b3246571cfd"},+ "context:runs/run/_cand/c0/files": {"bytes": 32350, "sha256": "1e653c3d53c920e53ec7142071b1a187518c5f3a6a679321f38e29ad71a82d5d"},+ "context:runs/run/_cand/c1/files": {"bytes": 32350, "sha256": "1e653c3d53c920e53ec7142071b1a187518c5f3a6a679321f38e29ad71a82d5d"},+ "context:runs/run/files": {"bytes": 32350, "sha256": "1e653c3d53c920e53ec7142071b1a187518c5f3a6a679321f38e29ad71a82d5d"},"job:baseline_c0@r00/prompt": {"bytes": 11347, "sha256": "5aca38cfae577e7e5e5974c2b6cd64e55ec35a1dfab33eaf62eff70652854df5"},"job:baseline_c0@r00/scope": {"bytes": 383, "sha256": "51d22961200ef987a7c652af48ff2897b910803baa672d3081f53c3fb819a685"},"job:baseline_c0@r00/system": {"bytes": 3173, "sha256": "c3879a563e2a512b82358d0c3927dcbfe9347725e592035a9b64c5d1b34e6654"},@@ -107,7 +107,7 @@"chat:planner:planner/messages": {"bytes": 348, "sha256": "f50fc3cdf3a426fc9c9b830b6e68d2cfe9fd9b7125550362b018f9c9b454b25c"},"chat:planner:planner/sampling": {"bytes": 3421, "sha256": "918170272cea656e8c542c54b777c57d1a4567a8cc36a0c1cd825cb81a01b9bb"},"chat:planner:planner/system": {"bytes": 11919, "sha256": "194d0e2a724c4799816033228af15cac568dd51c14ed85bff9c94ae5ba281866"},- "context:runs/run/files": {"bytes": 32408, "sha256": "51c869ee3e50de5f07b165fd818af922c2e427ef818a2e31a3b22b3246571cfd"},+ "context:runs/run/files": {"bytes": 32350, "sha256": "1e653c3d53c920e53ec7142071b1a187518c5f3a6a679321f38e29ad71a82d5d"},"job:baseline@r00/prompt": {"bytes": 11347, "sha256": "5aca38cfae577e7e5e5974c2b6cd64e55ec35a1dfab33eaf62eff70652854df5"},"job:baseline@r00/scope": {"bytes": 379, "sha256": "831e9c99bdd04789b89bfddb89c97939a813323c9173d742adabbb5f1f8a7dc1"},"job:baseline@r00/system": {"bytes": 3173, "sha256": "c3879a563e2a512b82358d0c3927dcbfe9347725e592035a9b64c5d1b34e6654"},@@ -143,7 +143,7 @@"chat:planner:planner/messages": {"bytes": 348, "sha256": "f50fc3cdf3a426fc9c9b830b6e68d2cfe9fd9b7125550362b018f9c9b454b25c"},"chat:planner:planner/sampling": {"bytes": 3421, "sha256": "918170272cea656e8c542c54b777c57d1a4567a8cc36a0c1cd825cb81a01b9bb"},"chat:planner:planner/system": {"bytes": 11919, "sha256": "194d0e2a724c4799816033228af15cac568dd51c14ed85bff9c94ae5ba281866"},- "context:runs/run/files": {"bytes": 32408, "sha256": "51c869ee3e50de5f07b165fd818af922c2e427ef818a2e31a3b22b3246571cfd"},+ "context:runs/run/files": {"bytes": 32350, "sha256": "1e653c3d53c920e53ec7142071b1a187518c5f3a6a679321f38e29ad71a82d5d"},"job:baseline@r00/prompt": {"bytes": 11347, "sha256": "5aca38cfae577e7e5e5974c2b6cd64e55ec35a1dfab33eaf62eff70652854df5"},"job:baseline@r00/scope": {"bytes": 379, "sha256": "831e9c99bdd04789b89bfddb89c97939a813323c9173d742adabbb5f1f8a7dc1"},"job:baseline@r00/system": {"bytes": 3173, "sha256": "c3879a563e2a512b82358d0c3927dcbfe9347725e592035a9b64c5d1b34e6654"},@@ -200,7 +200,7 @@"chat:planner:planner/messages": {"bytes": 348, "sha256": "f50fc3cdf3a426fc9c9b830b6e68d2cfe9fd9b7125550362b018f9c9b454b25c"},"chat:planner:planner/sampling": {"bytes": 3421, "sha256": "918170272cea656e8c542c54b777c57d1a4567a8cc36a0c1cd825cb81a01b9bb"},"chat:planner:planner/system": {"bytes": 14279, "sha256": "b9199fdf3a0bc64a88587f4b8c8efe1443bc20164e1b9e5eada29c7762adff2f"},- "context:runs/run/files": {"bytes": 37290, "sha256": "9c39a1f207a2ebe75f92ae9da268b052e51a64e317cdd2a2566b1d21301a3323"},+ "context:runs/run/files": {"bytes": 37232, "sha256": "3201918ccba99763efa1cc13a9a5bd9f9f2f69121ee61b8484c97666bcd36b6d"},"job:baseline@r00/prompt": {"bytes": 13687, "sha256": "ac1b0fc66ea413b427ddc1e90d80bf967048ec80216aeaef9c4c104c1df5ada3"},"job:baseline@r00/scope": {"bytes": 358, "sha256": "b0e9a906ab8df3ff56acc08198289aa3958c470e5fd16a4e0225178a2d88e715"},"job:baseline@r00/system": {"bytes": 2729, "sha256": "d12d4891ce72156aa561bdfa0ed1fb20c5826412024b0be07b423949528e5df6"},@@ -238,18 +238,18 @@},"scene.scene_blender.agent.fresh": {"payloads": {- "chat:model:asset_bollard:r00/messages": {"bytes": 11438, "sha256": "286832c63fa85410abe298f1bade7635df3045c972b9f32b49ad793ed71d630f"},+ "chat:model:asset_bollard:r00/messages": {"bytes": 12378, "sha256": "6a8687d6a1f8279b524fed2cbac3432b3522e4dea6cce9649f8421368fc56d28"},"chat:model:asset_bollard:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_bollard:r00/system": {"bytes": 5023, "sha256": "d074993ed2d086f4f56f2dec743149795d59a213b8a178434af2a1761aab6a38"},- "chat:model:asset_bollard_retry1:r00/messages": {"bytes": 11886, "sha256": "873bd0176ff772854cd05fdeb09e9924df69cf3b34eb1535ecea6a8d31021897"},+ "chat:model:asset_bollard:r00/system": {"bytes": 5171, "sha256": "e4791a5aa863df84aac7b1572e9923bbd271c4f95a29e0cbf0f2e7fb93f8f513"},+ "chat:model:asset_bollard_retry1:r00/messages": {"bytes": 12826, "sha256": "c749e3cbe29ab3d559cdf16a8150217de9a72bf06be1e23ee483962d2816bbab"},"chat:model:asset_bollard_retry1:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_bollard_retry1:r00/system": {"bytes": 5023, "sha256": "d074993ed2d086f4f56f2dec743149795d59a213b8a178434af2a1761aab6a38"},- "chat:model:asset_fishing_boat:r00/messages": {"bytes": 11482, "sha256": "61079d91f9d725f8ed23264f3f207041aa993d79144615358bd8e9691f9ebc7b"},+ "chat:model:asset_bollard_retry1:r00/system": {"bytes": 5171, "sha256": "e4791a5aa863df84aac7b1572e9923bbd271c4f95a29e0cbf0f2e7fb93f8f513"},+ "chat:model:asset_fishing_boat:r00/messages": {"bytes": 12422, "sha256": "ebd40c00f2abfc50a94dfa33aaa4d78a6802826ec0b068bc323c830933e41827"},"chat:model:asset_fishing_boat:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_fishing_boat:r00/system": {"bytes": 5023, "sha256": "d074993ed2d086f4f56f2dec743149795d59a213b8a178434af2a1761aab6a38"},+ "chat:model:asset_fishing_boat:r00/system": {"bytes": 5171, "sha256": "e4791a5aa863df84aac7b1572e9923bbd271c4f95a29e0cbf0f2e7fb93f8f513"},"chat:planner:planner/messages": {"bytes": 204, "sha256": "b91c27cbf7a8071bf320a68a6113bd25896bf0422f92b9087fb155bad18dbdc1"},"chat:planner:planner/sampling": {"bytes": 8144, "sha256": "e3636117bd8a55214485c988e6b225712ac0da4431deaed3e9f6c3c4b8a79620"},- "chat:planner:planner/system": {"bytes": 29723, "sha256": "c8bf6f664d7fd15dbae799dc6c0f904f7f13289b06daf476a7889160a1754ef8"},+ "chat:planner:planner/system": {"bytes": 29026, "sha256": "307a4cbe9f672e50aa19a50a885cb1858acb2edadf0140662702b925db619bfb"},"chat:planner:zone-layout#0/messages": {"bytes": 331, "sha256": "eeefd42e9d8d37a901af0ae126aebf39fb2e7861fabe6208d3a9408e1a3c1b37"},"chat:planner:zone-layout#0/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},"chat:planner:zone-layout#0/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},@@ -259,28 +259,28 @@"chat:planner:zone-layout#2/messages": {"bytes": 485, "sha256": "67e917190ee227c5ed3415ab4b03c072af313d7040704e7de671e63c42e2ab52"},"chat:planner:zone-layout#2/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},"chat:planner:zone-layout#2/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},- "context:runs/run/files": {"bytes": 54854, "sha256": "9821622650d6c16f9a4a9a93d3eebf5c6a10436059a027519f573ebeaef0da6f"},- "job:asset_bollard@r00/prompt": {"bytes": 12995, "sha256": "06653ddff53c0086045d18d4920a0e504ae9472547a06262501b5fd30be8a05a"},- "job:asset_bollard@r00/scope": {"bytes": 357, "sha256": "ac9f0a7bea99ed4a97d2a2d943a7949b7d27a7dac648d57df5712db049586c00"},- "job:asset_bollard@r00/system": {"bytes": 2537, "sha256": "7e9f8a86b9f2d38b846e5caad4949915462a3ce3411edfeabe7ed58d245eccb0"},- "job:env@r00/prompt": {"bytes": 44177, "sha256": "37aaba781940e905e9e64d0e3a9668f4bb0318b6c5c3c07e79551549fd5a6d8e"},- "job:env@r00/scope": {"bytes": 334, "sha256": "e47a619bae6cbaf0dd3d1feb2dc417f786a475434f454187f7446f3747c94ca5"},- "job:env@r00/system": {"bytes": 6011, "sha256": "84a58b966fee66290cfdf85997e8ae0f25f840e457f4b331cac118873d2c5cef"},- "job:refine_quay@r01/prompt": {"bytes": 11287, "sha256": "bac1bdf29a014cea74b373b222484c0b5e69d192bd2d65176e51833ac891ee2a"},- "job:refine_quay@r01/scope": {"bytes": 352, "sha256": "132e651c00e62ebe39769b0c1d18930badf17f7c6e2bfe32e968931e71ce298f"},- "job:refine_quay@r01/system": {"bytes": 6011, "sha256": "84a58b966fee66290cfdf85997e8ae0f25f840e457f4b331cac118873d2c5cef"},- "job:refine_quay@r02/prompt": {"bytes": 11286, "sha256": "6e33c3bb70f189155de4ea700c2d2e109384a5040e9a7952d2eab639092f4571"},- "job:refine_quay@r02/scope": {"bytes": 352, "sha256": "7c7d445e558ef3e5ec4bec50662efa7ea9db1310c1ca6fb401b05d0cdbc02cb0"},- "job:refine_quay@r02/system": {"bytes": 6011, "sha256": "84a58b966fee66290cfdf85997e8ae0f25f840e457f4b331cac118873d2c5cef"},- "job:refine_water@r01/prompt": {"bytes": 11292, "sha256": "f4835b7bfe0d270ed99f6835ecba39fa1e2be07fed39f4ad47fa5b9f13a10ef2"},- "job:refine_water@r01/scope": {"bytes": 354, "sha256": "e684bc294d73d267c4447ebc58f2c16ded8cce6f7f032d9fa09ad4822d9b6f70"},- "job:refine_water@r01/system": {"bytes": 6011, "sha256": "84a58b966fee66290cfdf85997e8ae0f25f840e457f4b331cac118873d2c5cef"},- "job:refine_water@r02/prompt": {"bytes": 11291, "sha256": "2eaf0608ecf6b1d04397cbf7a09319f5d0c5f8ce70e73321580dbd8a3b54d407"},- "job:refine_water@r02/scope": {"bytes": 354, "sha256": "41695e17f6da944fc5d7894428b9009e2785cf51bf0c7de1c2f99bde50f9c9eb"},- "job:refine_water@r02/system": {"bytes": 6011, "sha256": "84a58b966fee66290cfdf85997e8ae0f25f840e457f4b331cac118873d2c5cef"},- "job:zones_quay_water@r00/prompt": {"bytes": 50923, "sha256": "0f6b6c68040e7d87ba4125f9dcd91823cfee0e47d6849aa41a3f1c4e0d3f4c25"},- "job:zones_quay_water@r00/scope": {"bytes": 379, "sha256": "d7cde9503b57c30d54062b7f12f1023f1510fad249cff287c3b771c306a065bf"},- "job:zones_quay_water@r00/system": {"bytes": 6011, "sha256": "84a58b966fee66290cfdf85997e8ae0f25f840e457f4b331cac118873d2c5cef"},+ "context:runs/run/files": {"bytes": 60438, "sha256": "45f8c3c7e2df56537869918b6cf091c1985d102bdd660bb126bbfb0a8c9f7472"},+ "job:asset_bollard@r00/prompt": {"bytes": 13922, "sha256": "180d385bb533dedc37b3d0af79ceb3e07cf0a08e9600d7fadf17f47e8804608c"},+ "job:asset_bollard@r00/scope": {"bytes": 342, "sha256": "d7d32c17ba05779e24c5336cf50025dfae81e0cf5bfa6be0476b61904b0ad8f8"},+ "job:asset_bollard@r00/system": {"bytes": 2685, "sha256": "48a4603263c98cfaa5b3bb557c785530d917681f68f727d010cc51da13656b11"},+ "job:env@r00/prompt": {"bytes": 28245, "sha256": "d4497cb1bd83c4a51da5ed64d72f06ff72cf0ab4c62052c03e107f91dfc32e1d"},+ "job:env@r00/scope": {"bytes": 319, "sha256": "a2d238be2a9c9e14b71c7cf74d188086f1f5a37384e8b3067e0b17337a8bbe54"},+ "job:env@r00/system": {"bytes": 7239, "sha256": "67334373ec84ee3a89a3870646aef6a41f03b9ae15678e06e800bc206e10673d"},+ "job:refine_quay@r01/prompt": {"bytes": 11724, "sha256": "85946fcd2c2dfd1d27b44431b8f55131fce5a3ba23c8d57448c31bc8dc73833c"},+ "job:refine_quay@r01/scope": {"bytes": 337, "sha256": "bc5dd3dccbad4fc9d08f0269d0ca68f2d94a02ac12678a1a033655b9d3c969bf"},+ "job:refine_quay@r01/system": {"bytes": 7239, "sha256": "67334373ec84ee3a89a3870646aef6a41f03b9ae15678e06e800bc206e10673d"},+ "job:refine_quay@r02/prompt": {"bytes": 11723, "sha256": "1392f57c776fe80e906a2c215b60a8a4c6e4f33d8489144c6af9c554f3ffae17"},+ "job:refine_quay@r02/scope": {"bytes": 337, "sha256": "af693640984c468c2f4f4095a972e8eeab7cbdeeb07d35b266e91e4433e77e15"},+ "job:refine_quay@r02/system": {"bytes": 7239, "sha256": "67334373ec84ee3a89a3870646aef6a41f03b9ae15678e06e800bc206e10673d"},+ "job:refine_water@r01/prompt": {"bytes": 11729, "sha256": "40b36178e686aa0ce8fc66d0b731deabaa5e7535dee839481365df9867a11c40"},+ "job:refine_water@r01/scope": {"bytes": 339, "sha256": "537b57734ebcad3268f494e36acc44872eead63ecb2a0dffc6ef959ab1139664"},+ "job:refine_water@r01/system": {"bytes": 7239, "sha256": "67334373ec84ee3a89a3870646aef6a41f03b9ae15678e06e800bc206e10673d"},+ "job:refine_water@r02/prompt": {"bytes": 11728, "sha256": "5e6ad10e5fa21f8a456df7e6c3ecbeb1fe7bea885d3632f560cbb5a9c7896c7e"},+ "job:refine_water@r02/scope": {"bytes": 339, "sha256": "d9d228871962007cfc2ef267d9c64b10fdfa6e1a59882fc9867c35486b949a4d"},+ "job:refine_water@r02/system": {"bytes": 7239, "sha256": "67334373ec84ee3a89a3870646aef6a41f03b9ae15678e06e800bc206e10673d"},+ "job:zones_quay_water@r00/prompt": {"bytes": 35057, "sha256": "8e18d1a7baa4f7747fabe9affb187b29ba5a39e9e2d5342ebe5027c9ec20c68c"},+ "job:zones_quay_water@r00/scope": {"bytes": 364, "sha256": "69a91221629a23e4f5bc8ce393294d5c6a00213156b2d2ded4783159a0f02557"},+ "job:zones_quay_water@r00/system": {"bytes": 7239, "sha256": "67334373ec84ee3a89a3870646aef6a41f03b9ae15678e06e800bc206e10673d"},"judge:scene:runs/run/artifacts/renders/r00/input": {"bytes": 3690, "sha256": "8b1b52e0e3fd832fda14a7913d35cef8d5bda2cb02b8aea5a2935bbc1f7d5714"},"judge:scene:runs/run/artifacts/renders/r00/messages": {"bytes": 4930, "sha256": "676859b5172ea33c86195b543b5c80e49dc907598dbdddb57a9734e58df9e8a1"},"judge:scene:runs/run/artifacts/renders/r00/sampling": {"bytes": 14066, "sha256": "1f67b211de491259bed48f1499b8dbd9fa2037a903a637ba53befda40ade693d"},@@ -306,94 +306,38 @@"runs/run:layouts": "47a6e0c9cb08","runs/run:plan": "54e8de4267c4","runs/run:skeleton": "e42c2d2f88e0",- "runs/run:zones": "ffb8ffe86289"- }- },- "scene.scene_blender.agent.variant_argon_raw": {- "payloads": {- "chat:model:asset_bollard:r00/messages": {"bytes": 12581, "sha256": "d9b2993d620102574de019e2bffda4507df066a9f6620f539f752116a0171253"},- "chat:model:asset_bollard:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_bollard:r00/system": {"bytes": 5223, "sha256": "a07eba89fabc4086ed399f0efda35c6bc78a8fc54c1b30bbff08fffb0a922b27"},- "chat:model:asset_fishing_boat:r00/messages": {"bytes": 12625, "sha256": "896f312b383beaa6b22bdf5bb2ff49eda0d40467d4f4bef70306efa5fa0f82d4"},- "chat:model:asset_fishing_boat:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_fishing_boat:r00/system": {"bytes": 5223, "sha256": "a07eba89fabc4086ed399f0efda35c6bc78a8fc54c1b30bbff08fffb0a922b27"},- "chat:planner:planner/messages": {"bytes": 204, "sha256": "b91c27cbf7a8071bf320a68a6113bd25896bf0422f92b9087fb155bad18dbdc1"},- "chat:planner:planner/sampling": {"bytes": 8144, "sha256": "e3636117bd8a55214485c988e6b225712ac0da4431deaed3e9f6c3c4b8a79620"},- "chat:planner:planner/system": {"bytes": 29205, "sha256": "71ee264a440c3797e52f7e98a1cc4fd1b7d36336d100c5b85a176817947f8bbf"},- "chat:planner:zone-layout#0/messages": {"bytes": 331, "sha256": "eeefd42e9d8d37a901af0ae126aebf39fb2e7861fabe6208d3a9408e1a3c1b37"},- "chat:planner:zone-layout#0/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},- "chat:planner:zone-layout#0/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},- "chat:planner:zone-layout#1/messages": {"bytes": 401, "sha256": "73206223434695497c74e5f8f5bc0a0f1b147a7dc38147645c6cf42b5372484b"},- "chat:planner:zone-layout#1/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},- "chat:planner:zone-layout#1/system": {"bytes": 3391, "sha256": "fa6d28546a947ddc6ab8d0adb8af97a1605873109a47cf7f097f72d9788fd678"},- "chat:planner:zone-layout#2/messages": {"bytes": 485, "sha256": "67e917190ee227c5ed3415ab4b03c072af313d7040704e7de671e63c42e2ab52"},- "chat:planner:zone-layout#2/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},- "chat:planner:zone-layout#2/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},- "context:runs/run/files": {"bytes": 60730, "sha256": "ca95149fc321776a9fc93951b4bd23e6646a51484e29719078f5b418835ea3d0"},- "job:env@r00/prompt": {"bytes": 31821, "sha256": "452285156323952fc678cadeca942364e31c196fab266b5c9cc2109daae102a5"},- "job:env@r00/scope": {"bytes": 334, "sha256": "e47a619bae6cbaf0dd3d1feb2dc417f786a475434f454187f7446f3747c94ca5"},- "job:env@r00/system": {"bytes": 7284, "sha256": "13fb6151a371cd11e8892f5b046bca581b917ccc1a267fef0aa4c189b26983f3"},- "job:refine_quay@r01/prompt": {"bytes": 11824, "sha256": "5263700826ee3d83e98fd00bc5bdc1fa9310ff45edaa072f2e93dee55c2cf911"},- "job:refine_quay@r01/scope": {"bytes": 352, "sha256": "132e651c00e62ebe39769b0c1d18930badf17f7c6e2bfe32e968931e71ce298f"},- "job:refine_quay@r01/system": {"bytes": 7284, "sha256": "13fb6151a371cd11e8892f5b046bca581b917ccc1a267fef0aa4c189b26983f3"},- "job:refine_water@r01/prompt": {"bytes": 11829, "sha256": "c71f602bcf91c347635f2fd4fc2cc453718dfc0b8d25a5288c51f17c6c7f1961"},- "job:refine_water@r01/scope": {"bytes": 354, "sha256": "e684bc294d73d267c4447ebc58f2c16ded8cce6f7f032d9fa09ad4822d9b6f70"},- "job:refine_water@r01/system": {"bytes": 7284, "sha256": "13fb6151a371cd11e8892f5b046bca581b917ccc1a267fef0aa4c189b26983f3"},- "job:zones_quay_water@r00/prompt": {"bytes": 38696, "sha256": "8524b350a4485277de24641c0a67881e56b7c25879100cee0210417af6403a62"},- "job:zones_quay_water@r00/scope": {"bytes": 379, "sha256": "d7cde9503b57c30d54062b7f12f1023f1510fad249cff287c3b771c306a065bf"},- "job:zones_quay_water@r00/system": {"bytes": 7284, "sha256": "13fb6151a371cd11e8892f5b046bca581b917ccc1a267fef0aa4c189b26983f3"},- "judge:scene:runs/run/artifacts/renders/r00/input": {"bytes": 3690, "sha256": "8b1b52e0e3fd832fda14a7913d35cef8d5bda2cb02b8aea5a2935bbc1f7d5714"},- "judge:scene:runs/run/artifacts/renders/r00/messages": {"bytes": 4930, "sha256": "676859b5172ea33c86195b543b5c80e49dc907598dbdddb57a9734e58df9e8a1"},- "judge:scene:runs/run/artifacts/renders/r00/sampling": {"bytes": 14066, "sha256": "1f67b211de491259bed48f1499b8dbd9fa2037a903a637ba53befda40ade693d"},- "judge:scene:runs/run/artifacts/renders/r00/system": {"bytes": 21572, "sha256": "eee5e34a58a91720755be68ed4d39cf127c634a484a4948e77c77ecce7e8cd16"},- "judge:scene:runs/run/artifacts/renders/r01/input": {"bytes": 4690, "sha256": "b546f93804fc3a29f245076f24cee36e64a1a7a5d45181f05eacc5bf59fc2dc0"},- "judge:scene:runs/run/artifacts/renders/r01/messages": {"bytes": 5298, "sha256": "35679341c294b774ac1c228d9a2bc56f4792f8831dd1c216b513e4427e6cb0c1"},- "judge:scene:runs/run/artifacts/renders/r01/sampling": {"bytes": 14066, "sha256": "1f67b211de491259bed48f1499b8dbd9fa2037a903a637ba53befda40ade693d"},- "judge:scene:runs/run/artifacts/renders/r01/system": {"bytes": 21572, "sha256": "eee5e34a58a91720755be68ed4d39cf127c634a484a4948e77c77ecce7e8cd16"},- "skills:runs/run:baseline@r00/routed": {"bytes": 35, "sha256": "607ad2fd09f3e6a0617f5d52cff3edf2a91bd286e8bf5b18d5f7c0e5f6dfff80"},- "skills:runs/run:env@r00/routed": {"bytes": 122, "sha256": "b71c5d72d6d4265e0a320839c1e742785860c6103adf2bf6b62f85c6c7739d0c"},- "skills:runs/run:refine@r01/routed": {"bytes": 122, "sha256": "b71c5d72d6d4265e0a320839c1e742785860c6103adf2bf6b62f85c6c7739d0c"},- "skills:runs/run:zone@r00/routed": {"bytes": 122, "sha256": "b71c5d72d6d4265e0a320839c1e742785860c6103adf2bf6b62f85c6c7739d0c"}- },- "stage_keys": {- "runs/run:assemble": "8cb488f00680",- "runs/run:assets": "47a6e0c9cb08",- "runs/run:env": "47a6e0c9cb08",- "runs/run:layouts": "47a6e0c9cb08",- "runs/run:plan": "a8963db58beb",- "runs/run:skeleton": "bb3344ab52c5","runs/run:zones": "7dd540d9edd0"}},"scene.scene_blender.single_shot.fresh": {"payloads": {- "chat:model:asset_bollard:r00#0/messages": {"bytes": 11438, "sha256": "286832c63fa85410abe298f1bade7635df3045c972b9f32b49ad793ed71d630f"},+ "chat:model:asset_bollard:r00#0/messages": {"bytes": 12378, "sha256": "6a8687d6a1f8279b524fed2cbac3432b3522e4dea6cce9649f8421368fc56d28"},"chat:model:asset_bollard:r00#0/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_bollard:r00#0/system": {"bytes": 5023, "sha256": "d074993ed2d086f4f56f2dec743149795d59a213b8a178434af2a1761aab6a38"},- "chat:model:asset_bollard:r00#1/messages": {"bytes": 11438, "sha256": "286832c63fa85410abe298f1bade7635df3045c972b9f32b49ad793ed71d630f"},+ "chat:model:asset_bollard:r00#0/system": {"bytes": 5171, "sha256": "e4791a5aa863df84aac7b1572e9923bbd271c4f95a29e0cbf0f2e7fb93f8f513"},+ "chat:model:asset_bollard:r00#1/messages": {"bytes": 12378, "sha256": "6a8687d6a1f8279b524fed2cbac3432b3522e4dea6cce9649f8421368fc56d28"},"chat:model:asset_bollard:r00#1/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_bollard:r00#1/system": {"bytes": 5023, "sha256": "d074993ed2d086f4f56f2dec743149795d59a213b8a178434af2a1761aab6a38"},- "chat:model:asset_bollard_retry1:r00/messages": {"bytes": 11886, "sha256": "873bd0176ff772854cd05fdeb09e9924df69cf3b34eb1535ecea6a8d31021897"},+ "chat:model:asset_bollard:r00#1/system": {"bytes": 5171, "sha256": "e4791a5aa863df84aac7b1572e9923bbd271c4f95a29e0cbf0f2e7fb93f8f513"},+ "chat:model:asset_bollard_retry1:r00/messages": {"bytes": 12826, "sha256": "c749e3cbe29ab3d559cdf16a8150217de9a72bf06be1e23ee483962d2816bbab"},"chat:model:asset_bollard_retry1:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_bollard_retry1:r00/system": {"bytes": 5023, "sha256": "d074993ed2d086f4f56f2dec743149795d59a213b8a178434af2a1761aab6a38"},- "chat:model:asset_fishing_boat:r00/messages": {"bytes": 11482, "sha256": "61079d91f9d725f8ed23264f3f207041aa993d79144615358bd8e9691f9ebc7b"},+ "chat:model:asset_bollard_retry1:r00/system": {"bytes": 5171, "sha256": "e4791a5aa863df84aac7b1572e9923bbd271c4f95a29e0cbf0f2e7fb93f8f513"},+ "chat:model:asset_fishing_boat:r00/messages": {"bytes": 12422, "sha256": "ebd40c00f2abfc50a94dfa33aaa4d78a6802826ec0b068bc323c830933e41827"},"chat:model:asset_fishing_boat:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:asset_fishing_boat:r00/system": {"bytes": 5023, "sha256": "d074993ed2d086f4f56f2dec743149795d59a213b8a178434af2a1761aab6a38"},- "chat:model:env:r00/messages": {"bytes": 53645, "sha256": "f5a27a05db78d65d9733377ff3e04229e4582f56bbdafb62d44e010157bc550e"},+ "chat:model:asset_fishing_boat:r00/system": {"bytes": 5171, "sha256": "e4791a5aa863df84aac7b1572e9923bbd271c4f95a29e0cbf0f2e7fb93f8f513"},+ "chat:model:env:r00/messages": {"bytes": 37489, "sha256": "cef82169ca2b1fbcc95a01a8c4b34fc6a9b69452e9b8c91403b0131ab38fe643"},"chat:model:env:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:env:r00/system": {"bytes": 8371, "sha256": "d3578f116524eeb784b11d30ac62f981658be43de7b2cea76782e99c223f36fc"},- "chat:model:refine_quay:r01/messages": {"bytes": 20274, "sha256": "d718a55dc3aead09c7bc1c9ec1bee81204eefcec7210323e5f8e841732c35081"},+ "chat:model:env:r00/system": {"bytes": 9599, "sha256": "e534fd3749008e814efc4b61f9815a4efdde050697649ef83a07766c67ae0710"},+ "chat:model:refine_quay:r01/messages": {"bytes": 20591, "sha256": "603cc49e6ead7d954fc2db9512dc968a2e490687d0ea5e019c2d2edd1fbe190b"},"chat:model:refine_quay:r01/sampling": {"bytes": 92, "sha256": "2a36044e5c117fc288123a5937c6e3cb5845f040b4de69f9c2440f623956c381"},- "chat:model:refine_quay:r01/system": {"bytes": 8371, "sha256": "d3578f116524eeb784b11d30ac62f981658be43de7b2cea76782e99c223f36fc"},- "chat:model:refine_water:r01/messages": {"bytes": 20280, "sha256": "61da533b7ca292e0bb5ee93b96d63127cda8ec61c86affc40bb99d96cc4f484c"},+ "chat:model:refine_quay:r01/system": {"bytes": 9599, "sha256": "e534fd3749008e814efc4b61f9815a4efdde050697649ef83a07766c67ae0710"},+ "chat:model:refine_water:r01/messages": {"bytes": 20597, "sha256": "ec728d7bdb9efd54001d90afe75e827d1bc25a52d55612b12bec6e49608e9fbb"},"chat:model:refine_water:r01/sampling": {"bytes": 92, "sha256": "2a36044e5c117fc288123a5937c6e3cb5845f040b4de69f9c2440f623956c381"},- "chat:model:refine_water:r01/system": {"bytes": 8371, "sha256": "d3578f116524eeb784b11d30ac62f981658be43de7b2cea76782e99c223f36fc"},- "chat:model:zones_quay_water:r00/messages": {"bytes": 60377, "sha256": "60b16c78e669d6f4eeacc0a4f638ef4f247d5457a616f64aa65c2c58c279fee9"},+ "chat:model:refine_water:r01/system": {"bytes": 9599, "sha256": "e534fd3749008e814efc4b61f9815a4efdde050697649ef83a07766c67ae0710"},+ "chat:model:zones_quay_water:r00/messages": {"bytes": 44288, "sha256": "2b1c406b90d670f733772dcc51300b9b24a3e0d9c6639a499714995269a12eba"},"chat:model:zones_quay_water:r00/sampling": {"bytes": 92, "sha256": "08e72af1b4fb249378c5a151e019ded70a1014eafa4d50f70927bb225f695678"},- "chat:model:zones_quay_water:r00/system": {"bytes": 8371, "sha256": "d3578f116524eeb784b11d30ac62f981658be43de7b2cea76782e99c223f36fc"},+ "chat:model:zones_quay_water:r00/system": {"bytes": 9599, "sha256": "e534fd3749008e814efc4b61f9815a4efdde050697649ef83a07766c67ae0710"},"chat:planner:planner/messages": {"bytes": 204, "sha256": "b91c27cbf7a8071bf320a68a6113bd25896bf0422f92b9087fb155bad18dbdc1"},"chat:planner:planner/sampling": {"bytes": 8144, "sha256": "e3636117bd8a55214485c988e6b225712ac0da4431deaed3e9f6c3c4b8a79620"},- "chat:planner:planner/system": {"bytes": 29723, "sha256": "c8bf6f664d7fd15dbae799dc6c0f904f7f13289b06daf476a7889160a1754ef8"},+ "chat:planner:planner/system": {"bytes": 29026, "sha256": "307a4cbe9f672e50aa19a50a885cb1858acb2edadf0140662702b925db619bfb"},"chat:planner:zone-layout#0/messages": {"bytes": 331, "sha256": "eeefd42e9d8d37a901af0ae126aebf39fb2e7861fabe6208d3a9408e1a3c1b37"},"chat:planner:zone-layout#0/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},"chat:planner:zone-layout#0/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},@@ -419,7 +363,7 @@"runs/run:layouts": "1fe4141b3b47","runs/run:plan": "54e8de4267c4","runs/run:skeleton": "e42c2d2f88e0",- "runs/run:zones": "d83624cb1257"+ "runs/run:zones": "f6a9dbff2217"}},"scene.scene_threejs.agent.fresh": {@@ -445,7 +389,7 @@"chat:planner:zone-layout#2/messages": {"bytes": 485, "sha256": "67e917190ee227c5ed3415ab4b03c072af313d7040704e7de671e63c42e2ab52"},"chat:planner:zone-layout#2/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},"chat:planner:zone-layout#2/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},- "context:runs/run/files": {"bytes": 55674, "sha256": "b13f8fe30cb373f4e8eae10b376ba430710b7c28fc71b830f63a35fefae4eb36"},+ "context:runs/run/files": {"bytes": 55616, "sha256": "e616e7e5b285d8891c6e98a0d45af7d9aad5eab1aae2e5c220c63b508b31c2dd"},"job:asset_bollard@r00/prompt": {"bytes": 5182, "sha256": "eb2371d5d91daf0664ea4155eed95618b5798277e9b8e5cd118e48181aa499a3"},"job:asset_bollard@r00/scope": {"bytes": 357, "sha256": "450d659126efa73cdfe3371f18464e6ab40230af78367de6994d4712c9a8aaaf"},"job:asset_bollard@r00/system": {"bytes": 997, "sha256": "20d72b3bb074ab09ce4b2b6656b8bd0fcffef4fd3d437f2c171cb3efd96d475c"},@@ -531,7 +475,7 @@"chat:planner:zone-layout#2/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},"chat:planner:zone-layout#2/system": {"bytes": 3361, "sha256": "9acfcedb047a4f1623c483cb99c1f8aa30fd1158e56f88d1c1518f138db1b34f"},"context:runs/run/_assets/crate/files": {"bytes": 32742, "sha256": "fee09c023ada7ce7895e070195596c0b5103ecc5dabf1cd86dbc5352775c90b2"},- "context:runs/run/files": {"bytes": 55674, "sha256": "b13f8fe30cb373f4e8eae10b376ba430710b7c28fc71b830f63a35fefae4eb36"},+ "context:runs/run/files": {"bytes": 55616, "sha256": "e616e7e5b285d8891c6e98a0d45af7d9aad5eab1aae2e5c220c63b508b31c2dd"},"job:asset_crate@r00/prompt": {"bytes": 18032, "sha256": "27dfd5f4bedcc036f93c844230347401da2c4c4f8b1d300bfaece147b704c3fc"},"job:asset_crate@r00/scope": {"bytes": 430, "sha256": "3c4b45fd7cc847cc6a6a5f3b83784cddab99440be445d61f924f56b834cd1476"},"job:asset_crate@r00/system": {"bytes": 3716, "sha256": "6068eff7b8c36b4edcc5d64ead79bd3de7386e0bbaf4fb141210883fb34f8518"},@@ -578,7 +522,7 @@"chat:planner:planner/messages": {"bytes": 204, "sha256": "b91c27cbf7a8071bf320a68a6113bd25896bf0422f92b9087fb155bad18dbdc1"},"chat:planner:planner/sampling": {"bytes": 8047, "sha256": "ac5eba7173d30fcdfc0682ff102fc65e9f4325a5a4f1fbdaca4b0dcd4547d4b1"},"chat:planner:planner/system": {"bytes": 26641, "sha256": "97cc784b73ca9dfb4f46cc62c0db7c73d9cb6085db85b7feba1895d98e0fa6f6"},- "context:runs/run/files": {"bytes": 55674, "sha256": "b13f8fe30cb373f4e8eae10b376ba430710b7c28fc71b830f63a35fefae4eb36"},+ "context:runs/run/files": {"bytes": 55616, "sha256": "e616e7e5b285d8891c6e98a0d45af7d9aad5eab1aae2e5c220c63b508b31c2dd"},"job:env@r00/prompt": {"bytes": 36302, "sha256": "f12e0b146910ce6a10b44229fb8b080fc72943831b04231f0522f6fdfb3892b2"},"job:env@r00/scope": {"bytes": 334, "sha256": "b94c09720c9e481759ea0408d7ef708c4d5a3e47b1c2b28a8d901a7c77d7c66b"},"job:env@r00/system": {"bytes": 5625, "sha256": "3e4c806c832c2fb4ab9dd3b1d5063c611b07258ce2fa6d9b3f25df5a467734c7"},@@ -622,7 +566,7 @@"chat:planner:zone-layout#2/messages": {"bytes": 485, "sha256": "67e917190ee227c5ed3415ab4b03c072af313d7040704e7de671e63c42e2ab52"},"chat:planner:zone-layout#2/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},"chat:planner:zone-layout#2/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},- "context:runs/run/files": {"bytes": 55674, "sha256": "b13f8fe30cb373f4e8eae10b376ba430710b7c28fc71b830f63a35fefae4eb36"},+ "context:runs/run/files": {"bytes": 55616, "sha256": "e616e7e5b285d8891c6e98a0d45af7d9aad5eab1aae2e5c220c63b508b31c2dd"},"job:env@r00/prompt": {"bytes": 36302, "sha256": "f12e0b146910ce6a10b44229fb8b080fc72943831b04231f0522f6fdfb3892b2"},"job:env@r00/scope": {"bytes": 334, "sha256": "b94c09720c9e481759ea0408d7ef708c4d5a3e47b1c2b28a8d901a7c77d7c66b"},"job:env@r00/system": {"bytes": 5625, "sha256": "3e4c806c832c2fb4ab9dd3b1d5063c611b07258ce2fa6d9b3f25df5a467734c7"},@@ -679,7 +623,7 @@"chat:planner:zone-layout#2/messages": {"bytes": 485, "sha256": "67e917190ee227c5ed3415ab4b03c072af313d7040704e7de671e63c42e2ab52"},"chat:planner:zone-layout#2/sampling": {"bytes": 3397, "sha256": "160445a83ede28afc0191547fd42d9341e694ef70aaad380bebf60ead0a65c49"},"chat:planner:zone-layout#2/system": {"bytes": 3326, "sha256": "494acec302dd23fa2fc6ee1eb6d48e873d6cf0ad98bad413e27578cf062313d4"},- "context:runs/run/files": {"bytes": 55674, "sha256": "b13f8fe30cb373f4e8eae10b376ba430710b7c28fc71b830f63a35fefae4eb36"},+ "context:runs/run/files": {"bytes": 55616, "sha256": "e616e7e5b285d8891c6e98a0d45af7d9aad5eab1aae2e5c220c63b508b31c2dd"},"job:env@r00/prompt": {"bytes": 36302, "sha256": "f12e0b146910ce6a10b44229fb8b080fc72943831b04231f0522f6fdfb3892b2"},"job:env@r00/scope": {"bytes": 334, "sha256": "b94c09720c9e481759ea0408d7ef708c4d5a3e47b1c2b28a8d901a7c77d7c66b"},"job:env@r00/system": {"bytes": 5625, "sha256": "3e4c806c832c2fb4ab9dd3b1d5063c611b07258ce2fa6d9b3f25df5a467734c7"},@@ -780,9 +724,9 @@"chat:planner:planner/messages": {"bytes": 1354, "sha256": "5b1a589e27562a3668649aed4be4857a34804a2acdc140eb8fb3630d970f71a6"},"chat:planner:planner/sampling": {"bytes": 6272, "sha256": "04dbfbbd42d8b93a12571a1908beacc7eb471e6f2c0fc077371aa86e2a99fb40"},"chat:planner:planner/system": {"bytes": 20977, "sha256": "0a3c2ea2bfb39981a166952054d1dcc10dffdf097d493e89b03e0b8586d2ee8e"},- "context:runs/run/_cand/c0/files": {"bytes": 47140, "sha256": "3079f03e3f62bc0993b9cc8aa4f829cc901cf9b46debfa1ddc593986a0ae04c2"},- "context:runs/run/_cand/c1/files": {"bytes": 47140, "sha256": "3079f03e3f62bc0993b9cc8aa4f829cc901cf9b46debfa1ddc593986a0ae04c2"},- "context:runs/run/files": {"bytes": 47140, "sha256": "3079f03e3f62bc0993b9cc8aa4f829cc901cf9b46debfa1ddc593986a0ae04c2"},+ "context:runs/run/_cand/c0/files": {"bytes": 47082, "sha256": "431132a1be77fd78faf44676066d73c10c7dcdcc024fe50a177a579427482987"},+ "context:runs/run/_cand/c1/files": {"bytes": 47082, "sha256": "431132a1be77fd78faf44676066d73c10c7dcdcc024fe50a177a579427482987"},+ "context:runs/run/files": {"bytes": 47082, "sha256": "431132a1be77fd78faf44676066d73c10c7dcdcc024fe50a177a579427482987"},"job:baseline_c0@r00/prompt": {"bytes": 20387, "sha256": "158c7483180b37e34a73f10bf8cabd1f708d89920c60b791f3815bdf4703ef8d"},"job:baseline_c0@r00/scope": {"bytes": 434, "sha256": "2654f6339a446c7181633e50fb347ef3b3002dd0dc96cd6f88db21018f2fd4ba"},"job:baseline_c0@r00/system": {"bytes": 2865, "sha256": "e8bdde0b2251c9f422c9a02c8c457543798280f5215e740312ffb73f1d0d867f"},@@ -826,7 +770,7 @@"chat:planner:planner/messages": {"bytes": 1354, "sha256": "8681af8220fc76fb89bbaacf34c658644272af66ace3045ccef202e75e29482f"},"chat:planner:planner/sampling": {"bytes": 6272, "sha256": "04dbfbbd42d8b93a12571a1908beacc7eb471e6f2c0fc077371aa86e2a99fb40"},"chat:planner:planner/system": {"bytes": 15857, "sha256": "faf1d558f09254b16c3f0680aa2117737c72dea402b3b7a0be721c46bdd169fe"},- "context:runs/run/files": {"bytes": 36756, "sha256": "61eb91e2c6edecaf5bf121d3565afcc5fad9f8950959083aead80bbb14e55f08"},+ "context:runs/run/files": {"bytes": 36698, "sha256": "f295bfd1aa9416926881f65ac65e05a98d799205ea689bc9600719c6fcd61ab2"},"job:baseline@r00/prompt": {"bytes": 15196, "sha256": "479f99ceb71d4bddfecbd0b62b61d92d3756aa69c2e67c260d33e93913c4e25f"},"job:baseline@r00/scope": {"bytes": 354, "sha256": "2b65c930399cda88341114c6d8289228fedde80a1d17568900e1fe5a055915bd"},"job:baseline@r00/system": {"bytes": 2205, "sha256": "2ca6cc8997115b5940dcef874355b65c82f25ee8000b964fe0ad96dce25ac0e8"},@@ -867,7 +811,7 @@"chat:planner:planner/messages": {"bytes": 1354, "sha256": "5b1a589e27562a3668649aed4be4857a34804a2acdc140eb8fb3630d970f71a6"},"chat:planner:planner/sampling": {"bytes": 6272, "sha256": "04dbfbbd42d8b93a12571a1908beacc7eb471e6f2c0fc077371aa86e2a99fb40"},"chat:planner:planner/system": {"bytes": 18287, "sha256": "0e78778a5c81b420699c7148ee039722877c818cea9844f793d543fccc8ef97b"},- "context:runs/run/files": {"bytes": 41696, "sha256": "f4e6cba8ba386a1b16c68fdd363eb5633e7622c2cd5357238ede92b7f1b19aec"},+ "context:runs/run/files": {"bytes": 41638, "sha256": "b8118f228681041fae720e09b470add3d86bb308ed3ababa21551d3a7494f3b6"},"job:baseline@r00/prompt": {"bytes": 17698, "sha256": "f39ab241b54cdce8db4eda26ba44d4664b8869ec13e57b8b5e863fb9d982b459"},"job:baseline@r00/scope": {"bytes": 432, "sha256": "b7970aa82707a446f41764e551d45617767914f38d6861453d2d61991d48ed05"},"job:baseline@r00/system": {"bytes": 3208, "sha256": "e24e99f321231e5587cae7f4fbbbcc50fbd254768f4f4c860c4dfa8f83804810"},@@ -906,7 +850,7 @@"chat:planner:planner/messages": {"bytes": 1354, "sha256": "5b1a589e27562a3668649aed4be4857a34804a2acdc140eb8fb3630d970f71a6"},"chat:planner:planner/sampling": {"bytes": 6272, "sha256": "04dbfbbd42d8b93a12571a1908beacc7eb471e6f2c0fc077371aa86e2a99fb40"},"chat:planner:planner/system": {"bytes": 18287, "sha256": "0e78778a5c81b420699c7148ee039722877c818cea9844f793d543fccc8ef97b"},- "context:runs/run/files": {"bytes": 41696, "sha256": "f4e6cba8ba386a1b16c68fdd363eb5633e7622c2cd5357238ede92b7f1b19aec"},+ "context:runs/run/files": {"bytes": 41638, "sha256": "b8118f228681041fae720e09b470add3d86bb308ed3ababa21551d3a7494f3b6"},"job:baseline@r00/prompt": {"bytes": 17667, "sha256": "92e0968c790d93dcd7b2237f826f314fbbc2f0b82977552f8b5875df7eb1c18c"},"job:baseline@r00/scope": {"bytes": 648, "sha256": "eed11065615f36b3d1b869300d16518bd4ec6e258630c204fdeff14e676cc2d8"},"job:baseline@r00/system": {"bytes": 3208, "sha256": "e24e99f321231e5587cae7f4fbbbcc50fbd254768f4f4c860c4dfa8f83804810"},@@ -937,7 +881,7 @@"chat:planner:planner/messages": {"bytes": 1354, "sha256": "5b1a589e27562a3668649aed4be4857a34804a2acdc140eb8fb3630d970f71a6"},"chat:planner:planner/sampling": {"bytes": 6272, "sha256": "04dbfbbd42d8b93a12571a1908beacc7eb471e6f2c0fc077371aa86e2a99fb40"},"chat:planner:planner/system": {"bytes": 18287, "sha256": "0e78778a5c81b420699c7148ee039722877c818cea9844f793d543fccc8ef97b"},- "context:runs/run/files": {"bytes": 41696, "sha256": "f4e6cba8ba386a1b16c68fdd363eb5633e7622c2cd5357238ede92b7f1b19aec"},+ "context:runs/run/files": {"bytes": 41638, "sha256": "b8118f228681041fae720e09b470add3d86bb308ed3ababa21551d3a7494f3b6"},"job:baseline@r00/prompt": {"bytes": 17698, "sha256": "f39ab241b54cdce8db4eda26ba44d4664b8869ec13e57b8b5e863fb9d982b459"},"job:baseline@r00/scope": {"bytes": 432, "sha256": "b7970aa82707a446f41764e551d45617767914f38d6861453d2d61991d48ed05"},"job:baseline@r00/system": {"bytes": 3208, "sha256": "e24e99f321231e5587cae7f4fbbbcc50fbd254768f4f4c860c4dfa8f83804810"},diff --git a/harness/tests/prompts/manifest.py b/harness/tests/prompts/manifest.pyindex 057770dc..c325e873 100644--- a/harness/tests/prompts/manifest.py+++ b/harness/tests/prompts/manifest.py@@ -415,10 +415,6 @@ SCENARIOS: dict[str, tuple[Track, Language, dict[str, Any], Callable[[Rig], None_two_runs(1, 2)),"scene.scene_blender.single_shot.fresh": (SC, Language.SCENE_BLENDER, {"plan": small_scene(Language.SCENE_BLENDER), "broken_assets": frozenset({"Bollard"})},lambda r: r.run(rounds=1, single_shot=True)),- # raw mode (D113): the argon_raw overlay and its `scene_lib = false` knob — every bpy brief, planner and- # skill bundle a session reads without one word of the harness library- "scene.scene_blender.agent.variant_argon_raw": (SC, Language.SCENE_BLENDER, {"plan": small_scene(Language.SCENE_BLENDER)},- _switched("C3D_VARIANT", "argon_raw", 1)),"graphics.glsl_shader.agent.fresh": (G, Language.GLSL_SHADER, {}, _two_runs(1, 2)),"graphics.glsl_shader.agent.best_of_2": (G, Language.GLSL_SHADER, {}, lambda r: r.run(rounds=0, candidates=2)),"graphics.glsl_shader.agent.rebuild": (G, Language.GLSL_SHADER, {"fail": REBUILD}, lambda r: r.run(rounds=1)),diff --git a/harness/tests/prompts/test_snippets_run.py b/harness/tests/prompts/test_snippets_run.pyindex f3b8b8cf..1b1ed991 100644--- a/harness/tests/prompts/test_snippets_run.py+++ b/harness/tests/prompts/test_snippets_run.py@@ -156,13 +156,11 @@ console.log('ENV_OK');assert "ENV_OK" in out# --------------------------------------------------------------------- scene_blender-def _bpy_workspace(tmp_path, *, lib: bool = True):+def _bpy_workspace(tmp_path):"""The scratch workspace the scene_blender snippets run in."""- from codeverse3d.config import Settingsfrom codeverse3d.contracts.common import Language, Trackfrom codeverse3d.contracts.plan import ScenePlanfrom codeverse3d.languages import get_runtime- from codeverse3d.languages.scene_blender import SceneBlenderRuntimefrom codeverse3d.tracks.planner import plan_examplefrom codeverse3d.workspace import Workspace@@ -170,22 +168,24 @@ def _bpy_workspace(tmp_path, *, lib: bool = True):pytest.skip("no Blender binary configured")plan = ScenePlan.model_validate(plan_example(Track.SCENE, Language.SCENE_BLENDER))ws = Workspace(tmp_path / "ws")- rt = get_runtime(Language.SCENE_BLENDER) if lib else SceneBlenderRuntime(settings=Settings(scene_lib=False))+ rt = get_runtime(Language.SCENE_BLENDER)rt.skeleton(ws, plan)return ws, rt, plan-def _build_scene_blender_examples(tmp_path, rel: str, *, lib: bool) -> None:+def test_scene_blender_contract_examples_build_through_the_runtime(tmp_path) -> None:"""The contract's two labelled files (src/env.py + src/zones/quay.py) lint clean, assemble, build and seatwhat they place through the real runtime, gates included."""from codeverse3d.contracts.artifacts import Severityfrom tests.scene_runtime.conftest import browser_available+ rel = "scene_blender/contract.md"files = labelled_files(rel, tag="python")assert len(blocks(rel, "python")) == len(files) and set(files) == {"src/env.py", "src/zones/quay.py"}if not browser_available():pytest.skip("puppeteer/chrome required for the census probe")- ws, rt, plan = _bpy_workspace(tmp_path, lib=lib)- assert (ws.src / "lib").exists() is lib+ ws, rt, plan = _bpy_workspace(tmp_path)for path, body in files.items():(ws.root / path).write_text(body)rep = rt.lint(ws)@@ -198,16 +198,6 @@ def _build_scene_blender_examples(tmp_path, rel: str, *, lib: bool) -> None:assert rows["QuayDeck"]["supported"] and not rows["QuayDeck"]["floating"]assert all(rows[f"Bollard_{i}"]["supported"] for i in range(6)), {k: v for k, v in rows.items() if k.startswith("Bollard")}-def test_scene_blender_contract_examples_build_through_the_runtime(tmp_path) -> None:- _build_scene_blender_examples(tmp_path, "scene_blender/contract.md", lib=True)--def test_the_argon_raw_contract_examples_build_through_the_runtime_in_raw_mode(tmp_path) -> None:- _build_scene_blender_examples(tmp_path, "variants/argon_raw/scene_blender/contract.md", lib=False)-# --------------------------------------------------------------------- glsl_shaderdef test_glsl_shader_contract_example_builds_and_moves(tmp_ws) -> None:"""The contract's ONE complete ``mainImage`` (the block that defines it) is ``src/shader.frag`` as written."""diff --git a/harness/tests/scene_blender/test_build.py b/harness/tests/scene_blender/test_build.pyindex b24d136e..fea7806b 100644--- a/harness/tests/scene_blender/test_build.py+++ b/harness/tests/scene_blender/test_build.py@@ -90,7 +90,6 @@ def test_the_skeleton_builds_and_passes(tmp_ws) -> None:plan = ScenePlan.model_validate(plan_example(Track.SCENE))rt = _rt()rt.skeleton(tmp_ws, plan)- assert (tmp_ws.src / "lib" / "terrain.py").is_file() # the env below is built FROM the libraryassert rt.lint(tmp_ws).passedasm = rt.assemble(tmp_ws, plan)assert set(asm.zones_included) == {"quay", "water"} and not asm.zones_failed@@ -144,3 +143,26 @@ def test_a_hero_glb_is_imported_into_ctx_assets(tmp_ws) -> None:row = _rows(res)["Windmill_0"]assert row["zone"] == "Yard" and row["supported"] # a 4 m box centred on z = 2 stands on the ground+++def test_the_example_scene_builds_and_seats_every_root(tmp_ws) -> None:+ """The plan-less starter scene (``write_example``: env, two assets, three zones in plain bpy) lints+ clean, builds through the wrapper, seats every placed root (no floating, no burial past the 10 cm+ WARN, nothing interpenetrating), keeps every driver simple and leaves the render settings alone."""+ from codeverse3d.languages.scene_blender import write_example++ rt = _rt()+ write_example(tmp_ws)+ assert rt.lint(tmp_ws).passed, [(f.target, f.message) for f in rt.lint(tmp_ws).findings]+ res = rt.build(tmp_ws)+ assert res.ok, res.stdout_tail+ report = json.loads((tmp_ws.artifacts / "bpy_build.json").read_text())+ assert report["errors"] == [] and sorted(report["zones_ok"]) == ["hamlet", "lakeside", "orchard"], report+ assert res.census["bpy"]["drivers_invalid"] == [] and res.census["bpy"]["handlers"] == []+ rows = _rows(res)+ assert {"House_0", "Signpost_0", "LanternPost_2", "Crate_2", "Rock_9", "AppleTree_11", "HarvestCrate_2"} <= set(rows), sorted(rows)+ for r in rows.values():+ if not r["exempt"]:+ assert r["supported"] and not r["floating"] and r["sunk_m"] <= 0.10, r+ assert res.census["placement"]["interpenetrations"] == []+ assert res.census["fog"] is not None and res.census["light_types"]diff --git a/harness/tests/scene_blender/test_env_check.py b/harness/tests/scene_blender/test_env_check.pyindex 840a6abe..e5f874a7 100644--- a/harness/tests/scene_blender/test_env_check.py+++ b/harness/tests/scene_blender/test_env_check.py@@ -1,4 +1,4 @@-"""D112: ``SceneBlenderRuntime.check_env`` / ``lib_interface`` — the env module alone (argon loop+"""D112: ``SceneBlenderRuntime.check_env`` — the env module alone (argon loopiteration 5: a recovered env.py that did not parse, one that raised on an unknown keyword, one withno lamp and no world)."""@@ -42,17 +42,17 @@ def test_a_good_env_passes_and_each_broken_one_says_why(tmp_path):assert not (tmp_path / "good" / "run" / "src" / "_c3d_env_check.py").exists(), "the check's entry is deleted"-def test_a_raise_inside_a_lib_helper_is_quoted_at_the_env_line_that_called_it():- """D112 review: iteration 5 blender r1_04's recovered env was reported at ``src/lib/mesh.py:69`` — a file- the repair single-shot never sees — while its own bad call (a tuple rotation) was ``env.py:287``."""+def test_a_raise_inside_a_helper_module_is_quoted_at_the_env_line_that_called_it():+ """D112 review: a recovered env was reported at the line of a helper module it called — a file the+ repair single-shot never sees — while its own bad call (a tuple rotation) was ``env.py:287``."""from codeverse3d.languages.scene_blender import env_frametb = ('Traceback (most recent call last):\n'' File "/h/wrappers/run_bpy_scene.py", line 199, in run\n out = mod.build_env(ctx)\n'' File "/w/run/src/env.py", line 457, in build_env\n _build_sky_backdrop(ctx)\n'' File "/w/run/src/env.py", line 287, in _build_sky_backdrop\n sky_batch.box(\n ~~~~~~^\n'- ' File "/w/run/src/lib/mesh.py", line 69, in box_geometry\n c, s = math.cos(rotation), math.sin(rotation)\n'+ ' File "/b/5.2/scripts/modules/bpy_extras/object_utils.py", line 69, in object_data_add\n c, s = math.cos(rotation), math.sin(rotation)\n''TypeError: must be real number, not tuple\n')assert env_frame(tb) == "src/env.py:287 `sky_batch.box(`"- assert env_frame(tb.replace("/src/env.py", "/src/lib/env.py")) == "" # a lib module is not the env+ assert env_frame(tb.replace("/src/env.py", "/src/zones/env.py")) == "" # another module is not the envdiff --git a/harness/tests/scene_blender/test_library.py b/harness/tests/scene_blender/test_library.pydeleted file mode 100644index 1f5c2c80..00000000--- a/harness/tests/scene_blender/test_library.py+++ /dev/null@@ -1,305 +0,0 @@-"""The bpy starter library (D51): the effects catalog prints every signature as the lib declares it (a-parameter printed positional that the lib takes by keyword only is a TypeError in every scene that trusts-the row), and ONE Blender build proves every factory seats what it makes, names nothing twice and stays-under its triangle ceiling."""--from __future__ import annotations--import ast-import json-import re-import struct-from pathlib import Path--import pytest--from codeverse3d.config import get_settings-from codeverse3d.contracts.common import Language-from codeverse3d.contracts.plan import CameraPlan-from codeverse3d.languages import get_runtime-from codeverse3d.languages.scene_blender import lib_files, render_scene_py, write_example-from codeverse3d.prompts.catalog import language_text-from tests.scene_runtime.conftest import needs_browser--MODULES: dict[str, Path] = {p.stem: p for p in lib_files()}-CATALOG = language_text(Language.SCENE_BLENDER, "effects_catalog.md")-_ROW_MODULE = re.compile(r"`lib/([a-z_]+)\.py`")-_SPAN = re.compile(r"`([^`]+)`")-_CALL = re.compile(r"^([A-Za-z_][A-Za-z0-9_]*)\(")-_METHOD = re.compile(r"^\.([a-z_][a-z0-9_]*)\(")-needs_blender = pytest.mark.skipif(not get_settings().resolve_blender(), reason="no Blender binary")---def _tree(stem: str) -> ast.Module:- return ast.parse(MODULES[stem].read_text(), filename=str(MODULES[stem]))---def _defs(stem: str) -> tuple[dict[str, ast.FunctionDef], dict[str, dict[str, ast.FunctionDef]]]:- """Top-level functions and {class: {method}} of a module."""- funcs: dict[str, ast.FunctionDef] = {}- classes: dict[str, dict[str, ast.FunctionDef]] = {}- for node in _tree(stem).body:- if isinstance(node, ast.FunctionDef):- funcs[node.name] = node- elif isinstance(node, ast.ClassDef):- classes[node.name] = {n.name: n for n in node.body if isinstance(n, ast.FunctionDef)}- return funcs, classes---def _boundary(fn: ast.FunctionDef) -> tuple[list[str], list[str], bool]:- """(positional names, keyword-only names, takes ``**kwargs``) of a def, ``self`` dropped."""- a = fn.args- return [p.arg for p in a.posonlyargs + a.args if p.arg != "self"], [p.arg for p in a.kwonlyargs], a.kwarg is not None---_MORE = "_more" # what a printed "…" parses as---def _printed(span: str) -> ast.FunctionDef | None:- """A printed signature — ``instance(collection, source, *, height_at, …)``, ``.box(mat, loc, size)``,- ``lib.place.seat(obj, height_at)`` — parsed as a def; None when the span is not one."""- if "(" not in span or not span.endswith(")"):- return None- body = (span[1:] if span.startswith(".") else span).replace("…", _MORE).replace("...", _MORE)- head, _, rest = body.partition("(")- try:- node = ast.parse(f"def {head.rsplit('.', 1)[-1]}({rest}: pass").body[0]- except SyntaxError:- return None- return node if isinstance(node, ast.FunctionDef) else None---def _faults(printed: ast.FunctionDef, lib: ast.FunctionDef) -> list[str]:- """How a printed signature misleads a caller of ``lib``: a parameter printed positional that the lib- takes by keyword only, a ``*`` anywhere but at the lib's boundary (or missing), a name the lib lacks.- ``…`` stands for "and the rest"; the lib spells a shadowing ``rng`` as ``rng_``."""- a = printed.args- names = [p.arg for p in a.posonlyargs + a.args]- n_bare = len(names) - len(a.defaults)- abbreviated = bool(names) and names[0] == _MORE- lpos, lkw, var_kw = _boundary(lib)- out: list[str] = []- for i, p in enumerate([] if abbreviated else names):- if p == _MORE:- continue- if i < len(lpos):- if p.rstrip("_") != lpos[i].rstrip("_"):- out.append(f"positional #{i + 1} is {p!r}, the lib's is {lpos[i]!r}")- elif p in lkw:- out.append(f"{p!r} is printed positional but the lib takes it by keyword only")- elif not (var_kw and i >= n_bare):- out.append(f"{p!r} is not a parameter of the lib")- if a.kwonlyargs and not lkw:- out.append("a `*` is printed but the lib has no keyword-only parameters")- elif a.kwonlyargs and not abbreviated:- printed_pos = [p for p in names if p != _MORE]- if [p.rstrip("_") for p in printed_pos] != [p.rstrip("_") for p in lpos]:- out.append(f"the `*` is printed after {printed_pos}, the lib's boundary is after {lpos}")- elif lkw:- out.append(f"the lib's `*` before {lkw} is not printed")- out += [f"{p.arg!r} is not a parameter of the lib" for p in a.kwonlyargs- if p.arg != _MORE and p.arg not in lkw and p.arg not in lpos and not var_kw]- return out---def test_the_catalog_prints_every_signature_with_the_libs_keyword_only_boundary() -> None:- """Regression: 15 catalog rows printed a REQUIRED keyword-only parameter as positional; a zone written- from the row raised ``TypeError`` and was dropped from the build."""- faults: list[str] = []- checked = 0- for row in [line for line in CATALOG.splitlines() if line.startswith("| ") and "`lib/" in line]:- stem = _ROW_MODULE.findall(row)[0]- funcs, classes = _defs(stem)- methods = {m: fn for cls in classes.values() for m, fn in cls.items()}- for span in _SPAN.findall(row):- printed = _printed(span)- if printed is None:- continue- lib = methods.get(printed.name) if span.startswith(".") else (funcs.get(printed.name) or classes.get(printed.name, {}).get("__init__"))- if lib is not None:- checked += 1- faults += [f"lib/{stem}.py `{span}`: {f}" for f in _faults(printed, lib)]- assert checked > 100, checked- assert not faults, "\n".join(faults)---# --------------------------------------------------------------------------- one Blender build-#: every module exercised in one zone; each thing its own placement row (the gate's unit)-LIB_CHECK = '''"""lib_check: a representative call per library module, each its own placement row."""-from lib import architecture, figure, lighting, materials, mesh, motion, place, scatter, sky, terrain, vegetation, water-from mathutils import Matrix---def build(ctx):- rng = ctx.rng(3)- h = ctx.height_at- rock = materials.mineral_surface("CheckRock", "6F6A60", stone=True)- wood = materials.woodgrain(materials.material("CheckWood", "6B4A2B"))- stone = materials.ashlar("CheckStone", "A89F8C")- lime = materials.limestone("CheckLime", "C9BFA8")- brick = materials.masonry("CheckBrick", "8B4A3A")- alloy = materials.worn_alloy("CheckAlloy", "8C8C90", seed=2)- bark = materials.material("CheckBark", "4A3524", roughness=0.9, noise_scale=6.0)- leaves = materials.foliage("CheckLeaf", "4A7A2A", variants=3)- coat = materials.material("CheckCoat", "8A3A3A")- glow = materials.emissive("CheckGlow", "FFB270", 5.0)- glass = materials.glass("CheckGlass")- clear = materials.clear_water("CheckClear")- foam = water.foam_shader("CheckFoam")-- b = mesh.Batch("Prims_0") # primitives, a transformed view, a bevel; seated, spun by a driver- b.box(wood, (-30.0, 24.0, 0.5), (1.0, 0.6, 1.0), rotation=0.3)- b.sphere(rock, (-28.0, 24.0, 0.5), 0.5, subdivision=2)- b.lathe(alloy, (-26.0, 24.0), [(0.0, 0.0), (0.4, 0.0), (0.3, 0.8), (0.45, 1.2), (0.0, 1.25)], sides=24)- b.beam(wood, (-22.0, 24.0, 0.1), (-21.5, 24.3, 1.5), 0.08, end=0.04)- b.transformed(Matrix.Translation((-16.0, 24.0, 0.0))).box(brick, (0.0, 0.0, 0.5), (1.0, 1.0, 1.0))- prims = b.finish(ctx.collection, bevel=0.02)- place.seat(prims[0], h)- motion.spin(prims[0], "Z", 0.25, ctx)- mesh.curve_object("Rope_0", [(-30.0, 28.0, 0.03), (-29.5, 28.5, 0.03), (-29.0, 28.0, 0.03)], 0.03, wood, ctx.collection)-- r = mesh.Batch("Rocks_0") # terrain recipes stand on h- terrain.boulder(r, rock, (-8.0, 28.0, h(-8.0, 28.0)), 1.2, seed=1)- terrain.rock_field(r, rock, (-4.0, 28.0), 3.0, 10, h, rng)- r.finish(ctx.collection)-- for i, kind in enumerate(("broadleaf", "oak", "cypress", "pine")): # the four tree kinds- t = mesh.Batch(f"Tree{kind.title()}_0")- x = 10.0 + 6.0 * i- vegetation.tree(t, (x, 24.0, h(x, 24.0)), 7.0, bark, leaves[i % 3], seed=i, kind=kind, max_leaves=2500)- t.finish(ctx.collection)- p = mesh.Batch("Plants_0")- vegetation.shrub(p, bark, leaves[0], (10.0, 30.0, h(10.0, 30.0)), scale=1.2, seed=4)- vegetation.fern(p, leaves[2], (16.0, 30.0, h(16.0, 30.0)), seed=2)- p.finish(ctx.collection)- patch = terrain.ground("MeadowSurface", ctx.collection, size=6.0, segments=6, height_at=h, material=None, center=(-20.0, 32.0))- patch.hide_render = True- patch.hide_viewport = True- vegetation.grass_patch("Meadow_0", ctx.collection, patch, density=8.0, seed=1)-- house = mesh.Batch("CheckHouse_0") # the example already has a House_0: names are global- architecture.timber_house(house, {"tile": brick, "trim": wood}, -28.0, 33.0, 6.0, 5.0, 2,- {"wall": lime, "timber": wood, "door": coat, "window": glass}, rng, 1)- place.seat(house.finish(ctx.collection)[0], h)- bridge = mesh.Batch("Bridge_0")- architecture.stone_bridge(bridge, stone, rock, center=(-16.0, 38.0, h(-16.0, 38.0)), span=12.0, width=3.0, rise=2.0, height_at=h)- bridge.finish(ctx.collection)- lan = mesh.Batch("Lantern_0")- architecture.lantern(lan, glow, wood, (16.0, 44.0, 2.0))- hung = lan.finish(ctx.collection)[0]- hung["placement"] = "free"- sign = architecture.text_mesh("Sign_0", ctx.collection, "LIB", (20.0, 42.0, h(20.0, 42.0)), 0.6, coat)- place.seat(sign, h)- # a glazed room shell (the env's recipe) stood on the ground, so the gate measures it as ONE row- cabin = architecture.room_shell(ctx.collection, alloy, center=(0.0, -28.0, h(0.0, -28.0) + 1.6), extents=(4.0, 3.0, 2.8),- openings=(("front", 0.0, 1.2, 0.0, 2.2),), glazed=True)- assert [o.name for o in cabin[:4]] == ["RoomShell", "RoomShellFloor", "Ceiling", "CeilingGlass"]-- fall = water.waterfall("Fall_0", ctx.collection, (6.0, 44.0, h(6.0, 44.0)), width=2.0, height=3.0, ctx=ctx)- assert len(fall) == 5- fountain = mesh.Batch("Fountain_0")- spray = water.fountain_jets(fountain, ctx.collection, clear, center=(-2.0, 44.0, h(-2.0, 44.0)), nozzle_r=0.3, landing_r=1.4,- count=10, ctx=ctx, seed=3)- water.droplets(fountain, foam, (-2.0, 44.0, h(-2.0, 44.0) + 0.3), 1.0, h(-2.0, 44.0), rng, count=60)- fountain.finish(ctx.collection)- assert spray is not None and spray["placement"] == "free"-- folk = mesh.Batch("Visitors_0")- figure.figure(folk, coat, coat, (-12.0, 44.0, h(-12.0, 44.0)), heading=place.heading((-12.0, 44.0), (0.0, 0.0)), pose=0.5)- folk.finish(ctx.collection)- lighting.point_light(ctx.collection, "CheckBulb", (-2.0, 44.0, 2.0), "FFD9A0", 60.0)- sky.aurora("AuroraSky_0", ctx.collection, (0.0, 80.0, 120.0), ctx=ctx)- stars = mesh.Batch("Stars_0")- sky.stars(stars, glow, seed=1, count=200)- stars.finish(ctx.collection)[0]["placement"] = "free"-- crate = ctx.assets["crate"] # an instance, a stack, the self-checks, a keyframed drift- one = scatter.instance(ctx.collection, crate, "LibCrate_0", -14.0, 44.0, height_at=h, rot_z=0.4)- yaw = place.face_toward(one, (0.0, 0.0))- # the same size and yaw as the base: a smaller or turned crate's corner columns overhang the- # open-topped base, which the gate (rightly) reads as floating- top = scatter.instance(ctx.collection, crate, "StackedCrate_0", -14.0, 44.0, height_at=h, rot_z=yaw, scale=1.0)- place.rest_on(top, one)- pts = scatter.poisson(rng, area=(0.0, 40.0, 4.0, 43.0), min_dist=1.4, max_count=2, mask=lambda x, y: 1.0)- assert len(pts) == 2- scatter.scatter(ctx.collection, crate, "CheckCrate", pts, height_at=h, rng=rng, scale=(0.8, 1.1))- assert place.clear_of([prims[0], one, hung]) == []- motion.drift(one, (0.0, 0.5, 0.0), ctx)- return ctx.collection-'''--#: the catalog's per-call ceilings, on the GLB the gate reads (evaluated triangles per root)-CEILINGS = {- "Prims_0": 12_000, "Rocks_0": 4_000, "TreeBroadleaf_0": 9_000, "TreeOak_0": 9_000, "TreeCypress_0": 9_000, "TreePine_0": 600,- "Plants_0": 3_000, "CheckHouse_0": 14_000, "Bridge_0": 1_500, "Lantern_0": 800, "Sign_0": 2_000, "Fall_0": 2_500,- "Fountain_0": 6_000, "Visitors_0": 2_000, "Stars_0": 600, "RoomShell": 2_000,-}-SEATED = {"Prims_0", "Rope_0", "Rocks_0", "TreeBroadleaf_0", "TreeOak_0", "TreeCypress_0", "TreePine_0", "Plants_0",- "CheckHouse_0", "Bridge_0", "Sign_0", "Fall_0", "Fountain_0", "Visitors_0", "LibCrate_0", "StackedCrate_0",- "CheckCrate_0", "CheckCrate_1", "RoomShell"}-EXEMPT = {"Meadow_0": "instanced", "Lantern_0": "free", "Fountain_0Spray_0": "free", "AuroraSky_0": "free", "Stars_0": "free"}---def _glb_json(path: Path) -> dict:- data = path.read_bytes()- assert data[:4] == b"glTF"- length = struct.unpack_from("<I", data, 12)[0]- return json.loads(data[20:20 + length])---def _subtree_tris(g: dict, ix: int) -> int:- node = g["nodes"][ix]- n = 0- if "mesh" in node:- per = sum(g["accessors"][p["indices"]]["count"] // 3 for p in g["meshes"][node["mesh"]]["primitives"])- inst = node.get("extensions", {}).get("EXT_mesh_gpu_instancing")- n += per * (g["accessors"][inst["attributes"]["TRANSLATION"]]["count"] if inst else 1)- return n + sum(_subtree_tris(g, c) for c in node.get("children", []))---@needs_blender-@needs_browser-def test_one_blender_build_seats_what_every_factory_makes(tmp_ws) -> None:- """The example scene plus a zone that calls every module, built ONCE through the wrapper- and measured by the gate's own placement table: every root rests on what is under it- (no floating, no burial past the 10 cm WARN), the clouds and hanging things carry their- exemption, no name was deduplicated, every driver is simple, nothing touched the render- settings, and each root stays under the catalog's triangle ceiling."""- rt = get_runtime(Language.SCENE_BLENDER)- write_example(tmp_ws)- (tmp_ws.src / "zones" / "lib_check.py").write_text(LIB_CHECK)- cams = [CameraPlan(name="overview", position=(0.0, 28.0, 75.0), look_at=(0.0, 0.0, -20.0), fov=50.0)]- (tmp_ws.src / "scene.py").write_text(render_scene_py(["hamlet", "lakeside", "orchard", "lib_check"], ["crate", "lantern_post"], [], cams))- assert rt.lint(tmp_ws).passed- res = rt.build(tmp_ws)- assert res.ok, res.stdout_tail- report = json.loads((tmp_ws.artifacts / "bpy_build.json").read_text())- assert report["errors"] == [] and not [w for w in report["warnings"] if "render settings" in w], report- assert res.census["bpy"]["drivers_invalid"] == [] and res.census["bpy"]["handlers"] == []- rows = {r["name"]: r for r in res.census["placement"]["assets"]}- check = {n: r for n, r in rows.items() if r.get("zone") == "LibCheck"}- assert set(check) >= SEATED, sorted(SEATED - set(check))- for name in SEATED:- r = check[name]- assert r["supported"] and not r["floating"], (name, r)- assert r["sunk_m"] <= 0.10, (name, r["sunk_m"], r["sunk_into"])- for name, why in EXEMPT.items():- assert check[name]["exempt"] == why, (name, check[name].get("exempt"))- assert check["StackedCrate_0"]["support"] == "LibCrate_0"- # the example's own rows are seated too, and nothing interpenetrates- for r in rows.values():- if not r["exempt"]:- assert r["supported"] and not r["floating"] and r["sunk_m"] <= 0.10, r- assert res.census["placement"]["interpenetrations"] == []- # names: no Blender dedupe suffix anywhere, every root once- g = _glb_json(tmp_ws.artifacts / "census.glb")- zone = next(n for n in g["nodes"] if n["name"] == "LibCheck")- roots = [g["nodes"][c]["name"] for c in zone["children"]]- assert len(roots) == len(set(roots)) and not [n for n in roots if re.search(r"\.\d{3}$", n)], roots- tris = {g["nodes"][c]["name"]: _subtree_tris(g, c) for c in zone["children"]}- over = {n: (tris[n], cap) for n, cap in CEILINGS.items() if tris[n] > cap}- assert not over, over- assert all(tris[n] > 0 for n in CEILINGS)-diff --git a/harness/tests/scene_blender/test_lint.py b/harness/tests/scene_blender/test_lint.pyindex 30d27fb8..18578d72 100644--- a/harness/tests/scene_blender/test_lint.py+++ b/harness/tests/scene_blender/test_lint.py@@ -4,11 +4,10 @@ from __future__ import annotationsimport pytest-from codeverse3d.contracts.artifacts import LintKind, Severity+from codeverse3d.contracts.artifacts import Severityfrom codeverse3d.languages._ast_lint import BASE_FORBIDDEN_IMPORTSfrom codeverse3d.languages.scene_blender import (FORBIDDEN_IMPORTS,- lib_files,lint_scene_source,simple_driver,)@@ -73,17 +72,3 @@ def test_simple_driver_is_blenders_subset() -> None:for bad in ("frame ** 2", "frame % 3", "noise.noise((frame, 0, 0))", "hypot(frame, 1)", "'a'", "[frame]", "sin(x=1)"):assert not simple_driver(bad), bad-[email protected]("path", lib_files(), ids=[p.stem for p in lib_files()])-def test_the_library_passes_the_agent_lint_itself(path) -> None:- """The workspace gate reads ``src/lib/`` for syntax only — but agents COPY what they read, so- every module must also pass the policy an agent's file is held to: no trap API, no unseeded- randomness, no bpy.ops, no clock or file access. ``sky.py`` holds the world setters, which- only ``src/env.py`` may call, so it is linted in the env role (minus the env's own- ``build_env`` / ``height_at`` export requirement)."""- role = "env" if path.stem == "sky" else "helper"- findings = lint_scene_source(path.read_text(), target=f"src/lib/{path.name}", role=role)- bad = [f for f in findings if f.severity is not Severity.INFO- and not (role == "env" and f.data.get("kind") == LintKind.LAYOUT.value)]- assert not bad, [(f.severity.value, f.message) for f in bad]-diff --git a/harness/tests/scene_blender/test_raw_mode.py b/harness/tests/scene_blender/test_raw_mode.pydeleted file mode 100644index 7cc05efa..00000000--- a/harness/tests/scene_blender/test_raw_mode.py+++ /dev/null@@ -1,151 +0,0 @@-"""scene_blender raw mode (D113, ``Settings.scene_lib`` off, the ``argon_raw`` variant): the raw skeleton, the lint-(a ``lib`` import is an ERROR in raw mode only), the knob read at call time, the overlay's knob, and the raw stubs-building in real Blender."""--from __future__ import annotations--import ast-import re--import pytest--from codeverse3d.config import Settings, get_settings-from codeverse3d.contracts.common import Language, Track-from codeverse3d.contracts.plan import ScenePlan-from codeverse3d.languages.scene_blender import (- SceneBlenderRuntime,- lint,- lint_scene_source,- write_skeleton,-)-from codeverse3d.prompts.variants import (- activate,- knobs_applied,- variant_info,-)-from codeverse3d.tracks.planner import plan_example-from codeverse3d.workspace import Workspace--BPY = Language.SCENE_BLENDER-RAW = "argon_raw"-#: what names the harness library in text a model reads: the workspace path, a dotted helper call-#: (``lib.place.seat``), an import of the package, a module file (``lib/vegetation.py``)-LIB_MENTION = re.compile(r"src/lib|\blib\.[a-z_]+|\bfrom lib\b|\bimport lib\b|\blib/[a-z_]+\.py")-def _plan() -> ScenePlan:- return ScenePlan.model_validate(plan_example(Track.SCENE, BPY))---def _lib_imports(source: str) -> list[str]:- tree = ast.parse(source)- out = [a.name for n in ast.walk(tree) if isinstance(n, ast.Import) for a in n.names if a.name.split(".")[0] == "lib"]- return out + [str(n.module) for n in ast.walk(tree) if isinstance(n, ast.ImportFrom) and (n.module or "").split(".")[0] == "lib"]---# --------------------------------------------------------------------------- the skeleton-def test_the_raw_skeleton_ships_no_library_and_no_stub_imports_or_names_it(tmp_ws) -> None:- plan = _plan()- written = {p.relative_to(tmp_ws.root).as_posix() for p in write_skeleton(tmp_ws, plan, lib=False)}- assert not (tmp_ws.src / "lib").exists() and not any(rel.startswith("src/lib/") for rel in written), sorted(written)- assert {"src/env.py", "src/scene.py", "src/zones/quay.py", "src/assets/bollard.py"} <= written- for p in sorted(tmp_ws.src.rglob("*.py")):- text = p.read_text()- assert not _lib_imports(text), (p.name, _lib_imports(text))- assert not LIB_MENTION.search(text), (p.name, LIB_MENTION.search(text))- assert "toolbox" not in text, p.name- rep = lint(tmp_ws, lib=False)- assert rep.passed and not [f for f in rep.findings if f.severity.value != "info"], [(f.target, f.message) for f in rep.findings]---# --------------------------------------------------------------------------- the lint-def test_a_lib_import_is_an_error_in_raw_mode_and_not_in_library_mode() -> None:- source = "from lib.materials import material\nimport bpy\n\n\ndef build(ctx):\n return ctx.collection\n"- raw = [f for f in lint_scene_source(source, target="src/zones/quay.py", role="zone", lib=False) if "lib" in f.message]- assert len(raw) == 1 and raw[0].severity.value == "error" and raw[0].data["kind"] == "bad_import", raw- assert "no harness library ships in raw mode" in raw[0].message and "src/env.py" in raw[0].fix_hint- assert raw[0].target == "src/zones/quay.py:1"- assert not [f for f in lint_scene_source(source, target="src/zones/quay.py", role="zone") if f.severity.value != "info"]- for spelling in ("import lib.place\n", "from lib import place\n"):- assert any(f.severity.value == "error" for f in lint_scene_source(spelling, target="src/env.py", role="helper", lib=False)), spelling- # the shared code of a raw scene lives in env.py: importing it stays allowed- assert not lint_scene_source("from env import linked\n", target="src/zones/quay.py", role="helper", lib=False)---def test_parallel_runs_of_one_process_never_flip_each_others_mode(tmp_path, monkeypatch) -> None:- """The bench runs ``--parallel N`` runs as threads of ONE process sharing the settings singleton. A- raw run ending while a library run is still going (and the reverse) changes neither's answer, and- the process is left at its default (the D113 review's race: the knob used to be written onto the- singleton and put back, unreferenced-counted, by whichever run ended)."""- import threading-- monkeypatch.delenv("C3D_SCENE_LIB", raising=False)- get_settings.cache_clear()- rt, seen = SceneBlenderRuntime(), {"raw": [], "lib": []}- raw_in, lib_in, raw_out = threading.Event(), threading.Event(), threading.Event()-- def run(name: str, variant: str, start: threading.Event, wait: threading.Event, done: threading.Event | None) -> None:- with activate(variant), knobs_applied(get_settings(), variant_info(variant) if variant else None):- start.set()- seen[name].append(rt.ships_lib)- wait.wait(5)- seen[name].append(rt.ships_lib)- if done is not None:- done.set()-- try:- a = threading.Thread(target=run, args=("raw", RAW, raw_in, lib_in, raw_out)) # starts first, ends first- b = threading.Thread(target=run, args=("lib", "", lib_in, raw_out, None))- a.start()- raw_in.wait(5)- b.start()- a.join(10)- b.join(10)- assert seen == {"raw": [False, False], "lib": [True, True]}, seen- assert get_settings().scene_lib is True and rt.ships_lib is True- finally:- get_settings.cache_clear()---# --------------------------------------------------------------------------- in Blender-def test_the_raw_placeholder_env_and_an_empty_zone_build_in_blender(tmp_path) -> None:- """The raw stubs as written build in Blender 5.2 through the wrapper: no env error, every zone ok,- the placeholder's Ground in the census, and no world, lamp or fog until the author writes them."""- from codeverse3d.conventions import to_pascal-- if not get_settings().resolve_blender():- pytest.skip("no Blender binary configured")- ws = Workspace(tmp_path / "ws")- rt = SceneBlenderRuntime(settings=Settings(scene_lib=False))- plan = _plan()- rt.skeleton(ws, plan)- assert not (ws.src / "lib").exists()- zones = {rt.zone_file(z.name).rsplit("/", 1)[-1][:-3] for z in plan.zones}- run = rt.run_wrapper(ws, ws.artifacts, zones={n: to_pascal(n) for n in zones}, blend=False, timeout_s=600)- errors = [(e.get("stage"), e.get("name"), e.get("error_file"), e.get("error_line"), e.get("error_message"))- for e in run.report.get("errors") or []]- assert run.result.ok and not errors, (run.result.error_type, run.result.error_message, errors)- assert sorted(run.report["zones_ok"]) == sorted(zones)- assert run.facts.get("fog") is None and not run.facts.get("lights"), {k: run.facts.get(k) for k in ("fog", "lights")}- assert run.facts.get("unique_tris", 0) > 0, "the placeholder plate and the asset blockouts are geometry"---def test_the_mcp_server_applies_the_runs_variant_knobs_in_its_own_process(tmp_ws, monkeypatch) -> None:- """The session's MCP server is a separate process: it reads the run's variant off ``spec.json`` (the- frozen ``options.variant``) and applies its knobs at start, so its ``build`` lint is the round's."""- from codeverse3d.spatial.mcp_server import apply_run_knobs, build_context- from tests.orchestrator_tracks.conftest import make_spec-- monkeypatch.delenv("C3D_SCENE_LIB", raising=False)- monkeypatch.delenv("C3D_VARIANT", raising=False)- spec = make_spec(Track.SCENE, BPY)- tmp_ws.write_json(tmp_ws.spec_path, spec.model_copy(update={"options": spec.options.model_copy(update={"variant": RAW})}))- get_settings.cache_clear()- try:- ctx = build_context(tmp_ws.root)- assert ctx.language == BPY.value and get_settings().scene_lib is True- assert apply_run_knobs(ctx) == {"scene_lib": False} and get_settings().scene_lib is False- tmp_ws.write_json(tmp_ws.spec_path, spec) # a base run applies nothing- get_settings.cache_clear()- assert apply_run_knobs(build_context(tmp_ws.root)) == {} and get_settings().scene_lib is True- finally:- get_settings.cache_clear()diff --git a/harness/tests/scene_prompts/test_quality_teaching.py b/harness/tests/scene_prompts/test_quality_teaching.pyindex db58bc6f..3193ba67 100644--- a/harness/tests/scene_prompts/test_quality_teaching.py+++ b/harness/tests/scene_prompts/test_quality_teaching.py@@ -52,7 +52,7 @@ def test_the_bpy_env_brief_owns_the_enclosure_only_for_an_interior() -> None:zones_table="", cameras="", effects="", animation="", asset_api="", textures="", constraints_text="",references="", skills="", tool_cards="", zone_name="Z", zone_description="d", zone_bbox="bb", zone_contents=[],zone_file="src/zones/z.py", neighbours=[], layout="", env_file="src/env.py", entry_file="src/scene.py",- single_shot=False, output_format="OUT", effects_catalog="")+ single_shot=False, output_format="OUT")assert "INTERIOR" in render("tracks/scene_env_bpy.j2", **base, interior=True, glazed=False)assert "GLASS HOUSE" in render("tracks/scene_env_bpy.j2", **base, interior=True, glazed=True)assert "INTERIOR" not in render("tracks/scene_env_bpy.j2", **base, interior=False, glazed=False)diff --git a/harness/tests/scene_runtime/blender_scene_fixture.py b/harness/tests/scene_runtime/blender_scene_fixture.pyindex e9e341fe..d39b1ceb 100644--- a/harness/tests/scene_runtime/blender_scene_fixture.py+++ b/harness/tests/scene_runtime/blender_scene_fixture.py@@ -113,25 +113,47 @@ def build_fixture(ws: Workspace, *, moving: bool = True, probe: bool = True) ->return ws-#: a 6 x 6 x 3 m room on the ground, built by the REAL ``lib.architecture.room_shell`` (so the-#: names the driver's lid rule reads — root ``RoomShell``, lid ``Ceiling`` — are the library's,-#: not the test's); the shell is red, the floor green, a near-vertical sun lights the inside+#: a 6 x 6 x 3 m room on the ground with the names the driver's lid rule reads — root ``RoomShell``,+#: lid ``Ceiling`` parented under it (what the prompts promise the author the rig lifts by name);+#: the shell is red, the floor green, a near-vertical sun lights the insideROOM_SHELL_BPY = r'''import sys+import bmeshimport bpyargv = sys.argv[sys.argv.index("--") + 1:]-blend, starter = argv[0], argv[1]-sys.path.insert(0, starter)-from lib.architecture import room_shell-from lib.materials import material-+blend = argv[0]bpy.ops.wm.read_factory_settings(use_empty=True)sc = bpy.context.scene-red = material("ShellRed", (0.8, 0.08, 0.08), roughness=0.9)-green = material("FloorGreen", (0.08, 0.8, 0.08), roughness=0.9)-root, floor, ceiling, *walls = room_shell(sc.collection, red, center=(0.0, 0.0, 1.5), extents=(6.0, 6.0, 3.0), thickness=0.2)-floor.data.materials[0] = green+++def material(name, rgb):+ m = bpy.data.materials.new(name)+ m.node_tree.nodes["Principled BSDF"].inputs["Base Color"].default_value = (*rgb, 1.0)+ return m+++def slab(name, parent, center, size, mat):+ bm = bmesh.new()+ bmesh.ops.create_cube(bm, size=1.0)+ bmesh.ops.scale(bm, vec=size, verts=bm.verts)+ me = bpy.data.meshes.new(name)+ bm.to_mesh(me)+ bm.free()+ me.materials.append(mat)+ ob = bpy.data.objects.new(name, me)+ ob.parent, ob.location = parent, center+ sc.collection.objects.link(ob)+ return ob+++red, green = material("ShellRed", (0.8, 0.08, 0.08)), material("FloorGreen", (0.08, 0.8, 0.08))+root = bpy.data.objects.new("RoomShell", None)+sc.collection.objects.link(root)+slab("RoomShellFloor", root, (0.0, 0.0, 0.1), (6.0, 6.0, 0.2), green)+ceiling = slab("Ceiling", root, (0.0, 0.0, 2.9), (6.0, 6.0, 0.2), red)+for i, (cx, cy, sx, sy) in enumerate(((3.0, 0.0, 0.2, 6.0), (-3.0, 0.0, 0.2, 6.0), (0.0, 3.0, 6.0, 0.2), (0.0, -3.0, 6.0, 0.2))):+ slab(f"RoomShellWall_{i}", root, (cx, cy, 1.5), (sx, sy, 3.0), red)assert root.name == "RoomShell" and ceiling.name == "Ceiling" and ceiling.parent is rootsun = bpy.data.objects.new("Sun", bpy.data.lights.new("Sun", "SUN"))sun.data.energy = 5.0@@ -143,14 +165,12 @@ bpy.ops.wm.save_as_mainfile(filepath=blend, compress=True)def build_room_shell(root: Path) -> Path:"""Write ``root/scene.blend``: the room-shell interior; returns the .blend's path."""- from codeverse3d.languages.scene_blender import STARTER_DIR-root.mkdir(parents=True, exist_ok=True)script = root / "build_room_shell.py"script.write_text(ROOM_SHELL_BPY)blend = root / "scene.blend"blender = get_settings().resolve_blender()- proc = run_subprocess([blender, "-b", "--factory-startup", "--python", str(script), "--", str(blend), str(STARTER_DIR)],+ proc = run_subprocess([blender, "-b", "--factory-startup", "--python", str(script), "--", str(blend)],cwd=root, env=blender_env(), timeout_s=120)assert proc.returncode == 0 and blend.is_file(), proc.stderr[-2000:]return blend