memory-management
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
02 资源文件 4
- 脚本scripts/audit-memory.py2.0 KB
- 脚本scripts/capture-memory.py4.7 KB
- 脚本scripts/query-memory.py2.2 KB
- 参考文档templates/note.md1.4 KB
03 SKILL.md 正文
Memory Management
Cross-session memory is a contract with the user, not a black box. Naive
accumulation degrades reliability; managed memory helps. Default: explicit
user-authored preferences (.devin/global_rules.md, skills, repo docs),
not auto-saved memory.
Stateless vs managed vs naive
| Mode | When | Evidence |
|---|---|---|
| Stateless | Default for coding agents. Preferences live in rules/skills/docs the user controls. | Most predictable; no drift or contamination. |
| Managed memory (selective add+delete) | Long-horizon tasks where recalling past executions genuinely helps. User reviews and prunes. | +10% absolute vs naive (arXiv:2505.16067); MemGPT (arXiv:2310.08560). |
| Naive auto-memory (append-only) | Never. | 16-20pp reliability loss (arXiv:2605.07313); temporal contamination (arXiv:2605.17830); reasoning drift (arXiv:2607.02374). |
Hygiene rules
- Prefer explicit — user-authored preferences over agent-auto-saved memory.
- Never naive growth — managed memory must have selective add AND delete.
- Audit periodically — review auto-memory for stale/large/drifting entries; prune aggressively.
- Isolate preferences by task — global injection of all preferences into every session causes contamination.
- Don't trust auto-inferred preferences — preference following is <10% at 10 turns zero-shot (arXiv:2502.09597). Write them down.
- Memory is a contract — user must be able to view, modify, delete anything saved (arXiv:2404.15269).
Anti-patterns: append-only MEMORY.md; auto-saving every preference; "delete all memory" (managed memory helps); opaque memory.
Capturing project memory
When the session produces knowledge worth keeping — answered questions, business rules, project conventions, failed approaches, reusable solutions, decisions:
- Notice — spot something future sessions will need.
- Propose —
ask_user_questionshowing the note text and path. Wait for approval. - Write — on approval, save a Markdown note under
.devin/memory/. - Link — update
.devin/memory/MOC.mdand the daily logbook entry. - Retrieve —
python scripts/query-memory.py "<query>"(in this skill'sscripts/) or/researchscoped to.devin/memory/.
Paths
| What | Path | Pattern |
|---|---|---|
| Answered question / business rule | .devin/memory/notes/YYYY/MM/ |
<topic>.md |
| Daily session log | .devin/memory/logbook/YYYY/MM/ |
YYYY-MM-DD.md |
| Decisions / ADRs | .devin/memory/decisions/ |
ADR-NNN-<slug>.md |
| Index | .devin/memory/MOC.md |
MOC.md |
Note format: see templates/note.md. Required frontmatter: title, date,
session, category, tags, status, cues: (path/symbol/keyword
triggers).
Capture rules
- No capture without approval — always confirm via
ask_user_question. - Plain text — Markdown + frontmatter + grep; no vector DB.
- One fact per note; cite sources (
source: path:lineorsession:). - Write cues, not just facts —
cues:tells future agents when to recall. - Prune stale notes on each capture (
status: archivedor delete). - No secrets in notes (Rules 19, 24).
Post-implementation capture
After a feature/fix lands and before clear/compact: capture intent (why),
state (what + deviations), lessons (worked/failed) — then ask approval.
Evidence
| Claim | Source |
|---|---|
| Naive growth −16-20pp reliability | arXiv:2605.07313 |
| Contamination rises with exposure | arXiv:2605.17830 |
| Selective add+delete +10% vs naive | arXiv:2505.16067 |
| Reasoning drift despite fluent answers | arXiv:2607.02374 |
| Preference following <10% @10 turns | arXiv:2502.09597 |
| Managed memory > fixed context | arXiv:2310.08560 (MemGPT), arXiv:2410.10813 |
| Excessive retrieval harms agentic tasks | arXiv:2608.15008 |
04 同仓库更多 Skills
montador-de-ideias
Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.
git-github-adaptive-engineering
Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.
adaptive-agenda-calendar-routine-engine
Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.
demo
Use when demonstrating a skill in a fixture project.
duplicate-skill
Use when testing duplicate skill name detection.
duplicate-skill
Use when testing duplicate skill name detection.