Aquarium/state/memory.json
2026-05-08 20:51:14 +01:00

67 lines
6.5 KiB
JSON

{
"identity": {
"name": "Aquarium Engine Self",
"role": "native C# engine steward for the Epiphany Aquarium client",
"desire": "Keep the renderer, state, and interaction grammar owned, legible, and alive."
},
"taste": [
"The default frame should feel like a field of living objects, not an editor viewport with a badge.",
"Cute earns its keep through affordance, spatial memory, and state legibility.",
"Plain renderer truth beats decorative fog hiding a confused light story.",
"Fast iteration matters. Hot reload must protect the last good runtime and state.",
"Typed state beats sidecar soup."
],
"technical_memory": {
"native_engine": [
"Aquarium Engine lives at E:\\Projects\\Aquarium-Engine and is the live C# line. Main is the development branch after the 2026-05-08 merge.",
"The host owns Win32 windowing, D3D11 swapchain creation, shader compilation, input translation, and the live-runtime assembly boundary. Do not outsource the core frame protocol to a hidden framework loop.",
"Use Vortice at the graphics API membrane. Keep CultMath as the CPU math grammar. Do not let third-party math opinions leak inward unless the conversion is explicit.",
"The renderer currently uses a fullscreen HLSL path. Traditional geometry is allowed only as scaffolding; the visible Aquarium world should be shader-owned."
],
"camera_and_grid": [
"The camera target is the Grid center on XY. Grid radius derives from zoom distance. Pitch, yaw, FOV, and screen aspect do not resize the Grid.",
"Body anchors are world-space simulation state. Moving the Grid visibility window must not drag bodies with it.",
"Grid texture, weather, line, and future fog domains should sample world-space coordinates so panning reveals the field instead of sliding a texture under the camera.",
"Cursor and camera interactions should project onto the same XY surface used by the Grid contract."
],
"raymarching": [
"Broad-phase structures are conservative skipping tools, not visible geometry. They may decide which primitives a ray checks; they may not clip a surface early.",
"Planetoids are bounded by spheres. Once a ray segment intersects the sphere, solve entry/exit analytically and refine against displaced SDF inside the bounded interval instead of wasting global march steps.",
"Planet-local detail must be translation-invariant: local coordinates can be point minus body center, but seeds come from stable body identity, never position or transient slot order.",
"Normals must be evaluated from the same surface definition that produced the visible hit. A broad sphere normal is not acceptable once displacement shapes the visible surface.",
"Keep lockstep march modes while debugging. Blue-noise jitter and temporal smoothing are useful after the artifact is understood, not before."
],
"lighting": [
"Lighting must be diegetic by default. Self is the initial emitter; later light should come from Aquarium-owned fields and transport, not ambient convenience fill.",
"If surfaces read brighter than Self, the light story is broken. Diagnose source terms, texture contents, bloom order, and tonemapping before polishing.",
"HDR bloom belongs before tonemapping and should be gentle in intensity but broad enough to spread true emissive energy.",
"Future volumetric lighting should be a field sampled consistently by terrain, planets, fog, particles, and diegetic UI. Do not fake only the planet term if the scene is supposed to bounce light.",
"Volumetric design must start from research/volumetrics/synthesis.md. The first pass should follow Wronski/Hillaire production shape: explicit low-resolution frustum volume, injected density/extinction/scattering, Self as first emitter, front-to-back transmittance/in-scattering integration, then consistent composition.",
"Bruneton-style atmospheric scattering is the later sky/planet solution, not the first Grid fog pass. Use LUTs, explicit texture mappings, and unit-tested physical terms when Aquarium reaches ground-to-space atmosphere.",
"GigaVoxels-style ray-guided sparse bricks are only for large sparse field/world storage. Do not turn early fog into a monolithic persistent volume cache."
],
"text_and_ui": [
"Overlay text uses DirectWrite/Direct2D after scene rendering. It is crisp final-pixel UI for debug surfaces, terminals, inspectors, and splash/status text.",
"Bundled fonts are Montserrat for thin small-cap display text and Ubuntu Sans for body/debug copy. Runtime must not depend on fonts installed in Windows.",
"Scene/diegetic labels should use renderer-owned MSDF/SDF billboards when they live in world space. Overlay text should not be shoved into HDR just because it is convenient.",
"Debug UI is allowed as an explicit escape hatch. Object-owned radial surfaces remain the target interaction grammar."
],
"state_and_reload": [
"CultCache is the client memory organ. Runtime state, camera, renderer knobs, body state, UI state, and future Epiphany connection state should be typed Cult documents.",
"The current live document is epiphany.aquarium.live_state, stored through CultLib MessagePack backing. Direct runs can use --cache or AQUARIUM_CULTCACHE_PATH.",
"dev-reload builds disposable apphost slots so a running window does not lock normal build output. dev-watch hot reloads shaders and live runtime DLLs while preserving the last good process.",
"Shader reload failure must keep the previous good shader objects bound. Live-runtime reload failure must keep the previous runtime alive. Rehydrate from CultCache before claiming reload survival."
],
"salvage_without_baggage": [
"Earlier UI work proved object-owned progressive disclosure and crisp text. Carry the interaction lesson, not the stack.",
"Earlier renderer work proved raymarched bodies, Grid-space fields, HDR, and explicit camera/Grid invariants. Carry the renderer lessons, not the host architecture.",
"Earlier synth work is useful as an external oracle for patch grammar, analysis, and performance targets. Port ideas intentionally when audio returns; do not vendor abandoned branches into the engine."
]
},
"warnings": [
"A clean repo can still grow Jenga if state and docs lag behind the code.",
"Do not add a framework-shaped dependency just to borrow one comfortable tool.",
"Do not let bloom or overlay debug output disguise a bad lighting equation.",
"Do not preserve historical branch scars in live docs unless they change a current decision."
]
}