Ideology / government-type change: a per-nation free-form ideology label (form of government) plus a TurnResult.ideology lever (coups / revolutions / reforms / constitutional changes) with a deterministic -5 stability dip and political narration.
Nation.ideology?: string (optional/additive; no db.ts change — a pre-v0.39 row loads with it absent)
IdeologyChange { target, to } + IdeologyOps { changes }; TurnResult.ideology required, placed between leaders and markers, default { changes: [] }
IDEOLOGY_STABILITY_EFFECT = -5 (the deterministic regime-shift dip)
validateIdeologyOps (exported, defensive, never throws) + applyIdeologyChange applied in applyTurnResult after leaders / before markers; wired into isMeaningful, validateTurnResult, the system prompt, and the runTurn unclear fallback
The change is a third, independent axis (distinct from a takeover rename and a leader swap); similar ideologies are a soft prompt-level compatibility nudge only
The stub never changes an ideology (ideology: { changes: [] }) — e2e (CI, LLM_STUB=1) is unaffected; the path is covered by unit tests
Local checks green: typecheck, lint, 511 unit tests, build.
Fixes #62
Ideology / government-type change: a per-nation free-form `ideology` label (form of government) plus a `TurnResult.ideology` lever (coups / revolutions / reforms / constitutional changes) with a deterministic -5 stability dip and political narration.
- `Nation.ideology?: string` (optional/additive; no `db.ts` change — a pre-v0.39 row loads with it absent)
- `IdeologyChange { target, to }` + `IdeologyOps { changes }`; `TurnResult.ideology` required, placed between `leaders` and `markers`, default `{ changes: [] }`
- `IDEOLOGY_STABILITY_EFFECT = -5` (the deterministic regime-shift dip)
- `validateIdeologyOps` (exported, defensive, never throws) + `applyIdeologyChange` applied in `applyTurnResult` after `leaders` / before `markers`; wired into `isMeaningful`, `validateTurnResult`, the system prompt, and the `runTurn` unclear fallback
- The change is a third, independent axis (distinct from a takeover rename and a leader swap); similar ideologies are a soft prompt-level compatibility nudge only
- The stub never changes an ideology (`ideology: { changes: [] }`) — e2e (CI, `LLM_STUB=1`) is unaffected; the path is covered by unit tests
- Tests: `engine.test.ts` (validate / isMeaningful / applyTurnResult / buildUserPrompt), `protocol.test.ts` (constant + `nationForPrompt`), `db.test.ts` (legacy load + round-trip); every `TurnResult` fixture updated
Local checks green: typecheck, lint, 511 unit tests, build.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #62
Ideology / government-type change: a per-nation free-form
ideologylabel (form of government) plus aTurnResult.ideologylever (coups / revolutions / reforms / constitutional changes) with a deterministic -5 stability dip and political narration.Nation.ideology?: string(optional/additive; nodb.tschange — a pre-v0.39 row loads with it absent)IdeologyChange { target, to }+IdeologyOps { changes };TurnResult.ideologyrequired, placed betweenleadersandmarkers, default{ changes: [] }IDEOLOGY_STABILITY_EFFECT = -5(the deterministic regime-shift dip)validateIdeologyOps(exported, defensive, never throws) +applyIdeologyChangeapplied inapplyTurnResultafterleaders/ beforemarkers; wired intoisMeaningful,validateTurnResult, the system prompt, and therunTurnunclear fallbackideology: { changes: [] }) — e2e (CI,LLM_STUB=1) is unaffected; the path is covered by unit testsengine.test.ts(validate / isMeaningful / applyTurnResult / buildUserPrompt),protocol.test.ts(constant +nationForPrompt),db.test.ts(legacy load + round-trip); everyTurnResultfixture updatedLocal checks green: typecheck, lint, 511 unit tests, build.
Add a per-nation free-form ideology (form of government) field and a TurnResult.ideology lever (coups / revolutions / reforms / constitutional changes) with a deterministic -5 stability dip and political narration. - shared/types.ts: Nation.ideology?: string (optional/additive) - shared/protocol.ts: IdeologyChange / IdeologyOps, IDEOLOGY_STABILITY_EFFECT = -5, TurnResult.ideology (required, between leaders and markers), nationForPrompt now carries ideology - server/engine.ts: validateIdeologyOps (exported, never throws), applyIdeologyChange (resolve -> set field -> -5 dip mirrored to regions + re-derived -> political event), ideology block in applyTurnResult after leaders / before markers, isMeaningful + validateTurnResult + system prompt + runTurn unclear fallback - server/stub.ts: StubPayload gains ideology; deterministicTurn returns ideology: { changes: [] } (never changes one, e2e unaffected) - Tests: engine.test.ts (validate / isMeaningful / applyTurnResult / buildUserPrompt), protocol.test.ts (constant + nationForPrompt), db.test.ts (legacy load + round-trip); every TurnResult fixture updated - package.json -> 0.39.0; CHANGELOG v0.39.0 entry