mnemonics
Mnemonics: Memory Management via Historian
CRITICAL: You Must Use @historian
Memory tools are ONLY available via the @historian subagent. You CANNOT call these tools directly:
memory_remember- Create or update memoriesmemory_recall- Search and retrieve memoriesmemory_forget- Delete memoriesmemory_list_types- List available memory typesmemory_sync- Rebuild the search index
Always delegate to historian:
@historian remember that we decided on PostgreSQL for the database
@historian what did we decide about authentication?
Memory Types
| Type | Use For | Example |
|---|---|---|
architectural-decision |
System architecture choices | "Using PostgreSQL with read replicas for scaling" |
design-decision |
UI/UX decisions | "Card layout for dashboard, 3 columns on desktop" |
learning |
Lessons and discoveries | "Bun's native TS support removes build step need" |
user-preference |
User preferences | "User prefers dark mode, tabs not spaces" |
project-preference |
Team conventions | "We use conventional commits, PR reviews required" |
issue |
Known problems | "Rate limiting not implemented yet, tracking in #42" |
context |
General context (default) | "Project started Feb 2026, MVP target Q2" |
recurring-pattern |
Reusable patterns | "Error handling: wrap in try/catch, return {error}" |
conventions-pattern |
Coding standards | "Use named exports, avoid default exports" |
Note: Projects may define custom memory types via configuration. Always use
@historian list all memory types availableto see the complete list for the current project.
When to Delegate to Historian
Remember (create/update):
- After making a significant architectural or design decision
- User states a preference about how they work
- Discovering something important about the codebase or tools
- Learning a lesson that should persist across sessions
Recall (search/retrieve):
- Starting a new session → recall relevant context
- User asks "what did we decide about X?"
- Need to check if a decision was already made
- Looking for known issues or patterns
Forget (delete):
- User wants to remove outdated or incorrect memories
- Cleaning up duplicated or irrelevant entries
Sync (reindex):
- After manually editing memory files in
.mnemonics/ - When search results seem outdated
Example Prompts
Remembering
@historian remember that we decided on JWT auth with 15-min expiry
@historian save this learning: Bun handles TypeScript natively without compilation
@historian note that the user prefers minimal UI animations
@historian store this as an architectural-decision: we're using event sourcing for the audit log
Recalling
@historian what did we decide about authentication?
@historian recall any known issues with the API
@historian what are my preferences for this project?
@historian show all architectural decisions
@historian find memories about database choices
Managing
@historian list all memory types available
@historian forget the memory about the old API design
@historian sync the index to include recent memory files
How It Works
- Memories are stored in
.mnemonics/{type}/{title}.mdas markdown files with YAML frontmatter - Indexing is automatic via qmd (hybrid BM25 + vector search)
- Historian handles classification, deduplication, and semantic search
- Files are git-friendly - commit them to share across team
Best Practices
- Be specific in titles - "qmd-cli-for-writes" not "important decision"
- Let historian classify - it will search first to avoid duplicates
- Recall before deciding - check if a decision already exists
- Commit memory files - they're part of project knowledge
More from 5kahoisaac/opencode-configs
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
13docx
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When OpenCode needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
9pdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When OpenCode needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
8pptx
Presentation creation, editing, and analysis. When OpenCode needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
6xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When OpenCode needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
6frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
6