Diagnostics engine