AGENT SKILL

memory-management

暂无简介

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
1

02 资源文件 4

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

  1. Prefer explicit — user-authored preferences over agent-auto-saved memory.
  2. Never naive growth — managed memory must have selective add AND delete.
  3. Audit periodically — review auto-memory for stale/large/drifting entries; prune aggressively.
  4. Isolate preferences by task — global injection of all preferences into every session causes contamination.
  5. Don't trust auto-inferred preferences — preference following is <10% at 10 turns zero-shot (arXiv:2502.09597). Write them down.
  6. 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:

  1. Notice — spot something future sessions will need.
  2. Propose — ask_user_question showing the note text and path. Wait for approval.
  3. Write — on approval, save a Markdown note under .devin/memory/.
  4. Link — update .devin/memory/MOC.md and the daily logbook entry.
  5. Retrieve — python scripts/query-memory.py "<query>" (in this skill's scripts/) or /research scoped 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

  1. No capture without approval — always confirm via ask_user_question.
  2. Plain text — Markdown + frontmatter + grep; no vector DB.
  3. One fact per note; cite sources (source: path:line or session:).
  4. Write cues, not just facts — cues: tells future agents when to recall.
  5. Prune stale notes on each capture (status: archived or delete).
  6. 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

Leostruka
Leostruka/devin-bundle

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.

★ 0
Leostruka
Leostruka/devin-bundle

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.

★ 0
Leostruka
Leostruka/devin-bundle

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.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0