Skip to content

feat(pi): add first-class PI support#394

Draft
felipe3dfx wants to merge 1 commit intoGentleman-Programming:mainfrom
felipe3dfx:pi-support
Draft

feat(pi): add first-class PI support#394
felipe3dfx wants to merge 1 commit intoGentleman-Programming:mainfrom
felipe3dfx:pi-support

Conversation

@felipe3dfx
Copy link
Copy Markdown

@felipe3dfx felipe3dfx commented Apr 29, 2026

🔗 Linked Issue

Closes #363


🏷️ PR Type

What kind of change does this PR introduce?

  • type:bug — Bug fix (non-breaking change that fixes an issue)
  • type:feature — New feature (non-breaking change that adds functionality)
  • type:docs — Documentation only
  • type:refactor — Code refactoring (no functional changes)
  • type:chore — Build, CI, or tooling changes
  • type:breaking-change — Breaking change (fix or feature that changes existing behavior)

📝 Summary

  • Adds first-class PI agent support, including detection, install/sync planning, generated PI SDD assets, and compatibility documentation.
  • Adds PI model picker support with separate PI/OpenCode assignment persistence, preselection from state, and source-specific sync/injection plumbing.
  • Hardens PI RPC model loading for noisy extension startup output and adds regression coverage for mixed PI/OpenCode flows.

📂 Changes

File / Area What Changed
internal/agents/pi/* Adds PI adapter, detection, paths, compatibility checks, Engram extension validation, and RPC model catalog loading.
internal/assets/pi/agents/* Adds PI-native SDD subagent and chain assets.
internal/components/sdd/* Adds PI SDD injection paths, PI-specific model assignment handling, and golden/regression coverage.
internal/tui/* Adds PI model configuration flow, dual OpenCode+PI picker sequencing, PI assignment preselection, and UI warnings.
internal/state/*, internal/app/*, internal/cli/* Persists and hydrates PI model assignments separately from OpenCode; wires install/sync flows.
internal/opencode/*, internal/modelcatalog/* Adds normalized model catalog support and wrapped OpenCode provider parsing.
docs/pi-compatibility.md, docs/*, README.md Documents PI compatibility and platform behavior.
testdata/pi/* Adds PI sample config fixtures.

🧪 Test Plan

Unit Tests

timeout 8m go test -count=1 -timeout=6m ./...

E2E Tests (Docker required)

cd e2e && ./docker-test.sh
  • Unit tests pass (go test ./...) — pending final local/CI validation before marking ready for review
  • E2E tests pass (cd e2e && ./docker-test.sh) — pending
  • Manually tested locally

Additional focused validations already run during development:

go test ./internal/tui ./internal/app ./internal/state ./internal/cli
go test ./internal/agents/pi ./internal/tui
go test ./internal/app ./internal/cli ./internal/state ./internal/model
go test ./internal/tui ./internal/components/sdd ./internal/state

Manual checks performed:

  • PI install flow reaches PI model picker.
  • PI RPC model loading works via stdin request to pi --mode rpc despite extension UI events.
  • PI model assignments persist to ~/.gentle-ai/state.json under pi_model_assignments.
  • Re-opening PI model configuration preselects assignments from state.

🤖 Automated Checks

The following checks run automatically on this PR:

Check Status Description
Check Issue Reference PR body must contain Closes/Fixes/Resolves #N
Check Issue Has status:approved Linked issue must have been approved before work began
Check PR Has type:* Label Exactly one type:* label must be applied
Unit Tests go test ./... must pass
E2E Tests cd e2e && ./docker-test.sh must pass

✅ Contributor Checklist

  • PR is linked to an issue with status:approved — draft pending issue approval (#363 currently needs approval)
  • I have added the appropriate type:* label to this PR
  • Unit tests pass (go test ./...) — pending final validation
  • E2E tests pass (cd e2e && ./docker-test.sh) — pending
  • I have updated documentation if necessary
  • My commits follow Conventional Commits format
  • My commits do not include Co-Authored-By trailers

💬 Notes for Reviewers

Draft PR while we complete final validation and wait for #363 to receive status:approved.

Areas worth reviewing closely:

  • PI/OpenCode model assignment separation (model_assignments vs pi_model_assignments).
  • PI RPC model loading behavior with extension UI events before catalog response.
  • Sync/install state hydration and PI SDD artifact generation.

Add PI support with SDD assets, model picker integration, separate PI/OpenCode assignment persistence, RPC model loading hardening, and regression coverage for install/sync flows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(pi): Add first-class support for pi in gentle-ai

1 participant