Feature/spec kit add pi coding agent pullrequest#1853
Conversation
There was a problem hiding this comment.
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
piagent in runtime/extension agent configs to use.pi/promptswith 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.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback
There was a problem hiding this comment.
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
piin the CLI agent configuration and inCommandRegistrarwith.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
traeeven though it’s still in theValidateSetat the top of the file. Update the usage/help text so it stays consistent with the supported agent keys (include bothtraeandpi).
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
casestatement, which will cause a syntax error and currently makes either thepiortraebranch 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 bothtraeandpi).
<<<<<<< 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_AGENTSdefinition will break the script and currently drops eithertraeorpifrom the build matrix. Resolve the conflict and ensureALL_AGENTScontains 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
$AllAgentswill break the script and currently excludes eithertraeorpifrom 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 insidetest_trae_in_powershell_validate_setand isn't available here. This will raiseNameError. 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.
0f04256 to
dd9d85c
Compare
There was a problem hiding this comment.
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
piin 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.
mnriem
left a comment
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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
piagent 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 checkdescription hard-codes a tool list that doesn’t match the implementation.specify checkiteratesAGENT_CONFIGand runscheck_tool()for every agent withrequires_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
--aioption description lists a subset of supported agents and is already out of sync with the actual CLI help (which is built fromAGENT_CONFIG). For example,traeandtabnineare supported but missing here. Consider either listing all agents (kept in sync withAGENT_CONFIG) or referencing the Supported AI Agents table /specify --helpinstead 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.
|
Thank you! |
|
It's been a pleasure. Thank you for your work, spec kit is a gamechanger 4 me! |
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
uv run specify --helpuv sync && uv run pytestAI Disclosure
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