Add XML doc to all service interfaces and implementations (#26)

- Update CLAUDE.md: replace incorrect 'no XML doc on internal code' rule
  with the correct convention (XML doc on all public methods and
  non-trivial private/protected helpers)
- Restore /// <summary> on FileDownloadController private helpers
  (HandleRangeRequest, StreamRangeAsync)
- Add full XML doc to all service contracts:
  ICaptchaVerifier, IEmailSender, ICvMatcherService, IJobTextExtractor,
  IJobTokenService, IDocumentClassifier, IRagService, ITextChunker,
  ITextExtractor, IEmailTemplateService, ITemplateService
- Add /// <summary> and /// <inheritdoc /> to all concrete service classes
  and their methods: RecaptchaVerifier, EmailApiEmailSender,
  SmtpEmailDispatcher, CvMatcherService, JobTextExtractor, JobTokenService,
  RagService, DocumentClassifier, TextChunker, TextExtractor,
  HtmlJobSearcher, CvSearchEmailSender, CvSearchJobTask,
  EmailTemplateService, DbTemplateService

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 09:17:42 +03:00
parent 4ee4a59b5e
commit 16bb195cb5
28 changed files with 436 additions and 6 deletions
@@ -2,7 +2,20 @@ using Rag.Models;
namespace Api.Services.Contracts;
/// <summary>
/// Classifies a document into a known type (cv, job, contract, etc.) and extracts a title.
/// </summary>
public interface IDocumentClassifier
{
/// <summary>
/// Determines the document type and title from the provided text.
/// Uses <paramref name="providedType"/> and <paramref name="providedTitle"/> directly when supplied;
/// otherwise falls back to a keyword-frequency heuristic over the text.
/// </summary>
/// <param name="text">Full document text to classify.</param>
/// <param name="providedType">Caller-supplied document type hint; skips heuristic when non-empty.</param>
/// <param name="providedTitle">Caller-supplied document title; skips title extraction when non-empty.</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>A <see cref="DocumentClassification"/> with type, confidence score, and title.</returns>
Task<DocumentClassification> ClassifyAsync(string text, string? providedType, string? providedTitle, CancellationToken ct);
}