make query Q="..." — canonical CLI for corpus Q&A

Per CLAUDE.md "every workflow lives behind a make target," `aborist`
isn't on PATH outside the venv. Add `make query Q="<question>"` 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.
This commit is contained in:
russell@unturf.com 2026-04-27 11:46:45 -04:00
parent fc039555cc
commit f747beec4d
No known key found for this signature in database

View file

@ -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)