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