@@ -70,16 +70,34 @@ hivemind_store(
7070)
7171```
7272
73- ** Good memory example :**
73+ ** Good memory examples :**
7474
7575```
76- "Next.js 16 params are ASYNC - must await props.params before accessing.
77- Old pattern: const { slug } = params
78- New pattern: const { slug } = await props.params
79- Breaking change from Next.js 15. Causes 'params.slug is a Promise' errors."
76+ # Breaking change discovery
77+ "PostgreSQL 15 changed SECURITY INVOKER default for views. Queries that worked
78+ in PG14 fail with permission denied. Fix: explicitly set SECURITY DEFINER on
79+ views that need elevated privileges, or grant SELECT to the invoking role."
80+
81+ # Project-specific pattern
82+ "This codebase uses barrel exports in index.ts but tree-shaking breaks if you
83+ import from barrel in same package. Always import directly from source file
84+ within the same package: import { foo } from './foo' not from './index'."
85+
86+ # Failed approach (anti-pattern)
87+ "Tried using Zod .refine() for async DB uniqueness check. BAD: blocks event
88+ loop during parse. Validate uniqueness in service layer after parse instead."
89+
90+ # Debugging root cause
91+ "'Cannot read property of undefined' in auth middleware was NOT a null check
92+ issue. Root cause: cookie parser middleware missing. Order matters: cookie-parser
93+ must come before auth middleware in Express chain."
8094```
8195
82- ** Bad memory:** "Fixed the params bug" (no context, no WHY)
96+ ** Bad memories** (no context, won't help future agents):
97+
98+ - "Fixed the auth bug"
99+ - "Added null check"
100+ - "Updated the config"
83101
84102## OPTIONAL: Update Style Guide / Docs (Step 9)
85103
0 commit comments