The city is in the middle of a dukedom. The duke is the highest authority; there is no king to whom he answers. The dukedom is afflicted by subinfeudation. There are any number of local nobles with power and resources to rival the duke's - or at least, there have been. We pick up our story at the long-awaited culmination of the duke's efforts to take control of his fief, dealing one at a time with nobles who were more or less in open revolt. Specifically, we pick up on the eve of a battle which, if won, will force the last intransigent nobles to submit to the duke's authority.
The city has a charter from the duke, making it an independent political entity. It's still under his authority, but enjoys certain privileges: it's governed by its own laws and its own magistrates, and the duke can't (easily, legally) interfere with internal matters. The city does have to furnish the duke with tribute and military resources, but the requirements are fixed at a relatively low rate. This arrangement has worked out very much in the duke's favor as he worked to take control of his territory. The city very much prefers a strong duke, because the duke can be expected to abide by the charter; upstart lesser nobles have sometimes influence city politics illegally or extralegally, and even raided or besieged the city to force concessions or pocket loot. In addition, the city benefits most from contact with the outside world, as its economy is based on manufacture and trade. The rural fiefdoms benefit as well, of course, but not as much, and in ways that don't always benefit the local lords directly. In short, the city has been a staunch supporter of the duke during his military adventures against his rebellious vassals, and as the conflict ends the citizens are looking forward to increased order and prosperity.
City politics are complex. In fact, outsiders used to feudal simplicity frequently use the word "insane" or "unworkable." The government is composed of a web of magistracies and assemblies, each with extensive power within a specific portfolio, and relatively little oversight from other branches.
Firstly, there are three types of citizens: after the Roman model, let's think of them for the moment as Patricians (city fathers), Equestrians (knights), and Plebs (commons). They're all citizens, but they have very different rights, privileges and responsibilities. Patricians are extremely privileged in city law. All the most powerful magistracies are open to them. They enjoy all sorts of rights - by custom - regarding their persons and property. For instance, they may only ever be placed under house arrest, regardless of circumstances. They're likely to be granted trial very quickly, and their trial is very likely to be fair (since it's being arranged and observed by other patricians who would want their trial to be fair). They're traditionally addressed as "your honor." Patrician status is almost entirely hereditary; you have to be born or married into a Patrician family.
Patricians don't technically have a lot of formal obligations to the city. However, there is a strong tradition of service, and while a Patrician who doesn't live up to it won't face legal consequences, the other Patricians will do everything in their power to give that individual their comeuppance socially.
Probably the greatest power of the Patricians is automatic membership in the Patrician Assembly, which can veto any action of any other part of the city government by simple majority vote.
Equestrians are the "upper middle" class. The name may or may not be misleading; I'll need to make a decision about the relative scarcity of heavy cavalry in this setting. It may not make sense for their to be an entire class of city dweller below the Patricians who have the resources to outfit a horse. In any event, the idea is that Equestrians are people who have the resources necessary to personally contribute substantially towards the military defense of the city. They can outfit themselves as horsemen, or afford money for arms and armor and time for training to become elite infantry. As such, it's theoretically a property class, but not always. First, you have to apply to become Equestrian, which means that you can have wealthy Plebs who never bother; this is looked down upon, since it means that you refuse to take responsibility for defending the city. Second, you can be refused Equestrian status if you're a criminal or aren't deemed "honorable," which in some instances means that it boils down to politics. Third, Equestrians tend to look out for other Equestrians, so if your family is respectable enough, the authorities will tend to look the other way if you no longer meet the property qualifications, as long as you can keep appearances up. This can get very awkward all around when the Equestrians are actually called upon to take the field, and a lot of "fake Equestrians" invariably get exposed and ousted at those times. There is a committee in charge of overseeing Equestrian membership, and they're both a very powerful and very corrupt branch of the city government, very prone to playing favorites.
Equestrians aren't as privileged or deferred to as Patricians, but they're entitled to justice in courts administered by other Equestrians, and they can hold many of the magistracies, though none of the most powerful. They also, fittingly, have a great deal of influence over military matters. If the assembly of the Equestrians votes to with an overwhelming majority, they can veto an action of any magistrate - pending a vote by the Patrician Assembly to upheld the Equestrian veto.
Equestrians are usually addressed as "Sir" (for men) or Madam (for women).
Last are the plebs. The plebs are everybody else. There are prosperous plebs, there are accomplished plebs, there are honored plebs, but they're still plebs. A prominent pleb may socialize with an Equestrian or even, occasionally, a Patrician, but there will always be a feeling of condescension, however subtle. Plebs can hold only the most junior magistracies, usually in roles reporting directly to another magistrate. They enjoy certain legal protections as citizens: their property can't be seized without due process, for instance, and they can't be prevented from speaking or taking part in the Pleb's Assembly. The only justice they have access to is the justice of the magistrates, however, administered by Patricians. Any able-bodied individual is subject to conscription in the event of war.
The only political power of the plebeian class is the Pleb's Assembly. The Assembly can render judgment on certain types of legal cases involving only plebs, and it can issue a formal statement or appeal to any magistrate or to the other Assemblies. It also administers plebeian conscripts, though it has to take direction from the Equestrian Assembly and certain magistrates in that regard.
Plebs are usually addressed as "Mister" or "Ma'am." Not sure about that "Ma'am" since it's just a shortened form of "Madam," but it has the right feel.
Some magistracy ideas:
Consuls - had veto power, conducted policy under direction of Senate.
Praetor - conducted minor matters of state under direction of Senate. Power of judgment.
Quaestor - treasurer, effectively. Disbursed and oversaw use of public funds.
Aedile - infrastructure. Oversaw buildings and festivals.
Censor - public morality, finances, census.