# claude-session-continuity-mcp - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for claude-session-continuity-mcp. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0002` supported 0.86

## What It Can Do

- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0001` supported 0.86

## How to Start

- `npm install -g claude-session-continuity-mcp` Evidence: `README.md` Claim: `clm_0003` supported 0.86, `clm_0004` supported 0.86
- `npm install -g claude-session-continuity-mcp@latest` Evidence: `README.md` Claim: `clm_0004` supported 0.86
- `npx claude-session-hooks status` Evidence: `README.md` Claim: `clm_0005` supported 0.86
- `npx claude-session-hooks install` Evidence: `README.md` Claim: `clm_0006` supported 0.86
- `npx claude-session-hooks uninstall` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `git clone https://github.com/leesgit/claude-session-continuity-mcp.git` Evidence: `README.md` Claim: `clm_0008` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox-trial permissions first
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox-trial permissions first
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Tool permission boundaries cannot be trusted before install.
- **Continuing will touch**: Command execution, Local environment or project files, Host AI context

### What You Can Trust Now

- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md` Claim: `clm_0001` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0003` supported 0.86, `clm_0004` supported 0.86

### What You Cannot Trust Yet

- **Tool permission boundaries cannot be trusted before install.** (unverified): MCP/tool projects usually touch files, the network, the browser, or external APIs, so permissions and logs must be checked for real.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0009` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0010` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 48
- Important-file coverage: 38/48
- Evidence index entries: 38
- Role / Skill entries: 1

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for claude-session-continuity-mcp, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat claude-session-continuity-mcp as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for claude-session-continuity-mcp, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 1 role / Skill / project-doc entries.

- **claude-session-continuity-mcp** (project_doc): Never re-explain your project to Claude again. 100% local session memory for Claude Code — auto context injection, semantic search, and error→solution recall. Zero config, zero API cost. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`

## Evidence Index

- Indexed 38 evidence entries.

- **claude-session-continuity-mcp** (documentation): Never re-explain your project to Claude again. 100% local session memory for Claude Code — auto context injection, semantic search, and error→solution recall. Zero config, zero API cost. Evidence: `README.md`
- **Package** (package_manifest): { "name": "claude-session-continuity-mcp", "version": "1.15.0", "description": "Session Continuity for Claude Code - Never re-explain your project again", "type": "module", "main": "dist/index.js", "bin": { "claude-session-continuity-mcp": "dist/index.js", "claude-session-hooks": "dist/hooks/install.js", "claude-hook-session-start": "dist/hooks/session-start.js", "claude-hook-user-prompt": "dist/hooks/user-prompt-submit.js", "claude-hook-post-tool": "dist/hooks/post-tool-use.js", "claude-hook-pre-compact": "dist/hooks/pre-compact.js", "claude-hook-session-end": "dist/hooks/session-end.js" }, "scripts": { "build": "tsc", "dev": "tsc --watch", "start": "node dist/index.js", "start:v2": "MCP V… Evidence: `package.json`
- **License** (source_file): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Evidence: `LICENSE`
- **Index** (source_file): import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { ListToolsRequestSchema, CallToolRequestSchema, CallToolResult, ListPromptsRequestSchema, GetPromptRequestSchema } from '@modelcontextprotocol/sdk/types.js'; ⋮---- import { mkdirSync, existsSync } from 'fs'; ⋮---- import { execSync } from 'child process'; import Database from 'better-sqlite3'; ⋮---- async function loadTransformers ⋮---- function detectWorkspaceRoot : string ⋮---- async function initEmbedding ⋮---- async function generateEmbedding text: string, type: 'query' 'passage' = 'query' : Promise ⋮---- function parseTags tags: s… Evidence: `src/index.ts`
- **Schemas** (source_file): import { z } from 'zod'; ⋮---- export type ContextGetInput = z.infer ; export type ContextUpdateInput = z.infer ; export type MemoryStoreInput = z.infer ; export type MemorySearchInput = z.infer ; export type MemoryDeleteInput = z.infer ; export type MemoryGetInput = z.infer ; export type TaskManageInput = z.infer ; export type VerifyInput = z.infer ; export type LearnInput = z.infer ; export type RecallSolutionInput = z.infer ; export type ProjectsInput = z.infer ; Evidence: `src/schemas.ts`
- **Types** (source_file): import type { CallToolResult as SDKCallToolResult } from '@modelcontextprotocol/sdk/types.js'; ⋮---- export interface Tool { name: string; description: string; inputSchema: { type: string; properties: Record ; required?: string ; }; } ⋮---- export type CallToolResult = SDKCallToolResult; ⋮---- export function textResult text: string, isError?: boolean : CallToolResult ⋮---- export interface AutoLearnDecisionArgs { project: string; decision: string; reason: string; context?: string; alternatives?: string ; files?: string ; } ⋮---- export interface AutoLearnFixArgs { project: string; error: string; solution: string; cause?: string; files?: string ; preventionTip?: string; } ⋮---- export inter… Evidence: `src/types.ts`
- **Database** (source_file): import Database, { Database as DatabaseType } from 'better-sqlite3'; ⋮---- import type { ContentFilterPattern } from '../types.js'; ⋮---- function detectWorkspaceRoot : string ⋮---- function getDbPath workspaceRoot: string : string ⋮---- export function initDatabase ⋮---- export function loadContentFilterPatterns ⋮---- export function createBackup : string null ⋮---- function cleanupOldBackups : void ⋮---- export function restoreFromBackup backupPath: string : boolean ⋮---- export function listBackups : Array< Evidence: `src/db/database.ts`
- **Install** (source_file): import { fileURLToPath } from 'url'; ⋮---- function getPackagePath : string ⋮---- function migrateLegacyHooks : void ⋮---- function loadSettings : Record ⋮---- function saveSettings settings: Record : void ⋮---- function loadMcpConfig : Record ⋮---- function saveMcpConfig config: Record : void ⋮---- function installMcpServer : boolean ⋮---- function install : void ⋮---- // ===== 0. Migrate from settings.local.json if needed ===== ⋮---- // ===== 1. Hooks 설치 npm exec 방식 - 경로 독립적 ===== ⋮---- // 기존 hooks 유지하면서 우리 훅만 추가/교체 ⋮---- // 우리 훅 명령어 prefix 이걸로 우리 훅인지 판별 ⋮---- / 기존 훅 배열에서 우리 훅만 제거하고, 새 훅을 추가 사용자 커스텀 훅은 보존됨 / function mergeHooks event: string, ourEntries: unknown : void ⋮---- // 기존 항목 중 우리… Evidence: `src/hooks/install.ts`
- **Post Tool Use** (source_file): import Database from 'better-sqlite3'; import { logHookError } from '../utils/logger.js'; ⋮---- interface ToolUseInput { cwd?: string; sessionId?: string; tool name?: string; tool input?: { file path?: string; command?: string; old string?: string; new string?: string; content?: string; }; tool result?: string; } ⋮---- function cleanPlaywrightCache cwd: string ⋮---- function extractErrorSignature output: string : string null ⋮---- .replace /\s+at\s+.+$/, '' // stack trace 제거 .replace /\ . ?\ /g, '' // 경로 괄호 제거 ⋮---- function searchSolutions db: InstanceType , project: string, errorSig: string : Array< ⋮---- // 에러 키워드 추출 3글자 이상 단어 ⋮---- function detectWorkspaceRoot cwd: string : string ⋮----… Evidence: `src/hooks/post-tool-use.ts`
- **Pre Compact** (source_file): import Database from 'better-sqlite3'; ⋮---- interface CompactInput { cwd?: string; sessionId?: string; transcript?: Array ; } ⋮---- interface HandoverContext { workSummary: string; activeFile: string null; pendingAction: string null; keyFacts: string ; recentErrors: string ; } ⋮---- function detectWorkspaceRoot cwd: string : string ⋮---- function getDbPath cwd: string : string ⋮---- function detectProject cwd: string : string ⋮---- function stripMarkdown text: string : string ⋮---- / 대화 transcript에서 구조화된 핸드오버 컨텍스트를 빌드합니다. / function buildHandoverContext transcript: Array : HandoverContext ⋮---- // 1. workSummary: 첫 user 메시지 = 작업 요청 ⋮---- // 코드블록, 테이블 제거 후 첫 의미있는 라인 ⋮---- // 2. activeFile:… Evidence: `src/hooks/pre-compact.ts`
- **Session End** (source_file): import Database from 'better-sqlite3'; import { logHookError } from '../utils/logger.js'; ⋮---- interface SessionEndInput { cwd?: string; session id?: string; transcript path?: string; last assistant message?: string; stop hook active?: boolean; transcript?: Array ; } ⋮---- function detectWorkspaceRoot cwd: string : string ⋮---- function getDbPath cwd: string : string ⋮---- function detectProject cwd: string : string ⋮---- function stripMarkdown text: string : string ⋮---- .replace / ^ + /g, '$1' // code → code ⋮---- .replace / {1,6}\s /g, '' // heading → heading ⋮---- / 텍스트 행이 "노이즈"인지 판별 / function isNoiseLine line: string : boolean ⋮---- if trimmed.length 2. 완료 문장 패턴 I've completed..., 구현… Evidence: `src/hooks/session-end.ts`
- **Session Start** (source_file): import Database from 'better-sqlite3'; import { logHookError } from '../utils/logger.js'; ⋮---- interface SessionInput { cwd?: string; sessionId?: string; } ⋮---- function detectWorkspaceRoot cwd: string : string ⋮---- function getProject cwd: string, workspaceRoot: string : string null ⋮---- function cleanupNoiseMemories db: InstanceType : void ⋮---- function estimateTokens text: string : number ⋮---- function loadContext dbPath: string, project: string : string null ⋮---- // Priority 2 최근 3개 세션 빈 세션 skip ⋮---- // Priority 3 사용자 지시사항 가장 중요 - 예산 부족해도 high priority는 포함 ⋮---- // 지시사항은 예산 초과해도 high priority는 포함 ⋮---- } catch { / table may not exist yet / } ⋮---- // Priority 4 미완료 태스크 ⋮---- } c… Evidence: `src/hooks/session-start.ts`
- **User Prompt Submit** (source_file): import Database from 'better-sqlite3'; import { logHookError } from '../utils/logger.js'; ⋮---- interface PromptInput { prompt?: string; cwd?: string; } ⋮---- function detectWorkspaceRoot cwd: string : string ⋮---- function getProject cwd: string, workspaceRoot: string : string null ⋮---- function extractPastKeywords prompt: string : string null ⋮---- / Korean + English 일반 stopword Proactive trigger matching용 — 사용자 발상 "전부 기록하되 트리거 매칭" 구현 / ⋮---- // 한국어 빈출 조사/대명사/일반 동사/부사 ⋮---- // 범용 명사 LIKE 검색 시 아무 메모리나 잡는 오탐원 — 2026-07-08 C3 ⋮---- // 한국어 2글자 빈출 v1.14.3에서 한국어 길이 임계값 2로 낮춤에 따라 추가 ⋮---- // 영어 빈출 추가 — Next.js 같은 동음이의 발생하는 토큰 ⋮---- function extractTriggerKeywords prompt: string : string ⋮---- .… Evidence: `src/hooks/user-prompt-submit.ts`
- **Embedding** (source_file): import { db } from '../db/database.js'; import { generateEmbedding, embeddingToBuffer } from '../utils/embedding.js'; import { logger } from '../utils/logger.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export async function handleRebuildEmbeddings args: unknown : Promise Evidence: `src/tools-v2/embedding.ts`
- **Index** (source_file): import { contextTools, handleContextGet, handleContextUpdate } from './context.js'; import { memoryTools, handleMemoryStore, handleMemorySearch, handleMemoryDelete, handleMemoryStats } from './memory.js'; import { taskTools, handleTaskManage } from './task.js'; import { verifyTools, handleVerify } from './verify.js'; import { learnTools, handleLearn, handleRecallSolution } from './learn.js'; import { projectsTools, handleProjects } from './projects.js'; import { embeddingTools, handleRebuildEmbeddings } from './embedding.js'; import { autoCaptureTools, handleSessionStart, handleSessionEnd, handleSessionSummary } from './auto-capture.js'; ⋮---- import type { Tool, CallToolResult } from '../t… Evidence: `src/tools-v2/index.ts`
- **Memory** (source_file): import { db } from '../db/database.js'; import { generateEmbedding, embeddingToBuffer, bufferToEmbedding, cosineSimilarity } from '../utils/embedding.js'; import { logger } from '../utils/logger.js'; import { MemoryStoreSchema, MemorySearchSchema, MemoryGetSchema, MemoryDeleteSchema } from '../schemas.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export function calculateDecayedScore importance: number, memoryType: string, createdAt: string, accessCount: number : number ⋮---- function jaccardSimilarity a: string, b: string : number ⋮---- function parseTags tags: string null : string ⋮---- export async function handleMemoryStore args: unknown : Promise ⋮---- export asyn… Evidence: `src/tools-v2/memory.ts`
- **Task** (source_file): import { db } from '../db/database.js'; import { logger } from '../utils/logger.js'; import { TaskManageSchema } from '../schemas.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export async function handleTaskManage args: unknown : Promise ⋮---- function addTask project: string, title: string, description?: string, priority?: number : CallToolResult ⋮---- function completeTask taskId: number : CallToolResult ⋮---- function updateTaskStatus taskId: number, status: string : CallToolResult ⋮---- function listTasks project: string : CallToolResult Evidence: `src/tools-v2/task.ts`
- **Verify** (source_file): import { spawn } from 'child process'; import { db, APPS DIR } from '../db/database.js'; import { logger } from '../utils/logger.js'; import { VerifySchema } from '../schemas.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export async function handleVerify args: unknown : Promise ⋮---- async function detectPlatform projectPath: string : Promise ⋮---- function runCommand command: string, cwd: string : Promise< Evidence: `src/tools-v2/verify.ts`
- **Embedding** (source_file): import { db } from '../db/database.js'; import { generateEmbedding, cosineSimilarity, embeddingToBuffer, bufferToEmbedding, isEmbeddingReady, getEmbeddingPipeline } from '../utils/embedding.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export async function semanticSearch query: string, limit: number = 10, minSimilarity: number = 0.3, memoryType?: string, project?: string : Promise ⋮---- export async function rebuildEmbeddings force: boolean = false : Promise ⋮---- export function getEmbeddingStatus : CallToolResult Evidence: `src/tools/embedding.ts`
- **Index** (source_file): import { projectTools } from './project.js'; import { sessionTools } from './session.js'; import { memoryTools } from './memory.js'; import { embeddingTools } from './embedding.js'; import { relationTools } from './relation.js'; import { feedbackTools } from './feedback.js'; import { filterTools } from './filter.js'; import { learningTools } from './learning.js'; import { contextTools } from './context.js'; import { taskTools } from './task.js'; import { solutionTools } from './solution.js'; Evidence: `src/tools/index.ts`
- **Memory** (source_file): import { db } from '../db/database.js'; import { generateEmbedding, embeddingToBuffer } from '../utils/embedding.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- function parseTags tags: string null : string ⋮---- export async function storeMemory content: string, memoryType: string, tags?: string , project?: string, importance?: number, metadata?: Record : Promise ⋮---- export function recallMemory query: string, memoryType?: string, project?: string, limit: number = 10, minImportance: number = 1, maxContentLength: number = 500 : CallToolResult ⋮---- export function recallByTimeframe timeframe: string, memoryType?: string, project?: string, limit: number = 20 : CallToolR… Evidence: `src/tools/memory.ts`
- **Project** (source_file): import { execSync } from 'child process'; import { db, APPS DIR } from '../db/database.js'; import { fileExists, readFileContent, writeFileContent, parseMarkdownTable } from '../utils/helpers.js'; import type { Tool, CallToolResult } from '../types.js'; import { textResult } from '../types.js'; ⋮---- export async function listProjects : Promise ⋮---- export async function getSession project: string, includeRaw: boolean = false, maxContentLength: number = 2000 : Promise ⋮---- // 수정된 파일 추출 ⋮---- // 이슈 추출 ⋮---- // raw 내용 선택적 ⋮---- export async function updateSession project: string, lastWork: string, currentStatus?: string, nextTasks?: string , modifiedFiles?: string , issues?: string , verifi… Evidence: `src/tools/project.ts`
- **Relation** (source_file): import { db } from '../db/database.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export function createRelation sourceId: number, targetId: number, relationType: string, strength: number = 1.0 : CallToolResult ⋮---- export function findConnectedMemories memoryId: number, depth: number = 1, relationType?: string : CallToolResult ⋮---- function explore currentId: number, currentDepth: number Evidence: `src/tools/relation.ts`
- **Session** (source_file): import { db } from '../db/database.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export function saveSessionHistory project: string, lastWork: string, currentStatus?: string, nextTasks?: string , modifiedFiles?: string , issues?: string , verificationResult?: string, durationMinutes?: number : CallToolResult ⋮---- export function getSessionHistory project?: string, limit: number = 10, keyword?: string : CallToolResult ⋮---- export function searchSimilarWork keyword: string, project?: string : CallToolResult ⋮---- export function recordWorkPattern project: string, workType: string, description: string, filesPattern?: string, success?: boolean, durationMinutes?: number :… Evidence: `src/tools/session.ts`
- **Solution** (source_file): import { db } from '../db/database.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export function recordSolution errorSignature: string, solution: string, project?: string, errorMessage?: string, relatedFiles?: string : CallToolResult ⋮---- export function findSolution errorText: string, project?: string : CallToolResult ⋮---- export function getContinuityStats project?: string : CallToolResult Evidence: `src/tools/solution.ts`
- **Task** (source_file): import { db } from '../db/database.js'; import type { Tool, CallToolResult } from '../types.js'; ⋮---- export function addTask project: string, title: string, description?: string, priority?: number, relatedFiles?: string , acceptanceCriteria?: string : CallToolResult ⋮---- export function completeTask taskId: number : CallToolResult ⋮---- export function updateTaskStatus taskId: number, status: string : CallToolResult ⋮---- export function getPendingTasks project: string, includeBlocked: boolean = true : CallToolResult Evidence: `src/tools/task.ts`
- **Cache** (source_file): interface CacheEntry { value: T; createdAt: number; accessCount: number; } ⋮---- interface CacheOptions { maxSize: number; ttlMs: number; } ⋮---- export class QueryCache ⋮---- constructor options: Partial = ⋮---- get key: string : T undefined ⋮---- set key: string, value: T : void ⋮---- async getOrSet key: string, factory: = T Promise : Promise ⋮---- invalidate key: string : boolean ⋮---- invalidatePattern pattern: string RegExp : number ⋮---- clear : void ⋮---- getStats : ⋮---- private evictLRU : void ⋮---- export function makeContextKey project: string : string ⋮---- export function makeMemoryKey query: string, project?: string, type?: string : string ⋮---- export function makeProjectKey… Evidence: `src/utils/cache.ts`
- **Embedding** (source_file): import { pipeline, env } from '@xenova/transformers'; ⋮---- export async function initEmbedding ⋮---- export async function generateEmbedding text: string, type: 'query' 'passage' = 'query' : Promise ⋮---- export function cosineSimilarity a: number , b: number : number ⋮---- export function embeddingToBuffer embedding: number : Buffer ⋮---- export function bufferToEmbedding buffer: Buffer : number ⋮---- export function isEmbeddingReady : boolean ⋮---- export function getEmbeddingPipeline : unknown Evidence: `src/utils/embedding.ts`
- **Logger** (source_file): export type LogLevel = 'debug' 'info' 'warn' 'error'; ⋮---- interface LogEntry { timestamp: string; level: LogLevel; tool?: string; message: string; data?: Record ; duration?: number; } ⋮---- class Logger ⋮---- constructor ⋮---- private shouldLog level: LogLevel : boolean ⋮---- private maskSensitive text: string : string ⋮---- private formatEntry entry: LogEntry : string ⋮---- private write entry: LogEntry : void ⋮---- debug message: string, data?: Record , tool?: string : void ⋮---- info message: string, data?: Record , tool?: string : void ⋮---- warn message: string, data?: Record , tool?: string : void ⋮---- error message: string, data?: Record , tool?: string : void ⋮---- async withTool… Evidence: `src/utils/logger.ts`
- **Glama** (structured_config): { "$schema": "https://glama.ai/mcp/schemas/server.json", "maintainers": "leesgit" , "name": "claude-session-continuity-mcp", "display name": "Claude Session Continuity MCP", "description": "Zero-config session continuity for Claude Code. Auto-captures context via Claude Hooks, provides 25 tools for persistent memory, task management, solution archive, and knowledge graph. Features multilingual semantic search across 94+ languages with cross-language retrieval powered by all-MiniLM-L6-v2 embeddings.", "version": "1.13.1", "author": { "name": "leesgit", "url": "https://github.com/leesgit" }, "repository": "https://github.com/leesgit/claude-session-continuity-mcp", "homepage": "https://www.npm… Evidence: `glama.json`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", "outDir": "./dist", "rootDir": "./src", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "declaration": true }, "include": "src/ / " , "exclude": "node modules", "dist" } Evidence: `tsconfig.json`
- **언어 통계에서 제외 실제 소스는 TypeScript src/** (source_file): package-lock.json linguist-generated=true linguist-vendored=true .json linguist-generated=true Evidence: `.gitattributes`
- **Dependencies** (source_file): Dependencies node modules/ package-lock.json Evidence: `.gitignore`
- **Measure** (source_file): set -euo pipefail DB="${MCP DB:-/Users/ibyeongchang/Documents/dev/ai-service-generator/.claude/sessions.db}" if ! -f "$DB" ; then echo "ERROR: DB not found at $DB" &2 exit 1 fi echo "===================================================================" echo " claude-session-continuity-mcp 가치 측정 — $ date '+%Y-%m-%d %H:%M:%S' " echo " DB: $DB" echo "===================================================================" echo "" echo " sqlite3 -column -header "$DB" " SELECT SELECT COUNT FROM sessions AS sessions, SELECT COUNT FROM memories AS memories, SELECT COUNT FROM solutions AS solutions, ROUND 1.0 SELECT COUNT FROM sessions / NULLIF SELECT COUNT FROM memories , 0 , 1 AS s m ratio; " echo ""… Evidence: `scripts/measure.sh`
- **Dashboard V2** (source_file): import Database from 'better-sqlite3'; ⋮---- interface StatsResult { memories: number; sessions: number; relations: number; patterns: number; embeddings: number; embeddingCoverage: number; projects: Array ; memoryTypes: Array ; recentActivity: Array ; } ⋮---- function getStats : StatsResult ⋮---- interface ProjectContext { project: string; fixed: { techStack: Record ; architectureDecisions: string ; codePatterns: string ; specialNotes: string null; }; active: { currentState: string; recentFiles: string ; blockers: string null; lastVerification: string null; updatedAt: string null; }; pendingTasks: Array ; } ⋮---- function getProjectContext project: string : ProjectContext null ⋮---- functio… Evidence: `src/dashboard-v2.ts`
- **Dashboard** (source_file): import Database from 'better-sqlite3'; ⋮---- function getMemories params: URLSearchParams ⋮---- function getMemory id: number ⋮---- function updateMemory id: number, data: ⋮---- function deleteMemoryById id: number ⋮---- function getSessions params: URLSearchParams ⋮---- function getStats ⋮---- function getRelations memoryId?: number ⋮---- // CORS ⋮---- const json = data: unknown, status = 200 = ⋮---- const parseBody = : Promise = ⋮---- // GET /api/stats Evidence: `src/dashboard.ts`
- **Index Old** (source_file): import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { ListToolsRequestSchema, CallToolRequestSchema, CallToolResult } from '@modelcontextprotocol/sdk/types.js'; ⋮---- import { execSync } from 'child process'; import Database from 'better-sqlite3'; ⋮---- import { pipeline, env } from '@xenova/transformers'; ⋮---- function loadContentFilterPatterns ⋮---- async function initEmbedding ⋮---- async function generateEmbedding text: string : Promise ⋮---- function cosineSimilarity a: number , b: number : number ⋮---- function embeddingToBuffer embedding: number : Buffer ⋮---- function bufferToEm… Evidence: `src/index-old.ts`
- **Vitest.Config** (source_file): import { defineConfig } from 'vitest/config'; Evidence: `vitest.config.ts`

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `README.md`, `package.json`, `LICENSE`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `README.md`, `package.json`, `LICENSE`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Project Overview and System Architecture**: importance `high`
  - source_paths: src/index.ts, src/types.ts, src/schemas.ts, README.md, package.json
- **Claude Hooks and Automatic Context Capture**: importance `high`
  - source_paths: src/hooks/session-start.ts, src/hooks/user-prompt-submit.ts, src/hooks/post-tool-use.ts, src/hooks/pre-compact.ts, src/hooks/session-end.ts
- **Data Storage, Memory, and Semantic Search**: importance `high`
  - source_paths: src/db/database.ts, src/utils/embedding.ts, src/utils/cache.ts, src/tools/memory.ts, src/tools/relation.ts
- **Tools API, Installation, and Operations**: importance `high`
  - source_paths: src/tools/index.ts, src/tools-v2/index.ts, src/tools/session.ts, src/tools/project.ts, src/tools/task.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `6a4c2007d068454f7e71ddfedb0fd0d4c01a3ec7`
- inspected_files: `README.md`, `package.json`, `src/dashboard-v2.ts`, `src/dashboard.ts`, `src/db/database.ts`, `src/hooks/install.ts`, `src/hooks/post-tool-use.ts`, `src/hooks/pre-compact.ts`, `src/hooks/session-end.ts`, `src/hooks/session-start.ts`, `src/hooks/user-prompt-submit.ts`, `src/index-old.ts`, `src/index.ts`, `src/schemas.ts`, `src/tools/context.ts`, `src/tools/embedding.ts`, `src/tools/feedback.ts`, `src/tools/filter.ts`, `src/tools/index.ts`, `src/tools/learning.ts`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v1.12.1
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.12.1. Context: Observed when using node, python
- Why it matters: Upgrade or migration may change expected behavior: v1.12.1
- Evidence: failure_mode_cluster:github_release | https://github.com/leesgit/claude-session-continuity-mcp/releases/tag/v1.12.1
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v1.15.0 — Write-stop recovery + continuity quality
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.15.0 — Write-stop recovery + continuity quality. Context: Observed when using node
- Why it matters: Upgrade or migration may change expected behavior: v1.15.0 — Write-stop recovery + continuity quality
- Evidence: failure_mode_cluster:github_release | https://github.com/leesgit/claude-session-continuity-mcp/releases/tag/v1.15.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Configuration risk requires verification

- Trigger: Developers should check this configuration risk before relying on the project: v1.13.1
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.13.1. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: v1.13.1
- Evidence: failure_mode_cluster:github_release | https://github.com/leesgit/claude-session-continuity-mcp/releases/tag/v1.13.1
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/leesgit/claude-session-continuity-mcp
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/leesgit/claude-session-continuity-mcp
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 6: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/leesgit/claude-session-continuity-mcp
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/leesgit/claude-session-continuity-mcp
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/leesgit/claude-session-continuity-mcp
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
