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

## Claim Consumption Rules

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

## Who It Fits Best

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

## What It Can Do

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

## How to Start

- `npm install -g termyte` Evidence: `README.md` Claim: `clm_0003` 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**: Whether this workflow fits your way of working cannot be trusted directly.
- **Continuing will touch**: Host behavior change, Command execution, 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

- **Whether this workflow fits your way of working cannot be trusted directly.** (unverified): Workflow-style Skills can strongly constrain AI behavior; they can improve discipline but may also slow your current task pace.
- **That it will not conflict with your existing Claude/Cursor/Codex rules cannot be trusted directly.** (inferred): A dev-workflow Skill changes default behaviors like clarifying, planning, testing, and verifying, so it must be tried in a temporary host.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.

### What Continuing Will Touch

- **Host behavior change**: The default development rhythm of clarifying, planning, TDD, verifying, and wrapping up. Why: This kind of Skill draws both its value and its risk from strongly constraining the workflow; confirm first that you are willing to have it change how you work.
- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **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`, `docs/getting-started.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**: Feel how it changes the AI's development rhythm first, then decide whether to let it into a real host. (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.)
- **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.
- **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_0004` 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_0005` 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: 195
- Important-file coverage: 40/195
- Evidence index entries: 80
- Role / Skill entries: 10

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

- **Termyte Public Docs** (project_doc): Termyte is a local execution and continuity layer for coding agents. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/README.md`
- **Termyte** (project_doc): Termyte helps coding agents remember what happened in a repository. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **Getting Started** (project_doc): Install Termyte and connect Claude Code, Codex, or OpenCode: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/getting-started.md`
- **How It Works** (project_doc): Termyte follows a simple runtime path: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/how-it-works.md`
- **Termyte Context Engine v0.1 Implementation Plan** (project_doc): Termyte Context Engine v0.1 Implementation Plan Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/superpowers/plans/2026-07-14-termyte-context-engine-v0.1-implementation-plan.md`
- **Contributing** (project_doc): Thanks for helping improve Termyte. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CONTRIBUTING.md`
- **Termyte Overview** (project_doc): Termyte is a local execution, task-state, and memory layer for coding agents. It captures agent execution as an idempotent event ledger, maintains evidence-backed task state, derives reusable memories, and exposes continuity through CLI, MCP, context injection, handoffs, and a local diagnostics viewer. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `OVERVIEW.md`
- **Comparisons** (project_doc): This page compares Termyte with mem0, agentmemory, and claude-mem using the code and docs in the local repositories. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/comparisons.md`
- **Limitations** (project_doc): Termyte works, but it is not finished. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/limitations.md`
- **Termyte Context Engine v0.1 Trial Protocol** (project_doc): Termyte Context Engine v0.1 Trial Protocol Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/evals/context-v0.1-trial-protocol.md`

## Evidence Index

- Indexed 80 evidence entries.

- **Termyte Public Docs** (documentation): Termyte is a local execution and continuity layer for coding agents. Evidence: `docs/README.md`
- **Termyte** (documentation): Termyte helps coding agents remember what happened in a repository. Evidence: `README.md`
- **Getting Started** (documentation): Install Termyte and connect Claude Code, Codex, or OpenCode: Evidence: `docs/getting-started.md`
- **How It Works** (documentation): Termyte follows a simple runtime path: Evidence: `docs/how-it-works.md`
- **Termyte Context Engine v0.1 Implementation Plan** (documentation): Termyte Context Engine v0.1 Implementation Plan Evidence: `docs/superpowers/plans/2026-07-14-termyte-context-engine-v0.1-implementation-plan.md`
- **Package** (package_manifest): { "name": "termyte", "version": "1.0.5", "description": "Local-first context engine for coding agents", "repository": "https://github.com/termyte-labs/termyte", "type": "module", "license": "MIT", "engines": { "node": " =20" }, "main": "dist/index.js", "types": "dist/index.d.ts", "bin": { "termyte": "dist/cli/index.js", "termyte-hook": "dist/cli/hook.js", "termyte-worker": "dist/cli/worker.js" }, "files": "dist", "test/fixtures/regression-corpus/cases.json", "README.md", "LICENSE" , "scripts": { "build": "node -e \"require 'node:fs' .rmSync 'dist',{recursive:true,force:true} \" && tsc -p tsconfig.json && vite build", "typecheck": "tsc --noEmit -p tsconfig.json", "test": "vitest run --exclud… Evidence: `package.json`
- **Contributing** (documentation): Thanks for helping improve Termyte. Evidence: `CONTRIBUTING.md`
- **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`
- **Termyte Overview** (documentation): Termyte is a local execution, task-state, and memory layer for coding agents. It captures agent execution as an idempotent event ledger, maintains evidence-backed task state, derives reusable memories, and exposes continuity through CLI, MCP, context injection, handoffs, and a local diagnostics viewer. Evidence: `OVERVIEW.md`
- **Comparisons** (documentation): This page compares Termyte with mem0, agentmemory, and claude-mem using the code and docs in the local repositories. Evidence: `docs/comparisons.md`
- **Limitations** (documentation): Termyte works, but it is not finished. Evidence: `docs/limitations.md`
- **Termyte Context Engine v0.1 Trial Protocol** (documentation): Termyte Context Engine v0.1 Trial Protocol Evidence: `docs/evals/context-v0.1-trial-protocol.md`
- **Index** (source_file): import { Store } from "./storage/store.js"; import { Observer } from "./observer/pipeline.js"; import { type OpenAIProviderConfig } from "./observer/openai-provider.js"; import { type LocalModelId } from "./retrieval/local-embeddings.js"; import { NoOpEmbeddingsProvider } from "./retrieval/embeddings.js"; import { FTSSearch } from "./retrieval/fts.js"; import { VectorSearch } from "./retrieval/vector.js"; import { HybridSearch } from "./retrieval/hybrid.js"; import { ContextBuilder } from "./context/builder.js"; import { HookRunner } from "./hooks/runner.js"; import { createEmbeddingsProvider, createLLMProvider } from "./runtime/providers.js"; ⋮---- export interface TermyteOptions { dbPath?… Evidence: `src/index.ts`
- **Vite.Config** (source_file): import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { resolve } from "node:path"; Evidence: `vite.config.ts`
- **Vitest.Config** (source_file): import { defineConfig } from "vitest/config"; Evidence: `vitest.config.ts`
- **Termyte Fts** (source_file): import { Store } from "../../storage/store.js"; import { FTSSearch } from "../../retrieval/fts.js"; import type { BenchmarkDocument, BenchmarkSearchResult, MemoryBenchmarkAdapter } from "../types.js"; ⋮---- export class TermyteFtsBenchmarkAdapter implements MemoryBenchmarkAdapter ⋮---- async reset : Promise ⋮---- async ingest documents: readonly BenchmarkDocument : Promise ⋮---- async search query: string, limit: number, options: ⋮---- async stats : Promise ⋮---- async close : Promise Evidence: `src/benchmark/adapters/termyte-fts.ts`
- **Termyte Pipeline** (source_file): import { FTSSearch } from "../../retrieval/fts.js"; import { FakeLLMProvider } from "../../observer/fake-provider.js"; import { MemoryPipeline } from "../../pipeline/memory-pipeline.js"; import { Store } from "../../storage/store.js"; import type { BenchmarkDocument, BenchmarkSearchResult, MemoryBenchmarkAdapter } from "../types.js"; ⋮---- export class TermytePipelineBenchmarkAdapter implements MemoryBenchmarkAdapter ⋮---- async reset : Promise ⋮---- async ingest documents: readonly BenchmarkDocument : Promise ⋮---- async search query: string, limit: number, options: ⋮---- async stats : Promise ⋮---- async close : Promise Evidence: `src/benchmark/adapters/termyte-pipeline.ts`
- **Types** (source_file): export type BenchmarkSuite = "memoryagent" "raw-session" "scale" "custom"; export type BenchmarkTrack = "retrieval" "pipeline"; ⋮---- export interface BenchmarkDocument { id: string; content: string; title?: string; files?: string ; metadata?: Record ; scope?: string; } ⋮---- export interface BenchmarkQuery { id: string; query: string; relevantDocumentIds: string ; harmfulDocumentIds?: string ; scope?: string; } ⋮---- export interface BenchmarkDataset { name: string; version: string; suite: BenchmarkSuite; documents: BenchmarkDocument ; queries: BenchmarkQuery ; } ⋮---- export interface BenchmarkSearchResult { documentId: string; score: number; } ⋮---- export interface MemoryBenchmarkAdapte… Evidence: `src/benchmark/types.ts`
- **Claude Code** (source_file): import type { PlatformAdapter, NormalizedEvent, HookResult } from "./adapter.js"; import type { EventType } from "../core/types.js"; import { isObject, pickString } from "./util.js"; import { AdapterRejectedInput, isValidCwd } from "./errors.js"; ⋮---- const pickAgentField = v: unknown : string undefined ⋮---- export class ClaudeCodeAdapter implements PlatformAdapter ⋮---- normalize raw: unknown : NormalizedEvent null ⋮---- formatOutput result: HookResult : unknown Evidence: `src/capture/claude-code.ts`
- **Codex** (source_file): import type { PlatformAdapter, NormalizedEvent, HookResult } from "./adapter.js"; import type { EventType } from "../core/types.js"; import { isObject, pickString } from "./util.js"; import { extractCodexFilePaths } from "./codex-file-context.js"; import { AdapterRejectedInput, isValidCwd } from "./errors.js"; ⋮---- export class CodexAdapter implements PlatformAdapter ⋮---- normalize raw: unknown : NormalizedEvent null ⋮---- formatOutput result: HookResult : unknown Evidence: `src/capture/codex.ts`
- **Index** (source_file): import type { Platform } from "../core/types.js"; import type { PlatformAdapter } from "./adapter.js"; import { ClaudeCodeAdapter } from "./claude-code.js"; import { CodexAdapter } from "./codex.js"; import { OpenCodeAdapter } from "./opencode.js"; import { RawAdapter } from "./raw.js"; ⋮---- export function adapterFor platform: Platform : PlatformAdapter Evidence: `src/capture/index.ts`
- **Ingest** (source_file): import type { Store } from "../storage/store.js"; import type { Trace } from "../core/types.js"; import type { NormalizedEvent } from "./adapter.js"; import { extractFilesFromEvent } from "./files.js"; ⋮---- export class Ingestor ⋮---- constructor private store: Store ⋮---- ingest event: NormalizedEvent : Evidence: `src/capture/ingest.ts`
- **Opencode** (source_file): import type { EventType } from "../core/types.js"; import type { HookResult, NormalizedEvent, PlatformAdapter } from "./adapter.js"; import { AdapterRejectedInput, isValidCwd } from "./errors.js"; import { isObject, pickString } from "./util.js"; ⋮---- export class OpenCodeAdapter implements PlatformAdapter ⋮---- normalize raw: unknown : NormalizedEvent null ⋮---- formatOutput result: HookResult : unknown Evidence: `src/capture/opencode.ts`
- **Raw** (source_file): import type { PlatformAdapter, NormalizedEvent, HookResult } from "./adapter.js"; import { isObject, pickString } from "./util.js"; import { AdapterRejectedInput, isValidCwd } from "./errors.js"; import { passthroughFormatOutput } from "./adapter.js"; ⋮---- export class RawAdapter implements PlatformAdapter ⋮---- normalize raw: unknown : NormalizedEvent null ⋮---- formatOutput result: HookResult : unknown Evidence: `src/capture/raw.ts`
- **Config** (source_file): import type { OpenAIProviderConfig } from "../observer/openai-provider.js"; import type { LocalModelId } from "../retrieval/local-embeddings.js"; import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { homedir } from "node:os"; ⋮---- export type SynthesisMode = "agent" "api" "capture-only"; export interface UserConfig { version: 1; dbPath: string; agents: Array ; synthesis: { mode: SynthesisMode; provider?: "claude-code" "codex" "opencode" }; llm?: { baseUrl?: string; model?: string }; } ⋮---- export interface TermyteConfig { dbPath: string; llm: OpenAIProviderConfig; embeddings: { model: LocalModelId }; synthesis: Us… Evidence: `src/cli/config.ts`
- **Doctor** (source_file): import { existsSync, readFileSync } from "node:fs"; import { homedir } from "node:os"; import { join } from "node:path"; import { pathToFileURL } from "node:url"; import { loadConfig } from "./config.js"; import { isTermyteHookCommand } from "../integrations/installers/managed-hooks.js"; import { Store } from "../storage/store.js"; import { getTermyteHookPath } from "../integrations/install-paths.js"; ⋮---- type IntegrationStatus = { name: string; expectedPaths: string ; installed: boolean; evidence?: string; expectedHooks: string ; installedHooks: string ; missingHooks: string ; }; ⋮---- async function main : Promise ⋮---- export function inspectIntegrations : IntegrationStatus ⋮---- funct… Evidence: `src/cli/doctor.ts`
- **Handler Types** (source_file): import type { HookResult, NormalizedEvent } from "../capture/adapter.js"; ⋮---- export interface HandlerInput { event: NormalizedEvent; raw: unknown; } ⋮---- export interface HandlerOutput { handled: boolean; result: HookResult; } ⋮---- export type EventHandlerName = "context" "session-init" "observation" "summarize" "file-edit" "file-context"; ⋮---- export type EventHandler = input: HandlerInput = Promise ; Evidence: `src/cli/handler-types.ts`
- **Index** (source_file): import type { EventHandler, EventHandlerName } from "../handler-types.js"; import { makeContextHandler } from "./context.js"; import { makeSessionInitHandler } from "./session-init.js"; import { makeObservationHandler } from "./observation.js"; import { makeSummarizeHandler } from "./summarize.js"; import { makeFileEditHandler } from "./file-edit.js"; import { makeFileContextHandler } from "./file-context.js"; import type { Store } from "../../storage/store.js"; import type { HybridSearch } from "../../retrieval/hybrid.js"; import type { ContextBuilder } from "../../context/builder.js"; import type { Observer } from "../../observer/pipeline.js"; ⋮---- export interface HandlerDeps { store: S… Evidence: `src/cli/handlers/index.ts`
- **Session Init** (source_file): import type { EventHandler } from "../handler-types.js"; import type { Store } from "../../storage/store.js"; import type { HybridSearch } from "../../retrieval/hybrid.js"; import type { ContextBuilder } from "../../context/builder.js"; import { makeContextHandler } from "./context.js"; ⋮---- export function makeSessionInitHandler deps: Evidence: `src/cli/handlers/session-init.ts`
- **Hook** (source_file): import { loadConfig } from "./config.js"; import { Store } from "../storage/store.js"; import { Observer } from "../observer/pipeline.js"; import { HookRunner } from "../hooks/runner.js"; import { FTSSearch } from "../retrieval/fts.js"; import { VectorSearch } from "../retrieval/vector.js"; import { HybridSearch } from "../retrieval/hybrid.js"; import { ContextBuilder } from "../context/builder.js"; import { adapterFor } from "../capture/index.js"; import type { Platform } from "../core/types.js"; import { getHandler, type HandlerInput } from "./handlers/index.js"; import { pathToFileURL } from "node:url"; import { createHookSupervisor, type WorkerSupervisor } from "../pipeline/worker-super… Evidence: `src/cli/hook.ts`
- **Index** (source_file): function parseOptions argv: string : Record ⋮---- async function main : Promise Evidence: `src/cli/index.ts`
- **Init** (source_file): import { checkbox, confirm, select } from "@inquirer/prompts"; import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { homedir } from "node:os"; import { Store } from "../storage/store.js"; import { installFor } from "../integrations/installers/index.js"; import { discoverAgentCapabilities, capabilityLabel, type SupportedAgent } from "../runtime/capabilities.js"; import { removeTermyteHookEntries } from "../integrations/installers/managed-hooks.js"; import { openCodeConfigDir, uninstallOpenCode } from "../integrations/installers/opencode.js"; import { defaultUserConfig, saveUserConfig, userConfigPath, type… Evidence: `src/cli/init.ts`
- **Viewer** (source_file): import { loadConfig } from "./config.js"; import { startViewerServer } from "../viewer/server.js"; import { spawn } from "node:child process"; ⋮---- export interface ViewerCommandOptions { host?: string; port?: number; open?: boolean; } ⋮---- export async function viewerCommand options: ViewerCommandOptions = ⋮---- function openBrowser url: string : void Evidence: `src/cli/viewer.ts`
- **Worker** (source_file): import { loadConfig } from "./config.js"; import { Store } from "../storage/store.js"; import { MemoryPipeline } from "../pipeline/memory-pipeline.js"; import { acquireWorkerLock, releaseWorkerLock } from "../pipeline/worker-supervisor.js"; import { createEmbeddingsProvider, createLLMProvider } from "../runtime/providers.js"; ⋮---- async function main : Promise ⋮---- interface WorkerArgs { once: boolean; untilIdle: boolean; json: boolean; supervised: boolean; maxJobs: number; batchSize: number; workerId: string; } ⋮---- function parseArgs argv: string : WorkerArgs ⋮---- function readStringArg argv: string , name: string, fallback: string : string ⋮---- function readNumberArg argv: string ,… Evidence: `src/cli/worker.ts`
- **Types** (source_file): export type EventType = "session init" "user prompt" "tool use" "assistant message" "compaction" "session end"; ⋮---- export type Platform = "claude-code" "codex" "opencode" "raw"; ⋮---- export type MemoryType = "bugfix" "convention" "warning" "procedure" "fact"; ⋮---- export type ObservationType = MemoryType; ⋮---- export type MemoryState = "active" "stale" "superseded" "conflicted" "deleted"; ⋮---- export type MemoryEdgeType = "supports" "contradicts" "supersedes" "duplicates" "derived from" "related to"; ⋮---- export type MemoryFeedbackEvent = "shown" "used" "helpful" "harmful" "ignored" "downranked" "corrected"; ⋮---- export interface CodeApplicabilityEvidence { files: string ; commands… Evidence: `src/core/types.ts`
- **Corpus** (source_file): import { existsSync, readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; import type { MemoryType, Trace } from "../core/types.js"; ⋮---- export interface EvalMemoryFixture { id: string; type: MemoryType; title: string; description: string; filesRead?: string ; filesModified?: string ; keywords?: string ; } ⋮---- export interface EvalQueryFixture { query: string; expectedDocIds: string ; expectedKeywords: string ; } ⋮---- export interface EvalCorpusCase { id: string; trace: Partial & { event type?: Trace "event type" ; user prompt?: string null; }; expectedObservations: Array ; expectedMemories: EvalMemoryFixture ; queries: Eva… Evidence: `src/eval/corpus.ts`
- **Fault Injection** (source_file): import type { DB } from "../storage/connection.js"; ⋮---- export type FaultPoint = "after observation insert" "before observation embedding" "after observation embedding" "before memory insert" "after memory insert" "before memory embedding" "after memory embedding"; ⋮---- export class InjectedFaultError extends Error ⋮---- constructor readonly point: FaultPoint, message = Injected fault at $ ⋮---- export class FaultInjector ⋮---- failOnce point: FaultPoint : void ⋮---- alwaysFail point: FaultPoint : void ⋮---- clear point?: FaultPoint : void ⋮---- check point: FaultPoint : void ⋮---- export interface DurabilityInvariantReport { passed: boolean; violations: string ; } ⋮---- export function… Evidence: `src/eval/fault-injection.ts`
- **Harness** (source_file): import { Store } from "../storage/store.js"; import { openDatabase } from "../storage/connection.js"; import { JobQueue } from "../pipeline/job-queue.js"; import { MemoryPipeline } from "../pipeline/memory-pipeline.js"; import { RetryableJobError } from "../pipeline/errors.js"; import { FTSSearch } from "../retrieval/fts.js"; import { VectorSearch } from "../retrieval/vector.js"; import { HybridSearch } from "../retrieval/hybrid.js"; import type { EmbeddingsProvider } from "../retrieval/embeddings.js"; import { memoryDecayScore } from "../lifecycle/decay.js"; import { applyFeedback } from "../lifecycle/feedback.js"; import { canonicalMemoryKey, shouldDeduplicate } from "../lifecycle/dedupe.… Evidence: `src/eval/harness.ts`
- **Context Attribution** (source_file): import type { ContextEffectVerdict, Evidence, MemoryFeedbackEvent } from "../core/types.js"; import type { Store } from "../storage/store.js"; ⋮---- export function attributeEpisodeContext store: Store, episodeId: string, nowMs = Date.now : number ⋮---- function decide input: { feedback?: MemoryFeedbackEvent; succeeded: boolean; taskMismatch: boolean; hasApplicability: boolean; hasOverlap: boolean; successfulExecution: boolean; } : ⋮---- function evidenceFiles evidence: Evidence : string ⋮---- function normalize value: string : string Evidence: `src/experience/context-attribution.ts`
- **Git State** (source_file): import { execFileSync } from "node:child process"; import { isAbsolute, relative, resolve, sep } from "node:path"; ⋮---- export interface GitDiffState { head: string null; changedPaths: string ; stagedPaths: string ; unstagedPaths: string ; untrackedPaths: string ; stagedStat: string null; unstagedStat: string null; } ⋮---- export interface RepositoryState extends GitDiffState { branch: string null; conflicts: string ; } ⋮---- export interface GitStateOptions { timeoutMs?: number; } ⋮---- export function readGitHead workspaceRoot: string, options: GitStateOptions = ⋮---- export function readGitDiffState workspaceRoot: string, options: GitStateOptions = ⋮---- export function readRepositorySt… Evidence: `src/experience/git-state.ts`
- **Recorder** (source_file): import type { NormalizedEvent } from "../capture/adapter.js"; import type { Session, Trace, EvidenceKind } from "../core/types.js"; import type { Store } from "../storage/store.js"; import { readGitDiffState, readGitHead } from "./git-state.js"; ⋮---- export class ExperienceRecorder ⋮---- constructor private readonly store: Store ⋮---- record event: NormalizedEvent, trace: Trace, session: Session : string null ⋮---- private startsNewEpisode episodeId: string, prompt: string null : boolean ⋮---- private finalizeEpisode sessionId: string, status: "succeeded" "failed" "unknown", nowMs: number : void ⋮---- interface EvidenceInput { kind: EvidenceKind; content: string; exitCode: number null; met… Evidence: `src/experience/recorder.ts`
- **Memory Vec Index** (source_file): import { createRequire } from "node:module"; import type { DB } from "../storage/connection.js"; ⋮---- export interface MemoryVectorHit { memoryId: number; distance: number; score: number; } ⋮---- export class MemoryVecIndex ⋮---- constructor ⋮---- isAvailable : boolean tableName : string ⋮---- ensureSchema : boolean ⋮---- const sqliteVec = require "sqlite-vec" as ⋮---- upsert memoryId: number, embedding: Float32Array : void ⋮---- search query: Float32Array, limit: number : MemoryVectorHit ⋮---- private assertDimensions vector: Float32Array : void ⋮---- function vectorToBuffer vector: Float32Array : Buffer Evidence: `src/indexing/memory-vec-index.ts`
- **Sqlite Vec Index** (source_file): import { createHash } from "node:crypto"; import { createRequire } from "node:module"; import type { DB } from "../storage/connection.js"; ⋮---- export interface VectorHit { docId: string; distance: number; score: number; } ⋮---- export interface SqliteVecIndexOptions { dimensions: number; model: string; forceUnavailable?: boolean; } ⋮---- export class SqliteVecIndex ⋮---- constructor ⋮---- isAvailable : boolean ⋮---- tableName : string ⋮---- ensureSchema : boolean ⋮---- upsert docId: string, vector: Float32Array : void ⋮---- search vector: Float32Array, limit: number : VectorHit ⋮---- private loadExtension : void ⋮---- const sqliteVec = require "sqlite-vec" as ⋮---- private assertAvailable… Evidence: `src/indexing/sqlite-vec-index.ts`
- **Install Paths** (source_file): import { existsSync } from "node:fs"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; ⋮---- function firstExisting candidates: string : string null ⋮---- function resolveWithEnv envValue: string undefined, candidates: string : string null ⋮---- export function getTermyteHookPath : string null ⋮---- export function getTermyteMcpPath : string null ⋮---- export function getNodeAbsolutePath : string ⋮---- export function jsonEscapePath p: string : string ⋮---- / Replace a path's separators so it survives an OS shell. / export function shellEscapePath p: string : string ⋮---- / Walk up from start looking for the termyte project root which contains pa… Evidence: `src/integrations/install-paths.ts`
- **Claude Code** (source_file): import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs"; import { dirname, join } from "node:path"; import { homedir } from "node:os"; import { getTermyteHookPath, shellEscapePath } from "../install-paths.js"; import { isTermyteHookCommand } from "./managed-hooks.js"; ⋮---- interface ClaudeHookEntry { type: "command"; command: string; timeout?: number; } ⋮---- interface ClaudeHooksGroup { matcher?: string; hooks: ClaudeHookEntry ; } ⋮---- interface ClaudeSettings { hooks?: Record ; k: string : unknown; } ⋮---- export interface ClaudeInstallOptions { target: "user" "project"; homeDir?: string; } ⋮---- export function installClaudeCodeHooks opts: ClaudeInstallOptions : nu… Evidence: `src/integrations/installers/claude-code.ts`
- **Codex** (source_file): import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs"; import { dirname, join } from "node:path"; import { homedir } from "node:os"; import { getTermyteHookPath, shellEscapePath } from "../install-paths.js"; import { isTermyteHookCommand } from "./managed-hooks.js"; ⋮---- interface CodexHookEntry { type: "command"; command: string; timeout?: number; } interface CodexHookGroup { matcher?: string; hooks: CodexHookEntry ; } interface CodexHooksConfig { hooks?: Record ; k: string : unknown; } ⋮---- export interface CodexInstallOptions { target: "user" "project"; homeDir?: string; } ⋮---- export function installCodexHooks opts: CodexInstallOptions : number ⋮---- function s… Evidence: `src/integrations/installers/codex.ts`
- **Index** (source_file): import { installClaudeCodeHooks } from "./claude-code.js"; import { installCodexHooks } from "./codex.js"; import { installOpenCode } from "./opencode.js"; ⋮---- export type SupportedPlatform = "claude-code" "codex" "opencode"; ⋮---- export function listSupportedPlatforms : string ⋮---- export interface InstallOptions { target?: "user" "project"; homeDir?: string; } ⋮---- export function installFor platform: string, opts: InstallOptions = Evidence: `src/integrations/installers/index.ts`
- **Managed Hooks** (source_file): import { existsSync, readFileSync, writeFileSync } from "node:fs"; ⋮---- export function isTermyteHookCommand command: unknown : boolean ⋮---- export function removeTermyteHookEntries path: string : boolean Evidence: `src/integrations/installers/managed-hooks.ts`
- **Opencode** (source_file): import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; import { join } from "node:path"; import { homedir } from "node:os"; ⋮---- type OpenCodeConfig = { plugin?: unknown; key: string : unknown }; ⋮---- export function openCodeConfigDir homeDir = homedir : string ⋮---- export function openCodePluginSource hookCommand = "termyte-hook" : string ⋮---- export function installOpenCode opts: ⋮---- export function uninstallOpenCode homeDir?: string : boolean Evidence: `src/integrations/installers/opencode.ts`
- **Decay** (source_file): import type { MemoryState, MemoryType } from "../core/types.js"; ⋮---- export interface MemoryLifecycleRow { id: number; type: MemoryType string; state: MemoryState; importance: number; confidence: number; usage count: number; created at: number; updated at?: number null; last accessed at?: number null; } ⋮---- export function memoryDecayScore memory: MemoryLifecycleRow, nowMs: number : number ⋮---- export function nextMemoryStateAfterDecay memory: MemoryLifecycleRow, decayedScore: number, : MemoryState ⋮---- export function clamp01 value: number : number Evidence: `src/lifecycle/decay.ts`
- **Dedupe** (source_file): import { createHash } from "node:crypto"; import type { MemoryType } from "../core/types.js"; ⋮---- export interface CanonicalMemoryInput { type: MemoryType string; content: string; files: string ; } ⋮---- export interface DedupeComparable { id: number; type: MemoryType string; canonical key: string null; files read: string ; files modified: string ; embedding: Float32Array null; } ⋮---- export interface MemoryMergeDecision { keep: number; supersede: number; edgeType: "duplicates" "supersedes"; } ⋮---- export function canonicalMemoryKey input: CanonicalMemoryInput : string ⋮---- export function shouldDeduplicate a: DedupeComparable, b: DedupeComparable : boolean ⋮---- export function choose… Evidence: `src/lifecycle/dedupe.ts`
- **Feedback** (source_file): import type { MemoryFeedbackEvent, MemoryState } from "../core/types.js"; import { clamp01 } from "./decay.js"; ⋮---- export interface FeedbackState { state: MemoryState; importance: number; confidence: number; usage count: number; last accessed at?: number null; last reinforced at?: number null; } ⋮---- export interface FeedbackResult extends FeedbackState { weight: number; } ⋮---- export function feedbackDelta eventType: MemoryFeedbackEvent : ⋮---- export function defaultFeedbackWeight eventType: MemoryFeedbackEvent : number ⋮---- export function applyFeedback current: FeedbackState, eventType: MemoryFeedbackEvent, nowMs: number, : FeedbackResult Evidence: `src/lifecycle/feedback.ts`
- **Schemas** (source_file): export type DocumentType = "trace" "observation" "memory" "summary" "episode"; ⋮---- export type RetrievalType = DocumentType "all"; ⋮---- export type FeedbackEvent = "shown" "used" "helpful" "harmful" "ignored" "downranked" "corrected"; ⋮---- export interface ValidationError { code: "INVALID ARGUMENT"; message: string; field?: string; } ⋮---- export type ValidationResult = { ok: true; value: T } { ok: false; error: ValidationError }; ⋮---- export interface SearchInput { query: string; type?: RetrievalType; files?: string ; repo id?: string; sessionId?: string; limit?: number; } ⋮---- export interface ContextInput extends SearchInput { tokenBudget?: number; } ⋮---- export interface Feedback… Evidence: `src/mcp/schemas.ts`
- **Server** (source_file): import { loadConfig } from "../cli/config.js"; import { Store } from "../storage/store.js"; import { FTSSearch } from "../retrieval/fts.js"; import { VectorSearch } from "../retrieval/vector.js"; import { HybridSearch } from "../retrieval/hybrid.js"; import { ContextBuilder, renderHybridResults, renderMemory } from "../context/builder.js"; import { buildMemoryExplain, renderMemoryExplain } from "../explain/memory-explain.js"; import type { EmbeddingsProvider } from "../retrieval/embeddings.js"; import { NoOpEmbeddingsProvider } from "../retrieval/embeddings.js"; import { MCP TOOL DEFS } from "./tools.js"; import { DocumentStore, type DocumentType, type SparseHit } from "../storage/documents… Evidence: `src/mcp/server.ts`
- **Tools** (source_file): import type { ToolDef } from "./types.js"; Evidence: `src/mcp/tools.ts`
- **Types** (source_file): export interface JsonRpcRequest { jsonrpc: "2.0"; id?: number string; method: string; params?: unknown; } ⋮---- export interface JsonRpcResponse { jsonrpc: "2.0"; id: number string null; result?: unknown; error?: { code: number; message: string; data?: unknown }; } ⋮---- export interface ToolDef { name: string; description: string; inputSchema: Record ; } Evidence: `src/mcp/types.ts`
- **Agent Cli Provider** (source_file): import type { LLMProvider, ChatMessage, ChatOptions, ChatResponse } from "./provider.js"; import { createAdapter } from "../synth/index.js"; import type { AgentAdapterId } from "../synth/types.js"; ⋮---- export class AgentCliLLMProvider implements LLMProvider ⋮---- constructor private readonly provider: Extract ⋮---- async chat messages: ChatMessage , options?: ChatOptions : Promise ⋮---- export class CaptureOnlyLLMProvider implements LLMProvider ⋮---- async chat : Promise Evidence: `src/observer/agent-cli-provider.ts`
- **Fake Provider** (source_file): import { existsSync, writeFileSync } from "node:fs"; import type { ChatMessage, ChatOptions, ChatResponse, LLMProvider } from "./provider.js"; ⋮---- export class FakeLLMProvider implements LLMProvider ⋮---- async chat messages: ChatMessage , options?: ChatOptions : Promise ⋮---- private shouldFailOnce : boolean ⋮---- private buildObservation prompt: string : string ⋮---- private buildConsolidation prompt: string : string ⋮---- private buildSummary prompt: string : string ⋮---- function buildObservationXml input: { type: string; title: string; description: string; filesRead: string ; filesModified: string ; } : string ⋮---- function extractTag prompt: string, tag: string : string null ⋮----… Evidence: `src/observer/fake-provider.ts`
- **Openai Provider** (source_file): import type { ChatMessage, ChatOptions, ChatResponse, LLMProvider } from "./provider.js"; ⋮---- export interface OpenAIProviderConfig { baseUrl: string; apiKey: string; model: string; defaultTemperature?: number; defaultMaxTokens?: number; } ⋮---- export class OpenAICompatibleProvider implements LLMProvider ⋮---- constructor private config: OpenAIProviderConfig ⋮---- async chat messages: ChatMessage , options?: ChatOptions : Promise Evidence: `src/observer/openai-provider.ts`
- **Parser** (source_file): export interface ParsedObservation { type: string; title: string; description: string null; files read: string ; files modified: string ; } ⋮---- export interface ParsedSummary { summary text: string null; key changes: string ; key learnings: string ; skipped?: boolean; } ⋮---- export type ParseResult = { valid: true; observations: ParsedObservation ; summary: ParsedSummary null } { valid: false }; ⋮---- export function parseAgentXml raw: string : ParseResult ⋮---- function stripFences text: string : string ⋮---- function extractField content: string, fieldName: string : string null ⋮---- function extractArrayElements content: string, arrayName: string, elementName: string : string ⋮---- fu… Evidence: `src/observer/parser.ts`
- The remaining 20 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: `docs/README.md`, `README.md`, `docs/getting-started.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: `docs/README.md`, `README.md`, `docs/getting-started.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.

- **Introduction to Termyte**: importance `high`
  - source_paths: README.md, OVERVIEW.md, docs/README.md, docs/getting-started.md, docs/how-it-works.md
- **System Architecture**: importance `high`
  - source_paths: src/index.ts, src/core/types.ts, docs/how-it-works.md, docs/superpowers/plans/2026-07-14-termyte-context-engine-v0.1-implementation-plan.md
- **Capture and Ingestion Pipeline**: importance `high`
  - source_paths: src/capture/index.ts, src/capture/ingest.ts, src/capture/raw.ts, src/capture/claude-code.ts, src/capture/codex.ts
- **CLI, Tasks, and Hooks**: importance `high`
  - source_paths: src/cli/index.ts, src/cli/init.ts, src/cli/viewer.ts, src/cli/doctor.ts, src/cli/hook.ts
- **Storage and Persistence**: importance `high`
  - source_paths: src/storage/connection.ts, src/storage/migrations.ts, src/storage/documents.ts, src/storage/pipeline-state.ts, src/storage/store.ts
- **Retrieval and Search**: importance `high`
  - source_paths: src/retrieval/eligibility.ts, src/retrieval/query-preprocessor.ts, src/retrieval/fts.ts, src/retrieval/embeddings.ts, src/retrieval/local-embeddings.ts
- **Memory Lifecycle, Experience, and Explanation**: importance `medium`
  - source_paths: src/lifecycle/decay.ts, src/lifecycle/dedupe.ts, src/lifecycle/feedback.ts, src/experience/recorder.ts, src/experience/git-state.ts
- **Viewer UI and HTTP Server**: importance `medium`
  - source_paths: src/viewer-ui/index.html, src/viewer-ui/src/main.tsx, src/viewer-ui/src/styles.css, src/viewer/server.ts, src/viewer/routes.ts

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `70665e3c933b451fddce3cd6b820d2306e876f14`
- inspected_files: `README.md`, `package.json`, `docs/README.md`, `docs/comparisons.md`, `docs/evals/context-v0.1-trial-protocol.md`, `docs/getting-started.md`, `docs/how-it-works.md`, `docs/limitations.md`, `docs/superpowers/plans/2026-07-14-termyte-context-engine-v0.1-implementation-plan.md`, `docs/superpowers/specs/2026-07-11-termyte-context-engine-v0.1-design.md`, `docs/superpowers/specs/2026-07-18-opencode-synthesis-adapter-design.md`, `src/benchmark/adapters/grep.ts`, `src/benchmark/adapters/termyte-fts.ts`, `src/benchmark/adapters/termyte-hybrid.ts`, `src/benchmark/adapters/termyte-pipeline.ts`, `src/benchmark/comparison.ts`, `src/benchmark/datasets/memoryagentbench.ts`, `src/benchmark/datasets/raw-session.ts`, `src/benchmark/datasets/scale.ts`, `src/benchmark/metrics.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: 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/termyte-labs/termyte
- 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/termyte-labs/termyte
- 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/termyte-labs/termyte
- 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/termyte-labs/termyte
- 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/termyte-labs/termyte
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
