mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 14:07:49 +01:00
Indexes the arch-wiki-docs dump that is already on disk and exposes it
to the knowledge-rag MCP server, so Arch questions can be asked by
symptom ("why doesn't my systemd user unit see DISPLAY under i3")
rather than by page title, with no network round-trip at query time.
The one Arch-specific MCP server in the wild fetches pages over the
network and bundles pacman operations that duplicate the local yay-mcp.
This does neither: it only searches, against a local corpus.
install.sh installs its own dependencies, wires the MCP config and
registers a pacman hook so the index follows package updates. The
generated index is machine-specific and regenerable, so it is
gitignored rather than committed.
_reindex_entry runs under the knowledge-rag interpreter, where
mcp_server is importable and this repo's packages are not. Resolving
that import with importlib.import_module states the deferral outright
instead of a function-level import statement that reads as an oversight,
and the backend failure path now re-raises as SystemExit, so the
exit-code translation is explicit rather than a swallowed exception.
Both replace lint suppressions; the package carries none.
pylint runs in its own venv, so beautifulsoup4 and markdownify are
declared there too — being in meta/requirements.txt does not make them
resolvable to the hook.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YQLwdquDCNmWtvgi3Lk72J
18 lines
1.2 KiB
JSON
18 lines
1.2 KiB
JSON
{
|
|
"title": "archwiki_rag: offline semantic search over the Arch Wiki",
|
|
"objective": "Let Claude answer Arch questions by symptom rather than by page title, with no network round-trip, by indexing the arch-wiki-docs dump that is already on disk and exposing it to the knowledge-rag MCP server.",
|
|
"acceptance_criteria": [
|
|
"Converts the local arch-wiki-docs dump into a markdown corpus without fetching pages over the network",
|
|
"Builds a searchable index and refreshes it via `sync --reindex`",
|
|
"install.sh installs its own dependencies, wires the MCP config and registers a pacman hook so the index follows package updates",
|
|
"100% branch coverage across every module in python_pkg/archwiki_rag",
|
|
"The generated index is not committed (machine-specific, binary, regenerable)"
|
|
],
|
|
"out_of_scope": [
|
|
"Duplicating yay-mcp's pacman install/remove/update, PKGBUILD checks or system stats — this package only searches",
|
|
"Fetching wiki pages over the network at query time",
|
|
"Replacing the generic wiki-kb pipeline for non-Arch wikis"
|
|
],
|
|
"verifier": "python -m pytest python_pkg/archwiki_rag --cov=python_pkg.archwiki_rag (61 passed, 100% branch coverage on cli, constants, convert, reindex, sync, _reindex_entry)"
|
|
}
|