ucm-reason
The reasoning brain of Unified Context Management (UCM) — impact analysis, test intent, and explanation chains.
ucm-reason answers the questions that make a knowledge graph actionable:
- What changed?
- What is impacted? — reverse BFS over the dependency graph, decaying confidence at each hop
- What is not impacted? — and why (equally important for scoping)
- What should be tested? — test intent grouped into confidence tiers
- What is uncertain? — ambiguity detection (source conflicts, stale data, requirement drift)
- Why? — every output carries an
ExplanationChainofReasoningSteps (evidence → inference → confidence)
What it does
impact—analyze_impact()runs a reverse breadth-first search from the changed entities, attenuating confidence by graph distance, and classifies results into direct/indirect impacts plus an explicit not impacted set.intent—generate_test_intent()turns an impact report into must-test / should-test tiers, key risks, coverage gaps, and "decided not to test" rationale.explanation— human-readable derivation chains (to_narrative()).ambiguity— flags low-confidence edges, stale data, and source conflicts.
Quick example
use ;
use ;
Why these models
| Model | Problem it solves | Without it |
|---|---|---|
| Noisy-OR | Multiple weak signals → one score | Naive multiply (0.8 × 0.7 = 0.56) is over-pessimistic; Noisy-OR gives ≈ 0.94 |
| Temporal decay | Facts go stale at different rates | A two-year-old edge weighs the same as yesterday's |
| Chain confidence | Impact attenuates with distance | A 10-hop transitive dep looks as risky as a direct import |
Research foundations
- Change awareness — Meta Predictive Test Selection (ICSE-SEIP 2019): impact attenuates with dependency-graph distance; 33% of tests caught 99.9% of failures.
- Scale of impact — Google TAP: beyond ~10 hops, testing approaches a 99:1 noise-to-signal ratio.
License
MIT — see LICENSE.