feat(simulation): Layer-3 settlement spatial-character enrichment (#956)

Derive and store each placed settlement's spatial character on top of the
#955 placement (D-212/213/214/215). Derivation is pure + integer-deterministic
(D-010); the cascade stays DB-free (D-225) — the enqueuer pre-resolves the
body's system faction onto the work item, like #955's settlements.

- TerritorialStatus (D-212): mapped from the authored dominant_faction
  (territorial_status_from_faction). Adds an AutonomistHeld variant for the
  Compact of Westphalia (self-governing bloc that rejects Assembly authority —
  neither Commission, Corp, Contested, nor truly Frontier). Grounded in
  wiki/factions/. Stored per-province on DrainageBasin.territorial_status
  (uniform per body for now; forward-compatible for per-province faction data).
- PoliticalArchetype (D-214): political_archetype(status, role), status takes
  precedence over economic_role.
- ArrangementPattern (D-215): new 5-variant enum + arrangement_pattern(); the
  block-adjacency *enforcement* stays deferred to the Quarter-skeleton gen (#957)
  — this only derives + stores which pattern applies.
- FoundingOrientation (D-213): existing fn extended with a seed-derived Free
  bearing so pioneer/open-terrain grids vary per seed.

Wiring: dominant_faction threaded through CityContextReader
(read_body_dominant_faction) → atlas proxy (cache-miss read) → AnalyzeBody work
item → run_cascade → run_layer3/match_cities. Enrichment stored on CityPlacement
(political_archetype, arrangement_pattern, founding_orientation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 14:57:09 +02:00
co-authored by Claude Opus 4.8
parent 8b1005221d
commit af60d85d94
9 changed files with 514 additions and 45 deletions
+36 -3
View File
@@ -365,23 +365,56 @@ pub enum FoundingOrientation {
}
/// Territory control status for a province (drainage basin). Priority-ordered derivation.
/// Source: D-212
/// Source: D-212 (amended 2026-06-05 — see `AutonomistHeld` + the dominant_faction
/// mapping note on the variant docs and in `attractor_matching::territorial_status_from_faction`).
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub enum TerritorialStatus {
/// Commission faction_influence ≥ 0.6 in this province.
/// Established central governance — the Concord Assembly or its aligned
/// institutions (e.g. the Veil Institute). (Original D-212: Commission
/// faction_influence ≥ 0.6.)
CommissionControlled,
/// Single corporation faction_influence ≥ 0.5.
/// Commercial control — Syndic combines. (Original D-212: single corporation
/// faction_influence ≥ 0.5.)
CorpTerritory,
/// Two or more factions each ≥ 0.3; no dominant faction.
ContestedZone,
/// No faction with influence ≥ 0.2.
FrontierUnclaimed,
/// Self-governing autonomist bloc that rejects central (Assembly) authority —
/// the Compact of Westphalia and compact-sympathetic systems. Locally
/// governed, but outside the Assembly's reach (D-212 amendment 2026-06-05).
AutonomistHeld,
/// Cultural corridor has indigenous autonomy flag.
IndigenousHeld,
/// Population density < 0.01 AND no faction ≥ 0.1.
Derelict,
}
/// Spatial arrangement pattern governing district adjacency and landmark
/// placement within a settlement (D-215). Derived from `PoliticalArchetype`
/// (+ transit_hub economic role → `HubAndSpoke`). #956 derives and stores which
/// pattern applies; the block-adjacency *enforcement* is the Quarter-skeleton
/// generator's job (#957).
/// Source: D-215
#[derive(Serialize, Deserialize, Clone, Copy, Debug, PartialEq, Eq)]
pub enum ArrangementPattern {
/// Central landmark surrounded by mixed-use rings, transit spokes radiating
/// outward (Commission, Academic).
RadialCore,
/// Restricted campus block in the interior, commercial ring, peripheral
/// worker residential (Corporate).
CampusGrid,
/// Districts string along a linear feature; no dominant center (Pioneer,
/// Industrial).
RibbonDevelopment,
/// Restricted/secured districts at the footprint edge, open interior core,
/// single controlled access per edge (Military).
FortifiedPerimeter,
/// Transit district at center, all others reachable via direct corridors
/// (transit_hub economic role, any archetype).
HubAndSpoke,
}
// ---------------------------------------------------------------------------
// Attractor types for settlement placement (D-195, D-209, D-211)
// ---------------------------------------------------------------------------