A Provenance-First Harness for Auditable Bayesian Clinical Trial Design
Abstract
Clinical trial design needs a clear record of which evidence changed the prior and whether the recommendation can be reproduced. We present OpenTrial, a provenance-first harness for Bayesian design of two-arm trials. It retrieves evidence from up to eight public sources and records every source outcome. Only records with an effect estimate and standard error enter the prior; context-only records remain visible but receive no statistical weight. The numerical path is deterministic and covers random-effects pooling, power, prior-predictive assurance, Bayesian decision criteria, Monte Carlo Type I error checks, and group-sequential designs. An optional language model can summarize completed results but cannot alter any calculation. We evaluated the offline workflow on a seeded Type 2 diabetes and HbA1c case built from four synthetic evidence records. They yielded a Normal prior with mean 0.5009 and standard deviation 0.0544. At 80 participants per arm, power was 0.885 and assurance was 0.873. A four-look O'Brien--Fleming design returned a Type I error estimate of 0.0234 against a nominal 0.025 and expected enrollment of 61.6 per arm under the alternative. Assurance fell to 0.183 under a skeptical prior, showing how strongly the recommendation depended on borrowed information. Cross-checks against SciPy and statsmodels reproduced core deterministic results to at least nine decimal places. OpenTrial is a pattern for bounded agency in clinical methods, not a validated clinical tool.