Equipment technician: common-area energy apportionment tool, single file - meter readings for stairwell lighting, elevators, pump rooms, landscaping, and streetlights go in, per-unit amounts come out, broken down to what each meter cost; reversed readings flag red, abnormal swings flag yellow, identical consecutive readings flag suspected estimated reads; and above all it auto-drafts the notice text for the owners' group - the root of apportionment disputes is not bad arithmetic but the black box
You are a coding agent building an internal tool for a managed
park. Build a single-file HTML tool (HTML, CSS, JS fully
inlined, no external dependencies, no network requests, opens
by double-click) for the equipment desk to compute monthly
common-area energy apportionment and generate resident notice
text. Core stance: the root of apportionment disputes is not
arithmetic but opacity - every output must be decomposable in
front of a resident.
Input sections (manual entry, saveable, exportable):
A. Common-meter readings: meter number / category (stairwell
lighting, elevator, pump room, landscaping, streetlights,
garage power, other) / prior reading / current reading /
multiplier / actually-read-this-period flag
B. Unit-price parameters: electricity and water prices - all
blank, nothing pre-filled (tariff classes differ by region
and park; a pre-filled value becomes a false authority)
C. Apportionment parameters: participating buildings and per-
unit area list (paste-import supported); apportionment
basis (by area / per-household, choose one, default by
area); vacancy-discount rule (enter only if the contract
has one - the tool invents no discounts)
Computation and outputs:
1. Apportionment sheet (for the office):
- By meter: each common meter's consumption, amount, and
participating buildings
- By unit: unit number / area / apportioned amount /
category breakdown (how much of this household's share is
stairwell lighting, how much pump room - decomposable
categories are what answer "why is the elevator share
this big")
- The formula pinned in the sheet header: unit share =
category total ÷ participating total area × unit area
2. Check report (every period):
- Reversed reading (current < prior): red - transcription
slip or meter swap; verify before publishing numbers
- Period-over-period swing: any meter swinging beyond
[ ]% (parameter blank) flags yellow - meter failure,
missed read, or new load; yellow meters stay out of the
apportionment and go to pending verification
- Suspected estimated read: identical consecutive readings
flag yellow - one of the two was probably estimated;
field re-read required
- Not-actually-read flags: meters marked estimated this
period list separately, and the notice text must say
plainly "estimated at running average", never dressed as
an actual read
3. Notice-text generator (for residents - the tool's second
core output):
- Auto-drafts a message ready for the owners' group: this
period's total, category breakdown (each category's
amount), unit prices, apportionment basis, household
average for reference, inquiry channel and desk hours
- A switched basis (by area / per-household) must be stated
in the notice text - a notice that hides its basis is a
dispute's favorite target
- With estimated meters present, the notice auto-appends
"[ ] meters estimated at average this period, corrected
next period"
Usage boundaries (printed in the footer):
- Data stays in the local browser; nothing uploads
- Prices and thresholds stay blank, never pre-filled
- The tool computes, it does not judge: no statement on
whether fees are "reasonable" anywhere; prices and basis
come from the contract and local tariff - cited, never
editorialized
Prohibitions:
- No hidden apportionment basis beyond the explicit by-area /
per-household choice - per-household is allowed but must be
selected explicitly and stated in the notice
- No "carry forward last month's readings" automation -
estimation must be an explicit choice that surfaces in the
notice; silent carry-forward fabricates identical-reading
data
- The notice text never says "please understand" or "these
charges are objectively fair" - numbers and inquiry channel
only; the tool does not conclude for residents
Why it is written this way
Standing the notice generator next to the calculation engine as a co-equal core output is the tool's entire thesis. Residents who dispute common-area fees have almost never found an arithmetic error - they have received "one total, no visibility into how much the elevator, the pumps, the landscaping each cost". The sheet solves computing correctly; the notice solves explaining clearly: total, breakdown, basis, household average - four numbers on the table and the dispute drops from "you're overcharging" to "why is landscaping this much", which is a real, negotiable, optimizable question. The tool does not win arguments for the office; it downgrades arguments from emotion to arithmetic.
The three checks are re-enactments of real meter-reading accidents. Reversed readings are transcribed rows; threshold swings are stalled meters or missed reads - and the danger of both is that uncaught, they flow straight into every household's bill, where a resident comparing with a neighbor discovers the anomaly, and the explanation then costs the office ten times what checking would have cost. Identical consecutive readings flag suspected estimation because readers who skip the visit copy the prior month - estimation itself is not the sin; dressing it as an actual read is, so the tool's rule is: you may estimate, but it must be flagged and stated in the notice.
Blank prices and thresholds share the same root as "compute, don't judge". Tariff classes are genuinely complex and apportionment conventions vary; any pre-filled value becomes the next park's false authority. The tool's credibility comes from its restraint: pure arithmetic and decomposition, contract-cited prices, zero editorializing - the moment the tool says the fee is "fair", every number it generates reads as advocacy instead of a bill.
Variables
| Variable | Description |
|---|---|
| Prices and tariff classes | Electricity (peak/valley split? commercial class?) and water - entered per the park's tariff class and local pricing; a wrong price corrupts everything, so the footer prompts a check every period |
| Swing threshold | What percentage flags yellow - set per meter from its own history (landscaping is seasonal, loosen it; pump rooms are stable, tighten it) |
| Apportionment basis and discounts | By area or per household, vacancy discounts or none - must mirror the service contract exactly; a wrongly selected basis gets broadcast in the notice, i.e., the error gets published to the whole building |