一键导入
memory-management
Durable project-memory rules for `.agent-memory/` plus session-memory boundaries.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Durable project-memory rules for `.agent-memory/` plus session-memory boundaries.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Git Worktree: parallel working trees for isolated branch-level execution, debugging, and safe experimentation.
Planning-track selection, epic/feature decomposition, readiness gates, and plan-delta rules.
Shared contract for independent review agents and durable review findings.
Review routing, independent post-implementation review gates, multi-model escalation, and targeted optimization follow-up.
Independent evaluation protocol for bounded self-improvement candidate proposals.
Governance rules for bounded self-improvement candidates, promotion gates, and rollback policy.
| name | memory-management |
| description | Durable project-memory rules for `.agent-memory/` plus session-memory boundaries. |
| user-invocable | false |
This skill defines the rules for interacting with the .agent-memory/ directory. It ensures that the project's long-term "brain" remains consistent, clean, and useful.
.agent-memory/
project_decisions.md: High-level architectural and design decisions.error_patterns.md: Recurring bugs and their solutions.archive/: Compressed or outdated entries..agent-memory/.vscode/memory is session memory only. It may hold current-plan notes, transient routing hints, or short-lived user preferences.vscode/memory as canonical project truth..agent-memory/.OVERRIDE — Native Copilot memory is NOT used in this project. Do NOT call
memory.create("/memories/repo/...")even if base systemrepoMemoryInstructionssuggest it. All repo-scoped durable facts go exclusively to.agent-memory/files. Reason:/memories/repo/is workspace-scoped, auto-expires after 28 days, and is not git-tracked or portable.
.agent-memory/./.tmp/, session memory, task-local notes, or other execution artifacts.project_decisions.mdPrefer this shape for durable decisions:
## <Decision Title> — YYYY-MM-DD
### Facts
- Verified repo facts with file/path references.
### Inferences
- Marked assumptions or interpretations that still need validation.
### Decision
- The durable rule, invariant, or operating choice.
### Consequences
- What this changes, constrains, or requires going forward.
### Citations
- File paths that justify the decision.
### memory_meta
- timestamp: YYYY-MM-DD
- author: <agent>
For onboarding / project familiarization runs, append a compact baseline snapshot:
## Onboarding Snapshot — YYYY-MM-DD
### Facts
- Major modules / packages
- Run / build / test commands
- Key conventions and invariants
- Top risks or TODOs worth remembering
### Inferences
- Only if necessary, and clearly marked
error_patterns.mdPrefer this shape for recurring issues:
## <Pattern Title> — YYYY-MM-DD
### Reproduction Signal
- Test name, stack trace, failing command, or clear repro steps.
### Root Cause
- The actual repeated failure mode.
### Fix
- What resolved it.
### Prevention
- Guardrail: test, lint, invariant, review rule, or coding constraint.
### Citations
- File paths or commands that support the pattern.
### memory_meta
- timestamp: YYYY-MM-DD
- author: <agent>
/delegate and background sessions for execution isolation, not as a substitute for durable memory writes.After any non-trivial feature, bugfix, refactor, onboarding scan, review-driven change, or CI/dependency update:
project_decisions.md if there is a new invariant, decision, onboarding snapshot, or behavior change worth keepingerror_patterns.md if the run exposed a repeatable failure mode with a clear fix and prevention guardrail.agent-memory/Facts from Inferences when the statement is not fully verified from the repo.agent-memory/archive/.agent-memory/archive/.[filename]-YYYY-MM-DD.md.If .agent-memory/ is stale, contradictory, or mostly wrong:
After every write or modification to .agent-memory/:
Memory Transaction Successful: <reason> in the output.Use this section when the Orchestrator is deciding whether a run needs durable memory updates.
Before non-trivial planning, implementation, review, or debugging:
.agent-memory/project_decisions.md.agent-memory/error_patterns.md.agent-memory/archive/* only if needed to resolve contradictions or prior contextRequire a memory update when at least one is true:
>= 2 files changed or the refactor was non-trivialSkip durable memory only for mechanical, low-risk, trivial work.
Planner says Memory Update: REQUIRED, the task cannot close without a memory transaction or an explicit user overrideMemory Candidate, evaluate it against the trigger rules aboveALLOW_MEMORY_UPDATE=trueMemory Transaction Successful: <reason> before task close-out