Jeles' verified-nugget corpus organ: pure SOIL-backed storage/ranking, a standalone MCP server, best-effort fleet gap-forwarding, and the canonical Jeles persona.
Project description
jeles
The verified-corpus organ, extracted from the Ask Jeles app into its own installable package — plus the canonical Jeles persona.
A nugget is a human-verified question/answer pair with citations:
{question, answer, sources, verified_by, verified_at, tags}. This package
is the settled layer of answers that sits in front of a host's live
search — a confident nugget match answers instantly; everything else falls
through to the host's own search path unchanged. Misses are logged as
gaps ("I don't know yet") so the corpus knows what it's been asked and
couldn't answer.
What's in the organ
| Module | Role |
|---|---|
jeles.corpus |
Pure storage + ranked lookup of verified nuggets and gap logging. Stdlib-only, no MCP, no network at import. Reuses willow-mcp's SOIL Store SQLite schema at $WILLOW_STORE_ROOT/<collection>/store.db. |
jeles.corpus_server |
Standalone FastMCP server over the corpus (python -m jeles.corpus_server). Mirrors willow-mcp's shape (app_id on every tool) without depending on willow-mcp. |
jeles.willow_mcp_client |
Best-effort, fire-and-forget forwarding of gaps into willow-mcp's fleet-wide backlog. Never blocks, never raises; 30s retry cooldown so a single failed connect doesn't permanently disable forwarding. |
jeles.load_persona() |
Loads the canonical Jeles persona JSON (this package is its canonical home). |
Design principles
- The corpus sits in front of live search, it doesn't replace it. A confident nugget match answers instantly — no search, no LLM call.
corpus.pystays pure. Storage and ranking have no MCP, no network, no side effects beyond SQLite. Everything MCP-shaped wraps it; it never depends on anything MCP-shaped itself. This is what keeps its tests fast and network-free.- The corpus is its own standalone MCP server, on purpose.
corpus_server.pyis a small FastMCP server any stdio client can run directly, mirroring willow-mcp's shape without depending on it. - Two kinds of "ask," two gap-logging rules.
search_nuggets()(passive/background) checks the corpus but never logs a gap on a miss.ask_corpus()(deliberate) treats a miss — or a match belowMIN_ASK_SCORE— as a real gap worth tracking, and logs it. - Local is the source of truth; the fleet backlog is additive.
corpus.log_gap()(synchronous, local SQLite) always runs first and makes the host fully functional offline.willow_mcp_client.forward_gap()is a best-effort copy into willow-mcp's shared backlog.
Install
Base jeles has zero runtime dependencies. The corpus, the persona, and the
reactions are stdlib-only, so a host can depend on this package without
inheriting a single version constraint from it. Only the standalone MCP server
needs the SDK, and it lives behind an extra.
pip install jeles # corpus + persona + reactions. No dependencies.
pip install "jeles[mcp]" # adds the MCP SDK, for the standalone server
pip install -e ".[dev]" # editable, with pytest and the SDK
Or as a host dependency, straight from git:
jeles @ git+https://github.com/rudi193-cmd/Jeles@main
jeles[mcp]is pinned to MCP SDK 1.x.mcp.server.fastmcpwas removed in SDK 2.0 andcorpus_server.pyhas not been ported tomcp.server.mcpserver.MCPServeryet, so the extra cannot currently be installed alongside willow-mcp (which requiresmcp>=2). Basejelescan be — that is the whole point of it being dependency-free.
Versioning
The version comes from the git tag (hatch-vcs), not from a literal in
pyproject.toml, and jeles.__version__ reads it back out of installed package
metadata. There is exactly one place a release number is decided, so a tag
cannot disagree with the artifact it builds.
Usage
As a library
from jeles import corpus
corpus.put_nugget(
question="What is the primary color in Grove?",
answer="The primary color in Grove is #ffffff (white).",
sources=["safe-library/themes/grove.json"],
verified_by="designer",
tags=["color", "grove", "primary"],
)
hit = corpus.ask_corpus("What is the primary color in Grove?")
# -> {"found": True, "exact": True, "nugget": {...}, "candidates": [...]}
miss = corpus.ask_corpus("What is the accent color in Tokyo Night?")
# -> {"found": False, ...} and the question is logged as a gap
As a standalone MCP server
python -m jeles.corpus_server # stdio; or use the `jeles-corpus-mcp` console script
Tools: corpus_ask, corpus_search, corpus_get, corpus_list, corpus_put, corpus_gaps — each takes an app_id for naming-convention parity with willow-mcp.
The persona
import jeles
persona = jeles.load_persona() # dict; canonical Jeles persona
Configuration
| Env var | Default | Effect |
|---|---|---|
WILLOW_STORE_ROOT |
~/.willow/store |
Root under which <collection>/store.db lives. |
JELES_CORPUS_COLLECTION |
ask_jeles_corpus |
Nugget collection name (back-compat with Ask Jeles). |
JELES_CORPUS_GAPS_COLLECTION |
ask_jeles_corpus_gaps |
Local gap-log collection name. |
JELES_CORPUS_APP_ID |
ask-jeles |
app_id used when forwarding gaps to willow-mcp. |
JELES_CORPUS_TOPIC |
ask-jeles-corpus |
Backlog topic gaps are forwarded under. |
WILLOW_MCP_CMD |
— | Explicit command to launch willow-mcp (else willow-mcp on PATH, else python -m willow_mcp). |
ASK_JELES_USE_WILLOW_MCP |
1 |
Set to 0/false/no to disable fleet gap-forwarding entirely. |
The Ask Jeles-flavored defaults are preserved so an existing store and its already-forwarded fleet backlog keep resolving after the extraction.
Tests
pytest -q
corpus.py's tests are fast and network-free by construction; the
willow-mcp client tests never spin up a real subprocess. An import-purity
test asserts that importing jeles.corpus loads no MCP or network modules.
License
Apache-2.0 — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jeles-0.1.0.tar.gz.
File metadata
- Download URL: jeles-0.1.0.tar.gz
- Upload date:
- Size: 45.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30a1b64de45742eac6db987478690bbd4d1058e032bf939162c1d6bd8e24cf1e
|
|
| MD5 |
9cc2a1dd5c8b13e2f4d783db37b291d5
|
|
| BLAKE2b-256 |
4120c5f2827baed2b4b59eed9a96437035625de11025b3960009f38e8c4a95d1
|
Provenance
The following attestation bundles were made for jeles-0.1.0.tar.gz:
Publisher:
release.yml on rudi193-cmd/Jeles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jeles-0.1.0.tar.gz -
Subject digest:
30a1b64de45742eac6db987478690bbd4d1058e032bf939162c1d6bd8e24cf1e - Sigstore transparency entry: 2330705199
- Sigstore integration time:
-
Permalink:
rudi193-cmd/Jeles@b451b64f7eee1486b2e3e569bf3489a3080b8f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rudi193-cmd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b451b64f7eee1486b2e3e569bf3489a3080b8f5c -
Trigger Event:
push
-
Statement type:
File details
Details for the file jeles-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jeles-0.1.0-py3-none-any.whl
- Upload date:
- Size: 35.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33099638a30ea3ad68455c27b04dce14868b4348d59a8c75190d300143bd3560
|
|
| MD5 |
a01ab5012bbc1f8f31d6d772fb2ae1a0
|
|
| BLAKE2b-256 |
235c9d292a5a86a9dd0f74f894a5cf1a5094f3d3651e8fd9f1029a386ba1f765
|
Provenance
The following attestation bundles were made for jeles-0.1.0-py3-none-any.whl:
Publisher:
release.yml on rudi193-cmd/Jeles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jeles-0.1.0-py3-none-any.whl -
Subject digest:
33099638a30ea3ad68455c27b04dce14868b4348d59a8c75190d300143bd3560 - Sigstore transparency entry: 2330705335
- Sigstore integration time:
-
Permalink:
rudi193-cmd/Jeles@b451b64f7eee1486b2e3e569bf3489a3080b8f5c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rudi193-cmd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b451b64f7eee1486b2e3e569bf3489a3080b8f5c -
Trigger Event:
push
-
Statement type: