Skip to content

skill-doctor: add Pi harness support - #91

Draft
warp-factories[bot] wants to merge 1 commit into
mainfrom
factory/add-pi-harness-skill-doctor
Draft

skill-doctor: add Pi harness support#91
warp-factories[bot] wants to merge 1 commit into
mainfrom
factory/add-pi-harness-skill-doctor

Conversation

@warp-factories

Copy link
Copy Markdown

Summary

skill-doctor supports Warp, Claude Code, and Codex conversation sources, but its startup gate and collector did not support pi. This adds Pi as a fourth supported harness, reading its local session files read-only.

Changes

  • scripts/collect_sessions.py: adds find_pi_session_files() (scans <pi-home>/agent/sessions/**/*.jsonl within the lookback window) and parse_pi_session() (maps Pi's session/message JSONL entries — user, assistant with text/toolCall content blocks, toolResult, and bashExecution — into the shared session shape used by the other adapters). Wires pi into --harness auto/all/pi, adds a --pi-home override (default PI_HOME env var or ~/.pi), and reports it in inventory.json.
  • references/supported-harnesses.md: adds the Pi row to the startup-gate table, updates the unsupported-harness message, and documents --pi-home.
  • scripts/test_collect_sessions.py: adds regression coverage for session-file discovery within the lookback window, message/tool-call/skill-detection parsing, and bashExecution tool-call/error detection.

Scoring, aggregation, suggestions, and the report workflow (render_report.py) are unchanged — this only extends the collector.

Verification

Session format verified against pi 0.84.4's documented docs/session-format.md (~/.pi/agent/sessions/--<path>--/<timestamp>_<uuid>.jsonl, session header with cwd, message entries with role/content/timestamp).

python3 -m unittest discover -s .agents/skills/skill-doctor/scripts -p 'test_*.py'

All 20 tests pass, including the 4 new Pi-specific tests.

Closes #90.

Plans: none

Adds a find_pi_session_files()/parse_pi_session() adapter for skill-doctor's collector, following the existing Claude Code/Codex pattern: reads Pi's local JSONL sessions from <pi-home>/agent/sessions/ (default ~/.pi, overridable via --pi-home/PI_HOME), maps message entries (user/assistant/toolResult/bashExecution) into the shared session shape, and wires "pi" into --harness auto/all. Documents the new collector in references/supported-harnesses.md and adds regression tests. Scoring, aggregation, suggestions, and the report workflow are unchanged.
@warp-factories warp-factories Bot added the factory:revops-factory Managed by revops-factory label Aug 30, 2026
@warp-factories

warp-factories Bot commented Aug 30, 2026

Copy link
Copy Markdown
Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation View GitHub Issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

factory:revops-factory Managed by revops-factory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Pi support to skill-doctor

0 participants