ДОМЕНЫ - ВОПРОСЫ - ОРРКЕСТРАЦИЯ - БАЗА - Поднять внешний domain-case loop для Codex с baseline/rerun артефактами
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
# ADDRESS Query Docs
|
||||
|
||||
Дата: 2026-04-08
|
||||
Дата: 2026-04-13
|
||||
Статус синхронизации: актуализировано по текущему коду в `llm_normalizer/backend/src/services/*`.
|
||||
|
||||
## Актуальный статус (2026-04-08)
|
||||
## Актуальный статус (2026-04-13)
|
||||
|
||||
- Этап стабилизации закрыт под `strict_policy=route`.
|
||||
- Step-0 pre-prod rails закрыт (reference-domain + nightly automation).
|
||||
@@ -47,8 +47,12 @@
|
||||
- Task Scheduler: `NDC_ADDRESS_Nightly_Regression` временно `Disabled` (ручной режим до стабилизации infra-канала).
|
||||
- Текущий production-контур: `question_mode=address_query`, live-first через MCP.
|
||||
- Следующий этап: `Step-5` Architecture + UX Quality (LLM-first валидация входа, улучшение пользовательского ответа, без расширения domain scope).
|
||||
- Contracts domain increment (2026-04-13):
|
||||
- прямой вопрос об открытых договорах теперь идет в exact-capability `open_contracts_confirmed_as_of_date`;
|
||||
- heuristic `list_open_contracts` сохранен как diagnostic-only слой;
|
||||
- business-view exact-ответа усилен через `net/gross`, split `special_valid` vs `dirty_unresolved` и разрез компонентных остатков.
|
||||
|
||||
## Что реально реализовано в коде (срез 2026-04-08)
|
||||
## Что реально реализовано в коде (срез 2026-04-13)
|
||||
|
||||
Поддерживаемые intents в runtime:
|
||||
|
||||
@@ -60,7 +64,8 @@
|
||||
- `customer_revenue_and_payments` (Wave-1 B3 value, gate-closed)
|
||||
- `supplier_payouts_profile` (Wave-1 B3 value, gate-closed)
|
||||
- `contract_usage_and_value` (Wave-1 B3 value, gate-closed)
|
||||
- `list_open_contracts`
|
||||
- `open_contracts_confirmed_as_of_date`
|
||||
- `list_open_contracts` (diagnostic heuristic)
|
||||
- `list_payables_counterparties`
|
||||
- `list_receivables_counterparties`
|
||||
- `account_balance_snapshot`
|
||||
@@ -83,6 +88,7 @@
|
||||
|
||||
- `address_scenario_matrix.md` - актуальная матрица сценариев `question -> intent -> recipe_id`.
|
||||
- `query_recipes_v1.md` - фактический каталог runtime recipes и их контрактов.
|
||||
- `../../TECH/address_open_contracts_confirmed_as_of_date_spec.md` - exact-spec для домена открытых договоров на дату.
|
||||
- `runtime_readiness_matrix_v1.md` - статус готовности сценариев по текущему коду.
|
||||
- `address_runtime_contracts.md` - актуальный debug/output контракт address lane.
|
||||
- `runtime_integration_plan.md` - фактическая схема интеграции в `assistantService`.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Address Scenario Matrix (V1)
|
||||
|
||||
Дата: 2026-04-02
|
||||
Дата: 2026-04-13
|
||||
Режим: `question_mode=address_query` (отдельно от deep-analysis)
|
||||
|
||||
## Scope
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
| scenario_id | Пользовательский вопрос | intent | required_filters (runtime) | optional_filters | target_entity_family | recipe_id (runtime) | expected_response_type (runtime) | priority |
|
||||
|---|---|---|---|---|---|---|---|---|
|
||||
| AQ-P0-01 | Какие договоры не закрыты на текущую дату? | `list_open_contracts` | - | `as_of_date`, `organization`, `limit` | `ACCOUNTING_REGISTER`, `DOCUMENT`, `NSI_CATALOG` | `address_open_contracts_candidates_v1` | `FACTUAL_LIST` | P0 |
|
||||
| AQ-P0-01 | Какие есть открытые договоры на дату? | `open_contracts_confirmed_as_of_date` | `as_of_date` (`as_of_date` defaulted from period end) | `period_from`, `period_to`, `organization`, `counterparty`, `contract`, `limit`, `sort` | `ACCOUNTING_REGISTER`, `DOCUMENT`, `NSI_CATALOG` | `address_open_contracts_confirmed_as_of_date_v1` | `FACTUAL_LIST` | P0 |
|
||||
| AQ-P0-01H | Покажи кандидаты незакрытых договоров / где спорные хвосты по договорам? | `list_open_contracts` | - | `as_of_date`, `organization`, `limit` | `ACCOUNTING_REGISTER`, `DOCUMENT`, `NSI_CATALOG` | `address_open_contracts_candidates_v1` | `FACTUAL_LIST` | P0 |
|
||||
| AQ-P0-02 | Кому мы должны денег на сегодня? | `list_payables_counterparties` | - | `as_of_date`, `counterparty`, `contract`, `limit` | `ACCOUNTING_REGISTER` | `address_movements_payables_v1` | `FACTUAL_LIST` | P0 |
|
||||
| AQ-P0-03 | Кто должен нам денег на сегодня? | `list_receivables_counterparties` | - | `as_of_date`, `counterparty`, `contract`, `limit` | `ACCOUNTING_REGISTER` | `address_movements_receivables_v1` | `FACTUAL_LIST` | P0 |
|
||||
| AQ-P0-04 | Какой остаток по счету 60 на дату? | `account_balance_snapshot` | `account` (`as_of_date` defaulted) | `as_of_date`, `period_from`, `period_to`, `limit` | `ACCOUNTING_REGISTER`, `CHART_OF_ACCOUNTS` | `address_movements_account_snapshot_v1` | `FACTUAL_SUMMARY` | P0 |
|
||||
@@ -42,19 +43,21 @@
|
||||
- Если mode распознан как `address_query`, ответ строится через whitelist recipe + MCP live path.
|
||||
- Если `shape=EXPLAIN_OR_REASON`, запрос не идет в address lane (handoff в deep-analysis).
|
||||
- Если обязательные фильтры не извлечены, возвращается `LIMITED_WITH_REASON` с `limited_reason_category=missing_anchor`.
|
||||
- Для `open_contracts_confirmed_as_of_date` запрещена silent-подмена на `list_open_contracts`; при недоступности exact-ответа допустим только честный `LIMITED_WITH_REASON`.
|
||||
- Для `account_balance_snapshot` и `documents_forming_balance`:
|
||||
- `as_of_date` берется из `period_to`, если период задан;
|
||||
- иначе default на текущую дату runtime.
|
||||
- Для `documents/bank by counterparty|contract` период по умолчанию не форсируется (all-time), с runtime лимитами и fallback-логикой.
|
||||
- `COMPOUND_FACTUAL_QUERY` пока только детектируется; multi-intent execution не реализован.
|
||||
|
||||
## Runtime status note (2026-04-02)
|
||||
## Runtime status note (2026-04-13)
|
||||
|
||||
Реально реализованы в runtime:
|
||||
|
||||
- `period_coverage_profile`
|
||||
- `document_type_and_account_section_profile`
|
||||
- `list_open_contracts`
|
||||
- `open_contracts_confirmed_as_of_date`
|
||||
- `list_open_contracts` (diagnostic heuristic)
|
||||
- `open_items_by_counterparty_or_contract`
|
||||
- `list_documents_by_counterparty`
|
||||
- `bank_operations_by_counterparty`
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Статус сложных вопросов и карта переиспользования (2026-04-02)
|
||||
|
||||
Файл сохранен под историческим именем `complex_questions_status_and_reuse_map_2026-04-02.md`, но дополнен актуальным обновлением на 2026-04-13.
|
||||
|
||||
Контур: `question_mode=address_query`
|
||||
|
||||
## 1. Что реально есть в коде сейчас
|
||||
@@ -43,3 +45,15 @@
|
||||
1. Закрыть Batch-1 (`Q1..Q7`, `Q28`) на базе уже подтвержденных `R01/R02` + `R03` + часть `R07`.
|
||||
2. После Batch-1 перейти к lifecycle (Batch-2), не смешивая его с risk/аномалиями.
|
||||
3. Каждую пачку закрывать run-pack артефактами и обязательным comparator к baseline.
|
||||
|
||||
|
||||
## 5. Update 2026-04-13: что уже перестало быть только design-layer
|
||||
|
||||
- Класс вопросов про открытые договоры на дату больше не остается чисто heuristic/runtime-gap сценарием.
|
||||
- Для прямого business wording теперь есть отдельный exact-path:
|
||||
- `open_contracts_confirmed_as_of_date`
|
||||
- `address_open_contracts_confirmed_as_of_date_v1`
|
||||
- Это не отменяет диагностический `list_open_contracts`, но меняет его роль:
|
||||
- heuristic-layer теперь служит для diagnostic/triage сценариев;
|
||||
- exact business answer строится отдельным compute-route.
|
||||
- Следующий remaining gap по этому домену теперь лежит не в route existence, а в entity normalization и executive presentation.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# ADDRESS Project Status Rails Graph (2026-04-08)
|
||||
|
||||
Дата среза: 2026-04-08
|
||||
Файл сохранен под историческим именем `project_status_rails_graph_2026-04-08.md`, но дополнен актуальным update-блоком на 2026-04-13.
|
||||
|
||||
Дата базового среза: 2026-04-08
|
||||
Контур: `question_mode=address_query`
|
||||
|
||||
## Граф статуса
|
||||
@@ -65,3 +67,17 @@ flowchart LR
|
||||
- Added debug/log audit fields: `dialog_continuation_contract_v2`, `address_retry_audit`.
|
||||
- Targeted regression after hardening: `246/246` PASS (`assistantAddressFollowupContext`, `addressQueryRuntimeM23`, `assistantAddressLlmPredecompose`).
|
||||
- Living router increment: conversational `chat` mode added for non-data messages with safe fallback to deep pipeline (`assistantLivingRouter 4/4`, `assistantLivingChatMode 1/1`, build PASS).
|
||||
|
||||
|
||||
## Contracts Exact Increment Update (2026-04-13)
|
||||
|
||||
- Для прямого вопроса об открытых договорах введен exact-capability:
|
||||
- `open_contracts_confirmed_as_of_date`
|
||||
- `address_open_contracts_confirmed_as_of_date_v1`
|
||||
- `list_open_contracts` больше не рассматривается как target-route для прямого business question и сохранен только как diagnostic heuristic-layer.
|
||||
- Поверх exact snapshot добавлен business-view:
|
||||
- `net_open_balance`
|
||||
- `gross_open_balance`
|
||||
- split `special_valid` / `dirty_unresolved`
|
||||
- Актуальный targeted gate после increment:
|
||||
- `367/367 PASS` (`addressQueryRuntimeM23 + assistantLivingRouter + assistantWave17 regression`).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Query Recipes V1 (Address Query)
|
||||
|
||||
Дата: 2026-04-02
|
||||
Дата: 2026-04-13
|
||||
Контур: `question_mode=address_query` (live-first, whitelist only)
|
||||
|
||||
## 1) Safe Access Contract
|
||||
@@ -48,7 +48,8 @@
|
||||
| `address_document_type_and_account_section_profile_v1` | `document_type_and_account_section_profile` | профиль типов документов + заполненность разделов учета | - | `period_from`, `period_to`, `organization`, `limit` | `document_section_profile` | `preferred` |
|
||||
| `address_movements_payables_v1` | `list_payables_counterparties` | movement-срез по обязательствам | - | `as_of_date`, `counterparty`, `contract`, `limit` | `movements` | `preferred` |
|
||||
| `address_movements_receivables_v1` | `list_receivables_counterparties` | movement-срез по требованиям | - | `as_of_date`, `counterparty`, `contract`, `limit` | `movements` | `preferred` |
|
||||
| `address_open_contracts_candidates_v1` | `list_open_contracts` | кандидаты незакрытых договоров | - | `as_of_date`, `organization`, `limit` | `movements` | `preferred` |
|
||||
| `address_open_contracts_confirmed_as_of_date_v1` | `open_contracts_confirmed_as_of_date` | подтвержденный срез открытых договоров на дату | `as_of_date` | `period_from`, `period_to`, `organization`, `counterparty`, `contract`, `limit`, `sort` | `open_contracts_confirmed_as_of_balance_profile` | `strict` |
|
||||
| `address_open_contracts_candidates_v1` | `list_open_contracts` | диагностические кандидаты незакрытых договоров | - | `as_of_date`, `organization`, `limit` | `movements` | `preferred` |
|
||||
| `address_open_items_by_party_or_contract_v1` | `open_items_by_counterparty_or_contract` | открытые позиции по party/contract | - (`service guard`: нужен `counterparty OR contract`) | `as_of_date`, `counterparty`, `contract`, `limit` | `movements` | `preferred` |
|
||||
| `address_documents_by_counterparty_v1` | `list_documents_by_counterparty` | документы по контрагенту | `counterparty` | `period_from`, `period_to`, `as_of_date`, `organization`, `limit`, `sort` | `bank_docs` | `preferred` |
|
||||
| `address_bank_operations_by_counterparty_v1` | `bank_operations_by_counterparty` | банковские операции по контрагенту | `counterparty` | `period_from`, `period_to`, `as_of_date`, `organization`, `limit`, `sort` | `bank_docs` | `preferred` |
|
||||
@@ -65,7 +66,8 @@
|
||||
- `document_type_and_account_section_profile`;
|
||||
- `documents/bank by counterparty|contract`;
|
||||
- `open_items_by_counterparty_or_contract`;
|
||||
- `list_open_contracts`.
|
||||
- `list_open_contracts`;
|
||||
- `open_contracts_confirmed_as_of_date`.
|
||||
- Для all-time запросов `documents/bank by *` runtime поднимает limit до max.
|
||||
- Для account intents при явном `account` limit поднимается до `200`.
|
||||
|
||||
@@ -91,6 +93,9 @@ Legacy совместимость:
|
||||
- auto-broaden периода до доступных данных (`period_window_auto_broadened_to_available_data`).
|
||||
- Для `documents/bank by *` при anchor mismatch:
|
||||
- factual fallback на ближайшие строки (`anchor_not_matched_fallback_rows`) вместо silent empty.
|
||||
- Для `open_contracts_confirmed_as_of_date`:
|
||||
- exact недоступность должна заканчиваться `LIMITED_WITH_REASON`;
|
||||
- `list_open_contracts` допустим только как отдельный diagnostic capability, не как silent fallback.
|
||||
|
||||
## 8) Result Modes
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Runtime Integration Plan (question_mode=address_query)
|
||||
|
||||
Дата среза: 2026-04-02
|
||||
Дата среза: 2026-04-13
|
||||
|
||||
## 1) Цель
|
||||
|
||||
@@ -54,7 +54,8 @@ Address lane уже встроен в `AssistantService` и включен featu
|
||||
|
||||
Реализовано:
|
||||
|
||||
- `list_open_contracts`
|
||||
- `open_contracts_confirmed_as_of_date`
|
||||
- `list_open_contracts` (diagnostic heuristic)
|
||||
- `list_payables_counterparties`
|
||||
- `list_receivables_counterparties`
|
||||
- `account_balance_snapshot`
|
||||
@@ -92,6 +93,7 @@ Address lane уже встроен в `AssistantService` и включен featu
|
||||
- Period auto-broaden for by-counterparty/by-contract docs+bank intents
|
||||
- Anchor mismatch fallback для document/bank intents
|
||||
- Contract-docs recovery path через bank-like rows
|
||||
- Для `open_contracts_confirmed_as_of_date` silent degrade в `list_open_contracts` запрещен; при недоступности exact-ответа допускается только `LIMITED_WITH_REASON`.
|
||||
|
||||
## 8) Compound Scope
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Runtime Readiness Matrix V1 (Code Sync)
|
||||
|
||||
Дата: 2026-04-08
|
||||
Дата: 2026-04-13
|
||||
|
||||
Формат: `scenario -> structural_readiness -> runtime_readiness -> blocker`
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
| scenario_id | scenario | structural_readiness | runtime_readiness | current_blocker | next_action |
|
||||
|---|---|---|---|---|---|
|
||||
| AQ-P0-01 | list_open_contracts | STRUCTURALLY_VISIBLE | LIVE_QUERYABLE_WITH_LIMITS | contract candidates зависят от качества movement materialization | усилить contract resolver confidence и стабилизировать non-empty профили |
|
||||
| AQ-P0-01 | open_contracts_confirmed_as_of_date | STRUCTURALLY_VISIBLE | LIVE_QUERYABLE_WITH_LIMITS | exact core работает; остаточный риск теперь в entity normalization и качестве 76-аналитик | усиливать identity quality gates, special/dirty split и executive summary |
|
||||
| AQ-P0-01H | list_open_contracts (diagnostic) | STRUCTURALLY_VISIBLE | LIVE_QUERYABLE_WITH_LIMITS | heuristic shortlist пригоден только для диагностики и не должен подменять exact final output | держать как diagnostic-only capability и не смешивать с exact-path |
|
||||
| AQ-P0-02 | list_payables_counterparties | STRUCTURALLY_VISIBLE | LIVE_QUERYABLE_WITH_LIMITS | broad prompts могут давать sparse/empty | держать curated positive + периодные подсказки |
|
||||
| AQ-P0-03 | list_receivables_counterparties | STRUCTURALLY_VISIBLE | LIVE_QUERYABLE_WITH_LIMITS | broad prompts могут давать sparse/empty | держать curated positive + периодные подсказки |
|
||||
| AQ-P0-04 | account_balance_snapshot | STRUCTURALLY_VISIBLE | LIVE_QUERYABLE_WITH_LIMITS | часть кейсов упирается в account-scope/materialization | продолжить account token/shape audit |
|
||||
@@ -38,7 +39,19 @@
|
||||
| AQ-P1-10 | account_turnover_snapshot | STRUCTURALLY_VISIBLE | UNKNOWN | intent/recipe отсутствуют в runtime | планировать как отдельный домен Step-4 |
|
||||
| AQ-P1-11 | list_documents_by_type | STRUCTURALLY_VISIBLE | UNKNOWN | intent/recipe отсутствуют в runtime | планировать как отдельный домен Step-4 |
|
||||
|
||||
## Sync Notes (2026-04-08)
|
||||
## Sync Notes (2026-04-13)
|
||||
|
||||
- В runtime появился отдельный exact intent для открытых договоров:
|
||||
- `open_contracts_confirmed_as_of_date`
|
||||
- `address_open_contracts_confirmed_as_of_date_v1`
|
||||
- `list_open_contracts` сохранен как diagnostic heuristic-layer и больше не считается целевым final route для прямого бизнес-вопроса об открытых договорах.
|
||||
- Для open-contracts exact добавлен второй business-layer поверх точного snapshot:
|
||||
- `net_open_balance`
|
||||
- `gross_open_balance`
|
||||
- `balance_components[]`
|
||||
- split `special_valid` vs `dirty_unresolved`
|
||||
- Актуальный targeted code gate:
|
||||
- `addressQueryRuntimeM23 + assistantLivingRouter + assistantWave17 regression = 367/367 PASS`.
|
||||
|
||||
- В runtime реализованы by-contract intents:
|
||||
- `list_documents_by_contract`
|
||||
|
||||
Reference in New Issue
Block a user