Skip to content

Content Workbench & Knowledge Base ​

Elthoria gives you two complementary ways to ground a campaign in your own rulebooks, adventures, and homebrew PDFs:

  1. Unified Folder-Local Kompile Knowledge Base — zero-duplication crawling, hybrid RAG, and .kgraph graph reasoning owned by the outer Kompile harness.
  2. The Content Workbench (/elthoria-content) — a 13-tool, fail-closed staging pipeline for inspecting PDFs, running explicit extraction plans through Kompile's pipeline tool, reviewing drafts with revision checks, publishing player-safe derivatives to shared retrieval, and importing verified Pathfinder 1e roll tables into the playable table roller.

1. Unified folder-local Kompile knowledge workspace ​

When running inside the Elthoria Kompile harness (elthoria), ${ELTHORIA_WORKSPACE:-~/.elthoria/kompile-harness} is the single Kompile project and knowledge-base identity (kompile-harness-knowledge).

Path / ToolOwnership & behavior
elthoria_knowledge_workspace (Elthoria MCP tool)Returns the exact resolved workspace path, managed source directory (data/input_documents/elthoria/), knowledge-base ID (kompile-harness-knowledge), crawl directory, graph.kgraph path, and native Kompile tool names
crawl_documents, crawl_control, crawl_resultNative outer Kompile tools for indexing data/input_documents/elthoria/
knowledge_status, knowledge_search, rag_search, graph_search, knowledge_graph, graph_reasoning_queryNative outer Kompile tools for searching indexed documents and traversing graph.kgraph (see Kompile Graphs & Grounded Reasoning ↗)

CAUTION

Never put GM-only secrets in data/input_documents/elthoria/. Generic retrieval topics are not ACLs or access controls. Keep GM-only PDFs, raw originals, and unreviewed drafts in private data/content/ via the Content Workbench.

Legacy remote RAG tools (KompileRagMcpTools) ​

When running elthoria server standalone (outside the Kompile harness child contract — for example from Claude Desktop or Codex), legacy rag_* tools remain available against a configured remote Kompile server: rag_query_rules, rag_list_documents, rag_list_fact_sheets, rag_switch_fact_sheet, rag_ingest_text, rag_ingest_url, rag_ingest_path, rag_ingest_path_ocr, rag_trigger_reindex, rag_get_status, rag_ocr_status, and rag_list_loaders. In local Kompile harness child mode (ELTHORIA_KOMPILE_HARNESS_CHILD=true), remote Kompile config is force-disabled so there is never a split brain.


2. The Content Workbench (ContentWorkbenchMcpTools) ​

The Content Workbench never calls a model or launches a crawler itself. It registers immutable originals, plans exact outer Kompile pipeline requests, validates untrusted captures deterministically, tracks review revisions, and enforces strict fail-closed gates before anything enters shared retrieval or the playable roll-table catalog.

ToolActionsPurpose
elthoria_content_sourcesregister, list, get, archiveRegister immutable local PDF sources with explicit title, ruleset, edition, visibility (gm_only | player_safe), and rights outside the automatic crawl root
elthoria_document_inspect(single action)Deterministically inspect 1-based physical pages, text layers, and embedded image inventory via elthoria-content-pdf (Apache PDFBox 3.0.6, bounded & symlink-safe; source text is treated as untrusted data)
elthoria_parse_profilessave, get, list, explainSave immutable task-specific parsing profiles pinning exact provider, modelId, operation, prompt/schema versions, limits, and kind-specific parsing opinions — never inherits or mutates the GM model
elthoria_content_parse_plancreate, getCreate a pinned extraction plan containing the exact outer Kompile pipeline request (does not invoke providers or grant permission)
elthoria_content_capture(single action)Capture bounded, complete raw model output into evidence-linked untrusted draft records (observedExecution metadata is stored as unverified, never execution proof)
elthoria_content_recordslist, get, revisionsInspect immutable draft/library record revisions (query typed record revisions for exact mechanics before falling back to RAG)
elthoria_content_validate(single action)Deterministically validate evidence links, class matrices/footnotes, missing-stat unknowns (never defaulted to zero), fractional CR/dice, and roll-table endpoints (2d6 range width ≠ probability)
elthoria_content_reviewpatch, accept, rejectApply revision-checked human/GM patches with reasons, revalidate, and explicitly accept or reject drafts (acceptance does not auto-publish)
elthoria_content_publishpreview, apply, status, index_plan, index_prepare, index_verify, index_ack, index_statusPreview & apply library publication for accepted player_safe derivatives; plan/prepare canonical lexical crawl updates (corpusUpdate=preserve-unselected-v1), and verify durable job/corpus receipts (LEXICAL_ONLY) fail-closed
elthoria_asset_extractmode: embedded | cropRetain an embedded PDF stream + decoded PNG, or render a normalized crop (dpi 36–200) — never redraws or auto-links portraits/maps by name
elthoria_map_preparemode: reference | calibrateRegister raster artwork as a reference map or record user-supplied grid calibration (gridType, units, cellPixels, origin) — never invents playable walls, rooms, or passability
elthoria_content_archiveexport, archiveExport revision bundles or logically archive unpublished content without deleting history or altering active play
elthoria_content_playable_importpreview, apply, statusGuarded, create-only catalog import into table_roller_catalog — only accepted player_safe roll_table records with exact Pathfinder/1e are permitted; rpg_class_catalog and npc_template_catalog fail closed
elthoria_content_qualificationfixture_save, fixture_get, model_plan, model_evaluate, report_get, crawl_plan, crawl_evaluateStore human-approved reference fixtures and evaluate supplied model or crawl observations offline in private storage (PASS_OFFLINE_UNVERIFIED never grants readiness, promotion, or index acknowledgment)

Key safety guarantees ​

  • Untrusted source boundary: PDF text and raw model captures are data, never instructions or authority to invoke tools.
  • Explicit user opt-in for external execution: Registering a source, inspecting pages, saving a profile, or creating a parse/index plan never triggers provider discovery, model downloads (model_runtime), document transmission, or crawl execution. The outer Kompile host executes authorized plans through Kompile's pipeline and crawl_documents tools.
  • Fail-closed index verification: index_prepare pins publication, source, profile, and corpus baselines (executionAllowed=false, indexed=false). Only durable job/terminal trace evidence with matching corpus generation receipt and hashes permits corpusReceiptVerified=true and indexed=true (LEXICAL_ONLY).
  • Atomic guarded roll-table import: elthoria_content_playable_import (apply) requires recordId, expectedRevision, destination: "table_roller_catalog", expectedDestinationRevision: 0, digest, expectedDestinationFingerprint, and idempotencyKey. Identical retries replay cleanly; any conflict fails closed.
  • No play-state side effects: Content intake, review, publication, qualification, and catalog import never mutate campaigns, combat trackers, or the play dashboard.

Walk through the entire pipeline step by step in Walkthrough 5: Rulebooks, Lorebooks & Content Workbench, or read the Memory Deep Dive to see how the folder-local knowledge base fits alongside authoritative canon, elthoria-memory, Lorebooks, and Kompile persistent memory.

Built on the upstream Kompile harness. Released under the MIT License.