Viska · ViskaDB · Design Review

Theme World Expansion

One hierarchical theme registry as the single source of truth — the CIO's four major macro themes as a fixed spine, specific sub-themes underneath, full book coverage, and a stable back-end↔front-end contract that can't silently drift.

CIO rulings applied · 2026-07-10 Spec @ 6957f98 branch feat/theme-world-expansion book 2026-07-10 · $11.9M · 30 positions

The problem — two vocabularies, ~$3M mis-shelved

Two theme systems on one front end

The fund_themes slug world (broker heatmap, positions, theme_world) and the hard-coded 9/10 ALLOC_THEME_META (allocation page) disagree — two catch-alls, one English one Icelandic, mapped in two places. Any rename drifts one side from the other.

Allocation “Annað” dump
$3.06M
26% of NAV · 7 positions
Slug-world “unmapped”
$1.24M
10% · XOM / CVX / RIG

The smoking gun (broker heatmap, #114)

One thesis emitted under two slugs → the same broker showed two different numbers for “the same” theme:

BrokerEUROPE RESURGENCEENDURREISN EVRÓPU
JPM+0.30+0.35
Rabobank+0.45+0.30
UBS+0.62+0.60

Fixed in PR #114 (resolve → collapse-per-broker). This spec removes the root: one vocabulary.

The four majors — CIO core macro thesis (fixed spine)

Every traded asset is assigned to exactly one major and one sub-theme. Because the four are fixed and exhaustive, coverage is guaranteed by construction — an asset always has a major even before its sub-theme is picked. Sub-themes are the dynamic, client-authorable layer.

Málmar
Minerals
15 positions · 60.7%
$7.23M
  • Gold$2.46M
  • Copper$2.26M
  • Aluminum$1.39M
  • PGM$0.45M
  • Silver$0.38M
  • Uranium$0.28M
Orkuframleiðsla
Power Generation
4 positions · 14.0%
$1.67M
  • Oil Majors NEW$1.24M
  • Gas / LNG$0.43M
  • XOM · CVX · RIG folded in
Gervigreind
AI
5 positions · 14.0%
$1.67M
  • AI Power$1.18M
  • Robotization$0.39M
  • Datacenter Cooling$0.10M
Orkuinnviðir
Energy Infrastructure
6 positions · 11.2%
$1.34M
  • Electrical Grid$1.34M
  • Energy Infra

Majors display in Icelandic, sub-themes in English (CIO ruling). NEW = sub-themes that close the current holes. Minerals IS term “Málmar” vs “Steinefni” + Layer-5 sign-off pending (rule #12).

Coverage — before → after

BEFORE
Annað 26%   unmapped 10%   ■ classified 64%

Two vocabularies; ~$3M in catch-alls; XOM/CVX/RIG with no real theme; “Oil Majors” doesn’t exist.

AFTER
Minerals · Power Gen · AI · Energy Infra

unmapped = $0. One registry; every asset = major + sub-theme; catch-all is a monitored zero-target, not a bucket.

Resulting allocation surface — by major (what the client sees)

Minerals
$7.23M · 60.7%
Power Generation
$1.67M · 14.0%
AI
$1.67M · 14.0%
Energy Infrastructure
$1.34M · 11.2%

Drill into any major → its sub-themes (the cards above). Four rows, always complete — never an empty or “Annað” slice.

Broker heatmap — now served by the four majors (CIO directive)

Every theme dashboard is served from the perspective of coverage of the four majors. Broker calls roll up (raw → sub-theme → major); the heatmap becomes Brokers × the four majors. Real rollup, latest report date:

Broker Gervigreind
AI
Málmar
Minerals
Orkuframleiðsla
Power Gen
Orkuinnviðir
Energy Infra
ANZ0.00−0.60
Deutsche Bank+0.63+0.65
HSBC+0.130.00
JPM+0.45+0.75
Rabobank−0.63−0.63
RBC0.00+0.18+0.38
ST−0.48
UBS+0.70
ZeroHedge−0.200.00
bull (signed) bear neutral / 0 no grounded call

Four columns always present — a major with no call reads “no grounded call”, never absent. The granular sub-theme heatmap (PR #114) becomes the drilldown. Out-of-thesis broker themes (de-dollarization, Europe, defense) sit in a separate “broader macro signal” strip — never forced into a major (§11 confirm).

The one stable contract — back end owns it, front end renders it

DB · source of truth

fund_themes registry

slug · name_en · isl_heiti · major · status. Plus resolve_theme_slug — the single mapping point.

DB · derived

rollup views

v_allocation_by_major · v_allocation_by_theme · per-position theme.

FE · read-only

renders the registry

No hard-coded 9/10, no positionTheme() derivation. Language toggle reads name_en / isl_heiti. Add a theme = one row + reload; FE re-renders, zero code change.

Why it can't silently break — monitored invariants

  • INV‑1No held position resolves to unmapped — else it surfaces as a ViskaRes action item, never silent.
  • INV‑2Every front-end theme key is an active registry slug.
  • INV‑3Every active theme has a major ∈ the four.
  • INV‑4Every active theme has a non-empty English name_en.
  • INV‑5theme_categories = exactly the four majors — guards a 5th creeping in without a CIO ruling.

Dynamic authoring (reuse #110/#111)

The four majors are fixed. Sub-themes are live-authorable: the client converses with Mímir → a proposal row → a human confirm promotes it under its major. No deploy.

One law: agent output is a proposal; a human confirm gates anything that moves NAV%. The coverage alert (INV‑1) is what triggers a proposal.

CIO rulings applied 2026-07-10

RESOLVED
  • Robotization → AI; Uranium → Minerals.
  • RIG folds into Oil Majors — no separate Oil Services.
  • Every theme dashboard (incl. heatmap) served by the four majors; sub-themes = drilldown.
  • Language: Icelandic majors, English sub-themes.
RESIDUAL — to confirm
  • Out-of-thesis broker themes (de-dollarization / Europe / defense) → separate “broader macro signal” strip vs excluded from the heatmap?
  • Minerals IS term“Málmar” vs “Steinefni” + Layer-5 sign-off on the four IS names (rule #12).
  • Read-back — “fish” taken as English for sub-themes. Correct?

On approval → writing-plans → Class-C migration (theme_categories + major column + oil themes + rollup views + propose_theme extension), shadow-gated → then the sequenced ViskaFront cutover. Nothing prod-bound until approved and viska-pm pushes.

ViskaDB · design review · book + broker values live from Viska prod 2026-07-10 ($11,906,975 ex-cash, 30 positions). Icelandic majors + English sub-themes per CIO ruling; the four IS major names are attested/in-registry terms, Layer-5 sign-off pending (rule #12). No fresh Icelandic prose coined.