A House Divided A House DividedDocumentation
↵
Changelog
Game Design/Government & Executive

UK Cabinet System

Last updated 2026-10-29
Source files

Summary#

The Prime Minister appoints and dismisses cabinet ministers directly, with no confirmation vote. Ministers must be player-controlled MPs holding a Commons seat; the governing party or coalition is not a requirement. Each appointment locks the seat for 24 turns, a PM can reshuffle the whole cabinet once per parliament per government, and firing or resignations damage the government's confidence gauge.

Player guide: Cabinet Guide. The general mechanic is also covered in Cabinet, and the country page is United Kingdom. The wider cabinet design is Cabinet.

Location: src/lib/countries/uk/ (src/lib/uk/ holds forwarders to it)

Key files:

Rules#

Cabinet positions#

Cabinet positions are defined in UK_CABINET_POSITIONS (), 20 entries in file order (agriculture_secretary and environment_secretary share order: 12 because their eras are disjoint: agriculture retires in 2001 and hands off to environment via succeededBy):

Order Position ID Name (base) Year Enabled
0 deputy_prime_minister Deputy Prime Minister 1775
1 first_secretary_of_state First Secretary of State 1962
2 chancellor Chancellor of the Exchequer 1775
3 foreign_secretary Foreign Secretary 1775
4 home_secretary Home Secretary 1775
5 defence_secretary Secretary of State for Defence 1775
6 justice_secretary Lord Chancellor & Secretary of State for Justice 1775
7 health_secretary Secretary of State for Health and Social Care 1775
8 education_secretary Secretary of State for Education 1775
9 business_secretary Secretary of State for Business, Energy and Industrial Strategy 1775
10 levelling_secretary Secretary of State for Housing, Communities and Local Government 1775
11 transport_secretary Secretary of State for Transport 1775
12 agriculture_secretary Minister of Agriculture, Fisheries and Food (retires 2001, succeeded by environment_secretary) 1775
12 environment_secretary Secretary of State for Environment, Food and Rural Affairs 2001
13 work_secretary Secretary of State for Work and Pensions 1775
14 northern_ireland Secretary of State for Northern Ireland 1972
15 scotland Secretary of State for Scotland 1775
16 wales Secretary of State for Wales 1964
17 director_of_intelligence Chief of the Secret Intelligence Service 1909
18 chief_whip Parliamentary Secretary to the Treasury (Chief Whip; "Government Chief Whip" before 1830) 1775

Each seat's display name can also change over time within its era (namesByYear, resolved against the live game year, e.g. defence_secretary reads "Secretary of State for War" before 1964). The base names above are the seat's identity, not necessarily the label shown at every year.

Constants#

Constant Value Source
Seat lock after appointment (COOLDOWN_TURNS) 24 turns
Confidence hit, minister fired (CONFIDENCE_HITS.ministerFired) 8
Confidence hit, minister resigned (CONFIDENCE_HITS.ministerResigned) 12 same
Great Office multiplier (GREAT_OFFICE_MULTIPLIER) 2 same
Great Offices (GREAT_OFFICE_POSITION_IDS) chancellor, foreign_secretary, home_secretary same
Confidence range and start 0 to 100, start 100 CONFIDENCE_MIN, CONFIDENCE_MAX, CONFIDENCE_START in the same file
Central titles (UK_CENTRAL_POSITION_IDS) deputy_prime_minister, first_secretary_of_state
Reshuffles allowed 1 per parliament per government

Eligibility rules#

Prime Minister authorization#

Only the current Prime Minister can appoint or dismiss cabinet ministers. This check is enforced by requireCurrentPrimeMinister in , which reads the canonical governmentFormations document (the legacy parliamentaryGovernments document is consulted only when the canonical one is missing entirely). Despite its location, the guard is country-agnostic and is used by other parliamentary cabinets as well.

Minister eligibility#

To be eligible for cabinet appointment:

  1. Must be a player-controlled character holding a Commons seat. Lords and NPPs are not eligible through this flow.
  2. At most two seats, one of each kind (canHoldAdditionalAppointment, ). A minister may hold one departmental portfolio plus one central title (deputy_prime_minister or first_secretary_of_state). Two departments, both central titles, or a third seat are rejected. The unique index on (countryId, characterId, roleSlot) backs this up. Both seats draw on one shared action pool, so a second title does not add actions (reconcileUkSharedPool).
  3. Cannot be the Prime Minister. The PM cannot appoint themselves to an additional position.
  4. Party is not a gate. The PM may appoint any otherwise eligible Commons player, including an opposition MP.
  5. Whip must not be withdrawn. An MP serving a whip withdrawal sits as an independent and cannot be appointed until the whip is restored (whipWithdrawn on electedOfficials).
  6. Cannot hold an incompatible office. A central bank role must be left before joining cabinet.
  7. Era gate. The seat must be active in the live game year (isSeatActive: yearEnabled to yearRetired, ).

Appointment flow#

1. View eligible characters#

GET /api/country/uk/executive/cabinet/characters

Response:
{
  success: true,
  characters: Character[]  // Eligible for appointment
}

2. Appoint minister#

POST /api/country/uk/executive/cabinet/appoint
Body: { positionId: string, characterId: string }

Authorization: requireAuth() + requireCurrentPrimeMinister(db, countryId, userId)

Checks:
1. Position exists in UK_CABINET_POSITIONS and is active in the live game year
2. Position is not the head-of-government seat
3. Character exists, is a player character, and is not holding a central bank role
4. Character holds a Commons seat and does not have the whip withdrawn
5. Character is not PM
6. Position is not already filled
7. Position is not on cooldown
8. Character passes the dual-ministry slot rule (see above)

Effects:
1. Insert record into `cabinetMembers` (shared collection, `countryId: "UK"`)
2. Add career history entry and set the character's `currentOffice` to the cabinet seat
3. Write the 24-turn seat lock to `ukCabinetCooldowns`
4. Clear the predecessor's per-seat setting cooldowns
5. Reset advocacy toggle for territorial secretaries (NI, Scotland, Wales)
6. Reconcile the shared action pool for a holder with two seats

3. Dismiss minister#

POST /api/country/uk/executive/cabinet/fire
Body: { positionId: string }

Authorization: requireAuth() + requireCurrentPrimeMinister(db, countryId, userId)

Checks:
1. Position exists
2. Position is currently filled

Effects:
1. Delete record from `cabinetMembers` (shared collection)
2. The appointment-time seat lock remains in `ukCabinetCooldowns`
3. The minister's `currentOffice` is restored to their Commons seat (or kept on their surviving second cabinet seat)
4. The confidence gauge takes a `ministerFired` hit

Other cabinet routes#

Under /api/country/[code]/executive/cabinet/ (src/app/api/country/[code]/executive/cabinet/), parliamentary countries also expose reshuffle and resign (POST, handled in cabinetApi.ts), acting (POST, a President installs an acting member without confirmation), and whip, whip/withdraw and whip/restore (PM-only party whip withdrawal and restoration, cabinetWhipApi.ts). Per-seat office actions live under [positionId]/....

Cooldown#

Each appointment starts a 24-turn seat lock (COOLDOWN_TURNS in cabinetApi.ts). The lock survives a firing, so the PM cannot immediately refill a seat by cycling ministers. Firing itself is unrestricted.

const COOLDOWN_TURNS = 24;
// Locked for COOLDOWN_TURNS turns from this appointment, keyed to the turn
// number so it tracks game time regardless of wall-clock drift. The wall-clock
// `cooldownUntil` is a display mirror only.
await getUKCabinetCooldownsCollection(db).updateOne(
  { countryId, positionId },
  {
    $set: {
      countryId,
      positionId,
      appointedCharacterId: targetChar._id,
      appointedByPmCharacterId: pmCharacter._id,
      appointedAt: now,
      cooldownUntil: new Date(now.getTime() + COOLDOWN_TURNS * turnLengthMinutes * 60_000),
      cooldownUntilTurn: appointTurn + COOLDOWN_TURNS,
    },
  },
  { upsert: true },
);

Purpose: Prevents rapid hire/fire/re-hire cycles within the same cabinet seat.

Advocacy toggle#

Territorial secretaries (Northern Ireland, Scotland, Wales) have an advocacy toggle that can be activated to advocate for their region. This toggle is automatically reset when a new minister is appointed:

if (["northern_ireland", "scotland", "wales"].includes(positionId)) {
  await getCabinetSettingsCollection(db).updateOne(
    { _id: `UK_${positionId}` },
    { $set: { advocacyActive: false, updatedAt: new Date() } },
  );
}

Reshuffle#

The PM can replace the entire cabinet in one action (reshuffleCabinetHandler, body appointments with at least one entry, no duplicate positions). The limiter keys on (governmentId, parliamentId) from getReshuffleIdentity: parliamentId follows cycle (increments after every lower-chamber election) and governmentId follows the seated PM plus when they were seated. The spent token is stored as reshuffleLog on the governmentFormations document and written with a guard so two concurrent reshuffles cannot both succeed. Per-seat locks are not checked, but incoming ministers get fresh locks, and a reshuffle emits no confidence hit. A caretaker-held seat must be dismissed first.

Data#

Collection Role Player-visible
cabinetMembers Current cabinet ministers (shared across countries, filtered by countryId: "UK"). Written on appoint, fire, resign, reshuffle and transition Yes
ukCabinetCooldowns Seat locks: countryId, positionId, appointedCharacterId, appointedByPmCharacterId, appointedAt, cooldownUntil (display mirror), cooldownUntilTurn (authoritative). Written on appoint and reshuffle Yes, as the "can be reappointed in N turns" message
cabinetSettings Per-position settings; _id is UK_{positionId}, field advocacyActive Yes
governmentFormations Read for the PM; reshuffleLog, cycle, formedTurn used by the reshuffle limit; confidence gauge and history Partly
characters currentOffice and careerHistory updated on appointment and on clearing Yes
electedOfficials Commons seat verification and whipWithdrawn Yes
// Shared cabinetMembers doc shape, filtered by countryId: "UK" for this system.
interface CabinetMember {
  _id: ObjectId;
  countryId: string;
  positionId: string;
  characterId: ObjectId;
  roleSlot?: "departmental" | "central"; // UK only
  characterName: string;
  party: string;
  appointedByCharacterId: ObjectId;
  appointedAt: Date;
  confirmedAt: Date;
  createdAt: Date;
  updatedAt: Date;
}

Cabinet appointments add a careerHistory entry of type appointed with office { type: "ukCabinet", positionId } (other parliamentary countries use parliamentaryCabinet).

Error responses:

Status Condition
401 Not authenticated
403 Not PM, ineligible character, already holds position, not in Commons
404 Character or position not found
409 Position already filled, on cooldown

Configuration#

Setting Default Where set
Roster, yearEnabled, yearRetired, namesByYear, succeededBy Authored table above
Seat lock length 24 turns COOLDOWN_TURNS in cabinetApi.ts (a code constant, not in gameConfig)
Wall-clock lock mirror COOLDOWN_TURNS x turn length in minutes loadTurnLengthMinutes(db) in cabinetApi.ts
Confidence hits and multiplier 8, 12, x2 for Great Offices confidenceGauge.ts
Gauge-driven dissolution Off; on only when the environment variable UK_CONFIDENCE_GAUGE_DISSOLUTION is "1" isConfidenceDissolutionEnabled in confidenceGaugeStore.ts
gameState.manuallyEnabledSeats Empty read by getManuallyEnabledSeats; can enable department seats created by legislation
Era Seat presence follows the live game year isSeatActive in

No feature flag gates the UK cabinet itself.

Timing#

Cabinet changes are player actions through the API, not a turn phase, so appointments and firings take effect immediately. The turn pipeline only touches the cabinet in these places:

  1. Government transition. Whenever unformGovernmentAndVacatePM runs (no-confidence passed, snap election, post-election reset, PM lost their seat), clearCabinetOnTransition () deletes the country's cabinetMembers, withdraws live nominations, deletes cabinetSettings and deactivates active ministerialOrders, restoring each player holder's Commons office. The paired ukCabinetCooldowns delete happens in at the same transitions. This happens in the parliamentaryGovernmentPhases phase or inside the snap-election trigger, before the vacancy watcher runs.
  2. Seat lock expiry. The lock is compared against the current turn on the next appointment attempt. No phase clears it.
  3. Era change. A seat is available only while yearEnabled <= live year < yearRetired, and its display name follows namesByYear.

Worked trace#

Turn 100, modern era, PM is a player, the Chancellor seat is empty and the turn length is 60 minutes.

  1. The PM posts positionId: chancellor, characterId of an opposition MP who holds a Commons seat, is not the PM, has no whip withdrawal, and holds no other cabinet seat. requireCurrentPrimeMinister passes; chancellor is departmental (roleSlotForPosition), so the dual-ministry rule passes.
  2. A cabinetMembers row is inserted with roleSlot: departmental. ukCabinetCooldowns gets cooldownUntilTurn = 100 + 24 = 124 and cooldownUntil = now + 24 x 60 x 60,000 ms, which is 24 hours. The minister's careerHistory gains an appointed event.
  3. Turn 110: the PM fires the Chancellor. The row in cabinetMembers is deleted; the lock stays at 124. chancellor is in GREAT_OFFICE_POSITION_IDS, so the hit is 8 x 2 = 16. From a gauge of 100 that leaves 84 (before any turn-by-turn drift). Had the minister resigned instead, the hit would be 12 x 2 = 24, leaving 76.
  4. Turn 112: the PM tries to name a new Chancellor. The check is cooldownUntilTurn > currentTurn (124 > 112), so the call fails with 409, "can be reappointed in 12 turns". Appointing the same person to a different seat works immediately, because the lock is per seat.
  5. Turn 124: the lock no longer blocks (124 > 124 is false); the appointment goes through.
  6. A passed no-confidence vote at turn 150 runs unformGovernmentAndVacatePM: the cabinet and every lock are deleted, and the new PM starts with an empty cabinet.

Edge cases and limits#

Invariants#

Failure and recovery#

Connections#

Driven by:

Affects:

Related code: (how the PM and government are formed), (office type definitions), (UK country configuration).

Tests#

Gaps: requireCurrentPrimeMinister has no dedicated test; the advocacy-toggle reset on appointment has no named test; the seat-lock clearing in parliamentaryGovernment.ts is not asserted from the cabinet side.

Known issues and history#

Last checked: 2026-10-29, version 1.18.0

Ask