# UNPT CSI sub-index layer config (Phase 1 / PR1).
#
# This file is INHERITANCE-ONLY. Every constant below is a MIRROR of
# configs/csi.v1.yaml and is treated as an ASSERTION the loader checks against the
# authoritative methodology, never an independent source of truth. csi.v1.yaml stays
# authoritative; if the two disagree, loading FAILS CLOSED (raises ValueError).
#
# The smoothing lambda, per-epoch cap, relative bounds, weight, and direction that drive
# the engine are READ from the parent MetricConfig in csi.v1.yaml. The direction and
# raw_priority_weight repeated here exist ONLY so the loader can prove agreement and fail
# closed; they are not consumed independently by the engine.
#
# All numbers are illustrative/provisional until a reproducible production pipeline
# certifies a release.
version: sub-indexes-v1.0.0
index_base: "100"
index_min: "0"
index_max: "200"
output_scale: E8
composition_mode: weighted_sub_index_average
csi_weight_denominator: 101   # inherited from csi.v1.yaml; must not disagree

sub_indexes:
  - id: animal_headcount_index
    public_name: Animal Headcount Index
    parent_metric_id: g20_livestock_population
    canonical_lens: g20
    direction: -1               # inherited from csi.v1.yaml
    raw_priority_weight: 25      # inherited from csi.v1.yaml
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: g20, member_type: country_group, member_id: G20 }
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: country, member_type: country, member_id_template: ISO3 }
      - { id: species, member_type: species, member_id_template: livestock_species }

  - id: animal_agriculture_ghg_index
    public_name: Animal Agriculture GHG Index
    parent_metric_id: animal_agriculture_ghg
    canonical_lens: global
    direction: -1
    raw_priority_weight: 20
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: g20, member_type: country_group, member_id: G20 }
      - { id: country, member_type: country, member_id_template: ISO3 }

  - id: animal_agriculture_land_use_index
    public_name: Animal Agriculture Land Use Index
    parent_metric_id: animal_agriculture_land_use
    canonical_lens: g20
    direction: -1
    raw_priority_weight: 15
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: g20, member_type: country_group, member_id: G20 }
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: land_class, member_type: land_class, member_id_template: land_class }

  - id: animal_product_trade_index
    public_name: Animal Product Trade Index
    parent_metric_id: animal_product_trade
    canonical_lens: global
    direction: -1
    raw_priority_weight: 10
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: g20, member_type: country_group, member_id: G20 }

  - id: livestock_feed_production_index
    public_name: Livestock Feed Production Index
    parent_metric_id: livestock_feed_production
    canonical_lens: global
    direction: -1
    raw_priority_weight: 10
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: g20, member_type: country_group, member_id: G20 }

  - id: animal_product_output_index
    public_name: Animal Product Output Index
    parent_metric_id: animal_product_output
    canonical_lens: global
    direction: -1
    raw_priority_weight: 10
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: g20, member_type: country_group, member_id: G20 }
      - { id: species, member_type: species, member_id_template: livestock_species }

  - id: animal_agriculture_employment_index
    public_name: Animal Agriculture Employment Index
    parent_metric_id: animal_agriculture_employment
    canonical_lens: global
    direction: -1
    raw_priority_weight: 7
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: g20, member_type: country_group, member_id: G20 }

  - id: consumer_transition_index
    public_name: Consumer Transition Index
    parent_metric_id: consumer_transition_score
    canonical_lens: global
    direction: 1
    raw_priority_weight: 4
    canonical_unit: normalised_index
    baseline_strategy: inherited_metric_baseline
    initial_status: provisional
    lenses:
      - { id: global, member_type: scope, member_id: WORLD }
      - { id: g20, member_type: country_group, member_id: G20 }
