Add Pi coding agent as a supported host#1220
Closed
qwadratic wants to merge 9 commits intogarrytan:mainfrom
Closed
Add Pi coding agent as a supported host#1220qwadratic wants to merge 9 commits intogarrytan:mainfrom
qwadratic wants to merge 9 commits intogarrytan:mainfrom
Conversation
f730a37 to
d5765fd
Compare
added 5 commits
April 26, 2026 23:10
Add hosts/pi.ts for Mario Zechner's Pi coding agent (https://github.com/mariozechner/pi). Pi is an open-source CLI coding agent with its own skill/extension system. This adapter enables GStack's gen-skill-docs pipeline to generate Pi-specific SKILL.md files with: - Path rewrites: .claude/skills/ → .pi/agent/skills/ - Tool rewrites: AskUserQuestion → ask_user - Frontmatter: allowlist mode (name + description only) - Suppressed resolvers: GBRAIN_CONTEXT_LOAD, GBRAIN_SAVE_RESULTS - Skip: codex skill (Claude-specific) Companion migrator tool: https://github.com/qwadratic/pi-gstack Tested with bun run gen:skill-docs --host pi — generates 43 skills, all validation tests pass.
additional pathRewrites: - CLAUDE.md -> AGENTS.md (Pi uses AGENTS.md for project config) additional toolRewrites: - Invoke the Skill tool -> Read the skill file - via the Skill tool -> by reading the skill file - ExitPlanMode -> /plan (toggle off) companion: https://github.com/qwadratic/pi-gstack
f1f9114 to
f4b2837
Compare
added 4 commits
April 26, 2026 23:50
Templates use short names (e.g., 'ship') but external hosts emit into gstack-prefixed directories (e.g., gstack-ship/). Pi requires the frontmatter name to match the parent directory — name: ship in gstack-ship/ triggers a skill conflict warning on load. After transformFrontmatter, rewrite the name: field to use the externalSkillName (the directory name). Fixes all 39 skill conflicts reported on Pi load. Also: bump host count assertion 10→11, refresh golden fixtures, add .pi/ to .gitignore.
./setup --host pi now prints install instructions pointing to the pi-gstack companion repo. Pi added to the README host table with a link to the companion installer. Without this, Pi users who clone gstack have no way to discover that a companion extension exists for slash commands, plan mode, and ask_user polyfills.
Other external hosts don't require the frontmatter name to match the directory name. Reverts golden file changes for Codex and Factory.
Pi has no dedicated Grep tool (only Read, Write, Edit, Bash). Rewrites 'the Grep tool' → 'the Bash tool (grep)' across all variants including the post-pathRewrite form 'Pi's Grep tool'.
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.
Adds Pi as a supported host. Follows the Adding a Host guide and existing patterns.
Changes (8 files, +101/-8)
hosts/pi.tshosts/index.tsALL_HOST_CONFIGS+ re-exports.gitignore.pi/(generated output, gitignored)README.mdsetup--host picompanion installer instructionsscripts/gen-skill-docs.tsname:must match directory nametest/host-config.test.tsHost adapter config
.pi/agent/skills/gstack(global),.pi/skills/gstack(local)name+descriptiononly.claude/skills/→.pi/agent/skills/,Claude Code→Pi,CLAUDE.md→AGENTS.mdAskUserQuestion→ask_user,WebSearch→web_search,Agent tool→subagent(5 variants),Grep tool,Skill tool→Read the skill file,ExitPlanMode→/plan (toggle off)codexsymlink-generatedbasicGenerator fix (Pi-only)
Pi requires the frontmatter
name:to match the parent directory. Templates use short names (ship) but Pi emits intogstack-ship/. Added a Pi-scoped rewrite inprocessExternalHost()soname: ship→name: gstack-shiponly whenhost === 'pi'. Other external hosts are unaffected.Verification
bun test test/host-config.test.ts test/gen-skill-docs.test.ts test/skill-validation.test.ts→ 768 pass, 0 failbun run gen:skill-docs --host pi→ 43 skills generated, no.claudepath leakagebun run skill:check→ all Pi generated files fresh ✅grep -r '.claude/skills' .pi/skills/→ no results (clean rewrite)Companion installer
pi-gstack handles the Pi side:
~/.pi/agent/skills/Related: #1218