the "leader = " scope is used for getting the leader in charge of the scope, so use it in the country scope and you'll get the ruler, use it on a planet and you'll get the governor, on a fleet to get the admiral, etc.Additional question, is there a way to define the ruler as a scope? So i can check the ruler traits.
Also would i be correct in assuming that i could set up a modifier in the popmodifiers(EDIT: Empire modifiers would work just as well as capital buildings are empire wide), area that has a scope of Capital_scope and it would check the capital for the condition but apply the modifieronly to the specific pop it's running the checks onEmpire wide?
Also is their one for civic, i have a feeling it's has_civic, but i can't remember for sure.
You could check the capital_scope, no problem, you might need to get to the country first, but I think it works in any scope that is "owned". Remember that the capital scope is for the capital planet and not for any specific building or tile. Using an empire modifier is going to be far kinder on the CPU though.
has_civic does exist, yes, but has not been added to the wiki it seems.