/semantic-search:build-semantic-okf-tika-malletfrom semantic-search
Builds and independently validates an atomic Semantic OKF snapshot from local PDF, Office, archive, media, or other files extracted by Apache Tika 4.0.0-beta-1, then add a non-authoritative Java MALLET 2.1.0 topic, BM25, PPMI, and fusion retrieval projection. Use when Codex needs to experiment with Tika's new default Markdown output, test heterogeneous document ingestion, or compare fixed-seed MALLET topics while preserving OKF authority and provenance. This standalone experimental skill builds only; it never consults or answers from published knowledge.
Ships in semantic-search. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Build one format-diverse Semantic OKF release whose extraction receipts and topic
projection can be reproduced independently. Treat Tika 4.0.0-beta-1 as preview
software and MALLET topics as discovery signals, never ontology truth.
concepts/, semantic/records.jsonl, and purpose-selected RDF graphs
authoritative. Keep Tika metadata as provenance and classical/ as replaceable
discovery data.ExtractedDocument ontology or Semantic OKF mappings.4.0.0-beta-1. Inventory exact
local files and assign stable source IDs and concept types.verify_default_markdown: true. The default body mode is
Tika-produced Markdown. Use
body_mode: utf8-verbatim-tika-verified only for a pinned UTF-8 textual
source whose exact bytes are already the authoritative representation.scripts/requirements.txt. If downloads or installation are forbidden, verify
that the current interpreter already provides every pinned requirement and use
it directly; never create an empty virtual environment or invoke an installer.
Preflight the explicit Java, Tika, and MALLET paths.Resolve the three runtime inputs before creating the destination. When
SEMANTIC_OKF_JAVA, SEMANTIC_OKF_TIKA_HOME, and
SEMANTIC_OKF_MALLET_HOME are present, treat their values as the caller's exact
closed runtime contract: use them directly and do not scan /, search the PATH,
or substitute /usr/bin/java. The Java argument must name the regular canonical
JDK file, never a symlink. If any variable is absent, require the caller's explicit
absolute path instead of guessing or downloading a replacement.
Honor the caller's dependency boundary before preflight. When installation is
allowed, create one isolated build environment and install
scripts/requirements.txt. When the caller forbids downloads or dependency
installation, use the supplied CPython 3.12 interpreter directly after verifying
the installed distributions and versions against every non-comment requirement in
scripts/requirements.txt; fail closed on any missing or mismatched dependency.
Do not create a virtual environment, run pip install, or access the network in
that qualified-runtime branch.
Run runtime_smoke.py exactly once before any build. Require every output path to
be absent; never delete or overwrite a destination to recover from a preflight or
build error. A failed private candidate is the builder's responsibility to clean
up. When two reproducibility destinations are requested, use this exact sequence:
one runtime smoke, first build, first independent validation, second build, second
independent validation, then one sorted relative-path/SHA-256 inventory comparison.
Do not run script --help probes or repeat a successful build or validation.
Run from this skill directory, or prefix each script with the copied skill root:
python scripts/runtime_smoke.py --java "$SEMANTIC_OKF_JAVA" --tika-home "$SEMANTIC_OKF_TIKA_HOME" --mallet-home "$SEMANTIC_OKF_MALLET_HOME"
python scripts/build_semantic_okf_tika_mallet.py ingestion-plan.json retrieval-plan.json OUTPUT --java "$SEMANTIC_OKF_JAVA" --tika-home "$SEMANTIC_OKF_TIKA_HOME" --mallet-home "$SEMANTIC_OKF_MALLET_HOME" --concept-layout source-packed-v1 --output-format json
python scripts/validate_semantic_okf_tika_mallet.py OUTPUT --java "$SEMANTIC_OKF_JAVA" --mallet-home "$SEMANTIC_OKF_MALLET_HOME" --output-format json
The destination must not exist. The Tika application directory must contain
tika-app-4.0.0-beta-1.jar; the MALLET directory must contain
lib/mallet-2.1.0.jar; Java must be version 17 or later.
The recommended source-packed layout affects only repeated structured CSV,
JSON, or RDF records. Tika-extracted Markdown documents remain one file per
source, and all ledger identities, exact bodies, extraction receipts, locators,
and MALLET ranking content remain unchanged. Core-bound indexes and reports are
regenerated for the new physical tree.
The builder verifies that Tika's no-flag output equals explicit --md, stores
canonical --json metadata, generates the fixed OKF ontology and SHACL rules,
builds the authoritative core, and runs MALLET with one thread and the exact seed.
For an explicitly declared utf8-verbatim-tika-verified source, it still performs
both Markdown calls and the metadata call, requires Tika to detect a textual media
type, and then stores strict UTF-8 source text with only CRLF/CR converted to LF.
It rejects a BOM, invalid UTF-8, leading or trailing whitespace, and non-textual
suffixes or media types. This mode verifies Tika metadata and type; it does not
claim that Tika produced the authoritative body.
All files are built privately and published together with one atomic no-replace
rename; a destination that appears concurrently is a hard failure.
Before delivery, confirm:
agents/openai.yaml (opens in a new tab)references/coherence-contract.md (opens in a new tab)references/manifest.md (opens in a new tab)references/python-runtime.md (opens in a new tab)references/source-combination.md (opens in a new tab)references/tika-mallet-contract.md (opens in a new tab)references/tika-mallet-format.md (opens in a new tab)scripts/_build_semantic_okf_core.py (opens in a new tab)scripts/_safe_paths.py (opens in a new tab)scripts/_semantic_okf.py (opens in a new tab)scripts/_tika_ingestion.py (opens in a new tab)scripts/_tika_mallet_retrieval.py (opens in a new tab)scripts/build_semantic_okf_tika_mallet.py (opens in a new tab)scripts/requirements.in (opens in a new tab)scripts/requirements.txt (opens in a new tab)scripts/runtime_smoke.py (opens in a new tab)scripts/validate_okf_bundle.py (opens in a new tab)scripts/validate_semantic_okf_tika_mallet.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/build-semantic-okf-rust-malletBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus a non-authoritative retrieval projection with RustMallet sparse-Gibbs LDA, Bag of Words, Okapi BM25, PPMI query expansion, and diversity-aware reranking. Use when Codex needs fixed-seed probabilistic topics without embeddings or hosted model calls, or needs to compare RustMallet against deterministic classical topic communities. This standalone skill owns construction only and never answers from a published snapshot./build-semantic-okf-rust-mallet-evolvedBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus a non-authoritative retrieval projection with RustMallet sparse-Gibbs LDA, Bag of Words, Okapi BM25, PPMI query expansion, and diversity-aware reranking. Use when Codex needs fixed-seed probabilistic topics without embeddings or hosted model calls, or needs to compare RustMallet against deterministic classical topic communities. This standalone skill owns construction only and never answers from a published snapshot.Other plugins' skills for the same job
/build-semantic-okf-tantivyBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus the deterministic, non-authoritative classical projection consumed by the frozen Tantivy BM25 consultant. Use when Codex must construct, reproduce, diagnose, or optimize a snapshot specifically for consult-semantic-okf-tantivy without modifying the frozen consultation skill. This standalone skill owns construction only and never answers from a published snapshot.npx claudepluginhub gvillarroel/plugins --plugin semantic-search