Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

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
1stars

skills/swe-wm-update/SKILL.md

Last Verified

February 1, 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

# /swe-wm-update

**CRITICAL: This skill uses the background daemon for non-blocking WM writes.**

The daemon is located at:
```
.claude/plugins/serena-workflow-engine/hooks/swe_hooks/core/wm_writer_daemon.py
```

## Why Use the Daemon?

- **Non-blocking**: Writes queued asynchronously, won't slow down workflow
- **Write coalescing**: Rapid updates to same file are batched
- **Format validation**: Validates against REF_WM specs before writing
- **Anti-pattern detection**: Rejects single-field edits (use full writes)

## Anti-Pattern (DO NOT DO THIS)

```python
# WRONG - Multiple blocking Serena 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")
```

## Correct Pattern - Using the Daemon

The daemon exposes these functions:

```python
from wm_writer_daemon import async_wm_write, async_wm_append, get_wm_writer

# Queue a full WM write (non-blocking)
async_wm_write(
    filepath=".serena/memories/WM_{session}_session.md",
    content=full_wm_content,
    operation_type='full_write',  # or 'state_update', 'edit_tracking', 'transition_log'
    validate=True,
    session_id="a7380848"
)

# Append to existing WM (reads current, appends, queues write)
async_wm_append(
    filepath=".serena/memories/WM_{session}_session.md",
    append_content="\n## New Section\n...",
    session_id="a7380848"
)
```

## 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

Validation Details

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