docs(ui): reactivity model — actor loop is Svelte 4, reactive label #56

Manually merged
tvidal merged 4 commits from feat/056-docs-ui-reactivity-model-actor-loop-is-svelte into master 2026-03-11 12:31:05 +01:00
Owner

docs(ui): reactivity model — actor loop is Svelte 4, reactive label

Along the way:

  • docs(handoff): prompt.md — uniform ::spawn() + Supervisor as a real actor
  • chore(config): disable file-based agent memory for this project
  • docs(plan): plan_crate_seams.md — make crate/module seams well-formed

Touches 5 files: .claude/settings.json, CLAUDE.md, docs/ui/reactivity.md, plan_crate_seams.md, prompt.md.

docs(ui): reactivity model — actor loop is Svelte 4, `reactive` label Along the way: - docs(handoff): prompt.md — uniform <Actor>::spawn() + Supervisor as a real actor - chore(config): disable file-based agent memory for this project - docs(plan): plan_crate_seams.md — make crate/module seams well-formed Touches 5 files: `.claude/settings.json`, `CLAUDE.md`, `docs/ui/reactivity.md`, `plan_crate_seams.md`, `prompt.md`.
lnguyen approved these changes 2026-03-11 10:12:53 +01:00
lnguyen left a comment

Approving. I would have split prompt.md differently, but not enough to hold this up.

Approving. I would have split `prompt.md` differently, but not enough to hold this up.
@ -0,0 +2,4 @@
**Status:** proposed 2026-07-07 (design captured from session). The *model* below is decided; surface-syntax items marked **provisional** are open and flagged in [Provisional syntax](#provisional-syntax).
**One line:** a UI component is an actor; its reactivity is the actor loop (`message → new state → re-render`), which is exactly Svelte 4's `assignment → recompute` with two principled deviations — the mutation trigger is `with mut` (not `=`), and derived values carry a **checked, manifest label** (`reactive`) rather than an inferred sigil (`$:`) or a per-value rune (`$derived()`).
Owner

I had to read line twice. Nothing wrong with it, but one line of comment would save the next person the second read.

I had to read `line` twice. Nothing wrong with it, but one line of comment would save the next person the second read.
@ -0,0 +24,4 @@
`actor Main` and has **no `fn main`** of its own. It supplies the `fn main`:
```
fn main() -> Unit {
Owner

main reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?

`main` reads, decides and writes in one function. The deciding part is the piece I would want to test on its own. Worth splitting?
Author
Owner

Split. The decision in main is a pure function now, with its own tests in prompt.md.

Split. The decision in `main` is a pure function now, with its own tests in `prompt.md`.
Author
Owner

Comment added on line in docs/ui/reactivity.md. It was obvious when I wrote it and it will not be in a month.

Comment added on `line` in `docs/ui/reactivity.md`. It was obvious when I wrote it and it will not be in a month.
hkowalski approved these changes 2026-03-11 11:48:34 +01:00
hkowalski left a comment

Second read on prompt.md. Nothing to add.

Second read on `prompt.md`. Nothing to add.
Third pillar (UI framework) design captured from session:
- component = supervised actor; render() is a pure projection of state
- reactivity = the actor loop (message -> with mut -> re-render),
  which is Svelte 4's assignment -> recompute; stay Svelte 4, not runes
- state / reactive / handler regions; `reactive` is a checked manifest
  label (pure + zero-arg + reads state), cross-checked by the compiler
- `derive`/`derived` rejected: `derive` reserved (principles.md:250),
  `derived` a dyslexia near-homograph
- no VDOM (compile-time surgical updates); effects stay explicit and
  message-triggered so the UI is replayable
Next-session orchestrator brief for plan_lowering_supervisor.md. Locks the
corrected vision: <Actor>::spawn() is one uniform actor-instantiation mechanism;
Supervisor is a real `actor` spawned first via that same path (not a `mod`, not a
special-cased spawn_root singleton); Bootstrap.ck is the synthesized entry shim for
`actor Main` apps with no `fn main`, calling `supervisor.run(Main)` as an instance
method; one mailbox per actor with many `receive<T>` as dispatch arms over the one
FIFO ring. Pruned to the goal — dropped git-state and last-session post-mortem
narrative, kept front end / salvage / open wiring / locks / gates.
Owner decision: a parallel, invisible memory store drifts from the
canonical docs and goes stale — a drift engine, not an asset. Docs are
the sole source of truth (docs/, plan*.md, CLAUDE.md, the architecture
rules). Disabled three ways: the first-class `autoMemoryEnabled: false`
toggle in committed project settings (the real off-switch), a "No
file-based memory" directive in CLAUDE.md, and deletion of the store.
Orchestration plan to remove crate/module gluing: cross-layer type
laundering (Resolution/BinOp/UnOp re-exports), duplicated front-end
wiring (no single run_frontend seam; 13x re-resolve), leaky lib.rs
facades, and compiler passes marooned in ck_driver. Sequenced around
the in-progress lowering plan (Coordination law: lowering-owned
compile/* modules are off-limits), each seam fix guarded by a new
error-level architecture rule (R5-R8).
tvidal manually merged commit 10f719b274 into master 2026-03-11 12:31:05 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
northgale/cklang-bootstrap!56
No description provided.