# localbrain - 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 localbrain. 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

- **Users who want to understand an open-source project's value and boundaries before installing**: Current evidence comes mainly from project documentation. Evidence: `README.md` Claim: `clm_0002` supported 0.86

## What It Can Do

- **Project Knowledge Preview** (Previewable before install): The project can be read and explained, but current evidence is not enough to confirm installable capabilities or a runtime entrypoint. Evidence: `docs/spec/README.md`, `README.md`, `LICENSE`, `docs/ROADMAP.md` et al. Claim: `clm_0001` supported 0.86

## How to Start

- No stable Quick Start command in the project evidence; this should be left empty rather than fabricated by Doramagic.

## Continue-or-Stop Decision Card

- **Current recommendation**: Run Prompt Preview first
- **Why**: There is enough information for a pre-install experience, but real compatibility, output quality, and risk boundaries cannot yet be trusted directly.

### 30-Second Read

- **What to do now**: Run Prompt Preview first
- **Minimum safe next step**: Run Prompt Preview first
- **Do not trust yet**: Tool permission boundaries cannot be trusted before install.
- **Continuing will touch**: Host AI context

### What You Can Trust Now

- **Target-audience signal: Users who want to understand an open-source project's value and boundaries before installing** (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: Project Knowledge Preview** (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: `docs/spec/README.md`, `README.md`, `LICENSE`, `docs/ROADMAP.md` et al. Claim: `clm_0001` 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.

### What Continuing Will Touch

- **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.)
- **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.
- **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_0003` inferred 0.45
- **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.

## 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

- **Project Knowledge Preview**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `docs/spec/README.md`, `README.md`, `LICENSE`, `docs/ROADMAP.md` et al. Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 56
- Important-file coverage: 40/56
- Evidence index entries: 35
- Role / Skill entries: 7

### 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 localbrain, 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 localbrain 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 localbrain, 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 7 role / Skill / project-doc entries.

- **localbrain — 범용 로컬 RAG MCP 도구 스펙** (project_doc): 작성일: 2026-05-30 · 성격: 설계/산정 스펙 구현 전 단계 Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/spec/README.md`
- **🧠 Localbrain - Find your files using simple meaning** (project_doc): 🧠 Localbrain - Find your files using simple meaning Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **localbrain — 로드맵 / 남은 작업** (project_doc): 갱신: 2026-05-30 · 현재: PyPI localbrain-rag 0.1.1 배포됨 0.1.0은 망가져 yank 필요 Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/ROADMAP.md`
- **localbrain — 아키텍처 & 작업량 산정** (project_doc): 벡터 DB에 두 컬렉션 을 둔다: 문서용 docs / 질의용 queries . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/spec/architecture.md`
- **Ollama 의존성 제거 방법** (project_doc): 왜 빼고 싶은가 Ollama는 별도 설치·상시 실행이 필요한 외부 프로세스 데몬 다. 배포용 범용 도구가 "먼저 Ollama 깔고 켜세요"를 요구하면 마찰이 크다. 목표: 외부 데몬 없이 임베딩 생성. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/spec/embedding-runtime.md`
- **UI가 들어갈 여지 검토** (project_doc): 결론 먼저 UI를 운영 UI 와 인사이트 UI 둘로 나눠 보면 답이 명확하다. - 운영 UI 소스 추가·수동 인덱싱·진행상황·검색 테스트·모델 교체 — 데이터가 없어도 첫날부터 유용 → 초기 범위에 포함 . - 인사이트 UI 클러스터·FAQ·지식공백 — 질의가 쌓여야 의미 → 나중에 같은 대시보드에 탭 추가 . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/spec/ui-review.md`
- **Changelog** (project_doc): All notable changes to this project are documented here. Format follows Keep a Changelog https://keepachangelog.com/ ; versioning is SemVer https://semver.org/ . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CHANGELOG.md`

## Evidence Index

- Indexed 35 evidence entries.

- **localbrain — 범용 로컬 RAG MCP 도구 스펙** (documentation): 작성일: 2026-05-30 · 성격: 설계/산정 스펙 구현 전 단계 Evidence: `docs/spec/README.md`
- **🧠 Localbrain - Find your files using simple meaning** (documentation): 🧠 Localbrain - Find your files using simple meaning Evidence: `README.md`
- **License** (source_file): Copyright c 2026 localbrain authors Evidence: `LICENSE`
- **localbrain — 로드맵 / 남은 작업** (documentation): 갱신: 2026-05-30 · 현재: PyPI localbrain-rag 0.1.1 배포됨 0.1.0은 망가져 yank 필요 Evidence: `docs/ROADMAP.md`
- **localbrain — 아키텍처 & 작업량 산정** (documentation): 벡터 DB에 두 컬렉션 을 둔다: 문서용 docs / 질의용 queries . Evidence: `docs/spec/architecture.md`
- **Ollama 의존성 제거 방법** (documentation): 왜 빼고 싶은가 Ollama는 별도 설치·상시 실행이 필요한 외부 프로세스 데몬 다. 배포용 범용 도구가 "먼저 Ollama 깔고 켜세요"를 요구하면 마찰이 크다. 목표: 외부 데몬 없이 임베딩 생성. Evidence: `docs/spec/embedding-runtime.md`
- **UI가 들어갈 여지 검토** (documentation): 결론 먼저 UI를 운영 UI 와 인사이트 UI 둘로 나눠 보면 답이 명확하다. - 운영 UI 소스 추가·수동 인덱싱·진행상황·검색 테스트·모델 교체 — 데이터가 없어도 첫날부터 유용 → 초기 범위에 포함 . - 인사이트 UI 클러스터·FAQ·지식공백 — 질의가 쌓여야 의미 → 나중에 같은 대시보드에 탭 추가 . Evidence: `docs/spec/ui-review.md`
- **기본 deps: fastembed ONNX, 데몬 없음 → 추가 설치 없이 CPU 에서 바로 동작.** (source_file): project name = "localbrain-rag" version = "0.1.1" description = "Local-first general-purpose RAG with an MCP server, CLI, and web console" readme = "README.md" requires-python = " =3.10" license = { file = "LICENSE" } authors = { email = "jwjy1313@gmail.com" } keywords = "rag", "mcp", "embeddings", "semantic-search", "llm", "local", "vector-search" classifiers = "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Scientific… Evidence: `pyproject.toml`
- **Init** (source_file): version = version "localbrain-rag" ⋮---- version = "0.0.0+dev" Evidence: `src/localbrain/__init__.py`
- **Cli** (source_file): def main argv: list str None = None - int ⋮---- parser = argparse.ArgumentParser prog="localbrain", description="로컬 RAG MCP 도구" ⋮---- sub = parser.add subparsers dest="cmd", required=True ⋮---- p add = sub.add parser "add-source", help="폴더/파일 경로 등록" ⋮---- p idx = sub.add parser "index", help="증분 인덱싱 실행" ⋮---- p search = sub.add parser "search", help="의미 검색" ⋮---- p ins = sub.add parser "insights", help="질의 클러스터링 FAQ ·지식공백 리포트" ⋮---- args = parser.parse args argv ctx = AppContext indexing = IndexingService ctx search = SearchService ctx insights = InsightsService ctx ⋮---- src = indexing.add source args.path, tuple args.globs.split "," , not args.no recursive ⋮---- hits = search.search args.… Evidence: `src/localbrain/adapters/cli.py`
- **Mcp Server** (source_file): mcp = FastMCP "localbrain" ctx = AppContext indexing = IndexingService ctx search = SearchService ctx insights = InsightsService ctx ⋮---- @mcp.tool def search query: str, k: int = 5, path prefix: str None = None - list dict ⋮---- @mcp.tool def add path path: str, globs: str = " .md, .txt", recursive: bool = True - dict ⋮---- s = indexing.add source path, tuple globs.split "," , recursive ⋮---- @mcp.tool def remove path source id: str - dict ⋮---- @mcp.tool def list sources - list dict ⋮---- @mcp.tool def reindex source id: str None = None, rebuild: bool = False - list dict ⋮---- @mcp.tool def stats - dict ⋮---- @mcp.tool def query insights min similarity: float = 0.80 - dict ⋮---- def main… Evidence: `src/localbrain/adapters/mcp_server.py`
- **Server** (source_file): app = FastAPI title="localbrain" ctx = AppContext indexing = IndexingService ctx search = SearchService ctx model = ModelService ctx insights = InsightsService ctx STATIC = Path file .parent / "static" ⋮---- @app.get "/" def index page ⋮---- @app.get "/api/fs/list" def fs list path: str = "" ⋮---- base = Path path if path else Path.home ⋮---- items = ⋮---- class SourceIn BaseModel ⋮---- path: str globs: str = " .md, .txt" recursive: bool = True ⋮---- @app.get "/api/sources" def get sources ⋮---- @app.post "/api/sources" def add source body: SourceIn ⋮---- @app.delete "/api/sources/{source id}" def delete source source id: str ⋮---- @app.get "/api/index/stream" def index stream source id: st… Evidence: `src/localbrain/adapters/web/server.py`
- **Config** (source_file): def home - Path ⋮---- override = os.environ.get "LOCALBRAIN HOME" ⋮---- @dataclass class EmbeddingConfig ⋮---- provider: str = "fastembed" model: str = "intfloat/multilingual-e5-large" fp16: bool = False ⋮---- @dataclass class ChunkConfig ⋮---- size: int = 1000 overlap: int = 150 ⋮---- @dataclass class RerankConfig ⋮---- enabled: bool = True provider: str = "cross-encoder" model: str = "BAAI/bge-reranker-v2-m3" candidate k: int = 30 ⋮---- @dataclass class Config ⋮---- home: Path = field default factory= home embedding: EmbeddingConfig = field default factory=EmbeddingConfig chunk: ChunkConfig = field default factory=ChunkConfig rerank: RerankConfig = field default factory=RerankConfig searc… Evidence: `src/localbrain/config.py`
- **Context** (source_file): class AppContext ⋮---- def init self, config: Config None = None - None Evidence: `src/localbrain/context.py`
- **Chunking** (source_file): def chunk text text: str, size: int = 1000, overlap: int = 150 - list str ⋮---- text = text.strip ⋮---- paragraphs = p.strip for p in text.split "\n\n" if p.strip chunks: list str = buf = "" ⋮---- buf = f"{buf}\n\n{p}" if buf else p ⋮---- buf = p else: 한 문단이 size 보다 크면 문자 윈도우로 분할 step = max 1, size - overlap ⋮---- if overlap 0 and len chunks 1: 인접 청크 앞에 이전 꼬리를 덧붙여 문맥 연결 merged = chunks 0 Evidence: `src/localbrain/core/chunking.py`
- **Base** (source_file): @runtime checkable class EmbeddingProvider Protocol ⋮---- model id: str dim: int ⋮---- def embed texts self, texts: list str - list list float Evidence: `src/localbrain/core/embed/base.py`
- **Fastembed Provider** (source_file): class FastEmbedProvider ⋮---- def init self, model: str = "intfloat/multilingual-e5-large", fp16: bool = False - None ⋮---- self.model id = f"fastembed:{model}" 모델 로드 없이 식별자 확보 컬렉션 명명용 ⋮---- self. model = None lazy ⋮---- def ensure self - None ⋮---- @property def dim self - int ⋮---- def embed texts self, texts: list str - list list float Evidence: `src/localbrain/core/embed/fastembed_provider.py`
- **Ollama Provider** (source_file): class OllamaProvider ⋮---- @property def dim self - int ⋮---- def embed texts self, texts: list str - list list float ⋮---- out: list list float = ⋮---- req = urllib.request.Request Evidence: `src/localbrain/core/embed/ollama_provider.py`
- **Registry** (source_file): def make provider provider: str, model: str, fp16: bool = False - EmbeddingProvider Evidence: `src/localbrain/core/embed/registry.py`
- **신 메서드 get embedding dimension 우선 → 없으면 구 메서드. FutureWarning 회피** (source_file): class SentenceTransformerProvider ⋮---- def init self, model: str = "intfloat/multilingual-e5-large", fp16: bool = False - None ⋮---- self.model id = f"st:{model}" 모델 로드 없이 식별자 확보 컬렉션 명명용 ⋮---- self. model = None lazy ⋮---- def ensure self - None ⋮---- if self. fp16 and torch.cuda.is available : GPU 에서만 half precision ⋮---- @property def dim self - int ⋮---- 신 메서드 get embedding dimension 우선 → 없으면 구 메서드. FutureWarning 회피 get dim = getattr self. model, "get embedding dimension", None \ ⋮---- def embed texts self, texts: list str - list list float ⋮---- vecs = self. model.encode texts, normalize embeddings=True Evidence: `src/localbrain/core/embed/st_provider.py`
- **File Index** (source_file): class FileIndex ⋮---- def init self, conn: sqlite3.Connection - None ⋮---- def get self, path: str - FileRecord None ⋮---- row = self. conn.execute "SELECT FROM file index WHERE path=?", path, .fetchone ⋮---- def upsert self, rec: FileRecord - None ⋮---- def delete self, path: str - None ⋮---- def paths for source self, source id: str - list str ⋮---- rows = self. conn.execute ⋮---- @staticmethod def to record r: sqlite3.Row - FileRecord Evidence: `src/localbrain/core/file_index.py`
- **Base** (source_file): @runtime checkable class Loader Protocol ⋮---- def supports self, path: Path - bool ⋮---- def load self, path: Path - str Evidence: `src/localbrain/core/loaders/base.py`
- **Registry** (source_file): LOADERS: list Loader = TextLoader ⋮---- def get loader path: Path - Loader None ⋮---- def is supported path: Path - bool Evidence: `src/localbrain/core/loaders/registry.py`
- **Text Loader** (source_file): class TextLoader ⋮---- EXTENSIONS = { ⋮---- def supports self, path: Path - bool ⋮---- def load self, path: Path - str Evidence: `src/localbrain/core/loaders/text_loader.py`
- **Base** (source_file): @runtime checkable class Reranker Protocol ⋮---- model id: str ⋮---- def rerank self, query: str, docs: list str - list float Evidence: `src/localbrain/core/rerank/base.py`
- **Registry** (source_file): def make reranker provider: str, model: str, fp16: bool = False - Reranker Evidence: `src/localbrain/core/rerank/registry.py`
- **Scanner** (source_file): def iter files source: Source - Iterator Path ⋮---- base = Path source.path ⋮---- globber = base.rglob if source.recursive else base.glob ⋮---- def file hash path: Path - str ⋮---- h = hashlib.sha1 ⋮---- class Scanner ⋮---- def init self, file index: FileIndex - None ⋮---- def scan self, source: Source - ChangeSet ⋮---- cs = ChangeSet source id=source.source id found: set str = set ⋮---- ap = str p.resolve ⋮---- st = p.stat rec = self. fi.get ap Evidence: `src/localbrain/core/scanner.py`
- **Changelog** (documentation): All notable changes to this project are documented here. Format follows Keep a Changelog https://keepachangelog.com/ ; versioning is SemVer https://semver.org/ . Evidence: `CHANGELOG.md`
- **.dockerignore** (source_file): .venv/ / pycache / .pyc dist/ build/ .egg-info/ .git/ .github/ docs/ screenshots/ .db .localbrain/ / .py Evidence: `.dockerignore`
- **저장소 내 텍스트는 LF 로 정규화 체크아웃 시 OS 기본에 맞춤** (source_file): 저장소 내 텍스트는 LF 로 정규화 체크아웃 시 OS 기본에 맞춤 text=auto eol=lf Evidence: `.gitattributes`
- **Python** (source_file): Python pycache / .py cod .egg-info/ .eggs/ build/ dist/ .venv/ venv/ Evidence: `.gitignore`
- **localbrain — web/MCP 서버용 이미지 옵션, 2차 배포 형태** (source_file): localbrain — web/MCP 서버용 이미지 옵션, 2차 배포 형태 GPU: 호스트에 NVIDIA 드라이버 + Container Toolkit 필요. docker run --gpus all ... Windows 는 Docker Desktop + WSL2 백엔드에서 --gpus all 지원 주의: 컨테이너는 마운트된 볼륨만 본다 → "임의 로컬 폴더 인덱싱" 대신 호스트 문서 폴더를 /docs 등으로 마운트해 서비스로 운용하는 시나리오에 적합. FROM python:3.11-slim Evidence: `Dockerfile`
- **Manifest** (source_file): include LICENSE include README.md include CHANGELOG.md recursive-include src/localbrain/adapters/web/static Evidence: `MANIFEST.in`
- **Docker Compose** (source_file): services: localbrain-web: build: . ports: - "8765:8765" volumes: - ./ data:/data - ${DOCS DIR:-./docs}:/docs:ro environment: LOCALBRAIN HOST: "0.0.0.0" deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: gpu Evidence: `docker-compose.yml`
- **생성 & 실행** (source_file): LocalBrain — 로컬 LLM · RAG · MCP 정리 :root{ --bg: 0d1117; --bg-soft: 161b22; --bg-card: 1c2230; --border: 2a3240; --fg: e6edf3; --fg-dim: 9aa7b4; --fg-faint: 6b7785; --accent: 58a6ff; --accent2: 7ee787; --accent3: d2a8ff; --warn: f0b429; --pink: ff7b9c; --code-bg: 11161f; --radius:14px; --mono:"Cascadia Code",ui-monospace,SFMono-Regular,Consolas,"Courier New",monospace; --sans:-apple-system,"Segoe UI","Malgun Gothic","Apple SD Gothic Neo",Roboto,sans-serif; } {box-sizing:border-box} html{scroll-behavior:smooth} body{ margin:0;background:var --bg ;color:var --fg ;font-family:var --sans ; line-height:1.75;font-size:16px; background-image:radial-gradient 1200px 600px at 80% -10%,rgba 88,166,255,… Evidence: `index.html`

## 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: `docs/spec/README.md`, `README.md`, `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: `docs/spec/README.md`, `README.md`, `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.

- **Introduction to Localbrain**: importance `high`
  - source_paths: README.md, src/localbrain/__init__.py, src/localbrain/config.py, src/localbrain/context.py, pyproject.toml
- **Core RAG Engine and Data Pipeline**: importance `high`
  - source_paths: src/localbrain/core/scanner.py, src/localbrain/core/file_index.py, src/localbrain/core/loaders/base.py, src/localbrain/core/loaders/text_loader.py, src/localbrain/core/loaders/registry.py
- **Embedding, Reranking, and Model Providers**: importance `high`
  - source_paths: src/localbrain/core/embed/base.py, src/localbrain/core/embed/registry.py, src/localbrain/core/embed/fastembed_provider.py, src/localbrain/core/embed/ollama_provider.py, src/localbrain/core/embed/st_provider.py
- **User Interfaces, Adapters, and Operations**: importance `high`
  - source_paths: src/localbrain/adapters/cli.py, src/localbrain/adapters/mcp_server.py, src/localbrain/adapters/web/server.py, src/localbrain/adapters/web/__init__.py, src/localbrain/adapters/__init__.py

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `c48060bd83a5f7a8e7585ba7e32ca0764c5b71ef`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `pyproject.toml`, `docs/ROADMAP.md`, `docs/spec/README.md`, `docs/spec/architecture.md`, `docs/spec/embedding-runtime.md`, `docs/spec/ui-review.md`, `src/localbrain/__init__.py`, `src/localbrain/adapters/__init__.py`, `src/localbrain/adapters/cli.py`, `src/localbrain/adapters/mcp_server.py`, `src/localbrain/adapters/web/__init__.py`, `src/localbrain/adapters/web/server.py`, `src/localbrain/config.py`, `src/localbrain/context.py`, `src/localbrain/core/__init__.py`, `src/localbrain/core/chunking.py`, `src/localbrain/core/clustering.py`

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: 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/Tamariskwhisper962/Localbrain
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: 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/Tamariskwhisper962/Localbrain
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: 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/Tamariskwhisper962/Localbrain
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: 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/Tamariskwhisper962/Localbrain
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: 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/Tamariskwhisper962/Localbrain
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
