cqs 1.26.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
package com.example.app

/**
 * A generic stack implementation.
 */
class Stack<T> {
    private val items = mutableListOf<T>()

    fun push(item: T) {
        items.add(item)
    }

    fun pop(): T? = items.removeLastOrNull()

    fun peek(): T? = items.lastOrNull()

    val size: Int get() = items.size
}

/**
 * Configuration for the application.
 */
interface Config {
    fun get(key: String): String?
    fun getOrDefault(key: String, default: String): String
}

enum class LogLevel {
    DEBUG,
    INFO,
    WARN,
    ERROR
}

/**
 * Simple logger with configurable level.
 */
class Logger(private val level: LogLevel = LogLevel.INFO) {
    fun log(msg: String, msgLevel: LogLevel = LogLevel.INFO) {
        if (msgLevel.ordinal >= level.ordinal) {
            println("[${msgLevel.name}] $msg")
        }
    }
}

fun formatDuration(seconds: Long): String {
    val hours = seconds / 3600
    val minutes = (seconds % 3600) / 60
    val secs = seconds % 60
    return "${hours}h ${minutes}m ${secs}s"
}