diff --git a/coordination/claims/M03-RND-M2-STATIC-BATCH-MATERIALIZER-001.md b/coordination/claims/M03-RND-M2-STATIC-BATCH-MATERIALIZER-001.md new file mode 100644 index 0000000..ec9651c --- /dev/null +++ b/coordination/claims/M03-RND-M2-STATIC-BATCH-MATERIALIZER-001.md @@ -0,0 +1,87 @@ +# M03-RND-M2-STATIC-BATCH-MATERIALIZER-001 + + + +## Owner + +- Agent ID: `sindo-main-codex` +- Target: M03 Renderer Facade and Safe Extraction +- Branch: `work/sindo-main-codex/m03-m2-static-batch-materializer` +- Worktree: `C:\Users\sindo\open-wc-worktrees\m03-m2-static-batch-materializer` + +## Outcome + +Extract main-thread static M2 `MultiMesh` construction, render-property setup +and batch attachment from `StreamingWorldLoader`. + +## Non-goals + +- Change M2 grouping, batch sizing, build cursors, budgets or retry behavior. +- Change Mesh loading, refresh, cache ownership or missing-model outcomes. +- Own animated M2 instances, Editor persistence or tile cleanup. +- Introduce spatial cells or change transform order, visibility or shadows. + +## Paths + +- Exclusive: `src/render/m2/m2_static_batch_materializer.gd`, + `src/tools/verify_m2_static_batch_materializer.gd`, + `docs/modules/m2-static-batch-materializer.md`, this claim +- Shared/hotspots: `src/scenes/streaming/streaming_world_loader.gd`, M2 build/ + Mesh-cache/facade/internal-access/manifest verifiers and specs, + `docs/modules/world-renderer.md`, `docs/modules/README.md`, `RENDER.md`, + `targets/03-renderer-facade.md` +- Generated/ignored: `.godot`, native DLL, generated resources/caches and proprietary corpus + +## Contracts and data + +- `MultiMesh.TRANSFORM_3D`, exact Mesh identity, instance count and transform + slice order remain unchanged. +- Batch node name remains model basename plus serial. +- Visibility end/margin and shadow setting remain exact renderer inputs. +- A valid batch attaches once to the supplied M2 parent and returns its node. +- Loader retains Editor-owner assignment, build cursor, budgets and retries. + +## Dependencies + +- Requires: accepted animated materializer package on master `86814de` +- Blocks: further M2 build-job orchestration extraction +- External state: Godot MultiMesh and SceneTree mutation remain main-thread APIs + +## Verification + +- Commands: dedicated invalid/name/mesh/count/order/render/attachment/source/timing + verifier; M2 build/cache/prototype/animated/shutdown/material/facade/internal- + access/manifest regressions; docs/coordination/dry-run gates +- Fixtures: synthetic ArrayMesh and ordered Transform3D slices +- Fidelity evidence: exact existing MultiMesh construction and render settings +- Performance budget: materialize 10,000 transforms under one second + +## Documentation deliverables + +- Inline API docs +- Module spec with inputs/outputs, ownership and source map +- Data-flow, lifecycle/state, sequence and dependency diagrams +- Adjacent build/cache/world-renderer/module-registry/RENDER updates + +## Simplicity and naming + +- Important name introduced: `M2StaticBatchMaterializer` +- Simplest solution: synchronous main-thread RefCounted returning attached node +- Rejected complexity: signals, async queue, callbacks and generic materializer base +- Unavoidable complexity: MultiMesh is a Godot Resource owned through its node +- Measured optimization evidence: bounded synthetic transform upload + +## Status + +- State: active +- Done: contract and ownership boundary +- Next: implementation, verification and documentation +- Blocked by: + +## Handoff + +- Commit: +- Results: +- Remaining risks: +- Documentation updated: +