diff --git a/src/lib/ai/prompts/base-system.ts b/src/lib/ai/prompts/base-system.ts index 687bf4e03..631347eb0 100644 --- a/src/lib/ai/prompts/base-system.ts +++ b/src/lib/ai/prompts/base-system.ts @@ -60,8 +60,15 @@ const OUTPUT_LANGUAGE_TOKEN = "{{OUTPUT_LANGUAGE}}"; * prose. They now compose the English body with their language named in the * output clause and the locale's own reply-language directive appended last. * The German and English prompts are byte-identical to 6.1.0 (test-pinned). + * 6.3.0 — the biomarker card joins this prompt. It was the last surface in the + * family composing its own inline scaffold, so it carried none of the contracts + * below and instructed the model to state the value first. The base sections + * are unchanged; the bump exists to re-fingerprint the cached assessments that + * were generated under the old inline prompt, since the per-card input hash + * folds this constant in. The regeneration is one-time and rides the nightly + * warm's existing per-user pacing. */ -export const PROMPT_VERSION = "6.2.0" as const; +export const PROMPT_VERSION = "6.3.0" as const; /** * Base system prompt for the per-metric Insights *assessment* cards. diff --git a/src/lib/insights/__tests__/no-key-fallbacks.test.ts b/src/lib/insights/__tests__/no-key-fallbacks.test.ts index 58b93d395..9f6446cf9 100644 --- a/src/lib/insights/__tests__/no-key-fallbacks.test.ts +++ b/src/lib/insights/__tests__/no-key-fallbacks.test.ts @@ -80,9 +80,12 @@ describe("signal-grounded no-key fallbacks", () => { expect(text).not.toContain("Schnitt von"); }); - it("falls back to the generic tip when no signal is given (mood, en)", () => { + it("falls back to the no-signal floor when no signal is given (mood, en)", () => { const text = getNoKeyMoodStatusText("en"); - expect(text).toContain("Evaluate mood trends over several weeks"); + // The floor states the absence plainly before saying anything else — it + // has no signal to ground against, so it may not imply a read. + expect(text).toContain("No assessment on this one right now"); + expect(text).toContain("Mood reads over weeks"); }); it("falls back to the generic tip when the signal has no finite current (adherence, en)", () => { @@ -90,7 +93,8 @@ describe("signal-grounded no-key fallbacks", () => { "en", signal({ current: Number.NaN }), ); - expect(text).toContain("Consistency in intake matters more"); + expect(text).toContain("No assessment on this one right now"); + expect(text).toContain("Adherence reads as consistency over weeks"); }); it("adherence grounds with a percent value and a routine pointer (en)", () => { diff --git a/src/lib/insights/eval/__tests__/tone-harness.test.ts b/src/lib/insights/eval/__tests__/tone-harness.test.ts index b07e9033a..90ebacf18 100644 --- a/src/lib/insights/eval/__tests__/tone-harness.test.ts +++ b/src/lib/insights/eval/__tests__/tone-harness.test.ts @@ -148,6 +148,7 @@ describe("tone harness — deterministic fallbacks", () => { direction: "higher-better", n: 21, newestDaysAgo: 0, + ...over, } as unknown as MetricSignal; }