Skip to content

feat(pi): plan-mode interactions and code-review skill#202

Merged
khang859 merged 9 commits into
mainfrom
fleet-gold-root-peak
Apr 28, 2026
Merged

feat(pi): plan-mode interactions and code-review skill#202
khang859 merged 9 commits into
mainfrom
fleet-gold-root-peak

Conversation

@khang859
Copy link
Copy Markdown
Owner

Summary

  • Plan-mode UI integration: Pi can now open plan-mode docs in a Fleet modal and respond to plan-modal actions; modal responses hardened against unexpected payloads.
  • Code-review skill: New bundled Pi skill at resources/pi-skills/code-review/ that reviews the current branch's diff against a base ref and writes findings to docs/reviews/YYYY-MM-DD-<topic>.md. Prompt encodes a two-phase find-then-verify protocol with concrete severity criteria and mandatory file:line citations.
  • Skill wiring: PiAgentManager gains getSkillsDir() / getSkillPaths() mirroring the extension-path pattern, and buildLaunchCommand appends --skill flags after the existing -e extension flags. Bundled into packaged builds via electron-builder.yml.

Validation

  • 446/446 vitest tests pass; new test asserts --skill flag is emitted with POSIX-quoted absolute paths after the -e flags.
  • npm run typecheck clean.
  • pi binary's --skill <path> flag (verified against live pi --help) accepts a directory and can repeat — matches the wiring shape.
  • SKILL.md frontmatter validated against pi.dev Agent Skills spec: name is 11 chars, lowercase + hyphen, matches parent dir; description is 422 chars (≤1024 limit).

Test Plan

  • Manual smoke test in dev Fleet (Task 4 of the plan, deferred): plant a deliberate bug on a throwaway branch and run /skill:code-review main in a Pi pane. Expected: report saved under docs/reviews/, planted bug appears under 🔴 Important with a file:line citation.
  • Empty-diff case: /skill:code-review main while on main. Expected: "No blocking issues found." or no file.
  • Bad-ref case: /skill:code-review nonexistent-ref-xyz. Expected: ref-not-found error rather than a bogus review.
  • Packaged build smoke: npm run build + verify pi-skills/code-review/SKILL.md is present under Resources/ in the produced app bundle.

🤖 Generated with Claude Code

khang859 and others added 9 commits April 27, 2026 18:35
Brainstorming output for a code-review capability shipped as a Pi
skill (not a mode/extension). Includes the full SKILL.md prompt
content informed by Anthropic's current code-review prompt-harness
guidance: two-phase find-then-verify, concrete severity criteria, and
mandatory file:line citations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Four tasks: create the SKILL.md, TDD the --skill flag wiring in
pi-agent-manager, bundle pi-skills/ in electron-builder, and run a
manual smoke test against a planted bug.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A Pi skill that reviews the current branch's diff against a base ref
and writes findings to docs/reviews/YYYY-MM-DD-<topic>.md. Prompt
applies Anthropic's current code-review prompt-harness guidance:
two-phase find-then-verify, concrete severity criteria (Important /
Nit / Pre-existing), and mandatory file:line citations.

Wiring follows in a subsequent commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds getSkillsDir() / getSkillPaths() mirroring the extension-path
pattern, and appends --skill flags to the launch command after the
-e extension flags. The code-review skill is the first to ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds pi-skills to extraResources so the bundled code-review skill is
present in production DMG/EXE/AppImage outputs, matching the existing
pi-extensions bundling pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	resources/pi-extensions/fleet-plan-mode.ts
#	src/renderer/src/components/PiPlanModal.tsx
@khang859
Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@khang859 khang859 merged commit 9e0815b into main Apr 28, 2026
1 check passed
@khang859 khang859 deleted the fleet-gold-root-peak branch April 28, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant