This mod makes it so each leader has a "trigger civic." If a civ that can have that leader changes to the leaders trigger civic, the civilization also automatically changes leader to that leader.
For example the first time I tested this I started as Catherine of the Russians, gave myself the Communism tech with World Builder, changed civics to State Property and got this message: "Stalin adopts State Property." Went into the diplomacy screen and saw the picture of Stalin in the center. I was now Stalin.
I had the idea, posted it, Androrc posted the core code that makes it work, I typed it into source with modifications and supporting additions in other files, compiled it, and put it together with xml support and sources in a package and uploaded it.
Later I improved it by adding support for a separate tag for trigger civic rather than using favorite civic, and also did a little xml modding that consolidated civs and redefined trigger civic and favorite civic for the leaders so that each civ would have a progression, updating leaders over time. Further, there is an undersirable start civic "anarchy" that causes all ai civs to switch to despotism on the first turn, so they get their ancient era despotism triggered leader. Then as time goes on and tech allows later civics, all civs update to more modern leaders.
Finally, I turned it into a miniature mod, by adding a bunch of leaders to increase coverage and including better documentation (each leaders Civilopedia entry starts with his or her trigger tech and there is a spreadsheet attached that details them all). All the added leaders use not-completely-ideal recycled art path-raided from official mods, but its enough to cover all the bases I felt needed covering without making this proof of concept a huge download.
Civic Linked Leaders 2016-10-05
Civic Linked Leaders