pi-check-session-logs
Analyze pi-go session logs (last 24h by default) for tool call errors, deduplicate them, and present a summary table with error patterns and counts.
- License 许可
- MIT
- 所属仓库
- dimetron/pi-go
- 最近更新
- 2026-11-15
- Stars
- ★ 224
- Forks
- 34
01 前言 Front Matter
- name
- pi-check-session-logs
- description
- Analyze pi-go session logs (last 24h by default) for tool call errors, deduplicate them, and present a summary table with error patterns and counts.
02 资源文件 8
- 脚本analyze.sh6.8 KB
- 参考文档references/code-quality-checklist.md3.5 KB
- 参考文档references/removal-plan.md1.4 KB
- 参考文档references/security-checklist.md4.1 KB
- 参考文档references/solid-checklist.md3.4 KB
- 脚本run.py3.4 KB
- 脚本tests/__init__.py—
- 脚本tests/test_code_review.py4.1 KB
03 SKILL.md 正文
Check Session Logs
Scan recent pi-go session logs for tool call errors, deduplicate by pattern, and present results.
Steps
- Run the analysis script (scans last 24h by default, override with
HOURS=N):
bash .pi-go/skills/pi-check-session-logs/analyze.sh
To scan a different time window:
HOURS=48 bash .pi-go/skills/pi-check-session-logs/analyze.sh
-
Present the raw output to the user as-is — the script already formats a markdown table.
-
Suggest optimizations based on the error patterns:
- For "not found" errors: suggest better path resolution or fallback logic
- For "permission denied": suggest sandbox configuration changes
- For "exit code" failures: suggest build/test fixes
- For repeated tool errors: suggest system prompt improvements to avoid the pattern
- For STREAM_ERROR: suggest retry/reconnect improvements
-
Extract actionable fixes — After presenting the summary, create (or update) an actionable fixes document:
mkdir -p ./specs/issues/001-session-errors echo "<research>" > ./specs/issues/001-session-errors/PROMPT.mdThis file should contain a prompt that can be loaded to guide the agent toward fixing the detected error patterns. Structure it with sections for:
- The top N error patterns are detected (with specific examples)
- Corresponding fix suggestions per pattern
- Context about when each fix applies (which tools, which scenarios)
Use this format for the prompt file:
# Session Error Fix Prompts ## Pattern: [error name] - **Detected in**: [sessions/files where found] - **Fix suggestion**: [specific actionable steps]If the file already exists, update it to include new patterns while preserving existing ones.
Examples
/pi-check-session-logs— Analyze logs from last 24h/pi-check-session-logs HOURS=48— Analyze logs from last 48h
- Run the analysis for the findings
Research on each issue using subagent - for each issue with priority, score, if it's going to be implemented or rejected.
Save the findings in ./specs/issues/001-session-errors/PROMPT.md
04 同仓库更多 Skills
verify-session-flow
Formally verify the interactive session flow before or after changing it. Use when editing internal/tui/tui.go's handleKey, handleInterruptKey, handleInputSubmit, ctrlCCount or quitting, internal/tui/agent_loop.go's enqueuePrompt, submit, steerPrompt, cancelAgent or handleAgentDone, or the deferred-init splash — or when a user reports that Ctrl+C quit on the first press, that Esc did not stop a turn or a goal loop, that a queued prompt was lost when they canceled, or that the TUI hung on a spinner nothing could clear.
verify-run-pipeline
Formally verify the /run phase machine before or after changing it. Use when editing internal/tui/run.go's phase transitions (handleRunAgentDone, runGates result handling, verifyRunComplete, retryRun, reportGateHang, merge), internal/sop/verdict.go's Passed, or the checklist refresh — or when a run merged work it should not have, retried a hung gate, lost a cycle at the retry budget, or merged on a stale PASS.
verify-history-rewrite
Formally verify the session-history rewrite path before or after changing it. Use when editing internal/session/autocompact.go, internal/session/compaction*.go, internal/session/store.go's Compact/ClearEvents/rewriteEvents, internal/agent/agent.go's Run/RunStreaming/runPreTurn, or internal/tui/commands.go's clearConversation/clearSessionContext and the context gauge — or when a turn is canceled mid-flight, a tool call and its result get separated, a session's history disappears while the agent is still working, or the model is sent a tool result whose call was compacted away.
verify-goal-loop
Formally verify the /goal automatic loop before or after changing it. Use when editing internal/tui/goal.go, internal/tui/agent_loop.go's handleAgentDone/cancelAgent/steerPrompt, or internal/tools/goal.go's GoalController — or when a goal loop will not stop, stops one cycle early, closes a goal that is not met, or restarts a goal you finished.
verify-agent-lifecycle
Formally verify the subagent lifecycle before or after changing it. Use when editing internal/subagent/orchestrator.go's Spawn, trackAgent, forwardAgentEvents, terminalStatus, Cancel, ShutdownWithTimeout or evictCompletedAgentsLocked, or internal/subagent/pool.go — or when a canceled agent is reported as failed, an agent vanishes from the list with no verdict, the orchestrator panics on a pool release, or an agent can be canceled twice.
test-new-skill
暂无简介