Rekindle
Rekindle
Для пользователей Claude Code, которые теряют время на повторное объяснение контекста проекта каждую сессию.
npx rekindle initВаш ИИ забывает всё между сессиями. Rekindle это исправляет.

Rekindle — это движок непрерывности MCP, который решает проблему ориентации в сессии, а не просто хранения данных. Ориентируйтесь в начале сессии, сохраняйте данные в конце и переживайте сжатие контекста в середине сессии. Всё локально, всё на SQLite, ноль API-ключей.
v0.3.0 — «Пережить долгую середину» — система захвата PreCompact, открытые циклы, отслеживание обзоров. Примечания к выпуску
Быстрый старт
npx rekindle initЭто создаст папку .rekindle/ в вашем проекте с базой данных SQLite, шаблоном идентификации, директорией захватов и директорией транскриптов. Затем добавьте конфигурацию сервера MCP для вашего клиента:
Добавьте в ~/.claude.json:
{
"mcpServers": {
"rekindle": {
"command": "npx",
"args": ["-y", "rekindle"]
}
}
}Включите защиту PreCompact (захватывает контекст перед сжатием в середине сессии):
npx rekindle setup-hooksДобавьте в claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"rekindle": {
"command": "npx",
"args": ["-y", "rekindle"]
}
}
}Добавьте в .cursor/mcp.json в корне вашего проекта:
{
"mcpServers": {
"rekindle": {
"command": "npx",
"args": ["-y", "rekindle"]
}
}
}Затем заполните .rekindle/identity.md и вставьте инструкции по загрузке в файл CLAUDE.md вашего проекта.
Сессия 1 сохраняет. Сессия 2 помнит. Сессия 10 предвидит.
Related MCP server: claude-session-continuity-mcp
Проблема (43 сессии данных)
На протяжении 43 сессий мы измеряли, что ИИ-ассистент не смог загрузить в начале сессии:
Метрика | Значение |
Проанализировано сессий | 43 |
Чистые запуски (весь контекст загружен) | 33% |
Критические сбои (5+ пробелов) | 26% |
Общее количество сбоев извлечения | 173 |
Существующие инструменты памяти (Mem0, Letta, Zep) оптимизированы для точности извлечения: может ли ИИ найти то, что он сохранил? Это необходимо, но недостаточно. Ни один из них не решает вопрос, загрузил ли ИИ правильный контекст для этой сессии или может ли он обнаружить то, что пропустил.
Rekindle решает проблему ориентации в сессии: загрузка идентификации, недавнего контекста, состояния памяти и предупреждений о недостающем контексте до того, как ассистент начнет работу.
См. docs/gap-analysis.md для получения полного набора данных исследования.
Что он делает
Загрузка: ориентация в начале сессии
boot_report запускает конвейер ориентации до начала любой работы:
boot_report
+-- Read identity document (who am I working with?)
+-- Scan memory stats (what do I know?)
+-- Find latest checkpoint (where did we leave off?)
+-- Read last transcript (what actually happened?)
+-- Surface open loops (what needs follow-up?)
+-- Surface PreCompact captures (what survived compaction?)
+-- Detect gaps (what am I missing?)
+-- Calculate orientation score (how oriented am I?)
--> "Carrying forward: [context loaded, gaps identified, score: 80/100]"Пережить долгую середину: захват PreCompact (v0.3)
Сжатие в середине сессии уничтожает цепочки рассуждений, неудачные подходы, текстуру отношений и тон. Хук PreCompact срабатывает автоматически перед сжатием и сохраняет то, что в противном случае было бы потеряно:
PreCompact hook fires
+-- Parse JSONL transcript (last N messages)
+-- Write raw Markdown capture (.rekindle/captures/)
+-- Write structured JSON snapshot (decisions, open loops, files)
+-- Update manifest for cheap listing
--> boot_report surfaces captures on next session start
--> end_session warns if captures exist but weren't reviewedТри режима чтения контролируют стоимость токенов:
summary — один абзац, дешево
structured — решения/циклы/предупреждения, умеренно
raw — полный фрагмент транскрипта, дорого (только при необходимости)
Захват: замыкание цикла в конце сессии
end_session сохраняет структурированные записи непрерывности — не просто резюме:
Поле | Что захватывает |
| Где мы остановились (обязательно) |
| Что было решено и почему |
| Нерешенные задачи или вопросы |
| Границы, которые нельзя нарушать |
| Что изменилось в рабочих отношениях |
| На чем сосредоточиться в следующей сессии |
| Новые предпочтения пользователя |
| На что следующей сессии следует обратить внимание |
Все записи хранятся с метаданными type, source и session_id. Следующий boot_report автоматически загружает контрольную точку.
Между сессиями: поиск и управление
Инструмент | Описание |
| Сохранить с контентом, категорией, важностью (1-10) и областью проекта |
| Полнотекстовый поиск с ранжированием BM25, усиленный важностью |
| Просмотр воспоминаний, сначала новые. Фильтр по категории или проекту |
| Удалить по ID |
| Обновить контент, категорию или важность |
| Список захватов PreCompact (опционально фильтр по сессии) |
| Чтение захвата в режиме summary, structured или raw |
| Вручную захватить контекст текущей сессии по запросу |
Категории: preference lesson context relationship general
Почему не просто CLAUDE.md?
Статический файл пассивен. Ваш ИИ читает его, но не может искать по нему, ранжировать, отслеживать, что было извлечено, или сказать вам, чего не хватает. Rekindle добавляет:
Поиск — полнотекстовый с ранжированием по важности
Структура — категоризация и привязка к проектам для воспоминаний
Ориентация — проактивная загрузка контекста при загрузке, а не только по запросу
Обнаружение пробелов — помечает отсутствующую идентификацию, пустые категории, устаревшие данные
Оценка — прозрачный чек-лист, чтобы вы знали, насколько ориентирован ИИ
Захват сессии — структурированное завершение с контрольными точками, решениями и открытыми циклами
Выживание при сжатии — захваты PreCompact сохраняют то, что сглаживают резюме
Основные моменты v0.3.0
10 инструментов MCP — добавлены
list_captures,read_capture,capture_nowСистема захвата PreCompact — автоматическое сохранение контекста перед сжатием в середине сессии
Открытые циклы в boot_report — выводит нерешенные задачи из предыдущих сессий
Отслеживание обзоров — захваты помечаются как просмотренные после
read_capture;end_sessionпредупреждает, если есть непросмотренныеНастройка хуков —
npx rekindle setup-hooksнастраивает хук PreCompact для Claude CodeАвтообнаружение —
capture_nowобнаруживает транскрипт сессии без ручных путей101 автоматизированный тест — модульные, интеграционные, менеджер захвата, настройка хуков
Команды CLI
Команда | Описание |
| Настроить |
| Настроить в домашней директории |
| Инициализация + настройка хука PreCompact |
| Настроить хук PreCompact (автономно) |
| Захватить контекст перед сжатием (хук) |
| Вручную захватить контекст текущей сессии |
| Запустить сервер MCP (используется Claude Code) |
Установка из исходного кода
git clone https://github.com/Skitchy/rekindle.git
cd rekindle
npm install
npm run build
node dist/init/cli.js initКоманда setup-hooks записывает это в .claude/settings.local.json:
{
"hooks": {
"PreCompact": [
{
"matcher": "auto",
"hooks": [
{
"type": "command",
"command": "npx rekindle precompact-capture",
"timeout": 60
}
]
},
{
"matcher": "manual",
"hooks": [
{
"type": "command",
"command": "npx rekindle precompact-capture",
"timeout": 60
}
]
}
]
}
}Хук получает контекст сессии через stdin (session_id, transcript_path, cwd, hook_event_name) и записывает захваты в .rekindle/captures/.
Переменная | По умолчанию | Описание |
|
| Макс. сообщений для захвата |
|
| Макс. символов для захвата |
| Авто | Базовая директория для |
Все данные локальны. Ничего не отправляется на внешние серверы.
Никаких сетевых вызовов. Сервер MCP общается через stdio. Нет HTTP, нет телеметрии, нет аналитики.
Транскрипты содержат текст разговора. Не включайте захват транскриптов, если ваши сессии содержат секреты или учетные данные.
Установка хуков по выбору.
setup-hooksдолжен быть запущен явно (не устанавливается автоматически черезinit).База данных SQLite — это обычный файл. Не зашифрована. Используйте шифрование диска на уровне ОС, если необходимо.
.rekindle/игнорируется git. Команда init обрабатывает это автоматически.boot_reportчитает локальные файлы. Пути не изолированы (песочница). Используйте только с клиентами MCP и промптами, которым вы доверяете.
Совместимость
Клиент | Транспорт | Статус |
Claude Code (macOS) | stdio | Протестировано |
Claude Code (Linux/WSL2) | stdio | Протестировано |
Claude Code (Windows) | stdio | Протестировано |
Claude Desktop | stdio | Совместимо (тот же формат конфига MCP) |
Cursor | stdio | Совместимо (тот же формат конфига MCP) |
Любой клиент MCP stdio | stdio | Совместимо |
rekindle/
src/
index.ts MCP server entry point
server.ts Server setup, tool registration (10 tools)
storage/
sqlite.ts SQLite + FTS5, schema migration, sessions
orientation/
types.ts OrientationResult, Gap, ScoreItem
GapDetector.ts Structural gap detection (8 codes)
Scorer.ts Orientation scoring (6 criteria, 100pts)
OrientationService.ts Orchestrator
OrientationRenderer.ts Markdown + JSON output
captures/
types.ts CaptureEntry, StructuredSnapshot, HookInput
CaptureManager.ts Parse, capture, list, read, review tracking
discover-transcript.ts Auto-discover session transcripts
precompact-capture.ts CLI hook entry point
capture-now.ts Manual capture CLI
tools/
boot-report.ts Orientation + open loops + capture awareness
end-session.ts Structured session close + capture warning
list-captures.ts List PreCompact captures
read-capture.ts Read captures in 3 modes
capture-now.ts Model-triggered manual capture
store.ts search.ts list.ts delete.ts update.ts
init/
cli.ts scaffold.ts setup-hooks.ts templates/Хранилище: SQLite + FTS5 через better-sqlite3. Ранжирование BM25, усиленное важностью. Типизированные записи с type, source, session_id.
Транспорт: stdio (стандартный MCP). Работает с Claude Code «из коробки».
Тесты
npm test101 тест: CRUD хранилища + ранжирование FTS5, домен ориентации (обнаружение пробелов, оценка, сервис, рендеринг), менеджер захвата (парсинг, лимиты, отслеживание обзоров, форматирование), настройка хуков (схема, идемпотентность) и интеграция MCP (все 10 инструментов).
Дорожная карта
v0.4: «Он мыслит сетями» — распространение активации, семантический поиск через эмбеддинги, инструменты анализа пробелов, тестовый стенд.
Лицензия
MIT
Available Tools
10 toolsboot_reportA
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 structural checks, not guarantees that every relevant context item was loaded.
Inputs: identity_path (required), transcript_dir (required), project.
capture_nowA
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.
Inputs: reason, session_id, transcript_path.
delete_memoryA
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.
Inputs: id (required), provenance.
end_sessionA
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: call end_session at the end of every substantive session so the next session can pick up the thread.
Inputs: checkpoint (required), project, warnings, decisions, +8 more.
list_capturesA
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.
Inputs: session_id.
list_memoriesA
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.
Inputs: limit, project, category.
read_captureA
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.
Inputs: id (required), mode.
search_memoryA
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.
Inputs: query (required), limit, project, category.
store_memoryA
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.
Inputs: content (required), project, category, importance, +1 more.
update_memoryA
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.
Inputs: id (required), content, category, importance, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Memory operations (store/update/delete/list/search) are clearly distinct, and capture operations (capture_now/list_captures/read_capture) form a coherent group. There is some functional overlap between end_session, capture_now, and store_memory since all persist context, but the descriptions draw clear lines between structured handoffs, ad-hoc snapshots, and discrete memories.
Most tools follow a verb_noun pattern (store_memory, delete_memory, list_captures, read_capture, end_session), with memory tools consistently suffixed by _memory/_memories. Deviations like boot_report (noun form) and capture_now (verb_adverb) are minor and still readable.
Ten tools is well-scoped for a session-context/memory server, covering memory CRUD, search, session handoff, and capture retrieval without redundancy. Each tool has a defensible role in the workflow.
Memory lifecycle is fully covered (create, update, delete, list, search) and captures are readable/listable. Minor gaps exist: no get-by-ID for a single memory, no deletion of captures or sessions, and session history is only exposed indirectly via boot_report rather than a list_sessions/read_session pair.
Maintenance
Related MCP Connectors
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Project memory for every AI. Pick up where you left off in Claude, ChatGPT or Cursor, with a team.
Shared memory for AI tools: save once, recall word for word from Claude, ChatGPT, Codex or Gemini.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI coding assistants like Claude Code, Cursor, and Codex to share chat logs, terminal history, and session context with each other. Eliminates the need to re-explain context when switching between different AI coding tools.2MIT
- AlicenseAqualityBmaintenanceZero-config session continuity for Claude Code. Automatically captures and restores project context across sessions using Claude Hooks.25135 npm7MIT
- AlicenseNot gradedqualityCmaintenance2-5x longer Claude Code sessions before compaction. Saves 30-40% on input token costs. Remembers your rules and corrections so Claude stops repeating mistakes after compaction. Auto-runs in the background, just install once and forget about it.1,207 PyPI430MIT
- AlicenseNot gradedqualityDmaintenancePersistent memory for Claude Code — a self-evolving knowledge layer that survives across sessions, grows from every conversation, and surfaces relevant context automatically.14MIT