Include in content: "Per meeting on 2026-02-10: ..."
Include in content: "From error log: ..."
Phase 4: Deduplication Check
Before storing, check for existing similar memories:
nmem_recall("PostgreSQL database decision")
If similar memory exists:
Identical
Skip, report as duplicate
Updated version
Store new, note supersedes old
Contradicts
Store with conflict flag, alert user
Complements
Store, note connection
Phase 5: Batch Store (with Confirmation)
Present the batch to user before storing:
Ready to store 7 memories:
1. [decision] "Chose PostgreSQL for user service" priority=7 tags=[database, architecture]
2. [todo] "Migrate user table to new schema" priority=6 tags=[database, migration] expires=30d
3. [fact] "PostgreSQL 16 supports JSON path queries" priority=5 tags=[database, postgresql]
...
Store all? [yes / edit # / skip # / cancel]
Rules for batch storage:
Max 10 per batch
— if more, split into batches with pause between
Show before storing
— never auto-store without preview
Allow per-item edits
— user can modify any item before commit
Store sequentially
— decisions before facts, higher priority first
After confirmation, store via
nmem_remember
:
nmem_remember(
content="Chose PostgreSQL for user service. Reason: better JSON support, team familiarity.",
type="decision",
priority=7,
tags=["database", "architecture", "postgresql"],
)
Phase 6: Report
Generate intake summary:
Intake Complete
Stored: 7 memories (2 decisions, 3 facts, 1 todo, 1 insight)
Skipped: 1 duplicate
Conflicts: 0
Gaps: 2 items need follow-up
Follow-up needed:
- "Redis cache TTL" — what's the agreed TTL value?
- "Deploy schedule" — weekly or bi-weekly?
Rules
Never auto-store
without user seeing the preview
Never guess security-sensitive information
— ask explicitly
Prefer specific over vague
— "PostgreSQL 16 on AWS RDS" over "using a database"
Include reasoning in decisions
— "Chose X because Y" not just "Using X"
One concept per memory
— don't cram multiple facts into one memory
Source attribution
— always note where information came from when available
Respect existing brain vocabulary
— check existing tags before inventing new ones
Vietnamese support
— if input is Vietnamese, store in Vietnamese with Vietnamese tags