Zerf home

3 Skill normalize-pms

A how-to: .claude/skills/normalize-pms/SKILL.md.

name: normalize-pms
description: Turns an OPERA Cloud JSON export into standard daily rows (days, groups, maintenance) and keeps every guest-level field out. Use it for every new export before any calculation.

Normalize an OPERA Cloud export

  1. Identify the property and the business date from metadata in the file.
  2. Run: python3 scripts/normalize.py <file> outputs/normalized The script writes days.csv, groups.csv, maintenance.csv and meta.json. It reads only the sections it needs. Guest IDs, reservations, financial details and memberships never reach the normalized files.
  3. If the script stops with "Unknown format" (a new section, a missing section or a new value), do not guess. Write what it reported, propose a mapping for the new field, and stop. A person approves it before it is used.
  4. Never fill a missing value with an estimate. Leave it empty and add a warning.

Standard columns:

  • days.csv: date, occupancy, rooms_available, source_file, occupancy_row, availability_row
  • groups.csv: block, date, allocated, picked_up (allocated is the current block size, picked up is the pickup row of the group grid)
  • maintenance.csv: room, status, created