Commit e8c9757
fix(ai): add critical warning about set! field access limitations
Adds comprehensive warning to OVSM system prompt to prevent AI from
generating invalid code that attempts to use set! with field access expressions.
## Problem
AI was generating code like:
(set! (. obj field) value) ❌ Parse error!
This caused "Expected identifier after set!" errors in blockchain investigations.
## Solution
Added new section to system prompt with three patterns:
1. **For aggregating by key** - Use parallel arrays with FIND/APPEND
2. **For field updates** - Use merge function: (set! obj (merge obj {:field val}))
3. **For dynamic keys** - Use merge with computed keys
## Impact
- System prompt grew from 29,260 → 30,654 chars
- AI will now generate correct aggregation patterns
- Prevents the #2 most common OVSM syntax error
Fixes the issue that blocked blockchain investigation:
"find all wallets that sent SOL to address X in summer 2025"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent c2850d1 commit e8c9757
1 file changed
+55
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
227 | 234 | | |
228 | | - | |
| 235 | + | |
229 | 236 | | |
230 | 237 | | |
231 | 238 | | |
| |||
1098 | 1105 | | |
1099 | 1106 | | |
1100 | 1107 | | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1101 | 1155 | | |
1102 | 1156 | | |
1103 | 1157 | | |
| |||
0 commit comments