rekindle

v0.5.1
io.github.Skitchy/rekindle Checked 5 hours ago Published 21 days ago

MCP session continuity engine: boot reports, PreCompact capture, session-start delivery, SQLite.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

store_memory

Store a new memory in the local SQLite database. Creates a persistent row with an auto-generated UUID, timestamp, and the provided content. Use for preferences, lessons learned, project context, relationship notes, or general information worth remembering across sessions. Memories persist across sessions and are surfaced by boot_report, search_memory, and list_memories. Returns the generated ID on success. Does not deduplicate — calling twice with the same content creates two separate memories.

ParameterTypeDescription
content *stringThe memory content to store. Plain text, no length limit. Should be self-contained — future retrieval may return this memory without surrounding context.
categorystringMemory category. Determines how the memory is weighted during orientation: 'preference' and 'relationship' contribute to the orientation score. 'context' is used for checkpoints and session handoffs.…
importancenumberImportance score from 1 (low) to 10 (critical). Higher-importance memories are ranked first in search results. Constraints default to 9, checkpoints to 8, general notes to 5.
projectstringProject name to scope this memory to. When set, boot_report can filter orientation to this project. Omit for cross-project memories.
provenanceobjectWrite attribution. Required when REKINDLE_REQUIRE_WRITE_PROVENANCE=1; never proof of authorization.

search_memory

Search stored memories using SQLite full-text search (FTS5). Returns results ranked by relevance with higher-importance memories boosted. Each search increments the retrieval_count on matched memories, tracking which memories are accessed most. Use at session start to load relevant context, or mid-session to recall specific information. Returns an array of matching memories with id, content, category, importance, project, created_at, and retrieval_count. Returns an empty array if no matches are found.

ParameterTypeDescription
query *stringFull-text search query. Supports keywords, phrases, and SQLite FTS5 syntax (e.g., 'database AND migration', '"exact phrase"'). Broader queries return more results.
categorystringFilter results to a single category. Omit to search across all categories.
limitnumberMaximum number of results to return. Default 10. Results are ranked by relevance and importance before truncation.
projectstringFilter results to a specific project. Omit to search across all projects.

list_memories

List stored memories from the local SQLite database, ordered newest first. Unlike search_memory, this does not require a query — it returns all memories matching the optional filters. Read-only; does not modify any data. Use to browse what has been stored, audit memory contents, or check memory counts per category or project. Returns an array of memories with id, content, category, importance, project, and created_at.

ParameterTypeDescription
categorystringFilter to a single category. Omit to list memories across all categories.
limitnumberMaximum number of memories to return. Default 50. Newest memories are returned first regardless of limit.
projectstringFilter to a specific project. Omit to list memories across all projects.

delete_memory

Permanently delete a single memory from the local SQLite database by its ID. This action is irreversible — the row and its full-text search index entry are removed immediately. Use when a memory is outdated, incorrect, or no longer relevant. Returns {success: true} if the memory was found and deleted, or {success: false, message: 'Memory not found'} if the ID does not exist. Does not affect other memories or session records.

ParameterTypeDescription
id *stringThe UUID of the memory to delete. Obtain from store_memory, search_memory, or list_memories results.
provenanceobjectWrite attribution. Required when REKINDLE_REQUIRE_WRITE_PROVENANCE=1; never proof of authorization.

update_memory

Update an existing memory in the local SQLite database. Modifies only the fields you provide — omitted fields are left unchanged. The updated_at timestamp is set automatically. If content is changed, the full-text search index is rebuilt for this memory. Returns the full updated memory object on success, or {success: false, message: 'Memory not found'} if the ID does not exist. Use to correct inaccurate memories, adjust importance, or reclassify a memory's category without deleting and re-creating it.

ParameterTypeDescription
id *stringThe UUID of the memory to update. Obtain from store_memory, search_memory, or list_memories results.
categorystringNew category for the memory. Omit to keep the existing category unchanged.
contentstringReplacement content for the memory. Omit to keep the existing content unchanged.
importancenumberNew importance score from 1 (low) to 10 (critical). Omit to keep the existing score unchanged.
provenanceobjectWrite attribution. Required when REKINDLE_REQUIRE_WRITE_PROVENANCE=1; never proof of authorization.

boot_report

Generate a session orientation report. Read-only — does not modify any stored data. Reads the identity document from disk, scans the memory database for statistics and the latest checkpoint, finds the most recent transcript file, detects structural gaps (missing identity, stale memories, no checkpoint, etc.), and calculates a 0-100 orientation score across 6 criteria. Also surfaces open loops from prior sessions and any PreCompact captures that preserve context from compacted sessions. Workflow: call boot_report first thing every session, before any substantive work. Orientation scores are s…

ParameterTypeDescription
identity_path *stringAbsolute or relative path to the identity document (e.g., '.rekindle/identity.md'). This file describes who the user is and how to work with them. If the file does not exist, a critical gap is reporte…
transcript_dir *stringAbsolute or relative path to the transcripts directory (e.g., '.rekindle/transcripts'). The most recent .md file in this directory is read and included in the report. If the directory is empty or miss…
projectstringActive project name for scoped orientation. When provided, the orientation score includes a project-specific criterion and memory statistics are filtered to this project.

end_session

Capture a structured session handoff. Writes multiple records to the local SQLite database: one checkpoint (required), plus optional decisions, open loops, preferences, constraints, warnings, relational delta, and next session focus. Each record is stored with a typed 'type' column (not content prefixes) and linked to a session record via session_id. Also creates a session row in the sessions table with a summary, orientation score, and gap count. The checkpoint is retrievable by boot_report on the next session start. All records are searchable via search_memory and list_memories. Workflow: ca…

ParameterTypeDescription
checkpoint *stringWhere we left off — the single most important handoff artifact. Stored as type='checkpoint' with importance 8. This is what boot_report loads as the latest checkpoint on the next session start.
constraintsarrayBoundaries that must not be violated — violating these causes trust damage. Each entry is stored as type='constraint' with importance 9 (highest default).
decisionsarrayKey decisions made this session and their rationale. Each entry is stored as a separate memory with type='decision' and importance 7.
next_session_focusstringWhere to resume next session, which may differ from where we stopped. Stored as type='next_session_focus' with importance 7.
open_loopsarrayUnresolved questions, pending tasks, or threads that need follow-up. Each entry is stored as type='open_loop' with importance 7.
preferencesarrayNew user preferences or working style observations learned this session. Each entry is stored as type='preference' with importance 6.
projectstringProject name to scope all records to. Passed through to each stored memory's project field.
provenanceobjectWrite attribution applied to every record. Required when REKINDLE_REQUIRE_WRITE_PROVENANCE=1; never proof of authorization.
relational_deltastringWhat changed in the working relationship this session — trust shifts, tension, repair, tone changes. Stored as type='relational_delta' with importance 8.
session_idstringCurrent session ID. Used to check for unreviewed PreCompact captures. If captures exist for this session that were not read via read_capture, a warning is included in the response.
transcript_pathstringFile path to the session transcript, stored on the session record for reference by boot_report.
warningsarrayHazards or risks the next session should be aware of. Each entry is stored as type='warning' with importance 8.

list_captures

List PreCompact captures for the current or recent sessions. PreCompact captures preserve context that would otherwise be lost during mid-session compaction. Workflow: if boot_report lists PreCompact captures, call list_captures then read_capture to recover pre-compaction context before relying on the checkpoint. Before calling end_session, check for unreviewed captures.

ParameterTypeDescription
session_idstringFilter to a specific session. If omitted, returns all captures sorted by recency.

read_capture

Read a PreCompact capture by ID. Use this to recover context that was lost during mid-session compaction. Three modes control token cost: 'summary' (one paragraph, cheap), 'structured' (decisions/loops/warnings, moderate), 'raw' (full transcript excerpt, expensive — only when summary or structured is insufficient). Workflow: read recovered captures before relying on the latest checkpoint; start with the lightest mode that answers your question.

ParameterTypeDescription
id *stringCapture ID from list_captures (e.g., 'precompact-abc123-001')
modestringReading mode. 'summary': one-paragraph overview. 'structured': decisions, open loops, warnings, context shifts. 'raw': full transcript excerpt.

capture_now

Manually capture current session context to .rekindle/captures/. Use this when you want to preserve the current conversation state — before a complex operation, when context feels at risk, or when the user requests it. Produces the same artifact as the automatic PreCompact hook but triggered on demand. session_id and transcript_path are optional — if omitted, the most recent transcript is discovered automatically.

ParameterTypeDescription
reasonstringWhy this capture is being made (stored in the structured snapshot).
session_idstringCurrent session ID. If omitted, discovered from the most recent transcript file.
transcript_pathstringPath to the current session's JSONL transcript file. If omitted, the most recent transcript is discovered automatically.