Analyzers API Reference¶
Auto-generated from source code docstrings.
Context Compiler¶
analyzers.context_compiler ¶
Context Compiler - One-shot project understanding for AI agents.
Runs all analyzers and compresses their output into a single structured document optimized for AI consumption. This is the "drop an AI into a project and it immediately understands everything" tool.
The output is designed to fit within a reasonable context window while giving an AI agent enough information to: - Understand what the project does - Know where everything is - Understand the dependency structure - Know which components are extractable - Start working immediately
Usage
python context_compiler.py
Functions¶
compile_context ¶
Compile full project context.
Source code in Tools/analyzers/context_compiler.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
format_markdown ¶
Format compiled context as markdown.
Source code in Tools/analyzers/context_compiler.py
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | |
Code Map¶
analyzers.codemap ¶
Code Map Generator - The most important AI agent accelerator.
Scans a codebase and produces a structured index of everything an AI agent needs to understand the project without reading every file: - File roles (config, source, test, docs, build) - Classes with methods and inheritance - Functions with signatures - Exports and entry points - Key constants and type definitions
Supports: Python, JavaScript/TypeScript, Rust, Go, C#, Java
Output: JSON (default) or markdown (--markdown)
Usage
python codemap.py
Functions¶
generate_codemap ¶
Generate a complete code map for a project.
Source code in Tools/analyzers/codemap.py
scan_file ¶
Scan a single file and return its map entry.
Source code in Tools/analyzers/codemap.py
find_entry_points ¶
Detect likely entry points for the project.
Source code in Tools/analyzers/codemap.py
classify_role ¶
Classify a file's role based on its path and name.
Source code in Tools/analyzers/codemap.py
Boundary Detector¶
analyzers.boundary_detector ¶
Boundary Detector - Find natural component boundaries in codebases.
Analyzes the import/dependency graph to detect clusters of files that naturally belong together. Helps AI agents decide WHERE to cut when extracting components.
Outputs
- Detected component clusters (files that import each other heavily)
- Bridge files (connect multiple clusters - extract carefully)
- Orphan files (no imports to/from - easy to extract or remove)
- Suggested extraction units with dependency counts
- Cross-cluster dependencies (what breaks if you extract)
Supports: Python, JavaScript/TypeScript, Go, Rust
Usage
python boundary_detector.py
Functions¶
detect_boundaries ¶
Run full boundary detection.
Source code in Tools/analyzers/boundary_detector.py
build_import_graph ¶
Build a full import graph for the project.
Source code in Tools/analyzers/boundary_detector.py
detect_clusters ¶
Detect clusters of tightly connected files using simple community detection.
Uses a greedy approach: start from each unvisited file, expand to include files that share the most import connections with the current cluster.
Source code in Tools/analyzers/boundary_detector.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
find_bridge_files ¶
Find files that connect multiple clusters (high betweenness).
Source code in Tools/analyzers/boundary_detector.py
find_orphans ¶
Find files with no import relationships (easy to extract/remove).
Source code in Tools/analyzers/boundary_detector.py
Interface Extractor¶
analyzers.interface_extractor ¶
Interface Extractor - Extract public API surfaces from codebases.
Answers: "What does this module/package expose?" without reading implementations. An AI agent uses this to understand boundaries - what can be imported, called, or composed from each part of a project.
Extracts
- Public function signatures (with types)
- Public class interfaces (public methods, no internals)
- Exported types, interfaces, enums
- Module-level all / export declarations
- Package-level re-exports
Supports: Python, JavaScript/TypeScript, Rust, Go, C#
Output: JSON (default) or markdown (--markdown)
Usage
python interface_extractor.py
Functions¶
extract_interfaces ¶
Extract all public interfaces from a project.
Source code in Tools/analyzers/interface_extractor.py
extract_python_interface ¶
Extract public interface from a Python file.
Source code in Tools/analyzers/interface_extractor.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
extract_js_ts_interface ¶
Extract public interface from a JS/TS file.
Source code in Tools/analyzers/interface_extractor.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
extract_rust_interface ¶
Extract public interface from a Rust file.
Source code in Tools/analyzers/interface_extractor.py
extract_go_interface ¶
Extract public interface from a Go file (exported = capitalized).
Source code in Tools/analyzers/interface_extractor.py
Dependency Analyzer¶
analyzers.dependency_analyzer ¶
Dependency Analyzer - Multi-language dependency detection.
Maps both internal and external dependencies for a project. Answers: "What does this project depend on?" and "What depends on what internally?"
Supports: Python, JavaScript/TypeScript, Rust, Go, C#, Java
For internal import graphs and boundary detection, see boundary_detector.py. This tool focuses on: - External/third-party dependency enumeration - Internal import graph (per-file) - Most imported/importing modules - Dependency counts by category (stdlib, third-party, local)
Output: JSON (default) or markdown (--markdown)
Usage
python dependency_analyzer.py
Functions¶
analyze_dependencies ¶
Auto-detect language and analyze dependencies.
Source code in Tools/analyzers/dependency_analyzer.py
analyze_python_deps ¶
Analyze Python project dependencies.
Source code in Tools/analyzers/dependency_analyzer.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
analyze_node_deps ¶
Analyze Node.js/TypeScript project dependencies.
Source code in Tools/analyzers/dependency_analyzer.py
analyze_rust_deps ¶
Analyze Rust project dependencies from Cargo.toml.
Source code in Tools/analyzers/dependency_analyzer.py
analyze_go_deps ¶
Analyze Go project dependencies from go.mod.
Source code in Tools/analyzers/dependency_analyzer.py
Structure Analyzer¶
analyzers.structure_analyzer ¶
Structure Analyzer
Analyzes the directory structure of a project and produces a summary report.
Usage
python structure_analyzer.py
Example
python structure_analyzer.py ../Ship_Yard/_intake/semantic-kernel
Functions¶
analyze_structure ¶
Analyze the structure of a project directory.
Source code in Tools/analyzers/structure_analyzer.py
Platform Detector¶
analyzers.platform_detector ¶
Platform Detector - Detect programming platforms in projects
Based on Microsoft Oryx detection patterns. Auto-classifies projects by scanning for marker files.
Usage
python platform_detector.py
Example
python platform_detector.py ../Ship_Yard/_intake/semantic-kernel python platform_detector.py ../Projects/my-app --json
Functions¶
detect_all_platforms ¶
Detect all platforms in a project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_path
|
Path
|
Path to the project |
required |
Returns:
| Type | Description |
|---|---|
DetectionResult
|
DetectionResult with all detected platforms |
Source code in Tools/analyzers/platform_detector.py
detect_platform ¶
Detect if a specific platform is present in the project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_path
|
Path
|
Path to the project |
required |
platform
|
str
|
Platform name |
required |
config
|
dict
|
Platform configuration |
required |
Returns:
| Type | Description |
|---|---|
Optional[PlatformDetection]
|
PlatformDetection if found, None otherwise |