skill-doctor: add Pi harness support - #91
Draft
warp-factories[bot] wants to merge 1 commit into
Draft
Conversation
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.
Author
|
This PR was generated with Warp. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
skill-doctorsupports 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: addsfind_pi_session_files()(scans<pi-home>/agent/sessions/**/*.jsonlwithin the lookback window) andparse_pi_session()(maps Pi'ssession/messageJSONL entries —user,assistantwithtext/toolCallcontent blocks,toolResult, andbashExecution— into the shared session shape used by the other adapters). Wirespiinto--harness auto/all/pi, adds a--pi-homeoverride (defaultPI_HOMEenv var or~/.pi), and reports it ininventory.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, andbashExecutiontool-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,sessionheader withcwd,messageentries withrole/content/timestamp).All 20 tests pass, including the 4 new Pi-specific tests.
Closes #90.
Plans: none