Add Pi Coding Agent (pi.dev) as a first-class supported AI#374
Conversation
Adds `uipro init --ai pi` support so Pi users can install the UI/UX Pro Max skill without a manual file copy workaround. Files added: - src/ui-ux-pro-max/templates/platforms/pi.json - cli/assets/templates/platforms/pi.json (mirrors the above) Files modified: - cli/src/types/index.ts: added 'pi' to AIType union, AI_TYPES, and AI_FOLDERS (pi: ['.pi']) - cli/src/utils/template.ts: added 'pi': 'pi' to AI_TO_PLATFORM - cli/src/utils/detect.ts: detect .pi/ or ~/.pi/, add Pi case to getAITypeDescription - skill.json: added 'pi' to the platforms list - README.md: added `uipro init --ai pi` to the install list Verified locally: - bun build succeeds - 'uipro init --ai pi --offline' writes to .pi/agent/skills/ - python3 scripts/search.py with --design-system returns a complete design system spec Pi's skill discovery: directories with SKILL.md under ~/.pi/agent/skills/ are loaded recursively by the pi-coding-agent (via the standard Agent Skills spec). The folderStructure (root: '.pi', skillPath: 'agent/skills/ui-ux-pro-max') matches the user-global install location. Project-local installs also work because pi also discovers .pi/skills/<name>/SKILL.md at project scope.
mrgoonie
left a comment
There was a problem hiding this comment.
Summary: Pi support is a useful platform addition and the PR touches the right source + CLI asset template paths, but the install layout/path handling is internally inconsistent and the new platform metadata is stale compared with the current dataset.nnRisk level: MediumnnMandatory gates:n- Duplicate/prior implementation: partial prior issue found — #331 asks for PI Agent setup, but no merged Pi implementation or overlapping PR was found.n- Project standards: issue found — the PR updates source and CLI asset copies together, but the generated Pi paths do not match the renderer's current hard-coded skill command behavior.n- Strategic necessity: clear value — first-class Pi install support removes a manual copy workaround for an Agent Skills-compatible assistant.n- CI/checks: missing / locally blocked — bun is not available in this cron environment, so I could not verify the reported build command; existing Python search smoke test on the checked-out branch passes.nnFindings:n- Important: The Pi platform config installs to .pi/agent/skills/ui-ux-pro-max and sets scriptPath to agent/skills/ui-ux-pro-max/scripts/search.py, but src/ui-ux-pro-max/templates/base/skill-content.md still contains hard-coded commands like python3 skills/ui-ux-pro-max/scripts/search.py .... renderSkillFile() only rewrites python3 skills/ to ~/<root>/skills/ for global installs, so a global Pi install would generate python3 ~/.pi/skills/ui-ux-pro-max/..., not ~/.pi/agent/skills/ui-ux-pro-max/.... Please make the generated SKILL.md commands use the platform scriptPath (or add a Pi-specific rewrite) and verify both local and --global installs produce working commands.n- Important: The new pi.json frontmatter/description says 96 palettes and 13 stacks, while the current source data has 161 color entries and 16 stack CSVs, and the existing Claude config already advertises the newer 161/16 counts. Please sync the Pi metadata with the current source-of-truth counts/platform wording so the new platform does not ship stale capability claims.nnVerdict: REQUEST_CHANGES
Summary
Adds
uipro init --ai pisupport. Pi Coding Agent users can install the UI/UX Pro Max skill with the standard one-command install instead of a manual file-copy workaround.Why
I was setting up UI/UX Pro Max for a Pi session. Pi is not in the supported list of
uipro init --aiassistants (claude, cursor, codex, etc.). I worked around it by runninguipro init --ai claude --offlineand copying the result to~/.pi/agent/skills/ui-ux-pro-max/. That works because the Agent Skills standard (agentskills.io) is shared across pi, Claude Code, Codex, and Cursor — sameSKILL.md+ YAML frontmatter, same directory layout. But the workaround is janky: the user is depending on skill-format convergence rather than the package declaring support.The fix is to add a proper
pi.jsonto the templates and registerpiin the type system so future installs are first-class.Changes
src/ui-ux-pro-max/templates/platforms/pi.json(and mirroredcli/assets/templates/platforms/pi.json) — install config matching pi's skill discovery rules.cli/src/types/index.ts— addedpito theAITypeunion,AI_TYPESarray, andAI_FOLDERS(pi: ['.pi']).cli/src/utils/template.ts— addedpi: 'pi'toAI_TO_PLATFORM.cli/src/utils/detect.ts— auto-detectpifrom.pi/(project-local) or~/.pi/(user-global) and added Pi case togetAITypeDescription.skill.json— addedpito the platforms list.README.md— addeduipro init --ai pito the install list.Pi install layout
Pi's skill discovery (per the Agent Skills spec) reads from:
~/.pi/agent/skills/<name>/SKILL.md.pi/skills/<name>/SKILL.mdThe platform config sets:
{ "folderStructure": { "root": ".pi", "skillPath": "agent/skills/ui-ux-pro-max", "filename": "SKILL.md" }, "scriptPath": "agent/skills/ui-ux-pro-max/scripts/search.py" }User-global install writes to
~/.pi/agent/skills/ui-ux-pro-max/(whichuipro init --globalalready handles via the--globalflag on the existing CLI). Project-local installs write to<project>/.pi/agent/skills/ui-ux-pro-max/. Both are picked up by pi on startup.Verified locally
bun build src/index.ts --outdir dist --target nodesucceeds.uipro init --ai pi --offlineruns and writes the expected files to.pi/agent/skills/ui-ux-pro-max/.python3 .pi/agent/skills/ui-ux-pro-max/scripts/search.py "fintech dashboard" --design-system -p "Test"returns a complete design system spec (pattern + style + colors + typography + effects).uipro init --helplistspialongside the other supported types.Compatibility
AI_TO_PLATFORMmapping follows the existing convention (key and value are the same for most platforms;antigravity: 'agent'is the precedent for sharing a config file across types).Test plan
I tested in a temp directory. For upstream acceptance testing:
Both should succeed. The
scripts/directory ships the BM25 search engine and design-system generator that work without any external API calls.Related