From f747beec4d618b5cf2f1f1395419f0a292816940 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Mon, 27 Apr 2026 11:46:45 -0400 Subject: [PATCH] =?UTF-8?q?make=20query=20Q=3D"..."=20=E2=80=94=20canonica?= =?UTF-8?q?l=20CLI=20for=20corpus=20Q&A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per CLAUDE.md "every workflow lives behind a make target," `aborist` isn't on PATH outside the venv. Add `make query Q=""` and `make query-dry Q="..."` so the user-facing entry point is a make invocation, not a venv path. make query Q="What is anarcho-capitalism?" make query-dry Q="..." # skip the LLM, return context only Override QUERY_TOP_K=N to widen/narrow the source set. --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index d33f305..4b37398 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,21 @@ ingest-old-attached: bootstrap fetch-old ## sharded ingest of old history (Phase stats-shards: bootstrap ## cross-shard stats via UNION views over $(SHARDS_DIR) $(ABORIST) --shards-dir $(SHARDS_DIR) stats +# Multi-source RAG query against the shard cluster. +# Usage: make query Q="What is anarcho-capitalism?" +QUERY_TOP_K ?= 8 +query: bootstrap ## ask the corpus a question; sources are picked across shards + @if [ -z "$$Q" ] && [ -z "$(Q)" ]; then \ + echo "usage: make query Q=\"your question\""; exit 2; \ + fi + $(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) "$(Q)" + +query-dry: bootstrap ## like 'make query' but skip the LLM call (dry-run) + @if [ -z "$$Q" ] && [ -z "$(Q)" ]; then \ + echo "usage: make query-dry Q=\"your question\""; exit 2; \ + fi + $(ABORIST) --shards-dir $(SHARDS_DIR) query --top-k $(QUERY_TOP_K) --dry-run "$(Q)" + verify-shards: bootstrap ## cross-shard Merkle round-trip on a random sample $(ABORIST) --shards-dir $(SHARDS_DIR) verify -n $(VERIFY_N)