ww-diagnose
Problem diagnosis for World Weaver memory systems - identify root causes and suggest fixes
What this skill does
# WW Diagnose Skill
Problem diagnosis for World Weaver memory systems - identify root causes and suggest fixes.
## Purpose
This skill provides diagnostic capabilities for:
1. **Learning Issues**: Why isn't learning improving?
2. **Memory Issues**: Why can't I find memories?
3. **Performance Issues**: Why is it slow?
4. **Integration Issues**: Why isn't MCP working?
5. **Consistency Issues**: Why is data corrupted?
## When to Use
Invoke this skill when:
- User reports "learning isn't working"
- User reports "can't find my memories"
- User reports "it's very slow"
- User reports "getting errors"
- User reports "data seems wrong"
## Diagnostic Decision Tree
### Symptom: Learning Not Improving
```
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?
```
### Symptom: Memory Not Found
```
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?
```
### Symptom: Slow Performance
```
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
```
### Symptom: Data Corruption
```
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?
```
## Diagnostic Commands
### Quick Health Check
```bash
# 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
```
### Database Diagnostics
```python
# Neo4j query analysis
PROFILE MATCH (e:Episode) RETURN count(e)
# Check indexes
SHOW INDEXES
# Check constraints
SHOW CONSTRAINTS
```
### Memory System Diagnostics
```python
# 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
)
```
## Diagnostic Report Format
```markdown
## 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}
\`\`\`
```
## Agent Integration
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 |
## Common Issues Quick Reference
### Issue: "strengthen_relationship not found"
```
Root cause: Method missing in neo4j_store.py
Fix: Implement the method (see bio-memory audit)
```
### Issue: "Neuromodulators always return 0"
```
Root cause: Hardcoded return values
Fix: Implement actual computation (see bio-memory audit)
```
### Issue: "Eligibility traces exploding"
```
Root cause: Missing decay or wrong decay order
Fix: Apply decay before accumulation
```
### Issue: "Cache returning stale data"
```
Root cause: Missing invalidation on write
Fix: Add cache.pop() after database write
```
### Issue: "KeyError on dict access"
```
Root cause: TOCTOU race condition
Fix: Use dict.get() instead of key check + access
```
## Error Handling
If diagnosis cannot identify root cause:
1. Collect all diagnostic data
2. Note what was ruled out
3. Suggest further investigation steps
4. Recommend manual debugging approach
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.