feat(install): detect and configure pi coding agent#534
Open
Tensorboyalive wants to merge 2 commits into
Open
Conversation
pi has no native MCP, so wire it up via the binary's CLI mode: install a pi extension (cbmem.ts, registers cbm_* tools), the codebase-memory skill, and an AGENTS.md graph-first reminder. Honors $PI_CODING_AGENT_DIR; falls back to ~/.pi/agent. Adds detection, install/uninstall, install-plan entries, and tests. Co-authored-by: builder-pi-adapter (gpt-5.5 via Overstory) Session-Id: 019ee430-dc1a-7575-a0ed-f2f2cf2f1379 Signed-off-by: Manav Gupta <manav.tensorboy@gmail.com> Session-Id: 019ee430-dc1a-7575-a0ed-f2f2cf2f1379
The pi skill frontmatter description was unquoted but contained ': ' and inner double-quotes, which YAML parses as a nested mapping -> pi's skill loader rejected it. Wrap the value in double quotes and use single quotes for the inline trigger examples, matching how the other skills quote descriptions. Signed-off-by: Manav Gupta <manav.tensorboy@gmail.com> Session-Id: 019ee430-dc1a-7575-a0ed-f2f2cf2f1379
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add pi (
@earendil-works/pi-coding-agent) to the installerinstall/uninstallauto-detect and configure 11 agents today, but notpi. This adds pi as a
first-class target.
Why pi is wired differently (no
mcpServersentry)pi has no native MCP. Its README states: "No MCP. Build CLI tools with
READMEs (Skills), or build an extension that adds MCP support." So instead of an
MCP server entry, the pi adapter installs the three things pi actually consumes,
all driven by the existing CLI mode (
codebase-memory-mcp cli <tool> '<json>'):~/.pi/agent/extensions/cbmem.ts— registerscbm_search_graph,cbm_trace_path,cbm_get_architecture,cbm_semantic_query,cbm_detect_changes,cbm_query_graph,cbm_index,cbm_list_projectsas native pi tools that shell out to the binary;codebase-memoryskill →~/.config/agents/skills/codebase-memory/;cbm_upsert_instructionssentinel upsert.Changes
cbm_detected_agents_tgainsbool pi;cbm_detect_agentssets it.cbm_pi_config_dirhonors$PI_CODING_AGENT_DIR, falls back to~/.pi/agent(mirrors how
cbm_claude_config_dirhonors$CLAUDE_CONFIG_DIR).install_pi_config/uninstall_pi: write/remove the extension + skill +AGENTS.md block; respect
--forceand--dry-run; recorded ininstall --plan.pirow.tests/test_cli.c): detection (incl.$PI_CODING_AGENT_DIR),install writes extension/skill/AGENTS, uninstall reverses it.
Validation
-Wall -Wextra -Werror).install --plan→install→uninstalllifecycle verified against a fakeHOME: extension/skill/AGENTS written then fully removed (sentinel gone).
(malloc/
read_file_str/write_file_str, freed on every path).No existing agent behavior is changed; this is purely additive.