Case study 02 / 06Open-source Dart package
BranchIQ
A deterministic decision and scoring engine for Dart and Flutter that evaluates bounded decision trees and produces explainable, replayable results.
-
01Input
- Decision tree
- Scoring config
- Safety limits
-
02Evaluation
- Validate
- Score
- Prune
- Traverse
-
03Evidence
- Result
- Trace
- Snapshot + replay
A fixed, synchronous path from validated input to a replayable result.
Product context
Decision logic becomes difficult to trust when runtime behavior is hidden, unbounded, or impossible to reproduce in tests.
Responsibilities
- Designed the package API, evaluation pipeline, safety limits, and debugging model.
- Implemented deterministic validation, scoring, pruning, traversal, replay, and explanation flows.
- Published documentation, examples, tests, and CI workflows for public use.
Technical challenges
- Guaranteeing repeatable results without randomness, system-clock dependencies, or mutable engine state.
- Bounding depth, node count, fan-out, and traversal work to prevent runaway execution.
- Making decisions inspectable through traces, snapshots, and evidence-based explanations.
Engineering decisions
- Keep evaluation synchronous and deterministic.
- Use stable tie-breaking and hard execution bounds.
- Separate recorded evidence from replay and explanation tooling.
Reliability approach
Hard limits, immutable inputs, stable ordering, and regression tests make the same inputs reproducible across repeated evaluation.