@mrclrchtr/supi-code-intelligence
SuPi Code Intelligence extension — architecture briefs, caller/callee analysis, impact assessment, and pattern search for pi
Package details
Install @mrclrchtr/supi-code-intelligence from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@mrclrchtr/supi-code-intelligence- Package
@mrclrchtr/supi-code-intelligence- Version
1.11.2- Published
- Jun 6, 2026
- Downloads
- 2,540/mo · 353/wk
- Author
- mrclrchtr
- License
- MIT
- Types
- extension
- Size
- 44.5 MB
- Dependencies
- 4 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/extension.ts",
"node_modules/@mrclrchtr/supi-lsp/src/extension.ts",
"node_modules/@mrclrchtr/supi-tree-sitter/src/extension.ts"
],
"image": "https://raw.githubusercontent.com/mrclrchtr/supi/main/packages/supi-code-intelligence/assets/logo.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@mrclrchtr/supi-code-intelligence
Adds a focused code-understanding toolset to the pi coding agent.
Install
pi install npm:@mrclrchtr/supi-code-intelligence
For local development:
pi install ./packages/supi-code-intelligence

What you get
After install, pi gets:
code_brief— interpretive orientation for a project, package, directory, file, or symbolcode_map— factual repo/package/directory inventorycode_relations— callers, callees, or implementations for a resolved targetcode_affected— blast radius, downstream impact, and risk for a targetcode_pattern— explicit literal, regex, or structured searchcode_refactor— direct-apply semantic rename with safety gates- a lightweight hidden architecture overview injected near the start of a session when a project model can be built
- all
lsp_*expert tools from@mrclrchtr/supi-lsp(hover, definition, references, implementation, diagnostics, rename, code actions, recover, document/workspace symbols) - all
tree_sitter_*expert tools from@mrclrchtr/supi-tree-sitter(outline, imports, exports, node-at, query, callees) - bundled support from
@mrclrchtr/supi-lsp,@mrclrchtr/supi-tree-sitter, and@mrclrchtr/supi-core
Installing @mrclrchtr/supi-code-intelligence activates all three tool families. Each family is owned and documented by its own package:
This package is for questions like:
what is in this package or directory?
who calls this symbol?
what does this function call?
what is the likely blast radius of a change?
where is this pattern defined, imported, or exported?
@mrclrchtr/supi-lspowns the semanticlsp_*tools@mrclrchtr/supi-tree-sitterowns the structuraltree_sitter_*tools@mrclrchtr/supi-code-intelligenceowns the analysiscode_*tools and provides cross-family orchestration guidance
Tool overview
code_brief
Interpretive orientation. Use for prioritized context, start-here guidance, and project/package/directory/file/symbol overview.
code_map
Strictly factual inventory. Accepts the repo root, a package root, or any directory path. Rejects file paths.
code_relations
Relationship tracing tool with:
kind: "callers"kind: "callees"kind: "implementations"
callers and implementations are semantic-only. callees is structural-only.
code_affected
Semantic blast-radius analysis for a concrete target. This tool no longer falls back to grep-style guesses.
code_pattern
Explicit search tool for:
- literal search
- regex search (
regex: true) - structured search (
kind: "definition" | "export" | "import")
This is the only tool in the family that intentionally returns heuristic/text-search results.
Shared input conventions
Depending on the tool, inputs may include:
pathfilelinecharactersymbolkindpatternregexexportedOnlymaxResultscontextLinessummary
Notes:
- line and character positions are 1-based
lineandcharacterrequirefile, notpath- a leading
@is stripped frompathandfile - non-search tools do not silently fall back to heuristic grep behavior
Result style
Results report confidence such as:
semanticstructuralheuristicunavailable
heuristic is now primarily a code_pattern concern. The other tools prefer explicit unavailable states over silent search fallbacks.
Architecture
@mrclrchtr/supi-code-intelligence is the orchestration layer that consumes
semantic and structural providers through the shared workspace broker and routes
user intents through a planner.
supi-code-runtime ← shared broker + canonical provider/result contracts
↑
supi-lsp / supi-tree-sitter
(semantic) (structural)
↑
supi-code-intelligence ← planner, presentation, code_* tools, code_refactor
Package surfaces
@mrclrchtr/supi-code-intelligence/api— reusable architecture, brief, and target-resolution helpers@mrclrchtr/supi-code-intelligence/extension— pi extension entrypoint
Example:
import { buildArchitectureModel, generateOverview } from "@mrclrchtr/supi-code-intelligence/api";
const model = await buildArchitectureModel("/project");
const overview = generateOverview(model);
Source
src/code-intelligence.ts— extension entry point: overview injection and tool registrationsrc/use-case/— typed orchestration modules for brief, map, relations, affected, and patternsrc/presentation/markdown/— markdown renderers that format use-case resultssrc/targeting/— typed target-resolution pipelinesrc/tool/tool-specs.ts— single source of truth for the public tool surfacesrc/tool/register-tools.ts— focused tool registration wiringsrc/tool/guidance.ts— prompt surfaces derived from tool specssrc/tool/execute-*.ts— thin adapters that validate params and route to use-case/presentation layers
