Lock Pi's live skill-capture model; guard against duplicate extractor

main

Commit

dipree3mo ago

Pi already captures invoked /skill:<name> commands in every live session (including entire review --agent pi) via the extension's input handler → before_agent_start hook payload → state.SkillEvents. This is Pi's only skill-capture path and is the counterpart to claude-code's transcript- extraction model — the two are mutually exclusive.

This change documents and protects that decision rather than adding a (harmful) transcript extractor:

  • Document piSkillEvents: Pi uses live capture; PiAgent must NOT implement SkillEventExtractor, because condensation merges extractor output with the live events via mergeSkillEvents and the keys cannot dedup cleanly across the live/transcript boundary (per-invocation vs current TurnID), which would double-count earlier-turn skills in checkpoint metadata.
  • Add TestPiAgent_UsesLiveSkillCaptureNotTranscriptExtraction: fails if a future change makes PiAgent a SkillEventExtractor, with guidance.
  • Add TestParseHookEvent_BeforeAgentStart_MultipleSkillEvents: locks multi-invocation live capture.

Entire-Checkpoint: da693850a5cb

Checkpoints

List me all the potential command combinations for review.

PiOpus 4.8
View session
Checkpoint 1