Skip to content

Module Reference

Complete reference for all 26 packages in semantic_code_intelligence/.

analysis

Code explanation and repository summarization.

SymbolTypeDescription
LanguageStatsclassPer-language statistics (files, lines, symbols)
RepoSummaryclassStructured repository summary
CodeExplanationclassExplanation result for a symbol or file
summarize_repo()functionGenerate full repository summary
explain_symbol()functionProduce structural explanation of a symbol
explain_file()functionExplain all symbols in a file
detect_languages()functionDetect languages in the codebase

bridge

HTTP bridge server for IDE extensions and AI agents.

SymbolTypeDescription
BridgeServerclassHTTP server implementing the bridge protocol
AgentRequestclassIncoming bridge request with kind and payload
AgentResponseclassResponse with correlation ID and result
ContextProviderclassProvides context to bridge consumers
VSCodeBridgeclassVS Code-specific bridge adapter
RequestRouterclassRoutes requests by kind
ResponseFormatterclassFormats results for agent consumption
start_bridge()functionStart the bridge server
handle_request()functionProcess a single bridge request

ci

Quality analysis, metrics, hotspots, impact analysis, and CI gates.

SymbolTypeDescription
QualityAnalyzerclassRuns full quality analysis pipeline
QualitySnapshotclassPoint-in-time quality metrics
QualityTrendclassTrend analysis over snapshots
QualityGateclassConfigurable pass/fail gates
HotspotclassHigh-risk code location
HotspotAnalyzerclassDetects hotspots via complexity, churn, fan-in
ImpactReportclassBlast radius analysis result
ImpactAnalyzerclassPredicts change impact via call graph BFS
MetricsCollectorclassCollects code metrics
BanditIssueclassSecurity issue found by Bandit
run_quality_analysis()functionRun full quality pipeline
run_bandit_scan()functionRun Bandit security scan
calculate_maintainability_index()functionCompute maintainability score
detect_hotspots()functionFind high-risk code areas
analyze_impact()functionCompute blast radius of changes

cli

36 Click commands organized by capability. All commands support --json for machine-readable output.

See CLI Reference for the complete command documentation.

config

Pydantic configuration models loaded from .codex/config.json.

SymbolTypeDescription
AppConfigclassRoot configuration aggregating all sub-configs
EmbeddingConfigclassModel name, chunk size, overlap settings
SearchConfigclasstop_k, similarity threshold, hybrid weights
IndexConfigclassIncremental indexing, file extensions
LLMConfigclassProvider, model, API key, temperature
QualityConfigclassQuality gate thresholds
load_config()functionLoad config from .codex/config.json

context

Context building for AI consumption — symbol resolution, call graphs, dependency maps.

SymbolTypeDescription
ContextBuilderclassBuilds rich context windows for AI tools
ContextWindowclassBounded token-aware context container
CallGraphclassFunction call graph (callers/callees)
DependencyMapclassFile-level dependency graph
SessionMemoryclassMulti-turn conversation memory with persistence
SymbolResolverclassResolves symbol names to definitions
TokenCounterclassEstimates token count for context budgets
ReferenceCollectorclassCollects all references to a symbol

daemon

Background file watching and incremental indexing.

SymbolTypeDescription
IndexingDaemonclassLong-running daemon for watch mode
FileWatcherclassFilesystem event watcher
AsyncIndexerclassAsync incremental indexer
DaemonConfigclassDaemon configuration

embeddings

Sentence-transformer model management and vector encoding.

SymbolTypeDescription
ModelInfoclassMetadata about an embedding model
load_model()functionLoad a sentence-transformer model
encode_text()functionEncode text to vector
encode_batch()functionBatch encode multiple texts
list_models()functionList available models
download_model()functionDownload a model by name
switch_model()functionSwitch active embedding model
get_model_info()functionGet model metadata

evolution

Self-improving development loop with budget awareness.

SymbolTypeDescription
EvolutionEngineclassOrchestrates the self-improvement loop
BudgetGuardclassEnforces token/time/cost budgets
TaskSelectorclassSelects next improvement task
PatchGeneratorclassGenerates code patches via LLM
TestRunnerclassRuns tests to validate patches
EvolutionResultclassResult of an evolution cycle
EvolutionTaskclassA single improvement task
EvolutionBudgetclassBudget configuration
evolve()functionRun one evolution cycle

indexing

File scanning, code chunking, and semantic chunk creation.

SymbolTypeDescription
CodeChunkclassA chunk of source code with metadata
ScannedFileclassA scanned source file
SemanticChunkclassChunk with embedding vector attached
scan_directory()functionScan a directory for source files
chunk_file()functionSplit a file into semantic chunks
run_indexing()functionFull indexing pipeline
incremental_index()functionIndex only changed files

llm

LLM provider abstraction with caching, streaming, and investigation chains.

SymbolTypeDescription
LLMProviderclassAbstract base for LLM providers
OpenAIProviderclassOpenAI API provider
OllamaProviderclassOllama local inference provider
MockProviderclassMock provider for testing
CachedProviderclassCaching wrapper around any provider
LLMCacheclassDisk-based LLM response cache
InvestigationChainclassReAct-style autonomous investigation
StreamHandlerclassHandles streaming LLM responses
create_provider()functionFactory for LLM providers

lsp

Language Server Protocol implementation.

SymbolTypeDescription
LSPServerclassLSP server for editor integration
start_lsp()functionStart the LSP server

mcp

Model Context Protocol server using the official MCP SDK.

SymbolTypeDescription
run_mcp_server()functionStart the MCP stdio server
_create_server()functionCreate and configure MCP server instance
_dispatch_tool()functionRoute tool calls to the executor

parsing

Tree-sitter AST parsing for 12 programming languages.

SymbolTypeDescription
SymbolclassExtracted symbol (function, class, method) with location
parse_file()functionParse a file into an AST
extract_symbols()functionExtract symbols from AST
get_language()functionGet tree-sitter language for file extension

Supported languages: Python, JavaScript, TypeScript, Java, Go, Rust, Ruby, C, C++, C#, PHP, Swift

plugins

Extensible plugin system with 22 hook points.

SymbolTypeDescription
PluginManagerclassDiscovery, loading, lifecycle management
PluginBaseclassAbstract base class for plugins
PluginHookenum22 hook point definitions
PluginMetadataclassPlugin name, version, author, hooks
PluginRegistryclassRegistry of loaded plugins
load_plugins()functionDiscover and load plugins from directory

scalability

Performance optimizations for large codebases.

SymbolTypeDescription
BatchProcessorclassProcess items in configurable batches
MemoryAwareEmbedderclassEmbedder that respects memory limits
ParallelScannerclassMulti-threaded file scanning
StreamingIndexerclassStreaming indexer for large repos

FAISS vector search, BM25 keyword search, and hybrid RRF fusion.

SymbolTypeDescription
HybridResultclassCombined search result with score
BM25IndexclassBM25 keyword index
FaissSearcherclassFAISS vector similarity search
hybrid_search()functionCombined vector + keyword search with RRF
vector_search()functionPure vector similarity search
keyword_search()functionPure BM25 keyword search

services

Service-layer abstractions for indexing and search results.

SymbolTypeDescription
IndexingResultclassResult of an indexing operation
SearchResultclassNormalized search result

storage

Persistent storage for vectors, symbols, and metadata.

SymbolTypeDescription
VectorStoreclassFAISS-backed vector storage
SymbolRegistryclassSymbol definition and reference store
IndexStatsclassIndex size, file count, chunk count
QueryHistoryclassSearch query history
ChunkStoreclassStores code chunks with metadata
CacheManagerclassManages disk caches

tools

AI Agent Tool Protocol — structured tool invocation for LLM agents.

SymbolTypeDescription
ToolExecutorclassExecutes tool invocations
ToolInvocationclassTyped tool call request
ToolExecutionResultclassTyped tool call response
ToolErrorclassTool execution error
ToolRegistryclassRegistry of available tools
ToolSchemaclassJSON Schema for a tool

tui

Textual-based interactive terminal UI.

SymbolTypeDescription
CodexaTUIclassMain TUI application
start_tui()functionLaunch the interactive terminal

utils

Logging and utility functions.

SymbolTypeDescription
setup_logging()functionConfigure rich logging
get_logger()functionGet a named logger

web

Web UI and REST API server.

SymbolTypeDescription
WebServerclassHTTP server combining API and UI
APIHandlerclassREST API request handler
UIHandlerclassStatic file and UI handler
start_web()functionStart the web server

workspace

Multi-repo workspace management.

SymbolTypeDescription
WorkspaceclassMulti-repo workspace container
WorkspaceManifestclassWorkspace configuration manifest
create_workspace()functionCreate a new workspace

Released under the MIT License.