feat: ФОТ/ед в find_in_real_estimates + корпус-tools в агентный Claude-путь

Эксперимент подтвердил: агентный Claude (claude_bridge, Docker) сам вызывает
find_in_real_estimates и берёт РЕАЛЬНЫЕ коды/цены — без фабрикации (в отличие от
glm single-pass). Но НР/СП считал на сыром salary из cost_structure (неверный
масштаб). Фикс: find_in_real_estimates отдаёт fot_unit (ФОТ/ед, масштабирован к
цене/ед) — корректный базис для НР/СП обоим путям. В claude_bridge домонтированы
real_corpus/gge_deep/data + find_in_real_estimates/find_ka_price/find_in_vor в
allowedTools — агентный путь получил корпус.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-06-09 04:18:16 +10:00
co-authored by Claude Opus 4.8
parent 881c900a6d
commit cf17151bdb
3 changed files with 36 additions and 7 deletions
+2 -4
View File
@@ -348,10 +348,8 @@ def _search_corpus(message: str) -> str:
ov = r.get("overhead") or {}
pr = r.get("profit") or {}
regs = ", ".join(r.get("regions") or [])
# ФОТ/ед для расчёта НР/СП (НР и СП начисляются на ФОТ)
cs = r.get("cost_structure") or {}
direct = sum(cs.get(k, 0) or 0 for k in ("machines", "materials", "salary", "machinist_salary"))
fot_unit = round(r["unit_cost_cur"] * (cs.get("salary", 0) or 0) / direct, 2) if direct > 0 else None
# ФОТ/ед для расчёта НР/СП (find_in_real_estimates считает масштаб)
fot_unit = r.get("fot_unit")
fot_str = f" | ФОТ/ед ≈ {fot_unit} руб (база для НР/СП)" if fot_unit else ""
lines.append(
f"[{code}] {r['name']} | {r['unit']} | цена/ед(тек прямые) = {r['unit_cost_cur']} руб"