Loading...
Loading...
Capture knowledge manually into the flywheel. Save a decision, pattern, lesson, or constraint for future sessions. Triggers: "learn", "remember this", "save this insight", "I learned something", "note this pattern".
npx skill4agent add boshu2/agentops learn/learn [content]Tool: AskUserQuestion
Parameters:
questions:
- question: "What type of knowledge is this?"
header: "Type"
multiSelect: false
options:
- label: "decision"
description: "A choice that was made and why"
- label: "pattern"
description: "A reusable approach or technique"
- label: "learning"
description: "Something new discovered (default)"
- label: "constraint"
description: "A rule or limitation to remember"
- label: "gotcha"
description: "A pitfall or trap to avoid"# If file exists, append -2, -3, etc.
slug="<generated-slug>"
counter=2
while [ -f ".agents/knowledge/$(date +%Y-%m-%d)-${slug}.md" ]; do
slug="<generated-slug>-${counter}"
((counter++))
donemkdir -p .agents/knowledge.agents/knowledge/YYYY-MM-DD-<slug>.md---
type: <classification>
source: manual
date: YYYY-MM-DD
---
<content>---
type: pattern
source: manual
date: 2026-02-16
---
# Token Bucket Rate Limiting
Use token bucket pattern for rate limiting instead of fixed windows. Allows burst traffic while maintaining average rate limit. Implementation: bucket refills at constant rate, requests consume tokens, reject when empty.
Key advantage: smoother user experience during brief bursts.if command -v ao &>/dev/null; then
echo "✓ Knowledge saved to <path>"
echo ""
echo "To add this to the quality pool for review:"
echo " ao pool stage <path>"
echo ""
echo "Or let it auto-index on next /retro or /extract."
else
echo "✓ Knowledge saved to <path>"
echo ""
echo "Note: Install ao CLI to enable automatic knowledge flywheel."
fiao pool stageLearned: <one-line summary from content>
Saved to: .agents/knowledge/YYYY-MM-DD-<slug>.md
Type: <classification>
This knowledge is now available for future sessions via /research and /inject./learn "use token bucket for rate limiting"token-bucket-rate-limiting.agents/knowledge/2026-02-16-token-bucket-rate-limiting.mdao pool stage/learnnever-eval-hooks.agents/knowledge/2026-02-16-never-eval-hooks.md/learn "bd dep add A B means A depends on B, not A blocks B"bd-dep-direction| Problem | Cause | Solution |
|---|---|---|
| Slug collision | Same topic on same day | Append |
| Content too long | User pasted large block | Accept it. /learn has no length limit. Suggest /retro for structured extraction if very large. |
| ao pool stage fails | Path wrong or ao not installed | Show error, confirm file was saved to .agents/knowledge/ regardless |
| Duplicate knowledge | Same insight already captured | Check existing files with grep before writing. If duplicate, tell user and show existing path. |
/learn → .agents/knowledge/ → /research finds it → future work is smarter/retro