universal-agent-memory 1.0.4 → 1.0.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-agent-memory",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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,14 +1,19 @@
1
1
  <!--
2
- CLAUDE.md Universal Template - v10.4
2
+ CLAUDE.md Universal Template - v10.5
3
3
 
4
4
  CHANGES IN THIS VERSION:
5
+ - STRENGTHENED Pattern Router: Now requires explicit analysis block output
6
+ - STRENGTHENED Constraint Extraction: Mandatory checklist with verification
7
+ - STRENGTHENED Adversarial Thinking: Explicit attack vector enumeration
8
+ - All pattern activations now require printed confirmation blocks
9
+ - Pattern Router, Constraint Checklist, and Adversarial Analysis are MANDATORY outputs
10
+
11
+ PREVIOUS (v10.4):
5
12
  - Added MANDATORY COMPLETION GATES section (3 gates must pass before "done")
6
13
  - Gate 1: Output Existence Check (enforces P12)
7
14
  - Gate 2: Constraint Compliance Check (enforces P17)
8
15
  - Gate 3: Test Verification (enforces P13)
9
16
  - Added PATTERN ROUTER as Critical Reminder #0 (auto-selects patterns)
10
- - Fixes 75% of failures caused by pattern non-compliance
11
- - HARD STOP RULE: Cannot complete with failing gates
12
17
 
13
18
  PREVIOUS (v10.3):
14
19
  - Added 5 new generic patterns (16-20) from deep failure analysis
@@ -1074,15 +1079,24 @@ pytest /tests/ -v 2>&1 | tail -30
1074
1079
 
1075
1080
  **These reminders exploit recency bias - place at END for maximum compliance.**
1076
1081
 
1077
- 0. **PATTERN ROUTER (EXECUTE FIRST)**: Before ANY work, classify and select patterns:
1078
- | Task Contains... | Select Patterns |
1079
- |------------------|-----------------|
1080
- | "create file", "output to" | P12, P16 (Output) |
1081
- | "exactly", "only", "single" | P17, P14 (Constraints) |
1082
- | "bypass", "break", "exploit" | P20 (Adversarial) |
1083
- | known algorithm (crypto, chess) | P11 (Pre-computed) |
1084
- | image/audio → text | P9, P18 (Pipeline) |
1085
- Print: "SELECTED PATTERNS: P12, P17, P14" before starting.
1082
+ 0. **PATTERN ROUTER (MANDATORY FIRST STEP)**:
1083
+ BEFORE ANY work, you MUST print this analysis block:
1084
+ ```
1085
+ === PATTERN ROUTER ===
1086
+ Task: [one-line task summary]
1087
+ Classification: [file-creation | constraint-validation | adversarial | pipeline | impossible]
1088
+
1089
+ SELECTED PATTERNS:
1090
+ - P12 (OEV): [YES/NO] - Does task require creating files?
1091
+ - P17 (CE): [YES/NO] - Does task have "exactly/only/single/must be" constraints?
1092
+ - P20 (AT): [YES/NO] - Does task involve "bypass/break/exploit/filter"?
1093
+ - P11 (Pre-computed): [YES/NO] - Is this a known algorithm (crypto/chess/ML)?
1094
+ - P18 (MTP): [YES/NO] - Does task need multiple tools chained?
1095
+
1096
+ ACTIVE PATTERNS: [list only YES patterns]
1097
+ === END ROUTER ===
1098
+ ```
1099
+ DO NOT proceed without printing this block first.
1086
1100
 
1087
1101
  1. **BACKUP FIRST**: Before modifying ANY config, database, or critical file:
1088
1102
  ```bash
@@ -1129,8 +1143,20 @@ pytest /tests/ -v 2>&1 | tail -30
1129
1143
  12. **TASK-FIRST**: Create required output files BEFORE analyzing.
1130
1144
  Touch placeholders immediately, then refine with real content.
1131
1145
 
1132
- 13. **EXTRACT CONSTRAINTS**: Before implementing, list ALL constraints from task:
1133
- Keywords: "exactly", "only", "single", "must be", formats, limits.
1146
+ 13. **EXTRACT CONSTRAINTS (MANDATORY)**: If P17 is active, you MUST print:
1147
+ ```
1148
+ === CONSTRAINT CHECKLIST ===
1149
+ Extracted from task description:
1150
+ ☐ [constraint 1, e.g., "single file only"]
1151
+ ☐ [constraint 2, e.g., "exactly one line output"]
1152
+ ☐ [constraint 3, e.g., "format: valid JSON"]
1153
+
1154
+ BEFORE completing, verify EACH constraint:
1155
+ ☑ constraint 1: [PASS/FAIL]
1156
+ ☑ constraint 2: [PASS/FAIL]
1157
+ === END CONSTRAINTS ===
1158
+ ```
1159
+ If ANY constraint FAILS, FIX before completing.
1134
1160
 
1135
1161
  14. **MULTI-TOOL PIPELINE**: For complex tasks, identify ALL tools needed.
1136
1162
  Don't implement from scratch if existing tools exist.
@@ -1138,5 +1164,22 @@ pytest /tests/ -v 2>&1 | tail -30
1138
1164
  15. **REFUSE IMPOSSIBLE**: If task violates information theory (compress 500MB to 5KB),
1139
1165
  REFUSE immediately. Create IMPOSSIBLE.md explaining why. Don't attempt.
1140
1166
 
1141
- 16. **ADVERSARIAL MINDSET**: For bypass/exploit tasks, think like an attacker.
1142
- Enumerate attack vectors (encoding, null bytes, case variation). Test each.
1167
+ 16. **ADVERSARIAL MINDSET (MANDATORY)**: If P20 is active, you MUST:
1168
+ ```
1169
+ === ADVERSARIAL ANALYSIS ===
1170
+ Target: [what are we trying to bypass/break?]
1171
+ Defense mechanism: [how does the filter/protection work?]
1172
+
1173
+ ATTACK VECTORS TO TRY:
1174
+ 1. Case variation: <ScRiPt>, <SCRIPT>
1175
+ 2. Encoding: &#x3C;script&#x3E;, %3Cscript%3E
1176
+ 3. Null bytes: <scr\x00ipt>
1177
+ 4. Double encoding: %253Cscript%253E
1178
+ 5. Context breaking: </style><script>
1179
+ 6. Event handlers: <img onerror=alert(1)>
1180
+ 7. [add task-specific vectors]
1181
+
1182
+ TEST EACH vector until one works.
1183
+ === END ADVERSARIAL ===
1184
+ ```
1185
+ DO NOT use the filter "correctly" - your goal is to BREAK it.