Back to stack
Dec 21, 2025
2 min read

Qontextor – The Symbol Mapper

Generates and manages contextual information with dual local/AI modes and powerful query capabilities

Qontextor

The Qontextor agent generates and manages contextual information about the codebase. It operates in two modes: “local” (deterministic) and “AI” (semantic), with powerful querying capabilities.

Dual Modes of Operation

1. Local Mode (Deterministic Analysis):

  • Symbol Extraction: Uses Python’s ast module to parse code and extract symbols (classes, functions, imports, methods)
  • Call Graph Analysis: Utilizes pycg (Python Call Graph) to build dependency maps
  • Jedi Enhancement: Optional type inference and additional dependency information
  • Semantic Enhancement (Complex Mode): Generates embeddings using sentence-transformers for similarity searches
  • All information stored in structured .q.yaml files in qontext.d

2. AI Mode (Semantic Analysis via LLM):

  • Uses configured AI provider for context generation
  • “Qompresses” file content before sending to reduce tokens
  • AI generates YAML structure with symbols, signatures, purposes, dependencies

Scanning & Processing

  • Initial Scan (run_initial_scan): Processes all relevant files in qodeyard
  • Update Scan (run_update_scan): Only processes changed files from construQtor
  • Generates .q.yaml files mirroring qodeyard’s structure

Querying Capabilities

--query <term>: Semantic search using embeddings (requires complex mode)

--verb <pattern>: Find symbols matching verb patterns (e.g., get_.*, create_.*)

--ripple <symbol_name>: Analyze change impact:

  • Files where symbol is defined
  • Symbols that call this symbol (called_by)
  • Symbols this symbol calls (calls)
  • Directly impacted files (depth_1_impact)
  • Indirectly impacted files (depth_2_impact)

What’s configurable

config.yaml (under agents.qontextor):

  • provider (string): 'local' (default) or AI provider name
  • model (string): AI model if using AI provider
  • local_mode (string): 'complex' (with embeddings) or 'fast' (without)