Back to Skills

swe-wm-update

verified

simple|medium|large (optional, default medium)

View on GitHub

Marketplace

EarthmanWeb

EarthmanWeb/serena-workflow-engine

Plugin

swe

Repository

EarthmanWeb/serena-workflow-engine

skills/swe-wm-update/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/EarthmanWeb/serena-workflow-engine/blob/main/skills/swe-wm-update/SKILL.md -a claude-code --skill swe-wm-update

Installation paths:

Claude
.claude/skills/swe-wm-update/
Powered by add-skill CLI

Instructions

## ⚠️ WORKFLOW INITIALIZATION

**If starting a new session**, first read workflow initialization:
```
mcp__plugin_swe_serena__read_memory("WF_INIT")
```
Follow WF_INIT instructions before executing this skill.

---

# /swe-wm-update

**CRITICAL: This is the ONLY way to update Working Memory.**

Do NOT use multiple `edit_memory` calls. Each call triggers the daemon.
Use this skill to make ONE complete write.

## Anti-Pattern (DO NOT DO THIS)

```python
# WRONG - 4 daemon calls!
edit_memory("WM_...", "Task: old", "Task: new", "literal")
edit_memory("WM_...", "Feature: old", "Feature: new", "literal")
edit_memory("WM_...", "State: old", "State: new", "literal")
edit_memory("WM_...", "Progress: old", "Progress: new", "literal")
```

## Correct Pattern

```
/swe-wm-update session_id=a7380848 task="Fix bug in auth" feature=BACKEND state=WF_EXECUTE progress="- [x] Identified issue\n- [ ] Implement fix"
```

## Required Data

Before invoking, you MUST have ALL of:

| Field | Source | Example |
|-------|--------|---------|
| session_id | From hook output or WM filename | `a7380848` |
| task | User's request summary | `"Refactor auth module"` |
| feature | INDEX_FEATURES key | `BACKEND` or `BLOCKS,THEMES` |
| state | Current WF_* step | `WF_EXECUTE` |
| progress | Markdown checklist | `"- [x] Step 1\n- [ ] Step 2"` |

## Process

### Step 1: Validate Required Fields

If ANY field is missing, STOP and gather it first:
- No session_id? → Check hook output or `mcp__plugin_swe_serena__list_memories()`
- No task? → Ask user or infer from conversation
- No feature? → Check `INDEX_FEATURES` or ask user
- No state? → Determine from workflow position
- No progress? → Create initial checklist from task

### Step 2: Build Complete WM Content

```markdown
# Working Memory: Session {session_id}

## Session
- **ID**: {session_id}
- **Task**: {task}
- **Started**: {timestamp}

## Workflow Context
**Current State**: {state}
**Previous State**: {previous_state or 'None'}

## Task Context
- **

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3108 chars