{
  "record_type": "normalization_policy",
  "manifest_version": "1.0.0",
  "semantic_id": "dk_cvr_codebook_resolution_policy_v1",
  "dataset": "CVR",
  "scope": [
    "municipality_code_normalization",
    "branche_code_system_resolution",
    "bs_nace_hierarchy_parsing",
    "codebook_snapshot_governance"
  ],
  "municipality_code_policy": {
    "accepted_input_forms": ["101", "0101"],
    "canonical_form": "4_digit_zero_padded_string",
    "example": {
      "raw": "101",
      "canonical": "0101"
    },
    "join_rule": "Normalize before filtering/joining and persist canonical value in outputs."
  },
  "branche_policy": {
    "systems": ["DB07", "DB25"],
    "time_handling": "Treat code system as time-bound; do not collapse DB07 and DB25 without explicit mapping.",
    "required_fields": ["code_system", "code_value", "time_context"],
    "cross_period_rule": [
      "keep native code system per record",
      "apply explicit mapping table for DB07 to DB25",
      "report uncertain mappings"
    ]
  },
  "bs_nace_policy": {
    "code_shape": "6_digit_string_without_required_separators",
    "hierarchy_derivation": {
      "level_1": "first_2_digits",
      "level_2": "first_4_digits",
      "level_3": "all_6_digits"
    }
  },
  "codebook_governance": {
    "strategy": "hybrid",
    "policy": "Use official source links for provenance and local frozen snapshots for reproducibility.",
    "required_local_snapshots": [
      "municipality_codes.vYYYYMMDD.csv",
      "branche_db07.vYYYYMMDD.csv",
      "branche_db25.vYYYYMMDD.csv"
    ],
    "optional_local_snapshots": [
      "db07_to_db25_crosswalk.vYYYYMMDD.csv"
    ],
    "snapshot_metadata_required": [
      "source_url",
      "retrieval_date",
      "code_system_version",
      "checksum"
    ]
  },
  "ai_checklist": [
    "normalize municipality codes to 4-digit strings",
    "detect branch code system from metadata and time context",
    "apply explicit DB07/DB25 mapping when combining periods",
    "resolve labels from local codebook snapshot",
    "log normalization and mapping choices"
  ],
  "official_sources": [
    "https://www.dst.dk/da/Statistik/dokumentation/dansk-branchekode-er-gaeldende"
  ],
  "inherits_from": [
    "/assets/source-manifests/datafordeler/cvr.source.manifest.v1.json",
    "/assets/source-manifests/datafordeler/cvr.access.playbook.v1.json"
  ]
}
