# kreuzberg - 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 kreuzberg. 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_0003` supported 0.86
- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `.ai-rulez/skills/api-server-mcp/SKILL.md`, `.ai-rulez/skills/chunking-embeddings/SKILL.md`, `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`, `.ai-rulez/skills/format-specific-extraction/SKILL.md` et al. Claim: `clm_0004` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `.ai-rulez/skills/api-server-mcp/SKILL.md`, `.ai-rulez/skills/chunking-embeddings/SKILL.md`, `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`, `.ai-rulez/skills/format-specific-extraction/SKILL.md` et al. Claim: `clm_0001` supported 0.86
- **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`, `packages/go/README.md`, `packages/python/README.md` Claim: `clm_0002` supported 0.86

## How to Start

- `pip install xberg` Evidence: `README.md` Claim: `clm_0005` supported 0.86, `clm_0012` supported 0.86, `clm_0013` supported 0.86
- `npm install @xberg-io/xberg` Evidence: `README.md` Claim: `clm_0006` supported 0.86, `clm_0007` supported 0.86
- `npm install @xberg-io/xberg-wasm` Evidence: `README.md` Claim: `clm_0007` supported 0.86
- `/plugin marketplace add xberg-io/plugins` Evidence: `README.md` Claim: `clm_0008` supported 0.86
- `/plugin install xberg@xberg` Evidence: `README.md` Claim: `clm_0009` supported 0.86
- `curl -LO https://github.com/xberg-io/xberg/releases/download/v1.0.0-rc.9/go-ffi-linux-x86_64.tar.gz` Evidence: `packages/go/README.md` Claim: `clm_0010` supported 0.86
- `git clone https://github.com/xberg-io/xberg.git` Evidence: `packages/go/README.md` Claim: `clm_0011` supported 0.86
- `pip install "xberg[paddleocr]"` Evidence: `packages/python/README.md` Claim: `clm_0012` supported 0.86
- `pip install "xberg[all]"` Evidence: `packages/python/README.md` Claim: `clm_0013` supported 0.86
- `pip install --force-reinstall --no-cache-dir xberg` Evidence: `packages/python/README.md` Claim: `clm_0014` supported 0.86

## Continue-or-Stop Decision Card

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

### 30-Second Read

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

### What You Can Trust Now

- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0003` supported 0.86
- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `.ai-rulez/skills/api-server-mcp/SKILL.md`, `.ai-rulez/skills/chunking-embeddings/SKILL.md`, `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`, `.ai-rulez/skills/format-specific-extraction/SKILL.md` et al. Claim: `clm_0004` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (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: `.ai-rulez/skills/api-server-mcp/SKILL.md`, `.ai-rulez/skills/chunking-embeddings/SKILL.md`, `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`, `.ai-rulez/skills/format-specific-extraction/SKILL.md` et al. Claim: `clm_0001` 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`, `packages/go/README.md`, `packages/python/README.md` Claim: `clm_0002` 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_0005` supported 0.86, `clm_0012` supported 0.86, `clm_0013` supported 0.86

### What You Cannot Trust Yet

- **Tool permission boundaries cannot be trusted before install.** (unverified): MCP/tool projects usually touch files, the network, the browser, or external APIs, so permissions and logs must be checked for real.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `.ai-rulez/skills/api-server-mcp/SKILL.md`, `.ai-rulez/skills/chunking-embeddings/SKILL.md`, `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`, `.ai-rulez/skills/format-specific-extraction/SKILL.md` et al.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`, `packages/go/README.md`, `packages/python/README.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `.ai-rulez/skills/api-server-mcp/SKILL.md`, `.ai-rulez/skills/chunking-embeddings/SKILL.md`, `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`, `.ai-rulez/skills/format-specific-extraction/SKILL.md` et al.
- **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`, `packages/go/README.md`, `packages/python/README.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

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

## What Must Be Verified After Install

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

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0015` 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`, `packages/go/README.md`, `packages/python/README.md` Claim: `clm_0016` 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

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `.ai-rulez/skills/api-server-mcp/SKILL.md`, `.ai-rulez/skills/chunking-embeddings/SKILL.md`, `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`, `.ai-rulez/skills/format-specific-extraction/SKILL.md` et al. Claim: `clm_0001` supported 0.86
- **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`, `packages/go/README.md`, `packages/python/README.md` Claim: `clm_0002` supported 0.86

### Context Scale

- Total files: 5798
- Important-file coverage: 40/5798
- Evidence index entries: 80
- Role / Skill entries: 5

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

- **api-server-mcp** (skill): REST API server and MCP protocol integration Activation hint: When the user's task is highly relevant to the workflow described by “api-server-mcp”, use it for a pre-install experience first, then decide whether to install. Evidence: `.ai-rulez/skills/api-server-mcp/SKILL.md`
- **chunking-embeddings** (skill): Chunking, embeddings, and RAG pipeline integration Activation hint: When the user's task is highly relevant to the workflow described by “chunking-embeddings”, use it for a pre-install experience first, then decide whether to install. Evidence: `.ai-rulez/skills/chunking-embeddings/SKILL.md`
- **extraction-pipeline-patterns** (skill): Document extraction pipeline architecture and patterns Activation hint: When the user's task is highly relevant to the workflow described by “extraction-pipeline-patterns”, use it for a pre-install experience first, then decide whether to install. Evidence: `.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md`
- **format-specific-extraction** (skill): Format-specific document extraction workflows Activation hint: When the user's task is highly relevant to the workflow described by “format-specific-extraction”, use it for a pre-install experience first, then decide whether to install. Evidence: `.ai-rulez/skills/format-specific-extraction/SKILL.md`
- **plugin-architecture-patterns** (skill): Plugin architecture, registration, and trait patterns Activation hint: When the user's task is highly relevant to the workflow described by “plugin-architecture-patterns”, use it for a pre-install experience first, then decide whether to install. Evidence: `.ai-rulez/skills/plugin-architecture-patterns/SKILL.md`

## Evidence Index

- Indexed 80 evidence entries.

- **Xberg PHP Snippets** (documentation): Comprehensive code examples for the Xberg PHP bindings. These snippets demonstrate all major features and use cases. Evidence: `docs/snippets/php/README.md`
- **PHP Plugin System - Deferred to Future Version** (documentation): PHP Plugin System - Deferred to Future Version Evidence: `docs/snippets/php/plugins/README.md`
- **Xberg** (documentation): One Rust engine — 96 file formats, 306 programming languages, native bindings for 15 languages , dual model runtimes, 6 output formats, OCR from any backend, embeddings, structured LLM extraction, token reduction, and more. Evidence: `README.md`
- **Xberg Docker Images** (documentation): This directory contains Dockerfile variants for building Xberg Docker images with different feature sets. Evidence: `docker/README.md`
- **xberg-cli** (documentation): CLI proxy for xberg https://github.com/xberg-io/xberg . Installing this package provides a xberg command that downloads the matching native binary from GitHub releases and runs it. Evidence: `cli-proxy/pypi/README.md`
- **xberg-candle-ocr** (documentation): Candle-based VLM OCR engines for Xberg. Pure-Rust transformer OCR via candle https://github.com/huggingface/candle . Evidence: `crates/xberg-candle-ocr/README.md`
- **xberg-cli** (documentation): ! Bindings https://img.shields.io/badge/Bindings-alef%20%D7%90-007ec6 https://github.com/xberg-io/alef Evidence: `crates/xberg-cli/README.md`
- **FFI C/C++** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. C/C++ FFI bindings providing a stable ABI for native integration, shared library distribution, and cross-language interop. Evidence: `crates/xberg-ffi/README.md`
- **xberg-libheif** (documentation): Safe Rust bindings around libheif-sys for decoding HEIF / HEIC / AVIF containers â vendored into Xberg from the original libheif-rs https://github.com/Cykooz/libheif-rs by Kirill Kuzminykh Cykooz https://github.com/Cykooz . Evidence: `crates/xberg-libheif/README.md`
- **TypeScript Node.js** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. Native NAPI-RS bindings for Node.js with superior performance, async/await support, and TypeScript type definitions. Evidence: `crates/xberg-node/README.md`
- **xberg-paddle-ocr** (documentation): ! Bindings https://img.shields.io/badge/Bindings-alef%20%D7%90-007ec6 https://github.com/xberg-io/alef Evidence: `crates/xberg-paddle-ocr/README.md`
- **xberg-pdfium-render** (documentation): A high-level idiomatic Rust wrapper around Pdfium https://pdfium.googlesource.com/pdfium/ , the C++ PDF library used by the Google Chromium project. Evidence: `crates/xberg-pdfium-render/README.md`
- **xberg-tesseract** (documentation): ! Bindings https://img.shields.io/badge/Bindings-alef%20%D7%90-007ec6 https://github.com/xberg-io/alef Evidence: `crates/xberg-tesseract/README.md`
- **Tesseract WASM Patches** (documentation): This directory contains patches needed to compile Tesseract for WebAssembly WASM targets using WASI SDK. Evidence: `crates/xberg-tesseract/patches/README.md`
- **WebAssembly** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, and images. WebAssembly bindings for browsers, Deno, and Cloudflare Workers with portable deployment and multi-threading support. Evidence: `crates/xberg-wasm/README.md`
- **Xberg** (documentation): ! Bindings https://img.shields.io/badge/Bindings-alef%20%D7%90-007ec6 https://github.com/xberg-io/alef Evidence: `crates/xberg/README.md`
- **C** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. .NET bindings with full type safety, async/await support, and .NET 10.0+ compatibility. Evidence: `packages/csharp/README.md`
- **xberg** (documentation): High-performance document intelligence library Evidence: `packages/dart/README.md`
- **Elixir** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. Elixir bindings with native BEAM concurrency, OTP integration, and idiomatic Elixir API. Evidence: `packages/elixir/README.md`
- **Xberg** (documentation): High-performance document intelligence for Go backed by the Rust core that powers every Xberg binding. Evidence: `packages/go/README.md`
- **Java** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. Java bindings with type-safe API, Foreign Function & Memory API integration, and native performance. Evidence: `packages/java/README.md`
- **Kotlin Android** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. Android library AAR with bundled jniLibs/arm64-v8a and jniLibs/x86 64 — Gradle automatically picks up the native cdylib for emulator and device builds. Server-side Kotlin/JVM consumers can use the Java binding directly via standard Kotlin/Java interop. Evidence: `packages/kotlin-android/README.md`
- **PHP** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. PHP bindings with modern PHP 8.2+ support and type-safe API. Evidence: `packages/php/README.md`
- **Xberg** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. Native Python bindings with async/await support, multiple OCR backends Tesseract, PaddleOCR , and extensible plugin system. Evidence: `packages/python/README.md`
- **Xberg for Ruby** (documentation): Extract text, tables, images, metadata, and code intelligence from 96 file formats and 306 programming languages including PDF, Office documents, images, and audio/video transcripts where native transcription is available. Ruby bindings with idiomatic Ruby API and native performance. Evidence: `packages/ruby/README.md`
- **Xberg** (documentation): High-performance document intelligence library Evidence: `packages/swift/README.md`
- **xberg** (documentation): High-performance document intelligence library Evidence: `packages/zig/README.md`
- **CI Workflow Scripts** (documentation): This directory contains extracted scripts from GitHub Actions CI workflows, organized by workflow type. Evidence: `scripts/ci/README.md`
- **Benchmark Harness** (documentation): Rust CLI tool for comparative benchmarking of document extraction across 13 Xberg language bindings and 7 reference frameworks. Measures performance latency, throughput, memory and quality TF1, SF1 against ground truth. Evidence: `tools/benchmark-harness/README.md`
- **VLM-OCR Python Reference Baselines** (documentation): This directory scaffolds Python reference baseline pipelines for three VLM-OCR models used in Phase 6 benchmark-gate scoring. Evidence: `tools/benchmark-harness/python_baselines/README.md`
- **generate-test-fixtures** (documentation): Deterministic fixture-generation toolkit for xberg integration tests. Evidence: `tools/generate_test_fixtures/README.md`
- **Contributing Guide** (documentation): Thank you for your interest in contributing to Xberg! This guide covers everything you need — from picking an issue to getting your pull request merged. Evidence: `docs/contributing.md`
- **Docker Configuration Testing Scripts** (documentation): Docker Configuration Testing Scripts Evidence: `scripts/test/README.md`
- **Features** (documentation): A map of what Xberg can do. Each section links to the guide or reference page with configuration details and code examples. Evidence: `docs/features.md`
- **Xberg** (documentation): Full content intelligence from one engine. Turn documents, URLs, code, and media into clean, structured output. Extract text, tables, entities, code structure, and embeddings—with automatic OCR, transcription, enrichment, and LLM-powered extraction. Available natively in 15 languages. Evidence: `docs/index.md`
- **Architecture** (documentation): Xberg is a document extraction library with a Rust core and native bindings for Python, TypeScript, Ruby, and more. The core handles all the expensive work PDF parsing, OCR, text processing and exposes it through thin language-specific wrappers. Your code calls directly into compiled Rust. No subprocesses, no serialization, no IPC overhead. Evidence: `docs/concepts/architecture.md`
- **Integrations** (documentation): Xberg integrates with AI frameworks, databases, and search engines — bringing document extraction into your existing stack. Each integration is a standalone package published on PyPI. Evidence: `docs/integrations/index.md`
- **include "xberg.h"** (documentation): c title="C" include "xberg.h" include include Evidence: `docs/snippets/c/api/combining_all_features.md`
- **Combining All Features** (documentation): csharp title="C " using System; using System.Threading.Tasks; using Xberg; Evidence: `docs/snippets/csharp/advanced/combining_all_features.md`
- **Combining All Features** (documentation): var config = new ExtractionConfig { OutputFormat = OutputFormat.Markdown, UseCache = true, Ocr = new OcrConfig { Enabled = true, Backend = OcrBackendType.Tesseract, Languages = "eng" }, ImageExtraction = new ImageExtractionConfig { Enabled = true, MinImageHeight = 100, MinImageWidth = 100 }, Chunking = new ChunkingConfig { Enabled = true, ChunkerType = ChunkerType.Text, MaxCharacters = 2000, Overlap = 100 }, LanguageDetection = new LanguageDetectionConfig { Enabled = true } }; Evidence: `docs/snippets/csharp/api/combining_all_features.md`
- **Combining All Features** (documentation): dart title="Dart" import 'package:xberg/xberg.dart'; Evidence: `docs/snippets/dart/api/combining_all_features.md`
- **Build a comprehensive extraction config as a JSON string or map** (documentation): elixir title="Elixir" defmodule Example do def full extraction pipeline do Build a comprehensive extraction config as a JSON string or map config json = Jason.encode! %{ "use cache" = true, "enable quality processing" = true, "force ocr" = false, "ocr" = %{ "backend" = "tesseract", "language" = "eng" }, "chunking" = %{ "max characters" = 800, "overlap" = 100, "chunker type" = "Markdown", "prepend heading context" = true }, "output format" = "Markdown", "include document structure" = true, "images" = %{ "extract images" = true }, "language detection" = %{ "detect" = true } } Evidence: `docs/snippets/elixir/api/combining_all_features.md`
- **Combining All Features** (documentation): func main { trueVal := true maxChars := uint 1000 overlap := uint 200 config := xberg.ExtractionConfig{ UseCache: &trueVal, EnableQualityProcessing: &trueVal, Ocr: &xberg.OcrConfig{ Backend: "tesseract", Language: "eng", }, Chunking: &xberg.ChunkingConfig{ MaxCharacters: &maxChars, Overlap: &overlap, }, } Evidence: `docs/snippets/go/api/combining_all_features.md`
- **Combining All Features** (documentation): java title="Java" import io.xberg.Xberg; import io.xberg.ExtractInputKind; import io.xberg.ExtractedDocument; import io.xberg. ; import java.nio.file.Paths; import java.util.Optional; Evidence: `docs/snippets/java/api/combining_all_features.md`
- **Combining All Features** (documentation): kotlin title="Kotlin" import io.xberg. import java.util.Optional Evidence: `docs/snippets/kotlin/api/combining_all_features.md`
- **Combining All Features** (documentation): php title="PHP" <?php declare strict types=1 ; Evidence: `docs/snippets/php/api/combining_all_features.md`
- **Combining All Features** (documentation): python title="Python" import asyncio from xberg import ExtractInput, extract, ExtractionConfig, ChunkingConfig, EmbeddingConfig, EmbeddingModelType, LanguageDetectionConfig, TokenReductionConfig, Evidence: `docs/snippets/python/advanced/combining_all_features.md`
- **OCR: extract text from images, fallback to Tesseract** (documentation): python title="Python" from xberg import ExtractInput, ExtractionConfig, OcrConfig, ChunkingConfig, ChunkerType, ImageExtractionConfig, OutputFormat, extract, Evidence: `docs/snippets/python/api/combining_all_features.md`
- **Combining All Features** (documentation): config = Xberg::ExtractionConfig.new enable quality processing: true, Evidence: `docs/snippets/ruby/api/combining_all_features.md`
- **tokio::main** (documentation): rust title="Rust" use xberg::{ ChunkingConfig, ChunkerType, ExtractionConfig, ExtractInput, ImageExtractionConfig, OcrConfig, OutputFormat, extract, }; Evidence: `docs/snippets/rust/api/combining_all_features.md`
- **Combining All Features** (documentation): swift title="Swift" import Foundation import Xberg import RustBridge Evidence: `docs/snippets/swift/api/combining_all_features.md`
- **Combining All Features** (documentation): typescript title="TypeScript" import { extract } from "@xberg-io/xberg"; Evidence: `docs/snippets/typescript/api/combining_all_features.md`
- **Combining All Features** (documentation): typescript title="TypeScript" import { extract } from "@xberg-io/xberg"; Evidence: `docs/snippets/typescript/getting-started/combining_all_features.md`
- **Combining All Features** (documentation): typescript title="WASM" import { initWasm, extract } from "@xberg-io/xberg-wasm"; Evidence: `docs/snippets/wasm/api/combining_all_features.md`
- **Combining All Features** (documentation): zig title="Zig" const std = @import "std" ; const xberg = @import "xberg" ; Evidence: `docs/snippets/zig/api/combining_all_features.md`
- **Package** (package_manifest): { "name": "xberg-root", "version": "1.0.0-rc.9", "private": true, "scripts": { "typecheck": "pnpm -r --if-present run typecheck" }, "devDependencies": { "@emnapi/core": "^1.11.1", "@emnapi/runtime": "1.11.1", "@vitest/coverage-v8": "^4.1.9", "tsx": "^4.22.4", "typescript": "^6.0.3", "vitest": "^4.1.9" }, "packageManager": "pnpm@11.9.0+sha512.bd682d5d03fe525ef7c9fd6780c6884d1e756ac4c9c9fe00c538782824310dcf90e3ddc4f53835f06dfaebd5085e41855e0bcbb3b60de2ac5bbab89e5036f03b" } Evidence: `package.json`
- **Contributing to Xberg** (documentation): Thank you for your interest in contributing to Xberg! Whether you're fixing a typo, adding a feature, or improving documentation, every contribution makes a difference. Evidence: `CONTRIBUTING.md`
- **Package** (package_manifest): { "name": "@xberg-io/xberg-cli", "version": "0.0.1", "description": "CLI proxy for xberg — downloads and runs the native xberg binary from GitHub releases.", "license": "MIT", "author": "Na'aman Hirschfeld", "repository": { "type": "git", "url": "git+https://github.com/xberg-io/xberg.git", "directory": "cli-proxy/npm" }, "bin": { "xberg": "bin/xberg.js" }, "files": "bin/", "install.js" , "type": "module", "publishConfig": { "access": "public" }, "engines": { "node": " =18" } } Evidence: `cli-proxy/npm/package.json`
- **Package** (package_manifest): { "name": "@xberg-io/xberg-darwin-arm64", "version": "1.0.0-rc.9", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/xberg-io/xberg.git" }, "main": "xberg-node.darwin-arm64.node", "files": "xberg-node.darwin-arm64.node" , "os": "darwin" , "cpu": "arm64" , "engines": { "node": " = 22" }, "publishConfig": { "access": "public" } } Evidence: `crates/xberg-node/npm/darwin-arm64/package.json`
- **Package** (package_manifest): { "name": "@xberg-io/xberg-darwin-x64", "version": "1.0.0-rc.9", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/xberg-io/xberg.git" }, "main": "xberg-node.darwin-x64.node", "files": "xberg-node.darwin-x64.node" , "os": "darwin" , "cpu": "x64" , "engines": { "node": " = 22" }, "publishConfig": { "access": "public" } } Evidence: `crates/xberg-node/npm/darwin-x64/package.json`
- 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/snippets/php/README.md`, `docs/snippets/php/plugins/README.md`, `README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `docs/snippets/php/README.md`, `docs/snippets/php/plugins/README.md`, `README.md`

## Questions the User Should Answer First

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

## Acceptance Checks

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

---

## Doramagic Context Augmentation

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

## Human Manual Outline

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

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

- **Introduction & Capabilities**: importance `high`
  - source_paths: README.md, Cargo.toml, crates/xberg/README.md, docs/index.md, docs/features.md
- **Workspace Layout & Crate Structure**: importance `high`
  - source_paths: crates/xberg/src/lib.rs, crates/xberg-ffi/Cargo.toml, crates/xberg-cli/src/main.rs, crates/xberg-tesseract/build.rs, crates/xberg-pdfium-render/src/lib.rs
- **Extraction Pipeline & Format Handlers**: importance `high`
  - source_paths: crates/xberg/src/engine/mod.rs, crates/xberg/src/engine/extract_impl.rs, crates/xberg/src/core/extractor/mod.rs, crates/xberg/src/core/pipeline/mod.rs, crates/xberg/src/core/mime.rs
- **OCR Backends & Configuration**: importance `high`
  - source_paths: crates/xberg/src/ocr/mod.rs, crates/xberg/src/ocr/backends/tesseract.rs, crates/xberg/src/ocr/backends/paddleocr.rs, crates/xberg/src/ocr/tesseract_backend.rs, crates/xberg/src/ocr/tesseract_wasm_backend.rs
- **Language Bindings, FFI & Polyglot**: importance `high`
  - source_paths: crates/xberg-ffi/src/lib.rs, crates/xberg-ffi/include/xberg.h, crates/xberg-ffi/src/config/loader.rs, crates/xberg-ffi/src/cancellation.rs, crates/xberg-node/src/lib.rs
- **Plugin System, Enrichment & Embeddings**: importance `high`
  - source_paths: crates/xberg/src/plugins/traits.rs, crates/xberg/src/plugins/mod.rs, crates/xberg/src/plugins/registry/mod.rs, crates/xberg/src/plugins/extractor/trait.rs, crates/xberg/src/plugins/processor/trait.rs
- **Deployment Modes & Serving**: importance `medium`
  - source_paths: crates/xberg/src/api/mod.rs, crates/xberg/src/api/router.rs, crates/xberg/src/api/startup.rs, crates/xberg/src/mcp/server.rs, crates/xberg/src/core/server_config/loader.rs
- **Known Issues, Limitations & Migration Notes**: importance `high`
  - source_paths: crates/xberg/src/pdf/mod.rs, crates/xberg-tesseract/build.rs, crates/xberg-tesseract/src/shim.cpp, crates/xberg/src/ocr/tessdata_manager.rs, crates/xberg/src/model_download.rs

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `293f1eaadc8917ff4f7408c15aec1236fe98443e`
- inspected_files: `README.md`, `package.json`, `pnpm-lock.yaml`, `pyproject.toml`, `uv.lock`, `docs/CHANGELOG.md`, `docs/cli/usage.md`, `docs/concepts/architecture.md`, `docs/concepts/extraction-pipeline.md`, `docs/concepts/plugin-system.md`, `docs/contributing.md`, `docs/ecosystem.md`, `docs/features.md`, `docs/getting-started/installation.md`, `docs/getting-started/quickstart.md`, `docs/guides/agent-skills.md`, `docs/guides/api-server.md`, `docs/guides/chunking.md`, `docs/guides/code-intelligence.md`, `docs/guides/configuration.md`

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: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: bug: HF/ONNX model download fails behind corporate TLS-MITM — no custom CA support
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: bug: HF/ONNX model download fails behind corporate TLS-MITM — no custom CA support. Context: Observed when using windows, macos, linux
- Why it matters: Developers may fail before the first successful local run: bug: HF/ONNX model download fails behind corporate TLS-MITM — no custom CA support
- Evidence: failure_mode_cluster:github_issue | https://github.com/kreuzberg-dev/kreuzberg/issues/1146
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: bug: kreuzberg maps PDF ligature glyphs to C0 control characters
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: bug: kreuzberg maps PDF ligature glyphs to C0 control characters. Context: Observed during installation or first-run setup.
- Why it matters: Developers may fail before the first successful local run: bug: kreuzberg maps PDF ligature glyphs to C0 control characters
- Evidence: failure_mode_cluster:github_issue | https://github.com/kreuzberg-dev/kreuzberg/issues/1135
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: feat: support PaddleOCR-VL 1.6 and PP-OCRv6 models
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: feat: support PaddleOCR-VL 1.6 and PP-OCRv6 models. Context: Observed when using python
- Why it matters: Developers may fail before the first successful local run: feat: support PaddleOCR-VL 1.6 and PP-OCRv6 models
- Evidence: failure_mode_cluster:github_issue | https://github.com/kreuzberg-dev/kreuzberg/issues/1149
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
