# anamnesis - 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 anamnesis. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

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

## Who It Fits Best

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

## What It Can Do

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

## How to Start

- `uv tool install anamnesis-memory && anamnesis init` Evidence: `README.md` Claim: `clm_0003` supported 0.86
- `git clone https://github.com/oscardvs/anamnesis && cd anamnesis/server` Evidence: `README.md` Claim: `clm_0004` supported 0.86
- `npx anamnesis-dashboard      # http://localhost:3000` Evidence: `README.md` Claim: `clm_0005` supported 0.86

## Continue-or-Stop Decision Card

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

### 30-Second Read

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

### What You Can Trust Now

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

### 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. 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.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **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: `README.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **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.)
- **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.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

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

## What Must Be Verified After Install

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

## Boundary & Risk Decision Card

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

## Pre-Work Working Context

### Loading Order

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

### Task Routes

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

### Context Scale

- Total files: 273
- Important-file coverage: 40/273
- Evidence index entries: 79
- Role / Skill entries: 9

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

- **CLAUDE.md - working in the Anamnesis repo** (project_doc): CLAUDE.md - working in the Anamnesis repo Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CLAUDE.md`
- **Anamnesis** (project_doc): Cross-machine memory for Claude Code Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **dashboard** (project_doc): The Anamnesis memory GUI : a git-like visual interface for your cross-machine memory. A thin read/write client over the local store, built with Next.js App Router . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `dashboard/README.md`
- **anamnesis server** (project_doc): The Anamnesis MCP memory server for Claude Code. Python + FastMCP https://gofastmcp.com . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `server/README.md`
- **Cross-machine token benchmark** (project_doc): Measures the honest token cost of completing one task on a fresh machine WITHOUT Anamnesis the agent explores the project to learn its conventions versus WITH Anamnesis the real SessionStart memory block is injected . Synthetic project and store only, no personal data. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `bench/cross-machine-tokens/README.md`
- **Amsterdam demo recording pipeline** (project_doc): Produces site/public/demo.mp4 : the split-screen cross-machine demo. Every command executes for real on two real machines sharing a throwaway store over the mesh; the pipeline logs the sessions as timestamped events and renders them into one video. Output is never edited; only keystroke pacing is synthesized and silences longer than --max-gap seconds model thinking time are shortened at render time. The committed ev… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `bench/cross-machine-tokens/demo/README.md`
- **Hub deployment PWA over the tailnet** (project_doc): Hub deployment PWA over the tailnet Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `dashboard/deploy/README.md`
- **anamnesis-dashboard** (project_doc): Browser dashboard for Anamnesis https://github.com/oscardvs/anamnesis , the cross-machine, file-first memory layer for Claude Code. Browse, search, and edit your memory store, see per-machine history, and sync, all from a local web UI. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `dashboard/npm/README.md`
- **Demo recording runbook synthetic, no personal info** (project_doc): Demo recording runbook synthetic, no personal info Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `bench/cross-machine-tokens/RUNBOOK.md`

## Evidence Index

- Indexed 79 evidence entries.

- **CLAUDE.md - working in the Anamnesis repo** (documentation): CLAUDE.md - working in the Anamnesis repo Evidence: `CLAUDE.md`
- **Anamnesis** (documentation): Cross-machine memory for Claude Code Evidence: `README.md`
- **dashboard** (documentation): The Anamnesis memory GUI : a git-like visual interface for your cross-machine memory. A thin read/write client over the local store, built with Next.js App Router . Evidence: `dashboard/README.md`
- **anamnesis server** (documentation): The Anamnesis MCP memory server for Claude Code. Python + FastMCP https://gofastmcp.com . Evidence: `server/README.md`
- **Cross-machine token benchmark** (documentation): Measures the honest token cost of completing one task on a fresh machine WITHOUT Anamnesis the agent explores the project to learn its conventions versus WITH Anamnesis the real SessionStart memory block is injected . Synthetic project and store only, no personal data. Evidence: `bench/cross-machine-tokens/README.md`
- **Amsterdam demo recording pipeline** (documentation): Produces site/public/demo.mp4 : the split-screen cross-machine demo. Every command executes for real on two real machines sharing a throwaway store over the mesh; the pipeline logs the sessions as timestamped events and renders them into one video. Output is never edited; only keystroke pacing is synthesized and silences longer than --max-gap seconds model thinking time are shortened at render time. The committed event logs keep true timing. Evidence: `bench/cross-machine-tokens/demo/README.md`
- **Hub deployment PWA over the tailnet** (documentation): Hub deployment PWA over the tailnet Evidence: `dashboard/deploy/README.md`
- **anamnesis-dashboard** (documentation): Browser dashboard for Anamnesis https://github.com/oscardvs/anamnesis , the cross-machine, file-first memory layer for Claude Code. Browse, search, and edit your memory store, see per-machine history, and sync, all from a local web UI. Evidence: `dashboard/npm/README.md`
- **Package** (package_manifest): { "name": "dashboard", "version": "0.1.1", "private": true, "main": "dist-electron/main.js", "homepage": "https://github.com/oscardvs/anamnesis", "scripts": { "dev": "next dev", "prebuild": "node scripts/clean-build-artifacts.mjs", "build": "next build", "postbuild": "node scripts/standalone-assets.mjs", "start": "next start", "lint": "eslint", "typecheck": "tsc --noEmit", "test": "vitest run", "test:e2e": "npm run build && vitest run --config vitest.e2e.config.ts", "icons": "node scripts/make-icons.mjs", "build:electron": "node scripts/build-electron.mjs", "package:npm": "node scripts/package-npm.mjs", "desktop:dev": "npm run build && npm run build:electron && electron dist-electron/main.j… Evidence: `dashboard/package.json`
- **Package** (package_manifest): { "name": "anamnesis-site", "version": "0.0.0", "private": true, "scripts": { "build": "next build && touch out/.nojekyll", "dev": "next dev", "start": "next start", "types:check": "fumadocs-mdx && next typegen && tsc --noEmit", "postinstall": "fumadocs-mdx", "lint": "eslint" }, "dependencies": { "fumadocs-core": "16.9.0", "fumadocs-ui": "16.9.0", "fumadocs-mdx": "15.0.7", "lucide-react": "^1.16.0", "mermaid": "^11.15.0", "next": "16.2.6", "next-themes": "^0.4.6", "react": "^19.2.6", "react-dom": "^19.2.6", "tailwind-merge": "^3.6.0" }, "devDependencies": { "@tailwindcss/postcss": "^4.3.0", "@types/mdx": "^2.0.13", "@types/node": "^25.8.0", "@types/react": "^19.2.14", "@types/react-dom": "^… Evidence: `site/package.json`
- **License** (source_file): Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ Evidence: `LICENSE`
- **.Mcp** (structured_config): { "mcpServers": { "anamnesis": { "command": "uv", "args": "run", "--project", "server", "anamnesis", "serve" } } } Evidence: `.mcp.json`
- **Hooks.Settings** (structured_config): { "hooks": { "SessionStart": { "matcher": "startup resume clear", "hooks": { "type": "command", "command": "uv run --project /ABSOLUTE/PATH/TO/anamnesis/server anamnesis inject", "timeout": 15 } }, { "matcher": "startup resume", "hooks": { "type": "command", "command": "uv run --project /ABSOLUTE/PATH/TO/anamnesis/server anamnesis sync", "async": true } } , "SessionEnd": { "hooks": { "type": "command", "command": "uv run --project /ABSOLUTE/PATH/TO/anamnesis/server anamnesis capture", "timeout": 180 } } , "PreCompact": { "hooks": { "type": "command", "command": "uv run --project /ABSOLUTE/PATH/TO/anamnesis/server anamnesis capture --source precompact --no-sync", "timeout": 60 } } } } Evidence: `examples/hooks.settings.json`
- **Anamnesis - example environment. Copy to .env which is git-ignored and fill in.** (source_file): Anamnesis - example environment. Copy to .env which is git-ignored and fill in. Nothing here is required to read this file; defaults are sensible for local use. Evidence: `.env.example`
- **Copy to ~/.config/anamnesis/dashboard.env and edit for this machine.** (source_file): Copy to ~/.config/anamnesis/dashboard.env and edit for this machine. Evidence: `dashboard/deploy/dashboard.env.example`
- **Page** (source_file): import { NoteBrowser } from "@/components/note-browser"; import { PageHeader } from "@/components/ui/misc"; import { listMeta } from "@/lib/db"; import { MEMORY TYPES, type MemoryType } from "@/lib/types"; ⋮---- export default async function BrowsePage { searchParams, }: { searchParams: Promise ; } Evidence: `dashboard/src/app/browse/page.tsx`
- **Page** (source_file): import { HistoryExplorer } from "@/components/history-explorer"; import { PageHeader } from "@/components/ui/misc"; import { globalHistory } from "@/lib/git"; ⋮---- export default async function HistoryPage Evidence: `dashboard/src/app/history/page.tsx`
- **Page** (source_file): import { MachinesView } from "@/components/machines-view"; import { PageHeader } from "@/components/ui/misc"; import { countsByMachine } from "@/lib/db"; import { fleet, repoState } from "@/lib/git"; ⋮---- export default async function MachinesPage Evidence: `dashboard/src/app/machines/page.tsx`
- **Page** (source_file): import Link from "next/link"; import { notFound } from "next/navigation"; import { ArrowLeft } from "lucide-react"; ⋮---- import { NoteEditor } from "@/components/note-editor"; import { PageHeader } from "@/components/ui/misc"; import { readNote } from "@/lib/store"; ⋮---- export default async function EditNotePage Evidence: `dashboard/src/app/notes/[id]/edit/page.tsx`
- **Page** (source_file): import Link from "next/link"; import { notFound } from "next/navigation"; import { ArrowLeft } from "lucide-react"; ⋮---- import { NoteHistoryExplorer } from "@/components/note-history-explorer"; import { PageHeader } from "@/components/ui/misc"; import { noteHistory } from "@/lib/git"; import { noteRelPath, readNote } from "@/lib/store"; ⋮---- export default async function NoteHistoryPage Evidence: `dashboard/src/app/notes/[id]/history/page.tsx`
- **Page** (source_file): import Link from "next/link"; import { notFound } from "next/navigation"; import { ArrowLeft, GitCommitVertical, Pencil } from "lucide-react"; ⋮---- import { Markdown } from "@/components/markdown"; import { ProvenanceBadge, TypeBadge } from "@/components/ui/badges"; import { Button } from "@/components/ui/button"; import { Panel } from "@/components/ui/misc"; import { noteHistory } from "@/lib/git"; import { absoluteTime, relativeTime, shortProject } from "@/lib/format"; import { noteRelPath, readNote } from "@/lib/store"; ⋮---- function MetaItem ⋮---- <span title= Evidence: `dashboard/src/app/notes/[id]/page.tsx`
- **Page** (source_file): import { NoteEditor } from "@/components/note-editor"; import { PageHeader } from "@/components/ui/misc"; ⋮---- export default function NewNotePage Evidence: `dashboard/src/app/notes/new/page.tsx`
- **Page** (source_file): export default function Offline Evidence: `dashboard/src/app/offline/page.tsx`
- **Page** (source_file): import Link from "next/link"; import { ArrowUpRight, GitCommitVertical, Layers, Network, TriangleAlert } from "lucide-react"; ⋮---- import { AutoRefresh } from "@/components/auto-refresh"; import { CommitGraph } from "@/components/commit-graph"; import { CountUp } from "@/components/count-up"; import { HeroCanvas } from "@/components/hero-canvas"; import { MemoryMap } from "@/components/memory-map"; import { NoteRow } from "@/components/note-row"; import { ReindexButton } from "@/components/reindex-button"; import { StatusDot } from "@/components/ui/badges"; import { EmptyState, Panel } from "@/components/ui/misc"; import { countsByMachine, indexExists, listMeta, schemaMismatch, stats } fro… Evidence: `dashboard/src/app/page.tsx`
- **Page** (source_file): import { listMeta } from "@/lib/db"; import { ReflectionReview } from "@/components/reflection-review"; import { ReviewPageActions } from "@/components/review-page-actions"; import { PageHeader } from "@/components/ui/misc"; ⋮---- export default async function ReviewPage Evidence: `dashboard/src/app/review/page.tsx`
- **Page** (source_file): import { getSettings, type Settings } from "@/lib/settings"; import { PageHeader } from "@/components/ui/misc"; ⋮---- import { SettingsForm } from "./settings-form"; ⋮---- export default async function SettingsPage Evidence: `dashboard/src/app/settings/page.tsx`
- **Db** (source_file): import fs from "node:fs"; ⋮---- import Database from "better-sqlite3"; ⋮---- import { dbPath } from "./config"; import type { MemoryMeta, MemoryType, ProvSource, Scope, StoreStats } from "./types"; ⋮---- type DbHandle = import "better-sqlite3" .Database; ⋮---- function indexSignature path: string : string ⋮---- function getDb : DbHandle null ⋮---- export function closeDb : void ⋮---- export function indexExists : boolean ⋮---- export function schemaMismatch : ⋮---- export function buildMatch query: string : string ⋮---- interface MetaRow { id: string; type: string; title: string; bodyPath: string; project: string; machineId: string; scope: string; createdAt: string; updatedAt: string; provS… Evidence: `dashboard/src/lib/db.ts`
- **Git** (source_file): import { execFile } from "node:child process"; import { promisify } from "node:util"; ⋮---- import { memoryDir, resolveMachineId } from "./config"; import type { Commit, MachineInfo, NoteCommit, RepoState } from "./types"; ⋮---- export async function runGit args: string , home?: string : Promise ⋮---- / Like {@link runGit} but never throws: returns "" on any git error. / async function runGitSafe args: string , home?: string : Promise ⋮---- / Machine id encoded in an anamnesis@ author email else the email itself . / function machineFromEmail email: string : string ⋮---- function parseCommitLine line: string : Commit null ⋮---- / True if memory/ is an initialized git repo with at least one c… Evidence: `dashboard/src/lib/git.ts`
- **Store** (source_file): import fs from "node:fs/promises"; import fsSync from "node:fs"; import path from "node:path"; ⋮---- import { ulid } from "ulid"; ⋮---- import { runCli } from "./cli"; import { localDir, memoryDir, resolveMachineId, scopeDir } from "./config"; import { closeDb, getMeta } from "./db"; import { commitPaths } from "./git"; import { notePath, parseMemory, serializeMemory } from "./markdown"; import { MEMORY TYPES, type Memory, type MemoryType, type Scope } from "./types"; ⋮---- function utcNowSeconds : string ⋮---- export function noteRelPath id: string : string null ⋮---- function noteAbsPath id: string : string null ⋮---- export async function readNoteText id: string : Promise ⋮---- export as… Evidence: `dashboard/src/lib/store.ts`
- **Init** (source_file): version = version "anamnesis-memory" ⋮---- version = "0+unknown" Evidence: `server/src/anamnesis/__init__.py`
- **Lazy import breaks the capture llm summarizer cycle and keeps the base** (source_file): EDIT TOOLS = {"Edit", "Write", "MultiEdit", "NotebookEdit"} ⋮---- @dataclass class ParsedSession ⋮---- first prompt: str = "" last outcome: str = "" files touched: list str = field default factory=list git branch: str = "" cwd: str = "" session id: str = "" raw: str = "" ⋮---- def text of content: object - str ⋮---- """Join the text of a message content a string, or a list of blocks .""" ⋮---- parts: list str = ⋮---- t = b.get "text" ⋮---- def parse transcript path: str Path - ParsedSession ⋮---- """Tolerantly extract a deterministic session summary from a transcript JSONL. An unreadable file or malformed lines degrade to an empty/partial result rather than raising, so capture never breaks… Evidence: `server/src/anamnesis/capture.py`
- **Recall-gated apply needs the eval set up front.** (source_file): DASHBOARD PIN = "anamnesis-dashboard@^0.1" MIN NODE MAJOR = 20 ⋮---- def build parser - argparse.ArgumentParser ⋮---- p = argparse.ArgumentParser sub = p.add subparsers dest="command" ⋮---- pi = sub.add parser "inject", help="print top notes for the project as SessionStart context" ⋮---- pc = sub.add parser "capture", help="write an episodic note from a transcript" ⋮---- pim = sub.add parser ⋮---- pmig = sub.add parser ⋮---- pded = sub.add parser ⋮---- pbf = sub.add parser ⋮---- pref = sub.add parser ⋮---- pmrg = sub.add parser ⋮---- pev = sub.add parser evsub = pev.add subparsers dest="eval command" evb = evsub.add parser "build", help="generate candidate eval cases via the LLM then curate… Evidence: `server/src/anamnesis/cli.py`
- **Config** (source_file): def resolve home - Path ⋮---- raw = os.environ.get "ANAMNESIS HOME" ⋮---- def resolve claude home - Path ⋮---- raw = os.environ.get "CLAUDE CONFIG DIR" ⋮---- def read config home: Path - dict str, Any ⋮---- data = json.loads home / "config.json" .read text encoding="utf-8" ⋮---- def store config - dict str, Any ⋮---- def config str key: str - str None ⋮---- value = store config .get key ⋮---- def resolve machine id - str ⋮---- def resolve remote - str None ⋮---- @dataclass frozen=True class ReflectionSettings ⋮---- provider: str model: str base url: str api key: str timeout: float max tokens: int ⋮---- def reflection block - dict str, Any ⋮---- block = store config .get "reflection" ⋮---- d… Evidence: `server/src/anamnesis/config.py`
- **Inject** (source_file): DURABLE = "procedural", "semantic" MAX EPISODIC = 2 ⋮---- def normalize remote url: str - str ⋮---- u = url.strip u = re.sub r"^\w+://", "", u strip scheme: https:// ssh:// git:// u = re.sub r"^ ^@/ +@", "", u strip user@ ⋮---- u = u.replace ":", "/", 1 scp form host:path - host/path u = re.sub r"\.git$", "", u ⋮---- def read marker cwd: Path - str None ⋮---- """First non-empty line of the nearest .anamnesis/project marker, or None. Searched from cwd upward, stopping below the home directory and the filesystem root so a stray marker at $HOME cannot hijack every project. Best-effort: read errors are ignored. """ home = Path.home ⋮---- marker = d / ".anamnesis" / "project" ⋮---- line = raw.st… Evidence: `server/src/anamnesis/inject.py`
- **Llm Summarizer** (source_file): LLMClient = Callable str, str , str ⋮---- SYSTEM PROMPT = ⋮---- DEFAULT MAX CHARS = 480 000 DEFAULT TOOL RESULT CAP = 2 000 ⋮---- def window text: str, max chars: int - str ⋮---- head = int max chars 0.6 tail = max chars - head ⋮---- def truncate one content: object, cap: int - object ⋮---- out = dict content inner = out.get "content" ⋮---- def truncate tool results raw: str, cap: int - str ⋮---- out: list str = ⋮---- stripped = line.strip ⋮---- ev = json.loads stripped ⋮---- msg = ev.get "message" if isinstance ev, dict else None ⋮---- content = msg.get "content" ⋮---- def strip fences text: str - str ⋮---- cleaned = text.strip ⋮---- cleaned = cleaned.split "\n", 1 1 if "\n" in cleaned els… Evidence: `server/src/anamnesis/llm_summarizer.py`
- **Migrate** (source_file): FM DELIM = "---\n" PROJECT LINE = re.compile r"^project:. $", re.MULTILINE ⋮---- @dataclass class Change ⋮---- """A single planned or applied re-key of one note's project field.""" ⋮---- id: str type: str old project: str new project: str ⋮---- def rekey front matter text: str, new project: str - str ⋮---- """Return text with only the front-matter project: line set anew. Operates inside the YAML front-matter block only, so a project: line in the body is never touched. The new value is written as a plain YAML scalar; every project key in use for example github.com/oscardvs/anamnesis , ros2 ws , global is a valid unquoted scalar. Raises ValueError if the text has no front-matter or no project… Evidence: `server/src/anamnesis/migrate.py`
- **Defaults come from the same env-aware resolvers the rest of the system** (source_file): Which = Callable str , str None ⋮---- def default which cmd: str - str None ⋮---- def server dir - Path ⋮---- uv = which "uv" or "uv" project = str Path override uv project .expanduser .resolve ⋮---- found = which "anamnesis" ⋮---- def build env , machine id: str, remote: str None, home: Path None - dict str, str ⋮---- env = {"ANAMNESIS MACHINE ID": machine id} ⋮---- HookEntry = dict str, object HooksMap = dict str, list HookEntry ⋮---- def command string env: dict str, str , base: list str , args: str - str ⋮---- prefix = " ".join f"{k}={shlex.quote v }" for k, v in env.items cmd = " ".join shlex.quote p for p in base, args ⋮---- def build hooks base: list str , env: dict str, str - HooksM… Evidence: `server/src/anamnesis/onboard.py`
- **Reflect** (source_file): DEFAULT MAX CHARS = 480 000 DEFAULT CONFIDENCE = 0.6 ⋮---- REFLECT SYSTEM PROMPT = ⋮---- @dataclass class DistilledNote ⋮---- type: str title: str body: str ⋮---- def select unreflected store: MemoryStore, project: str - list Memory ⋮---- def render episodics episodics: list Memory - str notes: list DistilledNote = ⋮---- ntype = str item.get "type", "" .strip title = str item.get "title", "" .strip body = str item.get "body", "" .strip ⋮---- @dataclass class Reflector ⋮---- client: LLMClient model label: str max chars: int = DEFAULT MAX CHARS ⋮---- def reflect self, episodics: list Memory - list DistilledNote ⋮---- content = window redact render episodics episodics , self.max chars text = s… Evidence: `server/src/anamnesis/reflect.py`
- **Server** (source_file): def memory dict mem: Memory, , include body: bool - dict str, object ⋮---- out: dict str, object = { ⋮---- hits = store.search ⋮---- mem = store.write ⋮---- def status report store: MemoryStore, backend: SyncBackend - dict str, object ⋮---- s = store.stats st = backend.state ⋮---- def sync memory store: MemoryStore, backend: SyncBackend - dict str, object ⋮---- r = backend.sync indexed = store.reindex ⋮---- READ ONLY = ToolAnnotations readOnlyHint=True, openWorldHint=False ⋮---- def build server store: MemoryStore, , machine id: str None = None - FastMCP ⋮---- mid = machine id or resolve machine id backend: SyncBackend = GitSyncBackend store.memory dir, remote=resolve remote , machine id=mi… Evidence: `server/src/anamnesis/server.py`
- **Store** (source_file): MemoryType = str Scope = str ⋮---- FM DELIM = "---\n" ⋮---- def utcnow - str ⋮---- def fts query query: str - str ⋮---- tokens = re.findall r"\w+", query, flags=re.UNICODE ⋮---- def as id list value: object - list str ⋮---- """Normalize a front-matter supersedes value to a list of ids. Tolerates a legacy bare string pre-schema-2 markdown and notes synced from a machine on the old schema carried a scalar and a missing value, so reading old notes never breaks. """ ⋮---- @dataclass class Memory ⋮---- """A single memory note. Mirrors the markdown front-matter architecture §3 .""" ⋮---- id: str type: MemoryType title: str body: str project: str = "global" machine id: str = "unknown" scope: Scope… Evidence: `server/src/anamnesis/store.py`
- **1. commit local changes the markdown is the source of truth** (source_file): BRANCH = "main" ⋮---- class SyncError RuntimeError ⋮---- @dataclass class SyncResult ⋮---- pushed: bool pulled: int conflicted: bool head: str detail: str ⋮---- @dataclass class SyncState ⋮---- initialized: bool remote: str None ⋮---- dirty: bool ⋮---- class SyncBackend Protocol ⋮---- def init self - None: ... def sync self - SyncResult: ... def state self - SyncState: ... ⋮---- class GitSyncBackend ⋮---- def init self, repo dir: Path str, , remote: str None, machine id: str - None ⋮---- def git self, args: str, check: bool = True - subprocess.CompletedProcess str ⋮---- ident = { proc = subprocess.run ⋮---- def is git self - bool ⋮---- def has commits self - bool ⋮---- def remote has branch… Evidence: `server/src/anamnesis/sync.py`
- **Page** (source_file): import Link from 'next/link'; import { CopyCommand } from '@/components/copy-command'; import { repoUrl, docsRoute } from '@/lib/shared'; import { Hero } from '@/components/landing/hero'; import { Demo } from '@/components/landing/demo'; import { InstallPill } from '@/components/landing/install-pill'; import { FeatureBento } from '@/components/landing/feature-bento'; import { HowItWorks } from '@/components/landing/how-it-works'; import { TokenProof } from '@/components/landing/token-proof'; import { Comparison } from '@/components/landing/comparison'; import { SiteFooter } from '@/components/landing/site-footer'; import { Reveal } from '@/components/landing/reveal'; import { Icon, ICONS }… Evidence: `site/app/(home)/page.tsx`
- **Page** (source_file): import { getPageImage, getPageMarkdownUrl, source } from '@/lib/source'; import { DocsBody, DocsDescription, DocsPage, DocsTitle, MarkdownCopyButton, ViewOptionsPopover, } from 'fumadocs-ui/layouts/docs/page'; import { notFound } from 'next/navigation'; import { getMDXComponents } from '@/components/mdx'; import type { Metadata } from 'next'; import { createRelativeLink } from 'fumadocs-ui/mdx'; import { gitConfig } from '@/lib/shared'; ⋮---- githubUrl={ https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/content/docs/${page.path} } ⋮---- components= Evidence: `site/app/docs/[[...slug]]/page.tsx`
- **The five layers** (source_file): Anamnesis is a cross-machine, file-first memory layer for Claude Code. This page is the canonical description of how it fits together: the five layers, the data that flows between them, and how Claude Code itself drives the whole loop through the MCP server and lifecycle hooks. Every field name, default, and path below is taken straight from the source in server/src/anamnesis/ . Evidence: `site/content/docs/internals/architecture.mdx`
- **Test Capture** (source_file): def line obj ⋮---- def transcript tmp path, events ⋮---- p = tmp path / "transcript.jsonl" ⋮---- def test parse extracts prompt files outcome and context tmp path ⋮---- p = transcript s = parse transcript p ⋮---- def test parse tolerates garbage and block content tmp path ⋮---- ev = {"type": "user", "message": {"content": {"type": "text", "text": "block prompt"} }} p = tmp path / "t.jsonl" ⋮---- def test parse skips meta user events tmp path ⋮---- def test parse missing file returns empty session tmp path ⋮---- s = parse transcript tmp path / "nope.jsonl" ⋮---- def test heuristic summarizer builds title and body ⋮---- s = ParsedSession r = HeuristicSummarizer .summarize s ⋮---- def test heu… Evidence: `server/tests/test_capture.py`
- **Test Cli** (source_file): def porcelain memory dir - str ⋮---- def test resolve command defaults to serve ⋮---- def test resolve command parses subcommands ⋮---- def test read hook payload parses piped json monkeypatch ⋮---- stdin = io.StringIO json.dumps {"cwd": "/x", "transcript path": "/t.jsonl"} ⋮---- def test read hook payload empty when tty monkeypatch ⋮---- stdin = io.StringIO "" stdin.isatty = lambda: True type: ignore method-assign ⋮---- def test build parser has inject and capture options ⋮---- args = build parser .parse args "inject", "--project", "p", "--k", "3" ⋮---- args = build parser .parse args "capture", "--source", "precompact", "--no-sync" ⋮---- def test cmd inject prints project and global notes… Evidence: `server/tests/test_cli.py`
- **Test Config** (source_file): def test resolve home env override and expanduser monkeypatch ⋮---- def test resolve home default monkeypatch ⋮---- def test resolve machine id override and nonempty monkeypatch ⋮---- def test resolve remote none when unset monkeypatch, tmp path ⋮---- def test resolve remote falls back to store config monkeypatch, tmp path ⋮---- def test resolve remote env overrides store config monkeypatch, tmp path ⋮---- def test resolve machine id falls back to store config monkeypatch, tmp path ⋮---- def test store config tolerates missing and malformed monkeypatch, tmp path ⋮---- def test resolve claude home env override monkeypatch, tmp path ⋮---- def test resolve claude home default monkeypatch ⋮----… Evidence: `server/tests/test_config.py`
- **Test Inject** (source_file): def git cwd, args ⋮---- def test normalize remote scp and https and path ⋮---- def test resolve project key prefers git remote tmp path ⋮---- def test resolve project key falls back to repo dirname tmp path ⋮---- repo = tmp path / "MyRepo" ⋮---- def test resolve project key non git uses cwd basename tmp path ⋮---- d = tmp path / "PlainDir" ⋮---- def write store, kw ⋮---- def test select inject always includes global tmp path ⋮---- store = MemoryStore root=tmp path ⋮---- titles = {m.title for m in select inject store, project="unrelated", k=8 } ⋮---- def test select inject scopes durable and reserves recent episodic tmp path ⋮---- e1 = write store, type="episodic", title="old-session", body=… Evidence: `server/tests/test_inject.py`
- **Test Llm Summarizer** (source_file): def client returning text ⋮---- def call system, user ⋮---- def raw with prompt text="Implement the reflection summarizer" ⋮---- def test window truncates long text ⋮---- out = window "a" 100, max chars=40 ⋮---- def test window keeps short text ⋮---- def test parse summary plain json ⋮---- def test parse summary fenced json ⋮---- def test parse summary rejects nonjson ⋮---- def test truncate tool results caps blob ⋮---- raw = json.dumps out = truncate tool results raw, cap=100 ⋮---- def test summarize happy path records prov model ⋮---- summ = LLMSummarizer session = ParsedSession first prompt="do x", last outcome="done", raw= raw with prompt result = summ.summarize session ⋮---- def test s… Evidence: `server/tests/test_llm_summarizer.py`
- **Test Migrate** (source_file): def note project="old", updated="2026-01-01T00:00:00+00:00", body="hello body" ⋮---- def test rekey changes only the project line ⋮---- text = note project="old-key" out = rekey front matter text, "github.com/oscardvs/anamnesis" ⋮---- diffs = sum 1 for a, b in zip text.splitlines , out.splitlines , strict=True if a != b ⋮---- def test rekey is idempotent when already target ⋮---- text = note project="new-key" ⋮---- def test rekey ignores a project like line in the body ⋮---- text = note project="old", body="project: not-frontmatter\nmore text" out = rekey front matter text, "new" ⋮---- def test rekey raises without front matter ⋮---- def test rekey raises without project field ⋮---- text =… Evidence: `server/tests/test_migrate.py`
- **Test Onboard** (source_file): def test detect prefers explicit command override ⋮---- base = detect command override command="/opt/anamnesis serve-wrap", which=lambda c: None ⋮---- def test detect uv project override builds uv run ⋮---- base = detect command ⋮---- def test detect uses installed anamnesis on path ⋮---- def test detect falls back to uv run project when not installed ⋮---- base = detect command which=lambda c: "/usr/bin/uv" if c == "uv" else None ⋮---- def test detect uv project override uses bare uv when not on path ⋮---- base = detect command override uv project="/home/x/anamnesis/server", which=lambda c: None ⋮---- def test build env machine id always present ⋮---- env = build env machine id="box", remo… Evidence: `server/tests/test_onboard.py`
- **Test Reflect** (source_file): def client returning text ⋮---- def call system, user ⋮---- def test parse reflection reads array ⋮---- notes = parse reflection ' {"type": "semantic", "title": "T", "body": "B"} ' ⋮---- def test parse reflection reads fenced array ⋮---- notes = parse reflection ' ' ⋮---- def test parse reflection empty array ⋮---- def test parse reflection rejects bad type ⋮---- def test parse reflection rejects missing body ⋮---- def test parse reflection rejects nonarray ⋮---- def test select unreflected excludes reflected tmp path ⋮---- store = MemoryStore root=tmp path a = store.write type="episodic", title="a", body="x", project="p", tags= "session" ⋮---- out = select unreflected store, "p" ⋮---- def… Evidence: `server/tests/test_reflect.py`
- **Test Server** (source_file): def test resolve home uses env override tmp path, monkeypatch ⋮---- def test resolve home expands user monkeypatch ⋮---- def test resolve home defaults to dot anamnesis monkeypatch ⋮---- def test resolve machine id uses env override monkeypatch ⋮---- def test resolve machine id falls back to nonempty monkeypatch ⋮---- def test write memory persists and returns metadata tmp path ⋮---- store = MemoryStore root=tmp path out = write memory ⋮---- def test search memories returns body and metadata tmp path ⋮---- hits = search memories store, query="busy timeout" ⋮---- def test search memories is scoped by project tmp path ⋮---- hits = search memories store, query="zeta", project="alpha" ⋮---- def… Evidence: `server/tests/test_server.py`
- **Test Store** (source_file): def test write then get roundtrips all fields tmp path ⋮---- store = MemoryStore root=tmp path ⋮---- mem = store.write ⋮---- got = store.get mem.id ⋮---- def test search finds by keyword in title or body tmp path ⋮---- hit = store.write miss = store.write ⋮---- ids = m.id for m in store.search "busy timeout" ⋮---- def test search recalls on partial overlap not only full match tmp path ⋮---- ids = ⋮---- def test search is scoped by project tmp path ⋮---- alpha = store.write beta = store.write ⋮---- ids = m.id for m in store.search "zeta", project="alpha" ⋮---- def test search tolerates fts special characters tmp path ⋮---- def test list returns all memories sorted by recency tmp path ⋮---- a… Evidence: `server/tests/test_store.py`
- **Test Sync** (source_file): def bare remote path: Path - str ⋮---- def backend store: MemoryStore, remote: str, machine id: str - GitSyncBackend ⋮---- backend = GitSyncBackend store.memory dir, remote=remote, machine id=machine id ⋮---- def test round trip write on A appears on B tmp path ⋮---- remote = bare remote tmp path / "remote.git" ⋮---- store a = MemoryStore root=tmp path / "A" backend a = backend store a, remote, "desktop" note = store a.write res a = backend a.sync ⋮---- store b = MemoryStore root=tmp path / "B" backend b = backend store b, remote, "laptop" ⋮---- def test index db is never tracked tmp path ⋮---- tracked = subprocess.run ⋮---- def test conflicting edit is surfaced not silently dropped tmp pat… Evidence: `server/tests/test_sync.py`
- **Demo recording runbook synthetic, no personal info** (documentation): Demo recording runbook synthetic, no personal info Evidence: `bench/cross-machine-tokens/RUNBOOK.md`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "ES2017", "lib": "dom", "dom.iterable", "esnext" , "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "react-jsx", "incremental": true, "plugins": { "name": "next" } , "paths": { "@/ ": "./src/ " } }, "include": "next-env.d.ts", " / .ts", " / .tsx", ".next/types/ / .ts", ".next/dev/types/ / .ts", " / .mts" , "exclude": "node modules", "electron", "dist-npm" } Evidence: `dashboard/tsconfig.json`
- **Server** (structured_config): { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.oscardvs/anamnesis", "title": "Anamnesis", "description": "Cross-machine, file-first memory for Claude Code: markdown + SQLite FTS5, synced with git", "repository": { "url": "https://github.com/oscardvs/anamnesis", "source": "github" }, "version": "0.1.3", "websiteUrl": "https://oscardvs.github.io/anamnesis/", "packages": { "registryType": "pypi", "registryBaseUrl": "https://pypi.org", "identifier": "anamnesis-memory", "version": "0.1.3", "runtimeHint": "uvx", "transport": { "type": "stdio" }, "packageArguments": { "type": "positional", "value": "serve" } } } Evidence: `server.json`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "ESNext", "lib": "dom", "dom.iterable", "esnext" , "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "react-jsx", "incremental": true, "paths": { "@/ ": "./ " , "collections/ ": "./.source/ " }, "plugins": { "name": "next" } }, "include": "next-env.d.ts", " / .ts", " / .tsx", ".next/types/ / .ts", ".next/dev/types/ / .ts" , "exclude": "node modules" } Evidence: `site/tsconfig.json`
- **Desktop Events** (structured_config): { "t": 1.0, "text": "desktop:~/quotes-api$ " }, { "t": 1.5, "text": "c" }, { "t": 1.572, "text": "l" }, { "t": 1.643, "text": "a" }, { "t": 1.715, "text": "u" }, { "t": 1.787, "text": "d" }, { "t": 1.858, "text": "e" }, { "t": 1.93, "text": " " }, { "t": 2.001, "text": "-" }, { "t": 2.073, "text": "p" }, { "t": 2.144, "text": " " }, { "t": 2.216, "text": "\"" }, { "t": 2.288, "text": "R" }, { "t": 2.359, "text": "e" }, { "t": 2.431, "text": "a" }, { "t": 2.502, "text": "d" }, { "t": 2.574, "text": " " }, { "t": 2.645, "text": "d" }, { "t": 2.717, "text": "o" }, { "t": 2.789, "text": "c" }, { "t": 2.86, "text": "s" }, { "t": 2.932, "text": "/" }, { "t": 3.003, "text": "a" }, { "t": 3.075, "t… Evidence: `bench/cross-machine-tokens/demo/desktop_events.json`
- The remaining 19 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: `CLAUDE.md`, `README.md`, `dashboard/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: `CLAUDE.md`, `README.md`, `dashboard/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 & System Architecture**: importance `high`
  - source_paths: README.md, CLAUDE.md, server/README.md, site/content/docs/internals/architecture.mdx
- **Backend Server, MCP Tools & AI Integration**: importance `high`
  - source_paths: server/src/anamnesis/cli.py, server/src/anamnesis/server.py, server/src/anamnesis/capture.py, server/src/anamnesis/inject.py, server/src/anamnesis/llm_summarizer.py
- **Data Layer & Dashboard Frontend**: importance `high`
  - source_paths: server/src/anamnesis/store.py, server/src/anamnesis/migrate.py, dashboard/src/lib/store.ts, dashboard/src/lib/db.ts, dashboard/src/lib/git.ts
- **Cross-Machine Sync, Hooks, Reflection Workflows & Customization**: importance `high`
  - source_paths: server/src/anamnesis/onboard.py, server/src/anamnesis/sync.py, server/src/anamnesis/config.py, examples/hooks.settings.json, .mcp.json

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `a9690e8cdb605abed4ce2361348ff03503602677`
- inspected_files: `README.md`, `examples/hooks.settings.json`

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