Finalised
True-Walker deterministic multi-language code analysis engine

Static Analysis · Developer Tooling

True-Walker — Multi-Language Static Analysis

True-Walker converts source code into a structured behavioural model that can be inspected by people and consumed by tooling. Rather than depending on naming conventions, it records what a file exposes and does: function signatures, import usage, class structure, routes, return shapes, assignments and conditionals.

Each language family runs through its own worker with only the relevant YAML rules compiled once. The resulting per-file snapshots are grouped and partitioned into deterministic JSON, creating a stable foundation for architecture search, impact analysis and InfraMap queries.

Key Features

Behaviour-first code mapping

Classifies software through observable structure and control flow instead of project naming, producing a dependable account of routes, data shapes and operational behaviour.

Polyglot analysis pipeline

Recognises 13 source extensions across eight parser families and isolates each family in its own worker so mixed-language repositories can be scanned through one engine.

Relationship resolution

Maps imported identifiers to their usage lines and containing functions, attaches return shapes to definitions and resolves nested route prefixes into complete HTTP paths.

Query-ready snapshots

Outputs stable, structured JSON with source locations and language partitions, making the result suitable for navigation, architecture queries and downstream visualisation.

Implementation

Language-grouped scanner

A single repository walk assigns supported files to their parser family, then launches a dedicated concurrent worker for every language present in the codebase.

Structural extraction layer

Tree-sitter grammars, language-aware masking and depth-sensitive parsing protect analysis from false matches inside comments, strings, generics and nested blocks.

Compiled rule packs

YAML definitions describe functions, imports, classes, fields, routes, returns, assignments and conditionals; workers compile only the rules relevant to their source formats and reuse them for every file.

Concurrent snapshot writer

Workers emit bounded metadata snapshots rather than retaining source buffers, while the writer safely aggregates results into language partitions and a manifest with structural counts.

Architecture in motion

How it works

Repository to behavioural map

True-Walker routes each source file into the correct parser family, runs the applicable extraction rules and emits a consistent snapshot regardless of the repository's language mix.

  1. Project tree
  2. Extension router
  3. Language worker
  4. Compiled rule set
  5. Per-file snapshot

13 recognised source extensions are consolidated into eight parser families with one worker and one compiled rule set per family.

Definition to usage context

The engine connects declarations with surrounding behaviour so consumers receive more than a symbol list: they receive where a dependency is used, which function owns it and what that function returns.

  1. Function boundaries
  2. Import and alias resolution
  3. Usage-site scan
  4. Containing function
  5. Return and control-flow context

Usage sites retain line numbers and owning functions; return, assignment and conditional records are attached to the same behavioural context.

Snapshots to architecture queries

Concurrent worker output is converted into deterministic JSON partitions and a compact manifest that downstream tools can load selectively rather than reparsing the repository.

  1. Worker result channels
  2. Thread-safe aggregation
  3. Language partitions
  4. Manifest counts
  5. InfraMap query layer

Every snapshot preserves source paths and positions while the manifest exposes file, function, import, class and route totals by partition.

Design Choices

Behaviour over labels

The analysis model derives meaning from route declarations, return shapes, usage sites and control flow rather than trusting filenames or function names to describe intent.

Deterministic before probabilistic

Repeatable rules produce inspectable evidence with stable source coordinates, giving higher-level search or AI systems a grounded representation instead of raw code alone.

Compile rules once per language

Workers discard irrelevant definitions at construction time and reuse compiled expressions across their file group, keeping the hot extraction path focused.

Retain metadata, release source

Each file is read, analysed and released immediately; only the compact structural snapshot survives, bounding memory around useful output rather than repository size.