rae 0.1.4

Renderer-neutral widget, layout, state, and GLSL shader primitives for agentic Rust desktop tools.
Documentation
# rae Implementations

This file is the running implementation memory for `rae`, the reusable Rust design/widget/shader crate used by `xrae` and future codebases.

## Current Naming

- Crate/package: `rae`.
- Repository: `../KnottRustDesign/` / `https://github.com/Tknott95/KnottRustDesign`.
- Former temporary in-app crate name has been retired; use `rae` everywhere in new code.
- Current release target: `rae 0.1.4`.
- `rae` is intended to be publishable as a standalone crates.io package when the API and ownership are ready.

## Reference Memory

- Primary app consumer: `../Aevtop/apps/xrae`.
- Behavioral reference: `../KnottCode/**`.
- Important concepts to support: OpenCode-like prompt/transcript/sidebar shell, Build/Plan mode, thinking modes, context picker, command palette, provider setup, agent-flow cockpit, Kanban, validation profiles, loop DONE/BLOCKED gates, resource caps, and safe workspace-scoped writes.
- Safety baseline: renderer-neutral library only; never read provider token files; expose safe sidecar command models instead of shell execution; validate write target paths before any app applies model-generated file edits.

## Done

- Split the reusable library out of the Aevtop app repo into standalone `../KnottRustDesign`.
- Renamed the package and public app-facing dependency to `rae`.
- Added standalone Cargo package metadata and repository docs.
- Added `.gitignore` so build outputs are not committed.
- Added modules for color, layout, math, shader, state, transcript, deck, flow, sidecar, theme, and widget models.
- Added heavy GLSL shader sources for curl nebula, hex lattice panes, prompt beam field, aurora curtains, knot raymarch field, terminal rain, and agent-flow beams.
- Added `effect` primitives for Flutter/Material-style ripples, glow, elevation, focus rings, disabled alpha, interaction state, and motion curves.
- Added shader families/descriptors so consuming apps can choose effects by use case and complexity.
- Added more GLSL sources: interaction ripples, bloom glow fields, code-lens scan, reaction-diffusion, Voronoi crystal facets, and plasma graph networks.
- Added more math helpers for CPU-side shader/effect work: `Vec3`, cross products, Catmull-Rom interpolation, remap, and HSV-to-RGB.
- Added `morph` primitives for whole-card topology morphing: material tokens, shape presets, card topology, morph profiles/states, and morph cache keys.
- Added GLSL sources for SDF card morphs, metaball cards, Google-style aura fields, orbital meshes, glass caustics, and liquid chrome.
- Ported Aisling/`KnottEffects` visual concepts into renderer-neutral GLSL shader descriptors: blackhole, rings, fireworks, laser etch/sweep, beams, synth grid, spotlights, swarm, storm flicker/thunderstorm, VHS glitch, waves, vortex, cascade, and grid pulse.
- Added transcript viewport materialization with scroll clamping.
- Added command palette/context/provider/theme/status deck data models.
- Added agent phases, edit plans, Kanban, run records, validation profiles, and completion gate helpers.
- Added sidecar command previews and write-target safety validation.
- Added a broad `examples/` suite modeled after `../KnottTUI/examples`: shader catalog, Aisling shaders, effects, morphing, layout, widgets, flow, sidecar safety, transcript, themes, and full shell snapshot demos.

## Blockers

- No current crates.io publication blocker for `0.1.2`; `rae v0.1.2` was published successfully.
- `rae` is renderer-neutral; desktop drawing remains in consuming apps like `xrae`.
- Provider execution, OAuth, runtime command execution, and model calls are intentionally out of scope for this crate.

## Recommendations

- Next: add renderer-neutral hit testing and pane mouse routing.
- Next: add retained effect cache keys and multi-pass shader pass descriptors.
- Next: add shape hit-testing helpers that match morph topology enough for interactive cards.
- Next: add richer transcript/code-block tokenization without binding to a specific renderer.
- Next: add more tests around write guards, validation gates, transcript wrapping, and command palette filtering.
- Later: add examples that render the shader catalog in wgpu/macroquad/egui shells.

## Verification Log

- Passed during split: `cargo check`.
- Passed final gate: `cargo fmt --all --check`.
- Passed final gate: `cargo test`.
- Passed final gate: `cargo package --allow-dirty`.
- Passed package verification dry-run: `cargo publish --dry-run --allow-dirty`.
- Publish warning: crates.io reports `rae@0.1.0` already exists; actual upload is intentionally not run until ownership/version are confirmed.
- Passed `0.1.1` gate: `cargo fmt --all`.
- Passed `0.1.1` gate: `cargo test` with 18 tests.
- Passed `0.1.1` gate: `cargo package --allow-dirty`.
- Passed `0.1.1` publish dry-run: `cargo publish --dry-run --allow-dirty` reached upload and aborted as expected.
- Published: `cargo publish` uploaded and published `rae v0.1.1` to crates.io.
- Passed `0.1.2` gate: `cargo fmt --all`.
- Passed `0.1.2` gate: `cargo test` with 20 tests.
- Passed `0.1.2` gate: `cargo package --allow-dirty`.
- Passed `0.1.2` gate: `cargo publish --dry-run --allow-dirty` reached upload and aborted as expected.
- Published: `cargo publish` uploaded and published `rae v0.1.2` to crates.io.
- Passed `0.1.3` gate: `cargo fmt --all --check`.
- Passed `0.1.3` gate: `cargo test` with 20 tests.
- Passed `0.1.3` gate: `cargo package --allow-dirty`.
- Passed `0.1.3` gate: `cargo publish --dry-run --allow-dirty` reached upload and aborted as expected.
- Published: `cargo publish --allow-dirty` uploaded and published `rae v0.1.3` to crates.io.
- Pending `0.1.4` gate: run format, tests, example compile, package, dry-run, and publish after adding example suite.