Skip to content

Add Pi Coding Agent (pi.dev) as a first-class supported AI#374

Open
HayzDev wants to merge 1 commit into
nextlevelbuilder:mainfrom
HayzDev:add-pi-support
Open

Add Pi Coding Agent (pi.dev) as a first-class supported AI#374
HayzDev wants to merge 1 commit into
nextlevelbuilder:mainfrom
HayzDev:add-pi-support

Conversation

@HayzDev

@HayzDev HayzDev commented Jun 21, 2026

Copy link
Copy Markdown

Summary

Adds uipro init --ai pi support. 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 --ai assistants (claude, cursor, codex, etc.). I worked around it by running uipro init --ai claude --offline and 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 — same SKILL.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.json to the templates and register pi in the type system so future installs are first-class.

Changes

  • New src/ui-ux-pro-max/templates/platforms/pi.json (and mirrored cli/assets/templates/platforms/pi.json) — install config matching pi's skill discovery rules.
  • Modified cli/src/types/index.ts — added pi to the AIType union, AI_TYPES array, and AI_FOLDERS (pi: ['.pi']).
  • Modified cli/src/utils/template.ts — added pi: 'pi' to AI_TO_PLATFORM.
  • Modified cli/src/utils/detect.ts — auto-detect pi from .pi/ (project-local) or ~/.pi/ (user-global) and added Pi case to getAITypeDescription.
  • Modified skill.json — added pi to the platforms list.
  • Modified README.md — added uipro init --ai pi to the install list.

Pi install layout

Pi's skill discovery (per the Agent Skills spec) reads from:

  • Global: ~/.pi/agent/skills/<name>/SKILL.md
  • Project-local: .pi/skills/<name>/SKILL.md

The 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/ (which uipro init --global already handles via the --global flag 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 node succeeds.
  • uipro init --ai pi --offline runs 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 --help lists pi alongside the other supported types.

Compatibility

  • No breaking changes. Pi is purely additive to the AI type union.
  • Existing installs (claude, codex, cursor, etc.) are unaffected.
  • The AI_TO_PLATFORM mapping 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:

mkdir -p /tmp/test && cd /tmp/test
uipro init --ai pi --offline
python3 .pi/agent/skills/ui-ux-pro-max/scripts/search.py 'glassmorphism' --domain style
python3 .pi/agent/skills/ui-ux-pro-max/scripts/search.py 'fintech dashboard' --design-system -p 'Test'

Both should succeed. The scripts/ directory ships the BM25 search engine and design-system generator that work without any external API calls.

Related

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 mrgoonie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@mrgoonie mrgoonie added agent:github-maintain Processed by github-maintain automation pr:reviewed PR reviewed by maintain workflow pr:changes-requested Maintain review requested changes labels Jun 21, 2026
@clark-cant clark-cant mentioned this pull request Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:github-maintain Processed by github-maintain automation pr:changes-requested Maintain review requested changes pr:reviewed PR reviewed by maintain workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants