fairroom-revpar-statistics
v0.1.0
Published
Fairroom RevPAR Statistics: works out occupancy, ADR and RevPAR by day and month from daily room figures, flags impossible days and gaps, and compares with the manager's report. Drafts the monthly summary; a person sends it.
Maintainers
Readme
Fairroom RevPAR Statistics (fairroom-revpar-statistics)
Works out occupancy, ADR and RevPAR by day and by month from the daily room figures your PMS exports, flags days that cannot be right (more rooms sold than available, an ADR far below the period median, gaps in the dates, no capacity) and compares the result with the figures the manager's report shows. It drafts the monthly summary; a person sends it.
MIT · Node 20 or newer · local files only · built on fairroom-core
npx -y fairroom-revpar-statistics demo
npx -y fairroom-revpar-statistics mcp --root ./statisticsHow it counts
Occupancy = rooms sold / rooms available; ADR = room revenue / rooms sold; RevPAR = room revenue / rooms available. Comp rooms count as sold unless comp_in_occupancy is false; out-of-order rooms stay in rooms available unless ooo_reduces_available is true. The summary states which rules were used.
What it finds
| Finding | Meaning |
|---|---|
| over_capacity | More rooms sold than available |
| no_capacity | No rooms available and no total_rooms |
| adr_outlier | ADR below adr_low_pct (default 50) percent of the period median |
| missing_day | A date missing between two dates in the file |
| reported_differs | The manager's report shows a different occupancy, ADR or RevPAR |
A demo run
npx -y fairroom-revpar-statistics demo runs the agent on the fictional files in fixtures/ in a temporary folder. Captured output:
Fairroom RevPAR Statistics demo (fictional 40-room hotel, 1 to 7 Nov 2026), Auto mode on for the draft only
▶ Audit the fictional files
status: executed decision: allow
6 day(s): occupancy 74.58%, ADR 142.29, RevPAR 106.13 (179 of 240 room nights, revenue 25470); 4 day(s) to check.
2026-11-01 occ 75% ADR 150 RevPAR 112.5 ok
2026-11-02 occ 85% ADR 160 RevPAR 136 ok
2026-11-03 occ 105% ADR 150 RevPAR 157.5 over_capacity
2026-11-04 occ 50% ADR 50 RevPAR 25 adr_outlier
2026-11-05 occ -% ADR - RevPAR - missing_day
2026-11-06 occ 70% ADR 160 RevPAR 112 reported_differs
2026-11-07 occ 62.5% ADR 150 RevPAR 93.75 ok
▶ Explain 2026-11-06
status: executed decision: allow
2026-11-06: 28 of 40 rooms, revenue 4480, occupancy 70%, ADR 160, RevPAR 112, review. 2026-11-06: ADR 165 reported, 160 from the daily figures; RevPAR 115.5 reported, 112 from the daily figures.
▶ Write the worklist (CSV and HTML)
status: executed decision: allow
Occupancy, ADR and RevPAR written: 6 day(s): occupancy 74.58%, ADR 142.29, RevPAR 106.13 (179 of 240 room nights, revenue 25470); 4 day(s) to check.
▶ Write the draft (owner summary)
status: executed decision: allow (auto)
owner summary 2026-11 drafted for 25470 with 0 open marker(s). Nothing was sent.
▶ Auto: approving it stays one named click
status: needs_approval decision: ask
reason: binding_send stays one-click, even in Auto
▶ The agent tries rate_change itself
status: blocked decision: block
reason: Fairroom never changes a rate, restriction or availability in the PMS, channel manager or an extranet.Tools
| Tool | What it does | Policy |
|---|---|---|
| revpar_check | Recompute occupancy, ADR and RevPAR by day and month and check each day. | runs |
| revpar_explain | Show one day: rooms, revenue, occupancy, ADR, RevPAR and findings. | runs |
| revpar_write_report | Write revpar-statistics.csv and revpar-statistics.html (one row per item, with a blank decision column for the person working it) into out_dir (default fairroom-out/revpar). | runs |
| revpar_draft_owner_summary | Write drafts/owner_summary-.md: occupancy, ADR and RevPAR by month, with the counting rules and any day that needs a check. | asks first (Auto can be opted in) |
| revpar_request_send | After one named human click (even in Auto), record that the reviewed owner summary draft is approved in owner_summary-requests.csv. | one named click, even in Auto (binding_send) |
| rate_change | Fairroom never changes a rate, restriction or availability in the PMS, channel manager or an extranet. | refused |
| benchmark_submit | Fairroom RevPAR Statistics never submits figures to a benchmarking service or a brand portal. | refused |
Any tool name not in this table is blocked, including names a model invents. refused tools are listed so a model can see they exist and are refused.
Columns it reads
Table inputs can be CSV, TSV, semicolon- or pipe-separated text, Excel .xlsx, JSON or JSONL. Columns are matched by the agent's own name, then by the English names below, then by their names in German, French, Spanish, Portuguese, Italian, Japanese, Chinese and Korean. Dates become YYYY-MM-DD; amounts are read with either decimal mark. Guest names, e-mails, phones and loyalty numbers are masked in what the AI model sees, and card numbers are cut to the last four digits. Every result lists under sources how each file was read.
Daily statistics (daily)
| Column | Type | Also read as | For example, in other languages |
|---|---|---|---|
| business_date (required) | date | Business Date, Date, Day, Stay Date | Geschäftsdatum, Date d'exploitation, 営業日, 营业日期 |
| rooms_available | number | Rooms Available, Available Rooms, Rooms Avail, Capacity | Verfügbare Zimmer, Chambres disponibles, 販売可能客室数, 可售房数 |
| rooms_sold (required) | number | Rooms Sold, Occupied Rooms, Rooms Occupied, Sold | Verkaufte Zimmer, Chambres vendues, 販売客室数, 售出房数 |
| room_revenue (required) | amount | Room Revenue, Rooms Revenue, Room Rev, Net Room Revenue | Logisumsatz, CA hébergement, 客室売上, 客房收入 |
| comp_rooms | number | Comp Rooms, Complimentary Rooms, Comps | - |
| ooo_rooms | number | Out of Order, OOO Rooms, Out Of Order Rooms | - |
Reported figures (reported)
| Column | Type | Also read as | For example, in other languages |
|---|---|---|---|
| business_date (required) | date | Business Date, Date, Day | Geschäftsdatum, Date d'exploitation, 営業日, 营业日期 |
| occupancy_pct | number | Occupancy %, Occupancy, Occ %, Occ | - |
| adr | amount | ADR, Average Daily Rate, Average Rate | - |
| revpar | amount | RevPAR, Rev PAR, Revenue per Available Room | - |
Files from other countries
A German export in Windows-1252 with semicolons, 1.234,56 and 03.11.2026, or a Japanese one in Shift_JIS with 2026/11/03, is read the same way as the English file. fixtures/intl/ has both versions of the demo data, and the eval cases intl-de-* and intl-ja-* require the same results as the English case. Amounts are read with either decimal mark; currencies are not converted. Columns named differently? Run npx fairroom-revpar-statistics inspect <file> (names and shapes only, never values) and name them in fairroom-sources.json:
{ "files": { "exports/journal.csv": { "columns": { "reservation": "Buchungsnr" }, "date_order": "dmy" } } }Install
Node 20 or newer. No other dependencies.
npx -y fairroom-revpar-statistics demo
npx -y fairroom-revpar-statistics mcp --root /path/to/your/filesClaude Desktop, Cursor and other MCP hosts:
{
"mcpServers": {
"fairroom-revpar-statistics": {
"command": "npx",
"args": [
"-y",
"fairroom-revpar-statistics",
"mcp",
"--root",
"/path/to/your/files"
]
}
}
}Claude Code: claude mcp add fairroom-revpar-statistics -- npx -y fairroom-revpar-statistics mcp --root ., or install the fairroom-revpar-statistics plugin from this repository's marketplace.
Modes and approvals
- Review (
--mode review): reads and reports only. - Assist (default): the policy above. A tool that asks returns an
approval_id; a person approves it once withfairroom-revpar-statistics approve <id> --as "Your Name"(or on the local approvals page,fairroom-revpar-statistics approvals), and the same call is repeated. - Auto (
--mode auto --auto <tool,...>): opt-in per tool, with step caps and a kill switch (fairroom-revpar-statistics kill). Paying, sending, posting to a ledger or a live system and accepting a learned fact stay one named click even in Auto; an approval is tied to the sha256 of the reviewed draft, so a changed draft needs a new click.
CLI
fairroom-revpar-statistics tools # every tool, its policy and arguments
fairroom-revpar-statistics sources # the columns each input is read from
fairroom-revpar-statistics inspect <file> # how a file would be read (names and shapes, never values)
fairroom-revpar-statistics call revpar_check '{"daily":"<daily>"}'
fairroom-revpar-statistics eval # the private eval cases on the fictional fixtures
fairroom-revpar-statistics demoAudit log and data
Every call is written to .fairroom/audit.jsonl under the root: hash-chained JSON lines, with arguments stored as a hash, signed with an Ed25519 key when you configure one. Everything runs on your machine on files you choose. No network calls, no telemetry, no credentials. The bundled fixtures are fictional.
Limits
- Reads only the files you give it. It submits nothing to a benchmarking service or brand portal.
- Benchmark services may count comps and out-of-order rooms differently; compare like with like.
