mem:learn
Compatibility: If
AskUserQuestionis unavailable, present options as a numbered list and wait for the user's reply. IfTaskis unavailable, run parallel steps sequentially. Thecontext: forkandagent:frontmatter fields are Claude Code-specific — on OpenCode and VS Code Copilot they are ignored and the skill runs inline using the current model.
Two modes -- detect from user message:
Learn Mode
Triggered by teaching phrases: "remember: X", "learn: X", "our rule is X", "from now on X".
Steps
-
Extract the knowledge from the user's message.
-
Infer the type (
recipeorstyleguide) and tags from content. If ambiguous, ask:
AskUserQuestion:
question: "What type of knowledge is this?"
options:
- "styleguide -- a convention or rule the team follows"
- "recipe -- a how-to guide or procedure"
- Ask for a one-sentence description if one cannot be clearly inferred:
AskUserQuestion:
question: "One-sentence description for this knowledge doc?"
-
Slug the subject into a filename (e.g., "always use pnpm" ->
pnpm-over-npm.md). -
Read the configured docs directory:
npx @codevoyant/agent-kit settings get mem.docsDir 2>/dev/null || echo "docs"
Store as DOCS_DIR (default: docs). Choose the appropriate subdirectory based on type:
styleguide->{DOCS_DIR}/styleguide/directoryrecipe->{DOCS_DIR}/recipes/directory
- Write the
.mdfile with frontmatter:
---
type: styleguide | recipe
tags: [inferred, tags]
description: One-sentence summary
status: active
---
Then the knowledge content as markdown body.
- Run index:
npx @codevoyant/agent-kit mem index
- Confirm:
Learned: {DOCS_DIR}/styleguide/pnpm-over-npm.md
Recall Mode
Triggered by lookup phrases: "remind me about X", "what did we decide on Y", "what's our rule for Z".
Steps
-
Infer type and/or tags from the question.
-
Run:
npx @codevoyant/agent-kit mem find --type <inferred> --tag <inferred> --json
-
Read the matching files.
-
Answer the user's question from the content of those files.
If no matches found, say so and suggest /mem:learn to capture new knowledge.
More from cloudvoyant/codevoyant
mem:help
Use when the user asks about available mem commands or needs help choosing a skill. Triggers on: \"mem help\", \"help mem\", \"what can mem do\", \"mem commands\", \"list mem skills\", \"mem reference\". Lists all mem commands with descriptions, arguments, and usage guidance.
14dev:plan
Use when planning architecture for a project or feature. Triggers on: "dev plan", "architecture plan", "plan architecture", "design architecture", "technical design", "system design for". Produces draft plan artifacts in .codevoyant/plans/{slug}/. Use /dev:approve to promote to docs/architecture/.
14em:review
Use when reviewing an engineering roadmap for quality and realism. Triggers on: "em review", "review roadmap", "sanity check roadmap", "em check", "review this plan". Checks capacity realism, dependency gaps, missing risks, and phasing quality. Auto-launched after em:plan.
13dev:explore
Use when researching technical approaches before building. Triggers on: "explore options", "what are my options for", "research approaches", "compare solutions", "dev explore", "generate proposals", "help me decide between". Runs parallel proposal generation via subagents and outputs to .codevoyant/explore/.
13em:plan
Use when planning a project (epic) or initiative with Linear as tracker.
13pm:plan
Plan a product roadmap for a quarter, half-year, or year. Writes a draft roadmap to .codevoyant/roadmaps/ using capability tiers. Triggers on: "pm plan", "product roadmap", "plan a roadmap", "quarterly roadmap", "annual plan".
13