Skip to content

Feature/spec kit add pi coding agent pullrequest#1853

Merged
mnriem merged 6 commits intogithub:mainfrom
mrGreazly:feature/spec-kit-add-pi-coding-agent-pullrequest
Mar 17, 2026
Merged

Feature/spec kit add pi coding agent pullrequest#1853
mnriem merged 6 commits intogithub:mainfrom
mrGreazly:feature/spec-kit-add-pi-coding-agent-pullrequest

Conversation

@mrGreazly
Copy link
Contributor

Description

Add support for the Pi Coding Agent.

Main difference from PR #1596: Spec Kit commands are defined as prompts, not skills.
I belive it's more suitable to invoke these commands only manually and not letting agent to invoke them by itself. Also saw same approach for several other already supported agents.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

Changes made by pi coding agent (model - GPT 5.4). Gemini 3.1 was used for additional clarification and result checking.

Manually tested on simple project, passed all stages: constitution - specify - clarify - plan - tasks - analyze - implement

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class support for the Pi Coding Agent in Spec Kit, aligning Pi’s command location with its prompt-template model while keeping the rest of the agent ecosystem (skills install, context update scripts, and release packaging) consistent.

Changes:

  • Register the pi agent in runtime/extension agent configs to use .pi/prompts with Markdown + $ARGUMENTS.
  • Extend skills installation tests + agent consistency tests to cover Pi’s prompts/skills paths and release-script integration.
  • Update docs and automation (context update scripts, release packaging, devcontainer setup) to include Pi.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/specify_cli/__init__.py Adds pi to AGENT_CONFIG with .pi/ + prompts subdir and CLI requirement.
src/specify_cli/agents.py Registers pi in CommandRegistrar.AGENT_CONFIGS as .pi/prompts markdown commands.
tests/test_extensions.py Verifies pi command registrar mapping (.pi/prompts, markdown, $ARGUMENTS, .md).
tests/test_ai_skills.py Adds Pi skills-dir resolution test and installs skills from .pi/prompts.
tests/test_agent_config_consistency.py Adds cross-file consistency checks ensuring Pi is wired through configs + scripts + help text.
scripts/bash/update-agent-context.sh Adds Pi to supported agent list and routes Pi updates through AGENTS.md.
scripts/powershell/update-agent-context.ps1 Adds Pi to ValidateSet and agent routing; updates help/usage text.
.github/workflows/scripts/create-release-packages.sh Adds Pi to packaging matrix and outputs .pi/prompts templates.
.github/workflows/scripts/create-release-packages.ps1 Adds Pi to packaging matrix and outputs .pi/prompts templates.
.github/workflows/scripts/create-github-release.sh Includes Pi template zips in the GitHub release artifact list.
.devcontainer/post-create.sh Installs Pi Coding Agent npm package in devcontainer setup.
README.md Documents Pi support and adds pi to CLI option lists.
AGENTS.md Documents Pi’s directory conventions and CLI requirement.
docs/installation.md Adds Pi to prerequisites and init examples.
docs/upgrade.md Adds .pi/prompts/ to troubleshooting/upgrade guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class support for the Pi Coding Agent across Spec Kit’s agent registry, command registration, skills installation pathing, release packaging, and documentation.

Changes:

  • Register pi in the CLI agent configuration and in CommandRegistrar with .pi/prompts (Markdown, $ARGUMENTS).
  • Extend release packaging + GitHub release artifacts to generate Pi template zips.
  • Add/adjust tests and docs to cover Pi’s directories and CLI usage.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/specify_cli/__init__.py Adds pi to AGENT_CONFIG (but currently contains a syntax error that must be fixed).
src/specify_cli/agents.py Registers Pi command output directory/format (.pi/prompts, markdown).
tests/test_extensions.py Adds an assertion that CommandRegistrar includes Pi config.
tests/test_ai_skills.py Adds Pi skills dir resolution + installs skills from .pi/prompts.
tests/test_agent_config_consistency.py Adds consistency checks for Pi across configs/scripts (but currently contains scoping bugs).
scripts/bash/update-agent-context.sh Attempts to add Pi support (currently includes unresolved merge-conflict markers).
scripts/powershell/update-agent-context.ps1 Attempts to add Pi support (currently includes unresolved merge-conflict markers).
.github/workflows/scripts/create-release-packages.sh Attempts to package Pi templates (currently includes unresolved merge-conflict markers).
.github/workflows/scripts/create-release-packages.ps1 Attempts to package Pi templates (currently includes unresolved merge-conflict markers).
.github/workflows/scripts/create-github-release.sh Adds Pi template archives to GH release upload list.
README.md Documents Pi as a supported agent (includes a minor typo).
AGENTS.md Documents Pi conventions and updates commands_subdir notes (introduces a Codex directory inconsistency).
docs/installation.md Adds Pi to prerequisites and example specify init invocations.
docs/upgrade.md Adds Pi directory examples (.pi/prompts/).
.devcontainer/post-create.sh Installs the Pi Coding Agent via npm in devcontainer setup.
Comments suppressed due to low confidence (6)

scripts/powershell/update-agent-context.ps1:461

  • The usage string here dropped trae even though it’s still in the ValidateSet at the top of the file. Update the usage/help text so it stays consistent with the supported agent keys (include both trae and pi).
    Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|pi|generic]'

scripts/bash/update-agent-context.sh:685

  • Unresolved merge-conflict markers are present in this case statement, which will cause a syntax error and currently makes either the pi or trae branch disappear depending on resolution. Resolve the conflict and keep both agent handlers.
<<<<<<< HEAD
        pi)
            update_agent_file "$AGENTS_FILE" "Pi Coding Agent" || return 1
=======
        trae)
            update_agent_file "$TRAE_FILE" "Trae" || return 1
>>>>>>> upstream/main

scripts/bash/update-agent-context.sh:786

  • Unresolved merge-conflict markers in print_summary() will break the script. After resolving, keep the usage text aligned with the actual supported agent keys (include both trae and pi).
<<<<<<< HEAD
    log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|pi|generic]"
=======
    log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|trae|generic]"
>>>>>>> upstream/main

.github/workflows/scripts/create-release-packages.sh:316

  • Unresolved merge-conflict markers in the ALL_AGENTS definition will break the script and currently drops either trae or pi from the build matrix. Resolve the conflict and ensure ALL_AGENTS contains both.
# Determine agent list
<<<<<<< HEAD
ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli kimi pi generic)
=======
ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai tabnine kiro-cli agy bob vibe qodercli kimi trae generic)
>>>>>>> upstream/main

.github/workflows/scripts/create-release-packages.ps1:488

  • Unresolved merge-conflict markers in $AllAgents will break the script and currently excludes either trae or pi from the build list. Resolve the conflict and include both agents in $AllAgents.
<<<<<<< HEAD
$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'kiro-cli', 'bob', 'qodercli', 'shai', 'tabnine', 'agy', 'vibe', 'kimi', 'pi', 'generic')
=======
$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'kiro-cli', 'bob', 'qodercli', 'shai', 'tabnine', 'agy', 'vibe', 'kimi', 'trae', 'generic')
>>>>>>> upstream/main

tests/test_agent_config_consistency.py:351

  • This test references validate_set_values, but that list is a local variable created inside test_trae_in_powershell_validate_set and isn't available here. This will raise NameError. Parse the ValidateSet again in this test (or share it via a fixture/class attribute).
    def test_pi_in_powershell_validate_set(self):
        """PowerShell update-agent-context script should include 'pi' in ValidateSet."""
        assert "pi" in validate_set_values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mrGreazly mrGreazly force-pushed the feature/spec-kit-add-pi-coding-agent-pullrequest branch from 0f04256 to dd9d85c Compare March 17, 2026 18:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class support for the Pi Coding Agent across Spec Kit’s agent configuration, packaging, docs, and tests—aligning Pi with the existing “prompt-based commands” pattern (commands live under .pi/prompts/).

Changes:

  • Register pi in CLI agent metadata (AGENT_CONFIG) and in the extension/preset command registrar (CommandRegistrar.AGENT_CONFIGS).
  • Update release packaging + GitHub release asset lists to build and publish Pi template zips.
  • Add/extend tests and documentation to cover Pi’s commands/prompts + skills installation behavior.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/specify_cli/__init__.py Adds pi to AGENT_CONFIG (folder .pi/, prompts subdir, install URL, CLI required).
src/specify_cli/agents.py Adds Pi to CommandRegistrar.AGENT_CONFIGS mapping (.pi/prompts, markdown, $ARGUMENTS).
tests/test_extensions.py Verifies Pi is present in CommandRegistrar.AGENT_CONFIGS with correct settings.
tests/test_ai_skills.py Adds Pi coverage for skills dir resolution and prompt-dir based skill installation.
tests/test_agent_config_consistency.py Adds cross-file consistency checks ensuring Pi is wired into scripts/help/release tooling.
scripts/bash/update-agent-context.sh Adds pi handling + usage text updates in the bash context updater.
scripts/powershell/update-agent-context.ps1 Adds pi to ValidateSet and agent switch handling in the PowerShell context updater.
.github/workflows/scripts/create-release-packages.sh Adds Pi to agent list and generation logic (.pi/prompts).
.github/workflows/scripts/create-release-packages.ps1 Adds Pi to agent list and generation logic (.pi/prompts).
.github/workflows/scripts/create-github-release.sh Adds Pi template zips to GitHub release asset list.
.devcontainer/post-create.sh Installs Pi Coding Agent CLI in the devcontainer.
README.md Documents Pi support and includes it in supported agents + tool checks.
AGENTS.md Adds Pi to the agent support table and describes prompts as a supported commands subdir.
docs/installation.md Mentions Pi as a supported agent option and adds an example --ai pi.
docs/upgrade.md Adds .pi/prompts/ examples for troubleshooting / verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback. If not applicable, please explain why

Changes in AGENTS.md weren't part of my PR, but the Copilot feedback seems to be correct is correct. I've doublechecked it with contents of test_agent_config_consistency.py and create-release-packages scripts

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class support for the Pi Coding Agent to Spec Kit, wiring it into the CLI’s agent configuration, release template packaging, agent-context updater scripts, and documentation so users can scaffold Pi-compatible prompt templates.

Changes:

  • Register new pi agent in runtime config (AGENT_CONFIG) and extension/preset command registration (CommandRegistrar.AGENT_CONFIGS) targeting .pi/prompts.
  • Update release packaging + GitHub release asset lists to build/publish spec-kit-template-pi-{sh,ps}-*.zip.
  • Extend tests and docs to cover Pi directories (.pi/prompts, .pi/skills) and usage (specify init --ai pi).

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/specify_cli/__init__.py Adds pi to AGENT_CONFIG so CLI init/help/check support Pi.
src/specify_cli/agents.py Registers Pi command output directory/format (.pi/prompts, markdown, $ARGUMENTS).
tests/test_extensions.py Adds coverage ensuring registrar has correct Pi mapping.
tests/test_ai_skills.py Adds coverage for Pi skills dir resolution and skills installation from .pi/prompts.
tests/test_agent_config_consistency.py Adds cross-file consistency checks for Pi across configs + scripts + release tooling.
.github/workflows/scripts/create-release-packages.sh Builds Pi template variant under .pi/prompts and includes Pi in agent list.
.github/workflows/scripts/create-release-packages.ps1 Same as above for PowerShell release packaging.
.github/workflows/scripts/create-github-release.sh Uploads Pi template zip assets to GitHub Releases.
scripts/bash/update-agent-context.sh Adds Pi to supported agent types and maps it to AGENTS.md context updates.
scripts/powershell/update-agent-context.ps1 Same as above for PowerShell update script (ValidateSet + switch).
README.md Documents Pi as supported and adds examples/mentions in CLI reference.
AGENTS.md Documents Pi directory conventions and updates the supported agents table.
docs/installation.md Adds Pi to prerequisites and init examples.
docs/upgrade.md Adds Pi prompt directory to troubleshooting / verification instructions.
.devcontainer/post-create.sh Installs Pi Coding Agent CLI in devcontainer setup.
Comments suppressed due to low confidence (2)

README.md:204

  • The README’s specify check description hard-codes a tool list that doesn’t match the implementation. specify check iterates AGENT_CONFIG and runs check_tool() for every agent with requires_cli=True (and skips IDE-based agents), so this list should either be complete or reworded to avoid going stale (e.g., “checks git plus any CLI-based agents configured in Spec Kit”).
| `init`  | Initialize a new Specify project from the latest template                                                                                               |
| `check` | Check for installed tools (`git`, `claude`, `gemini`, `code`/`code-insiders`, `cursor-agent`, `windsurf`, `qwen`, `opencode`, `codex`, `kiro-cli`, `shai`, `qodercli`, `vibe`, `kimi`, `pi`) |

README.md:211

  • The --ai option description lists a subset of supported agents and is already out of sync with the actual CLI help (which is built from AGENT_CONFIG). For example, trae and tabnine are supported but missing here. Consider either listing all agents (kept in sync with AGENT_CONFIG) or referencing the Supported AI Agents table / specify --help instead of duplicating the list.
| `--ai`                 | Option   | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, `amp`, `shai`, `kiro-cli` (`kiro` alias), `agy`, `bob`, `qodercli`, `vibe`, `kimi`, `pi`, or `generic` (requires `--ai-commands-dir`) |

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem mnriem merged commit 1a21bde into github:main Mar 17, 2026
12 checks passed
@mnriem
Copy link
Collaborator

mnriem commented Mar 17, 2026

Thank you!

@mrGreazly
Copy link
Contributor Author

It's been a pleasure. Thank you for your work, spec kit is a gamechanger 4 me!

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.

3 participants