This commit is contained in:
Shohih Abdul 2026-07-14 18:26:06 -07:00 committed by GitHub
commit 427aabd9cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 82 additions and 2 deletions

1
.gitignore vendored
View File

@ -20,6 +20,7 @@ bin/gstack-global-discover*
.slate/
.cursor/
.openclaw/
.pi/
.hermes/
.gbrain/
.gbrain-source

View File

@ -120,11 +120,29 @@ Or target a specific agent with `./setup --host <name>`:
| Slate | `--host slate` | `~/.slate/skills/gstack-*/` |
| Kiro | `--host kiro` | `~/.kiro/skills/gstack-*/` |
| Hermes | `--host hermes` | `~/.hermes/skills/gstack-*/` |
| Pi | `--host pi` | `~/.pi/agent/skills/gstack-*/` |
| GBrain (mod) | `--host gbrain` | `~/.gbrain/skills/gstack-*/` |
**Want to add support for another agent?** See [docs/ADDING_A_HOST.md](docs/ADDING_A_HOST.md).
It's one TypeScript config file, zero code changes.
### Pi
[Pi](https://pi.dev) implements the [Agent Skills standard](https://agentskills.io/specification)
end-to-end, so every gstack skill works out of the box once the skills directory
is configured. Install gstack into pi's global agent skills path:
```bash
git clone --single-branch --depth 1 https://github.com/garrytan/gstack.git ~/gstack
cd ~/gstack && ./setup --host pi
```
Skills land at `~/.pi/agent/skills/gstack-*/`. For project-local skills (trusted
project), pi also discovers `.pi/skills/`. Pi loads skill descriptions at startup
and lazy-loads the full `SKILL.md` on demand, matching Claude Code's behavior.
Invoke a skill with `/skill:<name>` (e.g. `/skill:review`, `/skill:ship`).
## See it work
```

View File

@ -16,9 +16,10 @@ import cursor from './cursor';
import openclaw from './openclaw';
import hermes from './hermes';
import gbrain from './gbrain';
import pi from './pi';
/** All registered host configs. Add new hosts here. */
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain];
export const ALL_HOST_CONFIGS: HostConfig[] = [claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain, pi];
/** Map from host name to config. */
export const HOST_CONFIG_MAP: Record<string, HostConfig> = Object.fromEntries(
@ -65,4 +66,4 @@ export function getExternalHosts(): HostConfig[] {
}
// Re-export individual configs for direct import
export { claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain };
export { claude, codex, factory, kiro, opencode, slate, cursor, openclaw, hermes, gbrain, pi };

60
hosts/pi.ts Normal file
View File

@ -0,0 +1,60 @@
import type { HostConfig } from '../scripts/host-config';
const pi: HostConfig = {
name: 'pi',
displayName: 'Pi',
cliCommand: 'pi',
cliAliases: [],
globalRoot: '.pi/agent/skills/gstack',
localSkillRoot: '.pi/skills/gstack',
hostSubdir: '.pi',
usesEnvVars: true,
frontmatter: {
mode: 'allowlist',
keepFields: ['name', 'description'],
descriptionLimit: 1024,
},
generation: {
generateMetadata: false,
skipSkills: ['codex'],
},
pathRewrites: [
{ from: '~/.claude/skills/gstack', to: '~/.pi/agent/skills/gstack' },
{ from: '.claude/skills/gstack', to: '.pi/skills/gstack' },
{ from: '.claude/skills', to: '.pi/skills' },
],
toolRewrites: {
'use the Bash tool': 'use the bash tool',
'use the Write tool': 'use the write tool',
'use the Read tool': 'use the read tool',
'use the Edit tool': 'use the edit tool',
'use the Grep tool': 'use the grep tool',
'use the Glob tool': 'use the find tool',
'use the Agent tool': 'use the agent tool',
'the Bash tool': 'the bash tool',
'the Read tool': 'the read tool',
'the Write tool': 'the write tool',
'the Edit tool': 'the edit tool',
},
suppressedResolvers: ['GBRAIN_CONTEXT_LOAD', 'GBRAIN_SAVE_RESULTS'],
runtimeRoot: {
globalSymlinks: ['bin', 'browse/dist', 'browse/bin', 'design/dist', 'gstack-upgrade', 'ETHOS.md', 'review/specialists', 'qa/templates', 'qa/references', 'plan-devex-review/dx-hall-of-fame.md'],
globalFiles: {
'review': ['checklist.md', 'design-checklist.md', 'greptile-triage.md', 'TODOS-format.md'],
},
},
install: {
prefixable: false,
linkingStrategy: 'symlink-generated',
},
learningsMode: 'basic',
};
export default pi;