9thlevelsoftware/legion/memory-manager
- community
Checking that the SKILL.md file is still in the repository.
Stores and retrieves task outcomes and agent performance across sessions via .planning/memory/OUTCOMES.md, scores recalled entries by recency and importance, and degrades gracefully when memory files are absent. Use when the user references past sessions, asks to recall previous results, records lessons learned, or is working within a Legion multi-agent workflow.
Install
npx vskill@latest install 9thlevelsoftware/legion/memory-managerSKILL.md
Memory Manager
Cross-session memory layer for Legion. Tracks agent performance and task outcomes, provides pattern recall with recency-based decay, and degrades gracefully when memory is not present. All memory operations are explicit calls from workflows — no hooks, no background processes.
References:
- State File Locations from
workflow-common.md(memory paths at.planning/memory/) - Memory Conventions from
workflow-common.md(lifecycle, paths, integration points) - Execution Tracker Section 2 from
execution-tracker.md(plan completion flow where memory recording is triggered) .planning/memory/OUTCOMES.md— the single memory file read and written by this skill
Section 1: Memory Principles
Core rules governing all memory operations:
- Passive and opt-in — memory operations are called explicitly by workflows. No hooks, no background processes, no automatic triggers. A workflow must choose to store or recall.
- Human-readable markdown — all memory is stored as structured markdown tables, consistent with PROJECT.md, STATE.md, and all other Legion state files. No JSON, no binary, no databases.
- Graceful degradation — every caller checks for memory availability before using it. If memory files don't exist, the workflow proceeds identically to how it worked before Phase 9. Memory is an enhancement, never a requirement.
- Append-only with opt-in pruning — outcome records are added, never modified or deleted automatically. Decay happens at recall time through scoring, not through deletion. When
memory.auto_pruneis enabled, records exceeding the threshold are archived (moved to ARCHIVE.md), never deleted. - Supplement, not override — memory boosts agent recommendations but cannot override mandatory roles, division alignment, or the core recommendation algorithm in agent-registry.md.
- Minimal footprint — one directory (
.planning/memory/), four files (OUTCOMES.md,PATTERNS.md,ERRORS.md,PREFERENCES.md). Each file has a distinct schema and purpose — no duplication across files. - Strict project scope — memory recall and scoring are project-local by default. Agent outcomes from one project MUST NOT be used to boost or penalize recommendations in another project unless an explicit future opt-in feature is added.
Section 2: Memory File Format
Memory lives in a single file:
File structure:
Field definitions:
| Field | Format | Description | |
|---|---|---|---|
| ID | O-{NNN} | Sequential, zero-padded to 3 digits. Next ID = count of existing records + 1 | |
| Date | YYYY-MM-DD | When the outcome was recorded | |
| Branch | Git branch name | Current branch at record time (via git branch --show-current). Existing records without Branch are treated as default branch | |
| Phase | Integer | Phase number where the outcome occurred | |
| Plan | NN-PP | Plan ID (e.g., 05-01) | |
| Agent | Agent ID or autonomous | The agent that executed the work | |
| Task Type | Tag from agent-registry | Primary task type category (e.g., workflow, frontend, quality-review) | |
| Outcome | success / partial / failed | How the plan or review resolved | |
| Importance | 1 through 5 | Significance score (see Importance Scoring below) | |
| Tags | Comma-separated | Searchable keywords: phase slug, agent division, technology, domain | |
| Summary | Free text (one line) | Brief description of what happened |
Importance scoring:
| Base Score | Condition | |
|---|---|---|
| 5 | Plan failed — critical learning signal | |
| 4 | Review escalated (3 cycles exhausted) | |
| 3 | Plan partial or review needed 2+ cycles | |
| 2 | Standard success — plan completed, review passed | |
| 1 | Trivial or expected outcome (autonomous config changes) |
Adjustment modifiers (add to base, cap at 5):
- First time an agent handles this task type: +1
- Cross-division work (agent from different division than task type): +1
- Review found 3+ blockers before passing: +1
Section 3: Store Operation
How to add outcome records. Called by build.md (after plan execution) and review.md (after review cycle completes).
Store Decision (embedded in outcome records):
Key decisions are captured in the Summary and Tags fields of outcome records rather than a separate file. For example:
- "Chose engineering-senior-developer over engineering-rapid-prototyper for production Laravel work" (tags:
agent-selection, engineering) - "Escalated review after 3 cycles — milestone-tracker had persistent edge case" (tags:
escalation, review, milestone)
This keeps the memory layer minimal (one file) while still enabling decision recall for session briefing.
Section 4: Recall Operation
How to query memory. Called by phase-decomposer.md (agent recommendation) and status.md (session briefing).
General Recall:
Recall for Agent Recommendation:
A specialized recall mode used by phase-decomposer.md Section 4 during agent selection.
Recall Archetype Scores:
A specialized recall mode that groups outcomes by task_type to produce archetype-level performance data. Consumed by agent-registry recommendation algorithm for archetype-weighted boosts.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/memory-manager/SKILL.md
Popularity
- Repository stars
- 62
- Repository forks
- 7
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/9thlevelsoftware/legion/memory-manager)