Skip to content

Redesign: entry graph store, one app API, the Dioxus app (Bevy and the JS app retired), the model spec, pretrained import, GPU backend - #8

Merged
SaulDoesCode merged 278 commits into
masterfrom
claude/adoring-pascal-5nk7o1
Nov 2, 2026
Merged

SaulDoesCode merged 278 commits into
masterfrom
claude/adoring-pascal-5nk7o1

Conversation

@SaulDoesCode

@SaulDoesCode SaulDoesCode commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

This is the redesign agreed on 14 Oct (docs/next.md, "Decisions"). Status and what's left are in docs/next.md under "Resuming".

Data

  • Entry graph store (core/src/graph/, format in docs/format.md):
    • one store for every entry, with timestamps;
    • a 5-bit packed codec with references and function calls (with tail calls);
    • edges, borrowing and dedup; posting-list indexes; compaction.
    • Size: 17.1 MB against the old store's 54.0 MB on the same data.
  • Gematria is checked against weum. Atbash is removed; the modes are ordinal, reversed and frequency.
  • Byte sums are a separate measure.
  • Imports: weum's all-of-it.json. Backup writes texts.json + other.json. Old saves are not read.

One app API

  • core/src/ops/ holds the op code; the desktop app and the hub both use it. The ops are listed in docs/app-api.md.

The app (Dioxus 0.7, app/)

  • Desktop and web: desktop runs over the graph in process; the web build runs over the hub's WebSocket and is served by the hub at /app/.
  • Views: memory (at parity with weum), space (three.js), lists, reader, notes (markdown), tags, stats, models (the spec's outline), filters, settings.
  • Settings: zen and top-bar autohide, palettes, backup, weum import.
  • Bevy app and old JS web app: removed. Release builds now ship anend-app.
  • Screenshots: in app/docs/shots/.

Hub

  • Server options: --mode hub|app|both, --join invite|apply|open, private/unlisted/public visibility, /health.
  • Docs and deployment: docs/deploy.md, Docker.
  • CSP change: the content security policy now allows wasm, eval and blob scripts. Dioxus's JS interop needs eval, and the space loads three.js from a blob. docs/security.md covers it.

Models (core/src/classify/)

  • Declarative model spec (docs/models.md): generative heads with a cached decoder, critics, guidance and reinforce, and codecs for numbers and pictures. Gematria inputs are opt-in.
  • Pretrained Llama-family import: reads safetensors and BPE tokenizer.json, for llama, mistral, qwen2 and qwen3. Tested on synthetic checkpoints only, because model downloads are blocked in the build environment. The example to run on a real model is core/examples/pretrained.rs.
  • Optional GPU backend (--features gpu, wgpu): inference and training. It is bit-exact against the CPU on llvmpipe and opt-in per run. core/examples/gpu_bench.rs is for real hardware.

Checks

GitHub Actions doesn't run on this account, so CI shows red without running. These were run locally on ce4351b, and all pass:

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace: core 135, hub 36, app 7
  • the wasm32 web build

Left

  • Saved patches (docs/wip/): two unfinished rounds:
    • gematria presets off by default;
    • further GPU work.
  • Not yet tried: an input method (IME) on a real system; real pretrained checkpoints; a real GPU.
  • Docs and UI: docs/guide.md still describes the old apps; the models view waits for classifiers to move onto the spec.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF

claude added 28 commits October 14, 2026 21:52
…ing it as a paid service); hub-api and security docs for modes, invites and visibility; hub/Dockerfile, terms and privacy examples, the systemd unit updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
… queries, critics; build/train/run/generate, from_classifier) and machine benchmark (bench.rs)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…nd left

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…itic) and pictures (patch-codebook picture generator, cost by tokenisation); docs/models.md: the model spec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…nd the memory view with weum parity; driven under Xvfb

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…es, merge and forge), the graph as classifiers' texts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…easured results; what's left

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…ters over the query model

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…our with readable ink, a dismissable crisp card, arrows hop to the nearest text, texts shrink near

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…ers beside each save reading its texts; uploads and hub saves are graphs; docs/app-api.md for the new op set; the JS offline engine's parity test retired from CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
… which WebKitGTK flattens without compositing); zoom only when not 1; page headers on cards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
… dropped letters); its text goes in when a note opens

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…ation warning); app/web: the web build's page and build script

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
… backtracking regex for pre-tokenizer patterns, a BPE tokenizer from HuggingFace tokenizer.json (byte-level and SentencePiece style)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF

Copy link
Copy Markdown
Owner Author

CI (ci / "app and hub") fails before any step runs.

Every run since 14 Oct has ended in about 3 seconds with no runner assigned (runner_id: 0, no steps, no log). That includes the pushes to master after #5, #6 and #7. GitHub never started the job, so this isn't a code failure. The usual causes are Actions minutes used up, a spending limit, or a failed payment, so check Settings → Billing → Actions. Actions may also be disabled for the repo.

I ran the same steps locally on this branch at 56df925/cc1519f, and all passed:

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace: core 120, hub 35, app 8
  • the wasm32 web build

I can't re-run the job from here. Once Actions can start jobs again, the next push will run CI.


Generated by Claude Code

…ls mirroring the CPU operation order (products, 8-lane reductions, RMSNorm, softmax, SwiGLU, RoPE, scores, math::exp), exact and fast precisions, an exactness probe; bit-exact on llvmpipe (lavapipe)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
claude added 24 commits October 27, 2026 12:44
… whole)

A click on any part selects the whole copy: an outline, the gizmo at its
parts' middle (move and turn), its own menu (open, a quarter turn, a copy
beside it, detach, remove); Delete removes it and Ctrl+Z brings it back.
Double-click opens the copy to edit its parts; Esc or a click outside
closes it. Core: prefabs.duplicate, prefabs.remove's restore, place's own.
The gizmo's middle ball is picked before rings seen edge-on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…gent was cut off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
In the space, Shift+click adds texts, blocks, prefab copies and lights to a
selection; a box dragged on empty room selects what's in it. The many are
outlined, moved and turned by one gizmo, deleted together, and an undo
takes either back in one step (the room's undo batches). The memory view
selects with Shift+click and a box (the list moves to Ctrl+Shift+click);
the notes and lists views pick several with Shift+click to tag, delete or
unlist together. The snapshot patch goes: the work is committed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…cut off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…ved whole

A group (an entry of mime 14) holds blocks, prefab copies and groups. A
click on any of it selects it all and a drag moves it all; a double-click
opens it to pick inside, Esc closes it. Ctrl+Shift+G ungroups; both undo.
A selected group copies beside itself (inner groups remade) and becomes a
prefab of its blocks. Shift+click picks a block under the gizmo, not the
gizmo. The snapshot patch goes: the work is committed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Every sticky ray is a cable from its block to each target (wiring.list's
links resolve a part's inner targets), lit while a ray passes. Wiring mode
(J, or the wiring window's "connect by dragging") shows ports; a drag from
block to block wires them through wiring.link (again to unwire), and Ctrl+Z
takes a wiring change back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
… sky)

anend-render draws the room's blocks (turned, sized, coloured, boxes or
spheres) and lines on the room's colour into a picture, read back from the
GPU; a headless test checks the pixels. The plan for showing it on the
desktop without JavaScript (a GTK drawing area under the transparent
webview) and the order of the rest is in docs/wip/questions.md 114-116.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…till working on it)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…bview

On the Linux desktop with ANEND_NATIVE_SPACE=1, a GTK drawing area goes
under the webview (now see-through, drawn at 99% so GTK puts it into the
window) and paints the pictures anend-render draws on a thread of its own:
the save's blocks and wires, flown through with W A S D and looked around
with the right button, the pointer and keys coming through Dioxus's own
handlers. No JavaScript. The renderer line stays open while the rest of the
room moves over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
render/src/room.rs takes space.js's commands and sends its events, so the
app's handlers, windows and menus work unchanged: texts laid out by the
spread (weights, repel, attract, gravity, no overlaps, chains following
their heads), picked, dragged, pushed and pulled with the wheel, copied,
free texts, sizes, own texts, undo, rows for scenes; flying, looking and
the arrows' hop. Labels are drawn on the picture with Fira Sans (the app's
face, as a TTF) from a glyph atlas. Native mode (ANEND_NATIVE_SPACE=1)
runs it in place of space.js; blocks are still drawn plainly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Meshes (kept on the GPU by id and version) with their own place, a texture
(mip-mapped, repeating) times vertex colour, unlit as space.js's were; passes
for the sky, opaque blocks, see-through ones and what's drawn over everything;
fog in the room's colour. Blocks and lines stay as conveniences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…e sky

Blocks are built as space.js built them (three.js's box faces, texture
coordinates in tiles, cells for light, bent slices, ellipsoids), their tiles
drawn in Rust (a text's tile in Fira Sans, a recipe's source cropped, turned,
mirrored and tinted, pictures decoded from their data URLs), the room's
lights baked into vertex colours, zones see-through, the sky's recipe round
the camera, the floor's grid and the fog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Blocks are picked by a ray on their triangles; the gizmo's arrows, knobs,
rings and middle ball move, size, turn and drag them (Shift snaps); a
prefab's copy is picked, moved and turned as one and opened with a double
click; Shift+click and a box drawn on empty room select many, moved and
turned together; groups are picked as one. The same events go to Rust, and
Ctrl+Z takes each step back. Light markers show while the lights window is
open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Wires drawn as sagging cables (lit along a ray), ports and a drag to wire in
wiring mode, clicks, timers and zone events firing while the room plays,
rays fading; zones keep their texts under their own physics. Sounds are
placed by the room (an equal-power pan and a linear fade to their range)
and mixed natively: decoded with symphonia, played on cpal (Linux needs
libasound2-dev to build, added to CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…host, previews

Animations pose their blocks every frame (move, turn, scale, a texture from a
key on); walking (gravity, steps, ledges, crouch, lean, jump), the grapple
and superflight (collecting texts as a trail) move the camera in fixed
steps; a prefab placed by hand shows its see-through ghost, snapped, turned
with the wheel, red where it would overlap. The prefab menu's pictures are
drawn on a renderer of their own, and the textures window's previews are
drawn in Rust and shown as pictures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…s leave its build

The room in Rust takes every command space.js took (addchain and focus too),
and is the Linux desktop's room with no switch back; space.js and three.js
are compiled out there (macOS, Windows and the web keep them for now). The
JavaScript left on the desktop is named in parity.md, with a guard that the
native room takes every command; questions 118 and 119 record the choices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Meshes outside the view's planes aren't drawn; opaque meshes hidden behind
others are tested as boxes with occlusion queries and come back when the box
shows; blocks past 120 units are upright billboards of their size and mean
colour, past 400 neither drawn nor hit, exactly. The spread's no-overlap pass
works on plain arrays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
The pair forces and the alikeness weights are worked out row by row, the
rows split across the machine's threads in a big room; the no-overlap pass
sweeps along x. A full room (2000 texts, 400 blocks) a frame: the spread
from about 100 ms to 30 ms on four cores here (an ignored test measures it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Views are kept once built, so the native room went on showing (and its
see-through page style stayed) behind the other views; it shows now only
while the space is on screen, and isn't drawn while hidden. The empty-room
hint no longer covers a room of prefab copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…e settled spread

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF

Copy link
Copy Markdown
Owner Author

Update: the room runs natively on the Linux desktop, with no JavaScript (up to faf92ce)

The space on the Linux desktop is now Rust, drawn with wgpu under the page. space.js and three.js are no longer in that build.

  • The room in Rust (render/, anend-render): it takes every command space.js took and sends the same events, so the windows and menus didn't change. A parity guard checks that every command is handled. It covers:
    • the spread with zones; texts with their underlines;
    • blocks with their tiles (texts, recipes, pictures), bends, spheres, baked lights, the sky and fog;
    • the gizmo, prefab copies as one group, Shift+click and box selection, groups;
    • wires made by dragging, rays, timers and zone events;
    • sounds, mixed natively (symphonia and cpal; building on Linux needs libasound2-dev);
    • animations, walking, the grapple, superflight, the prefab ghost;
    • the prefab menu's pictures and the textures window's previews.
  • Culling: back faces, meshes outside the view, and meshes hidden behind others (occlusion queries) are left out. Blocks past 120 units are drawn as billboards; past 400 they are neither drawn nor hit by rays. Both distances are exact.
  • Speed: the spread runs on threads. A room of 2,000 texts went from about 100 ms to 30 ms a frame on four cores here. Frame times on a real GPU haven't been measured yet.
  • Polish: each view was looked at with a 50,000-text save. Two faults were found and fixed: the room showed through behind the other views, and the empty-room hint covered a room of prefab copies.
  • Still JavaScript: macOS, Windows and the web still use space.js for now (questions 118). What remains on the Linux desktop is listed in parity.md.

Shots: app/docs/shots/native-*.png, polish-*.png. The guide's space section describes the native room.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF


Generated by Claude Code

…has space.js

Each frame the room draws is kept as a bitmap and served to the page through
the anendframe custom protocol; an img in the space's element shows the
newest (no script). The mixer and the prefab pictures move to every desktop.
Checked on Linux with ANEND_SPACE_PICTURE=1 under Xvfb, and the Windows
build checked to compile. A clippy fault in the spread's new test is fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
…room=wgpu)

anend-render draws straight into a canvas (Renderer::for_canvas, present),
and the same Room runs in the page. It isn't the web's default until it's
been seen in a real browser: this container's headless Chromium shows no
WebGPU canvas in screenshots (questions 121). The prefab pictures and sounds
aren't there yet on the web.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tq7kHwoCFpfspEmb6rmcAF
@SaulDoesCode
SaulDoesCode merged commit b234980 into master Nov 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants