Problem diagnosis for World Weaver memory systems - identify root causes and suggest fixes
Problem diagnosis for World Weaver memory systems - identify root causes and suggest fixes.
This skill provides diagnostic capabilities for:
Invoke this skill when:
1. Check neuromodulators
β Are DA/NE/ACh returning non-zero values?
β Run: ww-bio-auditor
2. Check eligibility traces
β Is decay happening correctly?
β Run: ww-trace-debugger
3. Check weight updates
β Is strengthen_relationship() implemented?
β Is three-factor learning complete?
4. Check learning rates
β Episodic LR >> Semantic LR?
β CLS ratio correct?
1. Check storage
β Was memory actually stored?
β Query: mcp__ww-memory__recall_episodes(query="*", limit=5)
2. Check embeddings
β Is vector index populated?
β Query: Check Qdrant collection
3. Check retrieval
β Is query embedding computed?
β Is similarity threshold too high?
4. Check session
β Is session ID correct?
β Is there a session mismatch?
1. Check database connections
β Is Neo4j responding?
β Is Qdrant responding?
2. Check query patterns
β Are there N+1 queries?
β Is there missing indexing?
3. Check memory usage
β Is there unbounded growth?
β Run: ww-leak-hunter
4. Check caching
β Is cache being used?
β Is cache invalidation correct?
β Run: ww-cache-analyzer
1. Check race conditions
β Is there concurrent access?
β Run: ww-race-hunter
2. Check cache coherence
β Is stale data being served?
β Run: ww-cache-analyzer
3. Check transaction integrity
β Are writes atomic?
β Is there rollback on failure?
4. Check type consistency
β Are IDs consistent (str vs int)?
β Are timestamps consistent?
# Check service health
curl http://localhost:7474 # Neo4j
curl http://localhost:6333/collections # Qdrant
# Check MCP server
ps aux | grep ww.mcp
# Check logs
tail -50 /tmp/ww-*.log
# Neo4j query analysis
PROFILE MATCH (e:Episode) RETURN count(e)
# Check indexes
SHOW INDEXES
# Check constraints
SHOW CONSTRAINTS
# Check memory stats
mcp__ww-memory__memory_stats()
# Check recent episodes
mcp__ww-memory__recall_episodes(
query="*",
limit=10,
time_filter={"after": "2024-01-01"}
)
# Check entity graph
mcp__ww-memory__semantic_recall(
query="*",
limit=10
)
## WW Diagnostic Report
**Symptom**: {User-reported problem}
**Date**: {timestamp}
**Session**: {session_id}
### Quick Checks
| Check | Status | Notes |
|-------|--------|-------|
| Neo4j | {UP/DOWN} | {latency} |
| Qdrant | {UP/DOWN} | {latency} |
| MCP Server | {UP/DOWN} | {pid} |
### Root Cause Analysis
**Primary Cause**: {Identified root cause}
**Evidence**:
\`\`\`
{Diagnostic output showing the issue}
\`\`\`
**Contributing Factors**:
1. {Factor 1}
2. {Factor 2}
### Recommended Fix
**Immediate Action**:
\`\`\`bash
{Command to fix immediately}
\`\`\`
**Code Fix** (if needed):
\`\`\`python
# File: {path}
# Line: {number}
{code change}
\`\`\`
**Prevention**:
{How to prevent this in future}
### Verification
After fix, verify with:
\`\`\`bash
{verification command}
\`\`\`
Diagnosis may spawn specialized agents:
| Symptom | Agents |
|---|---|
| Learning issues | ww-bio-auditor, ww-trace-debugger, ww-hinton-validator |
| Memory issues | ww-memory (direct query) |
| Performance | ww-leak-hunter, ww-cache-analyzer |
| Corruption | ww-race-hunter, ww-cache-analyzer |
Root cause: Method missing in neo4j_store.py
Fix: Implement the method (see bio-memory audit)
Root cause: Hardcoded return values
Fix: Implement actual computation (see bio-memory audit)
Root cause: Missing decay or wrong decay order
Fix: Apply decay before accumulation
Root cause: Missing invalidation on write
Fix: Add cache.pop() after database write
Root cause: TOCTOU race condition
Fix: Use dict.get() instead of key check + access
If diagnosis cannot identify root cause: