Files
portal/docs/adr/ADR-007-ml-ai-tooling.md
T
Дмитрий 6f32353af9 feat(a11): bootstrap docs/ml — README + promptfoo example + ADR-007
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 17:17:20 +03:00

40 lines
1.6 KiB
Markdown

# ADR-007: ML / AI tooling (A11)
- **Status:** Accepted
- **Date:** 2026-05-17
- **Deciders:** Дмитрий
## Context
The `A11 «ML / AI-разработка»` map section had zero tooling. Лидерра ships no
ML/AI code; `calc_lead_score` is a deterministic SQL function. A toolset is needed
for the day AI features (LLM-backed) or a scoring model are scoped.
## Decision
A11 adopts a six-position toolset in two subcategories:
- **LLM integration** — the claude-api skill (build), promptfoo (test prompts),
Sentry MCP (observe). All reuse or new-light.
- **Classical ML** — a vendored Data Scientist skill (workflow knowledge). The
executable part, **Jupyter MCP**, is **deferred**: it needs a Python ML runtime
the deliberately-minimal native-Windows machine lacks, and there is no model to
train. Jupyter MCP is a reserved registry slot, installed by a separate task
when a concrete model is scoped.
- promptfoo runs manually / CI only — never in a hook (paid LLM calls).
- A11 tools are non-UI → the `ml-ai-tooling` off-phase category.
## Consequences
- Positive: A11 populated; AI features have a build+test+observe toolchain.
- Risk: the Data Scientist skill is third-party (CC BY 4.0 content) — mitigated by
vendoring with attribution into `.claude/skills/data-scientist/`.
- Cost: promptfoo is a heavy devDependency (~1090 transitive packages, one native
module). Accepted — it is dev-only tooling, not shipped to the app.
- Deferred: no Python runtime until a model is scoped — accepted, this is the
decision.
## Enforcement
None — A11 tools are advisory; verified by use and code review.