/hallouminate:wiki-ingest [path|topic]from Hallouminate
Folds new source material or a recorded fact into an existing hallouminate wiki, merging each claim into the page it extends. Use when the user says "add this to the wiki", "ingest these docs", "update the wiki with what we learned", "remember this", "record this decision", or invokes /wiki-ingest <path|topic>. Do NOT use to bootstrap an empty wiki (/wiki-init) or to answer a question (/wiki-query).
Ships in Hallouminate. 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.
A wiki is a compiled knowledge representation, not a retrieval dump. New material doesn't get appended blindly — it routes to the page it belongs on, merges in, and only spawns a new page when nothing covers it. The failure mode to avoid: dumping raw content that leaves the real pages stale. A smaller, curated wiki beats a larger unvetted one.
Every hallouminate MCP tool call takes a required cwd: the absolute path of
your own active checkout. In a git worktree, this can differ from the
harness's original directory. Pass the same cwd to every call in this skill.
Agent topology (required):
ground to
find the nearest existing page, reads it, and returns the match, its similarity
score, and the relevant existing lines. Retrieval and reading are fanned out;
decisions are not.repo:{name}:wiki or ask).hit ends the run for this
source: write only its skipped-duplicate-hash log row (Phase 4), then report (Phase 5). A
partial result does not end the run; continue with step 4.wiki-conventions.md (the wiki's constitution) for slug/voice/merge rules.
If absent, fall back to hallouminate's authoring conventions (one topic per file,
H1 first line, kebab slug).Done when the source passed Layer 1, every claim is atomic, and the probe query strings for each claim are frozen.
When an atomic claim comes from durable external research, create or reuse one corpus-local
sources/<slug>.md page. Before creating it, search the corpus for both the canonical URL and
exact source title, then read likely matches; either match reuses the canonical page instead of
creating a duplicate. The source page keeps this indexed retrieval spine in normal body text,
with source-appropriate evidence sections after it:
# <Exact source title>
<Publisher/author>'s <source type>, published or last verified <date>,
supports <one-sentence contribution>.
Canonical source: [<exact title>](<URL>)
## <Source-appropriate heading>
<Supported claims, project relevance, and limitations>
_Source: <canonical URL> · Updated: <date>_
The exact title, publisher or author, source type, date, contribution, and canonical URL must all be indexed body text. Frontmatter and footnotes may repeat them but cannot be their only location. Every dependent topic page must also name the source and relevant claim in indexed prose and link the corpus-local source page.
During claim decomposition, before any drafting, freeze the retrieval probes for every atomic claim: the exact topic identity; two to four natural questions derived from the atomic claim and source; the exact external-source title for a source page; and the source's central claim for the dependent topic page. Phase 1 freezes the exact query strings only, because Phase 2 has not yet located a page. Phase 3 binds the expected corpus-relative page and required rank to each frozen probe after it decides the claim. Drafting and the repair pass must use these unchanged probes; do not generate them from the finished prose.
Dispatch one fresh-context, read-only, haiku-tier sub-agent per atomic claim, all in a single
message so they run in parallel (for example Claude Agent(...), Codex spawn_agent, OMP
task(...)). When the host has no sub-agent tool, the root runs the same contract inline for
each claim. Each sub-agent follows this contract:
Run
ground { query: "<claim topic>", corpus: "<corpus>", top_files: 3, chunks_per_file: 3, cwd }. Return the best-matching existing page: its corpus-relative path, the file-levelmtime, the file-levelscoreandz_score(DocFile.score/DocFile.z_score—z_scoreis the Layer-2 banding signal;Noneunless the cross-encoder ran), and from the top chunk itsheading_path,line_range, andsnippet. (groundkeys itsdocsby absolute path andmtimeis file-level, not per-chunk — convert the key to the corpus-relative path, the same shaperead_markdown/add_markdowntake, since they reject absolute paths.) If the top score is low / nothing relevant, return{ match: none }. Do NOT edit anything — you only locate. If the match looks close,read_markdown { corpus, path, cwd }that page (relative path) and return the section that would be updated.
Read index.md glosses to route, never rewrite them. Before or within locate, read the
relevant index.md's link list for page glosses — each link's gloss is the target page's H1
only (ground returns a richer DocFile.summary, H1 + lead). Use list_tree only to enumerate
the bare page inventory; it carries no glosses. Routing is ground score ordering
cross-checked against the gloss list, not
gloss-matching alone — vague glosses cause misrouting. The link list between
<!-- HALLOUMINATE:INDEX-START --> / <!-- HALLOUMINATE:INDEX-END --> is daemon-maintained;
the skill must never edit inside those markers. A short human-routing prose paragraph may be
kept above the start marker (outside it, so the daemon leaves it alone) and refreshed via a
normal add_markdown of the prose region; it must not duplicate the auto link list. Exclude
log.md from routing — it is a journal, never a merge target.
Done when every claim has a located page (with its read-back section) or { match: none }.
Run an ordered, short-circuiting three-layer pipeline. Layer 1 runs once per source in
Phase 1, before atomize; Layers 2–3 run here per claim. Each layer runs only if the previous one
did not decide. The bands are numeric and named; the units are hallouminate
z_score/score, not raw cosine — ground exposes no cosine between two texts.
Catches identical re-ingestion of a whole source before any embedding work. Run the bundled
command instead of hashing by hand. Its path is relative to this SKILL.md directory:
python3 <this-skill-dir>/scripts/ingest-ledger check <source-file> --ledger <ledger-file>
<source-file> holds the whole source. When the source is not an existing file (a topic, a
pasted document, or conversation material), write its exact text to a temporary file and pass
that path.<ledger-file> holds the current log.md. Always read_markdown { corpus, path: "log.md", cwd }.
When log.md exists, save its content to a temporary file and pass that path as --ledger.
When log.md is absent, omit --ledger.source_id (16 hex chars), ledger (hit / partial / miss /
absent), matches (the count of matching rows), and first_match (the first matching log
row, or null). A row matches when its second ·-separated field equals source_id.
hit means a matching row has the action ingested or skipped-duplicate-hash. partial
means rows match, but none has one of those two actions.hit → skip the entire source, append a skipped-duplicate-hash row, report it. No
ground, no page read/merge — the only write is the skipped-duplicate-hash log row.partial → resume, do not skip. An earlier run logged decisions for this source but did
not complete it: a claim was blocked, or the run stopped. Continue with the full pipeline.
Layers 2–3 skip the claims that already landed.miss or absent → continue (Phase 4 scaffolds log.md on first write).cannot read source
or cannot read ledger means an unreadable input file; fix the path. Any other failure,
including cannot read lock, a download or verify error, or a traceback, means the launcher
cannot run; treat it as a miss and write — as the hash. The launcher needs Python 3.11+, and
network on first run. Report the error. Layers 2–3 still dedup each claim.source_id. Such a source
reads as miss, and Layers 2–3 dedup its claims.z_score)For each atomic claim that survived Layer 1, use the locate step's top DocFile score and
z_score (file-level — z_score drives the banding) plus the read-back section:
| Condition | Band | Decision |
|---|---|---|
z_score present and z_score ≥ 2.0 | near-duplicate | Skip unless the read-back section is missing a concrete sub-fact the claim adds; then → Layer 3 merge. |
z_score present and 1.0 ≤ z_score < 2.0 | merge band | Merge into the matched section. |
z_score present and z_score < 1.0 | novel | → Layer 3 routing (new-page candidate). |
z_score absent (None) | unnormalized | Fall back — see below. |
z_score ≥ 2.0 means "≥2 std-devs above this query's candidate mean" — the most confident match
the corpus offers for that query.
Fallback when z_score is None (RRF-only / small corpus): the numeric skip is unavailable,
so never skip on score alone. Use the raw score rank (clear top hit? large gap to #2?)
plus a verbatim-overlap check — read the matched section and skip only if the claim's key
sentence appears near-verbatim (≥ ~90% token overlap). Otherwise treat as merge band. This keeps
the "don't blend, don't silently lose a fact" guarantee without a normalized number.
score ordering)Route claims that reach here (novel / merge-band) using score ordering cross-checked against the
index.md glosses (Phase 2):
Calibration note (tunable, domain-dependent). ground returns an RRF-fused score and a
per-query relative z_score. The cutoffs (2.0, 1.0) are a starting point; adjust them when
sampled decisions look mis-banded.
Phase 3a — contradiction (LLM-as-judge, root): When the new claim conflicts with
an existing page, do NOT average them — blending produces confident wrong answers.
Judge: is the new source more authoritative or more recent (compare mtime, source
provenance)?
Supersedes: field (Supersedes: <what> · <date>).Done when every claim has exactly one decision: skip, merge, overwrite, new page, or conflict-flagged. Bind each frozen probe's expected corpus-relative page and required rank once its decision is made, before any drafting.
Apply each decision through the safe update loop:
read_markdown the page → backlinks { corpus, path, cwd } →
edit the section → add_markdown { overwrite: true, cwd }. (Read-before-clobber is
mandatory; it's your rollback point. backlinks returns the pages that
[[wikilink]] to this one — the pages that assume or build on it. If the edit
changes a claim a backlink relies on, queue that page into the same ingest pass
instead of leaving it silently stale.)path:line, shaped on the pack's
../../templates/wiki-entry.md) → add_markdown { overwrite: false, cwd }.~, or a relative path escaping the corpus root — the ingest
source itself is the common case), copy that file into the corpus first
(add_markdown, e.g. sources/<slug>.md — or a config-declared corpus it
belongs to) and link the corpus-relative copy. Web URLs pass through; code
stays a path:line citation, never a copied file._Source: <where this came from> · Updated: <date> · Supersedes: <if any>_
Freshness is a first-class signal — stale pages produce confident-wrong answers.Before journaling, verify the complete topic-and-source write set with the frozen probes:
add_markdown write has reindexed, run every unchanged probe with ground.
Exact topic-identity and source-title probes require the intended page at rank 1. Natural
questions and central-claim probes require it within the top 3.blocked, and do not append a journal row for the rolled-back
writes.written-with-retrieval-warning. Report each failed query, expected page, observed top three,
and actual rank (including absent). Journal the final warning disposition only after reporting
data is complete.Then journal the decision in log.md (append-only, never rewritten):
add_markdown { corpus, path: "log.md", under_heading: "Log", position: "append", content: <row>, cwd }
where <row> is one log row <date> · <source-hash> · <action> · <target path|—> · <summary>
and action ∈ {skipped-duplicate-hash, skipped-near-duplicate, merged, overwritten, new-page, conflict-flagged, retrieval-warning, ingested}.
Log every decision — including Layer-1 hash skips (the row is the ledger Layer 1 scans) and
every flagged contradiction. If log.md is absent, scaffold it once with
add_markdown { corpus, path: "log.md", content: "# Ingest Log\n\n## Log\n", overwrite: false, cwd }, then append.
Whole-file rewrites of log.md are forbidden — the only writes are under_heading: append splices.
After every claim of the source has a final non-blocked disposition, append one completion row:
<date> · <source-hash> · ingested · — · <claim count> claims. Layer 1 reports hit only for
a source that has this row or a skipped-duplicate-hash row. Do not append it while a claim is
blocked; the next run then gets partial and resumes the source. A Layer-1 hit run appends
only its skipped-duplicate-hash row.
The daemon reindexes each written file and refreshes ancestor index.md link lists
automatically; the marker rule in Phase 2 still applies. For edits made outside these tools,
run index to re-embed.
Done when every probe has a final disposition, every decision has one log row except writes
rolled back to blocked, and the source has its ingested row unless a claim is blocked.
Summarize per claim in one table, then list every flagged contradiction by name:
| Claim | Outcome | Page | Notes |
|---|---|---|---|
Outcome is one of: skipped / merged / overwritten / new / conflict-flagged /
written-with-retrieval-warning / blocked. For retrieval warnings, Notes gives the query,
expected page, observed top three, and actual rank. Note any page that's now large enough to split
(one-topic-per-file drift).
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/installInstall hallouminate and bootstrap the user's first LLM-authored per-repo wiki. Use when the user runs /install from the hallouminate skill pack, or asks to "install hallouminate", "set up hallouminate", "get hallouminate working", or "start a hallouminate wiki" on a machine without a working install. Do NOT use when the binary already works — route a brand-new wiki to wiki-init and new content to wiki-ingest./wiki-harvest-memoryManually curate durable, repository-specific knowledge from local Claude Code or Codex memories into the current hallouminate wiki./wiki-initBootstrap a hallouminate wiki from scratch by interviewing the user with Socratic questioning, then writing the first entries. Use when a repo has no wiki yet or the corpus is near-empty — "start a wiki", "bootstrap the knowledge base", "interview me about this project", "set up the wiki", "/wiki-init". Do NOT use to answer questions (use wiki-query) or to fold new source docs into an existing wiki (use wiki-ingest).Other plugins' skills for the same job
npx claudepluginhub paulnsorensen/hallouminate --plugin hallouminate