feat(prompts): 建材 system.md/company_facts.md 双要改写——话术池/原则节/App反向留资/互留句/提醒配合全量对齐
计划外裁量(1 处): tests/test_site_import_template.py test_固定段行级来源 补 DUAL_ASK_DIVERGED 豁免清单——jiancai 双要演化后模板按 spec §3.4 有意 保持分步双要出厂,19 行联系方式话术分叉按特征子串豁免,其余行仍受 ≤8 阈值 守护(不豁免则该测试 19>8 必红,spec 冻结模板与全量绿冲突的唯一解)。 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -46,3 +46,40 @@ def test_app_reverse_ask_dual_and_synced():
|
||||
app = w["no_contact"]["app"]
|
||||
assert "and email" in app
|
||||
assert app in w["reminders"]["contact_ask"]["app"]
|
||||
|
||||
|
||||
# ---- system.md / company_facts.md 侧 ----
|
||||
|
||||
def _md(name: str) -> str:
|
||||
return (SEED / "prompts" / name).read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_system_md_dual_ask_principle_and_pool():
|
||||
src = _md("system.md")
|
||||
assert "双渠道一次要齐" in src
|
||||
assert "WhatsApp and email" in src # en 话术池
|
||||
assert "WhatsApp和邮箱" in src # zh 话术池
|
||||
# 邮箱轻补两条逐字句原文存活(与引擎 email_light 模板逐字一致)
|
||||
assert ("Got it! And an email address would help too — our manager "
|
||||
"will send the formal quotation PDF there.") in src
|
||||
assert "收到!邮箱也留一个呗?客户经理把正式报价单 PDF 发你邮箱。" in src
|
||||
|
||||
|
||||
def test_app_reverse_ask_line_matches_wall():
|
||||
w = _wall()
|
||||
assert w["no_contact"]["app"] in _md("system.md") # L214 与 wall 一字不差
|
||||
|
||||
|
||||
def test_company_facts_dual_ask():
|
||||
assert "WhatsApp 和邮箱" in _md("company_facts.md")
|
||||
|
||||
|
||||
def test_deflections_no_either_or_wording():
|
||||
"""负向锚: 首次索要池不得回退二选一措辞(en "or email"/zh "或邮箱"/es "o correo")。"""
|
||||
w = _wall()
|
||||
for s in w["deflections"]["en"]:
|
||||
assert " or email" not in s
|
||||
for s in w["deflections"]["zh"]:
|
||||
assert "或邮箱" not in s
|
||||
for s in w["deflections"]["es"]:
|
||||
assert "o correo" not in s.lower()
|
||||
|
||||
Reference in New Issue
Block a user