# Verifier — Phase B MVP (R1·R2·R4) MCP tool 인자 결정적 검증 모듈. LLM이 생성한 잘못된 인자를 reject + hint + 로그. ## 룰 카탈로그 | 룰 | 검증 | 적용 tool | 실패 코드 | |----|------|-----------|-----------| | R1 | tag-existence (base_tag ∈ DB) | trace_connections, query_pv_history, upsert_pid_connection, query_events(tag_name) | R1.invalid_tag_format / R1.tag_not_found | | R2 | area-format (`P\d+(-\d+)?` + valid area) | find_tags, active_alarms, query_events, summarize_events, generate_status_report | R2.invalid_area_format / R2.unknown_area | | R4 | trace_connections 보강 (direction, max_depth) | trace_connections | R4.invalid_direction / R4.invalid_max_depth / R4.max_depth_out_of_range | | R3 | 응답 텍스트 후처리 | — | Phase B.2 stub | | R5 | LLM-judge | — | Phase B.2 stub | ## 로그 포맷 (`logs/YYYY-MM-DD.jsonl`) ```jsonl {"ts": 1748220000.0, "tool": "trace_connections", "params": {"start_tag": "raw_material_input"}, "verifier_error": {"verifier_error": "R1.tag_not_found", "hint": "태그 'raw_material_input' 는 DB에 존재하지 않습니다...", "suggested": []}} ``` - Phase C(LoRA) 학습 데이터 자동 수집 용도 - 실패 → hint → 올바른 재호출 trip 기록