Capture comprehensive problem-solving narratives from our work sessions, documenting not just the solution but the entire journey of discovery.
Captures problem-solving narratives from work sessions, documenting the entire discovery journey.
/plugin marketplace add danielmiessler/PAIPlugin/plugin install danielmiessler-pai@danielmiessler/PAIPluginCapture comprehensive problem-solving narratives from our work sessions, documenting not just the solution but the entire journey of discovery.
This command captures the full narrative of problem-solving: what we thought was true, what we discovered was actually true, the troubleshooting journey, and the lessons learned. This narrative format makes it easy to harvest insights for updating documentation, commands, or pipelines.
# Interactive mode - guides you through the narrative
bun ${PAI_DIR}/commands/capture-learning.ts
# Direct mode with full narrative (all 6 arguments)
bun ${PAI_DIR}/commands/capture-learning.ts "problem" "initial assumption" "actual reality" "troubleshooting steps" "solution" "key takeaway"
When you say any of these, I'll capture our learning:
The command captures a complete story with these elements:
This narrative approach helps us:
Files are saved to: ${PAI_DIR}/context/learnings/
Named with format: YYYY-MM-DD-problem-description.md
Each file contains:
A captured learning looks like this:
# Learning: Fixed TypeScript Module Resolution Error
## The Full Story
### The Problem We Encountered
TypeScript couldn't find our custom modules...
### What We Initially Thought
We thought the tsconfig paths were incorrectly configured...
### What We Discovered Was Actually True
The issue was actually with the module resolution strategy...
### The Journey: Troubleshooting Steps
1. Checked tsconfig.json paths
2. Verified file locations
3. Tested different module resolution strategies...
### The Solution That Worked
Changed moduleResolution from "node" to "bundler"...
## The Lesson Learned
**So now we know:** TypeScript's module resolution depends on the bundler being used...
The TypeScript implementation for this command is in capture-learning.ts.
The command:
${PAI_DIR}/context/learnings/