================================================================================ AFFINE CODING COURT: ARTIFACT INGESTION BRIEF ================================================================================ [LANGUAGE GAME DEFINITION] Purpose: A generic wasm IDE client for affine.earth: one page that lists every court tool served on /language-invariant/mcp, renders a form from each tool's own inputSchema, posts decimal strings, ingests local files and data on the visitor's machine as long-running UUM-8D language games, and loads a court-returned wasm.module into its own canvas. The coding requirement in the visitor's prompt is appended below this line by the client before submission. Win Condition (Exit): execute_artifact_crucible returns rung 7 CALORIE_AFFINE_ARTIFACT_DELIVERED with a content[].resource of artifact_kind wasm.module whose blob decodes to bytes beginning 00 61 73 6d 01 00 00 00 and whose sha256 equals the declared digest; the module instantiates in the browser with the box_camera import object and exports get_frame_buffer_ptr, get_code_buffer_ptr, get_code_length, set_code_length, validate_edge_code, ingest_intent_vector, get_last_sequence_id and memory; validate_edge_code returns 1 over the visitor's UTF-8 prompt; ingest_intent_vector paints the 600x600 frame. Losing Moves: floating point in any lane (f32, f64, float literals, float intrinsics); heap growth or an allocator; Docker, node, node_modules or any runtime interpreter; a verdict computed in the client instead of on the cell; a second copy of any law (projection, digest, quantiser) inside the shell; a defaulted parameter that turns a wrong result into a valid message; an artifact_kind asserted without the four magic bytes behind it. [STRUCTURAL GOAL] Manifold Target: The client SHELL of C4 x S4. The shell owns S4 linear memory only: the 600x600x4 frame buffer, the 800-sample i16 audio ring, the 64 KB edge-code buffer and the AtomicU64 sequence lock. Every C4 law (BoxCamera projection, digests, quantisers, wire codecs) is IMPORTED from AffineWasmClient.wasm and never re-implemented here. Input Coordinates: get_code_buffer_ptr -> 65536 bytes of UTF-8 edge code, length in set_code_length/get_code_length; ingest_intent_vector(seq_id u64, phoneme_id i32, emotion_alpha i32, emotion_beta i32); get_frame_buffer_ptr -> 1_440_000 bytes RGBA; get_audio_buffer_ptr -> 800 x i16; the 32-vertex CANONICAL_GEOMETRY table of i64 triples. Execution Lock: A monotonic AtomicU64 sequence lock drops any intent whose seq_id is not strictly greater than the last accepted one, so a stale echo can never repaint the frame; the only loop is the fixed 32-vertex table; imported project_x/project_y answering i32::MIN mark a refused vertex rather than inventing a coordinate; no iteration over an input space of any size. [PAYLOAD SHAPE] Target Architecture: Rust no_std wasm32 File Structure: affine_wasm_ide.wasm Memory Binding: static mut FRAME_BUFFER [u8; 1_440_000], AUDIO_BUFFER [i16; 800], CODE_BUFFER [u8; 65536]; two AtomicU64 (CODE_LENGTH, LAST_SEQ_ID); linear memory exported as memory; no host heap; the host page reads the frame through get_frame_buffer_ptr and writes code through get_code_buffer_ptr with a Uint8Array view over memory.buffer. [WASM MEMBRANE INTEGRATION] Target Standalone WASM: AffineWasmClient.wasm NATS JetStream Subject: gaiaftcl.game.[user_vqbit_hash].turn.[scf] Integration Protocol: The artifact must compile offline (cargo build --release --target wasm32-unknown-unknown, opt-level z, lto, panic abort, debuginfo stripped), drop directly into the cell's execution directory as served bytes, and interface with the standalone WASM via standard I/O byte streams and the box_camera import object without requiring Docker or a runtime interpreter. ================================================================================ AGENT EXECUTION ORDERS: 1. Do not narrate. Do not explain the math. 2. Output the requested [PAYLOAD SHAPE] inside a single code block. 3. Post the compiled module to execute_artifact_crucible as base64 in the artifact field with this brief, verbatim, in the brief field. The court verifies the magic, the version word and the section table, seals the bytes, and returns them as an MCP resource blob with their sha256. Source law is reported law_checked=false for a posted module; submit the .rs source in a second call to have Constraints 3/4/5 decided over it. ================================================================================