Skip to main content
Glama

Rekindle

npm tests license Glama score

セッションごとにプロジェクトのコンテキストを再説明する時間を失っているClaude Codeユーザーへ。

npx rekindle init

AIはセッション間のすべてを忘れてしまいます。Rekindleがそれを解決します。


Rekindle init demo

Rekindleは、単なるストレージではなく、セッションの方向付けを解決するMCP継続性エンジンです。セッション開始時の方向付け、終了時のキャプチャ、セッション中盤の圧縮への対応を実現します。すべてローカルで動作し、SQLiteを使用し、APIキーは不要です。

v0.3.0 — "Survive the Long Middle" — PreCompactキャプチャシステム、オープンループ、レビュー追跡。リリースノート

クイックスタート

npx rekindle init

これにより、プロジェクト内にSQLiteデータベース、アイデンティティテンプレート、キャプチャディレクトリ、トランスクリプトディレクトリを含む .rekindle/ が作成されます。次に、クライアント用の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セッションにわたり、AIアシスタントがセッション開始時に読み込みに失敗した内容を測定しました:

指標

値

分析したセッション数

43

クリーンブート(全コンテキスト読み込み)

33%

高シグナル障害(5つ以上のギャップ)

26%

合計取得失敗数

173

既存のメモリツール(Mem0, Letta, Zep)は取得精度を最適化します。つまり、AIは保存した内容を見つけられるか?という点です。それは必要ですが十分ではありません。それらのツールは、AIが今回のセッションに適切なコンテキストを読み込んだかどうか、あるいは不足しているものを検出できるかどうかについては対処していません。

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

3つの読み取りモードでトークンコストを制御します:

  • summary — 1段落、低コスト

  • structured — 決定事項/ループ/警告、中コスト

  • raw — トランスクリプトの完全な抜粋、高コスト(必要な場合のみ)

キャプチャ:セッション終了時にループを閉じる

end_session は、単なる要約ではなく、構造化された継続性レコードを保存します:

フィールド

キャプチャ内容

checkpoint

中断した場所(必須)

decisions

何が決定され、なぜそうしたか

open_loops

未解決のタスクや質問

constraints

違反してはならない境界線

relational_delta

作業関係における変化

next_session_focus

次のセッションでどこから再開するか

preferences

学習した新しいユーザー設定

warnings

次のセッションで注意すべきこと

すべてのレコードは type、source、session_id メタデータと共に保存されます。次の boot_report は自動的にチェックポイントを読み込みます。

セッション間:検索と管理

ツール

説明

store_memory

コンテンツ、カテゴリ、重要度(1-10)、プロジェクトスコープを指定して保存

search_memory

重要度でブーストされたBM25ランキングによる全文検索

list_memories

メモリを閲覧(最新順)。カテゴリやプロジェクトでフィルタリング可能

delete_memory

IDで削除

update_memory

コンテンツ、カテゴリ、重要度を更新

list_captures

PreCompactキャプチャを一覧表示(セッションでフィルタリング可能)

read_capture

キャプチャをsummary、structured、rawモードで読み取り

capture_now

現在のセッションコンテキストを手動でキャプチャ

カテゴリ: preference lesson context relationship general


なぜ CLAUDE.md だけでは不十分なのか?

静的なファイルは受動的です。AIはそれを読みますが、検索したり、ランク付けしたり、何が取得されたかを追跡したり、何が欠けているかを教えてくれたりすることはできません。Rekindleは以下を追加します:

  • 検索 — 重要度加重ランキングによる全文検索

  • 構造化 — メモリ全体にわたるカテゴリとプロジェクトのスコープ設定

  • 方向付け — オンデマンド取得だけでなく、ブート時にプロアクティブなコンテキスト読み込みを実行

  • ギャップ検出 — 不足しているアイデンティティ、空のカテゴリ、古いデータをフラグ付け

  • スコアリング — AIがどれだけ方向付けされているかを知るための透明なチェックリスト

  • セッションキャプチャ — チェックポイント、決定事項、オープンループを含む構造化された終了処理

  • 圧縮への耐性 — PreCompactキャプチャが要約で平坦化される情報を保持


v0.3.0 ハイライト

  • 10個のMCPツール — list_captures, read_capture, capture_now を追加

  • PreCompactキャプチャシステム — セッション中盤の圧縮前にコンテキストを自動保存

  • boot_reportのオープンループ — 前のセッションからの未解決タスクを表面化

  • レビュー追跡 — read_capture 後にキャプチャをレビュー済みとしてマーク。end_session は未レビュー時に警告

  • フック設定 — npx rekindle setup-hooks でClaude CodeのPreCompactフックを設定

  • 自動検出 — capture_now が手動パス指定なしでセッションのトランスクリプトを検出

  • 101個の自動テスト — ユニット、統合、キャプチャマネージャー、フック設定


CLIコマンド

コマンド

説明

npx rekindle init

現在のディレクトリに .rekindle/ をセットアップ

npx rekindle init --global

ホームディレクトリにセットアップ

npx rekindle init --with-hooks

初期化 + PreCompactフックの設定

npx rekindle setup-hooks

PreCompactフックの設定(単体)

npx rekindle precompact-capture

圧縮前にコンテキストをキャプチャ(フック用)

npx rekindle capture-now

現在のセッションコンテキストを手動キャプチャ

npx rekindle

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/ にキャプチャを書き込みます。

変数

デフォルト

説明

REKINDLE_PRECOMPACT_MAX_MESSAGES

80

キャプチャする最大メッセージ数

REKINDLE_PRECOMPACT_MAX_CHARS

120000

キャプチャする最大文字数

REKINDLE_BASE_DIR

自動検出

.rekindle/ のベースディレクトリ

  • すべてのデータはローカルです。 外部サーバーには何も送信されません。

  • ネットワーク呼び出しはありません。 MCPサーバーはstdio経由で通信します。HTTP、テレメトリ、分析機能はありません。

  • トランスクリプトには会話テキストが含まれます。 セッションに秘密情報や資格情報が含まれる場合は、トランスクリプトのキャプチャを有効にしないでください。

  • フックのインストールはオプトインです。 setup-hooks は明示的に実行する必要があります(init で自動インストールされません)。

  • SQLiteデータベースは通常のファイルです。 暗号化されていません。必要に応じてOSレベルのディスク暗号化を使用してください。

  • .rekindle/ はgitignoredです。 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/

ストレージ: better-sqlite3 を介したSQLite + FTS5。重要度でブーストされたBM25ランキング。type、source、session_id を持つ型付きレコード。

トランスポート: stdio(標準MCP)。Claude Codeでそのまま動作します。

テスト

npm test

101個のテスト:ストレージCRUD + FTS5ランキング、方向付けドメイン(ギャップ検出、スコアリング、サービス、レンダリング)、キャプチャマネージャー(解析、制限、レビュー追跡、フォーマット)、フック設定(スキーマ、冪等性)、およびMCP統合(全10ツール)。

ロードマップ

v0.4: "It thinks in networks" — 拡散活性化、埋め込みによるセマンティック検索、ギャップ分析ツール、評価ハーネス。

ライセンス

MIT

Available Tools

10 tools
boot_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

    A4.2/5.0

    Scored across 10 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables 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.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      2-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 PyPI
      430
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Persistent memory for Claude Code — a self-evolving knowledge layer that survives across sessions, grows from every conversation, and surfaces relevant context automatically.
      14
      MIT