RuleKit
Protocol changes add cost and delay to clinical trials. RuleKit explores how teams review eligibility criteria and their amendments.
A 2012 analysis reported an approximately 80-fold decline in new drug approvals per inflation-adjusted R&D dollar since 1950. The authors called the trend Eroom's law. The bars illustrate the direction, not annual cost estimates.
Scannell et al., 2012Clinical trials require site work, participant visits, data collection and review. The protocol specifies how that work should be carried out. A substantial amendment can change documents, systems and site procedures.
Eligibility criteria become checklists, queries and screening decisions. RuleKit makes the encoded interpretation and its changes visible for review. It has not demonstrated lower trial costs or fewer amendments.
Synthetic data. No clinical validation.Scroll to explore
RuleKit
Compare protocol wording, executable rules and synthetic patient results in one review.
RuleKit is a prototype for clinical operations teams and engineers working on trial eligibility. This walkthrough uses invented documents and synthetic patients.
01the clinical side
A 2016 study reported median direct costs of $141K in Phase II and $535K in Phase III for a substantial amendment.
These are amendment costs, not savings demonstrated by RuleKit. The study examined 836 protocols from 15 companies; the direct cost analysis used a subset of 52 protocols.
Sponsors judged 45% of substantial amendments avoidable. That describes the share of amendments, not the share of spending, and does not establish that eligibility logic caused them.
Getz et al., Therapeutic Innovation & Regulatory Science, 2016
“At least 30” includes 30. “Over 30” does not.
Compare the source criterion with its checklist or query, then test the boundary.
A criterion may include a threshold, timing requirements and clinical judgement. Each needs to be represented explicitly or recorded as unmodeled.
The amendment adds an exclusion. Review the resulting rule set and the affected synthetic cases together.
02the engine
Each YAML rule stores the protocol sentence alongside its executable interpretation.
the engine · criterion representation
The synthetic criterion becomes a comparison: fact egfr, operator gte, value 30.
“eGFR at least 30 mL/min/1.73m²”
Version control records changes to the wording and logic. It does not establish which version a site is authorized to use.
the engine · idea one
Without eGFR, the renal criterion returns unknown.
02the engine · idea two
An inclusion requires eGFR ≥30. An exclusion applies below 45.
rule 1 inclusion
"eGFR at least 30" passes the inclusion at 30 and above.
rule 2 exclusion · added in v3.1
"eGFR below 45 at screening" triggers the exclusion below 45.
boundary result
At eGFR 30, this example passes the inclusion and triggers the exclusion in both views.
02the engine · idea three
The CLI report and workbench share the evaluator and attrition logic.
chapter 03 · the AI part
Source quotes and human review precede evaluation.
03the AI part
An LLM can propose facts from a note. Each proposal must include an exact source quote and receive human confirmation before evaluation.
The note and patient here are synthetic. A matching quote supports review; it does not prove the proposed value is clinically correct.
Synthetic note and patient
CLINICAL CORRELATION
She reports marked limitation of physical activity, comfortable at rest, with breathlessness on climbing a single flight of stairs; symptoms consistent with NYHA class III heart failure. She was hospitalized for decompensated heart failure in November 2025.
chapter 04 · what exists
Trace each cohort result. This example contains ten synthetic patients: seven ineligible, three undetermined and none eligible. Open a result to inspect failed criteria and unresolved evidence. These counts describe the demo cases, not a trial population.
04what exists
The repository includes a rule engine, CLI reports, an amendment workbench and a fact review component. Bundled demos use synthetic patients and need no account or live model call. There is no EHR connector.
automated regression suites configured for pushes and pull requests
trial rule packs. COMMANDER HF uses public registry text: 12 criteria, 8 executable (2 explicitly partial), and 4 unmodeled.
synthetic patients: 100 generated records and 10 hand-written edge cases.
a CLI report and an interactive workbench with five views, including patient traces and amendment comparison
Automated regression tests cover the engine and interfaces. Real screening workflows and language coverage still need evaluation with clinical teams.
05the build
The next evaluation needs clinical operations experience: realistic screening steps, ambiguous criteria and amendment review requirements.
Development so far uses public registry text and synthetic patients. The project has not been evaluated in a real screening workflow.
The draft rule format defines behavior that the engine can be checked against. The repository includes regression testskeep fixed bugs fixed for boundary cases and earlier implementation errors. Three examples:
A useful next step is one trial pack reviewed with a clinical operations collaborator, including an explicit record of criteria that remain unmodeled.
chapter 06 · close
Source criteria and reviewed facts feed the evaluator. The report and workbench expose the resulting traces.
06close
Clinical operations and trial managers: review a public or invented criterion and help define a useful amendment review. Engineers: inspect the rule format, traces and tests. clinical and engineering review
Inspect ten synthetic patients in your browser. No account required.
Explore the 3D walkthrough. Requires WebGL2; a reading version is available.
Each criterion returns pass, fail or unknown.
models propose·humans confirm·rules evaluate
AI-proposed facts stay outside evaluation until a person confirms them.
rulekit · Apache-2.0 · set in Public Sans, Spline Sans Mono & Martian Mono
Trial pack source criteria: ClinicalTrials.gov