searching-the-corpus

Search a crawled newsletter corpus with LLM relevance judging and generate PT-BR summaries.

2|1|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/frederico-kluser/newsletter-crawler --skill searching-the-corpus-frederico-kluser
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: searching-the-corpus
Source: https://github.com/frederico-kluser/newsletter-crawler/tree/main/.agents/skills/searching-the-corpus
Command: npx skills add https://github.com/frederico-kluser/newsletter-crawler --skill searching-the-corpus-frederico-kluser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing the search, summarization, or web UI code of the newsletter-crawler requires knowing how its two LLM search modes, tag-based retrieval, SSE streaming, and PT-BR summary pipeline fit together; this Skill injects that architecture knowledge so changes stay consistent across the CLI, local web server, and static webapp. ## Core Features & Use Cases - Two CLI search modes: Mode A runs exhaustive per-article Flash relevance judging with fail-open verdicts and cost guards; Mode B derives tags with exactly 5 Pro calls and retrieves via the existing 9-facet taxonomy in article_tags. - AI-first web search: POST /api/search and the SSE route GET /api/search/stream provide batched soft judging and per-article deep judging with source/date scoping, live progress/hit events, key modal handling, and 428/409 guards. - PT-BR summaries: the summarize stage writes title_pt/summary_pt while keeping original content, idempotently and as a post-crawl hook. - Use Case: When modifying src/search.js to change the batch judging prompt, use this Skill to remember the verbatim-copy sync requirement with webapp/src/lib/search.js and the eval gate node eval/run-eval.mjs --batch. ## Quick Start Ask the AI to modify the web search endpoint in src/web.js to add a new filter, following the searching-the-corpus skill guidance.

Frequently Asked Questions about searching-the-corpus

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search a saved newsletter corpus with an LLM?▼

Use the search command with Mode A for exhaustive per-article Flash relevance judging, or Mode B for cheap tag-based retrieval using 5 Pro calls mapped to the taxonomy facets. The web UI offers soft batched judging and a deep per-article toggle.

What is the difference between search Mode A and Mode B?▼

Mode A scans every article in scope with Flash relevance judging returning direct/similar/none verdicts, with a cost confirmation guard. Mode B makes exactly 5 Pro calls to derive facet tags, then retrieves articles via json_each tag matching ranked by match count.

How are PT-BR summaries generated for crawled articles?▼

The summarize stage writes title_pt and summary_pt columns using a Flash high model, keeping the original content untouched for search and tags. It is idempotent via a summary_pt IS NULL check and runs automatically as a post-crawl hook.

Does the web search support streaming results?▼

Yes, GET /api/search/stream emits SSE progress, hit, done, and error events at article level in both soft and deep modes. The client uses an abortable fetch-based parser rather than EventSource so it can read 428/409 status codes and cancel.

Why must prompt changes be synced to the webapp?▼

The static webapp contains verbatim copies of the relevance schemas, batch prompts, and merge logic from src/llm.js and src/search.js because the browser cannot import Node modules. Editing the rubric without updating webapp/src/lib/search.js desynchronizes browser-side AI search.

When should I not rebuild the tag taxonomy?▼

Never rebuild it: the 9-facet taxonomy already exists in config/taxonomy.json with classification persisted to article_tags. Search features should reuse validateFacetTags, RETRIEVAL_FACETS, and isToolByTags instead of creating new classification logic.