feat(autoload): add trait detection (refs #4641)