Skip to main content

memory-retro

Save insights from completed tasks to role memory.

Source facts

Repository
Dwsy/role-persona
Last source activity
May 15, 2026 at 02:56
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
memory-retro
description
Save insights from completed tasks to role memory.
whenToUse
After completing any task involving code changes, architectural decisions, debugging, or non-trivial problem solving. Distill what you learned into reusable memories so future sessions can benefit. Invoke proactively at task end โ€” do not wait for the user to ask.
# Memory Retro You have access to a role-based persistent memory system. After completing this task, reflect on what you learned and save valuable insights. ## Tools Available | Tool | Purpose | |------|---------| | `memory({ action: "add_learning", content: "..." })` | Save a durable insight. LLM auto-extracts tags. Auto-deduplicates. | | `memory({ action: "add_preference", content: "...", category: "..." })` | Save a user preference. Goes directly to consolidated. | | `memory({ action: "search", query: "..." })` | Check if similar memory already exists | | `memory({ action: "reinforce", content: "..." })` | Increment `[Nx]` usage count for existing learning | ## Process 1. **Reflect**: What did I learn that would be useful in the future? 2. **If nothing worth remembering, skip** โ€” not every task produces insights. 3. **For each insight**, decide type: - **Learning**: Durable cross-session fact, pattern, or rule. - **Preference**: User's communication style, tool preference, coding habit. ### Dedup check (built-in) `add_learning` auto-deduplicates. Just call it โ€” if similar text exists, it returns "Already stored". Then use `reinforce` instead. ### Write ``` memory({ action: "add_learning", content: "MyBatis-Plus getOne needs .last('LIMIT 1') to avoid TooManyResultsException" }) ``` LLM auto-extracts tags (e.g., `mybatis`, `gotcha`). No manual tagging. ### Preferences ``` memory({ action: "add_preference", content: "็”จๆˆทๅๅฅฝไธญๆ–‡ๆฒŸ้€š๏ผŒๆŠ€ๆœฏๆœฏ่ฏญๅฏไฟ็•™่‹ฑๆ–‡", category: "Communication" }) ``` ### Reinforce (when you USE an existing memory) ``` memory({ action: "reinforce", content: "ๅฎ‰ๅ…จๅˆ ้™คๅŽŸๅˆ™" }) โ†’ "Reinforced [abc123] -> 6x" ``` ## Quality Rules ### What to remember - โœ… **Root cause**: "X fails because of Y. Fix: Z" - โœ… **Gotcha**: "Tool A requires flag B, otherwise silently fails" - โœ… **Decision**: "We chose X over Y because Z" - โœ… **Pattern**: "This project uses pattern A for all B" - โœ… **User preference discovered** ### What NOT to remember - โŒ Obvious facts - โŒ Task-specific instances (save the *pattern*, not the *instance*) - โŒ Temporary states - โŒ Redundant with existing entries - โŒ Full error messages without analysis ### Writing rules - **Concise** โ€” under 120 chars - **Own words** โ€” distill, don't copy-paste - **Actionable** โ€” changes how you'd approach similar tasks - **Conservative** โ€” bad memory > missing memory is worse. 1 quality insight > 5 mediocre. ## Pending Layer Two paths to memory: ``` Auto-extract (agent_end, compaction) โ†’ pending.md [โ—‹] โ†’ search score โ‰ฅ0.5 โ†’ auto-promote โ†’ consolidated [0x] Manual (this tool) โ†’ consolidated [0x] directly ``` The pending layer filters noise. Only memories proven useful by actual usage survive. Manual entries skip pending because you're explicitly deciding they're worth keeping. ## Reinforce vs Promote | Action | Effect | When | |--------|--------|------| | `reinforce` | used+1 in consolidated | You used an existing memory | | Search score โ‰ฅ0.5 | auto-reinforce (used+1) | Found via search | | Pending auto-promote | pending โ†’ consolidated | Pending entry is relevant | | `consolidate` | dedup + canonical rewrite | Routine maintenance | ## Category Reference | Category | When | |----------|------| | `Communication` | Language, style, tone | | `Code` | Style, conventions, abstraction | | `Tools` | CLI, editors, workflows | | `Workflow` | Process, review, deployment | | `General` | Everything else | ## Examples ``` โœ… Good: memory({ action: "add_learning", content: "MyBatis-Plus getOne needs .last('LIMIT 1')" }) โœ… Good (reinforce): memory({ action: "reinforce", content: "ๅฎ‰ๅ…จๅˆ ้™คๅŽŸๅˆ™" }) โŒ Bad: "The user asked me to fix a bug" โ€” too generic โŒ Bad: "Error at /src/index.ts:42" โ€” copy-paste, no insight ``` ## Important - `add_learning` **auto-deduplicates** โ€” if similar exists, use `reinforce` instead. - LLM **auto-extracts tags** โ€” no manual tagging needed. - Quality > quantity. 30 quality entries > 300 noisy ones. - The system auto-extracts at session end, but manual retro is more accurate.
View on GitHub