Pi.CodeMap (pi_bridge v0.6.22)

Copy Markdown View Source

Reach-backed semantic code map and reflection helpers for eval.

Pi.CodeMap turns Reach's project graph APIs into compact eval workflows. It is intentionally evidence-oriented: use it after edits to ask what changed, what depends on it, and whether Reach sees hotspots/smells/refactor leads.

Eval preloads alias Pi.CodeMap, as: CodeMap.

Summary

Functions

Returns true when Reach is available in the current project BEAM.

Returns mixed-effect boundary candidates.

Returns callees for a target.

Returns callers for a target.

Returns an agent-readable context bundle for a target.

Returns module coupling and cycles.

Returns cross-function data-flow summary.

Returns dominator-depth metrics.

Returns effectful call summaries.

Resolves a target string, MFA, or file:line into a function summary.

Returns high-risk functions ranked by Reach hotspot score.

Returns Reach impact analysis for a target.

Returns module metrics.

Builds a Reach project graph for the current Mix project or selected paths.

Runs a post-edit semantic reflection.

Renders reflect/1 as a compact tree output.

Returns Reach smell findings, optionally filtered by :path.

Returns a project-wide Reach summary.

Functions

available?()

Returns true when Reach is available in the current project BEAM.

boundaries(opts \\ [])

Returns mixed-effect boundary candidates.

callees(target, opts \\ [])

Returns callees for a target.

callers(target, opts \\ [])

Returns callers for a target.

context(target, opts \\ [])

Returns an agent-readable context bundle for a target.

coupling(opts \\ [])

Returns module coupling and cycles.

data_flow(opts \\ [])

Returns cross-function data-flow summary.

depth(opts \\ [])

Returns dominator-depth metrics.

effects(opts \\ [])

Returns effectful call summaries.

find(target, opts \\ [])

Resolves a target string, MFA, or file:line into a function summary.

hotspots(opts \\ [])

Returns high-risk functions ranked by Reach hotspot score.

impact(target, opts \\ [])

Returns Reach impact analysis for a target.

modules(opts \\ [])

Returns module metrics.

project(opts \\ [])

Builds a Reach project graph for the current Mix project or selected paths.

reflect(opts \\ [])

Runs a post-edit semantic reflection.

reflect_output(opts \\ [])

Renders reflect/1 as a compact tree output.

smells(opts \\ [])

Returns Reach smell findings, optionally filtered by :path.

summary(opts \\ [])

Returns a project-wide Reach summary.