plat-costmodel
# plat-costmodel
Multifamily renovation cost estimation engine for Plat — a domain-expert real estate intelligence agent.
## What It Does
- **Per-unit cost estimation** with line-item breakdowns (flooring, kitchen, bath, paint, appliances, fixtures, contingency)
- **Scope of Work (SOW) generation** — contractor-ready documents from property profile
- **Contractor bid evaluation** — flags inflated line items, vague lump sums, unrealistic timelines
- **ROI gating** — 15% minimum threshold check on all renovation plans
- **Risk flagging** — age-based warnings (galvanized pipe, asbestos, foundation concerns)
- **Budget vs. actual tracking** — Yardi Voyager integration for model calibration
## Architecture
MCP tool server callable by Plat's orchestration layer. CLI-first interface.
```
Plat (agent) ──MCP──▶ plat-costmodel (tool server)
├── estimate — per-unit cost range
├── sow — scope of work generation
├── evaluate — contractor bid evaluation
├── roi — ROI threshold check
└── ingest — Yardi CSV import
```
## Two Scope Levels
| Scope | Cost Range | Description |
|-------|-----------|-------------|
| Light | $3K-$5K/unit | Paint, clean, patch, hardware, carpet |
| Standard Value-Add | $12K-$18K/unit | Full kitchen/bath update, LVP, appliances, fixtures |
Gut renos excluded — don't pencil at Class C rents.
## Cost Model Inputs
- Unit square footage (<700 small, 700-950 medium, 950+ large)
- Finish tier (basic vs. upgraded)
- Number of bedrooms/bathrooms
- Property year built (drives risk flags)
- Property class (B or C)
- Market (Dallas, Birmingham — more later)
## Data Sources
- **Brain dump knowledge** — Day 1 baseline from operator experience
- **Yardi Voyager CSV exports** — historical actuals tagged to unit numbers
- **RSMeans benchmarks** — industry reference data (future)
- **Cross-user pooled data** — anonymous Glassdoor-style model (SaaS future)
## v0.1 packaging candidate
The standalone MCP adapter uses MCP 2.3–2.x. Install the `[server]` extra and run `plat-costmodel-mcp` (stdio).
CI builds wheel/source archives, tests a fresh wheel environment, and validates runtime/package versions. A release tag must match `pyproject.toml`, use an unused PyPI version, and pass the full CI workflow before the tested artifacts can be uploaded. Candidate versions are not published by this change.
TDQS
Scored across 11 tools
Six tools revolve around estimation (estimate, estimate_scope, estimate_full_property, estimate_property_from_model, estimate_from_deal, prepare_renovation_program_tool), and the property-level pair (estimate_full_property vs estimate_property_from_model) is especially easy to confuse since one is merely the 'preferred' wrapper of the other. Descriptions do clarify levels (per-unit vs property vs deal vs pipeline), so an agent can usually recover, but boundaries are fuzzy.
Nearly all tools follow a clean verb_noun snake_case pattern (check_renovation_roi, estimate_full_property, generate_scope_of_work, evaluate_contractor_bid, register_property, get_property_history). Minor deviations are the bare 'estimate' and the odd '_tool' suffix in prepare_renovation_program_tool, but these are isolated.
11 tools is well within a healthy range for a cost-modeling server covering estimation, ROI, SOW, bid review, registration, and history. The only concern is slight redundancy in the estimation cluster, which nudges it below a perfect score.
The surface covers the core lifecycle: property registration, per-unit and property-level estimation, ROI gating, scope-of-work generation, contractor bid evaluation, deal-scenario projection, and history retrieval. Gaps are minor—no update/delete or list/get property operations, and no standalone exterior-only estimate—but agents can work around these.