Skip to content

Conversation

@rdparker
Copy link

@rdparker rdparker commented Jan 21, 2026

Summary

  • Add Pi as a new supported AI tool in the tool selection list
  • Create slash command configurator for pi's .pi/prompts/*.md format
  • Register pi in the SlashCommandRegistry

What is Pi-Coding-Agent?

Pi-coding-agent is a terminal-based coding agent with multi-model support, mid-session model switching, and RPC mode. It supports the AGENTS.md standard and has its own slash command system via .pi/prompts/*.md files.

Changes

  • src/core/config.ts - add pi to AI_TOOLS array
  • src/core/configurators/slash/pi.ts - new slash command configurator
  • src/core/configurators/slash/registry.ts - register pi configurator
  • openspec/specs/cli-init/spec.md - spec update

User Impact

Pi users can select "Pi" during openspec init and get /openspec-proposal, /openspec-apply, /openspec-archive commands in their .pi/prompts/ directory.

Test Plan

Tested by:

  1. Running openspec init and selecting Pi to add support
  2. Using Pi with the generated /openspec-archive command to archive this change and commit it

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Pi as a supported coding agent option during openspec init.
    • Pi users can now generate AI-specific slash commands for proposal, apply, and archive workflows.
    • Pi slash commands are configured with standardized YAML frontmatter and stored in the designated prompts directory.

✏️ Tip: You can customize this high-level summary in your review settings.

rdparker and others added 3 commits January 21, 2026 03:05
Create OpenSpec change for adding pi-coding-agent from badlogic/pi-mono
to the supported AI tools list. Includes proposal, design, specs, and
tasks for implementing slash command support via .pi/prompts/*.md.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Pi (pi-coding-agent from badlogic/pi-mono) as a supported AI tool with
slash command generation for .pi/prompts/*.md format. Pi already supports
AGENTS.md natively, so only slash commands are needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Archive completed change to 2026-01-21-add-pi-coding-agent
- Sync Pi slash command scenario to cli-init spec
- Remove unnecessary pi-slash-commands delta spec (follows existing pattern)
@rdparker rdparker requested a review from TabishB as a code owner January 21, 2026 04:16
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

This PR adds Pi as a new AI tool to OpenSpec, enabling users to select "Pi" during initialization. It includes configuration updates, a new slash-command configurator for Pi's .pi/prompts/ format, registry registration, and updated CLI spec documentation for the Pi workflow.

Changes

Cohort / File(s) Summary
Archive & Specification Documentation
openspec/changes/archive/2026-01-21-add-pi-coding-agent/.openspec.yaml, openspec/changes/archive/2026-01-21-add-pi-coding-agent/design.md, openspec/changes/archive/2026-01-21-add-pi-coding-agent/proposal.md, openspec/changes/archive/2026-01-21-add-pi-coding-agent/tasks.md, openspec/specs/cli-init/spec.md
Adds spec-driven documentation and design details for Pi integration; introduces Pi tool option to AI_TOOLS registry and describes slash-command generation flow for .pi/prompts/openspec-{proposal,apply,archive}.md with YAML frontmatter containing description field.
Core Tool Configuration & Registration
src/core/config.ts, src/core/configurators/slash/pi.ts, src/core/configurators/slash/registry.ts
Adds "Pi" entry to AI_TOOLS list, introduces new PiSlashCommandConfigurator class with getRelativePath() and getFrontmatter() methods for Pi-specific command paths and frontmatter, and registers the Pi configurator in the slash-command registry.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • TabishB
  • Israel-Laguan

Poem

🐰 Hop, hop, hop—here comes Pi!
A new tool joins the OpenSpec sky,
With slashes configured and prompts so neat,
Making AI integration sweet!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add pi-coding-agent support' clearly and concisely summarizes the primary change: adding Pi as a new supported AI tool with slash command configurator and registry integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

@TabishB
Copy link
Contributor

TabishB commented Jan 21, 2026

Hey @rdparker, big fan of Pi! we're undergoing bit of a migration right now and basically converting all of our workflow to use skills and updating slash commands etc, so this change will go stale very fast.

Happy to support pi, it just will have to wait a couple of days

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

@greptile-apps
Copy link

greptile-apps bot commented Jan 21, 2026

Greptile Summary

This PR adds support for pi-coding-agent, a terminal-based coding tool that natively supports the AGENTS.md standard. The implementation follows the established pattern for adding new AI tool support in OpenSpec.

Key Changes:

  • Added pi to the AI_TOOLS array in src/core/config.ts:37
  • Created PiSlashCommandConfigurator in src/core/configurators/slash/pi.ts that generates slash commands in .pi/prompts/ directory
  • Registered the configurator in SlashCommandRegistry at src/core/configurators/slash/registry.ts:50,73
  • Updated spec to document Pi's YAML frontmatter format (description field only)

Implementation Quality:

  • Follows the exact pattern used by other slash command configurators (Continue, Antigravity, Windsurf)
  • Correctly uses minimal YAML frontmatter with only description field, matching pi-coding-agent's documented format
  • No ToolConfigurator needed since pi-coding-agent already reads AGENTS.md files natively
  • File paths follow pi's convention: .pi/prompts/openspec-{proposal,apply,archive}.md
  • All tasks marked complete in tasks.md

Design Decisions:

  • Uses project-local prompts in .pi/prompts/ (not global) as per pi's architecture
  • Minimal frontmatter approach appropriate for pi's simplicity-first design
  • Leverages existing AGENTS.md support, avoiding redundant PI.md file

The change is well-documented with comprehensive proposal, design, and tasks files in the archive directory, following OpenSpec's spec-driven development workflow.

Confidence Score: 5/5

  • This PR is safe to merge with no concerns
  • The implementation is a straightforward addition following established patterns. All code changes are minimal, well-structured, and consistent with existing tool integrations. The configurator properly extends the abstract base class, uses the correct file paths for pi-coding-agent, and implements the minimal YAML frontmatter format as documented. The change is properly archived following OpenSpec's workflow, with comprehensive documentation. No breaking changes, no security concerns, and no deviation from established patterns.
  • No files require special attention

Important Files Changed

Filename Overview
src/core/config.ts Added Pi to AI_TOOLS array with consistent format matching existing tools
src/core/configurators/slash/pi.ts New slash command configurator following established pattern with minimal YAML frontmatter
src/core/configurators/slash/registry.ts Imported and registered pi configurator following existing pattern
openspec/specs/cli-init/spec.md Added Pi scenario to spec, correctly describing YAML frontmatter format

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as openspec init
    participant Registry as SlashCommandRegistry
    participant PiConfig as PiSlashCommandConfigurator
    participant FS as File System

    User->>CLI: openspec init
    CLI->>User: Prompt tool selection
    User->>CLI: Select "Pi"
    CLI->>Registry: Get configurator for "pi"
    Registry->>PiConfig: Return pi configurator
    CLI->>PiConfig: generateAll(projectPath)
    
    loop For each command (proposal, apply, archive)
        PiConfig->>PiConfig: getRelativePath(id)
        Note over PiConfig: Returns .pi/prompts/openspec-{id}.md
        PiConfig->>PiConfig: getFrontmatter(id)
        Note over PiConfig: Returns YAML with description field
        PiConfig->>PiConfig: getBody(id)
        Note over PiConfig: Gets template from TemplateManager
        PiConfig->>FS: Write file with frontmatter + body
        Note over FS: Creates .pi/prompts/openspec-{id}.md
    end
    
    PiConfig->>CLI: Return created file paths
    CLI->>User: Success message
Loading

@greptile-apps
Copy link

greptile-apps bot commented Jan 21, 2026

Greptile found no issues!

From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

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.

2 participants