NODEDC_1C/docs/orchestration/active_domain_contract.json

372 lines
16 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"schema_version": "domain_scenario_pack_v1",
"pack_id": "active_phase107_mixed_planner_brain_dogfood_20260615",
"domain": "address_phase107_mixed_planner_brain_dogfood",
"runtime_domain": "planner_autonomy_mixed_boundary",
"title": "Mixed planner-brain dogfood replay",
"description": "Active slice for dogfooding the autonomous agent loop on a compact mixed planner path: living chat guard, counterparty alias grounding, follow-up money flow, net, documents, movement evidence, broad business evaluation, and off-domain recovery.",
"status": "active",
"source_of_truth_policy": {
"purpose": "single mutable domain source for the current orchestration target",
"switching_rule": "when the project switches to another domain, replace this file instead of rewriting the stable agent canon",
"stable_layers": [
"AGENTS.md",
".codex/skills/domain-case-loop",
".codex/agents/domain_analyst.toml",
".codex/agents/orchestrator.toml"
],
"mutable_layer": [
"docs/orchestration/active_domain_contract.json"
]
},
"analysis_context": {
"as_of_date": "2026-06-15",
"source": "phase107_after_phase106_profit_cashflow_margin_next_step",
"known_previous_anchors": [
"phase83_planner_brain_alignment_mix_20260603_live9",
"phase104_generic_role_tail_anchor_hygiene_20260615_p04_loop",
"phase106_profit_cashflow_margin_next_step_20260615_p03_loop"
],
"why_now": "Phase83 passed in the legacy truth-harness format; this pack replays the highest-value mixed planner slice through the current autonomous pack-loop."
},
"target_score": 88,
"bindings": {
"main_organization": "ООО Альтернатива Плюс",
"control_year": "2020",
"svk_counterparty": "Группа СВК"
},
"issue_codes_under_test": [
"technical_garbage_in_answer",
"business_direct_answer_missing",
"business_next_step_missing",
"counterparty_value_flow_misrouted_to_company_profit",
"business_utility_gap"
],
"detectors_under_test": [
"runtime_tokens_in_user_answer",
"capability_ids_in_user_answer",
"first_line_not_direct_answer",
"top_level_scaffold_before_answer",
"limited_answer_without_next_action",
"counterparty_value_flow_required_surface",
"counterparty_value_flow_profit_accounts_forbidden"
],
"agent_audit_expectations": {
"semantic_answer_review_first": true,
"direct_answer_first": true,
"business_utility_required": true,
"selected_counterparty_memory_required": true,
"date_carryover_required": true,
"documents_and_movements_are_evidence_drilldowns": true,
"off_domain_living_chat_must_not_replay_business_context": true,
"technical_garbage_forbidden": true,
"do_not_accept_if": [
"a follow-up over 'нему' loses the selected counterparty",
"a payout or net follow-up loses the 2020 period",
"a counterparty received/paid/net question is answered as company profit",
"document or movement follow-up answers with a fresh clarification instead of reusing the selected counterparty",
"broad business evaluation leaks route ids, capability ids, runtime enums, or debug payload",
"off-domain living chat is hijacked by stale 1C business context"
]
},
"scenarios": [
{
"scenario_id": "mixed_planner_counterparty_evidence_and_living_guard",
"title": "Counterparty memory, evidence drilldowns, business overview, and off-domain guard",
"description": "Validate a compact but cross-cutting planner path: chat sanity, loose counterparty alias grounding, follow-up money flow and net, documents/movements evidence, explicit broad company evaluation, and recovery into ordinary living chat.",
"steps": [
{
"step_id": "step_01_human_smalltalk_sanity",
"title": "Living chat remains human and does not expose discovery internals",
"node_role": "root",
"question": "привет, ты на связи?",
"allowed_reply_types": [
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"human_answer",
"mcp_discovery_gate_sanity",
"meta_smalltalk"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_any": [
"(?i)привет|на связи|готов|помочь"
],
"forbidden_answer_patterns": [
"(?i)mcp|runtime_|query_documents|primitive|route_candidate|capability_id|snapshot_items|answer_object"
],
"criticality": "info"
},
{
"step_id": "step_02_resolve_counterparty_alias",
"title": "Entity resolution grounds the checked 1C counterparty from a loose alias",
"question": "найди в 1С контрагента СВК",
"depends_on": [
"step_01_human_smalltalk_sanity"
],
"allowed_reply_types": [
"factual",
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"entity_resolution",
"alias_grounding",
"followup_anchor",
"planner_catalog_alignment"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_all": [
"(?i)свк",
"(?i)контрагент"
],
"required_answer_patterns_any": [
"(?i)группа\\s+свк",
"(?i)каталог|найден|наиболее вероятн"
],
"forbidden_answer_patterns": [
"(?i)получили|заплатили|нетто|оборот|выручк|сумм(а|ы)",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "critical"
},
{
"step_id": "step_03_incoming_by_resolved_entity",
"title": "Incoming value-flow follow-up reuses the resolved counterparty anchor",
"question": "сколько получили по нему за 2020 год",
"depends_on": [
"step_02_resolve_counterparty_alias"
],
"allowed_reply_types": [
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"entity_resolution",
"incoming_value_flow",
"followup_reuse",
"date_carryover",
"planner_catalog_alignment"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_all": [
"(?i)2020",
"(?i)получил|входящ|поступ",
"(?i)руб"
],
"required_answer_patterns_any": [
"(?i)группа\\s+свк",
"(?i)свк"
],
"forbidden_answer_patterns": [
"(?i)не найден контрагент|уточните, какого контрагента|по какому контрагенту",
"(?i)чист.*прибыл|90/91/99|финрезульт",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "critical"
},
{
"step_id": "step_04_payout_switch_by_resolved_entity",
"title": "Outgoing payment follow-up keeps the same grounded counterparty and checked year",
"question": "а теперь сколько заплатили?",
"depends_on": [
"step_03_incoming_by_resolved_entity"
],
"allowed_reply_types": [
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"entity_resolution",
"payout_switch",
"followup_reuse",
"date_carryover",
"planner_catalog_alignment"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_all": [
"(?i)2020",
"(?i)заплатил|исходящ|списан|платеж|платёж",
"(?i)руб"
],
"required_answer_patterns_any": [
"(?i)группа\\s+свк",
"(?i)свк"
],
"forbidden_answer_patterns": [
"(?i)не найден контрагент|уточните, какого контрагента|по какому контрагенту|за какой год",
"(?i)чист.*прибыл|90/91/99|финрезульт",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "critical"
},
{
"step_id": "step_05_net_after_payout",
"title": "Net-flow follow-up reuses the same grounded counterparty and checked year after payout",
"question": "а какое нетто?",
"depends_on": [
"step_04_payout_switch_by_resolved_entity"
],
"allowed_reply_types": [
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"entity_resolution",
"net_value_flow",
"followup_reuse",
"date_carryover",
"planner_catalog_alignment"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_all": [
"(?i)2020",
"(?i)нетто|сальдо|разниц",
"(?i)получ",
"(?i)заплат",
"(?i)руб"
],
"required_answer_patterns_any": [
"12[ .\\u00a0]?093[ .\\u00a0]?465|12093465",
"(?i)группа\\s+свк|свк"
],
"forbidden_answer_patterns": [
"(?i)не найден контрагент|уточните, какого контрагента|по какому контрагенту|за какой год",
"(?i)чист.*прибыл|90/91/99|финрезульт",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "critical"
},
{
"step_id": "step_06_documents_after_net",
"title": "Document evidence follow-up keeps the grounded counterparty after the net answer",
"question": "а по документам?",
"depends_on": [
"step_05_net_after_payout"
],
"allowed_reply_types": [
"factual",
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"entity_resolution",
"document_evidence",
"value_flow_pivot",
"followup_reuse",
"planner_catalog_alignment"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_all": [
"(?i)документ|счет|счёт|накладн|акт"
],
"required_answer_patterns_any": [
"(?i)группа\\s+свк",
"(?i)свк",
"(?i)2020"
],
"forbidden_answer_patterns": [
"(?i)не найден контрагент|уточните, какого контрагента|по какому контрагенту",
"(?i)сколько получили|сколько заплатили|нетто",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "critical"
},
{
"step_id": "step_07_movements_after_documents",
"title": "Movement evidence follow-up keeps the grounded counterparty after the document answer",
"question": "а по движениям?",
"depends_on": [
"step_06_documents_after_net"
],
"allowed_reply_types": [
"factual",
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"entity_resolution",
"movement_evidence",
"document_pivot",
"followup_reuse",
"planner_catalog_alignment"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_all": [
"(?i)движени|операц|платеж|платёж|списан|поступ"
],
"required_answer_patterns_any": [
"(?i)группа\\s+свк",
"(?i)свк",
"(?i)2020"
],
"forbidden_answer_patterns": [
"(?i)не найден контрагент|уточните, какого контрагента|по какому контрагенту",
"(?i)сколько получили|сколько заплатили|нетто",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "critical"
},
{
"step_id": "step_08_broad_business_evaluation_explicit_org",
"title": "Broad business evaluation stays grounded and bounded after counterparty drilldowns",
"question": "Как ты оценишь деятельность компании {{bindings.main_organization}} по данным 1С?",
"depends_on": [
"step_07_movements_after_documents"
],
"allowed_reply_types": [
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"broad_business_evaluation",
"grounded_summary",
"context_switch_from_counterparty_to_company"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_all": [
"(?i)альтернатива",
"(?i)ограниченн|проверенн|не\\s+аудит|не\\s+аудитор",
"(?i)1с|подтвержд",
"(?i)денежн|долг|ндс|контрагент|операц"
],
"forbidden_answer_patterns": [
"(?i)^\\s*коротко:",
"(?i)чистая\\s+прибыль\\s+подтверждена|аудиторское\\s+заключение",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "critical"
},
{
"step_id": "step_09_off_domain_living_chat_not_hijacked",
"title": "Off-domain living chat is not hijacked by stale business context",
"question": "а чем капибара отличается от утки?",
"depends_on": [
"step_08_broad_business_evaluation_explicit_org"
],
"allowed_reply_types": [
"factual_with_explanation",
"partial_coverage"
],
"semantic_tags": [
"off_domain_living_chat",
"stale_replay_forbidden",
"context_boundary"
],
"required_answer_shape": "direct_answer_first",
"required_answer_patterns_any": [
"(?i)капибар.*утк|утк.*капибар",
"(?i)млекопита|птиц|грызун"
],
"forbidden_answer_patterns": [
"(?i)альтернатива|свк|контрагент|1с|поступлен|платеж|платёж|нетто",
"(?i)route_candidate|primitive|planner_|catalog_|snapshot_items|answer_object|capability_id|mcp_discovery"
],
"criticality": "warning"
}
]
}
]
}