Расширить proof matrix маржинальности follow-up replay

This commit is contained in:
2026-05-24 18:23:04 +03:00
parent f69393a887
commit 7cc65e808e
6 changed files with 436 additions and 8 deletions
@@ -0,0 +1,226 @@
{
"schema_version": "domain_scenario_pack_v1",
"pack_id": "agent_inventory_margin_ranking_reliability_20260524",
"domain": "inventory_margin_ranking",
"title": "AGENT | inventory margin ranking follow-up proof",
"description": "Extended proof pack for the agentic semantic loop: missing-period clarification, period carryover, cost-basis follow-up, period expansion, and account-family guard for inventory margin ranking.",
"source_contract_id": "margin_profitability_v1",
"issue_codes_under_test": [
"margin_domain_leak_accounting_route",
"business_next_step_missing",
"technical_garbage_in_answer"
],
"detectors_under_test": [
"margin_domain_leak_accounting_route",
"margin_required_fields_missing",
"margin_next_action_missing",
"margin_payment_document_false_source",
"margin_os_amortization_leak",
"runtime_tokens_in_user_answer",
"capability_ids_in_user_answer"
],
"bindings": {
"first_period": "май 2020",
"expanded_period": "2017 год"
},
"analysis_context": {
"expected_business_answer_contract": "margin_profitability_v1",
"semantic_focus": [
"direct_answer_first",
"period_carryover",
"cost_basis_honesty",
"account_family_guard",
"margin_domain_purity"
]
},
"acceptance": {
"min_score": 90,
"max_unresolved_p0": 0,
"require_all_critical_steps_pass": true,
"must_have": [
"missing period asks for period instead of guessing",
"follow-up period keeps margin intent",
"cost-basis follow-up does not leak technical garbage",
"period expansion keeps inventory margin context",
"account 41 guard does not become fixed-assets analysis"
],
"must_not_have": [
"fixed assets leak",
"amortization leak",
"bank/payment source for margin",
"route or capability ids in user answer"
]
},
"scenarios": [
{
"scenario_id": "inventory_margin_followup_carryover_proof",
"title": "Inventory margin ranking must survive period and evidence follow-ups",
"acceptance_canon": {
"root_step_id": "step_01_margin_root_needs_period",
"primary_user_path": [
"step_01_margin_root_needs_period",
"step_02_period_followup",
"step_03_show_cost_base_lines",
"step_04_expand_period",
"step_05_account_41_not_01"
],
"required_carryover_invariants": [
"intent_scope",
"period_scope",
"answer_shape"
]
},
"steps": [
{
"step_id": "step_01_margin_root_needs_period",
"title": "Root margin ranking asks period instead of guessing",
"question": "Какая номенклатура товара реализована с высокой прибылью, а какая с низкой?",
"node_role": "root",
"paraphrase_family": "colloquial",
"semantic_tags": [
"inventory_margin_ranking",
"needs_period",
"domain_purity"
],
"expected_capability": "inventory_inventory_margin_ranking_for_nomenclature",
"expected_recipe": "address_inventory_margin_ranking_for_nomenclature_v1",
"expected_result_mode": "clarification_required",
"expected_business_answer_contract": "margin_profitability_v1",
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_any": [
"период|месяц|квартал|год"
],
"forbidden_answer_patterns": [
"амортизац",
"объект ОС",
"основн.{0,20}средств",
"банк.{0,80}(источник|достаточ|марж)",
"оплат.{0,80}(источник|достаточ|марж)",
"route_id|capability_id|runtime_|debug"
]
},
{
"step_id": "step_02_period_followup",
"title": "Period follow-up keeps margin intent",
"question": "{{bindings.first_period}}",
"depends_on": [
"step_01_margin_root_needs_period"
],
"node_role": "critical_child",
"paraphrase_family": "short_followup",
"semantic_tags": [
"inventory_margin_ranking",
"period_followup",
"carryover"
],
"expected_capability": "inventory_inventory_margin_ranking_for_nomenclature",
"expected_recipe": "address_inventory_margin_ranking_for_nomenclature_v1",
"expected_result_mode": "ranking_or_limited_accounting_answer",
"expected_business_answer_contract": "margin_profitability_v1",
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_any": [
"май|01\\.05\\.2020|31\\.05\\.2020|2020",
"марж|прибыл|выруч|себестоим|валов"
],
"forbidden_answer_patterns": [
"амортизац",
"объект ОС",
"основн.{0,20}средств",
"банк.{0,80}(источник|достаточ|марж)",
"оплат.{0,80}(источник|достаточ|марж)",
"route_id|capability_id|runtime_|debug"
]
},
{
"step_id": "step_03_show_cost_base_lines",
"title": "Evidence follow-up remains business-readable",
"question": "Покажи найденные строки себестоимостной базы.",
"depends_on": [
"step_02_period_followup"
],
"node_role": "critical_child",
"paraphrase_family": "canonical",
"semantic_tags": [
"inventory_margin_ranking",
"evidence_followup",
"carryover"
],
"expected_result_mode": "evidence_or_honest_boundary",
"expected_business_answer_contract": "margin_profitability_v1",
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_any": [
"себестоим|закупоч|90\\.02|41|не найден|не подтвержд|нет"
],
"forbidden_answer_patterns": [
"амортизац",
"объект ОС",
"основн.{0,20}средств",
"route_id|capability_id|runtime_|debug|query_movements|planner_"
]
},
{
"step_id": "step_04_expand_period",
"title": "Expanded period keeps inventory margin context",
"question": "Расширь до {{bindings.expanded_period}}.",
"depends_on": [
"step_02_period_followup"
],
"node_role": "critical_child",
"paraphrase_family": "colloquial",
"semantic_tags": [
"inventory_margin_ranking",
"period_expansion",
"carryover"
],
"expected_capability": "inventory_inventory_margin_ranking_for_nomenclature",
"expected_recipe": "address_inventory_margin_ranking_for_nomenclature_v1",
"expected_result_mode": "ranking_or_limited_accounting_answer",
"expected_business_answer_contract": "margin_profitability_v1",
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_any": [
"2017",
"марж|прибыл|выруч|себестоим|валов"
],
"forbidden_answer_patterns": [
"амортизац",
"объект ОС",
"основн.{0,20}средств",
"банк.{0,80}(источник|достаточ|марж)",
"route_id|capability_id|runtime_|debug"
]
},
{
"step_id": "step_05_account_41_not_01",
"title": "Account family guard stays on goods not fixed assets",
"question": "Анализ по 41 счету, а не по 01.",
"depends_on": [
"step_04_expand_period"
],
"node_role": "critical_child",
"paraphrase_family": "colloquial",
"semantic_tags": [
"inventory_margin_ranking",
"account_family_guard",
"no_fixed_assets"
],
"expected_capability": "inventory_inventory_margin_ranking_for_nomenclature",
"expected_recipe": "address_inventory_margin_ranking_for_nomenclature_v1",
"expected_result_mode": "same_inventory_margin_context_or_clarification",
"expected_business_answer_contract": "margin_profitability_v1",
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_any": [
"41",
"товар|номенклатур|закупоч|себестоим|марж|прибыл"
],
"forbidden_answer_patterns": [
"амортизац",
"объект ОС",
"основн.{0,20}средств",
"банк.{0,80}(источник|достаточ|марж)",
"route_id|capability_id|runtime_|debug"
]
}
]
}
]
}