Alchemy's Fold PR models backends like foldkit models UIs: aggregates, views, policies
samgoodwin89 · x · 2026-10-10
Alchemy author sam-goodwin89 opened an experimental PR (#2176) introducing Fold: backend domain modelling in the spirit of foldkit for UIs—typed messages, pure state transitions, and side effects as explicit, testable steps.
- Commands are decided by Aggregates, events fold into Views, Policies react, and Apis expose it
- Messages are Schema classes; Commands declare input, rejection cases (e.g. InsufficientFunds), and reply shapes
- The same Domain runs in memory for tests and on Durable Objects in production
The repo demo shows modelling domains with aggregates, views, policies and stories.
Related event: Alchemy Introduces Fold: Event-Sourcing-Style Backend Modeling(2 posts)→
More from coding & agent
- Testing an AI agent to book a hotel failed — and it still required manually entering credit card info — NielsRogge · 2026-10-10
- AI now writes 52% of merged code, but DX researcher says stop treating AICP as a KPI — rseroter · 2026-10-10
- OpenAI says Codex usage data will never power its predictions, even after testing — btibor91 · 2026-10-10
- Summarize: free Mac tool summarizes anything on screen in ~1s via Cerebras, one command to install — draecomino · 2026-10-10
- Building Blender Scenes Entirely With AI, Without Ever Touching Blender — RexDouglass · 2026-10-10
- More details on the Jev Router for model routing workflows — omarsar0 · 2026-10-10