docs(skill): pi package integration - #52
Conversation
Add pi package section to README, docs, and landing page. Clarify command descriptions, add missing /revdiff-reminders to docs.html, and improve accessibility on feature icon.
|
@umputun I'm not sure about this one, I need your input. If you merge this, pi users would be able to run
An alternative would be to publish it separately, let's say at What is your philosophy for this kind of issue/features? |
umputun
left a comment
There was a problem hiding this comment.
thx, I'm fine with keeping this in-repo under plugins/pi/. the extension code is well-structured and reuses existing infra nicely.
few things to address before merge:
-
node_modules/in.gitignore- withpackage.jsonat root, anyone runningnpm installwill createnode_modules/. pls add it to.gitignore -
version in
package.json- currently0.11.0, project is atv0.13.0. should either track the project version or start at0.1.0if it has its own versioning. what's the intent? also, after any pi plugin file change pls bump the version inpackage.json(same convention we have for.claude-plugin/) -
detectSmartRefFallbackmissing no-commits check (revdiff.ts:971-992) - the shell scriptdetect-ref.shchecks forhas_commits(line 48-49) before runninggit rev-parse. the TS fallback skips this, so freshgit initrepos will behave differently. would be nice to add the same guard -
wildcard
peerDependencies-"@mariozechner/pi-coding-agent": "*"and"@mariozechner/pi-tui": "*"- should pin at least a major version to avoid silent breakage on pi API changes
|
also, pls add a rule to CLAUDE.md about bumping version in |
There was a problem hiding this comment.
Pull request overview
Adds a pi harness integration for revdiff, alongside documentation and site updates to advertise the new distribution and workflow.
Changes:
- Introduces a pi package (root
package.json) plus pi extensions for launching revdiff, persisting captured annotations, and rendering them in a widget/right-side panel. - Adds an optional post-edit reminder extension and a pi skill/README describing commands and recommended workflow.
- Updates
site/index.html,site/docs.html, andREADME.mdto document and promote pi installation and usage.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| site/index.html | Updates SEO/social metadata and adds a “Pi integration” feature card + install option. |
| site/docs.html | Adds a “Pi package” section and navigation link describing pi commands and setup. |
| README.md | Documents pi package installation, commands, and notes about modes and paths. |
| plugins/pi/skills/revdiff/SKILL.md | Adds a pi skill definition describing when/how to use the revdiff pi integration. |
| plugins/pi/README.md | Documents the pi integration directory structure and installation. |
| plugins/pi/extensions/revdiff.ts | Implements the main pi extension: launch modes, annotation capture/parsing, widget/panel UI, and commands. |
| plugins/pi/extensions/revdiff-post-edit.ts | Implements optional post-edit reminders based on agent edit/write tool calls. |
| package.json | Adds pi package manifest exposing extensions and skills to pi. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (!enabled || editCallsInRun === 0 || !ctx.hasUI) { | ||
| ctx.ui.setStatus(STATUS_KEY, undefined); | ||
| return; | ||
| } |
There was a problem hiding this comment.
updateStatus calls ctx.ui.setStatus(...) even when ctx.hasUI is false (the !ctx.hasUI case is explicitly included in the guard). If ui is only valid when hasUI is true, this can throw in headless/non-TUI contexts. Consider returning early when !ctx.hasUI (or using the last known UI context) before calling setStatus.
| if (!enabled || editCallsInRun === 0 || !ctx.hasUI) { | |
| ctx.ui.setStatus(STATUS_KEY, undefined); | |
| return; | |
| } | |
| if (!enabled || editCallsInRun === 0) { | |
| clearReminder(); | |
| return; | |
| } | |
| if (!ctx.hasUI) { | |
| return; | |
| } |
| const CONFIG_TYPE = "revdiff-reminder-config"; | ||
| const STATUS_KEY = "revdiff-reminder"; | ||
| const LAST_LAUNCH_TYPE = "revdiff-last-launch"; | ||
|
|
||
| interface ReminderConfig { | ||
| enabled: boolean; | ||
| } | ||
|
|
||
| interface LaunchMemory { | ||
| args: string[]; | ||
| label: string; | ||
| mode: "direct" | "overlay"; | ||
| createdAt: number; | ||
| } |
There was a problem hiding this comment.
LAST_LAUNCH_TYPE and the LaunchMemory shape are duplicated here and in plugins/pi/extensions/revdiff.ts. To avoid the two drifting (e.g., adding fields in one file but not the other), consider extracting the shared constants/types into a small shared module under plugins/pi/extensions/ and importing it from both extensions.
| @@ -0,0 +1,29 @@ | |||
| { | |||
| "name": "revdiff-pi", | |||
| "version": "0.11.0", | |||
There was a problem hiding this comment.
The new package.json sets the pi package version to 0.11.0, but the repo/site currently references revdiff v0.13.0 (e.g., CHANGELOG.md and site/index.html). If the pi package is intended to track revdiff releases, consider aligning this version to avoid confusing upgrade semantics for pi users.
| "version": "0.11.0", | |
| "version": "0.13.0", |
- Add node_modules/ to .gitignore - Set pi plugin version to 0.1.0 (independent versioning) - Pin pi peerDependencies to ^0.60 instead of wildcard - Add no-commits guard to detectSmartRefFallback matching detect-ref.sh - Add Pi Plugin section to CLAUDE.md with version bump convention
updateStatus and setEnabled were calling ctx.ui methods even when ctx.hasUI was false, which could throw in headless contexts.
|
Addressed all yours and one bug found by Copilot(good bot) |
umputun
left a comment
There was a problem hiding this comment.
all 4 points addressed, thx. node_modules in gitignore, version 0.1.0, hasCommits guard in the fallback, deps pinned to ^0.60. CLAUDE.md rule added too.
the LaunchMemory duplication between the two extensions is fine, keeps them decoupled.
LGTM
* docs: add pi package documentation and review fixes Add pi package section to README, docs, and landing page. Clarify command descriptions, add missing /revdiff-reminders to docs.html, and improve accessibility on feature icon. * fix: address pi package PR review feedback - Add node_modules/ to .gitignore - Set pi plugin version to 0.1.0 (independent versioning) - Pin pi peerDependencies to ^0.60 instead of wildcard - Add no-commits guard to detectSmartRefFallback matching detect-ref.sh - Add Pi Plugin section to CLAUDE.md with version bump convention * fix: guard ctx.ui calls behind hasUI check in post-edit extension updateStatus and setEnabled were calling ctx.ui methods even when ctx.hasUI was false, which could throw in headless contexts.
Summary