Rebuild the object in a reference image as a code-only, procedural, quality-gated, animation-ready Three.js model. Token-efficient image-to-3D.
Python 3dai-agentsclaude-codecomputer-graphicsgenerativeimage-to-3dprocedural-generationthreejstypescriptwebgl
docs: the router and the grimoire name no domain
kokorolx641e11e756f8
diff --git a/SKILL.md b/SKILL.mdindex aa102a5..ad9c178 100644--- a/SKILL.md+++ b/SKILL.md@@ -71,8 +71,9 @@ python3 forge/state.py mark <step-id> --state .img2threejs/state.json --evidence(`refine-spec`/`refine-code`), not agent memory. Defaults: 3 corrections per pass, 6 total.- A domain profile's steps, gates and reference material come from its **installed plugin**, notfrom this checkout; with no plugin installed only `generic` is available and `forge/state.py init`- names what is. Profiles add mandatory gates without changing the core order: `cs2` requires classification,- manifest, and a machine-readable CS2 review before AI review; `character` requires the character+ names what is. A profile adds mandatory gates without changing the core order -- a domain plugin+ typically requires an authoritative classification, an intake manifest, and a machine-readable+ domain review before AI review; `character` requires the charactercontracts and landmark evidence. Every profile records suitability, projection applicability, andmaterial-evidence applicability. The state file is a resumability index, not visual evidence:renders, specs, review history, and deterministic gates remain the authoritative artifacts.@@ -82,7 +83,7 @@ python3 forge/state.py mark <step-id> --state .img2threejs/state.json --evidence- one image path / screenshot / URL / attached image (if missing or unreadable, ask)- intended use: prop, game object, hero render, playable/destructible object, animation rig(default: real-time browser prop with interactive performance)-- for a CS2 request, an authoritative classification record (family/subtype and evidence refs) or+- when a domain plugin serves the item, whatever authoritative record its intake step requires, oran explicit request for the user/vision provider to supply one; heuristic detection alone is notenough to select a geometry adapter@@ -106,9 +107,9 @@ Full flags: `grimoire/scripts.md`. Never let a script *score* visuals — that i(bilingual terms, focused `search_specs.py` retrieval, cache rules):`grimoire/intake/local_spec_search.md`. MUST read it before retrying an incomplete ordomain-specific query.-1b. **CS2 intake manifest** — for a CS2 request, create and validate `cs2-intake.json` before+1b. **Domain intake** — when a domain plugin serves the item, complete its intake steps beforepre-spec authoring (admission, heuristic signal, classification, family/route resolution).- MUST read the CS2 plugin's `cs2_intake_contract.md` completely before creating the manifest or+ MUST read the contract its step names, completely, before creating the manifest orrunning pre-spec assessment.1c. **Optional fidelity evidence adapters** — only when they improve an observed weak point; thestdlib core remains authoritative. Thin/complex masks → local SAM2; character face/pose →@@ -121,19 +122,19 @@ Full flags: `grimoire/scripts.md`. Never let a script *score* visuals — that i2. **Pre-Spec Assessment Gate** — classify + score complexity + write the quality contract:`forge/stage2_spec/new_pre_spec_assessment.py "Name" --image <img> --complexity <simple|moderate|complex|ultra-complex> --out assessment.json`. Rules: `grimoire/intake/quality_contract.md`.Set `objectClass.primaryDomain` (`object` | `character` | `hybrid`) and fill the seeded- `detailInventory` (its `targetMinDetails` scales with complexity). **Supported CS2 knife skins- and Glock-18 assets**: always pass `--cs2`, which defaults the complexity tier to `ultra-complex`- (`targetMinDetails` 16, floor 9) — the finish/wear/hardware is the item, so CS2 is held to the+ `detailInventory` (its `targetMinDetails` scales with complexity). A domain plugin may **raise**+ these floors through its augmentation -- the merge clamps, so a plugin can never lower one+ (a skin's finish/wear/hardware IS the item, so such a domain is held to thetop fidelity bar. Author procedural GEOMETRY but route the FINISH through the projection path instep 2c — a procedural finish for a patterned skin (Doppler/Gamma/Marble/Fade) reads visibly- wrong against the reference. Finish routes + rulebook: the CS2 plugin's `grimoire/build/cs2_finishes.md`;- optional exact-texture acquisition: its `grimoire/intake/cs2_texture_acquisition.md`.+ wrong against the reference. A domain plugin ships its own finish rulebook and texture-acquisition+ guide; read what its checklist steps name.2b. **Detail inventory** (do not skip for detailed subjects) — scan zones and enumerate everyidentity-defining small detail (gloss, bevel, fasteners, linework, contours, stains):`forge/stage1_intake/build_detail_inventory.py <image> --mode grid-3x3 --out-dir <dir> --out di.json`.Each detail MUST map to a `component.localFeatures` or `material.localOverrides` entry — neverprose only. Taxonomy + 3D-term recipes: `grimoire/intake/detail_inventory.md`.-2c. **Projection-first fidelity** (characters AND reference-matched surfaces — supported CS2 skins,+2c. **Projection-first fidelity** (characters AND reference-matched surfaces — painted skins,decals, painted patterns) — when the goal is matching a specific reference's surface, put thephoto's own pixels on the mesh instead of approximating them procedurally. This is the singlebiggest fidelity lever; a procedural material for a patterned surface is the #1 reconstruction@@ -141,7 +142,7 @@ Full flags: `grimoire/scripts.md`. Never let a script *score* visuals — that icharacters): solve the camera (`stage1_intake/solve_camera_pose.py` → `referenceCamera`),**de-light** the reference (`stage1_intake/delight_albedo.py`, hard requirement — de-lighting iswhat makes projection safe), then project the de-lit crop and bake it into UVs- (`stage3_build/bake_projected_texture.py --mesh-id <id>`). For a CS2 skin the projected de-lit+ (`stage3_build/bake_projected_texture.py --mesh-id <id>`). For a painted skin the projected de-litcrop IS the finish — no procedural Doppler material. For characters, first capture landmarks(`stage1_intake/extract_landmarks.py --out anatomy.json`), fill `preSpecAssessment.anatomy`,route `grimoire/character/reconstruction.md`. A single view cannot show hidden sides — report@@ -160,7 +161,7 @@ Full flags: `grimoire/scripts.md`. Never let a script *score* visuals — that ithe spec names a reference image, and names anything the corpus does not supply rather thaninterpolating it.3. Author the spec from the assessment:- `forge/stage2_spec/new_sculpt_spec.py "Name" --image <img> --assessment assessment.json --manifest cs2-intake.json --out object-sculpt-spec.json`.+ `forge/stage2_spec/new_sculpt_spec.py "Name" --image <img> --assessment assessment.json --augmentation spec-augmentation.json --domain <profile> --out object-sculpt-spec.json` (the checklist step carries the resolved flags).Replace generic starter `featureReviewTargets` with the object's real identity-definingsystems (≤5 critical, ≤3 important per pass); for characters add `anatomy-proportion`,`face-landmark-placement`, `pose-silhouette`, `outfit-and-palette`. Use 3D-graphics terms only@@ -226,13 +227,12 @@ Full flags: `grimoire/scripts.md`. Never let a script *score* visuals — that i`forge/stage4_review/make_comparison_sheet.py --reference <img> --render <shot> --out cmp.png --json`.10. Record the review (overall + per-layer + per-feature scores + decision):`forge/stage4_review/append_review.py object-sculpt-spec.json --pass-id <pass> --fidelity <0-1> --action <continue|refine-spec|refine-code|request-input|stop> --summary "..." --render-screenshot <shot> --comparison-image cmp.png --ai-vision-score <0-1> --layer-scores-json '{...}' --feature-reviews-json <f.json> --in-place`.- For the CS2 family path, produce the versioned report first with- the command the `cs2-review` checklist step names (the CS2 plugin's `tools/cs2_review.py`, with the- review-scene fixture the plugin ships)- and attach it with `--cs2-review-json cs2-review.json --review-scene-json <the plugin's- tests/fixtures/knife_review_scene.json>`. The checklist step carries the resolved path.+ When a domain plugin contributes a review gate, produce its versioned report first with+ the command that plugin's review step names, then attach it with+ `--domain-review-json <report>.json --review-scene-json <the plugin's scene fixture>`. The+ checklist step carries the resolved paths.A failed family, painted-region, projection-coverage, critical-detail, or orbit gate blocks- `continue` even when the global score passes. See the CS2 plugin's `docs/cs2/review-gates.md`.+ `continue` even when the global score passes. See the plugin's own review-gate documentation.11. Sync pipeline state after manual review edits, record checklist evidence, then re-run the localstate gate before another correction or pass:`forge/stage3_build/orchestrate_passes.py sync object-sculpt-spec.json --in-place`@@ -270,7 +270,7 @@ schema in `docs/specs/render-profile.v2.schema.json` (+ example; fail-closed valBefore any visual review or `continue` decision, MUST read the full gate-by-gate contract in`grimoire/review/gates_reference.md` (Divine Eye, VLM rescue, multi-angle, interior difference,-chirality, hair, CS2 review, bounded correction, Divine Eye fitting, screenshot feedback, assembly,+chirality, hair, domain review, bounded correction, Divine Eye fitting, screenshot feedback, assembly,attachment, material, detail inventory, rig payload, character track). In short:- Validate references first (`grimoire/intake/validation_rubric.md`, `check_reference_admission.py`).@@ -290,7 +290,7 @@ attachment, material, detail inventory, rig payload, character track). In short:passes a straight cone occupying roughly the right cells.- Character builds validate the rig payload (`stage5_rig/validate_rig_payload.py`) before binding a`THREE.Skeleton`; it proves payload integrity only, never pose stress or likeness.-- CS2 builds also run `cs2_review.py` against the versioned scene fixture.+- A domain plugin's review gate also runs against its versioned scene fixture.- Local state enforces 3 corrections per pass and 6 total by default; reaching either limit is ahard stop. `correction_loop.py` may stop earlier on repeated defects, oscillation, or plateau.- `continue` requires a render + comparison sheet + AI-vision score ≥ threshold, every critical@@ -350,24 +350,19 @@ measurements and non-goals: `docs/HAIR_PIPELINE.md`. The hard rules:- `plane-card` is rejected for hair (needs an alpha texture this skill cannot emit).- Hair is rigidly parented, never smooth-skinned (the geodesic field runs through the skull).-## CS2 image-matched rule+## Domain plugins-For a CS2 item, the target is observable agreement between the supplied image and the rendered-item: silhouette, proportions, edge profile, hardware layout, coating colour, pattern placement,-wear, roughness response, and camera framing. Every decision must be traceable to evidence or be-labelled as an approximation.+A domain plugin makes a run exact where this pipeline would otherwise infer. It contributes its own+checklist steps and gates, and publishes a `spec-augmentation.json` that this pipeline pulls at+`spec-authoring`. With no plugin serving the item, nothing here changes: author the skeleton and+infer the shape from the reference, as for any other object.-The initial CS2 family boundary covers supported **knife** subtypes and the **Glock-18** pistol-adapter. Rifle, SMG, sniper, heavy, glove, unsupported pistol, and unknown knife subtypes must stop-with `unsupported-family` or `unsupported-subtype`; they must not receive another family's component-tree as a generic fallback.--The full layer contract (what each layer owns, must emit, and must never decide alone), the CS2-intake order, and the surface/review rule live in the CS2 plugin's `cs2_intake_contract.md` — step-1b already requires reading it completely before intake state can advance. The canonical hand-off-is `cs2-intake.json` (`schemaVersion: 1`, states `proceed | request-input | fallback | rejected |-unsupported-family | unsupported-subtype`); write it atomically, preserve unknown provider fields-under `extensions`, and never let a fallback erase prior evidence.+- The steps a plugin contributes appear in the checklist with their own ids and resolved paths. Read+ what each step names -- a plugin ships its own contract, and it governs its own domain.+- A plugin may **raise** this pipeline's quality floors and can never lower one; the merge clamps.+- A plugin that does not serve an item publishes no augmentation. That is not an error and not a+ blocked run: it is the generic path, and the reconstruction proceeds by inference.+- This pipeline names no domain. If a rule is domain-specific, it lives in that domain's plugin.## Forge Runtime Contractsdiff --git a/forge/stage4_review/append_review.py b/forge/stage4_review/append_review.pyindex e77dea2..879c562 100755--- a/forge/stage4_review/append_review.py+++ b/forge/stage4_review/append_review.py@@ -15,22 +15,19 @@ from feature_acceptance_policy import feature_gate_failuresfrom status_banner import emit_status-def _load_review_scene(scene_path: Path) -> dict:- """Resolve the CS2 review-scene loader only on the CS2 path.-- This was a module-scope `from cs2_review import load_review_scene`, which made every base run --- and, through test_structure_gates.py, thirteen base structural-gate tests -- depend on a domain- module being importable. With it absent the whole module failed to import and those thirteen- tests disappeared as one unittest loader error instead of failing visibly.+def _review_scene_fixture_id(scene_path: Path) -> object:+ """Read the fixture id a review scene declares.++ Deliberately a plain JSON read and one field. This used to import a domain plugin's+ `load_review_scene`, which validated that plugin's own scene schema -- the base pipeline reaching+ into a plugin by module name, and a base run breaking when the plugin was absent. The schema is+ the plugin's business and its own gate already enforces it; all this needs is the id, to check+ that the report being attached and the scene being cited are the same fixture."""- try:- from cs2_review import load_review_scene- except ImportError as exc:- raise ImportError(- "--review-scene-json needs the CS2 review scene loader, which is not installed. "- "Install the CS2 domain plugin, or omit --review-scene-json for a non-CS2 run."- ) from exc- return load_review_scene(scene_path)+ payload = json.loads(scene_path.read_text(encoding="utf-8"))+ if not isinstance(payload, dict):+ raise ValueError(f"--review-scene-json must be a JSON object: {scene_path}")+ return payload.get("fixtureId")VALID_ACTIONS = {"continue", "refine-spec", "refine-code", "request-input", "stop"}@@ -251,12 +248,14 @@ def main(argv: list[str]) -> int:parser.add_argument("--review-viewpoints-json", help="JSON array or file containing review viewpoint labels")parser.add_argument("--force-out-of-order", action="store_true", help="Record deliberate re-review outside the unlocked pass")parser.add_argument(- "--cs2-review-json",- help="Machine-readable CS2 review report JSON or a JSON file path",+ "--domain-review-json",+ "--cs2-review-json", # accepted for specs and runs authored before domains were extracted+ dest="domain_review_json",+ help="Machine-readable review report from a domain plugin's review gate, JSON or a file path",)parser.add_argument("--review-scene-json",- help="Versioned CS2 review-scene metadata JSON used to validate the report",+ help="Versioned review-scene metadata JSON used to validate the report",)parser.add_argument("--require-screenshot-files",@@ -360,22 +359,21 @@ def main(argv: list[str]) -> int:+ ", ".join(missing_layers))- cs2_review = load_json_argument(args.cs2_review_json, "--cs2-review-json")- if cs2_review is not None:- if not isinstance(cs2_review, dict):- raise ValueError("--cs2-review-json must be a JSON object")+ domain_review = load_json_argument(args.domain_review_json, "--domain-review-json")+ if domain_review is not None:+ if not isinstance(domain_review, dict):+ raise ValueError("--domain-review-json must be a JSON object")if args.review_scene_json:scene_path = Path(args.review_scene_json).expanduser()if not scene_path.is_file():raise FileNotFoundError(f"--review-scene-json does not exist: {scene_path}")- scene = _load_review_scene(scene_path)- expected = scene.get("fixtureId")- if cs2_review.get("reviewScene", {}).get("fixtureId") != expected:- raise ValueError("CS2 review report does not match --review-scene-json")- if args.action == "continue" and cs2_review.get("verdict") != "pass":+ expected = _review_scene_fixture_id(scene_path)+ if domain_review.get("reviewScene", {}).get("fixtureId") != expected:+ raise ValueError("the domain review report does not match --review-scene-json")+ if args.action == "continue" and domain_review.get("verdict") != "pass":raise ValueError(- "CS2 review gate is blocking continuation: "- + ", ".join(str(item) for item in cs2_review.get("failedGates", []))+ "the domain review gate is blocking continuation: "+ + ", ".join(str(item) for item in domain_review.get("failedGates", [])))entry = {@@ -407,8 +405,11 @@ def main(argv: list[str]) -> int:missing = sorted(required - set(viewpoints))if missing and args.action == "continue":raise ValueError("review evidence is missing axial viewpoints: " + ", ".join(missing))- if cs2_review is not None:- entry["cs2Review"] = cs2_review+ if domain_review is not None:+ # domainReview is the field going forward; cs2Review stays alongside it so a spec written+ # before the extraction still validates and so nothing that reads the old key breaks.+ entry["domainReview"] = domain_review+ entry["cs2Review"] = domain_reviewif args.pass_id in VISUAL_PASS_IDS and args.action == "continue":feature_failures = feature_gate_failures(spec, entry, args.pass_id)if feature_failures:diff --git a/forge/tests/test_workflow_state.py b/forge/tests/test_workflow_state.pyindex c0e58b4..b4ea52f 100644--- a/forge/tests/test_workflow_state.py+++ b/forge/tests/test_workflow_state.py@@ -365,7 +365,9 @@ class WorkflowStateTest(unittest.TestCase):def test_skill_router_keeps_mandatory_state_and_reference_gates_visible(self):skill = (ROOT / "SKILL.md").read_text(encoding="utf-8")self.assertIn("forge/next.py --state .img2threejs/state.json", skill)- self.assertIn("MUST read the CS2 plugin's `cs2_intake_contract.md` completely", skill)+ # The rule that matters is that the contract-read is mandatory and complete, not which+ # domain owns the contract -- the router names no domain.+ self.assertIn("MUST read the contract its step names, completely", skill)self.assertIn("MUST read\n `grimoire/review/gates_reference.md`", skill)self.assertIn("forge/stage4_review/diagnose_render.py", skill)self.assertIn("forge/stage4_review/diagnose_render_multi_angle.py", skill)diff --git a/grimoire/intake/image_analysis.md b/grimoire/intake/image_analysis.mdindex 0de47b6..5fde9a1 100644--- a/grimoire/intake/image_analysis.md+++ b/grimoire/intake/image_analysis.md@@ -4,7 +4,7 @@ Use this reference **first**, before `probe_image.py` and before the pre-spec asexists because the agent tends to glance at the whole image once and jump straight to code,skipping the disciplined observation that every later gate depends on. This is a **generic,object-agnostic** protocol — it applies to any subject (prop, tool, weapon, vehicle part,-botanical, mechanical, character). Domain tracks (CS2 skins, characters) are specializations+botanical, mechanical, character). Domain tracks (catalogued skins, characters) are specializationslayered *after* this pass, not replacements for it.## The Rule@@ -115,9 +115,9 @@ this protocol IS the raw material for `new_pre_spec_assessment.py` and `build_deThis generic pass runs for every subject. When Layer 1 identifies a specialized domain, layer itsextra rules on top **without** skipping any generic layer:-- **CS2 weapon/knife/glove skins** → the CS2 plugin's `grimoire/build/cs2_finishes.md` (finish style, float, paint- seed, view-dependent environment) and its `grimoire/intake/cs2_texture_acquisition.md`. Both ship- with the plugin; with no CS2 plugin installed, infer the finish from the reference.+- **A catalogued skin or finish** → the serving plugin's own finish rulebook (finish style, wear, seed, paint+ view-dependent environment) and its texture-acquisition guide. Both ship with that plugin; with+ none installed, infer the finish from the reference.- **Characters / hybrids** → `grimoire/character/reconstruction.md` (head-units, landmarks,proportion lock).diff --git a/grimoire/intake/local_spec_search.md b/grimoire/intake/local_spec_search.mdindex e161e49..3a8e044 100644--- a/grimoire/intake/local_spec_search.md+++ b/grimoire/intake/local_spec_search.md@@ -4,7 +4,7 @@ After image analysis and before writing or refining a spec, local evidence is anot an optional memory lookup, whenever the request needs domain-specific anatomy, PBR, wear,geometry, runtime, or physics specifications.-The pre-spec command automatically runs BM25, chooses `cs2` for CS2 targets and `core_3d`+The pre-spec command automatically runs BM25, chooses the collection a resolved domain contributes, or `core_3d`,otherwise, and writes a `localSpecSearch` evidence bundle into the assessment:```@@ -21,8 +21,8 @@ For extra focused retrieval, the direct CLI remains available:python3 forge/stage1_intake/search_specs.py "<query>" --collection <collection> --limit 3 --snippet-chars 250 --json```-For CS2, include the anatomical and the colloquial name, for example-`--spec-query "safety ring finger ring"` or `search_specs.py "roughness matte" --collection cs2`.+For a domain corpus, include the anatomical and the colloquial name, for example+`--spec-query "safety ring finger ring"`, or query the collection directly with `search_specs.py`. A domain corpus ships with the plugin that serves it.Expand queries with object names,component names, material/finish terms, behavior terms, and known aliases; retry focusedalternatives when the first result is incomplete. Build the spec from returned evidence and dodiff --git a/grimoire/intake/quality_contract.md b/grimoire/intake/quality_contract.mdindex c0a4932..d9ebbb1 100644--- a/grimoire/intake/quality_contract.md+++ b/grimoire/intake/quality_contract.md@@ -35,16 +35,13 @@ Map total judgment to:- `complex`: many parts, repeated systems, multiple materials, several hierarchy levels- `ultra-complex`: dense organic/mechanical/architectural structure where fidelity depends on deep hierarchy and repeated microstructure-### CS2 items: ultra-complex by default--A CS2 weapon/knife/glove skin always carries more identity-defining detail (finish/gradient-pattern, wear layer, hardware, stitching, fasteners, engraving) than a generic object at the-same structural complexity tier — the skin *is* the point of the item. So `--cs2` **defaults-the complexity tier to `ultra-complex`** (`targetMinDetails` 16): the CS2 track is held to the-top fidelity bar regardless of how simple the bare geometry looks, and `--strict-quality` then-blocks code generation until those details are enumerated. If `--complexity` is set lower by-hand, `targetMinDetails` still never drops below the **9** floor. Pass `--cs2` to-`forge/stage2_spec/new_pre_spec_assessment.py` to apply this automatically.+### A domain plugin may raise these floors++A domain whose identity lives in its surface -- a painted skin, a printed pattern, a finish -- carries+more identity-defining detail than a generic object at the same structural tier. Such a plugin+publishes higher floors in its spec augmentation, and the merge applies them RAISE-ONLY: it can lift+`complexity.tier`, `targetMinDetails` and `minimumSpecDepth`, and can never lower one. `targetMinDetails`+never drops below the **9** floor whatever a plugin proposes.## Quality Contractdiff --git a/grimoire/intake/validation_rubric.md b/grimoire/intake/validation_rubric.mdindex a66fc16..767ca43 100644--- a/grimoire/intake/validation_rubric.md+++ b/grimoire/intake/validation_rubric.md@@ -67,21 +67,10 @@ If these cannot be inferred from the image, mark the spec `conditional` and list----## CS2 Item Identity and References (Critical — from Bowie Knife reconstruction)+## Catalogued items: get the real identity before authoring-**The problem:** `--cs2` only sets the difficulty tier; it does NOT fetch metadata or official references. Assuming stock features from skin names leads to wrong geometry (e.g., assuming "no stock Bowie has sawback" when the vanilla render proves it does).--**Rule:** Get the item's real market name/identity EARLY, and pull official references FIRST before authoring geometry:--1. **Ask the user for the exact market name** up front (e.g., "Autotronic" not just "Bowie Knife with red/black finish")-2. **Use `fetch_cs2_metadata.py`** to resolve paint index + official CDN render + confirm the skin exists-3. **Fetch official + vanilla renders** before authoring geometry — these show the base model features (sawback, clip point, tang, guard style) that skin names don't reveal-4. **Never infer stock features from skin names alone** — the vanilla render is the source of truth for base model geometry--**Reference sources:** Official CS2 CDN renders, vanilla (factory new) renders, and any official artwork provided by the user. Side-view orthographic reference images are ideal for profile extraction; 3/4 angle renders help verify form and materials.--**Verification:** Before writing geometry, confirm you have:-- Exact item name (market name, not description)-- Official vanilla render (to see base model features)-- Official skin render (to see finish/pattern)-- Any orthographic side views if available+When an item exists in a catalogue -- a game skin, a product SKU, a model number -- the name in the+image is not the identity. Ask the user for the exact catalogue name up front, and pull the official+and vanilla references BEFORE authoring geometry: they show base-model features the name never+reveals. Never infer stock features from a name alone. A domain plugin that serves such a catalogue+ships the lookup tooling and states the rule in its own contract.diff --git a/grimoire/review/gates_reference.md b/grimoire/review/gates_reference.mdindex 1341869..6fd5138 100644--- a/grimoire/review/gates_reference.md+++ b/grimoire/review/gates_reference.md@@ -19,16 +19,14 @@ only the executable order and one-line summary; this file defines the mandatory`forge/stage4_review/diagnose_render_multi_angle.py` flags `degenerate-view` when an orbitedsilhouette collapses (a flat plane faking a volume). Orbit angles use reference-freeself-consistency — never scored against a reference angle the photo doesn't cover.-- **CS2 knife review contract** (ships with the CS2 domain plugin): its `tools/cs2_review.py` consumes the manifest and+- **A domain review contract** (ships with the serving plugin): its review tool consumes the manifest andversioned scene fixture, then blocks wrong family identity, missing projection coverage,painted-region mismatch, critical identity-detail failure, finish/material response failure,and degenerate orbit form. It records exactness tier, hidden-region confidence, per-regionconfidence, approximation notes, camera, environment hash, exposure, tone mapping, resolution,- background, and renderer version. The CS2 family boundary covers supported **knife** subtypes and- the **Glock-18** pistol; every other family and unknown subtype must stop with- `unsupported-family` or `unsupported-subtype`, and must never receive another family's component- tree as a generic fallback. Registering a family is not implementing its geometry. Authoritative- boundary and intake order: the CS2 plugin's `cs2_intake_contract.md` and `SKILL.md`'s CS2 section.+ background, and renderer version. Which items a domain plugin templates is that plugin's business,+ stated in its own contract. An item it does not serve gets no augmentation, and the run proceeds on+ the generic path by inference rather than being blocked -- declining is not a failure.- **Bounded correction loop (token-burn safety)**: `forge/stage4_review/correction_loop.py`guarantees termination (success/repeated-defect/oscillation/plateau/hard-ceiling), escalating to`request-input` — never a silent infinite burn. Hard gates route to `refine-code`; repeated defectsdiff --git a/grimoire/scripts.md b/grimoire/scripts.mdindex 0df899c..cc4f2b0 100644--- a/grimoire/scripts.md+++ b/grimoire/scripts.md@@ -18,7 +18,7 @@ The acceptance score always comes from the agent's own vision inspecting the comrequires `--spec` and `--material-id` together, and `--in-place` requires both.## state.py and next.py-- `state.py init --state .img2threejs/state.json --reference IMG [--profile generic|cs2|character]`+- `state.py init --state .img2threejs/state.json --reference IMG [--profile generic|<installed-domain>]`creates the local mandatory checklist. It refuses to overwrite existing state.- `state.py status --state .img2threejs/state.json [--json]` reports the current step and loop limits.- `state.py mark STEP... --state .img2threejs/state.json --evidence PATH` records completed evidence.@@ -30,9 +30,9 @@ Defaults are 3 `refine-spec`/`refine-code` decisions per pass and 6 total. Thesenot targets; stop earlier on success, repeated defects, oscillation, or plateau.The pass checklist is executable in dependency order: generate, render, Tier 1, multi-angle,-`orchestrate_passes.py check`, profile-specific review, AI review, then sync. The CS2 profile runs:+`orchestrate_passes.py check`, profile-specific review, AI review, then sync. A domain plugin inserts its own review before the AI review; the checklist names it.-`<cs2-plugin>/tools/cs2_review.py --manifest cs2-intake.json --metrics cs2-review-inputs.json --scene <cs2-plugin>/tests/fixtures/knife_review_scene.json --out cs2-review.json` (the `cs2-review` checklist step carries the resolved paths)+a domain plugin's review tool, with its manifest, metrics and scene fixture (the plugin's review checklist step carries the resolved paths)The character profile requires the reconstruction/likeness contracts, landmark evidence, and anexplicit stylized-versus-projection route decision before pre-spec authoring.