# membook - 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 membook. 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: `packages/cli/README.md`, `packages/mcp/README.md` Claim: `clm_0001` supported 0.86

## How to Start

- `npx membook init` Evidence: `packages/cli/README.md` Claim: `clm_0003` supported 0.86
- `claude mcp add membook -- npx -y @membook/mcp` Evidence: `packages/mcp/README.md` Claim: `clm_0004` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Role quality and task fit cannot be trusted directly.
- **Continuing will touch**: Role selection bias, Command execution, Host AI configuration

### 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: `packages/cli/README.md`, `packages/mcp/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: `packages/cli/README.md` Claim: `clm_0003` supported 0.86

### What You Cannot Trust Yet

- **Role quality and task fit cannot be trusted directly.** (unverified): A role library proves there are many roles; it does not prove each one fits your specific task or that a role produces high-quality results.
- **Do not treat role copy as real execution capability.** (unverified): Before install you can only judge whether the role description and task profile match; you cannot prove it can complete the task inside the host AI.
- **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. Evidence: `CLAUDE.md`
- **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

- **Role selection bias**: The user's judgment about which expert role should handle the task. Why: Picking the wrong role makes the AI answer from the wrong expert perspective, wasting time or misleading decisions.
- **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: `packages/cli/README.md`, `packages/mcp/README.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `CLAUDE.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: `packages/cli/README.md`, `packages/mcp/README.md`
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `README.md`, `packages/cli/README.md`, `packages/core/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 an interactive trial to verify the task profile and role match first; do not import the whole role library up front. (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.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **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.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Keep a record of the original role selection**: If output goes off-topic, you can return to the task-profiling stage and reselect a role instead of pushing on with the wrong one.
- **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.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **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_0005` 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: `packages/cli/README.md`, `packages/mcp/README.md` Claim: `clm_0006` 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: `packages/cli/README.md`, `packages/mcp/README.md` Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 113
- Important-file coverage: 40/113
- Evidence index entries: 76
- Role / Skill entries: 32

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

- **Membook** (project_doc): Memory that stays true. A verifiable memory engine for coding agents. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **membook** (project_doc): Memory that stays true. The command line for Membook https://github.com/getmembook/membook — durable project knowledge, anchored to code and checked against it. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/cli/README.md`
- **@membook/core** (project_doc): The Membook engine: store, index, retrieve. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/core/README.md`
- **@membook/mcp** (project_doc): The Membook MCP server. Serves a repository's memories to any MCP-capable coding agent over stdio. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/mcp/README.md`
- **CLAUDE.md — Membook** (project_doc): This file is the build context for the Membook repository. It is written to be read by coding agents Claude Code, Cursor, Codex and humans alike. Keep it under control: stable decisions live here; session learnings go in .membook/ once the tool can eat its own dog food. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CLAUDE.md`
- **Contributing to Membook** (project_doc): Thanks for considering it. This project is MIT and intends to stay that way. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CONTRIBUTING.md`
- **Membook — Founding Concept Document** (project_doc): Membook — Founding Concept Document Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/concept.md`
- **Dogfood log** (project_doc): Two weeks of ordinary work with Membook running on a real repository. Plain entries: what happened, what the tool did, what annoyed you. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/dogfood.md`
- **Releasing** (project_doc): How Membook gets published, and the things that will bite you if you improvise it. Everything here was learned by doing it wrong first, on 2026-07-24. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/releasing.md`
- **v0.2 — Multi-repo workspaces** (project_doc): Status: design, ruled. Build after the v0.1 dogfood fortnight, informed by its telemetry. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/design/v0.2-workspaces.md`
- **membook** (project_doc): - 28 https://github.com/getmembook/membook/pull/28 47f6d4e https://github.com/getmembook/membook/commit/47f6d4e0bdc1f5d4e2a0694cc8eafdaba360d53d Thanks @hiranofficial https://github.com/hiranofficial ! - The write half of the memfile version machinery, landed before v2 needs it. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/cli/CHANGELOG.md`
- **@membook/core** (project_doc): - 28 https://github.com/getmembook/membook/pull/28 47f6d4e https://github.com/getmembook/membook/commit/47f6d4e0bdc1f5d4e2a0694cc8eafdaba360d53d Thanks @hiranofficial https://github.com/hiranofficial ! - The write half of the memfile version machinery, landed before v2 needs it. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/core/CHANGELOG.md`
- **@membook/mcp** (project_doc): - Updated dependencies 47f6d4e https://github.com/getmembook/membook/commit/47f6d4e0bdc1f5d4e2a0694cc8eafdaba360d53d : - @membook/spec@0.2.0 - @membook/core@0.2.0 Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `packages/mcp/CHANGELOG.md`
- **Proud Geese Workspace** (project_doc): The workspace manifest and resolver — step 1 of the v0.2 multi-repo sequence. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.changeset/proud-geese-workspace.md`
- **Contributor Covenant Code of Conduct** (project_doc): Contributor Covenant Code of Conduct Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CODE_OF_CONDUCT.md`
- **Project memory** (project_doc): Durable, project-specific knowledge for anyone — human or agent — working in this repository: decisions and why they were made, traps that are not obvious from the code, and paths already known to be dead ends. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `MEMBOOK.md`
- **Security Policy** (project_doc): Do not open a public issue for a security report. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `SECURITY.md`
- **Distillation Prompt — v1** (project_doc): This file is versioned and reviewed like code. Changes here change product behaviour and require the same review rigor as a code change. Used by membook distill to turn notes from a working session into candidate memories. Compare with prompts/seed.md , which distills existing documentation instead. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `prompts/distill.md`
- **Re-check Prompt — v2** (project_doc): v2 2026-07-24 : a restore must cite evidence, and the citation is checked. The first live re-check returned three restores whose reasons cited a different memory's subject, argued for caution, and were factually wrong. The verdicts matched ground truth only because the memories happened to be true — a model that restores for bad reasons will restore false memories for bad reasons too. Prose alone cannot be trusted,… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `prompts/recheck.md`
- **Seed Prompt — v1** (project_doc): This file is versioned and reviewed like code. Changes here change product behaviour and require the same review rigor as a code change. Used by membook seed to distill a repository's existing prose — CLAUDE.md , AGENTS.md , ADRs, design docs, READMEs — into candidate memories. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `prompts/seed.md`
- **M 0542.Mem** (project_doc): Never add a gitleaks allowlist or --no-verify for scanner test fixtures; assemble credential-shaped strings at runtime from fragments instead. This repo is upstream of a standard, so every mechanism in its history is a worked example someone copies, and an allowlist entry is a published tutorial in annotating past a scanner. Expect two rounds: leak detection is context-sensitive, so a fragment that matches no rule a… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-0542.mem.md`
- **M 1389.Mem** (project_doc): memfile is a z.literal, so bumping the spec version makes OUR OWN reader reject every existing file, not just old readers — every memory in every repo quarantines on upgrade. v0.2 therefore holds explicit versioned schemas with parse dispatching on the field, read tolerance for all versions <= current forever, writes always at current, and no silent upgrade-on-touch: files are committed, so migration must be a revie… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-1389.mem.md`
- **M 6F7C.Mem** (project_doc): npm view 404s for minutes after a first publish while the package exists fine; use npm owner ls to confirm, since it reads a different path. Also --tag alpha does not stop npm setting latest — a package's first publish always takes latest whatever tag you pass. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-6f7c.mem.md`
- **M 83Be.Mem** (project_doc): Timestamps serialize double-quoted, in canonical UTC second precision, by explicit serializer rule. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-83be.mem.md`
- **M 88A8.Mem** (project_doc): The wire schema is the Memfile standard; Date tolerance is a one-directional reader courtesy of this implementation. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-88a8.mem.md`
- **M 9940.Mem** (project_doc): Every workspace package resolves its siblings to SOURCE, not to built dist: a vitest alias for tests and tsconfig paths for typecheck, with rootDir removed so paths may point outside the package. Without this a fresh clone cannot run pnpm test or pnpm typecheck until something has been built, and CI passes only by the luck of running build first. Package exports still point at dist, because source-pointing exports w… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-9940.mem.md`
- **M 9C90.Mem** (project_doc): Do not tune retrieval on BM25 alone: on a small corpus its IDF is degenerate, so a memory matching one rare term of a multi-term query outranks one that actually answers it. Term coverage scales relevance to fix this. The small-corpus regime is the normal case, not an edge case — every repository's book starts tiny, so precision-at-small-N is where this has to work. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-9c90.mem.md`
- **M Be36.Mem** (project_doc): Anchor kind is always serialized explicitly, and leads every anchor map. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-be36.mem.md`
- **M Bf6B.Mem** (project_doc): scope becomes a discriminated union in v0.2: user-scope memories forbid anchors entirely, and the verification vocabulary status , verified is absent from their shape rather than perpetually unverified. An anchor is what makes a memory a checkable claim about the world; a user preference is testimony about the human, so verification is a category error against it, not a pending obligation. If you have a file to poin… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-bf6b.mem.md`
- **M Cbc0.Mem** (project_doc): Publish with pnpm, never npm. npm leaves pnpm's workspace: protocol unresolved in the packed tarball, so the install fails and node modules/.bin/membook is never created — the symptom is npx membook doing nothing, not any error mentioning workspaces. The only check that catches it is installing the tarball and confirming the binary linked; npm's warning about bin is misleading and fires even when bin is fine. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-cbc0.mem.md`
- **M D394.Mem** (project_doc): Every injectable boundary needs at least one test through the real thing. Injecting a dependency to make a unit test easy also makes the suite structurally unable to exercise the path that ships, and the resulting failure is silent success rather than an error. Proven twice here: the in-memory MCP transport hid nothing only because a stdio test spawned the real binary, and an injected ask hid a readline that drained… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-d394.mem.md`
- **M Fa22.Mem** (project_doc): CI blocks on CodeQL js/polynomial-redos: regexes like /\/+$/ or ambiguous host patterns over library input fail the gate even for local-only strings — canonicalRemote uses linear string walks trimSlashes, scpLikeHost instead, and new string-normalization code should too. The advisory Windows build also runs the full test suite, so test assertions must build expected paths with join , never POSIX literals. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `.membook/memories/m-fa22.mem.md`

## Evidence Index

- Indexed 76 evidence entries.

- **Membook** (documentation): Memory that stays true. A verifiable memory engine for coding agents. Evidence: `README.md`
- **membook** (documentation): Memory that stays true. The command line for Membook https://github.com/getmembook/membook — durable project knowledge, anchored to code and checked against it. Evidence: `packages/cli/README.md`
- **@membook/core** (documentation): The Membook engine: store, index, retrieve. Evidence: `packages/core/README.md`
- **@membook/mcp** (documentation): The Membook MCP server. Serves a repository's memories to any MCP-capable coding agent over stdio. Evidence: `packages/mcp/README.md`
- **Package** (package_manifest): { "name": "membook-monorepo", "private": true, "license": "MIT", "author": "Stag.ai Ltd", "description": "Membook — a verifiable memory engine for coding agents. Memory that stays true.", "homepage": "https://github.com/getmembook/membook", "repository": { "type": "git", "url": "https://github.com/getmembook/membook" }, "bugs": { "url": "https://github.com/getmembook/membook/issues" }, "engines": { "node": " =20" }, "packageManager": "pnpm@9.15.0", "scripts": { "build": "pnpm -r build", "test": "pnpm -r test", "typecheck": "pnpm -r typecheck", "changeset": "changeset", "version-packages": "changeset version", "release": "pnpm build && changeset publish", "version": "changeset version" }, "d… Evidence: `package.json`
- **Package** (package_manifest): { "name": "membook", "version": "0.2.0", "description": "Memory that stays true — a verifiable memory engine for coding agents", "license": "MIT", "author": "Stag.ai Ltd", "repository": { "type": "git", "url": "git+https://github.com/getmembook/membook.git", "directory": "packages/cli" }, "homepage": "https://github.com/getmembook/membook", "bugs": { "url": "https://github.com/getmembook/membook/issues" }, "keywords": "membook", "agent-memory", "ai-memory", "coding-agent", "cli", "verification" , "type": "module", "bin": { "membook": "./dist/cli.js" }, "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } }, "files": "dist", "README.md", "LICENSE" , "publishConfig"… Evidence: `packages/cli/package.json`
- **Package** (package_manifest): { "name": "@membook/core", "version": "0.2.0", "description": "Membook engine — store, index, retrieve. Files are the truth; the database is a cache.", "license": "MIT", "author": "Stag.ai Ltd", "repository": { "type": "git", "url": "git+https://github.com/getmembook/membook.git", "directory": "packages/core" }, "type": "module", "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } }, "files": "dist", "README.md", "LICENSE" , "scripts": { "build": "tsup src/index.ts --format esm --dts --clean", "test": "vitest run", "typecheck": "tsc --noEmit" }, "engines": { "node": " =20.5.0" }, "dependencies": { "@membook/spec": "workspace: ", "better-sqlite3": "^12.11.1", "exe… Evidence: `packages/core/package.json`
- **Package** (package_manifest): { "name": "@membook/mcp", "version": "0.1.3", "description": "Membook MCP server — serves verified memories to coding agents over stdio", "license": "MIT", "author": "Stag.ai Ltd", "repository": { "type": "git", "url": "git+https://github.com/getmembook/membook.git", "directory": "packages/mcp" }, "homepage": "https://github.com/getmembook/membook", "bugs": { "url": "https://github.com/getmembook/membook/issues" }, "keywords": "membook", "mcp", "model-context-protocol", "agent-memory", "ai-memory", "coding-agent" , "type": "module", "bin": { "membook-mcp": "./dist/cli.js" }, "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } }, "files": "dist", "README.md", "LIC… Evidence: `packages/mcp/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`
- **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: `packages/cli/LICENSE`
- **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: `packages/core/LICENSE`
- **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: `packages/mcp/LICENSE`
- **CLAUDE.md — Membook** (documentation): This file is the build context for the Membook repository. It is written to be read by coding agents Claude Code, Cursor, Codex and humans alike. Keep it under control: stable decisions live here; session learnings go in .membook/ once the tool can eat its own dog food. Evidence: `CLAUDE.md`
- **Contributing to Membook** (documentation): Thanks for considering it. This project is MIT and intends to stay that way. Evidence: `CONTRIBUTING.md`
- **Membook — Founding Concept Document** (documentation): Membook — Founding Concept Document Evidence: `docs/concept.md`
- **Dogfood log** (documentation): Two weeks of ordinary work with Membook running on a real repository. Plain entries: what happened, what the tool did, what annoyed you. Evidence: `docs/dogfood.md`
- **Releasing** (documentation): How Membook gets published, and the things that will bite you if you improvise it. Everything here was learned by doing it wrong first, on 2026-07-24. Evidence: `docs/releasing.md`
- **v0.2 — Multi-repo workspaces** (documentation): Status: design, ruled. Build after the v0.1 dogfood fortnight, informed by its telemetry. Evidence: `docs/design/v0.2-workspaces.md`
- **membook** (documentation): - 28 https://github.com/getmembook/membook/pull/28 47f6d4e https://github.com/getmembook/membook/commit/47f6d4e0bdc1f5d4e2a0694cc8eafdaba360d53d Thanks @hiranofficial https://github.com/hiranofficial ! - The write half of the memfile version machinery, landed before v2 needs it. Evidence: `packages/cli/CHANGELOG.md`
- **@membook/core** (documentation): - 28 https://github.com/getmembook/membook/pull/28 47f6d4e https://github.com/getmembook/membook/commit/47f6d4e0bdc1f5d4e2a0694cc8eafdaba360d53d Thanks @hiranofficial https://github.com/hiranofficial ! - The write half of the memfile version machinery, landed before v2 needs it. Evidence: `packages/core/CHANGELOG.md`
- **@membook/mcp** (documentation): - Updated dependencies 47f6d4e https://github.com/getmembook/membook/commit/47f6d4e0bdc1f5d4e2a0694cc8eafdaba360d53d : - @membook/spec@0.2.0 - @membook/core@0.2.0 Evidence: `packages/mcp/CHANGELOG.md`
- **Cli.Test** (source_file): import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { execa } from "execa"; import { mkdtemp, rm, writeFile, mkdir, readFile, symlink, } from "node:fs/promises"; import { existsSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; import { Membook, type ModelProvider } from "@membook/core"; import { init } from "./commands/init.js"; import { status } from "./commands/status.js"; import { review } from "./commands/review.js"; import { seed } from "./commands/seed.js"; import { distill } from "./commands/distill.js"; import { HOOK MAX HITS, hookPrompt } from "./commands/hook.js"; import { book, migrate, recall, recheckerFromEnv, re… Evidence: `packages/cli/src/cli.test.ts`
- **Cli** (source_file): import { Command } from "commander"; import { createRequire } from "node:module"; import { MEMORY TYPES, type MemoryType } from "@membook/spec"; import { init } from "./commands/init.js"; import { status } from "./commands/status.js"; import { review } from "./commands/review.js"; import { book, migrate, recall, reindex, remember, verify, } from "./commands/misc.js"; import { seed } from "./commands/seed.js"; import { distill } from "./commands/distill.js"; import { hookPrompt } from "./commands/hook.js"; import { die } from "./output.js"; ⋮---- const root = : string = program.opts< Evidence: `packages/cli/src/cli.ts`
- **Distill** (source_file): import { readFile } from "node:fs/promises"; import { resolve } from "node:path"; import { DISTILL SYSTEM, Membook, SecretScanGuard, distill as runDistill, headSha, isGitRepository, pathExistsAt, seedFrontmatter, type ModelProvider, } from "@membook/core"; import { providerFromEnv } from "./misc.js"; import { bad, dim, die, heading, ok, plural, wrap } from "../output.js"; ⋮---- export interface DistillOptions { root: string; log?: line: string = void; file?: string; dryRun?: boolean; model?: string; provider?: ModelProvider; now?: = Date; readInput?: = Promise ; } ⋮---- async function readStdin : Promise ⋮---- export async function distill options: DistillOptions : Promise ⋮---- function su… Evidence: `packages/cli/src/commands/distill.ts`
- **Hook** (source_file): import { Membook, RANKING, queryTerms, type RecallHit, } from "@membook/core"; ⋮---- export interface HookOptions { root: string; log?: line: string = void; readInput?: = Promise ; } ⋮---- async function readStdin : Promise ⋮---- function renderHit hit: RecallHit : string ⋮---- / Answer a UserPromptSubmit hook. Reads the harness's JSON on stdin, recalls against the user's prompt, and prints anything worth knowing. Silence is the common and correct case: printing something on every prompt would train the reader to skip it, and would spend context on a tool that had nothing to say. / export async function hookPrompt options: HookOptions : Promise ⋮---- // Stale memories are never injected. Un… Evidence: `packages/cli/src/commands/hook.ts`
- **Init** (source_file): import { mkdir, readFile, writeFile } from "node:fs/promises"; import { existsSync } from "node:fs"; import { join } from "node:path"; import { Membook, isGitRepository, repoPaths } from "@membook/core"; import { die, heading, dim, ok, wrap } from "../output.js"; ⋮---- async function ensureGitignore root: string : Promise ⋮---- async function ensureAgentPointer root: string : Promise ; key: string : unknown; } ⋮---- async function ensureHooks root: string : Promise ⋮---- export interface InitOptions { root: string; log?: line: string = void; hooks?: boolean; } ⋮---- export async function init options: InitOptions : Promise Evidence: `packages/cli/src/commands/init.ts`
- **Misc** (source_file): import { readFile } from "node:fs/promises"; import { join } from "node:path"; import { MEMFILE SPEC VERSION, type MemoryInput, type MemoryType, } from "@membook/spec"; import { AnthropicProvider, LlmRechecker, Membook, OpenAiCompatibleProvider, SecretScanGuard, changesSince, headSha, findMissingAnchorPaths, isGitRepository, type AnchorRechecker, type ModelProvider, type Instrumentation, } from "@membook/core"; import { bad, die, dim, heading, ok, plural, statusLabel, warn, wrap, } from "../output.js"; ⋮---- export interface CommonOptions { root: string; log?: line: string = void; } ⋮---- const out = options: CommonOptions ⋮---- export async function reindex options: CommonOptions : Promise… Evidence: `packages/cli/src/commands/misc.ts`
- **Review** (source_file): import { createInterface } from "node:readline/promises"; import { stdin, stdout } from "node:process"; import type { MemoryStatus } from "@membook/spec"; import { Membook, headSha, isGitRepository, type StoredMemory, } from "@membook/core"; import { STATUS MEANING, dim, heading, ok, plural, statusLabel, wrap, } from "../output.js"; ⋮---- export interface ReviewOptions { root: string; list?: boolean; log?: line: string = void; ask?: question: string = Promise ; now?: = Date; } ⋮---- function describe memory: StoredMemory : string ⋮---- export async function review options: ReviewOptions : Promise ⋮---- / The reader is created LAZILY, on the first prompt. Created up front, it starts consumin… Evidence: `packages/cli/src/commands/review.ts`
- **Seed** (source_file): import { Membook, SEED SYSTEM, SecretScanGuard, headSha, isGitRepository, seed as runSeed, seedFrontmatter, type ModelProvider, type SeedCandidate, } from "@membook/core"; import { providerFromEnv } from "./misc.js"; import { bad, dim, die, heading, ok, plural, warn, wrap } from "../output.js"; ⋮---- export interface SeedOptions { root: string; log?: line: string = void; dryRun?: boolean; maxFiles?: number; model?: string; provider?: ModelProvider; now?: = Date; } ⋮---- export async function seed options: SeedOptions : Promise ⋮---- // A guard refusing at the write is not a crash: record it and continue, // or one bad candidate would discard every good one after it. ⋮---- / Report what was… Evidence: `packages/cli/src/commands/seed.ts`
- **Book.Test** (source_file): import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { readFile } from "node:fs/promises"; import { computeMemoryId, type MemoryInput } from "@membook/spec"; import { Membook } from "./membook.js"; import { BOOK, estimateTokens } from "./book.js"; import { tempRepo } from "./test-helpers.js"; ⋮---- interface SeedSpec { body: string; type?: MemoryInput "type" ; status?: MemoryInput "status" ; confidence?: number; paths?: string ; } ⋮---- function inputFor spec: SeedSpec : ⋮---- async function seed spec: SeedSpec : Promise ⋮---- async function seedMany specs: SeedSpec , target: Membook = membook : Promise Evidence: `packages/core/src/book.test.ts`
- **Book** (source_file): import { writeFile } from "node:fs/promises"; import type { Memory, MemoryStatus, MemoryType } from "@membook/spec"; import type { MemoryStore, StoredMemory } from "./store.js"; import type { RepoPaths } from "./paths.js"; ⋮---- export interface BookEntry { id: string; type: MemoryType; status: MemoryStatus; body: string; anchors: string ; density: number; tokens: number; } ⋮---- export interface BookReport { content: string; entries: BookEntry ; tokens: number; omitted: number; excluded: number; } ⋮---- export function estimateTokens text: string : number ⋮---- function recencyFactor memory: Memory, now: Date : number ⋮---- export function expectedValue memory: Memory, now: Date : number ⋮… Evidence: `packages/core/src/book.ts`
- **Distill.Test** (source_file): import { describe, expect, it } from "vitest"; import { readFile } from "node:fs/promises"; import { join } from "node:path"; import { DISTILL SYSTEM, distill, sourceHash } from "./distill.js"; import { SEED SYSTEM } from "./seed.js"; import { FAKE SECRETS } from "./fake-secrets.js"; import { ProviderError, type ModelProvider } from "./provider.js"; import type { Instrumentation, MembookEvent } from "./instrumentation.js"; ⋮---- function fakeProvider replies: string : ModelProvider & ⋮---- async complete ⋮---- function failingProvider : ModelProvider ⋮---- async complete : Promise ⋮---- class Recorder implements Instrumentation ⋮---- record event: MembookEvent : void ⋮---- const reply = mem… Evidence: `packages/core/src/distill.test.ts`
- **Distill** (source_file): import { createHash } from "node:crypto"; import { z } from "zod"; import { MEMORY TYPES, type MemoryType } from "@membook/spec"; import type { ModelProvider } from "./provider.js"; import { ProviderError } from "./provider.js"; import type { Instrumentation } from "./instrumentation.js"; import { NullInstrumentation } from "./instrumentation.js"; import { scanForSecrets } from "./secret-scan.js"; ⋮---- export interface DistillCandidate { statement: string; type: MemoryType; paths: string ; symbol?: string; confidence: number; } ⋮---- export type RejectionReason = "ungrounded-anchor" "secret" "duplicate" "malformed"; ⋮---- export interface DistillRejection { statement: string; reason: Rejec… Evidence: `packages/core/src/distill.ts`
- **Errors** (source_file): export interface QuarantineRecord { file: string; issues: string ; quarantined at: string; } ⋮---- export class IndexMetadataMismatchError extends Error ⋮---- constructor mismatches: Array< ⋮---- export class WriteBlockedError extends Error ⋮---- constructor guard: string, findings: WriteGuardFinding ⋮---- export interface WriteGuardFinding { rule: string; message: string; } ⋮---- export class MemoryNotFoundError extends Error ⋮---- constructor id: string Evidence: `packages/core/src/errors.ts`
- **Membook.Test** (source_file): import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { existsSync } from "node:fs"; import { Membook } from "./membook.js"; import { WriteBlockedError } from "./errors.js"; import { SecretScanGuard } from "./secret-scan.js"; import { FAKE SECRETS } from "./fake-secrets.js"; import { CORPUS, memoryFor, tempRepo } from "./test-helpers.js"; Evidence: `packages/core/src/membook.test.ts`
- **Membook** (source_file): import { MEMFILE SPEC VERSION, type MemoryInput } from "@membook/spec"; import { repoPaths, type RepoPaths } from "./paths.js"; import { MemoryStore, type StoredMemory, type MemoryStoreOptions, } from "./store.js"; import { openIndex, type IndexDb } from "./index-db.js"; import { indexMemory, removeFromIndex, reindex, type ReindexResult, } from "./reindex.js"; import { search, type SearchHit, type SearchOptions } from "./search.js"; import { verifyPass, type VerifyOptions, type VerifyReport } from "./verify.js"; import { recall, type RecallOptions, type RecallResult } from "./recall.js"; import { compileBook, writeBook, type BookReport } from "./book.js"; import { migrateStore, type Migrate… Evidence: `packages/core/src/membook.ts`
- **Reindex** (source_file): import { rm } from "node:fs/promises"; import type { Memory } from "@membook/spec"; import type { IndexDb } from "./index-db.js"; import { openIndex } from "./index-db.js"; import type { MemoryStore, StoredMemory } from "./store.js"; import type { QuarantineRecord } from "./errors.js"; import type { RepoPaths } from "./paths.js"; ⋮---- export interface ReindexResult { indexed: number; quarantined: QuarantineRecord ; } ⋮---- export function indexMemory db: IndexDb, memory: StoredMemory, rowid: number : void ⋮---- export function removeFromIndex db: IndexDb, id: string : void ⋮---- export async function reindex paths: RepoPaths, store: MemoryStore, : Promise Evidence: `packages/core/src/reindex.ts`
- **Seed** (source_file): import { readFile } from "node:fs/promises"; import { join, relative } from "node:path"; import { execa } from "execa"; import type { MemoryInput } from "@membook/spec"; import type { ModelProvider } from "./provider.js"; import type { Instrumentation } from "./instrumentation.js"; import { NullInstrumentation } from "./instrumentation.js"; import { pathExistsAt, headSha } from "./git.js"; import { distill, sourceHash, type DistillCandidate, type DistillRejection, } from "./distill.js"; ⋮---- export interface SeedSourceFile { path: string; content: string; truncated: boolean; } ⋮---- export async function findSeedSources root: string, options: { maxFiles?: number } = {} : Promise ⋮---- cons… Evidence: `packages/core/src/seed.ts`
- **Cli** (source_file): import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { createServer } from "./server.js"; ⋮---- async function main : Promise Evidence: `packages/mcp/src/cli.ts`
- **Server** (source_file): import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { createRequire } from "node:module"; import { z } from "zod"; import { Membook, headSha, findMissingAnchorPaths, isGitRepository, type RecallHit, SecretScanGuard, type WriteGuard, type Instrumentation, } from "@membook/core"; import { MEMORY TYPES, computeMemoryId, type MemoryInput } from "@membook/spec"; ⋮---- export interface CreateServerOptions { root: string; agent?: string; model?: string; session?: string; guards?: readonly WriteGuard ; instrumentation?: Instrumentation boolean; now?: = Date; } ⋮---- function renderHit hit: RecallHit : string ⋮---- export function createServer options: CreateServerOptions : M… Evidence: `packages/mcp/src/server.ts`
- **Proud Geese Workspace** (documentation): The workspace manifest and resolver — step 1 of the v0.2 multi-repo sequence. Evidence: `.changeset/proud-geese-workspace.md`
- **Contributor Covenant Code of Conduct** (documentation): Contributor Covenant Code of Conduct Evidence: `CODE_OF_CONDUCT.md`
- **Project memory** (documentation): Durable, project-specific knowledge for anyone — human or agent — working in this repository: decisions and why they were made, traps that are not obvious from the code, and paths already known to be dead ends. Evidence: `MEMBOOK.md`
- **Security Policy** (documentation): Do not open a public issue for a security report. Evidence: `SECURITY.md`
- **Distillation Prompt — v1** (documentation): This file is versioned and reviewed like code. Changes here change product behaviour and require the same review rigor as a code change. Used by membook distill to turn notes from a working session into candidate memories. Compare with prompts/seed.md , which distills existing documentation instead. Evidence: `prompts/distill.md`
- **Re-check Prompt — v2** (documentation): v2 2026-07-24 : a restore must cite evidence, and the citation is checked. The first live re-check returned three restores whose reasons cited a different memory's subject, argued for caution, and were factually wrong. The verdicts matched ground truth only because the memories happened to be true — a model that restores for bad reasons will restore false memories for bad reasons too. Prose alone cannot be trusted, so a restore now requires a verbatim evidence quote which is string-matched against the anchored file. Unmatched evidence is a non-answer: the memory stays stale and the verdict is logged reason grounded: false . Evidence: `prompts/recheck.md`
- **Seed Prompt — v1** (documentation): This file is versioned and reviewed like code. Changes here change product behaviour and require the same review rigor as a code change. Used by membook seed to distill a repository's existing prose — CLAUDE.md , AGENTS.md , ADRs, design docs, READMEs — into candidate memories. Evidence: `prompts/seed.md`
- **M 0542.Mem** (documentation): Never add a gitleaks allowlist or --no-verify for scanner test fixtures; assemble credential-shaped strings at runtime from fragments instead. This repo is upstream of a standard, so every mechanism in its history is a worked example someone copies, and an allowlist entry is a published tutorial in annotating past a scanner. Expect two rounds: leak detection is context-sensitive, so a fragment that matches no rule alone can still trip the generic-api-key rule purely by sitting next to a property named like a key. Evidence: `.membook/memories/m-0542.mem.md`
- **M 1389.Mem** (documentation): memfile is a z.literal, so bumping the spec version makes OUR OWN reader reject every existing file, not just old readers — every memory in every repo quarantines on upgrade. v0.2 therefore holds explicit versioned schemas with parse dispatching on the field, read tolerance for all versions <= current forever, writes always at current, and no silent upgrade-on-touch: files are committed, so migration must be a reviewable diff via membook migrate . Version machinery lands before any change that forces a tick. Evidence: `.membook/memories/m-1389.mem.md`
- **M 6F7C.Mem** (documentation): npm view 404s for minutes after a first publish while the package exists fine; use npm owner ls to confirm, since it reads a different path. Also --tag alpha does not stop npm setting latest — a package's first publish always takes latest whatever tag you pass. Evidence: `.membook/memories/m-6f7c.mem.md`
- **M 83Be.Mem** (documentation): Timestamps serialize double-quoted, in canonical UTC second precision, by explicit serializer rule. Evidence: `.membook/memories/m-83be.mem.md`
- **M 88A8.Mem** (documentation): The wire schema is the Memfile standard; Date tolerance is a one-directional reader courtesy of this implementation. Evidence: `.membook/memories/m-88a8.mem.md`
- **M 9940.Mem** (documentation): Every workspace package resolves its siblings to SOURCE, not to built dist: a vitest alias for tests and tsconfig paths for typecheck, with rootDir removed so paths may point outside the package. Without this a fresh clone cannot run pnpm test or pnpm typecheck until something has been built, and CI passes only by the luck of running build first. Package exports still point at dist, because source-pointing exports would break every consumer. Evidence: `.membook/memories/m-9940.mem.md`
- **M 9C90.Mem** (documentation): Do not tune retrieval on BM25 alone: on a small corpus its IDF is degenerate, so a memory matching one rare term of a multi-term query outranks one that actually answers it. Term coverage scales relevance to fix this. The small-corpus regime is the normal case, not an edge case — every repository's book starts tiny, so precision-at-small-N is where this has to work. Evidence: `.membook/memories/m-9c90.mem.md`
- **M Be36.Mem** (documentation): Anchor kind is always serialized explicitly, and leads every anchor map. Evidence: `.membook/memories/m-be36.mem.md`
- **M Bf6B.Mem** (documentation): scope becomes a discriminated union in v0.2: user-scope memories forbid anchors entirely, and the verification vocabulary status , verified is absent from their shape rather than perpetually unverified. An anchor is what makes a memory a checkable claim about the world; a user preference is testimony about the human, so verification is a category error against it, not a pending obligation. If you have a file to point at, it is repo knowledge wearing the wrong scope. Evidence: `.membook/memories/m-bf6b.mem.md`
- **M Cbc0.Mem** (documentation): Publish with pnpm, never npm. npm leaves pnpm's workspace: protocol unresolved in the packed tarball, so the install fails and node modules/.bin/membook is never created — the symptom is npx membook doing nothing, not any error mentioning workspaces. The only check that catches it is installing the tarball and confirming the binary linked; npm's warning about bin is misleading and fires even when bin is fine. Evidence: `.membook/memories/m-cbc0.mem.md`
- **M D394.Mem** (documentation): Every injectable boundary needs at least one test through the real thing. Injecting a dependency to make a unit test easy also makes the suite structurally unable to exercise the path that ships, and the resulting failure is silent success rather than an error. Proven twice here: the in-memory MCP transport hid nothing only because a stdio test spawned the real binary, and an injected ask hid a readline that drained piped stdin during setup and discarded the human's answer while reporting success. Evidence: `.membook/memories/m-d394.mem.md`
- **M Fa22.Mem** (documentation): CI blocks on CodeQL js/polynomial-redos: regexes like /\/+$/ or ambiguous host patterns over library input fail the gate even for local-only strings — canonicalRemote uses linear string walks trimSlashes, scpLikeHost instead, and new string-normalization code should too. The advisory Windows build also runs the full test suite, so test assertions must build expected paths with join , never POSIX literals. Evidence: `.membook/memories/m-fa22.mem.md`
- **Config** (structured_config): { "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", "changelog": "@changesets/changelog-github", { "repo": "getmembook/membook" } , "commit": false, "fixed": , "linked": , "access": "public", "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": } Evidence: `.changeset/config.json`
- The remaining 16 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## 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`, `packages/cli/README.md`, `packages/core/README.md`
- **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`, `packages/cli/README.md`, `packages/core/README.md`

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

- **Overview**: importance `high`
  - source_paths: README.md, package.json, packages/cli/README.md, packages/cli/package.json, packages/core/README.md
- **Src**: importance `high`
  - source_paths: packages/core/src/book.test.ts, packages/core/src/book.ts, packages/core/src/distill.test.ts, packages/core/src/distill.ts, packages/core/src/errors.ts
- **Cli**: importance `high`
  - source_paths: packages/cli/CHANGELOG.md, packages/cli/LICENSE, packages/cli/README.md, packages/cli/package.json, packages/cli/src/cli.test.ts
- **Src**: importance `high`
  - source_paths: packages/cli/src/cli.test.ts, packages/cli/src/cli.ts, packages/cli/src/commands/distill.ts, packages/cli/src/commands/hook.ts, packages/cli/src/commands/init.ts
- **Commands**: importance `medium`
  - source_paths: packages/cli/src/commands/distill.ts, packages/cli/src/commands/hook.ts, packages/cli/src/commands/init.ts, packages/cli/src/commands/misc.ts, packages/cli/src/commands/review.ts
- **Src**: importance `medium`
  - source_paths: packages/mcp/src/cli.ts, packages/mcp/src/index.ts, packages/mcp/src/server.test.ts, packages/mcp/src/server.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `e5a4ac6a7d8108f5bd2b9e84e57fea010db979c8`
- inspected_files: `README.md`, `package.json`, `pnpm-lock.yaml`, `docs/concept.md`, `docs/design/v0.2-workspaces.md`, `docs/dogfood.md`, `docs/releasing.md`, `packages/cli/CHANGELOG.md`, `packages/cli/README.md`, `packages/cli/package.json`, `packages/cli/src/cli.test.ts`, `packages/cli/src/cli.ts`, `packages/cli/src/commands/distill.ts`, `packages/cli/src/commands/hook.ts`, `packages/cli/src/commands/init.ts`, `packages/cli/src/commands/misc.ts`, `packages/cli/src/commands/review.ts`, `packages/cli/src/commands/seed.ts`, `packages/cli/src/commands/status.ts`, `packages/cli/src/index.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: Configuration risk requires verification

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

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

### Constraint 3: Runtime risk requires verification

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

### Constraint 4: Runtime risk requires verification

- Trigger: Developers should check this runtime risk before relying on the project: membook@0.1.2
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: membook@0.1.2. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: membook@0.1.2
- Evidence: failure_mode_cluster:github_release | https://github.com/getmembook/membook/releases/tag/membook%400.1.2
- 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/getmembook/membook
- 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/getmembook/membook
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Runtime risk requires verification

- Trigger: Developers should check this performance risk before relying on the project: @membook/core@0.1.1
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: @membook/core@0.1.1. Context: Observed when using windows
- Why it matters: Upgrade or migration may change expected behavior: @membook/core@0.1.1
- Evidence: failure_mode_cluster:github_release | https://github.com/getmembook/membook/releases/tag/%40membook/core%400.1.1
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Runtime risk requires verification

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