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