W
AI-Wiki

AI · 源文件

入库前的原始上传文件存档。点击左侧文件名可预览文件内容。

Architecture Evolution.md1.3 KBit/ai/Architecture Evolution.md
---
title: "Architecture Evolution"
source_url: "https://docs.claude-mem.ai/architecture-evolution"
source_site: "docs.claude-mem.ai"
clipped_at: "2026-07-10T11:47:13.624179+00:00"
clipper: "aiwiki-url-ingest"
extractor: "readability_static"
source_strategy: "normal_web_clip"
source_strategy_label: "普通网页抓取"
---

# Architecture Evolution

```
-- Rich, structured schema
CREATE TABLE observations (
 id INTEGER PRIMARY KEY AUTOINCREMENT,
 session_id TEXT NOT NULL,
 project TEXT NOT NULL,

 -- Progressive disclosure metadata
 title TEXT NOT NULL,
 subtitle TEXT,
 type TEXT NOT NULL, -- decision, bugfix, feature, etc.

 -- Content
 narrative TEXT NOT NULL,
 facts TEXT, -- JSON array

 -- Searchability
 concepts TEXT, -- JSON array of tags
 files_read TEXT, -- JSON array
 files_modified TEXT, -- JSON array

 -- Timestamps
 created_at TEXT NOT NULL,
 created_at_epoch INTEGER NOT NULL,

 FOREIGN KEY(session_id) REFERENCES sdk_sessions(id)
);

-- FTS5 for full-text search
CREATE VIRTUAL TABLE observations_fts USING fts5(
 title, subtitle, narrative, facts, concepts,
 content=observations
);

-- Auto-sync triggers
CREATE TRIGGER observations_ai AFTER INSERT ON observations BEGIN
 INSERT INTO observations_fts(rowid, title, subtitle, narrative, facts, concepts)
 VALUES (new.id, new.title, new.subtitle, new.narrative, new.facts, new.concepts);
END;

```