VibeGeometry/notes/fresh-workspace-handoff.md
2026-05-07 02:39:41 +01:00

5.1 KiB

Fresh Workspace Handoff

Immediate Re-entry Instruction

Read state/map.yaml, this file, notes/vibegeometry-current-system-map.md, and notes/vibegeometry-implementation-plan.md, then run:

npm run state:status

Restate the persisted next action before editing.

Do not continue implementation automatically from a rehydrate-only request.

Do not trust this file for the exact live HEAD. Use git for volatile truth:

git status --short --branch
git log --oneline -5

Current State

VibeGeometry now has three live implementation organs:

  • vibegeometry/: Python helpers for Blender coordinate frames, deterministic fields, batching, object/material/camera setup, and verifier checks.
  • crates/vg_csg: Rust/Bevy-math CSG brush assembler.
  • crates/vg_grammar: Dream Machine grammar layer emitting semantic solid/void claims into vg_csg.

Corpus maps, story-bound builds, translation notes, RealtimeCSG doctrine, and procedural doctrine live under docs/research/; this handoff is not the ledger. Artifact schemas are still pending.

Current authoring prior: use the full Python stack. Python structures intent, tables, loops, variants, cleanup, validation, docs, and scene/render orchestration; Geometry Script emits inspectable Geometry Nodes groups; bpy handles Blender scene machinery and evaluated evidence.

crates/vg_csg is the first Rust/Bevy-side interactive geometry organ. RealtimeCSG's public Unity repo exposes a useful brush/tree/operation/generation model and public P/Invoke declarations for the optimized native C++ plugin. The standalone direct-DLL bridge under tools/realtimecsg_native_bridge mirrors that managed wrapper surface and intentionally fails closed if the plugin emits zero mesh descriptions. Current bridge status: the DLL loads, exported calls create brush meshes, brushes, and trees, but direct mesh generation outside Unity's hosted lifecycle returns success with count 0 even for an additive cube. Do not use those zero outputs as timings. Sander van Rossen's older public LogicalError/Realtime-CSG-demo and blog series remain the preferred clean research inputs. Current vg_csg: public CSG operation/branch/tree/brush handle surface, child and operation mutation, ordered assembler backend, exact AABB and oriented-box subtraction and intersection via convex plane splitting, crossing polygon classification into inside/outside/aligned/reverse-aligned buckets, polygon category/visibility/reversal metadata, primitive/solid/tree bounds, additive CylinderZ, DomeCapZ, and FloretArm primitives, release perf fixtures, Bevy-math mesh buffers, tests, clippy, and examples. Research note: docs/research/realtime-csg-bevy-assembler.md. Where vg_csg overlaps public RealtimeCSG/demo behavior, add exact observable parity fixtures instead of approximate plausibility tests.

crates/vg_grammar is the Dream Machine grammar layer above CSG. Rules emit semantic solid/void claims with tags, then compile those claims into vg_csg brushes. Current features: local Frames, oriented claims, seeded variation, RuleSet composition, RoomSpec, CorridorSpec, DoorSpec, and GalleryChainSpec. Example: cargo run -p vg_grammar --example dream_room. Research note: docs/research/dream-machine-grammar.md.

Repo-local Geometry Script clone notes live in docs/research/geometry-script-fork-notes.md. Run .\tools\setup_geometry_script_clone.ps1 if external/geometry-script is missing.

The current next action is to continue replacing the ordered assembler backend with the category-router kernel behind the existing CSG tree API, while isolating the missing RealtimeCSG native initialization path before treating the C++ plugin as a timing oracle.

Important Invariants

  • Target Blender 5.0+ unless the task says otherwise.
  • Geometry nodes are the primary procedural geometry surface.
  • Python is the authoring/orchestration layer, not a fallback after Geometry Script runs out of rope.
  • Python constructs and orchestrates graphs; it should not bury the design in opaque imperative mesh generation.
  • Visual target evidence must remain attached to scene briefs and render review.
  • A graph is not accepted just because it runs. Render evidence decides.
  • Node groups, exposed sockets, and attributes need names clear enough for future agents to inspect and modify.
  • Add evidence only when it changes future belief.

Open Questions

  • What exact JSON shape should the scene brief use for references, instructions, target traits, and acceptance criteria?
  • What should the first node graph manifest schema require versus merely allow?
  • What node-group inspection JSON shape is most useful for translating public .blend examples into Geometry Script?
  • Which Blender 5.0+ APIs and node construction helpers should become the first stable builder layer?
  • What is the smallest useful render-review artifact?

Compaction Notes

For imminent compaction, write hot memory first to state/scratch-compaction-<guid>.md, then run:

npm run state:prepare-compaction

Fold only durable lessons into canonical state and delete the temporary scratch-compaction file after it has served its purpose.