AGENT SKILL

project-memory

Use when the session produces knowledge worth remembering across sessions, such as answered user questions, business rules, project conventions, failed approaches, reusable solutions, or decisions. Captures it with user approval and stores it as plain-text notes inside .devin/ for future retrieval.

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

01 前言 Front Matter

name
project-memory
triggers
[ "user", "model" ]
description
Use when the session produces knowledge worth remembering across sessions, such as answered user questions, business rules, project conventions, failed approaches, reusable solutions, or decisions. Captures it with user approval and stores it as plain-text notes inside .devin/ for future retrieval.

02 资源文件 4

03 SKILL.md 正文

Project Memory

Cross-session memory for Devin CLI, stored as plain-text, user-auditable notes inside .devin/.

When to use

  • User answers a question that resolves ambiguity (fiscal quarters, naming convention, scope, etc.).
  • A project convention, constraint, or business rule is discovered.
  • A decision is made and needs rationale preserved.
  • A fix or approach failed and should not be retried.
  • A reusable pattern or workaround is found.
  • After an implementation finishes, to capture intent, state, and lessons before clear/compact.
  • Ending a session and summarizing what matters for the next one.

When NOT to use

  • Short, self-contained tasks - keep stateless.
  • Preferences that belong in .devin/global_rules.md / .devin/rules/*.md or skills.
  • Secrets, credentials, or sensitive values.

Core pattern

  1. Notice. Spot something that future sessions or other agents will need.
  2. Propose. Use ask_user_question to show the captured note and storage path. Wait for approval.
  3. Write. On approval, save a Markdown note under .devin/memory/.
  4. Link. Update .devin/memory/MOC.md and the relevant daily/logbook entry.
  5. Retrieve. Use python .devin/memory/scripts/query-memory.py "<query>" or /deep-mode scoped to .devin/memory/.

Post-implementation capture

After a feature or fix lands and before the session is cleared or compacted:

  1. Capture intent. Why the change was made (the PRD's Intent section or the user's original goal).
  2. Capture state. What was actually implemented, which decisions were taken, and any deviations from the spec.
  3. Capture lessons. What worked, what failed, and what the next session should know.
  4. Ask for approval before writing the note.

Quick reference

What to capture Exact path Filename pattern
Answered question / business rule .devin/memory/notes/YYYY/MM/<topic>.md <topic>.md
Daily session log .devin/memory/logbook/YYYY/MM/YYYY-MM-DD.md YYYY-MM-DD.md
Decisions / ADRs .devin/memory/decisions/ADR-NNN-<slug>.md ADR-NNN-<slug>.md
Index .devin/memory/MOC.md MOC.md

For the fiscal-quarters example on 2026-08-27, the note path is .devin/memory/notes/2026/08/fiscal-quarters.md.

Note format

See templates/note.md for the full note template and a concrete example.

Required frontmatter: title, date, session, category, tags, status, and cues: (path/symbol/keyword triggers).

Rules

  1. No capture without approval. Always use ask_user_question to confirm the note text and path before writing.
  2. Plain text, plain structure. No vector DB, no embeddings. Markdown + frontmatter + grep.
  3. One fact per note. Notes are small and linkable; the MOC groups them.
  4. Cite sources. Every claim must have source: path:line or session: reference.
  5. Write cues, not just facts. Frontmatter cues: tells future agents when to recall this.
  6. Prune stale notes. On each capture, review MOC.md for outdated entries and mark status: archived or delete.
  7. User owns the contract. Notes must be viewable, editable, and deletable by the user; never hide them.

Common mistakes

  • Auto-saving every user answer. Captures noise and causes contamination. Ask first.
  • Dumping into one giant MEMORY.md. Becomes unsearchable and drifts.
  • No cues. A note without cues: is unlikely to be retrieved at the right moment.
  • Storing secrets. Memory files are project-tracked; never put credentials there.

Red flags

  • "I'll just remember this for next time" - no, write it or lose it.
  • "The user already told me once, I don't need approval" - always ask before persisting.
  • "One big file is easier" - it is not.

Scripts

  • python .devin/memory/scripts/capture-memory.py --note <file> --update-moc
  • python .devin/memory/scripts/query-memory.py "<query>"
  • python .devin/memory/scripts/audit-memory.py

Evidence

  • arXiv:2505.16067: selective add+delete beats naive memory growth by ~10%.
  • arXiv:2605.07313 / 2605.17830: naive accumulation causes 16-20pp reliability loss and temporal contamination.
  • arXiv:2607.20972: voluntary memory use ≈ 0; effective memory is harness-owned and cue-anchored.
  • arXiv:2606.12329 (PROJECTMEM): event-sourced, plain-text project memory with deterministic pre-action judgment.

Cross-skills

  • adaptive-agenda-calendar-routine-engine block handoffs persist state between HH:MM-HH:MM blocks; capture durable decisions here.

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