Data UI Backlog

Generate: richer LLM context (examples, prior model, persistence)

Three changes to the :generate-model hook, one theme — context flows from state the user can see and edit:

  1. Every top-level models/*.lisp demo rides the system prompt verbatim (idiom; ~35 KB atop model-reference.md).
  2. A non-empty :model field rides the user message as advisory prior art (erase = fresh start).
  3. The hook be-update=s =:description / :model from the action :data payload before generating, so browser state is what gets stored and prompted.

Implemented 2026-09-27 per generate-context-plan.org (no deviations):

Notes:

Follow-up (same day, Donnie's design): failed-attempt capture in the :model field replaces the earlier embed-the-text-in-the-error experiment (reverted — parse error in model text is a one-line message again, 180-char status cap restored). On validation failure, apply-generated-model-text (now taking the prior model value) writes the failed model with a one-line ;; failed: <error> first line + normal header + cleaned body — only when the field is empty or already starts with ;; failed: = (=failed-model-p); a working model is never clobbered (erase the field to opt in). Writes via be-set-field-value (raw column write — the failed text is invalid, be-update would fail the validation that just failed). Multi-line errors collapse via generate-model-error- line so the marker stays one line. LLM-call failures (no artifact) remain status-only. Bonus: the failed model + error line ride the prior-model block on the next Generate verbatim. Live-smoked all three branches (empty → capture; already-failed → replace; working → untouched).

Slot
28400
Status
60 Done
Tags
mvp, backend, ai
Contributors
Donnie