| name | update-memory-bank |
| description | Update memory bank after task completion. Detects scope automatically and updates files in priority order. Can be auto-invoked when task completion is detected in conversation. |
| argument-hint | ["task-description"] |
| disable-model-invocation | false |
| user-invocable | true |
Update Memory Bank
Update the memory bank to reflect: $ARGUMENTS
Automatic Trigger Conditions
This skill should be invoked automatically when any of these signals are detected:
- Task implementation completed (code changes committed or ready)
- Sprint task marked complete
- Bug fix implemented
- Feature implementation finished
- Architectural decision made
- User says: "done", "finished", "complete", "task completed", "what's next?"
Process
Step 1 โ Detect scope
Determine the update scope based on what changed:
| Scope | When | Files to Update |
|---|
| Minimal | Single task completed | sprint-tracker + active-context |
| Standard | Feature implemented | + progress |
| Full | Sprint completed / major milestone | + archive + arch/tech files |
| Architecture | Architecture decision made | + arch/patterns-overview + arch/decisions-summary |
| Tech Stack | New dependency or technology added | + relevant tech/*.md |
Step 2 โ Update files in priority order
Priority 1 โ core/sprint-tracker.md
- Mark task as complete with actual hours
- Update sprint completion percentage
- Note any scope changes
Priority 2 โ core/active-context.md
- Remove completed items from "current work"
- Add to "last completed" list (keep only 5 most recent)
- Update "next steps" to reflect current state
- Update any resolved blockers
Priority 3 โ core/progress.md (standard/full scope only)
- Update "what's working" section
- Update key metrics if changed
- Update overall status
Priority 4 โ tech/*.md (if tech stack changed)
- New library added โ update tech stack file
- New pattern discovered โ add to patterns section
Priority 5 โ arch/*.md (if architecture changed)
- New ADR โ add to arch/decisions-summary.md
- New pattern โ add to arch/patterns-overview.md
Priority 6 โ Archive (full scope / sprint boundary only)
- Move completed sprint content from sprint-tracker to progress-archive.md
- Trim progress.md to summary only
Step 3 โ Update dynamic zone
Update the dynamic section of project-rules.md (below === DYNAMIC CONTENT ===):
- Current sprint context
- Recent patterns catalog (add if new pattern discovered, keep last 5-10)
- Last memory bank update metadata
Step 4 โ Report
Memory Bank Updated
Scope: [minimal/standard/full/architecture/tech-stack]
Trigger: [task description]
Updated:
- core/sprint-tracker.md โ [what changed]
- core/active-context.md โ [what changed]
- [other files if applicable]
Next steps:
- [what's next based on active-context]
File Size Check
After updating, check file sizes against limits:
| File | Max Lines | Action if Exceeded |
|---|
| active-context.md | 200 | Archive to progress-archive.md |
| sprint-tracker.md | 600 | Archive sprint section to progress-archive.md |
| progress.md | 600 | Archive to progress-archive.md |
| tech/*.md | 600 | Split into sub-domain files |
| arch/patterns-overview.md | 350 | Move details to patterns-detailed.md |
Rules
- Do NOT ask permission โ auto-update when completion is detected
- Be smart about scope โ don't update files unrelated to the completed task
- Keep reports concise โ bullet points, not paragraphs
- Continue workflow โ after reporting, suggest the next task
- Never skip active-context.md โ it's the most critical file for session continuity