Reflect on recent experiences in the zetty `experience` space to identify patterns, gaps, and corrections, then refine the knowledge in the zetty `knowledge` space. Invoke this skill periodically or when the Human asks to reflect, review, or improve the knowledge base.
This skill examines recent experience notes and uses the patterns found to edit, create, or delete knowledge notes. It closes the learning loop.
Prerequisite skill: zetty-cli — always follow its conventions for IDs, commands, and error handling.
Both spaces must exist:
zetty space list
List experiences and identify those not yet reflected upon. Experiences that have been reflected on will be tagged reflected.
zetty --space experience list
Focus on notes without the reflected tag. Read each one:
zetty --space experience get <full-id>
For each experience, extract signals from the Observations and Knowledge used sections:
| Signal | Meaning | Action |
|---|---|---|
| "Knowledge X was useful" | Knowledge validated | Strengthen confidence — no edit needed unless details can be added |
| "Knowledge X was wrong" | Knowledge is incorrect | Edit the knowledge note to correct it |
| "Knowledge X was outdated" | Knowledge needs refresh | Edit the knowledge note with current information |
| "Didn't have knowledge about Y" | Gap in knowledge base | Create a new knowledge note |
| "Approach Z worked well" | Emergent procedure | Create a type:procedure knowledge note |
| "Approach Z failed" | Anti-pattern | Create a type:principle note documenting the pitfall |
| "Tasks A and B are related" | Missing connection | Update the relevant note bodies to mention each other |
Before making changes, search existing knowledge to avoid duplicates:
zetty --space knowledge search "<terms from signal>"
Read existing notes that might overlap with what you're about to create or edit.
For each signal, apply the appropriate action:
Correct or update an existing note:
zetty --space knowledge get <full-id>
# Read current content, then edit with merged information
zetty --space knowledge edit <full-id> --body "<merged body>"
When editing, preserve existing information. Clearly integrate corrections without losing valid content.
Create a new note (follow the kb-learn note format):
zetty --space knowledge write <<'NOTE'
---