Shadow workspace and LSP
Cursor-class IDEs often validate AI edits in a shadow editor: a second extension host, duplicate language servers, and heavy incremental parsers. That pattern correlates with UI lag. The harness refuses it.
Target loop
-
Model proposes a patch (byte/character offsets).
-
The harness applies it to an in-memory copy-on-write layer over the real workspace.
-
An LSP multiplexer sends
textDocument/didOpen/didChangewith synthetic URIs to the one language server already serving the project. -
Diagnostics feed a self-correction prompt when needed.
-
Disk commit happens only on user confirmation.
No second rust-analyzer / tsserver process per speculative edit.
Forbidden live engines
-
Tree-sitter (and similar) as the live editor/DOM incremental engine — reflow and update tax.
-
Duplicate extension hosts or full IDE clones for validation.
-
Python/JIT stacks on the speculative hot path.
AST awareness comes from LSP diagnostics and offset patches, not a second parser driving the UI tree.
LSP policy
Prefer language servers that stay cheap under virtual documents. When a language’s LSP is chronically expensive under muxed virtual docs, plan a D reimplementation (serve-d quality bar for D first; others as measured).
GC
The harness defaults to tgc (thread-local GC) for actor swarms — collections do not stop sibling threads.
Use @nogc on hot paths: patch apply, IPC framing, LSP JSON-RPC framing, Mixr feature extract.
Do not chase whole-program @nogc.
Status
This page is the design contract. Harness v0.5 ships Mixr + provider HTTP seams; CoW buffers and the LSP mux are roadmap (see project-plans seeds).