refactor: comentarii strict functionale, fara referinte PRD/stories

Curatare globala a comentariilor si docstring-urilor (app, tools, teste,
scripturi): eliminate referintele la PRD-uri, US-xxx, task-uri istorice si
review-uri; pastrata doar informatia functionala, formulata scurt. Regula
adaugata in CLAUDE.md (sectiunea Stil). Fara modificari de cod sau comportament.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-07-06 13:48:38 +00:00
parent 86408887e5
commit 44f261e269
226 changed files with 1313 additions and 1760 deletions

View File

@@ -1,20 +1,20 @@
"""Generare seed etichetat operatie->cod (US-003, PRD 5.18).
"""Generare seed etichetat operatie->cod.
Produce artefactul `app/data/operatii-etichetate.json` (comis in repo), consumat de
seeder (US-004) si de corpusul embeddings (US-005). NU cheama LLM la runtime — o
singura data, offline, pe LM Studio (backend implicit, D4).
seeder si de corpusul embeddings. NU cheama LLM la runtime — o singura data,
offline, pe LM Studio (backend implicit).
Pipeline dedup OBLIGATORIU, in ordine, INAINTE de orice apel LLM (D5):
1. Agrega cele N CSV-uri -> freq pe denumire RAW (NR ne-numeric -> skip rand, F9).
Pipeline dedup OBLIGATORIU, in ordine, INAINTE de orice apel LLM:
1. Agrega cele N CSV-uri -> freq pe denumire RAW (NR ne-numeric -> skip rand).
2. `cheie = normalize_for_match(denumire)` (ACEEASI functie ca DB/k-NN, NU strip exact).
Arunca randurile cu `cheie == ""` inainte de dedup (coliziune pe slot UNIQUE gol, F6).
Arunca randurile cu `cheie == ""` inainte de dedup (coliziune pe slot UNIQUE gol).
3. Dedup pe cheie: un reprezentant per cheie, `freq = suma NR`.
4. Harta `cheie -> cod` din TOATE etichetele existente: `labels-groq-partial.json` (cheiat
brut) + seedul comis anterior (cheiat normalizat). Conflict (acelasi cheie, coduri diferite
pe variante raw) -> castiga codul cu freq-max, tie-break pe cod sortat (F3).
pe variante raw) -> castiga codul cu freq-max, tie-break pe cod sortat.
5. `de_etichetat = corpus(in prag) - harta`. Sortat desc pe freq = SINGURUL input la LLM.
Idempotenta cross-run (F2/F7): seedul comis = cache de etichete -> re-run = 0 apeluri LLM.
Idempotenta cross-run: seedul comis = cache de etichete -> re-run = 0 apeluri LLM.
"""
from __future__ import annotations