System Design · AI Memory Pipeline · 2026

From Conversation
to Knowledge

Six stages, two language models, and grep transform months of scattered Discord messages into a complete, conflict-aware design record — with no vector database required.

N Raw messages
~N/10 Time clusters
~25% Reach LLM
1+ Specs recovered
Data · File
LLM Call
Grep · Free
Conflict Detection
Output
Phase 01 Chat Archaeology
01
Data
Raw Discord JSON
Two or more channel exports · timestamps on every entry — the full, unfiltered record
N
messages
02
Data
Message ID Deduplication
Overlapping channel exports merged, sorted chronologically. No message counted twice.
N
unique msgs
03
Data
Temporal Clustering
A 30-minute silence between messages = a new cluster boundary. Each cluster is one coherent conversation session. Timestamps are carried forward as first-class metadata.
~N/10
clusters
04
Data
Flat TSV — Grep-Ready
cluster_id · timestamp · author · content — one record per line, newlines escaped. No parsing required for downstream shell tools.
cluster_0000
→ 0092
output files
05
LLM · Haiku
Generate Domain Search Terms
One Haiku call takes the app names and descriptions, returns regex-ready term sets per topic. Runs once. The entire search phase is free from this point forward.
1
LLM call
ever
06
Grep · Free
Score All Clusters — Zero Cost
Pattern-match each topic's terms against every cluster file. Clusters × topics = scored pairs matrix. No tokens spent. Shell does the work.
$0
cost
07
Grep · Free
Score Matrix → Threshold Filter
Clusters with hit count ≥ 1 pass. The rest are dropped. Roughly 75% of the message corpus never reaches a language model.
75%
filtered
free
08
Data
Per-Topic Text Files — Assembled
Eight topic files, each containing only the clusters that scored above threshold, ranked by relevance. The raw material for extraction.
21
clusters
proceed
The grep pass is complete.
Now the language models take over.
Only ~25% of clusters reach an LLM — the rest were filtered at zero cost by grep.
~25%
LLM throughput
Phase 02 Knowledge Reconstruction
09
LLM · Haiku
Per-Cluster Extraction · 6 Parallel Workers
Each cluster gets a targeted Haiku call. Output: decision state (proposed / debated / confirmed / reversed / deferred), topic_tags, product insight, engineering decisions, UX notes, verbatim quote, and what prior decision this cluster reverses — if any.
×6
parallel
workers
10
Free
Chronological Assembly
All extractions sorted by cluster_id — which is chronological order. Later timestamps carry higher decision authority. The intellectual timeline is preserved.
$0
cost
11
Conflict
Topic Group Conflict Pass
Extractions grouped by topic_tags. Any group where "confirmed" and "reversed" both appear — or where a reverses field is non-empty — triggers a targeted Haiku call to summarize the shift. Topics that evolved cleanly: zero extra cost.
100%
reversals
visible
12
LLM · Sonnet
Final Synthesis — One Sonnet Call
Chronological notes + conflict summary → one 12,000-token synthesis. Output: §overview §features §architecture §data models §API §engineering decisions §QA §deferrals §decisions-that-changed §open questions.
1
Sonnet
call
13
Output
voice_app_spec_[timestamp].md
Example: voice-based AI app · emotional tone pipeline · per-session memory architecture · real-time interaction flows
Design
Spec
recovered
14
Output
portfolio_app_spec_[timestamp].md
Example: investment portfolio app · strategy decisions · data model · API integrations · risk and rebalancing logic
Design
Spec
recovered
Key Insights
01 · Time
Timestamps Preserve the Intellectual Timeline
Ideas have a birth, evolution, and death. Cluster ordering makes "what was decided when" a first-class fact — not a guess.
02 · Search
Grep Replaces the Vector Database
Domain regex costs nothing to run. One LLM call generates the patterns; grep does the rest free. No embedding API, no index to maintain.
03 · States
Decision States Track the Idea Lifecycle
proposed → debated → confirmed → reversed → deferred. Each cluster tagged with where in the lifecycle a decision stood.
04 · Conflict
Reversals Surface Automatically
Same topic, different conclusions over time = detected and cited. Reversals are explicit — never silently overwritten by "latest wins."
05 · Models
Haiku for Breadth, Sonnet for Depth
Haiku handles 21 clusters in parallel cheaply. Sonnet synthesizes once at full quality. Right model, right job, right cost.
Efficiency Profile
~25%
of messages
reach an LLM
$0
embedding cost
no vector DB
×6
parallel Haiku
workers
100%
conflicts made
visible
any stage
re-runnable