cqs 1.22.0

Code intelligence and RAG for AI agents. Semantic search, call graphs, impact analysis, type dependencies, and smart context assembly — in single tool calls. 54 languages + L5X/L5K PLC exports, 91.2% Recall@1 (BGE-large), 0.951 MRR (296 queries). Local ML, GPU-accelerated.
Documentation
//! Doc comment generation and source file rewriting.
//!
//! This module provides per-language doc comment formatting and (in future tasks)
//! source file rewriting for LLM-generated documentation.

pub mod formats;
pub mod rewriter;

use std::path::PathBuf;

use crate::language::Language;

/// Result from Phase 2 LLM doc generation.
/// Carries everything needed to write a doc comment back to a source file:
/// the target location, the generated text, and metadata for cache/idempotency.
#[derive(Debug, Clone)]
pub struct DocCommentResult {
    /// Path to the source file containing the function.
    pub file: PathBuf,
    /// Name of the function/method that needs documentation.
    pub function_name: String,
    /// Content hash of the chunk (for cache lookup and idempotency).
    pub content_hash: String,
    /// Raw doc text generated by the LLM (not yet formatted).
    pub generated_doc: String,
    /// Language of the source file (determines doc comment format).
    pub language: Language,
    /// 1-based line number where the function definition starts.
    pub line_start: usize,
    /// Whether the function already had a doc comment (thin doc replacement).
    pub had_existing_doc: bool,
}