From 7e0157e45b681b0a31309101bff2fd1f590b7482 Mon Sep 17 00:00:00 2001 From: grokbot_ty Date: Sat, 26 Sep 2026 10:45:28 -0700 Subject: [PATCH] fix(call2): plain text + woodworker tone Review short/long must not show HTML tags; seed now requires plain text only (newlines/- bullets) and practical woodworker copy. parse_call2_response strips residual HTML as a safety net. Seed activation unchanged. --- backend/inference.py | 77 ++++++++++++++++++++++++--------- backend/tests/test_inference.py | 57 +++++++++++++++++------- docs/contracts/PROMPTS.md | 34 ++++++++++----- 3 files changed, 120 insertions(+), 48 deletions(-) diff --git a/backend/inference.py b/backend/inference.py index 719ed99..2ba4f7b 100644 --- a/backend/inference.py +++ b/backend/inference.py @@ -7,6 +7,8 @@ overnight-whole-app: Call 1 POST is hard-disabled (410 call1_disabled). Call 2 s import base64 import hashlib +import html +import re import io import json import time @@ -106,9 +108,17 @@ CALL1_SEED = ( '"feature_tag_ids": [,...], "feature_tag_confidence": <0-1>}' ) CALL2_SEED = ( - "Write WooCommerce listing copy for this slab from the photos and listing facts below.\n" + "Write listing copy for this slab for woodworkers choosing stock for a project. " + "Audience: makers matching wood to a tabletop, bar, bench, or similar build — practical, " + "material/figure/spec-forward. No lifestyle or marketing hype " + "(avoid empty phrases like elevate, stunning, dramatic visual contrast).\n" "You write BOTH the short description and the long description.\n" "\n" + "PLAIN TEXT ONLY (short AND long):\n" + "- Output plain text only. No HTML tags (

,