memento
npx skills add https://github.com/chakibprojects/memento-skill --skill memento
Agent 安装分布
Skill 文档
Memento
Automated cognitive distillation system. Memento writes its own “work memories” so future sessions inherit reasoning context, not just code.
Argument Routing
Syntax: /memento [action]
Route by explicit action:
| Action | Aliases | Protocol |
|---|---|---|
hydrate |
restore, load, start |
â Rehydration Protocol |
checkpoint |
save, snapshot, end |
â Cognitive Distillation Protocol |
status |
state, info |
â Status Display |
Route by semantic intent:
| User intent (FR/EN) | Route to |
|---|---|
| “reprends”, “où on en était”, “resume context” | â hydrate |
| “sauvegarde”, “fini”, “save session”, “done” | â checkpoint |
| “état actuel”, “what’s saved”, “show context” | â status |
Fallback (no argument):
If /memento is invoked without argument, ask:
ð§ Memento - Que souhaitez-vous faire ?
- `hydrate` â Restaurer le contexte des sessions précédentes
- `checkpoint` â Sauvegarder l'état cognitif de cette session
- `status` â Voir l'état actuel sans modifier
Syntaxe: /memento [action]
Priority Directive
When Memento coexists with native history (e.g., user ran --resume):
- Graveyard is ABSOLUTE â Never suggest an approach listed in
graveyard.md, regardless of what raw history says. This is a formal prohibition. - Architectural decisions â Trust
latest.mdover raw chat history for high-level choices - Contradiction handling â If raw history contradicts Memento files, flag the divergence to the user instead of choosing silently. Example: “I see in the chat history we discussed X, but your Memento graveyard says X was rejected. Which is current?”
Memento is distilled signal. Raw history is noisy data. Use Memento for understanding, raw history for details.
UX Philosophy: Silence is Golden
Files = Detailed â Chronicles contain rich, complete information. That’s the memory.
Terminal = Minimal â Output only confirmation + counts. No redundancy with file contents.
Why?
- Saves output tokens (billed)
- Keeps terminal clean for debugging
- Users can read files or use
/memento statusfor details
Never repeat file contents in terminal output.
Protocol: Hydrate (Session Start)
Trigger: /memento hydrate or restore intent
- Check if
.claude/chronicles/exists - If exists, read in this order:
graveyard.mdâ Accumulated rejected approaches (NEVER suggest these again)latest.mdâ Last session’s cognitive state
- Acknowledge loaded context with summary
- If no chronicles exist, inform user
Output format (minimal):
ð§ Memento hydrated
ââ Last: [date] ([focus])
ââ Graveyard: [n] forbidden approaches
ââ Next: [top priority action]
Ready.
If no chronicles:
ð No Memento context found.
Run `/memento checkpoint` before ending this session.
Protocol: Checkpoint (Session End)
Trigger: /memento checkpoint or save intent
Execute the Shadow-Summarization Protocol, then write results to chronicles.
Shadow-Summarization Protocol
Step 1: Extract Decisions Scan conversation for patterns indicating decisions:
- “Let’s go with…”, “We’ll use…”, “On part sur…”
- Architecture choices, library selections, implementation strategies
- Capture the REASONING, not just the choice
Step 2: Identify Graveyard Candidates Scan for rejected approaches:
- “That won’t work because…”, “On a essayé X mais…”, “Ne pas utiliser…”
- Failed attempts, dead ends, incompatible solutions
- CRITICAL: Record WHY it failed â this is the value
Step 3: Flag Technical Debt Identify conscious compromises:
- “For now we’ll…”, “C’est un hack mais…”, “TODO: refactor when…”
- Shortcuts taken with awareness
Step 4: Capture User Context Note observed user characteristics:
- Skill level in different domains
- Stated preferences (code style, frameworks, verbosity)
- Working patterns
Step 5: Define Next Actions Extract incomplete work:
- Unfinished tasks, “Next we should…”, “Demain on…”
- Open questions or blockers
File Operations
- Create
.claude/chronicles/sessions/if needed - Write session chronicle to
sessions/YYYY-MM-DD_HHMM.md - Append new graveyard entries to
graveyard.md(create with header if first time) - Overwrite
latest.mdwith current state - Confirm to user
Output format (minimal):
ð¸ Checkpoint saved
ââ Decisions: [n] captured
ââ Graveyard: +[n] entries
ââ Tech debt: [n]
ââ Next actions: [n] defined
â .claude/chronicles/
Do NOT repeat file contents. User can run /memento status for details.
Protocol: Status (View State)
Trigger: /memento status or info intent
Read and display current state WITHOUT modifying anything.
Output format (status is allowed to be more detailed since user explicitly requested info):
ð Memento Status
Last update: [timestamp]
Graveyard: [n] entries | Tech debt: [n] items
Active decisions:
⢠[Decision 1]
⢠[Decision 2]
Next actions:
1. [Action 1]
2. [Action 2]
If no chronicles:
ð No Memento context.
Run `/memento checkpoint` to initialize.
Output Templates
Session Chronicle (.claude/chronicles/sessions/YYYY-MM-DD_HHMM.md)
# Session: [Brief description of main focus]
**Date:** [YYYY-MM-DD HH:MM]
## Decisions Made
- **[Decision]**: [Choice made]
- *Reasoning*: [Why this approach]
- *Alternatives considered*: [What else was evaluated]
## Graveyard Additions
- **[Rejected approach]**
- *Why it failed*: [Technical reason]
## Technical Debt Logged
- **[Compromise]**
- *Revisit when*: [Condition]
## User Context Updates
- [Observations about user preferences/level]
## Next Actions
- [ ] [Priority action 1]
- [ ] [Action 2]
## Session Summary
[2-3 sentence narrative]
Graveyard Entry (append to graveyard.md)
## [Rejected Approach Name]
**Added:** [Date]
**Context:** [What we were trying to solve]
**Why it failed:** [Technical explanation]
**Do instead:** [What worked]
Latest State (latest.md)
# Current Project State
**Last updated:** [Timestamp]
## Active Decisions
[Current architectural/technical choices]
## Known Constraints
[From graveyard â things that don't work]
## Pending Technical Debt
[Conscious compromises awaiting resolution]
## User Profile
- **Expertise:** [Observed skill levels]
- **Preferences:** [Code style, communication style]
## Immediate Context
[What we were working on, where we left off]
## Priority Queue
1. [Next action]
2. [Following action]
File Structure
.claude/
âââ chronicles/
âââ latest.md # Current cognitive state (overwritten each checkpoint)
âââ graveyard.md # Cumulative rejected approaches (append-only, NEVER delete)
âââ sessions/
âââ YYYY-MM-DD_HHMM.md # Archived session chronicles
First Checkpoint
If graveyard.md doesn’t exist, create it with:
# Graveyard
Approaches that don't work in this project. **Never suggest these again.**
---