Files
smeta-railway/.claude/rules/web.md
T
anorandClaude Opus 4.6 f7b9400163 feat: web API модули + структурированные ошибки + few-shot промпты
Новые модули:
- errors.py — классификация ошибок (transient/validation/business)
- web/chat_api.py — поиск ГЭСН, НР/СП lookup
- web/generator_api.py — 3-шаговая генерация сметы
- .claude/rules/ — конвенции для calc/ai/output/web

Улучшения:
- generator.py: few-shot примеры, retry при невалидном JSON, предусловия
- bot.py: структурированные ошибки вместо голых Exception
- wizard_api.py: структурированные ошибки в HTTP-ответах

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 07:23:00 +10:00

468 B

paths
paths
src/smeta_railway/web/**
scripts/wizard_server.py

Web Module Rules

  • Wizard sessions are in-memory with 1h TTL — no persistent state
  • All file paths must be validated within session temp directory (path traversal prevention)
  • Return structured error responses with error_category field (transient/validation/business)
  • File uploads: validate .xlsx/.zip extensions AND content (not just filename)
  • Test endpoints with curl after changes