Here is the source code of the generator itself: https://github.com/watabou/TownGeneratorOS
and my very old comment about how it all works: https://www.reddit.com/r/proceduralgeneration/comments/668sqb/fantasy_medieval_c...
The only special pcg-related thing there is Voronoi diagram, which I think now is not really necessary. So it's mostly generic geometric stuff and random numbers :)