Skip to content

Commit b718fcb

Browse files
isanchez31claude
authored andcommitted
feat: add support for PI coding agent
Add PI as a supported AI coding agent across all Spec Kit components: - AGENT_CONFIG and AGENT_CONFIGS entries with .pi/skills/ directory structure - Bash and PowerShell update-agent-context scripts - Release packaging scripts (sh and ps1) - GitHub release script zip entries - README.md supported agents table and CLI reference - AGENTS.md agents table - Devcontainer post-create.sh CLI installation
1 parent b55d00b commit b718fcb

10 files changed

Lines changed: 54 additions & 15 deletions

File tree

.devcontainer/post-create.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ echo -e "\n🤖 Installing CodeBuddy CLI..."
8383
run_command "npm install -g @tencent-ai/codebuddy-code@latest"
8484
echo "✅ Done"
8585

86+
echo -e "\n🤖 Installing PI coding agent CLI..."
87+
run_command "npm install -g @mariozechner/pi-coding-agent@latest"
88+
echo "✅ Done"
89+
8690
# Installing UV (Python package manager)
8791
echo -e "\n🐍 Installing UV - Python Package Manager..."
8892
run_command "pipx install uv"

.github/workflows/scripts/create-github-release.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ gh release create "$VERSION" \
5252
.genreleases/spec-kit-template-agy-ps-"$VERSION".zip \
5353
.genreleases/spec-kit-template-bob-sh-"$VERSION".zip \
5454
.genreleases/spec-kit-template-bob-ps-"$VERSION".zip \
55+
.genreleases/spec-kit-template-pi-sh-"$VERSION".zip \
56+
.genreleases/spec-kit-template-pi-ps-"$VERSION".zip \
5557
.genreleases/spec-kit-template-generic-sh-"$VERSION".zip \
5658
.genreleases/spec-kit-template-generic-ps-"$VERSION".zip \
5759
--title "Spec Kit Templates - $VERSION_NO_V" \

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
.PARAMETER Agents
1616
Comma or space separated subset of agents to build (default: all)
17-
Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, q, bob, qodercli, shai, agy, generic
17+
Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, q, bob, pi, qodercli, shai, agy, generic
1818
1919
.PARAMETER Scripts
2020
Comma or space separated subset of script types to build (default: both)
@@ -343,6 +343,10 @@ function Build-Variant {
343343
$cmdDir = Join-Path $baseDir ".bob/commands"
344344
Generate-Commands -Agent 'bob' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script
345345
}
346+
'pi' {
347+
$cmdDir = Join-Path $baseDir ".pi/skills"
348+
Generate-Commands -Agent 'pi' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script
349+
}
346350
'qodercli' {
347351
$cmdDir = Join-Path $baseDir ".qoder/commands"
348352
Generate-Commands -Agent 'qodercli' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script
@@ -360,7 +364,7 @@ function Build-Variant {
360364
}
361365

362366
# Define all agents and scripts
363-
$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'q', 'bob', 'qodercli', 'shai', 'agy', 'generic')
367+
$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'q', 'bob', 'pi', 'qodercli', 'shai', 'agy', 'generic')
364368
$AllScripts = @('sh', 'ps')
365369

366370
function Normalize-List {

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -euo pipefail
66
# Usage: .github/workflows/scripts/create-release-packages.sh <version>
77
# Version argument should include leading 'v'.
88
# Optionally set AGENTS and/or SCRIPTS env vars to limit what gets built.
9-
# AGENTS : space or comma separated subset of: claude gemini copilot cursor-agent qwen opencode windsurf codex amp shai bob generic (default: all)
9+
# AGENTS : space or comma separated subset of: claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai q agy bob pi qodercli generic (default: all)
1010
# SCRIPTS : space or comma separated subset of: sh ps (default: both)
1111
# Examples:
1212
# AGENTS=claude SCRIPTS=sh $0 v0.2.0
@@ -221,6 +221,9 @@ build_variant() {
221221
bob)
222222
mkdir -p "$base_dir/.bob/commands"
223223
generate_commands bob md "\$ARGUMENTS" "$base_dir/.bob/commands" "$script" ;;
224+
pi)
225+
mkdir -p "$base_dir/.pi/skills"
226+
generate_commands pi md "\$ARGUMENTS" "$base_dir/.pi/skills" "$script" ;;
224227
generic)
225228
mkdir -p "$base_dir/.speckit/commands"
226229
generate_commands generic md "\$ARGUMENTS" "$base_dir/.speckit/commands" "$script" ;;
@@ -230,7 +233,7 @@ build_variant() {
230233
}
231234

232235
# Determine agent list
233-
ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai q agy bob qodercli generic)
236+
ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai q agy bob pi qodercli generic)
234237
ALL_SCRIPTS=(sh ps)
235238

236239
norm_list() {

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Specify supports multiple AI agents by generating agent-specific command files a
4848
| **Amp** | `.agents/commands/` | Markdown | `amp` | Amp CLI |
4949
| **SHAI** | `.shai/commands/` | Markdown | `shai` | SHAI CLI |
5050
| **IBM Bob** | `.bob/commands/` | Markdown | N/A (IDE-based) | IBM Bob IDE |
51+
| **PI** | `.pi/skills/` | Markdown | `pi` | PI coding agent |
5152
| **Generic** | User-specified via `--ai-commands-dir` | Markdown | N/A | Bring your own agent |
5253

5354
### Step-by-Step Integration Guide

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ Want to see Spec Kit in action? Watch our [video overview](https://www.youtube.c
157157
| [Jules](https://jules.google.com/) || |
158158
| [Kilo Code](https://github.com/Kilo-Org/kilocode) || |
159159
| [opencode](https://opencode.ai/) || |
160+
| [PI](https://pi.dev/) || |
160161
| [Qwen Code](https://github.com/QwenLM/qwen-code) || |
161162
| [Roo Code](https://roocode.com/) || |
162163
| [SHAI (OVHcloud)](https://github.com/ovh/shai) || |
@@ -180,7 +181,7 @@ The `specify` command supports the following options:
180181
| Argument/Option | Type | Description |
181182
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
182183
| `<project-name>` | Argument | Name for your new project directory (optional if using `--here`, or use `.` for current directory) |
183-
| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, `amp`, `shai`, `q`, `agy`, `bob`, `qodercli`, or `generic` (requires `--ai-commands-dir`) |
184+
| `--ai` | Option | AI assistant to use: `claude`, `gemini`, `copilot`, `cursor-agent`, `qwen`, `opencode`, `codex`, `windsurf`, `kilocode`, `auggie`, `roo`, `codebuddy`, `amp`, `shai`, `q`, `agy`, `bob`, `pi`, `qodercli`, or `generic` (requires `--ai-commands-dir`) |
184185
| `--ai-commands-dir` | Option | Directory for agent command files (required with `--ai generic`, e.g. `.myagent/commands/`) |
185186
| `--script` | Option | Script variant to use: `sh` (bash/zsh) or `ps` (PowerShell) |
186187
| `--ignore-agent-tools` | Flag | Skip checks for AI agent tools like Claude Code |

scripts/bash/update-agent-context.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
#
3131
# 5. Multi-Agent Support
3232
# - Handles agent-specific file paths and naming conventions
33-
# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, Amazon Q Developer CLI, or Antigravity
33+
# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, Amazon Q Developer CLI, Antigravity, IBM Bob, or PI
3434
# - Can update single agents or all existing agent files
3535
# - Creates default Claude file if no agent files exist
3636
#
3737
# Usage: ./update-agent-context.sh [agent_type]
38-
# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|qodercli
38+
# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|pi|qodercli
3939
# Leave empty to update all existing agent files
4040

4141
set -e
@@ -76,6 +76,7 @@ SHAI_FILE="$REPO_ROOT/SHAI.md"
7676
Q_FILE="$REPO_ROOT/AGENTS.md"
7777
AGY_FILE="$REPO_ROOT/.agent/rules/specify-rules.md"
7878
BOB_FILE="$REPO_ROOT/AGENTS.md"
79+
PI_FILE="$REPO_ROOT/AGENTS.md"
7980

8081
# Template file
8182
TEMPLATE_FILE="$REPO_ROOT/.specify/templates/agent-file-template.md"
@@ -657,12 +658,15 @@ update_specific_agent() {
657658
bob)
658659
update_agent_file "$BOB_FILE" "IBM Bob"
659660
;;
661+
pi)
662+
update_agent_file "$PI_FILE" "PI"
663+
;;
660664
generic)
661665
log_info "Generic agent: no predefined context file. Use the agent-specific update script for your agent."
662666
;;
663667
*)
664668
log_error "Unknown agent type '$agent_type'"
665-
log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|qodercli|generic"
669+
log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|pi|qodercli|generic"
666670
exit 1
667671
;;
668672
esac
@@ -750,7 +754,11 @@ update_all_existing_agents() {
750754
update_agent_file "$BOB_FILE" "IBM Bob"
751755
found_agent=true
752756
fi
753-
757+
if [[ -f "$PI_FILE" ]]; then
758+
update_agent_file "$PI_FILE" "PI"
759+
found_agent=true
760+
fi
761+
754762
# If no agent files exist, create a default Claude file
755763
if [[ "$found_agent" == false ]]; then
756764
log_info "No existing agent files found, creating default Claude file..."
@@ -775,7 +783,7 @@ print_summary() {
775783

776784
echo
777785

778-
log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|qodercli]"
786+
log_info "Usage: $0 [claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|pi|qodercli]"
779787
}
780788

781789
#==============================================================================

scripts/powershell/update-agent-context.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Mirrors the behavior of scripts/bash/update-agent-context.sh:
99
2. Plan Data Extraction
1010
3. Agent File Management (create from template or update existing)
1111
4. Content Generation (technology stack, recent changes, timestamp)
12-
5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, q, agy, bob, qodercli)
12+
5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, q, agy, bob, pi, qodercli)
1313
1414
.PARAMETER AgentType
1515
Optional agent key to update a single agent. If omitted, updates all existing agent files (creating a default Claude file if none exist).
@@ -25,7 +25,7 @@ Relies on common helper functions in common.ps1
2525
#>
2626
param(
2727
[Parameter(Position=0)]
28-
[ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','amp','shai','q','agy','bob','qodercli','generic')]
28+
[ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','amp','shai','q','agy','bob','pi','qodercli','generic')]
2929
[string]$AgentType
3030
)
3131

@@ -61,6 +61,7 @@ $SHAI_FILE = Join-Path $REPO_ROOT 'SHAI.md'
6161
$Q_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
6262
$AGY_FILE = Join-Path $REPO_ROOT '.agent/rules/specify-rules.md'
6363
$BOB_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
64+
$PI_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
6465

6566
$TEMPLATE_FILE = Join-Path $REPO_ROOT '.specify/templates/agent-file-template.md'
6667

@@ -402,8 +403,9 @@ function Update-SpecificAgent {
402403
'q' { Update-AgentFile -TargetFile $Q_FILE -AgentName 'Amazon Q Developer CLI' }
403404
'agy' { Update-AgentFile -TargetFile $AGY_FILE -AgentName 'Antigravity' }
404405
'bob' { Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob' }
406+
'pi' { Update-AgentFile -TargetFile $PI_FILE -AgentName 'PI' }
405407
'generic' { Write-Info 'Generic agent: no predefined context file. Use the agent-specific update script for your agent.' }
406-
default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|qodercli|generic'; return $false }
408+
default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|pi|qodercli|generic'; return $false }
407409
}
408410
}
409411

@@ -426,6 +428,7 @@ function Update-AllExistingAgents {
426428
if (Test-Path $Q_FILE) { if (-not (Update-AgentFile -TargetFile $Q_FILE -AgentName 'Amazon Q Developer CLI')) { $ok = $false }; $found = $true }
427429
if (Test-Path $AGY_FILE) { if (-not (Update-AgentFile -TargetFile $AGY_FILE -AgentName 'Antigravity')) { $ok = $false }; $found = $true }
428430
if (Test-Path $BOB_FILE) { if (-not (Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob')) { $ok = $false }; $found = $true }
431+
if (Test-Path $PI_FILE) { if (-not (Update-AgentFile -TargetFile $PI_FILE -AgentName 'PI')) { $ok = $false }; $found = $true }
429432
if (-not $found) {
430433
Write-Info 'No existing agent files found, creating default Claude file...'
431434
if (-not (Update-AgentFile -TargetFile $CLAUDE_FILE -AgentName 'Claude Code')) { $ok = $false }
@@ -440,7 +443,7 @@ function Print-Summary {
440443
if ($NEW_FRAMEWORK) { Write-Host " - Added framework: $NEW_FRAMEWORK" }
441444
if ($NEW_DB -and $NEW_DB -ne 'N/A') { Write-Host " - Added database: $NEW_DB" }
442445
Write-Host ''
443-
Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|qodercli|generic]'
446+
Write-Info 'Usage: ./update-agent-context.ps1 [-AgentType claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|agy|bob|pi|qodercli|generic]'
444447
}
445448

446449
function Main {

src/specify_cli/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,13 @@ def _format_rate_limit_error(status_code: int, headers: httpx.Headers, url: str)
251251
"install_url": None, # IDE-based
252252
"requires_cli": False,
253253
},
254+
"pi": {
255+
"name": "PI",
256+
"folder": ".pi/",
257+
"commands_subdir": "skills",
258+
"install_url": "https://pi.dev/",
259+
"requires_cli": True,
260+
},
254261
"generic": {
255262
"name": "Generic (bring your own agent)",
256263
"folder": None, # Set dynamically via --ai-commands-dir
@@ -1214,7 +1221,7 @@ def install_ai_skills(project_path: Path, selected_ai: str, tracker: StepTracker
12141221
@app.command()
12151222
def init(
12161223
project_name: str = typer.Argument(None, help="Name for your new project directory (optional if using --here, or use '.' for current directory)"),
1217-
ai_assistant: str = typer.Option(None, "--ai", help="AI assistant to use: claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, codebuddy, amp, shai, q, agy, bob, qodercli, or generic (requires --ai-commands-dir)"),
1224+
ai_assistant: str = typer.Option(None, "--ai", help="AI assistant to use: claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, q, agy, bob, pi, qodercli, or generic (requires --ai-commands-dir)"),
12181225
ai_commands_dir: str = typer.Option(None, "--ai-commands-dir", help="Directory for agent command files (required with --ai generic, e.g. .myagent/commands/)"),
12191226
script_type: str = typer.Option(None, "--script", help="Script type to use: sh or ps"),
12201227
ignore_agent_tools: bool = typer.Option(False, "--ignore-agent-tools", help="Skip checks for AI agent tools like Claude Code"),

src/specify_cli/extensions.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,12 @@ class CommandRegistrar:
676676
"format": "markdown",
677677
"args": "$ARGUMENTS",
678678
"extension": ".md"
679+
},
680+
"pi": {
681+
"dir": ".pi/skills",
682+
"format": "markdown",
683+
"args": "$ARGUMENTS",
684+
"extension": ".md"
679685
}
680686
}
681687

0 commit comments

Comments
 (0)