Add a new item pattern to lib/dictionaries.ts across all relevant tables (volume, blankets, disassembly, effort, boxes, heavy/bulky, fragile, aliases). Use when client inventory has an unrecognized item type or a new furniture/ appliance variant needs to be supported.
lib/dictionaries.ts has 10+ interconnected tables. Missing one causes incorrect
estimates. This workflow ensures full coverage.
Answer these before touching any code:
| Question | Why it matters |
|---|---|
| What are all common name variants? | → ALIAS_RULES |
| How many cubic feet does it occupy? | → VOLUME_TABLE (required) |
| Does it require blanket protection? | → BLANKETS_TABLE |
| Can it be disassembled/reassembled? | → DA_TIME_TABLE (minutes) |
| Is labor significantly harder than average? | → EFFORT_MULTIPLIER |
| Does it contain items that need separate packing? | → ITEM_BOX_TABLE |
| Is it regularly ≥300 lbs? | → TRUE_HEAVY_ITEMS |
| Is it large/awkward but not particularly heavy? |
→ BULKY_ITEMS |
| Is it fragile (glass, mirrors, delicate finish)? | → FRAGILE_KEYWORDS |
| Does it need special logistics equipment? | → LEAGUE_1_ITEMS / LEAGUE_2_ITEMS |
// lib/dictionaries.ts → VOLUME_TABLE
"murphy bed": 55, // example: add with realistic cf
"wall bed": 55, // add all canonical forms
Reference volumes:
Add to ALIAS_RULES array (regex → canonical):
// ALIAS_RULES
[/\bwall\s+bed\b/gi, "murphy bed"],
[/\bfold[\s-]?down\s+bed\b/gi, "murphy bed"],
Rules:
/gi flagsOnly add to tables where it actually applies:
// BLANKETS_TABLE — blanket count needed for protection
"murphy bed": 4,
// DA_TIME_TABLE — disassembly + reassembly in minutes (one way)
"murphy bed": 60,
// EFFORT_MULTIPLIER — labor multiplier vs standard (default = 1.0)
// Only add if significantly harder: piano = 5.0, safe = 4.0
"murphy bed": 2.5,
// ITEM_BOX_TABLE — number of boxes for internal packing
// Only for items with loose contents (e.g. china cabinet = 5 boxes)
// TRUE_HEAVY_ITEMS — string array, items regularly ≥300 lbs
// "murphy bed", ← uncomment if applicable
// BULKY_ITEMS — large/awkward, NOT heavy badge
// "murphy bed", ← uncomment if applicable
// FRAGILE_KEYWORDS — delicate finish, glass, mirrors
// "murphy bed", ← uncomment if has glass/mirror component
// LEAGUE_1_ITEMS — standard special-handling appliances
// LEAGUE_2_ITEMS — high-value specialty items (pianos, safes)
The following are auto-built from table keys at module load time — never edit them manually:
KEY_REGEX, BLANKET_REGEX_CACHE, DA_REGEX_CACHE, ITEM_BOX_REGEX_CACHE,
TRUE_HEAVY_REGEX_CACHE, LIFT_GATE_REGEX_CACHE, etc.
npm run test:unit
npm run regression
If regression cases fail, check: