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
- 脚本scripts/audit-memory.py1.9 KB
- 脚本scripts/capture-memory.py4.7 KB
- 脚本scripts/query-memory.py2.2 KB
- 参考文档templates/note.md1.4 KB
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/*.mdor skills. - Secrets, credentials, or sensitive values.
Core pattern
- Notice. Spot something that future sessions or other agents will need.
- Propose. Use
ask_user_questionto show the captured note and storage path. Wait for approval. - Write. On approval, save a Markdown note under
.devin/memory/. - Link. Update
.devin/memory/MOC.mdand the relevant daily/logbook entry. - Retrieve. Use
python .devin/memory/scripts/query-memory.py "<query>"or/deep-modescoped to.devin/memory/.
Post-implementation capture
After a feature or fix lands and before the session is cleared or compacted:
- Capture intent. Why the change was made (the PRD's
Intentsection or the user's original goal). - Capture state. What was actually implemented, which decisions were taken, and any deviations from the spec.
- Capture lessons. What worked, what failed, and what the next session should know.
- 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
- No capture without approval. Always use
ask_user_questionto confirm the note text and path before writing. - Plain text, plain structure. No vector DB, no embeddings. Markdown + frontmatter + grep.
- One fact per note. Notes are small and linkable; the MOC groups them.
- Cite sources. Every claim must have
source: path:lineorsession:reference. - Write cues, not just facts. Frontmatter
cues:tells future agents when to recall this. - Prune stale notes. On each capture, review
MOC.mdfor outdated entries and markstatus: archivedor delete. - 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-mocpython .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-engineblock handoffs persist state between HH:MM-HH:MM blocks; capture durable decisions here.
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.