Архитектура: вернуть company activity assessment в address lane и убрать ложный organization anchor из root-scoped carryover

This commit is contained in:
2026-04-18 22:24:41 +03:00
parent 8111586d8d
commit c605fae3a3
12 changed files with 400 additions and 28 deletions
@@ -0,0 +1,250 @@
{
"schema_version": "domain_truth_harness_spec_v1",
"scenario_id": "address_truth_harness_phase14_counterparty_tail_resume",
"domain": "address_phase14_counterparty_tail_resume",
"title": "Phase 14 counterparty-tail replay for late-session authority breadth",
"description": "Alternative AGENT replay built from a different saved-session tail. The scenario validates explicit organization selection, exact counterparty documents, a short-name counterparty follow-up, inventory and account-60 pivots without repeated company loss, old-purchase inventory aging, historical inventory on May 2020, and organization activity analytics at the tail of the same live session.",
"bindings": {},
"steps": [
{
"step_id": "step_01_data_scope_meta",
"title": "Session starts with a human company-scope answer",
"question": "по какой компании мы сейчас работаем?",
"required_answer_patterns_all": [
"(?i)компан|организац|контур",
"(?i)альтернатива плюс|лайсвуд|райм"
],
"forbidden_answer_patterns": [
"(?i)mcp",
"(?i)read_only",
"(?i)snapshot_items",
"(?i)tool_gate_reason",
"(?i)living_reason"
],
"criticality": "critical",
"semantic_tags": [
"data_scope_meta",
"multi_company_entry"
]
},
{
"step_id": "step_02_choose_organization_after_clarification",
"title": "Explicit organization selection fixes the contour for the tail session",
"question": "Альтернатива Плюс",
"required_answer_patterns_all": [
"(?i)зафиксир|работаем по|рабочую организац",
"(?i)Альтернатива Плюс"
],
"forbidden_answer_patterns": [
"(?i)mcp",
"(?i)read_only",
"(?i)не могу определить"
],
"criticality": "critical",
"semantic_tags": [
"organization_authority",
"company_selected"
]
},
{
"step_id": "step_03_counterparty_docs_after_choice",
"title": "Counterparty-documents root becomes exact after company choice",
"question": "по чепурнову покажи все доки",
"allowed_reply_types": [
"factual"
],
"expected_intents": [
"list_documents_by_counterparty"
],
"expected_recipe": "address_documents_by_counterparty_v1",
"required_direct_answer_patterns_any": [
"(?i)чепурнов",
"(?i)документ|поступление"
],
"criticality": "critical",
"semantic_tags": [
"counterparty_root",
"company_selected"
]
},
{
"step_id": "step_04_short_counterparty_followup",
"title": "Short-name counterparty follow-up keeps the correct target and name",
"question": "а по свк",
"allowed_reply_types": [
"factual",
"factual_with_explanation"
],
"expected_intents": [
"list_documents_by_counterparty"
],
"required_direct_answer_patterns_any": [
"(?i)свк|группа свк",
"(?i)документ|поступление"
],
"forbidden_direct_answer_patterns": [
"(?i)уточните организац",
"(?i)контрагент: группа\\s+найдено",
"(?i)mcp"
],
"criticality": "important",
"semantic_tags": [
"counterparty_followup",
"display_label_integrity"
]
},
{
"step_id": "step_05_inventory_today_after_counterparty_tail",
"title": "Inventory pivot after counterparty docs keeps the selected organization",
"question": "а сейчас у нас есть что на складе?",
"allowed_reply_types": [
"factual"
],
"expected_intents": [
"inventory_on_hand_as_of_date"
],
"required_filters": {
"as_of_date": "2026-04-18",
"organization": "ООО Альтернатива Плюс"
},
"required_direct_answer_patterns_any": [
"(?i)на складе|остат",
"18\\.04\\.2026"
],
"forbidden_direct_answer_patterns": [
"(?i)уточните организац",
"(?i)по какой компании"
],
"criticality": "critical",
"semantic_tags": [
"inventory_root",
"cross_domain_pivot"
]
},
{
"step_id": "step_06_open_items_account_60_august_2022",
"title": "Account 60 tails stay exact after the counterparty-to-inventory pivot",
"question": "хвосты покажи по счету 60 на август 2022",
"allowed_reply_types": [
"factual",
"factual_with_explanation"
],
"expected_intents": [
"open_items_by_counterparty_or_contract"
],
"required_filters": {
"account": "60",
"period_from": "2022-08-01",
"period_to": "2022-08-31",
"as_of_date": "2022-08-31"
},
"required_direct_answer_patterns_any": [
"(?i)счету 60|счёту 60",
"(?i)хвост|открыт|не найдено"
],
"criticality": "critical",
"semantic_tags": [
"settlements_account_60",
"late_session_tail"
]
},
{
"step_id": "step_07_inventory_aging_old_purchases",
"title": "Old-purchase inventory aging remains reachable late in the same session",
"question": "Есть ли остатки товара, которые закупались очень давно",
"allowed_reply_types": [
"factual",
"factual_with_explanation"
],
"expected_intents": [
"inventory_aging_by_purchase_date"
],
"required_direct_answer_patterns_any": [
"(?i)стар|давно|ранней первой закупк",
"(?i)остат|закуп"
],
"criticality": "critical",
"semantic_tags": [
"inventory_aging",
"late_session_stability"
]
},
{
"step_id": "step_08_inventory_may_2020_after_aging",
"title": "Historical inventory root restores a concrete month after the aging branch",
"question": "Какие конкретно номенклатуры формируют остаток по складу на май 2020",
"allowed_reply_types": [
"factual"
],
"expected_intents": [
"inventory_on_hand_as_of_date"
],
"required_filters": {
"as_of_date": "2020-05-31",
"period_from": "2020-05-01",
"period_to": "2020-05-31",
"organization": "ООО Альтернатива Плюс"
},
"required_direct_answer_patterns_any": [
"31\\.05\\.2020",
"(?i)позици|остат"
],
"criticality": "critical",
"semantic_tags": [
"inventory_root",
"historical_restore"
]
},
{
"step_id": "step_09_company_activity_age_tail",
"title": "Organization activity age still works at the tail of the mixed session",
"question": "а по Альтернативе Плюс сколько лет активности в базе 1С?",
"allowed_reply_types": [
"factual",
"factual_with_explanation",
"partial_coverage"
],
"expected_intents": [
"counterparty_activity_lifecycle"
],
"expected_recipe": "address_counterparty_activity_lifecycle_v1",
"required_direct_answer_patterns_any": [
"(?i)активност",
"(?i)первая подтвержденная|последняя подтвержденная|лет"
],
"forbidden_direct_answer_patterns": [
"(?i)не найден контрагент",
"(?i)уточните точное наименование организации"
],
"criticality": "critical",
"semantic_tags": [
"organization_activity_age",
"tail_authority_proof"
]
},
{
"step_id": "step_10_company_activity_assessment_tail",
"title": "Tail activity assessment stays business-first instead of collapsing to garbage",
"question": "Как ты оценишь деятельность компании?",
"allowed_reply_types": [
"factual",
"factual_with_explanation",
"partial_coverage"
],
"required_direct_answer_patterns_any": [
"(?i)коротко|активн",
"(?i)операц|заказчик|активност|последняя активность"
],
"forbidden_direct_answer_patterns": [
"(?i)mcp",
"(?i)read_only",
"(?i)tool_gate_reason"
],
"criticality": "important",
"semantic_tags": [
"activity_assessment",
"tail_quality"
]
}
]
}