supi Adds Real Code Intelligence to Pi's Coding Agent

supi Adds Real Code Intelligence to Pi's Coding Agent

A young TypeScript extension pack gives Pi's agent LSP awareness, Tree-sitter AST parsing, and semantic refactoring — the things that separate a chatbot from a codebase collaborator.

What you will learn

  • What supi is and why LSP + Tree-sitter matters for a coding agent
  • How to install and enable the extensions in Pi
  • A concrete example of semantic refactoring vs. blind text edits
  • Where supi is genuinely new and where it is still thin
  • How it fits alongside other agent tooling you may already run

Most coding agents still treat your repository like a pile of text. They grep, they guess, they rewrite strings. That works until it doesn't — until a rename silently breaks a call site, or a “safe” refactor leaves a dangling import you only catch at runtime. mrclrchtr/supi is an attempt to fix that for Pi, the coding agent whose extension model lets you bolt on real capabilities. supi is a collection of Pi extensions that give the agent code intelligence: LSP integration, Tree-sitter AST parsing, semantic refactoring, code review, web and Context7 documentation lookup, and ask-user forms.

This is a young repo — it appeared on GitHub Trending with a modest star count and TypeScript as its language — so treat it as an early, opinionated toolkit rather than a battle-tested platform. But the design choices are the interesting part, and they tell you where agent-assisted coding is heading.

Why does a coding agent need LSP and Tree-sitter at all?

Here is the problem supi is built around. When an agent edits code by pattern-matching text, it has no idea what a symbol means. It can rename a function in one file and miss the three other files that call it. It can “fix” an import that was actually re-exported elsewhere. The agent looks confident and is quietly wrong.

LSP — the Language Server Protocol — is the same machinery your editor uses to know that a symbol is a definition, a reference, a type, or a hover target. Tree-sitter gives you a concrete syntax tree, so the agent can reason about structure rather than lines. Put those together and the agent can ask “where is this actually used?” instead of “where does this string appear?” That distinction is the whole ballgame for refactoring.

supi bundles both. According to the repository description, the extensions cover code intelligence via LSP and Tree-sitter AST, plus semantic refactoring, code review, web/Context7 docs, and ask-user forms. That is a lot of surface area for one repo, and it signals the author is aiming at a full “agent that understands your codebase” workflow rather than a single trick.

supi Adds Real Code Intelligence to Pis Coding Agent

How do you install and enable supi?

Because supi is a set of Pi extensions, the install path runs through Pi's extension mechanism rather than a standalone binary. The repository is the source of truth for exact commands, and you should read its README before copying anything — extension APIs move fast. The general shape is:

git clone https://github.com/mrclrchtr/supi.git
cd supi
# follow the repo's install instructions for Pi extensions
# typically: install dependencies, then register the extension with Pi

Once enabled, the extensions expose new capabilities to the agent: code-intelligence queries backed by your language server, AST-aware edits, a review pass, documentation lookups through the web and Context7, and interactive forms so the agent can ask you a structured question instead of guessing. The ask-user forms piece is underrated — it is the difference between an agent that barrels ahead and one that pauses to confirm intent. If you have used hodor, the agentic code reviewer that reads across files, you will recognize the same instinct: give the agent more context before it acts.

What does semantic refactoring actually look like in practice?

Imagine you want to rename a method, parseConfig, that is called from four modules and overridden in a subclass. A text-based agent renames the definition and maybe the obvious call sites. A semantic refactor asks the language server for every reference, checks the AST for overrides, and updates them together — or tells you it cannot safely proceed.

That is the promise supi makes. The code-review extension compounds it: instead of skimming diffs, the agent can walk the AST and the LSP index to flag a changed signature that no caller was updated for. And the Context7 integration means documentation lookups can be grounded in current library docs rather than the model's memory. If you have been following how agents get memory and grounding, this is the same theme from a different angle — see claude-mem, giving every AI agent a memory and Understand-Anything turning any codebase into a knowledge graph.

Where supi falls short

Be clear-eyed. This is a young repository with a small audience, and bundling LSP, Tree-sitter, refactoring, review, docs, and forms into one extension pack means each piece is likely shallower than a dedicated tool. Language-server coverage depends on what you have installed and configured; Tree-sitter grammars have to exist for your language. The web and Context7 docs features are only as good as the sources they reach. And because it is tied to Pi's extension model, it is not portable to other agents without work.

None of that makes it useless. It makes it a bet on a direction. If you already run Pi and you are tired of agents that edit blind, supi is worth a look — clone it, read the README, and test the refactoring on a branch you can throw away. The era of agents that only see text is ending; tools like this are how it ends.

Source and attribution

GitHub Trending
mrclrchtr/supi: Pi coding agent extensions with code intelligence (LSP + Tree-sitter AST), semantic refactoring, code review, web/Context7 docs, and ask-user forms.

Discussion

Add a comment

0/5000
Loading comments...