session-source-recovery
Recover lost source files from pi session history when files were deleted but never committed to git.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Recover lost source files from pi session history when files were deleted but never committed to git.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Never run Docker containers as root. Enforce USER directive in Dockerfiles and user: in compose files. Database images are the only exception.
Handle packages migrating between pnpm workspaces. Clean stale root copies, update workspace configs, fix broken workspace:* references.
Improve the Hormuz clock model through new signal classes, schema changes, uncertainty modeling, and better rendering or branch logic
Revise fork-tax protocols so they assume concurrent agents by default in shared workspaces, forbid destructive repo-wide cleanup of unrelated dirt, and require path-scoped staging plus explicit blocker recording.
Persist the full working state into git (commit + tag + push + manifest artifacts) as a deterministic handoff snapshot. Use when the user requests Π / fork tax / full dump.
Standardize human login, service identity, and inter-service auth around AT Protocol DIDs and Bluesky-backed one-time sign-in, while removing host-local static secrets and bespoke per-service auth flows.
| name | session-source-recovery |
| description | Recover lost source files from pi session history when files were deleted but never committed to git. |
| triggers | ["file was deleted","file is missing","recover from session","session history"] |
An agent deleted or lost source files that were never committed to git. The files may still exist in pi session JSONL files as tool call arguments (e.g., apply_patch calls).
Search pi session history for references to the lost files:
grep -rl "filename-or-package-name" ~/.pi/agent/sessions/ --include="*.jsonl"
Pi sessions store apply_patch tool calls as JSON with patchText fields containing *** Begin Patch / *** End Patch blocks.
Use Python to extract file contents from JSONL:
import json, re
# Read JSONL, find toolCall blocks with name="apply_patch"
# Extract patchText, split on *** Add/Modify File: directives
# Strip leading + and line numbers from patch content
tsc --noEmit if possiblesession (metadata)message with message.role and message.content (list of blocks)type: "toolCall", name: "apply_patch", arguments.patchTextmessage entries with matching tool call IDswrite tool (not apply_patch) may have different structure