Planner Autonomy: закрепить bounded inference и semantic bridges

This commit is contained in:
2026-05-01 12:53:21 +03:00
parent 3634404b1c
commit c7c85e9b42
26 changed files with 3496 additions and 55 deletions
@@ -64,6 +64,20 @@ The follow-up consolidation step moved the value-flow planner seams onto the sam
This keeps behavior stable while making the planner's route meaning inspectable through catalog descriptors instead of only through local `recipeFor()` branches.
The next consolidation step strengthened lifecycle as a bounded inference chain instead of a loose age-like shortcut:
- the lifecycle template now declares `activity_window` and `legal_fact_boundary` axes;
- the template summary explicitly frames the result as a first/latest confirmed 1C activity window, not legal registration age;
- planner graph and fallback recipes now emit lifecycle bounded-inference reason codes;
- lifecycle evidence facts include the matched row count, first/latest confirmed activity dates, and an explicit legal-fact boundary.
Two arbitration seams were also hardened because they are part of the same planner-autonomy surface:
- current-turn value-flow aggregate questions can override supported exact legacy routes when the user asks for amount/net/payment totals and the exact route would only produce a narrower lookup/list answer;
- broad business evaluation (`broad_business_evaluation`) is intentionally kept in the deterministic living-chat bridge instead of being displaced by generic metadata discovery.
These changes keep the route fabric broader without letting the planner pretend that inferred evidence is a formally proven legal fact.
## Why This Matters
This reduces the pressure to add one hard route per user wording.
@@ -79,7 +93,7 @@ Domain-specific exact recipes can still exist as fast paths, but they should not
## Validation
Local validation after the catalog-template, value-flow, and metadata-lane scoring consolidation steps:
Local validation after the catalog-template, value-flow, metadata-lane scoring, lifecycle bounded-inference, current-turn value-flow arbitration, and broad-evaluation bridge steps:
- `npm.cmd test -- assistantMcpCatalogIndex.test.ts assistantMcpDiscoveryPlanner.test.ts`: passed, `47 passed`
- MCP-discovery suite: passed, `227 passed`, `9 skipped`
@@ -96,16 +110,27 @@ Additional code-level consolidation:
- planner reason codes now expose when an explicit lane family is scored against carried metadata ambiguity:
`planner_metadata_surface_scored_with_explicit_lane_family`.
Latest validation after the lifecycle and arbitration hardening:
- targeted lifecycle/catalog/planner/answer tests: passed, `75 passed`, `1 skipped`
- full MCP-discovery suite: passed, `268 passed`, `9 skipped`
- broad MCP/living-chat/route/meaning slice: passed, `305 passed`, `9 skipped`
- `npm.cmd run build`: passed
- graphify rebuild: `5912 nodes`, `12833 edges`, `138 communities`
- live lifecycle/value-flow response gate: `address_truth_harness_phase19_mcp_discovery_response_gate_planner_lifecycle_rerun4`, accepted `8/8`
- live broad-eval to net-flow follow-up: `address_truth_harness_phase21_net_followup_after_broad_eval_planner_lifecycle_rerun2`, accepted `3/3`
- live broad-evaluation bridge: `address_truth_harness_phase22_broad_business_evaluation_bridge_planner_lifecycle_rerun2`, accepted `3/3`
## Next Step
The next safe step is to continue from catalog-instantiated known chain templates and first scoring rules into stronger bounded inference templates.
The next safe step is to continue from catalog-instantiated known chain templates, first scoring rules, and lifecycle bounded inference into broader reviewed evidence templates.
Recommended order:
1. lifecycle evidence template with stronger bounded inference semantics;
2. inventory-stock evidence templates only after the generic fabric remains stable under one more replay slice;
3. broaden catalog scoring beyond explicit document/movement lane choice into unfamiliar 1C asks;
4. keep value-flow and metadata ambiguity canaries as Post-F regression gates.
1. promote repeated inventory-stock evidence behaviors into reviewed catalog templates;
2. broaden catalog scoring beyond explicit document/movement lane choice into unfamiliar 1C asks;
3. grow primitive descriptors only where live replay shows a real evidence gap;
4. keep phase19, phase21, phase22, value-flow, metadata ambiguity, and inventory-stock canaries as regression gates.
The key rule remains:
@@ -68,11 +68,14 @@ It now documents a turnaround that is already operational in code, already mater
- the next bounded breadth slice is now replay-backed under Post-F gates:
- inventory stock/provenance/sale-trace pack: `inventory_stock_open_world_breadth_rerun_semantic_integrity_20260501_fix5`, accepted
- live map sync: [19 - inventory_stock_open_world_breadth_proof_2026-05-01.md](./19%20-%20inventory_stock_open_world_breadth_proof_2026-05-01.md)
- Planner Autonomy Consolidation has started:
- Planner Autonomy Consolidation is now active beyond the initial catalog-template cut:
- MCP catalog now carries reusable chain templates in addition to primitive contracts;
- planner route-fabric selection has started moving from local recipe branches toward catalog-instantiated chains;
- value-flow, value-flow comparison, value-flow ranking, lifecycle, metadata, movement, document, and entity fallback branches now expose catalog-template instantiation reason codes in planner output;
- explicit document/movement data-need now scores over ambiguous carried metadata surfaces without forcing neutral follow-ups into a lane;
- lifecycle now behaves as a bounded activity-window inference chain with an explicit legal-fact boundary instead of an unqualified age answer;
- current-turn value-flow aggregate questions can override narrower supported exact routes when the user asks for totals/net/payment amounts;
- broad business evaluation remains in the deterministic living-chat bridge instead of being displaced by generic metadata discovery;
- live map sync: [20 - planner_autonomy_consolidation_2026-05-01.md](./20%20-%20planner_autonomy_consolidation_2026-05-01.md)
Current honest status:
@@ -81,10 +84,11 @@ Current honest status:
- exit-from-danger-zone readiness: `~97%`
- pre-multidomain readiness: `~90%`
- bounded-autonomy foundation readiness: `~89%`
- open-world bounded-autonomy readiness: `~82%`
- open-world bounded-autonomy readiness: `~84%`
- Post-F semantic integrity module progress: `~99%` operationally closed, with remaining risk now treated as next-slice discovery rather than an open blocker inside the closed slice
- active inventory-stock breadth slice progress: `100%` for the declared scenario pack, not for arbitrary inventory questions
- graph snapshot after latest rebuild: `5911 nodes`, `12830 edges`, `138 communities`
- Planner Autonomy Consolidation progress: `~62%` for the declared module, with catalog-fabric, value-flow arbitration, lifecycle bounded inference, and broad-evaluation bridge validated, but broader unfamiliar 1C asks still pending
- graph snapshot after latest rebuild: `5912 nodes`, `12833 edges`, `138 communities`
- current breakpoint:
- the validated hot paths are no longer structurally broken;
- flagship continuity collapse is no longer the primary risk;
@@ -121,6 +125,9 @@ Latest live proof now includes:
- `address_truth_harness_phase52_metadata_movement_full_recovery_planner_metadata_scoring_rerun2` accepted `4/4`, proving metadata-born movement continuation keeps lane choice, organization, and period recovery intact
- `address_truth_harness_phase54_metadata_document_full_recovery_planner_metadata_scoring_rerun2` accepted `4/4`, proving metadata-born document continuation keeps lane choice, organization, and period recovery intact
- MCP planner/catalog consolidation slice accepted locally: `assistantMcpCatalogIndex.test.ts` + `assistantMcpDiscoveryPlanner.test.ts` passed `47/47`, full MCP-discovery slice passed `227/227` with `9` skipped
- lifecycle/value-flow Planner Autonomy response gate accepted: `address_truth_harness_phase19_mcp_discovery_response_gate_planner_lifecycle_rerun4` accepted `8/8`, proving bounded lifecycle inference, current-turn value-flow aggregate arbitration, and sanitized evidence wording
- broad-evaluation bridge continuity accepted: `address_truth_harness_phase21_net_followup_after_broad_eval_planner_lifecycle_rerun2` accepted `3/3` and `address_truth_harness_phase22_broad_business_evaluation_bridge_planner_lifecycle_rerun2` accepted `3/3`
- latest local Planner Autonomy slice accepted: full MCP-discovery suite passed `268/268` with `9` skipped; broad MCP/living-chat/route/meaning slice passed `305/305` with `9` skipped; build passed
Current architectural reading: