From e754979abf7f21d8d102d5c25117ae1a1184f4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 4 Jul 2026 23:33:17 +0200 Subject: [PATCH] feat(ai): allow lists and one bold takeaway in the formatting contract The shared contract banned every structure beyond 1-3 paragraphs, so longer replies read as unformatted blocks. It now asks for short blank-line paragraphs (2-4 on longer replies), permits a plain "- " list when a reply genuinely enumerates three or more parallel items, and one bold key takeaway per reply. The Coach ground rule keeps prose-first; a list is the exception, never the default shape. --- src/lib/ai/coach/system-prompt.ts | 19 +++++++++++-------- src/lib/ai/prompts/shared-contracts.ts | 15 ++++++++++----- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/lib/ai/coach/system-prompt.ts b/src/lib/ai/coach/system-prompt.ts index 0d2c31c2a..d06c0f108 100644 --- a/src/lib/ai/coach/system-prompt.ts +++ b/src/lib/ai/coach/system-prompt.ts @@ -49,9 +49,11 @@ Prompt version: ${PROMPT_VERSION}. GROUND RULES 1. Prose-first. Write the way a thoughtful friend would talk through - the data. No bullet lists in the body unless the user asks for a - checklist; no JSON, no markdown fences, no inline number-dumps. Keep - replies focused — usually 60-180 words, sometimes shorter. + the data, in short paragraphs separated by blank lines. A "- " list + is allowed when the user asks for a checklist or when you genuinely + enumerate three or more parallel items — never as the default shape. + No JSON, no markdown fences, no inline number-dumps. Keep replies + focused — usually 60-180 words, sometimes shorter. 2. Values belong in the evidence block. If a specific number is load-bearing, cite it once in prose ("your last 30 days sit a few @@ -590,11 +592,12 @@ Prompt-Version: ${PROMPT_VERSION}. GRUNDREGELN 1. Fließtext zuerst. Schreib so, wie ein aufmerksamer Freund die - Daten durchgehen würde. Keine Bullet-Listen im Antworttext, sofern - der Nutzer nicht ausdrücklich nach einer Checkliste fragt; kein - JSON, keine Markdown-Fences, keine Zahlen-Aufzählungen im - Fließtext. Halte Antworten fokussiert — meist 60-180 Wörter, - manchmal kürzer. + Daten durchgehen würde — in kurzen Absätzen, getrennt durch + Leerzeilen. Eine "- "-Liste ist erlaubt, wenn der Nutzer nach einer + Checkliste fragt oder du wirklich drei oder mehr parallele Punkte + aufzählst — nie als Standardform. Kein JSON, keine Markdown-Fences, + keine Zahlen-Aufzählungen im Fließtext. Halte Antworten fokussiert — + meist 60-180 Wörter, manchmal kürzer. 2. Werte gehören in den Evidenz-Block. Wenn eine konkrete Zahl die Antwort trägt, nenne sie einmal im Fließtext ("die letzten 30 diff --git a/src/lib/ai/prompts/shared-contracts.ts b/src/lib/ai/prompts/shared-contracts.ts index fdf81a122..5e867e73b 100644 --- a/src/lib/ai/prompts/shared-contracts.ts +++ b/src/lib/ai/prompts/shared-contracts.ts @@ -142,13 +142,18 @@ Schließe, wenn es passt, mit einem kleinen Ausblick, damit sich die Person in d * the shared `ProseBlocks` helper, which turns a blank line into a real * paragraph break — but only if the model emits one. This single fragment asks * for that structure on every narrative surface so a longer assessment reads as - * 1–3 short paragraphs instead of one run-on block. It is whitespace, never - * markup: the grounding verifiers operate on extracted numbers / causal verbs - * and are whitespace-agnostic, so this changes nothing they grade. + * short paragraphs instead of one run-on block. + * + * v1.27.2 — the renderer grew a closed-set list + bold vocabulary (`- ` lines + * become a real `