Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class integration for the Pi coding agent (@mariozechner/pi-coding-agent) by introducing a Pi-specific skill file, installer wiring, project-local prompt alias support, and corresponding documentation/tests.
Changes:
- Add Pi as an installable platform (
graphify install --platform pi) targeting~/.pi/agent/skills/graphify/. - Add project-level Pi commands (
graphify pi install|uninstall) to manageAGENTS.mdand a.pi/prompts/graphify.mdalias for/graphify. - Package
skill-pi.mdand expand README + install tests to cover the Pi flow.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
graphify/__main__.py |
Adds Pi platform config and pi install/uninstall command handling, plus prompt-alias management. |
graphify/skill-pi.md |
Introduces a dedicated Pi skill document. |
tests/test_install.py |
Adds install + project integration tests for Pi and includes skill-pi.md in package checks. |
pyproject.toml |
Adds Pi to description/keywords and includes skill-pi.md in package data. |
README.md |
Documents Pi install and project integration workflows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** | ||
|
|
||
| ### Step 2 - Detect files | ||
|
|
||
| ```bash | ||
| $(cat .graphify_python) -c " |
There was a problem hiding this comment.
Step 1 writes the interpreter path to graphify-out/.graphify_python, but Step 2 (and many later bash blocks) run $(cat .graphify_python) .... As written, cat .graphify_python will fail and all subsequent commands will use the wrong interpreter. Make the path consistent by either writing .graphify_python in the project root, or updating every $(cat .graphify_python) reference to $(cat graphify-out/.graphify_python).
| **In every subsequent bash block, replace `python3` with `$(cat .graphify_python)` to use the correct interpreter.** | |
| ### Step 2 - Detect files | |
| ```bash | |
| $(cat .graphify_python) -c " | |
| **In every subsequent bash block, replace `python3` with `$(cat graphify-out/.graphify_python)` to use the correct interpreter.** | |
| ### Step 2 - Detect files | |
| ```bash | |
| $(cat graphify-out/.graphify_python) -c " |
| ```bash | ||
| $(cat .graphify_python) -c " | ||
| import json | ||
| from graphify.detect import detect | ||
| from pathlib import Path | ||
| result = detect(Path('INPUT_PATH')) | ||
| print(json.dumps(result)) | ||
| " > .graphify_detect.json | ||
| ``` |
There was a problem hiding this comment.
Step 2 writes detect output to .graphify_detect.json in the project root, but Step 2.5 reads graphify-out/.graphify_detect.json for transcription. That mismatch will break video/audio transcription on Pi. Align the detect output location and all subsequent reads to a single path (preferably under graphify-out/ like other artifacts).
| **Fast path:** If detection found zero docs, papers, and images (code-only corpus), skip Part B entirely and go straight to Part C. AST handles code - there is nothing for semantic subagents to do. | ||
|
|
||
| > **Pi platform:** Multi-agent support is still early on Pi. Extraction runs sequentially — you read and extract each file yourself. This is slower than parallel platforms but fully reliable. | ||
|
|
||
| Print: `"Semantic extraction: N files (sequential — Pi)"` |
There was a problem hiding this comment.
This section still instructs semantic extraction via parallel subagents, but the Pi note says extraction is sequential (no multi-agent). That’s contradictory guidance for Pi and can cause the wrong workflow to be followed. Gate the subagent/parallel instructions to non-Pi platforms, or rewrite Part B here to describe only the sequential Pi flow.
| def _pi_install(project_dir: Path | None = None) -> None: | ||
| """Install graphify for Pi: global skill + local AGENTS + /graphify prompt alias.""" | ||
| install(platform="pi") | ||
| _agents_install(project_dir or Path("."), "pi") | ||
|
|
There was a problem hiding this comment.
_pi_install() calls install(platform="pi"), which prints the post-install hint "For a native /graphify alias inside a project, run: graphify pi install". When the user is already running graphify pi install, this becomes confusing/self-referential output. Consider refactoring install() to allow suppressing the Pi-specific hint when invoked from _pi_install(), or extract a lower-level "copy skill file" helper that _pi_install() can call without the interactive guidance prints.
Summary
This PR adds first-class support for Pi (
@mariozechner/pi-coding-agent).It adds:
graphify install --platform pito install Graphify into Pi's global skill directorygraphify pi install/graphify pi uninstallfor project-level Pi integrationskill-pi.md.pi/prompts/graphify.mdalias so/graphifyworks naturally inside Pi projectsWhy
Pi has a different customization model than the harnesses already supported here. In particular, it uses:
~/.pi/agent/skills/AGENTS.md.pi/prompts/This PR integrates Graphify with those native Pi entry points directly rather than adapting another platform's skill at install time.
That keeps the feature predictable for Pi users and keeps the implementation easier to review and maintain.
Design Notes
A few choices here were intentional:
skill-pi.mdrather than runtime rewriting of another platform's skill file.graphify install --platform pisupports the minimal global-skill flow via/skill:graphify.graphify pi installadds the project-level pieces needed for a more natural Pi experience:AGENTS.md.pi/prompts/graphify.md/graphifyas a prompt-template alias inside the projectSo the PR supports both:
User Impact
After this change, Pi users can either:
and run Graphify via:
or run:
to get:
AGENTS.mdguidance.pi/prompts/graphify.mdalias so/graphifyworks inside the projectVerification
I verified the change with:
pytest tests/test_install.py -qpython -m py_compile graphify/__main__.py tests/test_install.pygraphify update .Scope
This PR is intentionally narrow:
I avoided broader refactors so the Pi support can be reviewed on its own.