Open
Conversation
* feat: add Pi as native host for gstack skill generation
Add --host pi support to gen-skill-docs.ts and the setup script. Pi skills
are generated to .pi/skills/gstack-{name}/SKILL.md with Pi-specific preamble
paths ($GSTACK_ROOT defaulting to ~/.pi/agent/skills/gstack), repo-local
override from .pi/skills/gstack, and correct frontmatter name: fields that
match directory names (gstack-review, not review) to pass Pi's validation.
Setup --host pi generates .pi/ skill docs, creates a runtime root at
~/.pi/agent/skills/gstack with symlinked bin/browse/review assets, and
copies generated skills into ~/.pi/agent/skills/.
* test: add Pi host generation + setup validation tests
Mirrors the existing Codex test suite for the new --host pi support:
Pi generation (18 tests):
- Output path verification for all generated skills
- Skill naming (gstack- prefix, no double-prefix)
- Frontmatter: name+description only, name matches directory
- No openai.yaml metadata (Pi doesn't use it)
- No .claude/ or .agents/ path leaks in output
- /codex skill excluded
- Preamble resolves from ~/.pi/agent/skills/gstack
- Sidecar paths use .pi/skills/gstack/review/ (not gstack-review/)
- Auto-generated headers present
- Dry-run freshness check
- Path rewrite rules apply to all skills
- Claude output unaffected by Pi generation
- Hook skills have safety prose
- Multiline descriptions preserved
Setup validation (5 tests):
- INSTALL_PI flag exists
- Pi install section creates runtime root with symlinked assets
- Generated skills copied from .pi/skills/ to ~/.pi/agent/skills/
- gen:skill-docs --host pi runs before install
- Old whole-dir symlink migration handled
Also updated auto mode test to check for pi binary detection.
* docs: document Pi vs Codex host differences in ARCHITECTURE.md
Add 'Multi-host generation' section to ARCHITECTURE.md covering:
- Shared behavior between Pi and Codex (frontmatter, preamble, path
rewriting, /codex exclusion, skill naming)
- Differences table (output dirs, name: field, openai.yaml, install
method, migration, runtime root, repo-local detection)
- Path rewrite rules with ordering and sidecar explanation
- Setup install flow (generation, runtime root, skill copy, cleanup)
Source files (gen-skill-docs.ts, setup) now have short pointers to
ARCHITECTURE.md instead of inline comment blocks. Small inline comments
kept at key decision points (HOST_PATHS, preamble, transformFrontmatter,
openai.yaml).
* docs: compress multi-host generation section in ARCHITECTURE.md
74 lines → 46 lines. Consolidated shared transforms into a single
paragraph, merged 3 directory rows in the diff table, unified path
rewrite rules with brace notation, and trimmed setup flow prose.
All material facts preserved.
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.
Summary
This PR adds an easy-to-install path for
gstackinto the open source pi coding harness.Pi host support for
gen-skill-docsandsetup:--host pigenerates Pi-compatible SKILL.md files with correct frontmatter (name:must match directory), path rewrites (.claude/→.pi/), and preamble shell variables ($GSTACK_ROOTdefaulting to~/.pi/agent/skills/gstack).setupinstalls Pi skills viacpto~/.pi/agent/skills/gstack-*/whenINSTALL_PI=1. (gen-skill-docs.ts,setup)Architecture docs: New "Multi-host generation (Claude, Codex, Pi)" section in
ARCHITECTURE.mdcovering shared transforms, Pi vs Codex differences table, path rewrite rules (order-sensitive, sidecar handling), and setup flow.23 new tests: Pi template generation (frontmatter, path rewrites,
/codexexclusion, skill naming, sidecar paths, dry-run freshness) and setup install flow (directory creation, SKILL.md copying, runtime root symlinks, cleanup of stale layouts).Pre-Landing Review
No issues found.
Test plan