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

- `pip install "veracium[anthropic]"   # core + the reference LLM provider` Evidence: `README.md` Claim: `clm_0003` supported 0.86
- `git clone https://github.com/veracium-ai/Veracium.git && cd Veracium` Evidence: `README.md` Claim: `clm_0004` supported 0.86
- `pip install -e ".[anthropic,dev]"` Evidence: `README.md` Claim: `clm_0005` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Trial the research framework first
- **Why**: This project targets research workflows; the core risk is source credibility and output quality. Verify the research framework with Prompt Preview first, then trial it in an isolated environment.

### 30-Second Read

- **What to do now**: Trial the research framework first
- **Minimum safe next step**: Verify the research framework with Prompt Preview first; trial in isolation only once satisfied
- **Do not trust yet**: Research conclusions, citations, and experiment results cannot be trusted before install.
- **Continuing will touch**: Research judgment, 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

- **Research conclusions, citations, and experiment results cannot be trusted before install.** (unverified): A research Skill can organize questions and paths, but it cannot replace real literature search, paper verification, and experiment reproduction.
- **Whether it fits your specific research field cannot be trusted directly.** (unverified): The Skill covering many research topics does not mean it is sufficient for your field, source requirements, and credibility standards.
- **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

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

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Verify whether it can correctly frame the research question and evidence boundaries first; do not trust the research output up front. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **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.
- **Keep a source and conclusion verification checklist**: If citations or experiment paths later prove unreliable, you can return to the evidence-boundary stage and re-check.
- **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: 45
- Important-file coverage: 40/45
- Evidence index entries: 45
- Role / Skill entries: 14

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

- **Veracium** (project_doc): ! tests https://github.com/veracium-ai/Veracium/actions/workflows/test.yml/badge.svg https://github.com/veracium-ai/Veracium/actions/workflows/test.yml ! PyPI https://img.shields.io/pypi/v/veracium https://pypi.org/project/veracium/ ! Python https://img.shields.io/pypi/pyversions/veracium https://pypi.org/project/veracium/ ! license https://img.shields.io/badge/license-MIT-blue LICENSE Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **Contributing to Veracium** (project_doc): Thanks for your interest. Veracium is small and opinionated; contributions that fit its discipline land quickly. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CONTRIBUTING.md`
- **API reference** (project_doc): - llm — a Complete callable required . See Providing an LLM providing-an-llm . - store — a Store ; defaults to SqliteStore config.db path . - embed — an optional Embed callable reserved for episode semantic fallback . - config — a MemoryConfig ; defaults to MemoryConfig . - telemetry / diagnostics / audit — optional sinks, all off by default: a consented content-free stats collector veracium.telemetry , a local erro… Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/api.md`
- **Concepts — how to think about Veracium** (project_doc): Concepts — how to think about Veracium Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/concepts.md`
- **Design rationale** (project_doc): Veracium makes a few deliberate choices that differ from what the agent-memory category has converged on. This page says what they are, why, and what the equivalent affordance is — plus what's genuinely on the roadmap. It exists so you can tell a missing feature from a refused one. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/design-rationale.md`
- **Diagnostics — opt-in error reporting** (project_doc): Diagnostics — opt-in error reporting Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/diagnostics.md`
- **Veracium** (project_doc): Veracium is a provenance-aware memory plug-in for agentic systems — durable, per-user memory that resists the injection and confabulation failures that plague naive agent memory. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/index.md`
- **Using Veracium over MCP** (project_doc): The MCP server exposes Veracium to any MCP-compatible agent Claude Desktop, Claude Code, and others with no host-side Python. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/mcp.md`
- **Recipes** (project_doc): Short, copy-pasteable examples — one per capability. Each assumes: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/recipes.md`
- **Telemetry — opt-in, anonymous, content-free** (project_doc): Telemetry — opt-in, anonymous, content-free Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/telemetry.md`
- **Changelog** (project_doc): - mcp 2.0 compat : the MCP SDK 2.0.0 renamed FastMCP to MCPServer same decorator API — veracium-mcp now imports whichever the installed SDK provides, so mcp =1.0 stays the supported range on both majors. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CHANGELOG.md`
- **Contributor Covenant Code of Conduct** (project_doc): Contributor Covenant Code of Conduct Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CODE_OF_CONDUCT.md`
- **Roadmap** (project_doc): Grounded in the agent-memory research findings. v0.1 ships the write-path spine and graph recall; the items below complete the validated design. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `ROADMAP.md`
- **Security Policy** (project_doc): Veracium's core premise is that a memory system is a security boundary : content the agent merely read a received email, a fetched document, tool output must never become a fact the agent asserts, and one user's memory must never reach another's. So we treat failures of that boundary as vulnerabilities, not quality bugs. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `SECURITY.md`

## Evidence Index

- Indexed 45 evidence entries.

- **Veracium** (documentation): ! tests https://github.com/veracium-ai/Veracium/actions/workflows/test.yml/badge.svg https://github.com/veracium-ai/Veracium/actions/workflows/test.yml ! PyPI https://img.shields.io/pypi/v/veracium https://pypi.org/project/veracium/ ! Python https://img.shields.io/pypi/pyversions/veracium https://pypi.org/project/veracium/ ! license https://img.shields.io/badge/license-MIT-blue LICENSE Evidence: `README.md`
- **Contributing to Veracium** (documentation): Thanks for your interest. Veracium is small and opinionated; contributions that fit its discipline land quickly. Evidence: `CONTRIBUTING.md`
- **License** (source_file): Copyright c 2026 Quentin Spencer / Veracium AI Evidence: `LICENSE`
- **API reference** (documentation): - llm — a Complete callable required . See Providing an LLM providing-an-llm . - store — a Store ; defaults to SqliteStore config.db path . - embed — an optional Embed callable reserved for episode semantic fallback . - config — a MemoryConfig ; defaults to MemoryConfig . - telemetry / diagnostics / audit — optional sinks, all off by default: a consented content-free stats collector veracium.telemetry , a local error-log reporter veracium.diagnostics , and an operation audit log veracium.audit.AuditLog path : one append-only JSONL line per operation — UTC timestamp, op, user id , content-free counters; no memory text ever. Sink failures never break memory operations. Evidence: `docs/api.md`
- **Concepts — how to think about Veracium** (documentation): Concepts — how to think about Veracium Evidence: `docs/concepts.md`
- **Design rationale** (documentation): Veracium makes a few deliberate choices that differ from what the agent-memory category has converged on. This page says what they are, why, and what the equivalent affordance is — plus what's genuinely on the roadmap. It exists so you can tell a missing feature from a refused one. Evidence: `docs/design-rationale.md`
- **Diagnostics — opt-in error reporting** (documentation): Diagnostics — opt-in error reporting Evidence: `docs/diagnostics.md`
- **Veracium** (documentation): Veracium is a provenance-aware memory plug-in for agentic systems — durable, per-user memory that resists the injection and confabulation failures that plague naive agent memory. Evidence: `docs/index.md`
- **Using Veracium over MCP** (documentation): The MCP server exposes Veracium to any MCP-compatible agent Claude Desktop, Claude Code, and others with no host-side Python. Evidence: `docs/mcp.md`
- **Recipes** (documentation): Short, copy-pasteable examples — one per capability. Each assumes: Evidence: `docs/recipes.md`
- **Telemetry — opt-in, anonymous, content-free** (documentation): Telemetry — opt-in, anonymous, content-free Evidence: `docs/telemetry.md`
- **Changelog** (documentation): - mcp 2.0 compat : the MCP SDK 2.0.0 renamed FastMCP to MCPServer same decorator API — veracium-mcp now imports whichever the installed SDK provides, so mcp =1.0 stays the supported range on both majors. Evidence: `CHANGELOG.md`
- **Contributor Covenant Code of Conduct** (documentation): Contributor Covenant Code of Conduct Evidence: `CODE_OF_CONDUCT.md`
- **Roadmap** (documentation): Grounded in the agent-memory research findings. v0.1 ships the write-path spine and graph recall; the items below complete the validated design. Evidence: `ROADMAP.md`
- **Security Policy** (documentation): Veracium's core premise is that a memory system is a security boundary : content the agent merely read a received email, a fetched document, tool output must never become a fact the agent asserts, and one user's memory must never reach another's. So we treat failures of that boundary as vulnerabilities, not quality bugs. Evidence: `SECURITY.md`
- **Server** (structured_config): { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.veracium-ai/veracium", "description": "Provenance-aware memory for AI agents: quarantine, abstention gate, supersession-with-history.", "repository": { "url": "https://github.com/veracium-ai/Veracium", "source": "github" }, "websiteUrl": "https://docs.veracium.ai", "version": "0.2.4", "packages": { "registryType": "pypi", "identifier": "veracium", "version": "0.2.4", "transport": { "type": "stdio" }, "environmentVariables": { "name": "ANTHROPIC API KEY", "description": "API key for the reference Anthropic provider", "format": "string", "isRequired": true, "isSecret": true }, { "na… Evidence: `server.json`
- **.gitignore** (source_file): .venv/ pycache / .pyc .db .egg-info/ dist/ build/ .pytest cache/ site/ Evidence: `.gitignore`
- **Citation** (source_file): cff-version: 1.2.0 message: "If you use veracium in your research, please cite it as below." type: software title: "veracium: a provenance-aware memory plug-in for agentic systems" authors: - family-names: Spencer given-names: Quentin repository-code: "https://github.com/veracium-ai/Veracium" url: "https://github.com/veracium-ai/Veracium" license: MIT version: 0.2.4 date-released: 2026-07-20 keywords: - agent memory - LLM - provenance - prompt injection - abstention abstract: - veracium gives agentic systems durable, per-user memory with structural defenses against memory poisoning and confabulation: typed graph edges with provenance and functional supersession, quarantine of third-party cl… Evidence: `CITATION.cff`
- **Claude Cli Provider** (source_file): ROLE MODEL = { ⋮---- class ClaudeCLIComplete ⋮---- cmd = "claude", "-p", "--model", ROLE MODEL.get role, "claude-sonnet-4-5" ⋮---- p = subprocess.run cmd, input=prompt, capture output=True, text=True, timeout=180 Evidence: `examples/claude_cli_provider.py`
- **Demo** (source_file): { "cells": { "cell type": "markdown", "id": "5e4ab75c", "metadata": {}, "source": " Your agent's memory is an injection vector — a live demo\n", "\n", " ! Open in Colab https://colab.research.google.com/assets/colab-badge.svg https://colab.research.google.com/github/veracium-ai/Veracium/blob/main/examples/demo.ipynb \n", "\n", "Most agent memory works like this: everything the agent reads gets stored, and\n", "everything stored is treated as true. So when a scam email says you owe $900,\n", "your agent remembers that you owe $900 — and three weeks later it reminds you\n", "to pay.\n", "\n", "This notebook runs that exact attack against Veracium https://github.com/veracium-ai/Veracium ,\n",… Evidence: `examples/demo.ipynb`
- **Langchain Memory** (source_file): class LangChainComplete ⋮---- def init self, model: BaseChatModel ⋮---- messages = "system", system if system else + "human", prompt ⋮---- class VeraciumLangChainMemory ⋮---- def get session history self, session id: str - InMemoryChatMessageHistory ⋮---- hist = self. buffers session id ⋮---- def context self, session id: str, query: str, , token budget: int = 600 - str ⋮---- def build chain model: BaseChatModel, memory: VeraciumLangChainMemory ⋮---- prompt = ChatPromptTemplate.from messages ⋮---- def chat with persistent memory user id: str, model: BaseChatModel - None ⋮---- memory = VeraciumLangChainMemory LangChainComplete model chain = build chain model, memory ⋮---- text = input " " .s… Evidence: `examples/langchain_memory.py`
- **Endpoint doesn't support structured output — remember that and** (source_file): ROLE MODEL = { ⋮---- class OpenAIComplete ⋮---- key = api key or os.environ.get "OPENAI API KEY" ⋮---- key = "not-needed" ⋮---- model = self. models.get role, self. models "compile" messages = ⋮---- kwargs: dict = {"model": model, "messages": messages, "max tokens": self. max tokens} ⋮---- resp = self. client.chat.completions.create ⋮---- Endpoint doesn't support structured output — remember that and fall through; veracium parses plain completions tolerantly. ⋮---- resp = self. client.chat.completions.create kwargs Evidence: `examples/openai_provider.py`
- **Mkdocs** (source_file): site name: Veracium site description: Provenance-aware memory for AI agents. site url: https://veracium-ai.github.io/Veracium/ repo url: https://github.com/veracium-ai/Veracium repo name: veracium-ai/Veracium edit uri: edit/main/docs/ theme: name: material palette: - media: " prefers-color-scheme: light " scheme: default primary: teal accent: teal toggle: icon: material/weather-night name: Dark mode - media: " prefers-color-scheme: dark " scheme: slate primary: teal accent: teal toggle: icon: material/weather-sunny name: Light mode features: - navigation.sections - navigation.footer - content.code.copy - toc.integrate nav: - Home: index.md - Concepts: concepts.md - API reference: api.md - R… Evidence: `mkdocs.yml`
- **Core is embedded and BYO-LLM: no database, no bundled model client.** (source_file): build-system requires = "hatchling" build-backend = "hatchling.build" Evidence: `pyproject.toml`
- **upgrade in place: same use, new judgment — times used unchanged** (source_file): ABSTAINED = re.compile r"don'?t know no confirmed record information such " ⋮---- all = "Memory", "MemoryConfig", "Recall", "Store", "SqliteStore", ⋮---- @dataclass class Recall ⋮---- context: str grounded: str unverified: str edges: list Edge episodes: list Episode tokens estimated: int = 0 truncated: bool = False ⋮---- class Memory ⋮---- def on error self, where: str, exc: BaseException, user id: Optional str = None - None ⋮---- uh = hashlib.sha256 user id.encode .hexdigest :12 if user id else None ⋮---- date = date or date.today .isoformat t0 = time.perf counter ⋮---- r = ingest event self.store, self.llm, user id, event text=event text, ⋮---- @staticmethod def est tokens text: str - int… Evidence: `src/veracium/__init__.py`
- **Json** (source_file): def extract json text: str ⋮---- decoder = json.JSONDecoder fallback = None skip until = -1 ⋮---- fallback = obj skip until = i + end Evidence: `src/veracium/_json.py`
- **Audit** (source_file): class AuditLog ⋮---- def init self, path ⋮---- def record self, op: str, user id: str, fields: dict - None ⋮---- line = json.dumps {"ts": datetime.now timezone.utc .isoformat , ⋮---- def entries self, , user id: str None = None, op: str None = None - list dict ⋮---- out = ⋮---- rec = json.loads ln Evidence: `src/veracium/audit.py`
- **Cli** (source_file): def status cfg - None ⋮---- PROVIDER HELP = ⋮---- def build llm ⋮---- llm = AnthropicComplete ⋮---- def selfcheck args - int ⋮---- result = selfcheck.run build llm ⋮---- cfg = telemetry.TelemetryConfig.load ⋮---- coll = telemetry.Collector ⋮---- def diagnostics args, parser - int ⋮---- cfg = diagnostics.DiagnosticsConfig.load ⋮---- cfg = diagnostics.prompt consent interactive=True ⋮---- cfg = diagnostics.set report enabled True, endpoint=args.endpoint note = "" if cfg.endpoint else " no --endpoint set → nothing sends until one is configured " ⋮---- sent = diagnostics.Reporter cfg .send interactive=True, reason="manual" ⋮---- def portability args - int ⋮---- store = SqliteStore args.db ⋮----… Evidence: `src/veracium/cli.py`
- **Compile** (source_file): COMPILE SYSTEM = ⋮---- COMPILE PROMPT = """Compile the material below into ONE curated memory document, ⋮---- def grounded inputs store, user id: str ⋮---- edges = e for e in store.edges user id, active only=True, include quarantined=False ⋮---- episodes = e for e in store.episodes user id ⋮---- def needs recompile store, user id: str, recompile after: int - bool ⋮---- cached = store.get wiki user id ⋮---- def compile wiki store, llm: Complete, user id: str, , budget tokens: int = 900 - str ⋮---- facts = render edges edges or " none " hist = "\n".join f" {e.date} {e.summary}" for e in episodes or " none " wiki = llm COMPILE PROMPT.format budget=budget tokens, facts=facts, episodes=hist , ⋮-… Evidence: `src/veracium/compile.py`
- **Config** (source_file): def default lifetimes - dict Volatility, Optional int ⋮---- @dataclass class MemoryConfig ⋮---- db path: str = "veracium.db" relations: dict str, Relation = field default factory=lambda: dict DEFAULT RELATIONS ⋮---- max subgraph edges: int = 40 max recent episodes: int = 12 ⋮---- wiki recompile after writes: int = 8 ⋮---- volatility lifetime days: dict Volatility, Optional int = field default factory= default lifetimes decay factor: float = 0.5 confidence floor: float = 0.3 consolidate after days: int = 30 consolidate min batch: int = 8 Evidence: `src/veracium/config.py`
- **--- the reporter ------------------------------------------------------------** (source_file): SCHEMA VERSION = 1 LOGGER NAME = "veracium.diagnostics" ⋮---- def config dir - Path ⋮---- base = os.environ.get "XDG CONFIG HOME" or str Path.home / ".config" ⋮---- def state dir - Path ⋮---- base = os.environ.get "XDG STATE HOME" or str Path.home / ".local" / "state" ⋮---- def veracium version - str ⋮---- def install id from telemetry - str ⋮---- tid = telemetry.TelemetryConfig.load .install id ⋮---- @dataclass class DiagnosticsConfig ⋮---- log enabled: bool = True report enabled: bool = False prompt on error: bool = True redact: bool = True endpoint: Optional str = None log path: Optional str = None install id: str = "" max report bytes: int = 64 1024 only ever send the log tail, capped r… Evidence: `src/veracium/diagnostics.py`
- **Gate** (source_file): def partition edges: list Edge , episodes: list Episode - tuple str, str ⋮---- grounded = ⋮---- unverified = ⋮---- edge lines = render edges e for e in edges if e.assertable claim lines = render edges e for e in edges ep lines = f" {e.date} {e.summary}" for e in episodes tp ep lines = f" {e.date} {e.summary}" for e in episodes ⋮---- GATE SYSTEM = ⋮---- GATE PROMPT = """The following is the memory for the user this question is about. ⋮---- def answer llm: Complete, query: str, grounded: str, unverified: str - str ⋮---- """Gate-disciplined answer over a grounded/unverified partition.""" Evidence: `src/veracium/gate.py`
- **prefer active over superseded, and closer matches** (source_file): VALUE FILLER = {"a", "an", "the", "my", "our", "their", "named", "called"} ⋮---- def value key text: str - tuple str, ... ⋮---- toks = tuple w for w in re.findall r" a-z0-9 +", text.lower ⋮---- def apply supersession store, edge: Edge, relations: dict str, Relation - None ⋮---- """Persist a new edge with supersession and reinforcement: - Reinforcement: if an active edge already asserts the same subject, relation, object , refresh its validity to the new date instead of adding a duplicate — so re-stating a fact keeps it alive a re-mentioned transient state won't lapse and clears any stale-confirmation flag. "Same" is normalized-token equality see value key , so an extractor paraphrase of an… Evidence: `src/veracium/graph.py`
- **Ingest** (source_file): def uid prefix: str - str ⋮---- def event dt date str: str - datetime ⋮---- """The event's own date drives valid from / observed at — memory timestamps must reflect when facts held, not wall-clock ingest time.""" ⋮---- """Structural quarantine defense in depth over the extractor's routing : a third-party CLAIM is quarantined; a third-party inference is use-only; user/system content is mentionable. Trust is capped at the MINIMUM of the event's author and its declared content source derived from — a system-authored event whose text embeds third-party material never yields mentionable edges, whatever the extractor thinks.""" ⋮---- def source type author: EvidenceAuthor, event type: str - Sourc… Evidence: `src/veracium/ingest.py`
- **Lifecycle** (source_file): def expire store, user id: str, config, , now: Optional datetime = None - dict ⋮---- now = now or utcnow lapsed = decayed = flagged = 0 ⋮---- lifetime = config.volatility lifetime days.get e.volatility ⋮---- age days = now - e.valid from .days ⋮---- behavior = DEFAULT EXPIRY e.volatility ⋮---- CONSOLIDATE SYSTEM = ⋮---- CONSOLIDATE PROMPT = """Compact these dated episodes into FEWER consolidated ⋮---- cutoff = now.date - timedelta days config.consolidate after days episodes = store.episodes user id ⋮---- cold = e for e in episodes if e.kind != "outcome" ⋮---- listing = "\n".join f" {e.date} {e.summary}" for e in cold data = extract json llm CONSOLIDATE PROMPT.format episodes=listing , new =… Evidence: `src/veracium/lifecycle.py`
- **Anthropic** (source_file): DEFAULT MODELS: dict Role, str = { ⋮---- class AnthropicComplete ⋮---- model = self. models.get role, self. models "compile" kwargs: dict = {"model": model, "max tokens": self. max tokens, ⋮---- msg = self. client.messages.create kwargs ⋮---- class AnthropicEmbed ⋮---- def init self, embed fn ⋮---- def call self, texts: list str - list list float Evidence: `src/veracium/llm/anthropic.py`
- **Base** (source_file): Role = str ⋮---- @runtime checkable class Complete Protocol ⋮---- @runtime checkable class Embed Protocol ⋮---- def call self, texts: list str - list list float : ... Evidence: `src/veracium/llm/base.py`
- **Mcp Server** (source_file): AUTHOR = {"user": EvidenceAuthor.USER, ⋮---- out = mem.recall user id, query, token budget=token budget .context ⋮---- def answer impl mem: Memory, user id: str, query: str - str ⋮---- def maintain impl mem: Memory, user id: str - dict ⋮---- def build memory - Memory ⋮---- def server cls ⋮---- def build server mem: Memory, , default user: str = "default" ⋮---- server = server cls "veracium", ⋮---- @server.tool def answer query: str, user id: str = default user - str ⋮---- @server.tool def maintain user id: str = default user - dict ⋮---- USAGE = """\ ⋮---- def main argv=None - None ⋮---- args = sys.argv 1: if argv is None else argv ⋮---- except ImportError as e: pragma: no cover ⋮---- mem =… Evidence: `src/veracium/mcp_server.py`
- **Portability** (source_file): FORMAT VERSION = 2 ⋮---- def export memory store, user id: str, path - dict ⋮---- edges = store.edges user id, active only=False, include quarantined=True episodes = store.episodes user id path = Path path ⋮---- def import memory store, path, , user id: Optional str = None - dict ⋮---- lines = ln for ln in l.strip for l in f if ln ⋮---- header = json.loads lines 0 ⋮---- target uid = user id or header.get "user id" existing edges = {e.id for e in store.edges target uid, active only=False, existing eps = {ep.id for ep in store.episodes target uid } ⋮---- imported = {"edges": 0, "episodes": 0} skipped = 0 ⋮---- rec = json.loads ln kind = rec.pop "record", None ⋮---- kind = rec.pop "kind" ⋮----… Evidence: `src/veracium/portability.py`
- **Prompts** (source_file): EXTRACT SYSTEM = ⋮---- EXTRACT PROMPT = """{date context} ⋮---- def date context iso date: str - str ⋮---- d = date.fromisoformat iso date monday = d - timedelta days=d.weekday def week start ⋮---- EXTRACT SCHEMA = { Evidence: `src/veracium/prompts.py`
- **A small, extensible default registry. Hosts can add their own via config.** (source_file): def utcnow - datetime ⋮---- class SourceType str, Enum ⋮---- STATED = "stated" OBSERVED = "observed" INFERRED = "inferred" ⋮---- class EvidenceAuthor str, Enum ⋮---- USER = "user" THIRD PARTY = "third party" SYSTEM = "system" ⋮---- class Disclosure str, Enum ⋮---- MENTIONABLE = "mentionable" USE ONLY = "use only" QUARANTINED = "quarantined" ⋮---- class Provenance BaseModel ⋮---- source type: SourceType author of evidence: EvidenceAuthor evidence ref: str = Field description="Stable id of the event/message/doc this derives from" observed at: datetime = Field default factory=utcnow disclosure: Disclosure = Disclosure.MENTIONABLE confidence: float = Field default=0.9, ge=0.0, le=1.0 ⋮---- deri… Evidence: `src/veracium/schema.py`
- **Selfcheck** (source_file): ABSTAINED = re.compile HEDGED = re.compile r"unverified no confirmed not confirmed claim never confirmed " AMOUNT = re.compile r"4 ,. ?200 \$?4,?200 \$4\b" ⋮---- def mem llm, tmp: str, name: str, relations ⋮---- def check supersession llm, tmp, relations - tuple int, int, dict ⋮---- mem = mem llm, tmp, "supersession", relations uid = "sc" ⋮---- current = mem.answer uid, "Where do I work now?" all edges = mem.store.edges uid, active only=False ⋮---- ok current = "globex" in current.lower ok history = any not e.active for e in all edges ok = int ok current + int ok history ⋮---- def check injection llm, tmp, relations - tuple int, int, int, dict ⋮---- mem = mem llm, tmp, "injection", relation… Evidence: `src/veracium/selfcheck.py`
- **Base** (source_file): class Store ABC ⋮---- @abstractmethod def add edge self, edge: Edge - None: ... ⋮---- @abstractmethod def invalidate edge self, edge id: str, at, reason: str - None: ... ⋮---- @abstractmethod def add episode self, episode: Episode - None: ... ⋮---- @abstractmethod def episodes self, user id: str, , limit: Optional int = None - list Episode : ... ⋮---- @abstractmethod def delete episode self, episode id: str - None: ... ⋮---- def list users self - list dict ⋮---- def forget user self, user id: str - dict ⋮---- @abstractmethod def get wiki self, user id: str - Optional tuple str, int ⋮---- @abstractmethod def set wiki self, user id: str, text: str, store version: int - None: ... ⋮---- @abstra… Evidence: `src/veracium/store/base.py`
- **-- host/admin queries ---------------------------------------------------** (source_file): SCHEMA = """ ⋮---- class SqliteStore Store ⋮---- def init self, path: str Path = "veracium.db" ⋮---- def bump self, user id: str - None ⋮---- def add edge self, edge: Edge - None ⋮---- def invalidate edge self, edge id: str, at, reason: str - None ⋮---- row = self. conn.execute "SELECT json, user id FROM edges WHERE id=?", edge id, .fetchone ⋮---- edge = Edge.model validate json row 0 ⋮---- q = "SELECT json FROM edges WHERE user id=?" args: list = user id ⋮---- rows = self. conn.execute q, args .fetchall ⋮---- def add episode self, episode: Episode - None ⋮---- def episodes self, user id, , limit=None - list Episode ⋮---- q = "SELECT json FROM episodes WHERE user id=? ORDER BY date" ⋮---- d… Evidence: `src/veracium/store/sqlite.py`
- **Telemetry** (source_file): EVENT FIELDS: dict str, set str = { ⋮---- SCHEMA VERSION = 1 ⋮---- def config dir - Path ⋮---- base = os.environ.get "XDG CONFIG HOME" or str Path.home / ".config" ⋮---- @dataclass class TelemetryConfig ⋮---- enabled: bool = False install id: str = "" endpoint: Optional str = None veracium ships none; no endpoint → never sends interval days: int = 7 last sent: Optional float = None epoch seconds schema version: int = SCHEMA VERSION ⋮---- @classmethod def path cls - Path ⋮---- @classmethod def load cls - "TelemetryConfig" ⋮---- p = cls.path ⋮---- def save self - None ⋮---- p = self.path ⋮---- def exists self - bool ⋮---- class Collector ⋮---- def init self ⋮---- def record self, event: str,… Evidence: `src/veracium/telemetry.py`

## Rules the Host AI Must Follow

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

## Questions the User Should Answer First

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

## Acceptance Checks

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

---

## Doramagic Context Augmentation

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

## Human Manual Outline

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

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

- **Overview and Core Concepts**: importance `high`
  - source_paths: README.md, docs/index.md, docs/concepts.md, pyproject.toml, src/veracium/__init__.py
- **System Architecture and Data Flow**: importance `high`
  - source_paths: src/veracium/ingest.py, src/veracium/gate.py, src/veracium/compile.py, src/veracium/graph.py, src/veracium/store/base.py
- **Public API and Extensibility**: importance `high`
  - source_paths: src/veracium/lifecycle.py, src/veracium/config.py, src/veracium/llm/base.py, src/veracium/llm/anthropic.py, examples/openai_provider.py
- **MCP Server, CLI, and Operations**: importance `high`
  - source_paths: src/veracium/mcp_server.py, src/veracium/cli.py, src/veracium/selfcheck.py, src/veracium/telemetry.py, src/veracium/diagnostics.py

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `710fb04bbb6720efe88387ffb95dc22b43cb8fc0`
- inspected_files: `README.md`, `pyproject.toml`, `docs/api.md`, `docs/concepts.md`, `docs/design-rationale.md`, `docs/diagnostics.md`, `docs/index.md`, `docs/mcp.md`, `docs/recipes.md`, `docs/telemetry.md`, `examples/claude_cli_provider.py`, `examples/langchain_memory.py`, `examples/openai_provider.py`, `src/veracium/__init__.py`, `src/veracium/_json.py`, `src/veracium/audit.py`, `src/veracium/cli.py`, `src/veracium/compile.py`, `src/veracium/config.py`, `src/veracium/diagnostics.py`

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

## Doramagic Pitfall Constraints

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

### Constraint 1: Capability evidence risk requires verification

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