Saving Knowledge
Store learnings with structured metadata for better retrieval.
Workflow
- Identify what to save (decision, gotcha, pattern, preference, teaching)
- Call
remember()with rich metadata - For completed tasks:
resolve_by_text(text)orresolve(learning_id, reason) - For connected insights:
relate_learnings(id_a, id_b, relation_type)
Open Tasks
A commit closes an open task only when its subject names the task, by ticket key
(YM-123) or learning id (#12345). An id anchor is weaker: the subject must
also share two words with the task text. Write that key into the task text
itself when you save it, otherwise no commit can ever close it.
remember() Parameters
| Parameter | Purpose | Example |
|-----------|---------|---------|
| text | What to remember | "CGO is disabled in yesmem Makefile" |
| category | gotcha, decision, pattern, preference, explicit_teaching, strategic | "decision" |
| entities | Files, systems, people | ["Makefile", "CGO"] |
| actions | Commands, operations | ["go build", "make deploy"] |
| trigger | When to surface this | "When discussing CGO or cross-compilation" |
| context | Why this matters | "Breaks tree-sitter integration" |
| anticipated_queries | 3-5 search phrases | ["CGO disabled", "cross compile yesmem"] |
| source | user_stated, agreed_upon, claude_suggested | "agreed_upon" |
| project | Project scope | "yesmem" |
| task_type | Only for open tasks: task, idea, blocked, stale | "task" |
| supersedes | ID of learning this replaces | 12345 |
relate_learnings()
Connect two learnings with semantic edges:
supports— one learning confirms anothercontradicts— learnings conflictdepends_on— one requires the otherrelates_to— general connection
Tips
anticipated_queries: vary between short keywords and full questionssourcetrust hierarchy: user_stated > agreed_upon > claude_suggested- Use
supersedeswhen updating outdated knowledge — don't create duplicates resolve_by_textfinds matching open tasks by text search