Pular para conteúdo

Memória de prompts

Project memory: rules, references, notes.

lite

Lightweight project memory: rules, references, notes.

Memory entries are stored in the semtree SQLite database alongside symbols. They persist across index rebuilds and are included in context output when the AI needs project-specific guidelines.

Kinds

rule - coding conventions, architecture decisions ("Always use async views") ref - external references, API docs, ticket numbers note - miscellaneous observations, TODOs, reminders

ProjectMemory

ProjectMemory(conn)

High-level interface for project memory operations.

add

add(kind, key, value)

Store or update a memory entry.

remove

remove(kind, key)

Delete a memory entry. Returns True if it existed.

list_all

list_all(kind=None)

List all memory entries, optionally filtered by kind.

format_for_context

format_for_context(max_chars=2000)

Format memory as a compact markdown block for AI context injection.