// The ordered LLM-ability registry. // // `ABILITIES` is the single source of truth for the 8 per-feature LLM abilities. // The engine iterates it in this order: // takeovers → wars → hybrid → economy → industry → nuclear → leaders → ideology // for (a) the system-prompt schema lines + constraint bullets, (b) the per-ability // validate calls inside validateTurnResult, (c) the payload fields in buildUserPrompt, // (d) the ordered apply block inside applyTurnResult, (e) the isMeaningful check, // (f) the runTurn unclear-fallback defaults, (g) the stub's deterministic fields, and // (h) the db.ts state-field migrations. // // Each ability file defines its own `Ability` const (the schema line, constraint // bullet, validator, applier, meaningfulness predicate, stub default, and user-payload // field). This module assembles them into the ordered `ABILITIES` array and re-exports // every public name the engine (and its tests) need. import { takeovers } from './takeovers'; import { wars } from './wars'; import { hybrid } from './hybrid'; import { economy } from './economy'; import { industry } from './industry'; import { nuclear } from './nuclear'; import { leaders } from './leaders'; import { ideology } from './ideology'; import type { Ability, AbilityField } from './types'; /** * The 8 per-feature LLM abilities in their canonical apply order. * The order matters: it determines the order of the schema lines in the * system prompt, the order of the validate calls, the order of the apply * steps, and the order of the payload fields in the user prompt. */ export const ABILITIES: readonly Ability[] = [ takeovers, wars, hybrid, economy, industry, nuclear, leaders, ideology, ]; // ── type re-exports ──────────────────────────────────────────────────────────── export type { Ability, AbilityCtx, UserPromptCtx, AbilityField, } from './types'; // ── shared helpers ───────────────────────────────────────────────────────────── export { resolveNationRef, resolveRegionKey, freshNationId, freshWarId, NEW_NATION_STATS, } from './shared'; // ── war helpers ──────────────────────────────────────────────────────────────── export { activeWarPairs, atWar, syncWarRelations, } from './apply-helpers'; // ── takeovers ────────────────────────────────────────────────────────────────── export { validateTakeovers, applyTakeover, } from './takeovers'; // ── wars ─────────────────────────────────────────────────────────────────────── export { validateWarOps, applyWars, } from './wars'; // ── hybrid ───────────────────────────────────────────────────────────────────── export { validateHybridOps, isHybridOpType, HYBRID_STAT_EFFECT, shiftRelationTowardHostile, applyHybridOp, } from './hybrid'; // ── economy ──────────────────────────────────────────────────────────────────── export { validateEconomyOps, applyEconomyEffects, } from './economy'; // ── industry ─────────────────────────────────────────────────────────────────── export { validateIndustryOps, isIndustryType, applyIndustryEffects, } from './industry'; // ── nuclear ──────────────────────────────────────────────────────────────────── export { validateNuclearOps, applyNuclearOps, } from './nuclear'; // ── leaders ──────────────────────────────────────────────────────────────────── export { validateLeaderOps, } from './leaders'; // ── ideology ─────────────────────────────────────────────────────────────────── export { validateIdeologyOps, } from './ideology';