Skip to content

Add Pi support for MCP, plugins, and subagents - #179

Merged
yourconscience merged 1 commit into
mainfrom
feature/pi-package-support
Sep 14, 2026
Merged

yourconscience merged 1 commit into
mainfrom
feature/pi-package-support

Conversation

@yourconscience

@yourconscience yourconscience commented Sep 14, 2026

Copy link
Copy Markdown
Owner

What changed

  • render canonical roles into the user agent directory consumed by pi-subagents
  • sync canonical MCP and Agent Plugin servers into the config consumed by pi-mcp-adapter
  • manage Pi root instructions alongside skills
  • keep OMP as a separate harness target

Verification

  • go test ./...
  • real Pi sync: 21 skills, 5 agents, and 1 MCP server report synced
  • RPC startup smoke loaded MCP, subagent, Feynman, questionnaire, and todo commands

Summary by Sourcery

Enable managed Pi roles, MCP, Agent Plugins, and root instructions while preserving OMP as a separate harness target.

New Features:

  • Add managed Pi role rendering through pi-subagents, including model, thinking, and tool metadata support.
  • Add Pi MCP and Agent Plugin synchronization through pi-mcp-adapter.
  • Manage Pi root instructions alongside skills.

Enhancements:

  • Keep vanilla Pi and the OMP fork as separate harness targets with distinct capabilities and configuration paths.

Documentation:

  • Document Pi role, MCP, Agent Plugin, and root-instruction support and the required Pi packages.

Tests:

  • Add coverage for Pi skills, roles, MCP configuration, root instructions, and separation from OMP.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @yourconscience, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 17 hours and 49 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: dc8af6ac-89f4-4f33-842e-3089539b889d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Reviewer's Guide

Pi is upgraded from skills-only support to a managed integration: canonical roles are rendered for pi-subagents, MCP and Agent Plugin servers are synchronized through pi-mcp-adapter, and root instructions are linked into Pi’s agent directory, with tests and documentation updated while OMP remains separate.

Sequence diagram for syncing Pi roles and MCP servers

sequenceDiagram
    participant User
    participant Dotagents
    participant PiAgents as Pi user agents
    participant PiConfig as Pi mcp.json
    participant Subagents as pi-subagents
    participant Adapter as pi-mcp-adapter

    User->>Dotagents: sync
    Dotagents->>PiAgents: renderPiAgentRole
    Dotagents->>PiConfig: patchJSONMCPServer
    PiAgents-->>Subagents: load rendered roles
    PiConfig-->>Adapter: load managed MCP entries
    Subagents-->>User: subagent commands available
    Adapter-->>User: MCP and Agent Plugin servers available
Loading

File-Level Changes

Change Details Files
Adds Pi as a first-class sync target for roles, MCP, and root instructions while preserving OMP as a distinct harness.
  • Registers Pi-specific YAML configuration and enables Pi MCP, role, and instruction capabilities.
  • Projects canonical roles to Pi-subagents Markdown with Pi tool-name mappings and effort/model handling.
  • Writes MCP servers to Pi's adapter config and preserves named Agent Plugin projections.
  • Adds Pi agent-root scaffolding and sync coverage for skills, roles, MCP, and AGENTS.md.
  • Updates capability tests, documentation, and troubleshooting guidance for the required Pi packages.
cmd/dotagents/agents.go
cmd/dotagents/harness.go
cmd/dotagents/pi_agent.go
cmd/dotagents/setup_scaffold.go
cmd/dotagents/pluginmcp_test.go
cmd/dotagents/harness_test.go
cmd/dotagents/setup_separation_test.go
cmd/dotagents/sync_test.go
README.md
docs/roles.md
docs/site/index.html
docs/troubleshooting.md
skills/dotagents/SKILL.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bffa130f78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{Name: agentOMP, Enabled: true, SkillRoot: "~/.omp/agent/skills", AgentRoot: "~/.omp/agent/agents", Detect: "omp"},
{Name: agentOpenCode, Enabled: true, SkillRoot: "~/.config/opencode/skills", AgentRoot: "~/.config/opencode/agents", Detect: "opencode"},
{Name: agentPi, Enabled: true, SkillRoot: "~/.pi/agent/skills", Detect: "pi"},
{Name: agentPi, Enabled: true, SkillRoot: "~/.pi/agent/skills", AgentRoot: "~/.pi/agent/agents", Detect: "pi"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reconcile imported Pi roles before first sync

When setup detects Pi with an existing third-party pi-subagents role, this newly configured agent root makes scanNativeRoles offer the role for import. After the user accepts, the canonical copy is created but the source remains unchanged; the first runSync renders a version containing the dotagents marker, classifies the original source as a non-managed conflict, and aborts setup. Accepted Pi role imports therefore cannot complete their required first sync and need to be recognized or otherwise reconciled without modifying the source.

AGENTS.md reference: AGENTS.md:L17-L18

Useful? React with 👍 / 👎.

@yourconscience
yourconscience merged commit 0ce2ba9 into main Sep 14, 2026
6 checks passed
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.

1 participant