Fuaranfuaran

The source for generative UI

Errors that enumerate the fix

Last reviewed: July 2026.

The naive AI feedback loop is: emit code, watch it fail to compile, read the error string, re-emit. Each iteration costs a model call, and the error was written for a human – the model must reason its way from "unexpected token" to "what was I supposed to do instead."

Fuaran's edit operations return something different. Every structural edit – change a property, replace a binding, insert or move a node – returns either a new tree or a structured error envelope that names the failure and enumerates the valid alternatives. Misspell a property path and the envelope carries the failing operation, the attempted path, and the complete list of paths that would have succeeded:

{
  "kind": "error",
  "tag": "pathNotSupportedYet",
  "attemptedPath": "lable",
  "supportedPaths": ["label", "value", "tone", "weight", "emphasis", "onLoading", "onEmpty"]
}

The recovery loop this enables is qualitatively different from "retry until lucky": read the attempted path, string-distance-match it against the supported list, reissue. For most defects – typos, wrong slot names, out-of-range indices – the correction is unambiguous enough to happen without another model call. The error is not a diagnostic; it is a machine-usable menu.

This is a design discipline, not a single feature, and it repeats at every boundary in the language:

  • Structural edits enumerate supported paths, legal slot names, addressable child indices.
  • Field writes (see Declared, not scraped) reject with the supported values – and for closed value spaces, the legal values are projected up front, so the defect is forestalled rather than recovered.
  • Wire decoding (see Default-deny by shape) refuses with a stable code, a path, and a deterministic first-error order every host reproduces.
  • Design-conformance violations (see Verified without screenshots) return a declared-versus-actual diff with a repair hint in the design contract's own vocabulary.

One vocabulary of recoverable envelopes, four boundaries. The pattern matters more than any instance: a language that expects AI authors must budget for AI mistakes, and the cheapest mistake is one whose correction is enumerated in the rejection. Every error that recovers mechanically is a model round-trip that never happens – which is both a latency win for the user and a cost win for whoever pays for the tokens.