self-reflect

star 0

Analyze session history to extract patterns, corrections, and lessons learned

timainge By timainge schedule Updated 2/13/2026

name: self-reflect description: Analyze session history to extract patterns, corrections, and lessons learned metadata: "{}"

Self-Reflect

Analyze your recent session history and capture raw observations in journal/.

These are captures, not conclusions. The goal is to get observations out of the session and into the knowledge base quickly so they can be processed later by self-evaluate and self-improve.

When to Use

  • After a long or complex interaction
  • When spawned as a curation sub-agent
  • When the user asks you to reflect on recent conversations
  • During heartbeat if configured

Procedure

1. Read Session History

read_file(path="~/.picobot/sessions/cli_default.jsonl")

Parse the JSONL. Each line is either a metadata record (_type: "metadata") or a message (role, content, timestamp). Focus on the most recent 20-30 exchanges.

2. Extract Patterns

Scan for these signal types:

Signal What to look for Example
Correction User corrected you or said "no, I meant..." You misunderstood a requirement
Failure Tool errors, wrong file paths, bad assumptions Error: File not found
Success User praised, said "perfect", or the task completed smoothly Multi-step task done in one shot
Preference User expressed a preference (explicit or implicit) "I prefer X over Y"
Knowledge gap You had to ask about something you should know Asked about a project structure you've seen before

3. Write Reflection

For each significant pattern found, store it in the knowledge base as a raw observation:

kb(action="store", topic="journal", title="Reflection: <brief description>", content="...", tags=["reflection", "<signal-type>"])

Reflection format:

## What happened
<Describe the interaction objectively — what was asked, what you did>

## Signal type
<correction | failure | success | preference | knowledge-gap>

## Lesson
<What should change going forward — be specific and actionable>

## Action items
- [ ] <Concrete thing to do: update KB entry, change behavior, etc.>

4. Cross-reference Existing Knowledge

If a reflection reveals information that clearly belongs elsewhere, note it in the action items but don't promote it yet — that's the job of self-improve. Keep the reflection in journal/ as a raw capture.

Always kb(action="search", ...) before storing to avoid duplicates.

Quality Standards

  • One reflection per distinct pattern (don't bundle unrelated observations)
  • Be specific: "I assumed the config file was YAML but it was JSON" not "I made wrong assumptions"
  • Include the action item — a reflection without a next step is just a diary entry
  • Skip trivial observations (typos, minor rephrasing) — focus on patterns that would improve future interactions

Output

When done, summarize what you found:

  • Number of exchanges analyzed
  • Patterns found (by type)
  • Knowledge entries created or updated
Install via CLI
npx skills add https://github.com/timainge/picobot --skill self-reflect
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator