universal-agent-memory 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/CLAUDE.template.md +139 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-agent-memory",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Universal AI agent memory system - CLAUDE.md templates, memory, worktrees for Claude Code, Factory.AI, VSCode, OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
CLAUDE.md Universal Template - v10.
|
|
2
|
+
CLAUDE.md Universal Template - v10.8
|
|
3
3
|
|
|
4
4
|
CHANGES IN THIS VERSION:
|
|
5
|
+
- STRONGER ENFORCEMENT: Mandatory printed checklists at each step
|
|
6
|
+
- HARD STOPS: Cannot proceed without printing verification blocks
|
|
7
|
+
- EXPLICIT CHECKBOXES: Force agent to confirm each action taken
|
|
8
|
+
- PRE-COMPLETION CHECKLIST: 10-item verification before "done"
|
|
9
|
+
- Visual blocks with ╔══╗ formatting for better visibility
|
|
10
|
+
- Three required blocks marked with 🔴 (must print or fail)
|
|
11
|
+
|
|
12
|
+
PREVIOUS (v10.7):
|
|
13
|
+
- Added Verification Patterns (P27-P31) from Terminal-Bench failure analysis
|
|
14
|
+
- Pattern 27: Output Directory Cleanup (ODC) - remove non-required files
|
|
15
|
+
- Pattern 28: Service Smoke Test (SST) - test services before completing
|
|
16
|
+
- Pattern 29: Multi-Solution Discovery (MSD) - find ALL valid solutions
|
|
17
|
+
- Pattern 30: Performance Threshold Tuning (PTT) - iterate to meet thresholds
|
|
18
|
+
- Pattern 31: Round-Trip Verification (RTV) - verify compress/decompress works
|
|
19
|
+
- Updated Pattern Router to include verification patterns
|
|
20
|
+
- Added 5 completion gates (output, tests, constraints, cleanup, services)
|
|
21
|
+
|
|
22
|
+
PREVIOUS (v10.6):
|
|
5
23
|
- Added Domain-Specific Patterns (P21-P26)
|
|
6
24
|
- Pattern 21: Chess Engine Integration (CEI) - use Stockfish, not reasoning
|
|
7
25
|
- Pattern 22: Git Recovery Forensics (GRF) - backup first, forensic approach
|
|
@@ -568,6 +586,126 @@ done
|
|
|
568
586
|
|
|
569
587
|
**Reserve 30% of time budget for near-miss iteration.**
|
|
570
588
|
|
|
589
|
+
### Pattern 27: Output Directory Cleanup (ODC)
|
|
590
|
+
Tests often check for ONLY specific files in output directories.
|
|
591
|
+
|
|
592
|
+
**Detection**: Tasks mentioning "single file", "only", constraints on output directory contents
|
|
593
|
+
|
|
594
|
+
**Protocol**:
|
|
595
|
+
1. **Before completing**, list output directory: `ls /app/output/`
|
|
596
|
+
2. **Remove non-required files**: compiled binaries, temp files, backups
|
|
597
|
+
3. **Keep ONLY the required outputs** as specified in task
|
|
598
|
+
|
|
599
|
+
```bash
|
|
600
|
+
# Clean output directory - keep only required file
|
|
601
|
+
cd /app/polyglot
|
|
602
|
+
ls -la # Check what's there
|
|
603
|
+
rm -f *.o *.out main cmain # Remove compiled artifacts
|
|
604
|
+
ls -la # Verify only main.rs remains
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
**Common mistakes**: Leaving compiled binaries, test files, or backup files in output directories.
|
|
608
|
+
|
|
609
|
+
### Pattern 28: Service Smoke Test (SST)
|
|
610
|
+
Services must be tested BEFORE claiming completion.
|
|
611
|
+
|
|
612
|
+
**Detection**: Tasks involving servers, daemons, APIs, web services
|
|
613
|
+
|
|
614
|
+
**Protocol**:
|
|
615
|
+
1. Start the service
|
|
616
|
+
2. **Immediately test it** with curl/wget/client
|
|
617
|
+
3. If test fails: debug, fix, restart, re-test
|
|
618
|
+
4. Only complete when test PASSES
|
|
619
|
+
|
|
620
|
+
```bash
|
|
621
|
+
# Service verification pattern
|
|
622
|
+
# 1. Start service
|
|
623
|
+
systemctl start nginx
|
|
624
|
+
|
|
625
|
+
# 2. IMMEDIATELY test it
|
|
626
|
+
curl -v http://localhost:80/ 2>&1 | grep -q "200 OK" || echo "FAIL: nginx not serving"
|
|
627
|
+
|
|
628
|
+
# 3. For PyPI server
|
|
629
|
+
python -m http.server 8080 &
|
|
630
|
+
curl -s http://localhost:8080/simple/ | grep -q "href" || echo "FAIL: PyPI not serving"
|
|
631
|
+
|
|
632
|
+
# 4. For git server
|
|
633
|
+
git ls-remote git@localhost:/repo.git 2>&1 | grep -q "refs" || echo "FAIL: git not serving"
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
**NEVER complete without a successful smoke test.**
|
|
637
|
+
|
|
638
|
+
### Pattern 29: Multi-Solution Discovery (MSD)
|
|
639
|
+
Some tasks require finding ALL valid solutions, not just one.
|
|
640
|
+
|
|
641
|
+
**Detection**: Keywords "all moves", "both solutions", "list all", "find every"
|
|
642
|
+
|
|
643
|
+
**Protocol**:
|
|
644
|
+
1. **Parse task for multi-solution requirement**
|
|
645
|
+
2. For chess: Find ALL checkmate moves, not just the first one
|
|
646
|
+
3. For puzzles: Enumerate all valid answers
|
|
647
|
+
4. **Output ALL solutions** in required format
|
|
648
|
+
|
|
649
|
+
```bash
|
|
650
|
+
# Chess: Find ALL checkmate-in-one moves
|
|
651
|
+
# Don't stop at first bestmove, analyze ALL legal moves
|
|
652
|
+
echo -e "position fen $FEN\ngo depth 20" | stockfish | grep "bestmove"
|
|
653
|
+
# Then check if there are MULTIPLE winning moves
|
|
654
|
+
echo -e "position fen $FEN\ngo movetime 5000 multipv 5" | stockfish
|
|
655
|
+
# Extract ALL moves that lead to checkmate
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
### Pattern 30: Performance Threshold Tuning (PTT)
|
|
659
|
+
Tasks with numeric thresholds require iterative tuning.
|
|
660
|
+
|
|
661
|
+
**Detection**: Keywords "win rate", "accuracy", "percentage", "threshold", "at least X%"
|
|
662
|
+
|
|
663
|
+
**Protocol**:
|
|
664
|
+
1. Run initial implementation
|
|
665
|
+
2. Check if thresholds are met
|
|
666
|
+
3. If not: analyze what's missing, tune parameters
|
|
667
|
+
4. Re-run until thresholds pass
|
|
668
|
+
|
|
669
|
+
```bash
|
|
670
|
+
# Performance tuning loop for Core Wars
|
|
671
|
+
while true; do
|
|
672
|
+
# Run tests
|
|
673
|
+
pytest -v 2>&1 | tee results.txt
|
|
674
|
+
|
|
675
|
+
# Check for threshold failures
|
|
676
|
+
if grep -q "need.*%+" results.txt; then
|
|
677
|
+
echo "Threshold not met - tuning..."
|
|
678
|
+
# Analyze which opponent needs better strategy
|
|
679
|
+
# Modify warrior code
|
|
680
|
+
# Re-run
|
|
681
|
+
else
|
|
682
|
+
break
|
|
683
|
+
fi
|
|
684
|
+
done
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
**For compression tasks**: If decompression fails, verify round-trip: `compress | decompress == original`
|
|
688
|
+
|
|
689
|
+
### Pattern 31: Round-Trip Verification (RTV)
|
|
690
|
+
For transform/encode/compress tasks, verify the reverse operation.
|
|
691
|
+
|
|
692
|
+
**Detection**: Keywords "compress", "encode", "serialize", "encrypt", and task mentions "decompress", "decode", etc.
|
|
693
|
+
|
|
694
|
+
**Protocol**:
|
|
695
|
+
1. Create test data
|
|
696
|
+
2. Apply forward transform (compress)
|
|
697
|
+
3. **Immediately apply reverse** (decompress)
|
|
698
|
+
4. **Verify original == result**
|
|
699
|
+
5. Fix if not matching
|
|
700
|
+
|
|
701
|
+
```bash
|
|
702
|
+
# Round-trip verification for compression
|
|
703
|
+
echo "original data" > /tmp/original.txt
|
|
704
|
+
python compress.py /tmp/original.txt /tmp/compressed.bin
|
|
705
|
+
python decompress.py /tmp/compressed.bin /tmp/recovered.txt
|
|
706
|
+
diff /tmp/original.txt /tmp/recovered.txt && echo "PASS" || echo "FAIL: round-trip broken"
|
|
707
|
+
```
|
|
708
|
+
|
|
571
709
|
---
|
|
572
710
|
|
|
573
711
|
## ⚡ SESSION START PROTOCOL
|