skills/session-log-guide/SKILL.md
Pi session log format and extraction patterns. How to find session files, parse the JSONL structure, and extract user messages, tool calls, and errors. Use when analyzing past pi sessions or debugging session behaviour.
npx skillsauth add jitsusama/agentic-harness.pi session-log-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read docs/session.md from the pi docs directory (listed
in the system prompt under "Pi documentation — Additional
docs"). That file documents the JSONL format, entry types,
message roles, content blocks, and tree structure.
Read it before writing any extraction code. Don't guess the format.
Session logs live at ~/.pi/agent/sessions/. Each
directory encodes the project's working directory with
-- delimiters and / replaced by -:
~/.pi/agent/sessions/--Users-name-src-github.com-org-repo--/
To find sessions for a project, list the directory.
Don't search the filesystem with find.
ls -lt ~/.pi/agent/sessions/--*repo-name*--/
Files are named {timestamp}_{uuid}.jsonl. Use ls -lt
to find the most recent.
After reading the format docs, write a single Python script that extracts what you need. Don't iterate with multiple scripts trying different structures.
Common extraction targets:
user, text content blocksassistant, toolCall content blockstoolResult with isError: truedevelopment
Structure of a quest README and the documents that live under it: frontmatter shape, the four core and four optional body sections, emoji glyphs, ID format, alias notation, Cast bullets and Journey entries. Use when writing or editing a quest README, a plan, research, brief or report document under a quest. Pairs with quest-convention for choices like kind, promotion and reordering. Follow the prose-standard for voice.
tools
Operational conventions for the quest system: when to use a quest versus a subquest versus a sidequest, when to scaffold a plan or research document, how to reorder priorities, when to add optional sections, when to conclude versus retire, the resuscitate pattern. Use when driving the quest tool, deciding kind, promoting or parking work, or organising a project as quests. Pairs with quest-format for the on-disk shape.
development
Markdown structure rules: Title Case headings with their exceptions, the line-width target and its legitimate exceptions, reference-style links, fenced code blocks with language tags, tables and lists. Use when writing or editing any markdown file (README, AGENTS, docs, plans, skill files), or when adding a heading, link, table or code block. Owns markdown structure; pairs with prose-standard, which owns voice, grammar, spelling and punctuation.
tools
How to measure whether convention corrections keep recurring in the pi session logs, by category and by week. Use to record a baseline before the convention gates take effect and to re-run afterwards to confirm the recurring categories bend down. Pairs with the convention gates (pr-guardian, issue-guardian, commit-guardian, slack-integration) and the convention-context extension.