We define the role of the state: To broadly serve the good (public or otherwise). Within the idea of the public good, it is asked to serve most strongly for its citizens, next most strongly for those within its borders, and next humanity in general. An example of a non-public good the state might preserve would be the environment, whereby too tight a focus on the good of the public is a constraint we do not wish. For the public good we define an entity - the "will of the people", as what the people, in aggregate and as measured by some system (electoral or otherwise), bound by constraints that it should be reasonably consistent and sustainable, compatable with and supporting public virtue (as we understand it), and cognizant of but not overly bound by what we are as a species. We understand that society as a whole, partly but not wholly represented by the state, provides all privileges and standards for relations between people, and that absent those guidelines/standards society and the state set for interpersonal relations, no "rights" or privileges are inherent/necessary in the nature of humanity.
The three scales of responsibility, citizens, denizens, and humanity in general are afforded different concerns for a number of reasons. Citizenship discrimination serves the role of permitting different societies to explore different approaches to government without unduly allowing individuals or entire societies to become parasitic on those differences - a society that provide an excellent educational system or has a very low birth rate, for example is open to wide abuse if it does not differentiate citizens from noncitizens. Likewise, nations typically lack the unconstrained ability to perform police action in areas they do not fully control. As presently there are few or no general advocates of the stateless that provide services, and members of other states typically receive care, a state must care for its citizens specially in order to provide reasonable quality of living - were this to change, these distinctions may also change or disappear.
The will of the people differs from the literal result of desires aggregated by some mechanism both through the specifics of that mechanism (with the character it imports through framing and analysis) and through attempts to correct for deficiencies of character/insight of the people. Rule of law, although not to be taken as an absolute principle, is useful in that with universal jurisprudence it advocates a certain consistency in norms and expectations for people. Combined with proper institutions and traditions, it creates a world where all private citizens, regardless of wealth, family ties, or popularity, face the same societal sanctions for actions that harm society. This differs from mob justice, celebrity-immunity, cronyism, and several other failures that may occur with justice dispensed directly by the community without these traditions/institutions. Likewise, not all members of a population are politically savvy or inclined towards long-term thinking, and ideally a state and society would attempt not to let this fact lead it to poor decisions. This is particularly important in fiscal policy, where the traditional concern that people would irresponsibly bankrupt the state for short-term wealth holds. Finally, we put upon society the obligations of enlightenment liberalism, socialism, education, and secularism, bound into an understanding of individual and societal virtue. Framing of issues has always been an avenue of struggle within all forms of government that require significant support from the governed. Use of both this and seperate representation/institutions to respect the interests of the people, academia (which has its own traditional culture and institutions which should not be managed by the state), and guardians of the mentioned obligations separately and through those tensions, forms the foundation for of the state. We note that we hope to limit or eliminate these differences through education and demonstration of the merits of widespread acceptance of this approach, and that while some institutions represent the dual-mandate/responsibility of the state for the Will of the People and the aggregate desires, both these and the institutions would eventually merge under a liberal-secular socialism.