Official Codebase of 3DCodeVerse
Python
Entry skill is `3dcodeverse`: the plugin's controller; restore the prompt text the audits found lost
gaoypeng135fc6dc497c
diff --git a/harness/README.md b/harness/README.mdindex 89eaa886..aa61025c 100644--- a/harness/README.md+++ b/harness/README.md@@ -8,10 +8,12 @@ has a fresh-context judge score it.* **Tracks:** `static_object` · `articulated_object` · `scene` · `graphics`* **Languages:** `blender` · `cadquery` · `threejs` · `urdf_blender` · `scene_threejs` ·`scene_blender` · `glsl_shader` · `opengl_python`-* **Skills** (`skills/`): `3d-director` (the workflow: init → plan → code → check → judge →- refine, stop rules), `3d-lang-<language>` × 8 (each language's files, frame, sandbox and- every threshold the instruments measure) and the `c3d-*` craft bundles (parts that touch,- bbox contract, repeats, scene lighting / placement / materials / motion, shader traps …).+* **Skills** (`skills/`): `3dcodeverse` (the controller: what 3D coding here is, the tracks+ and languages, every instrument, the workflow init → plan → code → check → judge → refine+ with its stop rules, and the quality rules every track shares), `3d-lang-<language>` × 8+ (each language's files, frame, sandbox and every threshold the instruments measure) and the+ `c3d-*` craft bundles (parts that touch, bbox contract, repeats, scene lighting / placement /+ materials / motion, shader traps …).* **Instruments** (`3dcode`, a command-line tool): `init`, `validate-plan`, `build`, `check`(every gate of the track), `judge-pack`, `score`, and the per-track probes — `measure`,`check-contract`, `check-connectivity`, `cross-section`, `render-views`, `render-sheet`,@@ -52,7 +54,7 @@ Ask the host agent for a 3D thing and name the language if you care:> Make a small Japanese garden at dusk with a koi pond as a three.js scene.> Make neon rain on a window as a GLSL shader.-The `3d-director` skill drives the rest: a workspace directory with `spec.json`, `plan.json`,+The `3dcodeverse` skill drives the rest: a workspace directory with `spec.json`, `plan.json`,`src/` (the code), `artifacts/` (object.glb, renders, gates) and `judge/rNN/` (brief, montages,judgment, score). The deliverable is the best-scoring round's `src/` and its artifacts.diff --git a/harness/agents/3d-judge.md b/harness/agents/3d-judge.mdindex f445828f..1f1d58d9 100644--- a/harness/agents/3d-judge.md+++ b/harness/agents/3d-judge.md@@ -1,6 +1,6 @@---name: 3d-judge-description: The blind judge of a 3dcodeverse round. Started by the director with ONE argument, the path of a judge folder (judge/rNN) written by `3dcode judge-pack`; it reads only that folder's brief.md and images, answers exactly the JSON the brief states, and writes it to judgment.json. It never sees the builder's code or reasoning, never scores an overall, and is never given anything but the folder path.+description: The blind judge of a 3dcodeverse round. Started by the 3dcodeverse workflow with ONE argument, the path of a judge folder (judge/rNN) written by `3dcode judge-pack`; it reads only that folder's brief.md and images, answers exactly the JSON the brief states, and writes it to judgment.json. It never sees the builder's code or reasoning, never scores an overall, and is never given anything but the folder path.mainAgent: falsesubagent: truetools:diff --git a/harness/codeverse3d/spatial/scene_placement.py b/harness/codeverse3d/spatial/scene_placement.pyindex 4b16116d..07ceb91c 100644--- a/harness/codeverse3d/spatial/scene_placement.py+++ b/harness/codeverse3d/spatial/scene_placement.py@@ -468,27 +468,13 @@ def _plan_bounds(plan: Any) -> tuple[tuple[float, ...], tuple[float, ...]] | Nonreturn None-def _layout_budget(layout: Any) -> int:- """Total things the L2 layout put in the zone."""- if layout is None:- return 0- get = layout.get if isinstance(layout, dict) else lambda k, d=0: getattr(layout, k, d)- placements = get("placements", []) or []- n = 0- for pl in placements:- n += int((pl.get("count", 1) if isinstance(pl, dict) else getattr(pl, "count", 1)) or 1)- for k in ("mid_props", "small_props", "ground_cover"):- n += int(get(k, 0) or 0)- return n--def _row_names(row: AssetRow) -> str:"""The row's own name plus its named descendants, snake-cased for loose matching."""return " ".join(to_snake(n) for n in [row.name, *row.inner])def contract_findings(census: dict[str, Any] | None, plan: Any,- layouts: dict[str, Any] | None = None, unavailable: Sequence[str] = ()) -> list[GateFinding]:+ unavailable: Sequence[str] = ()) -> list[GateFinding]:"""Deterministic plan-vs-census checks."""if not isinstance(census, dict) or plan is None:return []@@ -496,18 +482,6 @@ def contract_findings(census: dict[str, Any] | None, plan: Any,out: list[GateFinding] = []groups = {to_snake(g.get("name", "")): g for g in (census.get("groups") or [])if isinstance(g, dict)}- for zone_name, layout in (layouts or {}).items():- budget = _layout_budget(layout)- g = groups.get(to_snake(zone_name))- if g is None or budget <= 0:- continue # zone_empty below covers a missing group- have = int(g.get("instances") or 0)- if have < budget:- out.append(_f(Severity.INFO,- f"zone {zone_name} holds ~{have} instances; its layout planned {budget} "- f"(placements + props + ground cover) — a note, not a requirement: the counts the brief "- "states are its acceptance items",- target=zone_name, kind="density_note", have=have, budget=budget))if "fog" in census and census.get("fog") is None:out.append(_f(Severity.ERROR, words["no_fog_msg"], target="env", kind="no_fog", hint=words["no_fog"]))if "background" in census and census.get("background") is None:@@ -683,14 +657,14 @@ def setting_text(plan: Any) -> str:def placement_gate_safe(census: dict[str, Any] | None, *, plan: Any = None,- layouts: dict[str, Any] | None = None, unavailable: Sequence[str] = ()) -> GateReport | None:+ unavailable: Sequence[str] = ()) -> GateReport | None:"""Round-gate entry."""try:table = (census or {}).get("placement")if not isinstance(table, dict):return Nonereport = placement_findings(table, indoor=is_interior(plan), language=(census or {}).get("language"))- extra = _cap_per_kind(contract_findings(census, plan, layouts=layouts, unavailable=unavailable))+ extra = _cap_per_kind(contract_findings(census, plan, unavailable=unavailable))if extra:report = GateReport.of(GATE, report.findings + extra, duration_ms=report.duration_ms)return reportdiff --git a/harness/codeverse3d/workflow.py b/harness/codeverse3d/workflow.pyindex aebcbb89..92f92f7b 100644--- a/harness/codeverse3d/workflow.py+++ b/harness/codeverse3d/workflow.py@@ -65,7 +65,7 @@ def _spec(ctx: ToolContext) -> Spec:def _plan_raw(ws: Workspace) -> dict[str, Any]:if not ws.plan_path.is_file():- raise ToolUsageError("plan.json not found in the workspace — write it first (see the 3d-director skill)")+ raise ToolUsageError("plan.json not found in the workspace — write it first (see the 3dcodeverse skill)")try:data = json.loads(ws.plan_path.read_text())except ValueError as e:diff --git a/harness/docs/ARCHITECTURE.md b/harness/docs/ARCHITECTURE.mdindex 3ed634a4..72aa435a 100644--- a/harness/docs/ARCHITECTURE.md+++ b/harness/docs/ARCHITECTURE.md@@ -48,7 +48,7 @@ LLM-written **raw executable 3D code** — no SDK layered on the language — foharness/.claude-plugin/plugin.json .codex-plugin/plugin.json plugin.json the three manifests (name 3dcodeverse)bin/3dcode launcher: $C3D_PYTHON | .venv/bin/python | python3, PYTHONPATH=<plugin>, python -m codeverse3d.cli- skills/3d-director/ the workflow + references/plan-<track>.md (what plan.json holds per track)+ skills/3dcodeverse/ the controller skill: tracks, instruments, workflow, shared quality rules + references/plan-<track>.md (what plan.json holds per track)skills/3d-lang-<lang>/ one per language: files, frame, sandbox, thresholds + references/interface.mdskills/c3d-*/ craft bundles (optional practices for one defect class each)agents/3d-judge.md the judge subagentdiff --git a/harness/docs/INSTALL.md b/harness/docs/INSTALL.mdindex 2a931bf7..e9347ade 100644--- a/harness/docs/INSTALL.md+++ b/harness/docs/INSTALL.md@@ -84,7 +84,7 @@ codex plugin add 3dcodeverse@3dcodeverseagy plugin install /path/to/3dcodeverse/harnessagy plugin validate /path/to/3dcodeverse/harness --strict```-The host then sees the skills (`3d-director`, `3d-lang-*`, `c3d-*`) and the `3d-judge`+The host then sees the skills (`3dcodeverse`, `3d-lang-*`, `c3d-*`) and the `3d-judge`subagent. The skills run `3dcode …` in the host's terminal: the console script from`pip install -e harness`, or `harness/bin/3dcode` (`$C3D_PYTHON`, else `harness/.venv/bin/python`,else `python3`, with `PYTHONPATH=harness`). To try a host without touching your real config,diff --git a/harness/skills/3d-director/SKILL.md b/harness/skills/3d-director/SKILL.mddeleted file mode 100644index b2a44eb2..00000000--- a/harness/skills/3d-director/SKILL.md+++ /dev/null@@ -1,121 +0,0 @@-----name: 3d-director-description: "Use whenever the user wants a 3D thing made with code - an object, a mechanism with joints, a scene, a shader or an OpenGL effect - in Blender bpy, CadQuery, Three.js, URDF, GLSL or moderngl, or wants one measured, judged or improved. The whole 3dcodeverse workflow: init a workspace, write plan.json and validate it, write raw code, run the 3dcode instruments (build, gates, renders) until they pass, pack the judge material, have a FRESH-context judge score it, refine from the score, keep the best round. Read it before the first 3dcode call."-license: Apache-2.0-metadata:- verified: "2026-11-07"------# Directing a 3dcodeverse project--You write RAW code (bpy / CadQuery / three.js / URDF / GLSL / moderngl) in a workspace; the-`3dcode` command-line instruments build, export, measure, render and gate it; a judge who never-sees your code scores the renders; `3dcode score` turns that into a number and an improvement-list. Your job is the loop below, honestly.--## The instruments--Every call is `3dcode <subcommand> --workspace <abs dir> [--flag value ...]`. Always pass-`--workspace` (the absolute path). The first line of the output is the verdict — `PASS`,-`FAIL` or `ERROR` — then the numbers and fix hints, then the absolute paths of any PNGs it-wrote: OPEN those images with your file viewer and look, every time. Exit 0 means the tool-ran (a FAIL is exit 0); non-zero means it could not run. `--json` gives the same result as-JSON. A list flag is repeated (`--views front --views top`); `3dcode <subcommand> --help`-lists a tool's flags. If `3dcode` is not on PATH, run `<plugin root>/bin/3dcode`.--| subcommand | what it does |-|---|---|-| `init` | writes `spec.json`, the workspace layout and the language's starter files |-| `validate-plan` | validates `plan.json` against the track's schema + plan checks; writes the normalised plan back |-| `build` | lint + build `src/`, export, measure (every language) |-| `check` | build + measure + EVERY gate of the track → `artifacts/gates.json`; the round's verdict |-| `judge-pack --round N` | renders the judged views, composes the montages, writes `judge/rNN/brief.md` + images |-| `score --round N` | scores `judge/rNN/judgment.json` with the rubric's weights, penalties, floors and gate caps → `score.json` |-| object tracks | `measure`, `check-contract`, `check-connectivity`, `cross-section`, `render-views`, `render-sheet`, `isolate`, `compare-reference`; articulated adds `joint-sweep` |-| scene track | `scene-probe`, `check-placement`, `scene-views`, `shader-probe` (three.js) |-| graphics track | `gl-probe`, `gl-frames` |--`spec.json` is re-read on every call; `plan.json` is what the gates measure against.--## The workspace--```-spec.json the request (track, language, prompt, must_have, must_not, dims, references)-plan.json your plan — exact numbers; validated before any code-src/ your raw code (scene track: also public/ for compiled assets)-artifacts/ instrument output: object.glb, renders/, gates.json, measurement.json — READ-ONLY-judge/rNN/ brief.md + montages (judge-pack), judgment.json (the judge), score.json (score)-```-Never write under `artifacts/` or `judge/` except the judge's `judgment.json`; never edit-`spec.json` after init or `plan.json` after it validated (a re-plan starts the rounds over).--## Tracks and languages--| track | languages | skill to read before writing code |-|---|---|---|-| `static_object` | `blender`, `cadquery`, `threejs` | `3d-lang-blender` / `3d-lang-cadquery` / `3d-lang-threejs` |-| `articulated_object` | `urdf_blender` | `3d-lang-urdf-blender` |-| `scene` | `scene_threejs`, `scene_blender` | `3d-lang-scene-threejs` / `3d-lang-scene-blender` |-| `graphics` | `glsl_shader`, `opengl_python` | `3d-lang-glsl-shader` / `3d-lang-opengl-python` |--Pick the track from what the user wants (a thing → static, a thing that moves on joints →-articulated, a place → scene, an animated image → graphics) and the language from their-request or the default of the row's first entry. The language skill states the files, the-frame, the sandbox and every threshold the gates measure; the `c3d-*` skills hold optional-craft for a specific defect (parts that touch, bbox contract, repeats, scene lighting…) —-read one when its description matches your plan or a finding.--## The loop--1. **Init.** `3dcode init --workspace W --track T --language L --prompt "..."` with- `--must-have "..."` / `--must-not "..."` per hard requirement, `--dims height=0.45` per stated- dimension, `--references img.png` per reference image. It prints the entry files and the- skill to read. Then `git -C W init` if the workspace is not a repository.-2. **Plan.** Write `plan.json` by `references/plan-<track>.md` (exact numbers, acceptance- checklist), then `3dcode validate-plan --workspace W` until it prints PASS; FAIL lists each- error with its JSON path — fix the plan, never argue with the validator.-3. **Baseline round (r00).** Write the code the language skill describes. Run the language's- loop (`build` → its gates → look at the renders) after every edit, and finish the round with- `3dcode check --workspace W`: every ERROR it lists caps the score, so fix each before judging.- Object tracks: the whole object first — every plan part at its box and attached to its- parent before any part gets detail (a part still a ≤ 12-triangle box within 1 mm of its plan- box is a `placeholder_part` ERROR); then detail. Commit: `git -C W add -A src public 2>/dev/null; git -C W commit -qm r00`.-4. **Judge.** `3dcode judge-pack --workspace W --round 0` writes `judge/r00/` (requires a `check`- in the current state). Start a FRESH subagent with the `3d-judge` agent definition and give- it ONLY the folder path: it reads `brief.md` and the images and writes `judgment.json`. Tell- it nothing else — not what you built, not what you think of it. Without subagents, do the- judging yourself as a clearly separated step after writing nothing else into context:- open `brief.md`, look at every image, answer exactly its JSON. Then- `3dcode score --workspace W --round 0`: it prints overall, passed, the caps applied and the- improvement list.-5. **Refine rounds (r01, r02 …; at most 2 unless the user sets another number).** Each- round makes exactly the score's improvement list, gate ERRORs first (`[gate/...]` items), as- targeted edits — change the lines a task needs, keep every other part, name and dimension;- a measured finding that repeats needs a different change of the thing it measures, not the- same edit again; a judge note that repeats needs a visible change in the named view. Then- `check` → commit `rNN` → `judge-pack --round N` → the judge → `score --round N`.-6. **Stop** when the rounds are used up, when `score` says passed with an empty improvement- list, or when the overall fell two rounds running. The deliverable is the BEST-scoring- round: if the last round is not it, `git -C W checkout rNN -- src` (and `public`) and run- `3dcode check` once more so `artifacts/` matches. Report the round, its overall, the caps- and the paths of its montages.--## Repairs--A build failure is fixed with the smallest correct change at the `file:line` the output names:-a runtime error → the call or import (the language skill's allow-list is the only set of-modules); a lint error → the construct the fix hint names; a syntax error → that line; a-timeout or memory blow-up → fewer segments or loop counts. Keep every part, name and-dimension. The same error twice means the edit missed the cause: change a different call,-not different arguments. Never finish a round on a broken build.--## Honesty--* One code path: no detection of headless mode, user agent or the instruments.-* Never special-case a check to make it pass — no hidden parts, zero-scaled parts, invisible- filler geometry, connector sticks bridging a gap; fix the geometry the finding names.-* No fake success, no swallowed exceptions around geometry (the one exception is a cosmetic- fillet/chamfer falling back to the unrounded solid when the kernel refuses it).-* Never import a helper SDK, the plugin's own package or `runtime_js/`; harness-owned modules a- language skill names inside `src/` (scene_threejs `src/lib/*.js`) are the one exception.-* Never write or edit `judgment.json`, and never judge a round you built in the same context.diff --git a/harness/skills/3d-director/references/plan-scene.md b/harness/skills/3d-director/references/plan-scene.mddeleted file mode 100644index a797ab17..00000000--- a/harness/skills/3d-director/references/plan-scene.md+++ /dev/null@@ -1,58 +0,0 @@-# plan.json for `scene`--Fields: `title`, `summary`, `setting`, `mood`, `bounds`, `environment`, `interior`, `glazed`,-`zones[]`, `assets[]`, `effects[]`, `animation[]`, `cameras[]`, `acceptance[]`. Write EVERY-number in the Y-up GLB frame (Y up, +Z towards the viewer, metres, ground around y = 0) for-both languages; `3dcode` converts the numbers it prints for a `scene_blender` build to Z-up.-State requirements for the brief's place — what is true, where, in what size — not-constructions. Realistic scale: people 1.7 m, doors 2.1 m, steps 0.17 m, bench seats 0.45 m.--1. `setting` (place, era, weather, time of day) and `mood`.-2. `bounds` `{center, extents}`: the DETAILED area the gates measure against (layouts, placed- assets, camera clearance), sized to the subject — a street long and narrow, a courtyard- small. It is not a cage: the world continues past it, and the environment builds that.-3. `environment`: ONE paragraph of numbers — sun/moon azimuth (compass 0 = +X, 90 = +Z for- three.js; 90 = +Y when written for bpy) and elevation; the key light (hex + intensity for- three.js; a Sun of W/m² + world strength for Cycles: pairs that landed in the exposure band —- day 3–5 W/m² at world 0.4–0.5, dusk 1–1.5 at 0.2, moon 0.1–0.3 at 0.1) and a fill hue away- from the key's; atmosphere (fog colour + near/far, far ≥ 2 × the plan span; or a volume- density with 1 / density ≥ span / 1.5); the LANDFORM across the bounds with the ground height- under each camera (camera heights are absolute); ground surfaces with colours; walkways as- (x, z) routes with widths; how the world continues past the bounds in each direction and- what the horizon is (for an interior: what the openings show); water height + colour.-4. `interior: true` when the view is from INSIDE a built space — the environment then owns- floor, walls, ceiling and openings; `glazed: true` as well when the enclosure is glass on a- frame. Six interior runs with no owner for walls and roof were judged "a diorama on a flat- plane" (0.0–0.3).-5. `zones[]`: `name` PascalCase, `bbox` (where that builder may place; neighbours overlap ≤ 1 m),- `contents[]` (asset names only), `description` as numbers: what the place is and which- cameras see it; the layout (what stands where, spacing, what faces what, what stands ON- what); the counts the brief fixes and how much loose dressing beyond them (mid props,- small props, ground cover — a market is crowded, a quarry floor bare); how repeated natural- elements vary or why a row is regular.-6. `assets[]`: `name`, `kind` (`threejs` | `bpy` procedural module; `blender_glb` a hero built- as an object and shipped as a GLB, costlier, may carry ONE 2 s keyframed motion),- `description` with construction numbers and colours, `approx_size_m` = width × height ×- depth (the built asset is measured against it), `instances_hint`. ≤ 15 000 triangles per- module, ≤ 40 000 for a hero. Variation lives inside an asset (`variant`), not in near-- duplicate modules. Ground, terrain, water, sky and what continues the world are NOT assets.-7. `effects[]`: `name`, `kind` (`glsl_material` | `particles` | `animated_geometry` |- `postprocess`), `description`, `target` (zone / asset / scene).-8. `animation[]`: each line names what moves and an amplitude visible at 1024 × 576 between- t = 0 and t = 1.5 s — foliage ±0.10–0.20 rad; water scroll ≥ 0.15 m/s or a bob ≥ 0.04 m;- particles ≥ 0.6 m per 1.5 s; boats/vehicles ≥ 1.5 m or a visible turn; lantern flicker- ×0.75–×1.3. Motion the brief names is visible from the establishing camera.-9. `cameras[]` (1–6): `name` ([A-Za-z0-9_-], a filename), `position`, `look_at`, `fov`- (vertical, 5–150), `purpose`. Numbers are used literally: compute them from where the- subject is and how big it is. `cameras[0]` is the establishing shot (≥ 20 % of the frame is- content, not sky or ground; others ≥ 10 %); every eye ≥ 0.3 m above the ground under it,- ≥ 0.5 m from any surface, looking at content.-10. `acceptance[]`: one per must-have, plus nothing floating or sunken (`how: "probe"`), the- named motion visible (`probe`), no world edge from any camera (`visual`), lighting reads as- the stated time of day (`visual`). ANY unmet `must` caps the run at 0.60, so `must` only- restates a hard requirement of the brief that one frame can confirm and names no incidental- detail; `a1` is the premise — the kind of PLACE, in words false anywhere else ("the view is- from inside an enclosed workshop"). A `must` with a number, a named style or an "and" is- split or demoted to `should`.--Rules: every `contents` entry is an asset name; asset and zone names unique.diff --git a/harness/skills/3d-lang-blender/SKILL.md b/harness/skills/3d-lang-blender/SKILL.mdindex 61e8828a..d47611a3 100644--- a/harness/skills/3d-lang-blender/SKILL.md+++ b/harness/skills/3d-lang-blender/SKILL.md@@ -46,13 +46,16 @@ build owns the scene setup, the export and the cameras: never save, render or adobject's transform (lint WARN without one).* Every object made through the data API must be linked to `bpy.context.scene.collection`;every visible object exports — delete cutters and guides or `hide_render` /- `hide_viewport` / `hide_set(True)`. A curve exports only with `bevel_depth > 0`.+ `hide_viewport` / `hide_set(True)` (an unapplied boolean still evaluates with a hidden+ cutter). A curve exports only with `bevel_depth > 0`.## Sizes and contact (`check-contract`, `3dcode check-connectivity`)* Each part's built AABB (after modifiers) vs its plan row: per axis `tol = max(1 cm, 10 % ofthe planned extent)`; past `tol` WARN, past 3 × `tol` ERROR, with the per-axis delta.Instances are measured on extents (each copy or their union); a wrong copy count is a WARN.-* Contact: surface gap ≤ 2 mm counts as touching; overlap > 2 mm is interpenetration (WARN),+* Contact: surface gap ≤ 2 mm counts as touching (a flush face IS contact; the 2 mm is a+ welding allowance, not a budget — a leg sunk 8 mm into a seat is a modelling error); overlap+ > 2 mm is interpenetration (WARN),> 10 mm with ≥ 2 % of one part's surface inside the other an ERROR (score cap 0.70). Everypart must reach the ground-touching component through contacts: a floating part is an ERROR(cap 0.60) whose finding prints the fix. Fix a gap by moving or extending the part, never@@ -84,28 +87,41 @@ build owns the scene setup, the export and the cameras: never save, render or ad`Emission Strength`, `Specular IOR Level`, `Transmission Weight`, `Coat Weight`,`Sheen Weight`, `Subsurface Weight`; the pre-4.0 keys (`Specular`, `Transmission`,`Emission`, `Clearcoat`, `Sheen`, `Subsurface`) raise KeyError (lint ERROR). `mat.use_nodes`- is deprecated (every material has a tree). Transparency: `mat.surface_render_method = 'BLENDED'`.+ is deprecated (every material has a tree). Transparency: `mat.surface_render_method = 'BLENDED'`+ (`mat.blend_method` still exists on 5.2.2 but is legacy).* Several colours on one part = several slots (`obj.data.materials.append`) +- `polygon.material_index`; the census warns on unused slots or an index past the last slot.+ `polygon.material_index` (every polygon starts on slot 0); the census warns on unused slots+ or an index past the last slot — that warning means the assignment did nothing and the part+ exports in one colour.## API traps (Blender 5.2.2; build errors or silent wrong sizes)* `bpy.ops.*` needs `bpy.context.temp_override(object=obj, active_object=obj, selected_objects=[obj])`;the dict-override form was removed in 4.0 (ERROR). `bpy.context.object` / `selected_objects`are unreliable headless — keep your own references.* `bmesh.ops.create_*` centres on the origin and needs no context; `bpy.ops.mesh.primitive_*_add`- defaults to `size=2` — pass `size=1` with `scale=`, then- `transform_apply(location=False, rotation=False, scale=True)` with all three keywords.- `obj.scale` is 1 at export time.+ defaults to `size=2` — pass `size=1` with `scale=` (else the extents double, WARN), then+ `transform_apply(location=False, rotation=False, scale=True)` with all three keywords (an+ omitted keyword defaults to True and bakes the location, WARN). Keep `obj.scale` at 1 by+ export time: nothing resets it, and a scaled object is exported and measured scaled.* `bm.verts[i]` / `bm.faces[i]` need `ensure_lookup_table()` after `from_mesh` or any topologyop (IndexError). `create_cube` / `create_cone` return only `verts`.* Modifiers may stay unapplied (the exporter applies them); `modifier_apply` needs- `temp_override` and a single-user mesh. Boolean solvers `MANIFOLD` / `EXACT` / `FLOAT`+ `temp_override` and a single-user mesh (`obj.data = obj.data.copy()` first). Boolean solvers `MANIFOLD` / `EXACT` / `FLOAT`(`'FAST'` raises); a cutter coplanar with the face it cuts fails silently.* Removed (lint ERROR): `use_auto_smooth` / `auto_smooth_angle` (use `polygon.use_smooth` or`shade_smooth_by_angle`), `Mesh.calc_normals()`, `mod["Socket_2"] = v`(`getattr(mod.properties.inputs, "Socket_2").value = v`). Removed and NOT linted:`calc_normals_split()`, `edge.crease` / `edge.bevel_weight` (`crease_edge` /`bevel_weight_edge` attributes), `scene.node_tree`, `bgl`, `gpu.types.GPUShader(...)`.+ `BLENDER_EEVEE_NEXT` is not an engine id on 5.x (lint WARN; render settings are the build's).++## Built as a scene hero (`blender_glb`)+When this workspace builds a hero for a scene plan: nothing outside the asset — no ground+plane, no environment. A moving part (only when the asset's description names one): keyframe+that part's OWN rotation/location with its origin at the pivot (an Empty is not a part); the+build runs at the factory 24 fps, so a key on frame f lands at t = f / 24 s — key frame 0 and+frame 36 (t = 1.5 s, the scene's second sampled time) with the pose differing ≥ 0.15 rad or+≥ 0.05 m; the GLB carries the action as a clip the scene loops, so end where you start.## The loopwrite → `3dcode build` → `3dcode check-contract` + `3dcode check-connectivity` → fix everythingdiff --git a/harness/skills/3d-lang-cadquery/SKILL.md b/harness/skills/3d-lang-cadquery/SKILL.mdindex f45d0b86..3fbfba48 100644--- a/harness/skills/3d-lang-cadquery/SKILL.md+++ b/harness/skills/3d-lang-cadquery/SKILL.md@@ -16,7 +16,9 @@ render or `show_object`.## Files and `result`* `src/model.py` is the entry. The build runs it in a subprocess (`src/` first on `sys.path`,so a helper module beside it imports) and reads the module-level variable **`result`**; it- must exist at import time (not under `if __name__ == "__main__"`).+ must exist at import time (not under `if __name__ == "__main__"`). `random` and numpy are+ seeded before the module runs; nothing may depend on time — the build runs twice (measure,+ render) and both must match.* `result = cq.Assembly(name="<ObjectName>")` with one`.add(solid, name="<PartName>", color=cq.Color(r, g, b), loc=cq.Location(...))` per plan part.Part names PascalCase, unique, exactly the plan's (they become the GLB node names); instancesdiff --git a/harness/skills/3d-lang-glsl-shader/SKILL.md b/harness/skills/3d-lang-glsl-shader/SKILL.mdindex c24790f2..3ebe6613 100644--- a/harness/skills/3d-lang-glsl-shader/SKILL.md+++ b/harness/skills/3d-lang-glsl-shader/SKILL.md@@ -82,15 +82,18 @@ it as `u_buffer_a`. An accumulation with gain ≥ 1 saturates by t = 6 s (`blowper-frame random seeds, nothing that depends on `u_frame` alone (`flicker`).## What the judge (`shader`) names-Likeness (0.26): the wrong physics scores 0.4 however complete the inventory — evenly spaced-bars standing in for curtains, rays, flames or waves (`comb_artefact`, −0.10, cap 0.65);-hard-edged opaque shapes standing in for light — bokeh, glow, aurora, neon-(`opaque_shapes_for_light`, −0.08); a few sparkles for a star field; a flat wash for a nebula.-Depth and detail (0.16): one texture or noise field filling the frame is `flat_fill` (−0.08);-staircase edges `banding_or_aliasing` (−0.05). Light and tone (0.16): a night subject with-nothing near-black `no_dark_range` (−0.06); haze lifting a region toward white `white_wash`-(−0.08); uniformly candy-saturated colour `candy_saturation` (−0.06). Motion (0.14): a texture-scrolling under a fixed shape is 0.5. A textbook demo with the brief's colours swapped in is+Weights: likeness 0.26, depth_and_detail 0.16, light_and_tone 0.16, motion_quality 0.14,+composition 0.10, technical_cleanliness 0.10, craft 0.08. Likeness: the wrong physics scores+0.4 however complete the inventory — evenly spaced bars standing in for curtains, rays, flames+or waves (`comb_artefact`, −0.10, cap 0.65); hard-edged opaque shapes standing in for light —+bokeh, glow, aurora, neon (`opaque_shapes_for_light`, −0.08); a few sparkles for a star field+(a star field is thousands of points); a flat wash for a nebula. Depth and detail: one+texture or noise field filling the frame is `flat_fill` (−0.08); staircase edges+`banding_or_aliasing` (−0.05, and a technical_cleanliness deduction). Light and tone: a night+subject with nothing near-black `no_dark_range` (−0.06); haze lifting a region toward white+`white_wash` (−0.08); uniformly candy-saturated colour `candy_saturation` (−0.06). Motion: a+texture scrolling under a fixed shape is 0.5; a hard cut between two sampled times is+`flicker` (−0.08, cap 0.70). A textbook demo with the brief's colours swapped in is`placeholder_look` (−0.10); an effect present in source but invisible in the frame is`wrong_subject` (cap 0.40) — check the final `fragColor` write, the raymarch hit test, the raydirection, a term multiplied to zero.diff --git a/harness/skills/3d-lang-opengl-python/SKILL.md b/harness/skills/3d-lang-opengl-python/SKILL.mdindex 435f027f..ac67a54f 100644--- a/harness/skills/3d-lang-opengl-python/SKILL.md+++ b/harness/skills/3d-lang-opengl-python/SKILL.md@@ -75,7 +75,8 @@ def render(ctx: moderngl.Context, state, t: float, frame: int, fbo: moderngl.Fra* `ctx.clear(...)` clears whatever framebuffer is bound (`my_fbo.clear(...)` for your own). Anoffscreen framebuffer tests depth only with a `depth_attachment=` (`ctx.depth_renderbuffer`);reading and writing the same texture in one pass is undefined.-* With `CULL_FACE` a front face is counter-clockwise from outside. GL 3.3 core: no+* With `CULL_FACE` a front face is counter-clockwise from outside (`ctx.front_face` defaults to+ `"ccw"`; wound the other way the mesh is inside out). GL 3.3 core: no`line_width` above 1, no GL_QUADS; `ctx.wireframe = True` is a debugging aid.* Errors come back as `src/program.py:LINE: <Exception>`; GLSL compile errors show the driverlog with line numbers inside the shader STRING.diff --git a/harness/skills/3d-lang-scene-blender/SKILL.md b/harness/skills/3d-lang-scene-blender/SKILL.mdindex a7cf83d8..21eae1e8 100644--- a/harness/skills/3d-lang-scene-blender/SKILL.md+++ b/harness/skills/3d-lang-scene-blender/SKILL.md@@ -26,7 +26,8 @@ self-contained (built and checked on its own). The build runs ONE Blender proceorder, each builder in its own try/except: `env.build_env(ctx)`; every hero imported; every`assets.<snake>.build_<snake>(ctx)`; every `zones.<snake>.build(ctx)`. A builder that raisesis DROPPED with its `file:line` and everything it created removed — the rest still builds, so-one bad zone costs that zone. `build_<zone>(ctx)`, `create()`, `main()`, `register()` are never+one bad zone costs that zone; a dropped asset is NOT AVAILABLE, so `ctx.assets['x']` raises in+every zone that instances it and drops those zones too. `build_<zone>(ctx)`, `create()`, `main()`, `register()` are nevercalled. Link every object into `ctx.collection` (an object in `ctx.scene.collection` belongs tono zone). Then the build adds the plan's cameras, hides the asset sources, writes the censusand the `.blend`, and renders every camera at t = 0 and t = 1.5 s (frames 1 and 46).@@ -46,10 +47,11 @@ and the `.blend`, and renders every camera at t = 0 and t = 1.5 s (frames 1 and## FrameZ up, −Y front, +X right, metres, the ground `height_at(x, y)` around z = 0. The PLAN is-written in the Y-up GLB frame: every number the build prints for you (bounds, zone bboxes,-camera positions) is already converted; the plan's prose is not — "y = 1.2 m up" is z = 1.2,-"+z towards the camera" is −y. Sizes here are width × depth × height (the plan's width ×-height × depth reordered).+written in the Y-up GLB frame: a plan point (x, y, z) is Blender (x, −z, y) and plan extents+(w, h, d) are Blender (w, d, h). Only the CAMERAS in `src/scene.py` are pre-converted; the+bounds and zone bboxes you convert yourself, and `check-placement` reports boxes and the+`out_of_bounds` bounds in the plan's Y-up frame. The plan's prose is not converted either —+"y = 1.2 m up" is z = 1.2, "+z towards the camera" is −y.## Allowed imports`bpy`, `bmesh`, `mathutils` (Vector, Matrix, Euler, noise), `math`, `numpy` (randomness only@@ -89,16 +91,18 @@ add the `NodeGroupInput` / `NodeGroupOutput` nodes yourself,## What the renderer does with what you buildCycles at 32 samples + OIDN, AgX, exposure 0, 1024 × 576; no post chain, no bloom: an emissiveat strength 3–8 reads as a lamp, 20+ whites the frame (`blown_frac`), and a lamp beside it is-what lights the wall. Light is physical: a Sun in W/m², lamps in Watts; starting points that-passed on a mid-albedo ground — 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), a moon-0.05–0.3, fog density 0.003–0.008. Hue, material and geometry work are invisible on near-black+what lights the wall. Light is physical: a Sun in W/m², lamps in Watts; starting pairs that+landed in the exposure band on a mid-albedo ground — day: Sun 2–5 W/m² under a sky world at+strength 0.2–0.5, Sun `angle` 1–3° so shadows read and shade keeps colour; dusk: 1–1.5 W/m² at+0.2; night: a moon 0.05–0.3 W/m² at 0.1, lit by practicals (an emissive skin plus a Point light+with a radius); fog density 0.003–0.008. Hue, material and geometry work are invisible on near-blackpixels. A SURFACE shader always has a silhouette: a soft particle (steam, smoke, dust, spray)renders edgeless only as a VOLUME — a material whose only linked output is the MaterialOutput's `Volume`, fed by a `ShaderNodeVolumePrincipled`; a translucent puff, metaball, torusor disc is `hard_edged_particles`. The census is the evaluated depsgraph (modifiers, geometrynodes and instances count as rendered; 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.+Triangle budgets: 15 000 per asset, 40 000 per hero, 3 000 000 unique for the scene (an+instance cloud counts its instances as rendered, its source once).## MotionAnimation is DATA: `obj.keyframe_insert(data_path, frame=ctx.frame(t))` at the two times (a@@ -109,7 +113,7 @@ a `--factory-startup` build). Set each `keyframe_points[].interpolation = 'LINEtravel. The build differences the two frames per camera: a camera moves when ≥ 0.4 % of itspixels change by more than 8/255; none moving is `no_motion` (ERROR), the judge's`nothing_moves`. Amplitudes that registered: ≥ 0.10 rad, ≥ 0.05 m per 1.5 s, a particle /-leaf / boat ≥ 0.6 m. A hero GLB's own clip plays in every instance by itself.+leaf / boat ≥ 0.6 m (an asset's own moving part: ≥ 0.15 rad). A hero GLB's own clip plays in every instance by itself.## NamingPascalCase, globally unique (a second `Lantern_0` becomes `Lantern_0.001` and reports a prop@@ -148,15 +152,18 @@ findings cap at 0.50; eye < 0.3 m above the ground `camera_low`, > 80 m `camera_`hero_unseen`: a hero covering < 0.5 % of the frame in every camera is an ERROR (< 2 % in itsnamed camera a WARN). `scene_probe` (`3dcode scene-probe`): unique triangles over 3 000 000, aPython driver or app handler, no world, no atmosphere (`no_fog`: neither a world Volume nor a-bounded fog volume), render settings touched. Outdoors `fog_short` warns when 1 / density <+bounded fog volume — mist is not read), render settings touched; a hero that would not import+is a WARN on its file. Outdoors `fog_short` warns when 1 / density <span / 1.5 and `world_edge` when no standing geometry reaches 1.25 × the bounds half-extent. Adropped zone / asset / env is an ERROR on its line.## Interiors`interior: true`: the enclosure (floor, walls, lid named `RoomShell…` / `Ceiling…`) is`src/env.py`'s; it must read enclosed from every camera and be lit inside; the floating-threshold indoors is 0.02 m. Zones dress the inside; a partition or counter a zone needs is the-zone's, seated and clear of the shell.+threshold indoors is 0.02 m. Env cuts windows and doors as OPENINGS; zones put glazing and+door leaves in the opening and wall fixtures flush against the inner face, and never build+walls or a roof. Zones dress the inside; a partition or counter a zone needs is the zone's,+seated and clear of the shell.## Realism (judged)Every large surface varies at more than one scale — broad tone and wear over metres AND fine@@ -165,7 +172,11 @@ Bump); one constant colour per surface is `placeholder_material` / `flat_ground`trunk branching into limbs carrying leaf or needle cards, a rock an irregular asymmetric mass —never a cone, a ball on a stick or a cube (`asset_quality_detail`); one shape stamped many timesis `monotonous_vegetation`. The world continues past the content in every frame-(`world_edge_visible`). The brief's time of day is a hard constraint, decided once in+(`world_edge_visible`). A pond, bed or terrace must not read as a plate laid on the terrain+from the overview rig: carve it into `height_at` or give it a built edge or a dressed seam;+inside a shoreline the terrain lies below the water level or the shore z-fights. Distant forms+keep their natural colour, darkened — pre-tinted toward the fog they render brighter than the+land and read as cardboard (`placeholder_material`). The brief's time of day is a hard constraint, decided once in`src/env.py` and shared through the dict `build_env` returns.## Asset modules@@ -176,7 +187,8 @@ call it. Imports `bpy`, `bmesh`, `mathutils`, `math`; no lights, cameras, worldground plane. Every part has a Principled material with a real colour and roughness, variedat more than one scale; unique PascalCase names, one root mesh or children parented atRELATIVE locations; ≤ 15 000 triangles. `variant` changes the SILHOUETTE when several copies-are placed; `ctx.rng(seed)` varies details. A moving part (when the description names one) is+are placed; `ctx.rng(seed)` varies details and colour, so many copies are not one colour. A+moving part (when the description names one) iskeyframed on its OWN rotation/location with its origin at the pivot (≥ 0.15 rad or ≥ 0.05 mregisters). Every sub-shape overlaps a neighbour by ≥ 2 mm; the lowest point is exactly z = 0.diff --git a/harness/skills/3d-lang-scene-threejs/SKILL.md b/harness/skills/3d-lang-scene-threejs/SKILL.mdindex c43579e8..293cba2d 100644--- a/harness/skills/3d-lang-scene-threejs/SKILL.md+++ b/harness/skills/3d-lang-scene-threejs/SKILL.md@@ -36,22 +36,28 @@ of `scene.js` and the env module's shape.* `scene`: a `THREE.Scene`; `scene.fog` and `scene.background` set (unset = `no_fog` /`no_background`, ERROR); `scene.environment` an environment texture (metals and glass rendernear black without one). Whatever a camera sees ends in something the brief justifies.-* `cameras`: a non-empty list of PLAIN objects `{ name, position: [x, y, z], lookAt: [x, y, z], fov }`- (the build makes the PerspectiveCameras: aspect 16/9, near 0.1). PascalCase names from the- plan; `cameras[0]` is the establishing view (≥ 20 % content; others ≥ 10 %,- `content_small`). Eye ≥ 0.3 m above the ground under it (`camera_low` WARN; `camera_high`+* Every zone root carries `group.userData.c3d_zone = group.name` before `scene.add` — the+ placement gate and the judge find zones by it.+* `cameras`: every camera the plan lists (its list decides how many), as PLAIN objects+ `{ name, position: [x, y, z], lookAt: [x, y, z], fov }` (the build makes the+ PerspectiveCameras: aspect 16/9, near 0.1, far from the bounds). PascalCase names from the+ plan; `cameras[0]` is the establishing view (≥ 20 % content; others ≥ 10 %, `content_small`)+ and need not contain the whole bounds. The overview rig (`scene-views` without authored+ cameras) is a fallback, not your picture: a scene judged only on the rig is a scene you did+ not frame. Eye ≥ 0.3 m above the ground under it (`camera_low` WARN; `camera_high`above 80 m), ≥ 0.5 m from every surface and not inside geometry (`camera_in_geometry`, ERROR,cap 0.50), at most 5 of its 9 sight rays ending within 1.5 m (`camera_blocked`, cap 0.50), theline of sight to `lookAt` not cut in its first half; below the terrain is `camera_underground`(cap 0.50) — compute y from `heightAt(x, z)`, never guess.* `update(t, dt)`: cheap (no allocations, traversals or material creation — cache lists at- build time) and deterministic (same t → same frame). It fans out to `env.update` and every+ build time and hoist scratch objects such as `new Vector3` / `getSize` to module scope) and+ deterministic (same t → same frame). It fans out to `env.update` and everyzone's `group.userData.update`; `tickEnv`, `userData.tick` and `build<Zone>(ctx)` are nevercalled — a hook nobody calls stands still, and calling a missing hook throws.* `src/env.js`: `heightAt(x, z)` is the surface every zone seats on — deterministic, cheap,`0` for a flat floor; every walkable surface (a path, a deck) is part of it, and it must agreewith the ground mesh. `SUN_AZIMUTH_DEG` is a plain numeric `export const` (read by regex to- put the overview rig on the sun side). Anything else it exports is a convention between it+ put the overview rig on the sun side; omitted, the rig guesses 45°). Anything else it exports is a convention between itand the zones.## Imports and sandbox@@ -81,11 +87,11 @@ procedural (incl. DataTextures) or `loaders.texture` for files present in the wo> 25 % are tagged, ERROR past 50 %). Four or more foot columns with at most one touching anda gap > 0.05 m is `cantilevered` (WARN). A placed asset is measured against the plan's`approx_size_m`: WARN beyond 2.5 × (or under 1 / 2.5), ERROR beyond 4 × — never re-scale to- fit or stretch a clone; a chimney or cable that must reach further is a separate object.-* **Bounds and density**: a planned content entirely outside the bounds + max(5 m, 10 % of the+ fit or stretch a clone; a chimney or cable that must reach further is a separate object. The+ judge's `wrong_scale` (cap 0.75) is perceptual, on top of that gate.+* **Bounds and contents**: a planned content entirely outside the bounds + max(5 m, 10 % of thespan) is `out_of_bounds` (WARN; scenery past them is never reported); a zone group missing or- empty `zone_empty`; a planned asset not placed `missing_content`; a zone under half its- layout's count an INFO `density_note`.+ empty `zone_empty`; a planned asset not placed `missing_content`.* **The world's extent** (exteriors): standing geometry ≥ 2 m tall reaches ≥ 1.25 × the boundshalf-extent (`world_edge`, WARN); fog far ≥ 2 × the plan span, or for `FogExp2`1 / density ≥ span / 1.5 (`fog_short`); ≥ 8 same-size copies evenly on a ring is@@ -99,21 +105,27 @@ procedural (incl. DataTextures) or `loaders.texture` for files present in the wo* **Motion**: the t = 0 and t = 1.5 s frames 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 cameramoving is `no_motion` (ERROR) and the judge's `nothing_moves`. Sub-centimetre sway is- invisible at 1024 × 576: foliage ±0.10–0.20 rad, particles ≥ 0.6 m per 1.5 s, water ≥ 3 cm or- a scrolling normal have passed.+ invisible at 1024 × 576: foliage ±0.10–0.20 rad, particles ≥ 0.6 m per 1.5 s, water a bob+ ≥ 0.04 m with a scrolling uv/normal have passed.* **Hero** (`hero_unseen`): a `public/assets/*.glb` covering < 0.5 % of the frame in EVERYcamera is an ERROR; < 2 % in the camera the plan names for it a WARN. A hero is visible onlyif a zone clones `ctx.assets['<snake>']` (its pivot is at its base; clips play by themselves;`clone.userData.clipOffset = <s>` de-phases a copy).* **Budget** (`3dcode scene-probe`): WARN above 5 000 draw calls, ERROR above 15 000;- 3 000 000 unique triangles. `InstancedMesh` and merged static geometry are the cheap repeats.+ 3 000 000 unique triangles. `InstancedMesh` and merged static geometry are the cheap repeats;+ practicals are allowed, but a shadow-casting light per practical is the usual blow-out.* **Shaders**: a console or shader error in any module is a build finding; `3dcodeshader-probe` compiles a material before it renders black.-* **Assets**: a procedural asset module is built in node when written; one instance ≤ 15 000- triangles, lowest point y = 0, footprint centred, size the plan's (ERROR beyond 2.5 × or under- 0.4 × on any axis, and on a single-box blockout). Set `group.userData.size = [w, h, d]`;- optional `group.userData.update = (t, dt) => {}` which the placing zone caches and calls.- `opts.seed` / `opts.variant` vary details deterministically; `variant` changes the SILHOUETTE.+* **Assets**: a procedural asset module is built in node when written, so it is synchronous+ and loads nothing (no `FileLoader` / `loaders.*` / `await`: shader text is loaded in+ `createScene` and passed in through `opts`); one instance ≤ 15 000 triangles, lowest point+ y = 0, footprint centred, size the plan's (ERROR beyond 2.5 × or under 0.4 × on any axis, and+ on a single-box blockout); every sub-shape overlaps a neighbour by ≥ 2 mm. Zones place the+ Group by its ORIGIN, so an off-origin footprint misplaces every copy. Set+ `group.userData.size = [w, h, d]`; optional `group.userData.update = (t, dt) => {}` which the+ placing zone caches and calls. `opts.seed` / `opts.variant` vary details deterministically;+ `variant` changes the SILHOUETTE, and `opts.hue` / `opts.seed` vary the colour so many copies+ are not one colour.## NamingZones are Groups named PascalCase (plan names); assets PascalCase; every animated object has a@@ -130,13 +142,18 @@ an interior's lid meshes `Ceiling…` / `RoomShell…` (the overview rig lifts t* The environment is judged as heavily as the props (`brief_fidelity`, `lighting_atmosphere`,`flat_ground`, `diorama_look`): a default sky over default green ground is unfinished.Distant forms pre-tinted toward the fog render BRIGHTER than the terrain and read as cardboard- (`placeholder_material`); natural colour, darkened, left to the fog, reads as haze.+ (`placeholder_material`); natural colour, darkened, left to the fog, reads as haze. Fog+ gives the aerial perspective `thin_atmosphere` looks for — kept subtle, or the frame reads+ milky (`blown_frac`).* An interior (`interior: true`) must read enclosed from every camera — walls and a ceilingexist in every frame, lit from the sources the brief names (a closed room with no openings and- no practicals renders black). `roomShell` in `lib/environment.js` is one option.+ no practicals renders black). `roomShell` in `lib/environment.js` is one option. Env cuts+ windows and doors as openings; zones put glazing and door leaves IN the opening and wall+ fixtures flush against the inner face, and never build walls or a roof.* Shadows: `castShadow` on the light AND the meshes, `receiveShadow` on what they fall on; ashadow texel larger than ~0.05 m over the content reads as jagged (judged) — `sunRig({ bounds })`- with the CONTENT radius fits frustum, map size and bias.+ with the CONTENT radius fits frustum, map size and bias; a hand-set `sun.shadow.*` must meet+ the same texel size.* Emissives bloom through the post chain (GTAO + selective bloom + an identity grade unless`scene.userData.grade` is set): author practicals at peak 1.5–4, not 20;`material.userData.bloom = false | true | <colour>` opts a material in or out.diff --git a/harness/skills/3d-lang-scene-threejs/references/effects-catalog.md b/harness/skills/3d-lang-scene-threejs/references/effects-catalog.mdindex 8068d341..f01ca13f 100644--- a/harness/skills/3d-lang-scene-threejs/references/effects-catalog.md+++ b/harness/skills/3d-lang-scene-threejs/references/effects-catalog.md@@ -12,19 +12,19 @@ and bounds: an option left out takes its default, an invalid one throws a RangeE| --- | --- || a close-view fractured rock or a talus field | `makeRock({ type: 'sandstone', size: [2, 1.5, 2], seed, moisture: 0.2 })` · `makeRockField` — `lib/rock.js`; sandstone / granite / basalt; rests at local y≈0 || a grassy surface | `makeGrass({ extent, density, height, heightAt, patchy })` — `lib/grass.js` |-| a complete near/middle-distance tree or shrub | `makeTree({ species: 'oak', height: 6, crownRadius: 2.5, leafDensity: 1, seed, wind: { dir: [1,0.3], strength: 0.5, speed: 1 } })` · `makeShrub` — `lib/tree.js`; oak / birch / willow, separate leaf cards, root at y=0, envelope in `userData.bounds`; heavy by default — `leafSegments: 4`, lower `maxLeaves` / `leafDensity` for repeats |+| a complete near/middle-distance tree or shrub | `makeTree({ species: 'oak', height: 6, crownRadius: 2.5, leafDensity: 1, seed, wind: { dir: [1,0.3], strength: 0.5, speed: 1 } })` · `makeShrub` — `lib/tree.js`; oak / birch / willow, separate leaf cards, root at y=0, envelope in `userData.bounds`; heavy by default (species default 10–16 `leafSegments` for close views) — `leafSegments: 4`, lower `maxLeaves` / `leafDensity` for repeats, distant imposters when leaves are unresolved || trees, bushes, leaves | `patchLeafSSS` · `patchWind` · `patchRootContact` — `lib/foliage_shade.js` |-| ground and cliff geometry | `ground({ size, rand: mulberry32(seed), relief, flat })` → `{ mesh, height }` (the env's `heightAt` must return its real height) · `cliff({ length, height, rand })` — `lib/terrain.js` |+| ground and cliff geometry | `ground({ size, rand: mulberry32(seed), relief, flat })` → `{ mesh, height }` (the env's `heightAt` must return its real height; with no seeded `rand` it is flat; a floor, terraces or a canyon are not this call) · `cliff({ length, height, rand })` — `lib/terrain.js` || countryside continuing beyond the content | `makeOutskirts({ inner, baseY, heightAt, shellRadius, colors, seed })` — `lib/environment.js`; one option for a rural setting || the sun, the fill and the baked environment | `sunRig({ azimuth, elevation, bounds })` — `lib/environment.js` → `{ sun, fill, sunDisc, envTex, sunDir }`; add the lights, `scene.environment = rig.envTex` |-| a rectangular interior's walls, ceiling and openings | `roomShell({ center, extents, openings, thickness, wallColor, ceilingColor, glazed, frameColor, bay })` — `lib/environment.js`; `glazed: true` for a conservatory / greenhouse |-| the sky itself | `makeSky(scene, { rig })` — `lib/sky.js`; the dome IS the backdrop |+| a rectangular interior's walls, ceiling and openings | `roomShell({ center, extents, openings, thickness, wallColor, ceilingColor, glazed, frameColor, bay })` — `lib/environment.js`; walls sit OUTWARD of the box you pass (its faces are the inner faces; it need not be the plan bounds), openings are cut as span / sill / lintel panels; `glazed: true` for a conservatory / greenhouse |+| the sky itself | `makeSky(scene, { rig })` — `lib/sky.js`; the dome IS the backdrop; keeps a `scene.background` already set and gives an unset one its horizon colour || paper, wax, jade, petals; oil film, beetle shell | `patchTranslucency` · `patchIridescence` — `lib/finish.js` || a textured standard material without a texture file | `brick` · `granite` · `cobble` · `asphalt` · `weatheredWood` · `brushedSteel` · `fabric` · `foliage` · `soil` · `skin` · `glass` (21 in all) · `tint(mat, variant)` — `lib/materials.js` || noise on the CPU | `fbm2` · `fbm3` · `mulberry32` · `displaceY` — `lib/noise.js` || your own shader, safely | `makeShaderMaterial` · `patchStandard` · `shadowLike` · `tickShaders` · `clonePatchedMaterial` — `lib/shader.js` |-| a scoped synchronous offscreen capture | `withRendererState(renderer, callback)` — `lib/shader.js` |-| explicit cleanup for a procedural group | `snapshotResources(group)` · `attachDisposal(group, resources)` — `lib/lifecycle.js` |+| a scoped synchronous offscreen capture | `withRendererState(renderer, callback)` — `lib/shader.js`; restores target / viewport / scissor / tone mapping / clear state even after an error (transforms and visibility stay yours) |+| explicit cleanup for a procedural group | `snapshotResources(group)` · `attachDisposal(group, resources)` — `lib/lifecycle.js`; textures are borrowed unless added, disposal is idempotent and ignores later-added props |Rules that apply to all of them:diff --git a/harness/skills/3d-lang-scene-threejs/references/interface.md b/harness/skills/3d-lang-scene-threejs/references/interface.mdindex bdc02351..90ea66b7 100644--- a/harness/skills/3d-lang-scene-threejs/references/interface.md+++ b/harness/skills/3d-lang-scene-threejs/references/interface.md@@ -1,7 +1,7 @@# The wiring (the interface, nothing else)`src/scene.js` is the only caller of your modules; write it in this shape, the camera list from the-plan, and mark every zone root with `userData.c3d_zone` (placement and the judge find zones by it):+plan:```jsimport * as THREE from 'three';import { buildEnv, heightAt } from './env.js';@@ -31,7 +31,9 @@ export function buildEnv({ THREE, scene }) {```A zone module is `export function build(ctx) → THREE.Group` named after the zone, with its-animation on `group.userData.update`; an asset module is+animation on `group.userData.update`; it imports an asset as+`import { buildStoneLantern } from '../assets/stone_lantern.js';` and the ground as `ctx.heightAt`+(or `import { heightAt } from '../env.js'`). An asset module is`export function build<Asset>(THREE, opts = {}) → THREE.Group` with `group.userData.size`.Shader text from files, inside async `createScene`:diff --git a/harness/skills/3d-lang-threejs/SKILL.md b/harness/skills/3d-lang-threejs/SKILL.mdindex 646f0eea..034e7aaa 100644--- a/harness/skills/3d-lang-threejs/SKILL.md+++ b/harness/skills/3d-lang-threejs/SKILL.md@@ -49,7 +49,8 @@ AS AUTHORED. The lint derives the export name from the file stem (`seat_cushion* Resolve: `three`, `three/addons/...` (e.g. `three/addons/utils/BufferGeometryUtils.js` for`mergeGeometries`, `three/addons/geometries/RoundedBoxGeometry.js`), relative `./` filesunder `src/`. A URL, another package, `three/webgpu`, `three/tsl`, a path escaping `src/`,- a missing file or a name the module does not export is a lint ERROR (`bad_import`).+ a missing file or a name the module does not export is a lint ERROR (`bad_import`); never+ copy three's sources into `src/` (two copies of the library, `instanceof` failures).Undefined before r182: `mergeBufferGeometries` (now `mergeGeometries`), `three/examples/js/*`,`Geometry`, `Face3`, `sRGBEncoding`, `outputEncoding`. `mergeGeometries` returns `null` whenone input is indexed or lacks an attribute another has (`uv`, `color`).@@ -62,7 +63,8 @@ AS AUTHORED. The lint derives the export name from the file stem (`seat_cushion## Materials* `MeshStandardMaterial` / `MeshPhysicalMaterial` colour, roughness, metalness, emissive and- vertex colours (`setAttribute('color', …)` + `vertexColors: true`) survive the export.+ vertex colours (`setAttribute('color', …)` + `vertexColors: true`, exported as `COLOR_0`)+ survive the export.`ShaderMaterial`, `MeshToonMaterial` and every texture do not (textures stripped with a buildwarning; a shader material exports plain). A hex colour is sRGB; `material.color.r` is linear.* An `InstancedMesh` named `Posts` exports as sibling meshes `Posts_0 … Posts_{n-1}` with the@@ -84,7 +86,8 @@ AS AUTHORED. The lint derives the export name from the file stem (`seat_cushion* **Triangle budget** (sized from parts × instances): WARN below 350 per built object (floorclamped to 1 500–40 000), ERROR above 20 000 per built object (ceiling 60 000–600 000);target about 2 000 per built object; a build over 3 s per built object (≥ 20 s) WARN; killed- at 300 s. Detail inside a part is invisible to the part-level gates; a new top-level node is+ at 300 s; the build also has a memory limit, but the triangle ceiling is the only count+ enforced. Detail inside a part is invisible to the part-level gates; a new top-level node isa part.* **Build**: a zero extent or radius, or `scale.set(0, 0, 0)` to hide, produces NaN and failsthe export (`visible = false`, or do not add it).diff --git a/harness/skills/3d-lang-urdf-blender/SKILL.md b/harness/skills/3d-lang-urdf-blender/SKILL.mdindex 45753d6d..bdb88ef8 100644--- a/harness/skills/3d-lang-urdf-blender/SKILL.md+++ b/harness/skills/3d-lang-urdf-blender/SKILL.md@@ -28,7 +28,7 @@ corrected `<origin>`); fails on a rest-pose penetration deeper than 5 mm (`RestPsweeps every joint (`3dcode joint-sweep`); renders q = 0 plus every joint at both limits for thejudge; builds `object.glb` with one node per link. A link no object matches fails the build(with a did-you-mean for a case / snake_case mismatch); a visible mesh no link claims fails it-too. `<collision>` missing or different from `<visual>` is a WARN: the VISUAL mesh is collided.+too (parent it under a link's object or add a `<link>`). `<collision>` missing or different from `<visual>` is a WARN: the VISUAL mesh is collided.`references/interface.md` is one hinge, end to end.## Frame rule (measured by the FK check)@@ -41,7 +41,8 @@ too. `<collision>` missing or different from `<visual>` is a WARN: the VISUAL morigin must then be the full inverse of the link's FK transform — the FK check prints it.* Root link frame = world origin. Every other link frame = its joint's PIVOT: a world point ONthe joint axis (hinge line, slide axis, axle); fixed joints: the attachment point.-* `<joint><origin xyz>` = `pivot_child − frame_parent`.+* `<joint><origin xyz>` = `pivot_child − frame_parent` (a child of the root: just its pivot; a+ handle on a door: `pivot_handle − pivot_door`).* `<visual>` AND `<collision>` `<origin xyz>` = `−pivot_link` (root: `0 0 0`), because the meshholds world coordinates and the link frame sits at the pivot. The build verifies thisnumerically and prints the numbers when it is wrong.@@ -51,13 +52,16 @@ too. `<collision>` missing or different from `<visual>` is a WARN: the VISUAL m`motion_direction` gate moves the joint positively and checks the child's centroiddisplacement within 60° of that word. Wrong way: negate the axis; never swap lower/upper(q = 0 must stay the authored rest pose).-* Limits: `revolute` / `prismatic` need `<limit lower upper effort velocity/>` with+* Limits describe the mechanism's real travel (a lid 0…1.5 rad, a drawer 0…0.4 m), never+ `-3.14` / `3.14` placeholders: the sweep poses both ends, and a hinge that can swing through+ its own housing is a modelling error it will find. `revolute` / `prismatic` need+ `<limit lower upper effort velocity/>` with`lower ≤ 0 ≤ upper` (`lower = plan.lower − rest`, `upper = plan.upper − rest`); a missing`<limit>` is a load ERROR. `continuous`: `<limit effort velocity/>` only. `fixed`: no`<limit>`, no `<axis>`. Lint WARNs: `lower == upper`, a revolute range > 2π (use`continuous`), a `<limit>` without effort/velocity.-* Single-root tree: one link no joint moves; every other link the child of exactly one joint- (ERROR otherwise); no cycles. Anything riding on a moving link is part of that link's mesh or+* Single-root tree: exactly one link that is no joint's child (the base); every other link the+ child of exactly one joint (ERROR otherwise); no cycles. Anything riding on a moving link is part of that link's mesh ora fixed child of it — attached to the base it stays behind and the sweep reports the overlap.* Names: link name == Blender object name == `meshes/<link>.glb` stem, case-sensitive, a plainidentifier (`Door.001` means two objects shared a name); `world` is reserved (ERROR); name the@@ -94,5 +98,4 @@ is a lint ERROR). No triangle-budget gate; the build is killed at 300 s.`3dcode build` (lint, FK at q = 0, rest penetration) → `3dcode joint-sweep` → `3dcodecheck-connectivity` + `3dcode check-contract` → fix → repeat → `3dcode render-sheet` → OPENthe sheet and the pose sheet → `3dcode check` clean. A sweep ERROR blocks the round whatever-the geometry looks like; `3dcode check-contract` compares every link's bbox with the plan —-keep the plan's size and say why in a comment if a number is wrong for the object.+the geometry looks like; `3dcode check-contract` compares every link's bbox with the plan.diff --git a/harness/skills/3dcodeverse/SKILL.md b/harness/skills/3dcodeverse/SKILL.mdnew file mode 100644index 00000000..f3d425e7--- /dev/null+++ b/harness/skills/3dcodeverse/SKILL.md@@ -0,0 +1,180 @@+---+name: 3dcodeverse+description: "Use for ANY request to make, measure, judge or improve a 3D thing in code: a model, object or prop, a mechanism or robot with joints, a scene or environment, a shader or OpenGL effect — in Blender bpy, CadQuery, Three.js, URDF, GLSL or moderngl. This is 3D coding with the 3dcodeverse plugin: raw executable 3D code that the 3dcode instruments build, measure, render, gate and score. It holds the tracks and their languages, every instrument, the workflow and its stop rules, and the quality rules every track shares; read it before the first 3dcode call, then the language's 3d-lang-* skill."+license: Apache-2.0+metadata:+ verified: "2026-11-07"+---++# 3D coding with 3dcodeverse++This is 3D CODING. You write raw, executable 3D code — bpy / CadQuery / three.js / URDF / GLSL /+moderngl — in a workspace; the `3dcode` instruments build, export, measure, render and gate it;+a judge who never sees your code scores the renders; `3dcode score` turns the verdict into a+number and an improvement list. Nothing is drawn by hand and nothing comes from an asset+store: the object, mechanism, place or effect has to come out of the code at real scale, and it+is measured. Your job is the loop below, honestly.++## Tracks and languages++| track | what it is | languages (default first) | read before writing code | plan reference |+|---|---|---|---|---|+| `static_object` | one thing that does not move — furniture, tools, props, a vehicle at rest | `blender`, `cadquery`, `threejs` | `3d-lang-blender` / `3d-lang-cadquery` / `3d-lang-threejs` | `references/plan-static.md` |+| `articulated_object` | a mechanism judged while it moves — doors, drawers, lids, wheels, linkages, robots | `urdf_blender` | `3d-lang-urdf-blender` | `references/plan-articulated.md` |+| `scene` | a place — terrain or room, sky and light, many placed things, authored cameras, something moving | `scene_threejs`, `scene_blender` | `3d-lang-scene-threejs` / `3d-lang-scene-blender` | `references/plan-scene.md` |+| `graphics` | an animated image — a fragment shader or a moderngl program, judged on frames | `glsl_shader`, `opengl_python` | `3d-lang-glsl-shader` / `3d-lang-opengl-python` | `references/plan-graphics.md` |++Pick the track from what the user wants and the language from their words, else the row's+first. The language skill states the files, the frame, the sandbox and every threshold the+gates measure; the `c3d-*` skills hold optional craft for one defect class each (parts that+touch, the bbox contract, repeats, scene lighting / placement / water, shader traps …) — read+one when its description matches your plan or a finding.++## The instruments++Every call is `3dcode <subcommand> --workspace <abs dir> [--flag value …]`. Always pass+`--workspace` (the absolute path). The first line of the output is the verdict — `PASS`,+`FAIL` or `ERROR` — then the numbers and fix hints, then the absolute paths of any PNGs it+wrote: OPEN those images with your file viewer and look, every time. Exit 0 means the tool+ran (a FAIL is exit 0); non-zero means it could not run. `--json` gives the same result as+JSON. A list flag is repeated (`--views front --views top`); `3dcode <subcommand> --help`+lists a tool's flags. If `3dcode` is not on PATH, run `<plugin root>/bin/3dcode`.++| subcommand | what it answers | when |+|---|---|---|+| `init` | writes `spec.json` (track, language, prompt, must-haves, dims, references, style) and the workspace layout; prints the entry files and the skill to read | once, first |+| `validate-plan` | is `plan.json` a valid plan for the track — schema, plan checks, the acceptance items derived from `spec.json`; writes the normalised plan back (`scene_blender`: also `src/scene.py`) | after every plan edit, until PASS |+| `build` | does `src/` lint, build and export; measures the result | after every code edit |+| `check` | build + EVERY gate of the track → `artifacts/gates.json`; PASS/FAIL with each ERROR and its fix — the round's verdict | before judging; every ERROR caps the score |+| `judge-pack --round N` | renders the judged views, composes the montages and crops, writes `judge/rNN/brief.md` + images for a fresh-context judge | after a clean `check`, once per round |+| `score --round N` | the rubric arithmetic on `judgment.json`: overall, passed, caps, the improvement list → `score.json` | after the judge wrote `judgment.json` |+| `measure` | overall bbox, ground gap, per-part size / triangles / islands in Y-up metres (`--parts`) | when a number, not a picture, answers it |+| `check-contract` | the built object vs `plan.json`: missing parts, bbox delta per part, overall size, ground contact | object tracks, after every build |+| `check-connectivity` | the contact graph: floating parts with the gap vector that closes them, interpenetration, stray islands | object tracks, after every build |+| `cross-section` | a labelled slice (`--axis x|y|z --at 0..1 --parts`) with loops, area and hollow ratio | is the cavity cut, is the wall there, is this part where I think |+| `render-views` | named views (`--views`, `--mode shaded|wire|normals|silhouette|clay`, `--isolate`, `--explode`) | to see one aspect |+| `render-sheet` | the labelled 14-view contact sheet (`--mode`) | to see the whole object before `check` |+| `isolate --part X` | one part alone + its measurement row | where did that fragment come from; where is this part |+| `compare-reference` | a reference image beside a render with the outline diff and IoU (`--reference-index`, `--view`) | after the first clean build and after every shape change when `spec.json` has references |+| `joint-sweep` | every joint through its range: overlap, unattached, buried per link pair with the fix, plus pose renders (`--joints` renders fewer) | articulated, after every build |+| `scene-probe` | the scene census: objects, materials, lights, draw calls, triangles, console errors, world and atmosphere | scene, for the budget and the world |+| `check-placement` | per placed thing: gap under its feet, burial, support, interpenetration with the metres to move it; bounds, scale, zone contents (`--rebuild` probes again) | scene, after every build — read its rows (gap + tolerance), never `artifacts/scene_probe.json` (the raw dump) |+| `scene-views` | the authored cameras and/or the orbit rig (`--cameras authored|orbit|all`, `--times`): sheet + frame table + MEASURED MOTION per camera | scene exposure, cameras, motion — those numbers, not your impression |+| `shader-probe` | compiles every ShaderMaterial headlessly; errors with line numbers | scene_threejs, before a material renders black |+| `gl-probe` | compile / import and ONE frame (`--t`, default 1 s): errors with source lines, or the frame + its stats | graphics, after every edit |+| `gl-frames` | the judged frames (`--times`, `--width`, `--height`) as a sheet + per-frame metrics + the `gl_frames` gate | graphics, before `check`; look at the sheet |+| `list` · `doctor` | every tool with its arguments · the machine's deps (Blender, node, GPU) | when a tool or a build is missing |++`spec.json` is re-read on every call; `plan.json` is what the gates measure against.++## The workspace++```+spec.json the request (track, language, prompt, must_have, must_not, dims, references)+plan.json your plan — exact numbers; validated before any code+src/ your raw code (scene track: also public/ for compiled assets)+artifacts/ instrument output: object.glb, renders/, gates.json, measurement.json — READ-ONLY+judge/rNN/ brief.md + montages (judge-pack), judgment.json (the judge), score.json (score)+```+* Only code goes in `src/` — no notes, READMEs or reports; install nothing, fetch nothing.+* Never write under `artifacts/` or `judge/` except the judge's `judgment.json`; never edit+ `spec.json` after init; never edit `plan.json` after it validated (a re-plan starts the+ rounds over). The one exception is a camera finding: prefer moving the subject (a zone's+ placement, the ground under the eye); when the camera itself must move, edit `cameras[]`+ only and re-run `3dcode validate-plan` — that is not a re-plan.+* Every round is a commit: `git -C W add -A src public 2>/dev/null; git -C W commit -qm rNN`.++## The loop++1. **Init.** `3dcode init --workspace W --track T --language L --prompt "..."` with+ `--must-have "..."` / `--must-not "..."` per hard requirement, `--dims height=0.45` per stated+ dimension, `--references img.png` per reference image. It prints the entry files and the+ skill to read. Then `git -C W init` if the workspace is not a repository.+2. **Plan.** Write `plan.json` by `references/plan-<track>.md` (exact numbers, acceptance+ checklist), then `3dcode validate-plan --workspace W` until it prints PASS; FAIL lists each+ error with its JSON path — fix the plan, never argue with the validator.+3. **Baseline round (r00).** Write the code the language skill describes. Run the language's+ loop (`build` → its gates → look at the renders) after every edit, and finish the round with+ `3dcode check --workspace W`: every ERROR it lists caps the score, so fix each before judging.+ Object tracks: the whole object first — every plan part at its box and attached to its+ parent before any part gets detail (a part still a ≤ 12-triangle box within 1 mm of its plan+ box is a `placeholder_part` ERROR); then detail. Commit `r00`.+4. **Judge.** `3dcode judge-pack --workspace W --round 0` writes `judge/r00/` (requires a `check`+ in the current state). The judge is a context that has not seen your work: start a FRESH+ subagent with the `3d-judge` agent definition and give it ONLY the folder path — it reads+ `brief.md` and the images and writes `judgment.json`. Tell it nothing else: not what you+ built, not what you think of it. Only when the host cannot start any fresh context, judge+ it yourself as a DEGRADED verdict — a clearly separated step after writing nothing else into+ context: open `brief.md`, look at every image, answer exactly its JSON — and mark the round+ "self-judged" in your report. Then `3dcode score --workspace W --round 0`: it prints+ overall, passed, the caps applied and the improvement list.+5. **Refine rounds (r01, r02 …; at most 2 unless the user sets another number).** Each round+ makes exactly the score's improvement list, gate ERRORs first (`[gate/...]` items), as+ targeted edits — change the lines a task needs, keep every other part, name and dimension.+ A placement task changes that part's placement numbers to the plan's centre; a material task+ changes that part's colour / roughness / metalness only; a shape task rebuilds that part+ alone; on graphics a colour/light task touches palette, exposure and grade only, a motion+ task the time terms only — never rewrite unrelated layers or passes. A measured finding+ that repeats needs a different change of the thing it measures, not the same edit again; a+ judge note that repeats needs a visible change in the named view. Then `check` → commit+ `rNN` → `judge-pack --round N` → the judge → `score --round N`.+6. **Stop** when the rounds are used up, when `score` says passed with an empty improvement+ list, or when the overall fell two rounds running. The deliverable is the BEST-scoring+ round: if the last round is not it, `git -C W checkout rNN -- src` (and `public`) and run+ `3dcode check` once more so `artifacts/` matches. Report the round, its overall, the caps+ and the paths of its montages.++## Quality rules on every track++* **The plan's numbers are what the gates measure.** Build them; if one looks wrong for the+ object, keep the plan's value in the code and say why in a comment — never drift silently.+* **Detail goes INSIDE the parts the plan names** — edges, profiles, seams, counted repeats —+ never into new parts: detail inside a part is neutral-to-positive for the score, an unplanned+ part is strongly negative (the contract gate reports it, the judge counts it as clutter).+* **Model only what a viewer sees from outside.** Internals — springs in a housing, wiring,+ the underside of a lid that never opens — are never parts.+* **A material per part with the plan's colour**; a grey default anywhere is a judged defect.+* **Hollow things are hollow** when the real object is (a mug, bowl, box, drawer): cut the+ cavity and confirm it with `3dcode cross-section`.+* **Never trim part names, counts, the overall size or the planned motion to "simplify"**;+ no placeholders, no unit-cube stand-ins, no static image where the plan says motion.+* **A render is evidence; "it should be fine" is not.** In every sheet check: the silhouette+ reads as the requested thing from every view; nothing missing, exploded, lying on its side+ or left over from a primitive (a stray `Cube`); the materials are the plan's.++## References++When `spec.json` lists `references`, open them before planning. On the object tracks the+plan's proportions, part set and visible details match the FIRST image, with dimensions in+metres consistent with what it shows; the pictures outrank the text where they disagree; that+first reference is the silhouette target — its outline IoU against the best-matching render is+measured (`check` WARNs below 0.6) and the judge scores `silhouette_match` from it (rubric+`reference`). Run `3dcode compare-reference` after the first clean build and after every+shape change. On the scene and graphics tracks the photos are not a composition to copy: they+show what the real thing looks like — its dominant and secondary colours, how its structure+folds, layers and thins, where brightness concentrates and how much stays dark, its texture at+fine scale — and they outrank the brief's adjectives; the judge sees your frames beside the+same photos. Keep the brief's foreground, framing and landscape, and open the photos again+before every `gl-frames` / `scene-views` comparison.++## Repairs++A build failure is fixed with the smallest correct change at the `file:line` the output names:+a runtime error → the call or import (the language skill's allow-list is the only set of+modules); a lint error → the construct the fix hint names; a syntax error → that line; a+timeout or memory blow-up → fewer segments or loop counts. Keep every part, name and+dimension. The same error twice means the edit missed the cause: change a different call,+not different arguments — check the name and signature against the language skill's API facts+first. Never finish a round on a broken build.++## Honesty++* One code path: no detection of headless mode, user agent or the instruments.+* Never special-case a check to make it pass — no hidden parts, zero-scaled parts, invisible+ filler geometry, connector sticks bridging a gap; fix the geometry the finding names.+* No fake success, no swallowed exceptions around geometry (the one exception is a cosmetic+ fillet/chamfer falling back to the unrounded solid when the kernel refuses it).+* Never import a helper SDK, the plugin's own package or `runtime_js/`; harness-owned modules a+ language skill names inside `src/` (scene_threejs `src/lib/*.js`) are the one exception.+* `judgment.json` is the judge's: never edit it, never give the judge anything but the folder+ path, and report a self-judged round as such.diff --git a/harness/skills/3d-director/references/plan-articulated.md b/harness/skills/3dcodeverse/references/plan-articulated.mdsimilarity index 64%rename from harness/skills/3d-director/references/plan-articulated.mdrename to harness/skills/3dcodeverse/references/plan-articulated.mdindex df47a01e..f5db2e85 100644--- a/harness/skills/3d-director/references/plan-articulated.md+++ b/harness/skills/3dcodeverse/references/plan-articulated.md@@ -1,7 +1,7 @@# plan.json for `articulated_object`-Everything in `plan-static.md` (same `parts[]` schema) plus `root_link` and `joints[]`. The-frame is Z up, −Y front, metres, radians; every number describes the REST pose (q = 0: doors+Everything in `plan-static.md` (same `parts[]` schema; `summary` also says what moves) plus+`root_link` and `joints[]`. The frame is Z up, −Y front, metres, radians; every number describes the REST pose (q = 0: doorsclosed, drawers in, lids down unless a joint's `rest` says otherwise), bottom on z = 0.* `parts` are LINKS: one per rigid body that moves as a unit (a drawer is ONE link with its@@ -36,3 +36,17 @@ closed, drawers in, lids down unless a joint's `rest` says otherwise), bottom on* `acceptance`: the brief's dimensions (`measure`), each named feature (`visual`) and ONE`how: "articulation"` item per joint stating the travel and that nothing is penetrated throughit ("drawer slides out 0.35 m without touching the cabinet").++The shape (not numbers to copy): a root link, one moving link with two children, one joint,+one articulation item.+```json+{"object_name": "DeskDrawerUnit", "root_link": "Cabinet",+ "parts": [{"name": "Cabinet", "role": "carcass", "description": "...", "bbox": {"center": [0, 0, 0.35], "extents": [0.45, 0.5, 0.7]}, "material": "..."},+ {"name": "Drawer", "role": "the one moving body", "description": "...", "attach_to": "Cabinet",+ "bbox": {"center": [0, -0.02, 0.45], "extents": [0.41, 0.46, 0.14]}, "material": "...",+ "children": [{"name": "DrawerFront", "description": "...", "bbox": {"center": [0, -0.24, 0.45], "extents": [0.41, 0.02, 0.14]}},+ {"name": "DrawerHandle", "description": "...", "bbox": {"center": [0, -0.26, 0.45], "extents": [0.12, 0.02, 0.02]}, "material": "..."}]}],+ "joints": [{"name": "DrawerSlide", "type": "prismatic", "parent": "Cabinet", "child": "Drawer", "axis": [0, -1, 0],+ "pivot": [0, -0.02, 0.45], "lower": 0, "upper": 0.35, "rest": 0, "motion": "front: the drawer pulls out towards -Y"}],+ "acceptance": [{"id": "a1", "text": "the drawer slides out 0.35 m without touching the cabinet", "how": "articulation", "priority": "should"}]}+```diff --git a/harness/skills/3d-director/references/plan-graphics.md b/harness/skills/3dcodeverse/references/plan-graphics.mdsimilarity index 91%rename from harness/skills/3d-director/references/plan-graphics.mdrename to harness/skills/3dcodeverse/references/plan-graphics.mdindex 689e80cc..07d4b9c6 100644--- a/harness/skills/3d-director/references/plan-graphics.md+++ b/harness/skills/3dcodeverse/references/plan-graphics.md@@ -10,8 +10,8 @@ and judged on frames at t = 0, 1, 2.5, 4 and 6 s.`light_and_tone` criterion grades the frames against this paragraph.3. `resolution`: `[1280, 720]` unless the request is explicitly vertical (`[720, 1280]`); at most1920 × 1080. `duration_s` ≥ 6 (the preview loop; judged times stop at 6 s).-4. `passes[]` in draw order: `name` PascalCase, `kind` (`fullscreen` | `geometry` | `postprocess`- | `feedback`), `description` — what it draws, the technique by name, the quantities (counts,+4. `passes[]` (at most 6) in draw order: `name` PascalCase, `kind` (`fullscreen` | `geometry` |+ `postprocess` | `feedback`), `description` — what it draws, the technique by name, the quantities (counts,sizes as screen fractions, speeds, the style's colours); optional `elements[]` (≤ 8 namedthings with their numbers) and `detail_hint`. A fragment shader's pass is a layer compositedinside the one shader; an OpenGL program's may be a real pass (geometry, an FBO). One fielddiff --git a/harness/skills/3dcodeverse/references/plan-scene.md b/harness/skills/3dcodeverse/references/plan-scene.mdnew file mode 100644index 00000000..4374a911--- /dev/null+++ b/harness/skills/3dcodeverse/references/plan-scene.md@@ -0,0 +1,89 @@+# plan.json for `scene`++Fields: `title`, `summary`, `setting`, `mood`, `bounds`, `environment`, `interior`, `glazed`,+`zones[]`, `assets[]`, `effects[]`, `animation[]`, `cameras[]`, `acceptance[]`. Write EVERY+number in the Y-up GLB frame (Y up, +Z towards the viewer, metres, ground around y = 0) for+both languages; `3dcode` converts the numbers it prints for a `scene_blender` build to Z-up.+State requirements for the brief's place — what is true, where, in what size — not+constructions. Realistic scale: people 1.7 m, doors 2.1 m, steps 0.17 m, bench seats 0.45 m.++1. `setting` (place, era, weather, time of day) and `mood`.+2. `bounds` `{center, extents}`: the DETAILED area the gates measure against (layouts, placed+ assets, camera clearance), sized to the subject — a street long and narrow, a courtyard+ small. It is not a cage: the world continues past it, and the environment builds that.+3. `environment`: ONE paragraph of numbers — sun/moon azimuth and elevation (the azimuth is+ the one number written in the build's own frame: compass 0 = +X, 90 = +Z in three.js,+ 90 = +Y in bpy); the key light (hex + intensity for three.js; for Cycles a Sun in W/m² with+ a world strength — the starting pairs are in the `3d-lang-scene-blender` skill) and a fill+ hue away from the key's; colours as hex for three.js, (r, g, b) in 0–1 for bpy; atmosphere+ (fog colour + near/far, far ≥ 2 × the plan span; or a volume density with 1 / density ≥+ span / 1.5); the LANDFORM across the bounds with the ground height under each camera+ (camera heights are absolute); ground surfaces with colours; walkways as (x, z) routes with+ widths; how the world continues past the bounds in each direction and what the horizon is+ (for an interior: what the openings show); water height + colour — a river is ONE+ upstream-to-downstream path with non-increasing y, its banks on the terrain height.+4. `interior: true` when the view is from INSIDE a built space — the environment then owns+ floor, walls, ceiling and openings; an interior with no owner for walls and roof is judged+ a diorama on a flat plane. `glazed: true` as well when the enclosure is glass on a frame:+ judged enclosed in glass from every camera, lit through the glazing with the frame's+ shadows inside, and what is seen through the glass is the brief's world, never a void or a+ flat colour.+5. `zones[]`: `name` PascalCase, `bbox` (where that zone may place; neighbours overlap ≤ 1 m —+ and when built the zones read as ONE continuous place: nothing stops dead at a zone edge,+ scale and materials agree across them, no zone is left a block-out), `contents[]` (asset+ names only), `description` as numbers: what the place is and which cameras see it; the+ layout (what stands where, spacing, what faces what, what stands ON what; scattered clusters+ keep their footprints clear of every camera position); the counts the brief fixes and how+ much loose dressing beyond them (mid props, small props, ground cover — a market is crowded,+ a quarry floor bare); how repeated natural elements vary or why a row is regular.+6. `assets[]`: the things placed more than once or in more than one zone (a tree species, a+ lamp post, a crate); scenery one zone builds once stays in that zone's prose. `name`, `kind`+ (`threejs` | `bpy` procedural module; `blender_glb` a hero built as an object and shipped as+ a GLB, costlier, may carry ONE keyframed motion whose pose at t = 1.5 s differs visibly from+ t = 0 — named in its description), `description` with construction numbers and colours,+ `approx_size_m` = width × height × depth (the built asset is measured against it — a stone+ lantern 0.5 × 1.6 × 0.5, a bench 1.6 × 0.9 × 0.6, a pine 3 × 7 × 3), `instances_hint`. An+ asset is judged as a prop at scene distance and is instanced: the description names its+ silhouette, the two or three features a person would name and its condition, not close-up+ hardware; real thickness where the thing has it (a fence is stakes and rails, not a coloured+ quad — crops are judged); fewer, better-shaped parts. ≤ 15 000 triangles per module,+ ≤ 40 000 for a hero. Variation lives inside an asset (`variant`), not in near-duplicate+ modules. Ground, terrain, water, sky and what continues the world are NOT assets.+7. `effects[]`: `name`, `kind` (`glsl_material` | `particles` | `animated_geometry` |+ `postprocess`; for bpy `glsl_material` = a shader-node effect, `particles` = a keyframed+ instance cloud, `postprocess` = a volume such as mist or light shafts), `description`,+ `target` (zone / asset / scene).+8. `animation[]`: each line names what moves and an amplitude visible at 1024 × 576 between+ t = 0 and t = 1.5 s — foliage ±0.10–0.20 rad with a 1.6–3 s period; water a bob ≥ 0.04 m and+ a scrolling uv/normal at ≥ 0.15 m/s; particles ≥ 0.6 m per 1.5 s; boats/vehicles ≥ 1.5 m or+ a visible turn; lantern flicker ×0.75–×1.3. Motion the brief names is visible from the+ establishing camera.+9. `cameras[]` (1–6): `name` ([A-Za-z0-9_-], a filename), `position`, `look_at`, `fov`+ (vertical, 5–150), `purpose` (what the shot is of and what the judge should see in it).+ Choose the shot set the place implies — a long vista, a close interior, a walk along a+ street, a top-down court. Numbers are used literally: compute them from where the subject+ is and how big it is. `cameras[0]` is the establishing shot (≥ 20 % of the frame is+ content, not sky or ground; others ≥ 10 %); every eye ≥ 0.3 m above the ground under it,+ ≥ 0.5 m from any surface, looking at content.+10. `acceptance[]`: one per must-have, plus nothing floating or sunken (`how: "probe"`), the+ named motion visible (`probe`), no world edge from any camera (`visual`), lighting reads as+ the stated time of day (`visual`). On this track `priority` is not yours: `validate-plan`+ sets every plan item to `should`, and the `must` items — each capping the run at 0.60 when+ unmet — are only those it derives from `spec.json`'s must-haves and must-nots. So a hard+ requirement goes into `3dcode init --must-have`, one frame-confirmable fact per flag (no+ number, no named style, no "and"), not into the plan. `a1` is still the premise — the kind+ of PLACE, in words false anywhere else ("the view is from inside an enclosed workshop").++The concreteness wanted:+* `environment`: "22:00, no moon: sky 0x0c1020; key = stall lamps 0xffc070 at 2.5 every 4 m+ along the lane; fill 0x203048 at 0.25; fog 0x141826 near 20 m far 160 m (span 80 m). Lane:+ flat wet asphalt 0x24262a at y = 0, 6 m wide, running out of the bounds both ways; two-storey+ shophouses line it and continue past the bounds."+* a zone `description`: "The lane's west side, seen by LaneWalk and Overview: 7 stalls 4 m+ apart facing the lane, each with its lamp and 3–5 people in front; ~25 mid props, ~60 small+ props, no ground cover." A bare zone is as concrete: "the sand wash, three fallen slabs+ 1–2 m and nothing else — it reads as a canyon because it is empty."+* a camera `purpose`: "establishing: down the lane from its north end at eye height (subject:+ the stall row, ~30 m deep), signs stacking into the fog; no sky in frame."++Rules: every `contents` entry is an asset name; asset and zone names unique.diff --git a/harness/skills/3d-director/references/plan-static.md b/harness/skills/3dcodeverse/references/plan-static.mdsimilarity index 65%rename from harness/skills/3d-director/references/plan-static.mdrename to harness/skills/3dcodeverse/references/plan-static.mdindex 77e4aee9..51437245 100644--- a/harness/skills/3d-director/references/plan-static.md+++ b/harness/skills/3dcodeverse/references/plan-static.md@@ -9,8 +9,15 @@ never re-derives a layout.features.2. `overall_bbox`: real-world size of a real reference instance (think of the catalogue item),never a unit cube; bottom on the ground, footprint centred on the up axis, so the centre's- up-coordinate is half the height.-3. `parts[]`: as many as the object really has. Every nameable feature in the request and every+ up-coordinate is half the height. Fix the small dimensions from that instance too — wall+ thickness, rod and handle diameters, edge radii — as someone who has held one knows them; a+ mug is 0.090 m across.+3. `parts[]`: as many as the object really has, at most 20 (`blender`, `threejs`), 14+ (`cadquery`), 10 links (`urdf_blender`) — depth goes into `children`, not more parts. With+ ≥ 4 must-haves in `spec.json`, `validate-plan` requires about 0.85 × that many parts (within+ the ceiling) and ≥ 35 % of the parts (min 2) described beyond a primitive — a profile, a+ stated radius or edge treatment, a counted repeat, or the sub-shapes it is built from; with+ fewer must-haves the same checks are warnings. Every nameable feature in the request and everyDEFINING feature of the category (a violin's f-holes, a clock's hands, a wrench's jaws) is itsown part or named with numbers in another part's `description` — a feature named nowhere isnot built and the judge marks it missing. Per part:@@ -27,12 +34,18 @@ never re-derives a layout.rejects one sticking out past max(10 mm, 15 %)), `material` when it differs, `instances`.A child is a planning unit: the part still exports as ONE object named after the parent;* `detail_hint`: one line on the parts that carry the identity — what makes THAT part read as- real.-4. `style_notes`: era/style cues and the proportions that make it read as THAT object.+ real ("the eye follows this edge: keep the 6 mm bullnose").+4. `style_notes`: era/style cues, the proportions that make it read as THAT object, the+ reference instance the numbers come from, and what it does NOT have (an antique grinder has+ no motor, no cord).5. `acceptance[]`: `{"id": "a1", "text": ..., "how": "visual" | "measure", "priority": "must" | "should"}`— one per user constraint and must-have, one per key visible feature; `must` only for whatmakes it the wrong object when absent (an unverified `must` caps the score at 0.6). Thedimensions from `spec.json` and ground contact are checked whether or not you list them.Rules: count the request's nameable features first and cover each; real proportions over-invention; every `attach_to` names an existing part; names unique.+invention; every `attach_to` names an existing part; names unique. If `spec.json` lists+`fixed_parts` (files the project supplies), they are not plan parts: never list, edit, move,+scale, recolour or rename them or what they return, never `attach_to` them; import the named+export and add its result to the root unchanged (the `contract_fixed` gate measures it at its+declared span).