Add explicit per-plan gauge temperature offset
Test and deploy / test-and-deploy (push) Successful in 1m23s

This commit is contained in:
snowspeeder committed 2026-09-07 07:39:33 -04:00
1 parent d96ed22de1
commit eda3d8e77f
8 files changed
+90 -7

No files matched your search

+6 -2
View File
@@ -10,7 +10,7 @@ import {
} from "@earendil-works/pi-coding-agent";
import { getModelRuntime, noModelError, pickModel } from "./llm.js";
import { computeLedger } from "../shared/ledger.js";
import { buildPlanCurve, curveWarnings } from "../shared/curve.js";
import { buildPlanCurve, curveWarnings, planTemperatureOffsetF } from "../shared/curve.js";
import { formatDuration } from "../shared/time.js";
const SYSTEM_PROMPT = `You are an experienced specialty-coffee roasting coach embedded in a roast-planning app,
@@ -23,7 +23,10 @@ because the raw field is blank. When asked about an event temperature, state its
value and provenance first, then explain limitations. "illustrative" means a planning reference,
not a measured or calibrated prediction; "entered" means a user-entered target, not an actual reading.
Use recordedMilestones and tastingEvidence separately for actual roast measurements. Prefer the
current computed context over stale claims in earlier conversation. Use the supplied timingBreakdown:
current computed context over stale claims in earlier conversation. temperatureOffsetF is the user's
explicit per-plan gauge offset. displayedMilestones already includes it: never apply it twice.
It adjusts illustrative references, with drop derived from adjusted milestones; entered targets,
preheat setpoint and actual readings are not offset. Explain it when discussing these temperatures. Use the supplied timingBreakdown:
process field 3.2 changes DEVELOPMENT duration, not the first-crack anchor.
Never infer worksheet field meanings from their numeric IDs. Answer in Fahrenheit and grams. Never adjust plans based on roaster identity,
learned machine pace, or historical machine temperature medians. Distinguish preheat setpoint
@@ -86,6 +89,7 @@ export function buildPlanChatContext(plan = {}, evidence = null) {
blendComponents: plan.blendComponents ?? [],
afterRoast: plan.afterRoast ?? {},
},
temperatureOffsetF: planTemperatureOffsetF(plan),
displayedMilestones: points.map((point) => ({
event: point.key,
label: point.label,