ReasonStack
Menu

— The stack

Open implementations you can read.

Each piece exists to stop a different kind of drift. Read the source, adopt what you need.

— The point of view

Three kinds of drift. A layer for each.

Grain

Architectural drift

in information systems

Orc

Architectural drift

in workflows & harnesses

Allium

Domain drift

in the spec itself

Prevents architectural drift in information systems.

Narrows the space until drift becomes structurally impossible.

Composable building blocks for event-sourced information systems using CQRS. The event store is the single source of truth — humans, application code, and AI agents share one ledger of facts: same store, same constraints, same audit trail.

  • Seven primitives — events, commands, queries, read models, to-do processors, periodic tasks, schemas
  • Swappable event-store backends: in-memory → SQLite → Postgres as a single line change
  • Dynamic Consistency Boundary — no aggregates; strong consistency via CAS guards
  • Datastar adapter — reactive server-rendered UI streamed over SSE

Prevents architectural drift in workflows and harnesses.

If you can read the game tree, you can read the Orc one.

A behavior-tree workflow engine built on Grain. The tree ticks top-down, root first; every leaf reads the blackboard and writes an action. It's the same machine that has run game NPCs for decades — the leaves just call an LLM or sandboxed code.

  • Composites: sequence, fallback, parallel, map-each
  • Leaves: llm, code, condition, llm-condition, repl-researcher, delegate
  • Sheets — behavior trees stored as event streams, with draft / published versioning
  • Built on Grain's CQRS: commands → events → read models → queries

Allium

adopted, not ours Read the spec notes ↗

Prevents domain drift.

The spec layer — the one we've chosen.

The specification layer: the durable artifact between intent and code, where a chat thread forgets but the spec holds. Allium isn't ours — it's an existing spec language we've adopted to fill this tier. The layer is the point; the choice can change. We've chosen Allium for now.

  • An external specification language we read against, not one we invented
  • The single source of product intent — not a buried message thread
  • Every revision goes back to the spec, not to chat

Silo

The factory.

The Grain-app generator. It plans the spec, builds it on Grain one-to-one with the model, verifies the result, and mediates — the software factory operators run to turn a specification into running, owned software.

  • Planner → spec
  • Builder → Grain (1:1 with the model)
  • Verifier → evidence the spec is met
  • Mediator → keeps humans in the loop

— What stays open

Three things worth maintaining.

Keeping a methodology trustworthy downstream comes down to three artifacts — the shape proven by projects like re-frame. Maintain these and the rest follows.

01

An authoritative spec

The contract everything is measured against — currently the Allium spec layer. The single source of intent, not a buried chat thread.

02

A reference implementation

A real, readable build — Grain, in Clojure — that the spec is true to. Theory that bottoms out in code you can run.

03

Exhaustive test coverage

Tests as the guardrail that keeps the implementation honest to the spec as both evolve. Not gospel — guardrails.