QxFx0: a typed dialogue runtime in Haskell (with Agda, GF, Datalog, and Nix)

Hi everyone,

I want to share a small architecture write-up for a project called
QxFx0.

Repository: GitHub - QxFx0/QxFx0: QxFx0: an alternative approach to text generation via typed semantic routing and GF-based rendering. ยท GitHub

QxFx0 is a Russian-language dialogue runtime built around typed,
explicit pipelines.
The goal is not to compete with LLM chat systems, but to explore a
different engineering approach to text generation.

Current stack:

  • SQL: canonical source for runtime schema and lexicon seeds.
  • Haskell: main runtime and orchestration layer (routing, state
    updates, rendering flow, CLI/HTTP).
  • Datalog: relational inference over dialogue facts.
  • Agda: proof-oriented/spec checks for selected invariants.
  • GF: grammar artifacts and runtime mappings for Russian surface
    forms.
  • Nix: reproducible toolchain/environment.

Current flow (simplified):

input text โ†’ Haskell semantic routing โ†’ Datalog inference โ†’
policy/invariant checks โ†’ Haskell AST assembly โ†’ GF-backed surface
rendering

What we have today is a working runtime with explicit boundaries
between layers.
What is still difficult is long-term maintenance of cross-language
boundaries and generated artifacts.

If anyone has experience with similar pipelines, I would appreciate
practical feedback, especially on:

  1. AST/IDL versioning across Haskell + Agda + GF/Datalog,
  2. keeping generated artifacts in sync as schemas evolve,
  3. testing strategies for boundary contracts in polyglot systems.

Thanks.

10 Likes