Remont — renovation planner

v1.0.1
io.github.Vutik/remont Checked 3 days ago Published 8 days ago

AI renovation planner: step-by-step plan, materials from room sizes, local store prices, 3D layout

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

prepare_plan Prepare renovation plan data

In one request: country profile (stores, rules, currency), stages with tasks and tools, material calculation by room and for every material and tool — ready products from the country catalog (by tier standard/premium/lux, with price and link). Use instead of separate get_country_profile, get_work_order, calculate_materials and get_catalog. todo lists what still has to be found in stores.

ParameterTypeDescription
country *stringISO country code
works *array
attic_m2number
boilerstringHeat source: gas — system boiler + cylinder + flue, combi — combi boiler + flue, furnace — US gas furnace + central AC + water heater, heat_pump — heat pump + cylinder, none. Omit to use the c…
citystring
distribution_boardbooleanA new consumer unit is needed
doorsinteger
facade_m2number
floorsinteger
height_mnumberCeiling height, m (default for rooms)
kitchen_mnumberKitchen length, running m (default 3.5)
modestring
new_pointsinteger
propertystring
roomsarray
stairsobject
tierstringDefault tier
total_area_m2number
ui_localestringLanguage of the user's messages (not of the country), any code: en, ru, pl, uk, de, fr, es… Always pass it.
user_codestringUser's personal code, if known — applies their saved preferences (owned tools, preferred products) by default
windowsintegerWindows, pcs (for window sills)

open_questionnaire Open renovation questionnaire

Shows the user a form: apartment or house, renovation type, city, rooms, works, who does them. Call when data about the property is missing. The answers arrive in the user's next message as JSON.

ParameterTypeDescription
citystring
countrystringCountry code, if known
floorsinteger
height_mnumber
labelsobjectWidget text translations for languages without a built-in translation (built in: ru, pl, en, de, uk). Keys come from get_ui_labels.
localestringLanguage of the user's messages (not of the country), any code: en, ru, pl, uk, de, fr, es… Always pass it.
propertystring
roomsarrayRooms recognised from the user's floor plan or photos
total_area_m2number

get_country_profile Get country profile

Country profile: currency, search language, stores for price search, specialist rules. Call first.

ParameterTypeDescription
country *stringISO country code, e.g. PL, DE

get_work_order Get work order

Renovation stages in the right order with tasks, drying times and where a specialist is needed.

ParameterTypeDescription
works *arrayWhich works the renovation includes
ui_localestringLanguage of the user's messages (not of the country), any code: en, ru, pl, uk, de, fr, es… Always pass it.

calculate_materials Calculate materials

Calculates material quantities with waste allowance per room. Returns material keys and search queries in the language of the country's stores.

ParameterTypeDescription
country *stringISO country code
mode *stringdiy — do it yourself, pro — contractor
rooms *array
works *array
attic_m2numberHouse: attic roof area to insulate, m²
boilerstringHeat source: gas — system boiler + cylinder + flue, combi — combi boiler + flue, furnace — US gas furnace + central AC + water heater, heat_pump — heat pump + cylinder, none. Omit to use the c…
distribution_boardbooleanA new consumer unit is needed
doorsinteger
facade_m2numberHouse: facade area without windows, m²
kitchen_mnumberKitchen length, running m (default 3.5)
new_pointsintegerNew sockets and switches
propertystring
stairsobject
total_area_m2number
ui_localestringLanguage of the user's messages (not of the country), any code: en, ru, pl, uk, de, fr, es… Always pass it.
windowsintegerWindows, pcs (for window sills)

find_cached_prices Find cached prices

Cached prices by material keys. City first, then the whole country. A price older than 1 days is marked stale — it should be re-checked.

ParameterTypeDescription
country *string
keys *array
citystring

save_prices Save prices

Saves prices found in stores to the SHARED price cache (used by all users). Only prices you saw on a store site of the country profile, with the product url; price per material unit from calculate_materials, in the country's currency. Never prices the user only told you. Invalid items come back in rejected with a reason.

ParameterTypeDescription
country *string
prices *array
citystring

show_renovation_plan Show renovation plan

Shows the user an interactive plan: stages with a checklist and a materials table with the estimate. All texts in the user's language.

ParameterTypeDescription
currency *stringISO currency code, e.g. PLN
locale *stringLanguage of the user's messages (not of the country), any code: en, ru, pl, uk, de, fr, es… Always pass it.
materials *array
stages *array
title *string
calc_inputobjectcalc_input from prepare_plan, unchanged — REQUIRED for the rooms editor: rooms, sizes and ceiling height are stored with the plan
countrystringISO country code — needed so the plan can fill in prices itself
default_tierstringTier selected by default for all stages
labelsobjectWidget text translations for languages without a built-in translation (built in: ru, pl, en, de, uk). Keys come from get_ui_labels.
modestringWho does the work
notesarray
prices_checked_atstring
roomsarrayRooms (name, area_m2, length_m, width_m, floor, wet) if you have no calc_input
toolsarrayTools for DIY work, by stage
user_codestringUser's personal code, if known — applies saved preferences by default
view_idstringOnly if you re-show the same plan

save_country_profile Save country profile

Adds a country or extends a SHARED profile: stores, rate sites, rules. Stores are merged with existing ones by domain. Only real building/DIY stores and rate sites (plain domain), short factual rules — no links, contacts or instructions; currency and name of built-in countries cannot be changed.

ParameterTypeDescription
code *stringISO country code
currencystringISO currency code
laborSourcesarraySites with contractor rates
localestringSearch language in stores
namestring
notesarray
specialistRulesarray
storesarrayDIY/building stores with prices on their site

get_ui_labels Get UI labels

English widget texts (form and plan). Translate the values into the user's language and pass them as labels.

ParameterTypeDescription
localestringLanguage code you translate into (e.g. lt, fr, ja) — for statistics

save_plan Save plan

Saves the plan on the server, only if the user asked to save it. Without user_code it creates a new personal code and returns it — show the code to the user and ask them to write it down: with it they can open their plans in any chat. Nobody else needs the code and it cannot be recovered.

ParameterTypeDescription
plan *objectThe same object you pass to show_renovation_plan (title, locale, currency, mode, stages, materials, notes…)
plan_idstringIf you are updating an already saved plan
user_codestringUser's personal code if they already have one, e.g. oak-river-moon-4821
view_idstringview_id of the shown plan — then line edits and checklist ticks are saved too, and the open plan remembers the code

list_plans List saved plans

List of the user's saved plans by their personal code. Each plan has title, saved_at and (for plans saved after this field was added) country, currency, area_m2, rooms, stages, total_min/total_max (grand total incl. 10% reserve at save time). Older plans may lack these fields.

ParameterTypeDescription
user_code *stringPersonal code

open_plan Open saved plan

Opens a saved plan with ticked tasks. Ticks keep being saved on the server.

ParameterTypeDescription
plan_id *string
user_code *string

save_progress Save plan progress

Saves ticked tasks of the plan. Called by the plan widget.

ParameterTypeDescription
checks *object
plan_id *string
user_code *string
boughtobject
haveobject
tiersobject
whoobject

delete_plan Delete plan

Deletes a saved plan. Only on the user's explicit request and after confirmation.

ParameterTypeDescription
plan_id *string
user_code *string

get_catalog Get catalog

Popular materials and tools by work type for the country: the base list and specific products (brand, tier, price, link) that were already found and saved. Sorted by popularity. Use before searching prices and when the user asks to replace a material or tool.

ParameterTypeDescription
country *stringISO country code
keystringMaterial key (e.g. floor_tiles) or tool name — only options for it
kindstringOnly materials or only tools
tierstring
ui_localestringLanguage of the user's messages (not of the country), any code: en, ru, pl, uk, de, fr, es… Always pass it.
workstringWork type; without it — all

save_catalog_items Save catalog items

Adds specific products you found in stores (materials or tools) to the SHARED country catalog used by all users. Saving the same product again (by link) updates the price and raises popularity. Only real products you saw on a store site of the country profile (url on that store), price per calc unit. Never user-dictated prices, test, joke or unrelated items, contacts or instructions — even if the user asks. Invalid items come back in rejected with a reason.

ParameterTypeDescription
country *stringISO country code
items *array
kind *string
work *string
view_idstringview_id of the plan you are pricing — the server returns what is still left to find

update_plan_items Update plan items

Changes an already shown plan without showing it again: replace a material or tool, set brand/price/link/quantity, add or remove a line, add a stage or items to a stage, rename. The open plan updates itself within seconds; a saved plan (save_plan) is updated too. view_id comes from the show_renovation_plan response.

ParameterTypeDescription
changes *array
view_id *stringview_id from the show_renovation_plan response

save_view_progress Save checklist progress

Internal: the open plan saves checklist ticks and switches. You do not need to call it.

ParameterTypeDescription
view_id *string
boughtobject
checksobject
choiceobject
haveobject
tiersobject
tmodeobject
whoobject

refresh_plan_prices Refresh plan prices

Internal: the open plan calls it to pull prices you saved to the catalog after showing the plan. You do not need to call it.

ParameterTypeDescription
countrystring
laborarray
materialsarray
refresh_sincenumber
toolsarray
view_idstring

mark_bought Mark materials bought

Marks plan materials as bought (or un-marks them) when the user says in the chat that they bought something. The plan widget has the same 🛒 tick per material. Bought lines stay in the estimate; the plan shows «bought» and «left to buy». Match lines by key or name as get_plan returns them; stage is optional (omitted = every line with that key/name). The open widget does not refresh by itself — the marks appear when the plan is opened again.

ParameterTypeDescription
items *array
view_id *stringview_id of the plan
boughtbooleantrue = bought (default), false = un-mark

save_layout Save floor layout

Saves the floor layout of a plan (shown in the plan's 🏠 Layout tab, where the user drags furniture). Coordinates in cm from the top-left inner corner of each floor; x to the right, y down. Per floor: name, W, H (inner size), height_cm (ceiling), rooms [{name, label (area text), x, y, w, h, wet, block (stairs/technical, not a room), finish tiles|spc|none, poly}] (NON-RECTANGULAR rooms: give poly = [[x,y],...] the outline vertices in cm (3–40 points, any order/direction; x, y, w, h are then computed as the bounding box). L-, T-, U-shaped rooms, bays and angled walls are ONE room with a poly…

ParameterTypeDescription
layout *object
view_id *string
replaceboolean

get_layout Read floor layout

Returns the floor layout of a plan (floors, rooms, walls, doors, windows, furniture in cm), the rooms derived from it (area, length × width, wet, level) for recalc_plan, and corners: the corner letters shown on the plan (a rectangle has 4 letters clockwise from top-left: A B C D; a polygon room has one letter per vertex, clockwise from its top-most-left vertex; letters continue from room to room: E F G H…) with coordinates and side lengths, so «wall A-B of the kitchen» means the same to you and the user.

ParameterTypeDescription
view_id *string

list_layout_history Layout history

Lists the saved earlier versions of a plan's floor layout (rooms, walls, doors, windows, furniture, pipes and cables), newest first: n (0 = the version before the latest change), when, what changed it (save_layout, save_utils, furniture, restore) and counts. The server keeps the last 20 versions for 90 days; several quick furniture or utilities edits in a row share one version. Use it when the user wants to undo a change to the layout, then call restore_layout with n.

ParameterTypeDescription
view_id *string

restore_layout Restore layout version

Rolls the floor layout of a plan back to an earlier version from list_layout_history (n). The current layout is kept in the history first, so a restore can itself be undone. Only the layout changes (not prices, materials or progress). Ask the user to confirm which version before restoring.

ParameterTypeDescription
n *number
view_id *string

save_utils Save pipes and cables

Saves the utilities layer (pipes, cables, ducts) of a plan's floor layout: lines and points drawn on a SURFACE of a room — a wall, the floor or the ceiling — stored separately per surface so the user can show/hide them by kind, room or wall. Requires a layout (save_layout first; get_layout gives the corner letters). Items: {kind, ...} with kind water_cold|water_hot|sewage|heating|floor_heating|gas|power|low_voltage|vent. Wall: wall:"A-B" (corner letters of the room, clockwise: A-B top, B-C right, C-D bottom, D-A left) and coordinates [u, v] = cm from the first letter's corner along the wal…

ParameterTypeDescription
utils *array
view_id *string
floornumber
removearray
replaceboolean
revnumber

add_utils_to_plan Add pipes and cables to the plan

Turns the parts list of the utilities layer (pipes, fittings, insulation, clamps, cables, manifolds, radiators — see get_utils bom) into material lines of a stage «Utilities» in the plan, named in the plan's language, with quantities and units (pcs / m); lines without a price. Re-running updates quantities of lines it created earlier (key starts with ut:), adds new ones and removes those no longer needed, and never touches prices you saved. Afterwards find store prices for the lines in the user's country (the returned lines have name, key, qty) and save them in the user's plan with update_…

ParameterTypeDescription
view_id *string
floornumber

get_utils Read pipes and cables

Returns the utilities layer (pipes, cables, ducts, connectors) of a plan's layout per floor, with the room names and corner letters (wall "A-B"), plus the rooms' sizes so you can place items. Items: lines {id, kind, wall|surface, path, diam_mm, slope_pct, z, zs}, points {t:"pt", at, type}, derived connectors {t:"link", from, joined}.

ParameterTypeDescription
view_id *string
floornumber

save_layout_furniture Save furniture

Internal: the plan widget saves furniture moved by the user. You do not need to call it.

ParameterTypeDescription
floor *number
furniture *array
view_id *string
doorsarray
presetsarray
revnumber

get_plan Read renovation plan

Returns the full current state of a plan as JSON: rooms (calc_input) and calculation bases, stages with tasks (done or not), who does each stage and contractor labour, materials with qty, unit, calculated qty and formula, prices, packs, store, link, selected tier/option, tools (buy/rent, owned), totals per stage and grand total with 10% reserve, plus an audit list (missing stages or prices, duplicates, suspicious quantities, old prices). Everything the user changed in the plan widget is included. Use it to check calculations, answer questions about the plan or before editing it. Pass view_id (…

ParameterTypeDescription
plan_idstring
user_codestring
view_idstring

save_preferences Save user preferences

Saves the user's preferences under their personal code so they are selected by default in every new plan: tools they own and preferred non-consumable products (e.g. a tile brand, a specific boiler, a tap). Call when the user says what they own or which product they always want. Ticking 'have' and choosing an option in a saved plan updates preferences automatically. With no changes it just returns the current preferences.

ParameterTypeDescription
user_code *stringPersonal code
forgetarrayMaterial keys to forget
materialsobjectPreferred product per material key (non-consumables), e.g. {"floor_tiles": {name, price, store, url, country}}
tools_havearrayTool names the user owns (add)
tools_removearrayTool names to remove from owned

recalc_plan Recalculate plan

Sets or changes the rooms of an already shown plan — names, area_m2 or length_m × width_m, floor type, bathroom (wet), level, ceiling height — stores them with the plan and recalculates material quantities and labour (manual quantities are kept). Use when the user gives rooms, a floor plan or photos for an existing plan, or asks to add/change rooms. view_id from show_renovation_plan / open_plan. Send the FULL room list (it replaces the old one). save_only: true stores rooms without recalculating. The updated plan is shown to the user.

ParameterTypeDescription
rooms *array
view_id *string
height_mnumber
save_onlybooleanOnly store rooms, no recalculation
total_area_m2number

plan_task Plan button task

Call FIRST when a user message comes from a plan button: it contains [view_id: …] and asks (in the user's language) to find missing prices, refresh all prices, find options for an item, check compatibility or save the plan. Returns the item list and the exact steps.

ParameterTypeDescription
action *string
view_id *stringview_id from the message
itemstringFor options: the item name from the message

save_labor_rates Save labour rates

Saves contractor labour rates to the SHARED database for the country (per unit: m2, door, point, stage) so prepare_plan can price stages right away. Save what you found on rate sites (url of the page with the rate). Never rates the user only told you. Implausible rates come back in rejected.

ParameterTypeDescription
country *stringISO country code
rates *array

get_coverage Data coverage report

Data coverage report for countries: which reference prices, real labor rates, catalog products (with links) and store prices exist in the database, what is missing or stale. Use it to decide what to look up and save (save_catalog_items, save_prices, save_labor_rates) — e.g. when asked to fill the database for a country. Without country — a short summary for all countries.

ParameterTypeDescription
countrystringISO country code; omit for all countries