# Changelog

## v11.4 — Rename: Atlantic Drift → Atlantic Rift (2026-04-18)

### Changed
- **Project renamed.** "Atlantic Drift" is now "Atlantic Rift" across all user-facing surfaces (game title, About page, Impressum, Datenschutz, documentation, Mistral prompt, Matomo site label).
- **Rationale.** "Rift" is the better word for what the game is about: visible, acute, political, consequential. "Drift" is geologic and passive; "Rift" sits on the gradient between Friction and Rupture exactly where the game mechanically lives. And the domain was already `atlanticrift.cc` — the two-word ambiguity cost ConsultD showcase-professionalism every time a visitor mistyped.
- **Preserved.** The event kicker "The Atlantic Rift" (formerly "The Atlantic Drift") still fires on two key UK-narrative events, now as self-referential label rather than title. Domain, codebase IDs, vault-entry names, NC paths renamed to `atlantic-rift/`.
- **Proper HTML head added** to `index.html` — title, description, Open Graph tags. Previously the page had no `<title>` element at all.

### Files affected
- `index.html`, `about.html`, `impressum.html`, `datenschutz.html` — all user-facing strings
- `README.md`, `CHANGELOG.md` — project documentation
- `docs/*.md` — all internal docs, including deploy paths
- `api/mistral-headline.php` — prompt text so Mistral refers to the correct game name
- Archive files (`archive/atlantic-drift_v*.html`, `docs/archive/*-NGINX.md`) kept with old naming as historical artifacts

### Migration note for deployed instance
If you have the old `atlantic-drift/` folder on Nextcloud, it has been renamed to `atlantic-rift/`. All deploy docs now reference the new path. If you already ran the old `rsync` pointing at the old folder, re-sync.


## v11.3 — UK Narrative + Matomo + About + Map Fallback (2026-04-18)

### Added
- **UK scenario events** — three new events modeling the "can EU reattract UK / will it become 51st state" dynamic:
  - `uk-brexit-regret` (EU-pull, triggers at `uk.euAlign > 65`)
  - `uk-special-relationship` (US lock-in, triggers at `uk.usAlign > 80`; also bumps intra-West frictions)
  - `uk-swing-moment` (contested UK creates a fork event depending on which side you play)
- **About page** (`about.html`) — Atlantic Rift framed as an AI-collaboration study. Links to ConsultD, Conversations with Claude, danielpapcke.com, Anthropic. Four bloc sigils (SVG) introduced.
- **Bloc sigils** — clean inline SVG icons for US / EU / China / Russia. Currently displayed on the About page; can be pulled into status strip, briefing badges, and endings in a later pass.
- **Matomo integration** — DSGVO-conservative tracking snippet at bottom of `index.html`. Cookie-less, IP-anonymized, respects Do-Not-Track. Exposes `window.trackGameEvent(category, action, name, value)` for game-level analytics. `endGame()` now emits an event per ending kind. Replace two placeholders (`[YOUR_MATOMO_HOST]` and `[YOUR_SITE_ID]`) in the snippet before going live.
- **Datenschutzerklärung updated** — Matomo section now affirmative (active on this instance), with its privacy-conservative configuration documented.

### Fixed
- **"Map data failed to load"** now shows a real diagnostic panel with probable causes (file:// protocol, missing `vendor/` folder, etc.) plus a **"Play without map" fallback** that replaces the map with a clickable country list grouped by region. Game remains playable if topojson fails to load.

### Balance profile (50 runs × 3 styles)

| Style | Rupture | Win | Avg treasury |
|---|---|---|---|
| reckless | 62% | 38% | -7 |
| cautious | 28% | 72% | +2 |
| diplomatic | 10% | 90% | +44 |

### Security note
- A Mistral API key was shared during this session's chat; it has been treated as exposed and has not been integrated into the frontend. Rotate it before any Mistral work begins and route through a proxy on `darth` per `docs/MISTRAL.md`.

# Changelog

## v11.1 — Bug-Fix + Debt Cascade (2026-04-18)

### Fixed
- **Action buttons no longer lie about tension cost.** Only `Regulatory Pressure` and `Covert Destabilize` show "Tension -1". All other actions (previously falsely labeled with "Tension +1" or higher) are now correctly marked as tension-neutral. Labels match mechanics.
- **Rupture-risk warning** uses the same honest logic — no more false alarms on tech/mil/arms clicks.
- **"Q=undefined"** header bug on final tick — quarter index now bounded.

### Added
- **Debt cascade events** (Daniel's request: Debt → Taxes → Social cuts → Unity loss → Uprisings):
  - `austerity-vs-stimulus` — fires when treasury < -130 and unity still healthy. 50/50 whether government picks austerity (stabilizes treasury, shrinks unity) or stimulus (opposite). Player sees it as a news headline; the choice is implied by the government's response.
  - `domestic-uprising` — eligible when own unity < 30. Mass protests in your capital. Treasury takes a hit, bloc alignment quietly erodes.
  - `rival-uprising` — when the opponent's unity < 30. Your opening, their mess. Subtle realignment gains.
- **Progressive debt stress** — deep debt now erodes Domestic Unity directly (austerity → social cuts → public patience). Below -100: gradual unity drain. Below -150: faster. Below -200: brutal.

### Balance profile (50 runs × 3 styles)

| Style | Rupture | Win | Avg unity | Avg treasury |
|---|---|---|---|---|
| reckless | 72% | 28% | 70/100 | -24 |
| cautious | 30% | 70% | 73/100 | +7 |
| diplomatic | 10% | 90% | 79/100 | +57 |

**Treasury now correlates with play style** (was purely decorative before v11.1).

# Changelog

All notable changes to Atlantic Rift. Versions are quarterly-themed snapshots; the game itself isn't on semantic versioning.

## v11 — Hail-Mary Edition (2026-04-18)

### Added
- **AI behaviour modes**: the rival bloc now picks one of three per-turn modes
  - *normal* (~75%) — rational play as in v10
  - *miscalculate* (~15%) — wastes effort on weaker targets, slight aggression
  - *hail-mary* (~10%) — erratic, big-swing moves, includes destab out of the blue. Logs show `⚡hail-mary` tag.
- **Erraticness tracker** (`state.erraticness[side]`, 0–20) rises when a side goes hail-mary, slowly decays during normal play.
- **Intra-West frictions** — five new events covering survivable Atlantic skirmishes:
  - `atlantic-tariff-row` — steel/machinery tariff disputes
  - `greenland-escalation` — US Navy operations without EU notification
  - `canada-bypass` — EU-Canada deals around Washington
  - `digital-services-retaliation` — DMA vs US firms
  - `atlantic-summit-reset` — release valve; cools tensions and frictions
  - `frictions-boil-over` — threshold event at `intraWestFrictions >= 5`, hits tension once
- **Self-hosted libraries**: D3.js, TopoJSON, and world-atlas are now served from `vendor/` — no third-party CDN calls at runtime. DSGVO-clean.
- **Legal scaffolding**: `impressum.html` and `datenschutz.html` with German DSGVO coverage and clearly-marked placeholders.
- Footer links to Impressum, Datenschutz, Roadmap, Changelog.

### Changed
- **Passive tension cooling** raised from 45% → 55% chance per quarter when tension < 8.
- **Boil-over tension cost** reduced from -2 to -1 (softer but still bites).
- **Atlantic-summit-reset** fires earlier (frictions >= 2, was 3) and more often (weight 3, was 2).
- Hail-mary destabilize tolerance softened (30% chance of destab inclusion, was 50%).
- Hail-mary big-swing bias softened (50%, was 70%).

### Balance profile (50-run simulation, three play styles)

| Play style | Rupture | Win | Avg turns | End tension |
|---|---|---|---|---|
| reckless | 72% | 28% | 13.3 | 2.2/10 |
| cautious | 22% | 76% | 19.1 | 5.3/10 |
| diplomatic | 2% | 98% | 20.9 | 6.8/10 |

---

## v10 — Crawford-Conform Tension (2026-04-18)

### Changed
- **Tension scale expanded** from 1–5 internal to 1–10 internal, still displayed as 5 levels.
- **Actions no longer directly cost tension** except for `Regulatory Pressure` and `Covert Destabilize` (–1 each).
  - All other actions (Diplomatic Capital, Trade Deal, Tech Alignment, Energy Deal, Strategic Investment, Military Support, Arms Deal) are tension-neutral.
  - This is closer to Chris Crawford's original design, where tension rose through *crises*, not routine diplomacy.
- Starting tension is now 8 (was 4 on the old scale, functionally similar to "Friction").
- AI tension budget halved (only coercive tools pay tension).

### Added
- **Rupture warning**: any player action that would drop tension to 1 (game-ending) now shows a confirmation dialog.
- **AI miscalculation mode**: ~15% chance per turn, AI widens target pool and picks slightly more aggressive actions.
- **Domestic Unity stub** (`state.unity`) — visible in the status strip with a "v11 factor" tag. Drifts based on fiscal health, tension, and Unit adoption. Not yet consequential; will constrain AP and crisis options in a future edition.
- **End-turn debounce** to prevent rapid double-click skipping quarters.
- **Rupture ending** rewritten with apocalyptic register — Yeats (*The Second Coming*) and Mark 3:25 epigraphs, atmospheric copy about the post-1945 order closing its books.

### Balance profile

| Play style | Rupture | Win |
|---|---|---|
| reckless | 74% | 26% |
| cautious | 28% | 70% |
| diplomatic | 10% | 90% |

### Why Rupture instead of Rapture

The English word *rupture* and the biblical *rapture* share the Latin root *rumpere* (to break). Rupture is the secular term for what's happening: a breaking apart of the Atlantic order. The ending copy leans into the apocalyptic resonance — Yeats, Mark 3:25, Lincoln's house-divided speech — without preaching.

---

## v9 — First Playable Build (2026-04-17)

### Added
- Full game loop: map, 34 playable countries, 8 Action Points per quarter, 20 quarters total, Rupture / BRICS-Unit / win-lose-draw endings.
- Action system with 9 Instruments of Power.
- Event system with 23 recurring events.
- Crisis system with 5 flashpoint templates.
- Headlines panel, action log, country dossiers.
- Side-switchable briefings (US / EU).
- Natural Earth 1:110m map via TopoJSON, loaded from CDN.

### Known issues fixed in later versions

- **Rupture trigger too easy** (fixed in v10) — a single `Covert Destabilize` at default tension ended the game.
- **No signalling of upcoming rupture** (fixed in v10) — players had no way to see they were one action from losing.
- **AI too passive** (fixed in v11) — rival never took aggressive or unpredictable moves.
- **CDN dependency** (fixed in v11) — ran libraries from third-party CDNs with no fallback for DSGVO deployment.
- **Missing legal pages** (fixed in v11) — no Impressum, no Datenschutzerklärung.
