universal-agent-memory 1.0.10 → 1.0.12
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 +138 -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.12",
|
|
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,16 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
CLAUDE.md Universal Template - v10.
|
|
2
|
+
CLAUDE.md Universal Template - v10.9
|
|
3
3
|
|
|
4
4
|
CHANGES IN THIS VERSION:
|
|
5
|
+
- Added Execution Patterns (P32-P36) from deep Terminal-Bench failure analysis
|
|
6
|
+
- Pattern 32: CLI Execution Verification (CEV) - test exactly as verifier runs
|
|
7
|
+
- Pattern 33: Numerical Stability Testing (NST) - multiple seeds, edge cases
|
|
8
|
+
- Pattern 34: Image-to-Structured Pipeline (ISP) - use tools, not reasoning
|
|
9
|
+
- Pattern 35: Decoder-First Analysis (DFA) - understand decoder before encoder
|
|
10
|
+
- Pattern 36: Competition Domain Research (CDR) - research before implementing
|
|
11
|
+
- Now 36 total patterns covering comprehensive failure modes
|
|
12
|
+
|
|
13
|
+
PREVIOUS (v10.8):
|
|
5
14
|
- STRONGER ENFORCEMENT: Mandatory printed checklists at each step
|
|
6
15
|
- HARD STOPS: Cannot proceed without printing verification blocks
|
|
7
16
|
- EXPLICIT CHECKBOXES: Force agent to confirm each action taken
|
|
@@ -706,6 +715,134 @@ python decompress.py /tmp/compressed.bin /tmp/recovered.txt
|
|
|
706
715
|
diff /tmp/original.txt /tmp/recovered.txt && echo "PASS" || echo "FAIL: round-trip broken"
|
|
707
716
|
```
|
|
708
717
|
|
|
718
|
+
### Pattern 32: CLI Execution Verification (CEV)
|
|
719
|
+
When creating executable CLI tools, verify execution method matches tests.
|
|
720
|
+
|
|
721
|
+
**Detection**: Tasks requiring executable scripts, CLI tools, command-line interfaces
|
|
722
|
+
|
|
723
|
+
**Protocol**:
|
|
724
|
+
1. Add proper shebang: `#!/usr/bin/env python3` (or appropriate interpreter)
|
|
725
|
+
2. Make executable: `chmod +x <script>`
|
|
726
|
+
3. **Test EXACTLY as verifier will run it**: `./tool args` not `python3 tool args`
|
|
727
|
+
4. Verify output format matches expected format
|
|
728
|
+
|
|
729
|
+
```bash
|
|
730
|
+
# CLI verification pattern
|
|
731
|
+
cat << 'EOF' > /app/cli_tool
|
|
732
|
+
#!/usr/bin/env python3
|
|
733
|
+
import sys
|
|
734
|
+
# ... implementation
|
|
735
|
+
print(result)
|
|
736
|
+
EOF
|
|
737
|
+
chmod +x /app/cli_tool
|
|
738
|
+
# Test exactly as verifier runs it
|
|
739
|
+
./app/cli_tool input.txt # NOT: python3 /app/cli_tool input.txt
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
**Common mistake**: Script works with `python3 script.py` but fails with `./script.py` (missing shebang/chmod)
|
|
743
|
+
|
|
744
|
+
### Pattern 33: Numerical Stability Testing (NST)
|
|
745
|
+
Numerical algorithms require robustness against edge cases.
|
|
746
|
+
|
|
747
|
+
**Detection**: Statistical sampling, numerical optimization, floating-point computation
|
|
748
|
+
|
|
749
|
+
**Protocol**:
|
|
750
|
+
1. Test with multiple random seeds (3+ iterations, not just one)
|
|
751
|
+
2. Test domain boundaries explicitly (0, near-zero, infinity)
|
|
752
|
+
3. Use adaptive step sizes for derivative computation
|
|
753
|
+
4. Add tolerance margins for floating-point comparisons (1e-6 typical)
|
|
754
|
+
5. Handle edge cases: empty input, single element, maximum values
|
|
755
|
+
|
|
756
|
+
```python
|
|
757
|
+
# Numerical robustness pattern
|
|
758
|
+
import numpy as np
|
|
759
|
+
np.random.seed(42) # Reproducible
|
|
760
|
+
for seed in [42, 123, 456]: # Multiple seeds
|
|
761
|
+
np.random.seed(seed)
|
|
762
|
+
result = algorithm(data)
|
|
763
|
+
assert np.isclose(result, expected, rtol=1e-5), f"Failed with seed {seed}"
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
**Transferable to**: Monte Carlo, optimization, signal processing, ML training
|
|
767
|
+
|
|
768
|
+
### Pattern 34: Image-to-Structured Pipeline (ISP)
|
|
769
|
+
Visual data requires dedicated recognition tools, not reasoning.
|
|
770
|
+
|
|
771
|
+
**Detection**: Tasks involving image analysis, diagram parsing, visual data extraction
|
|
772
|
+
|
|
773
|
+
**Protocol**:
|
|
774
|
+
1. **NEVER rely on visual reasoning alone** - accuracy is unreliable
|
|
775
|
+
2. Search for existing recognition libraries:
|
|
776
|
+
- Chess: `chessimg2pos`, `fenify`, `board_to_fen` (Python)
|
|
777
|
+
- OCR: `tesseract`, `easyocr`, `paddleocr`
|
|
778
|
+
- Diagrams: `diagram-parser`, OpenCV + Hough transforms
|
|
779
|
+
3. Verify extracted structured data before using
|
|
780
|
+
4. If no tools available, clearly state the limitation
|
|
781
|
+
|
|
782
|
+
```bash
|
|
783
|
+
# Image-to-structured pipeline
|
|
784
|
+
pip install board_to_fen
|
|
785
|
+
# OR use tesseract for text
|
|
786
|
+
tesseract image.png output -l eng
|
|
787
|
+
# Verify extracted data
|
|
788
|
+
python -c "import board_to_fen; fen = board_to_fen.predict('chess.png'); print(fen)"
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
**Transferable to**: Medical imaging (DICOM), satellite imagery, document processing
|
|
792
|
+
|
|
793
|
+
### Pattern 35: Decoder-First Analysis (DFA)
|
|
794
|
+
For encode/compress tasks with provided decoder, analyze decoder FIRST.
|
|
795
|
+
|
|
796
|
+
**Detection**: Task provides a decoder/decompressor and asks to create encoder/compressor
|
|
797
|
+
|
|
798
|
+
**Protocol**:
|
|
799
|
+
1. **Read and understand the provided decoder** before writing encoder
|
|
800
|
+
2. Identify expected input format from decoder source
|
|
801
|
+
3. Create minimal test case matching decoder's expected format
|
|
802
|
+
4. Test round-trip with decoder BEFORE optimizing for size
|
|
803
|
+
5. If decoder crashes, your format is wrong - don't optimize further
|
|
804
|
+
|
|
805
|
+
```bash
|
|
806
|
+
# Decoder-first analysis
|
|
807
|
+
# Step 1: Understand decoder
|
|
808
|
+
cat /app/decomp.c | grep -A 10 "read\|fread\|getchar" # Find input parsing
|
|
809
|
+
|
|
810
|
+
# Step 2: Create minimal test matching decoder format
|
|
811
|
+
echo -n "minimal format" > /tmp/test.comp
|
|
812
|
+
|
|
813
|
+
# Step 3: Test with decoder FIRST
|
|
814
|
+
cat /tmp/test.comp | ./decomp
|
|
815
|
+
# If segfault: format is wrong, analyze more
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
**Transferable to**: Protocol implementation, serialization, codec development
|
|
819
|
+
|
|
820
|
+
### Pattern 36: Competition Domain Research (CDR)
|
|
821
|
+
Competitive tasks benefit from researching domain-specific winning strategies.
|
|
822
|
+
|
|
823
|
+
**Detection**: Keywords "win rate", "beat", "competition", "versus", "tournament"
|
|
824
|
+
|
|
825
|
+
**Protocol**:
|
|
826
|
+
1. **Research domain strategies BEFORE implementing**:
|
|
827
|
+
- CoreWars: Paper beats Stone, Imps tie, Scanners vary
|
|
828
|
+
- Chess: Opening books, endgame tablebases
|
|
829
|
+
- Code golf: Known shortest solutions
|
|
830
|
+
2. Time-box implementation iterations: stop at 70% time budget
|
|
831
|
+
3. Track progress per iteration to identify improvement trajectory
|
|
832
|
+
4. If not meeting threshold, document best achieved + gap
|
|
833
|
+
|
|
834
|
+
```
|
|
835
|
+
# CoreWars strategy research
|
|
836
|
+
# Stone bomber: Drops DAT bombs at regular intervals
|
|
837
|
+
# Paper warrior: Self-replicates faster than stone bombs
|
|
838
|
+
# Imp: MOV 0, 2667 - ties but rarely wins
|
|
839
|
+
# Vampire: JMP traps that capture processes
|
|
840
|
+
|
|
841
|
+
# Strategy: Paper beats stone, combine with imp for backup
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
**Transferable to**: Game AI, algorithm competitions, optimization challenges
|
|
845
|
+
|
|
709
846
|
---
|
|
710
847
|
|
|
711
848
|
## ⚡ SESSION START PROTOCOL
|