I looked in the Feature Requests and there are a wide variety of Surname Guessing expansion requests. (Examples: 0003913 Czech, 0008771 Portuguese, 0010996 multiple surname inheritance, 0011729 Given name guessing, 0006979 Lithuanian, 0000614 local recasting) But none seem to point to which section of code handles the rules. None of those examples have advanced past the ‘acknowledged’ stage.
There are expansions that that would be nice for the default guessing scheme. For instance, having the “Name Origin” automatically added would be nice. (I keep forgetting whether American surnames should be patrilineal or patronymic.) I’d like to see something more structured for exposing couverture explicitly during research but using cultural norms in reports.
There are more implications that often need consideration too. Name guessing goes in both directions. Adding a parent to a known person can guess a portion of the eponym’s name: given or surname. Adding a child to a known parent can imply a surname. Plus, could Gramps automatically guess both the common (Given Paternal-namesake Grandpaternal-namesake) & legal/short (Given Paternal-namesake) forms?
But the first step is to find the name-guessing related code. From there, we can explore how easily it can be extended, both in functionality & in the GUI settings.