[2026-04-03 Fri]

Crucible is a personal knowledge base system where primary sources (papers, notebooks, data) are ingested and distilled by an LLM into a structured, interlinked org-mode wiki. The wiki is the LLM's domain: you rarely edit it directly. Instead, you converse with Claude, and it reads, writes, and maintains the wiki on your behalf.
The core idea, inspired by Andrej Karpathy's LLM knowledge base pattern, is that raw data from various sources is collected, then compiled by an LLM into a wiki of org-mode files, then operated on by various CLI commands to do Q&A and to incrementally enhance the wiki. Everything is viewable in Emacs via scimax.
Key design principles:
search --all), and one
crucible can be merged into another (crucible merge). Crucibles kept in git can be
cloned and kept up to date from anywhere (crucible clone, crucible pull).From PyPI:
pip install crucible-llm
crucible --versionOr from source for development:
git clone https://github.com/jkitchin/crucible.git
cd crucible
pip install -e .Then initialize a new crucible project and wire it into Claude Code:
cd /path/to/your/project
crucible init --root .
crucible install # installs Claude Code skill + CLAUDE.md directiveThe install command does three
things:
~/.claude/skills/crucible/~/.claude/CLAUDE.md so agents know to check the
crucible before answering domain-specific questionsinit registers the project and installs
the skill, but only install writes the
~/.claude/CLAUDE.md directive. There is
one directive, so a new crucible does not take it over until you run
install in it.
Re-running install (or update) keeps a copy of a skill file you have
edited as SKILL.md.bak. To remove: crucible uninstall, which deletes only the files
crucible installed.
The skill lives in skills/crucible/SKILL.md and follows the Agent Skills
specification, so it can also be installed with knowhow (or npx skills) for Claude Code and other agents (VS
Code, Codex, OpenCode, Gemini CLI, Cursor):
uvx knowhow add jkitchin/crucible --skill crucible # this project
uvx knowhow add jkitchin/crucible --skill crucible -g # global
# or: npx skills add jkitchin/crucible --skill crucibleThe skill still needs the crucible CLI
on your PATH. Installing it this way does not generate the manifest or
the ~/.claude/CLAUDE.md directive, so run
crucible install inside your project if
you want those too. Contributors can check the skill with uvx knowhow validate ..
For semantic search, you also need ollama running with an embedding model:
ollama pull nomic-embed-text
crucible embedA crucible project keeps everything in a .crucible/ directory at its root:
your-project/
CLAUDE.md Conventions for agents working in the project
.gitignore Excludes crucible.db and sources/external/
.crucible/
crucible.db Wiki graph database (SQLite, regenerable)
references.bib Bibliography of ingested sources
sources/
external/ Copyrighted material (gitignored)
pdfs/ Academic papers, reports
web/ Web clippings
notebooks/ Your own ELN entries (shareable)
data/ Your own experimental data (shareable)
wiki/
index.org Auto-generated master index
MANIFEST.md Summary for agent discovery
concepts/ One topic per file
summaries/ One per ingested source
comparisons/ Cross-source analysis
methods/ Technique and methodology articles
The global registry of all crucibles on the machine is ~/.crucible/registry.json. Because ~/.crucible/ is the registry, the home directory
itself cannot be a crucible project.
This repository holds the Python package (src/crucible/), the agent skill (skills/crucible/SKILL.md, Agent Skills spec),
the documentation (docs/) and the tests
(tests/).
See the tutorial for a complete walkthrough. The short version:
# Ingest a source
crucible ingest paper.pdf
# Or from the web
curl -sL "URL" | pandoc -f html -t org | crucible ingest - -t "Title" --type web
# Or a batch
crucible ingest "papers/*.pdf"
# Ask Claude to distill it
# (Claude reads the source, proposes articles, you approve, it writes them)
# Sync the database
crucible sync
# Generate embeddings for semantic search
crucible embed
# Search
crucible search "activation energy" # hybrid (auto)
crucible search "how does temperature affect rate" # finds by meaning
crucible search "catalyst" --mode fts # keyword only
# Navigate
crucible concepts # list all topics
crucible concept thermodynamics # articles on a topic
crucible backlinks concepts/activation-energy.org # paths: wiki-, root- or cwd-relative
crucible related concepts/activation-energy.org
crucible history comparisons/synthesis.org # derivation chain
# Maintain
crucible lint # find problems; exits 1 on errors (--strict: warnings too)
crucible suggest # find opportunities
crucible index # regenerate index
crucible publish # export as HTML site
crucible delete wiki/concepts/old.org # remove an article or source
crucible merge other-crucible # fold another crucible into this one
crucible clone URL [DEST] # clone a crucible from git and register it
crucible pull NAME # update a clone from upstream
crucible mcp [NAME...] # serve crucibles to other agents over MCPThe documentation is published at https://kitchingroup.cheme.cmu.edu/crucible/.
Crucible is designed to be used through Claude Code. After installation, Claude automatically knows about your knowledge base and uses it to answer questions, distill sources, and maintain the wiki.
Running crucible install does three
things that wire crucible into Claude Code:
~/.claude/skills/crucible/, which teaches Claude
how to ingest sources, write wiki articles, and navigate the graph
database.MANIFEST.md, a summary of
the knowledge base contents that Claude reads to decide when the wiki is
relevant.~/.claude/CLAUDE.md that tells Claude to check
the crucible before answering domain-specific questions.The skill triggers automatically when you say things like "ingest this", "what do we know about", "search the wiki", "add to crucible", or "distill this source". You do not need to invoke it explicitly.
A typical conversation looks like this:
You: What do we know about activation energies on platinum surfaces?
Claude: [searches the wiki, reads relevant articles]
Based on the wiki, there are three articles covering this topic...
[synthesized answer with citations to wiki articles]
You: Ingest this new paper [attaches PDF]
Claude: [registers the source, reads it, proposes articles]
I found three key findings. I propose:
- Update the activation-energy concept article with the new data
- Create a summary article for this paper
Shall I proceed?
You: Yes
Claude: [writes the articles, runs crucible sync]
Done. Created wiki/summaries/smith2026.org and updated
wiki/concepts/activation-energy.org with the new measurements.
You: That comparison you just made between the two papers is interesting.
Capture that as an article.
Claude: [writes a comparison article with DERIVED_FROM properties]
The key insight is that your explorations accumulate. Every question you ask, every source you ingest, and every insight you capture makes the knowledge base richer for next time.
You can also browse the wiki in a web browser:
crucible browseThis launches a local HTTP server that renders org-mode articles as
HTML with working cross-links, citation tooltips, and a navigable
sidebar. The about page (/_about) shows
project paths, statistics, and the global registry.
When preparing a grant proposal or review paper, you typically need
to digest dozens of papers and synthesize them into a coherent
narrative. Start by ingesting a batch of PDFs with crucible ingest "papers/*.pdf", then ask Claude
to distill each one into summary and concept articles. As the wiki
grows, crucible suggest identifies
comparison opportunities where multiple summaries share concepts but no
cross-source analysis exists yet. You can then ask Claude to write
comparison articles that synthesize findings across papers, and use
crucible search to quickly find what the
wiki knows about specific topics. The result is a structured,
citation-backed knowledge base you can query as you write, rather than a
stack of annotated PDFs you have to re-read.
Experimental notebook entries often contain insights that only become
valuable months later when a new experiment connects to an old one. By
ingesting notebook entries with crucible ingest entry.org --type notebook, each
experiment gets linked to concepts and cross-referenced with prior work.
Over time, crucible related surfaces
connections you might not have noticed: two experiments six months apart
that share a concept, or a measurement that contradicts an earlier
assumption. Running crucible viz produces
a force-directed graph of your experimental knowledge, making clusters
and gaps visible at a glance. When you synthesize insights across
experiments, crucible history traces the
derivation chain so you can always find which raw observations led to
which conclusions.
In a research group, each member works on their own project but the
work often overlaps in ways nobody tracks. With crucible, each group
member maintains their own instance on their own project directory. The
PI registers all of them with crucible registry add student-name /path/to/their/crucible,
and can then run crucible search "keyword" --all to query across
every group member's knowledge base simultaneously. The results show
which crucible each hit came from, making it easy to say "talk to Alex,
they have three articles on that catalyst." Copyrighted sources stay
local to each instance (they are gitignored), so only the distilled wiki
content is visible to others.
Before a one-on-one meeting with a student, a PI can use the
student's crucible to quickly build context. Running crucible concepts shows what topics the student
has been working on, while crucible orphans reveals articles that lack
connections to the broader knowledge base, often a sign of
under-explored directions. crucible lint
flags undigested sources (papers the student ingested but never
distilled), missing cross-links, and articles without proper metadata.
crucible suggest goes further,
recommending new concept articles for topics that appear across multiple
summaries and identifying potential comparison articles. Together, these
commands give the PI a structured picture of where the student's
knowledge base is strong, where it has gaps, and what questions to
ask.
The fundamental workflow is a loop:
Each pass through the loop enriches the knowledge base. Your explorations and queries always "add up" in the crucible.
| Type | Storage | Gitignored | Examples |
|---|---|---|---|
| sources/external/pdfs/ | Yes | Papers, reports | |
| web | sources/external/web/ | Yes | Blog posts, documentation |
| notebook | sources/notebooks/ | No | Your own ELN entries |
| data | sources/data/ | No | CSV, JSON, HDF5, images |
| Type | Directory | Purpose |
|---|---|---|
| concept | wiki/concepts/ | Single topic or idea |
| summary | wiki/summaries/ | Distillation of one source |
| comparison | wiki/comparisons/ | Cross-source analysis |
| method | wiki/methods/ | Technique or methodology |
Each article has a properties drawer on its top heading with :ARTICLE_TYPE:, :SOURCE_KEYS: (the cite keys of its sources),
:STATUS:, :CREATED: and :MODIFIED: (updated on every substantive edit).
The database takes an article's dates from :CREATED: and :MODIFIED:, so a rebuild reproduces them.
Crucible offers three search modes, with auto (hybrid when embeddings exist, FTS
otherwise) as the default:
Every crucible on the machine is recorded in the global registry
(~/.crucible/registry.json), which crucible init and crucible sync keep up to date. Others can be
added by hand and queried together:
crucible registry add lab-shared /path/to/shared/crucible
crucible registry add student /path/to/student/crucible
crucible registry list
crucible search "catalyst design" --all # searches everywhere
crucible concepts --all # unified concept listA crucible kept in a git repository, on another machine or someone else's, can be cloned, registered and later updated:
crucible clone https://github.com/jkitchin/discopt.git # the discopt crucible
crucible search "branch and bound" --all # results marked [discopt]
crucible pull discopt # fast-forward and sync
crucible pull --all # every crucible made by clonediscopt commits its crucible at the top level of its repository, so it works as an example of a shared one; the clone includes discopt's code as well as its wiki.
A crucible can also be shared without being cloned: crucible mcp serves it, read-only, to any MCP
client (pip install 'crucible-llm[mcp]'):
claude mcp add discopt -- crucible mcp discopt # in Claude Code, on this machine
crucible mcp discopt --http --host 0.0.0.0 --token-env CRUCIBLE_MCP_TOKEN # for othersOnly the crucibles named are served, and never sources/external/.
crucible registry list shows each
crucible's origin (its git remote, or one set with registry add --origin). A registered crucible
that search --all cannot search is named
in a warning rather than silently left out.
Each crucible retains full independence. Queries run against separate
database connections, so there is no risk of corrupting another
crucible's data. To combine two crucibles for good, crucible merge copies another crucible's
sources, articles and bibliography into this one; it refuses a crucible
whose sources or bibliography entries repeat a cite key, which crucible lint reports so you can fix them
first.
When Claude synthesizes insights from existing wiki articles during a
conversation and you say "capture this as an article", the new article
includes a :DERIVED_FROM: property listing
the source articles. This creates a derivation chain in the
database:
crucible history comparisons/my-synthesis.org
# Derived from:
# [concept] Activation Energy (wiki/concepts/activation-energy.org)
# [summary] Smith 2024 Results (wiki/summaries/smith2024.org)You can also trace forward: "what has been derived from this article?"
A crucible knowledge base is git-friendly. Commit .crucible/wiki/, .crucible/references.bib, .crucible/sources/notebooks/, and .crucible/sources/data/. crucible init writes this .gitignore at the project root (if there is
none):
# Crucible: external sources (copyrighted, not shareable)
.crucible/sources/external/
# Crucible: database (regenerable from wiki via auto-rebuild)
.crucible/crucible.db
.crucible/crucible.db-wal
.crucible/crucible.db-shm
.crucible/crucible.db-journal
.crucible/.crucible.db.rebuild-*.tmp
# Crucible: lock file for references.bib
.crucible/references.bib.lock
# Crucible: publish output
.crucible/wiki/_build/
# Crucible: left behind only if a merge is killed
.crucible/.merge-staging-*/
The database is regenerable from the committed wiki files and references.bib. After cloning a repo that
contains a crucible, the first command that needs the database rebuilds
it automatically:
git clone <repo>
cd <repo>
crucible search "some term"
# crucible: database missing, rebuilding from wiki...
# <search results>No crucible init is needed on clone.
The rebuild creates the schema, populates articles and their cross-links
from wiki/*.org, creates sources rows from the references.bib entries whose file field names a stored file (which crucible ingest writes), adds a row for each
file in sources/notebooks/ and sources/data/ that no entry claims (a disk
scan), and regenerates MANIFEST.md and
index.org. references.bib may use braces or parentheses
around entries and compact one-line entries (as doi.org returns them);
@comment, @string and @preamble blocks are ignored.
Because the rebuild reads only committed files, deleting a source
with crucible delete also removes the
file field from its bibliography entry
(the entry is kept), so the source does not come back on the next
sync.
Semantic embeddings are not auto-regenerated (they require a local
ollama server). If you want crucible related and semantic search to work
after a clone, run:
crucible embedFull-text search (FTS5) and everything else works without embeddings.
If your crucible lives in Dropbox and is a git repo,
pick one machine as the authoritative sync point. SQLite's WAL files do
not play well with simultaneous access across Dropbox; running crucible sync from two machines at once can
produce .db conflict files. Git itself is
fine in Dropbox.
Crucible draws on several sources of inspiration:
Andrej Karpathy's LLM Wiki pattern, which articulated the idea that an LLM should incrementally build and maintain a persistent, interlinked wiki rather than re-synthesizing knowledge from scratch on every query. Crucible implements this pattern with org-mode, a graph database, and hybrid search.
scimax, an Emacs starterkit for scientists and engineers built on org-mode. Crucible inherits scimax conventions for org-mode formatting, org-ref citations, and HTML publishing, and uses scimax as a primary viewing and editing environment for the wiki.
litdb, an earlier project for managing a literature database with org-mode and SQLite. Crucible extends the ideas in litdb (structured citation management, full-text search over scientific literature) into a broader knowledge base system where the LLM handles the synthesis and cross-linking that was previously manual.
MIT. See LICENSE for details.