Logo: Web Research Kb Refresh

Web Research Kb Refresh

Communautéit
d-padmanabhan
web-research-kb-refresh

Refresh a project knowledge base from web research with strict tool-call budgets, cross-referenced sources, atomic file swaps, and rollback-on-failure. Use when refreshing a KB-backed analysis (vendor facts, compliance posture, market data, security advisories), running long web-research workflows that must be predictable in cost and time, or designing any "regenerate-from-the-web" command. Generalizes the /facts-update pattern of capping web-tool calls per unit of work, keeping research separate from analyst judgment, and writing back atomically with a timestamped archive.

Iwwersiicht

Editeurd-padmanabhan
Repositoryagent-engineering-handbook
Skill-Nummweb-research-kb-refresh
Stären
20
Forks
3
Matgeliwwert Dateien
2
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    d-padmanabhan huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Web Research Kb Refresh an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/web-research-kb-refresh
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook.git /tmp/agent-engineering-handbook
mkdir -p .claude/skills
cp -r /tmp/agent-engineering-handbook/skills/web-research-kb-refresh .claude/skills/web-research-kb-refresh
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Web Research Kb Refresh an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Web Research Kb Refresh automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Web Research Kb Refresh net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Web-Research KB Refresh

Operational pattern for refreshing a knowledge base from the web with predictable cost, time, and provenance. Generalizes the consulting-toolkit /facts-update pattern so it applies to any KB-backed analysis (vendor facts, compliance posture, market data, security advisories, library/API references, etc.).

Companion rules:

  • 015-context-engineering.mdc - prompt packing, retrieval, compaction
  • 120-utilities.mdc - the underlying tools (lynx, curl, jq, ripgrep)
  • 316-zero-trust.mdc - audit and observability principles

When to invoke

Use when the user asks to:

  • "Refresh the KB" / "update the facts" / "regenerate from the web"
  • "Pull current pricing / docs / advisories" for a list of items
  • "Re-research vendor X across the catalog"
  • Build a new long-running command that calls web tools at scale

Do not use for:

  • One-off queries (just call WebSearch / WebFetch directly)
  • Real-time streams (this pattern is batch-style)
  • Anything where the answers are not stored in a structured KB

The Five Golden Rules

  1. Hard cap per unit of work - state it up front; refuse to exceed it.
  2. Cross-reference threshold - claims need >=2 independent sources or 1 vendor-primary + 1 analyst.
  3. Up-front warning + explicit confirmation before any potentially-long operation.
  4. Atomic write + rollback - archive the old file before writing; verify the new file imports / parses; restore on failure.
  5. REVIEW placeholders, never fabrication - if coverage is thin, mark the gap explicitly with reason; never silently invent.

The pattern, end to end


Workflow 1 - Set the budget and announce it

Before any web tool call:

  1. State the cap aloud. "This refresh will run up to N web-tool calls per item, capped hard. For M items, that is roughly T minutes elapsed."
  2. AskQuestion to confirm. Do not bury the cost; do not assume.
  3. AskQuestion to scope. All items / gaps only / refresh existing only / specific list.
  4. Record the budget for the report. It goes into the final summary.

Defaults that work for most KBs:

  • 9 calls per item (covers initial pass + deep reads + gap-fills with 1 to spare)
  • 3 sources per claim maximum (more is noise, not confidence)
  • 2 sources per claim minimum, OR 1 vendor-primary corroborated by 1 analyst
  • REVIEW threshold at the cap: if coverage is still thin at call 9, mark the gap and move on

Tune per domain - security advisories may need fewer calls (CVE feeds are authoritative); market data may need more (more triangulation needed).


Workflow 2 - Multi-intent queries (economize calls)

The single biggest lever on cost. One query, several intents.

Bad (6 calls for one item):

"Confluent Kafka overview"
"Confluent Kafka pricing"
"Confluent Kafka competitors"
"Confluent Kafka company stability"
"Confluent Kafka anti-patterns"
"Confluent Kafka biggest competitor"

Good (3 calls for the same coverage):

"Confluent Kafka 2026 overview competitors pricing"
"Confluent Kafka company stability ownership 2026"
"Confluent Kafka vs <likely_competitor> comparison"

The first query covers four research columns; the second covers two; the third triangulates the comparison column. Shapes the sources to corroborate each other, not duplicate.


Workflow 3 - Cross-referencing rule

A claim is sound when:

  • Two independent sources agree, OR
  • One vendor-primary source is corroborated by one analyst/market source

Never:

  • One source for a non-obvious claim (mark REVIEW)
  • Four or more sources for the same claim (noise; cap at 3)
  • All vendor sources for a competitor comparison (use analyst sources for those)

Source taxonomy (carry into the evidence tuples):

TagUse
sourceThe original input file / brief / spec
vendor-docsVendor's own product, docs, pricing, SDK pages
analystGartner, Forrester, IDC, 451, GigaOm, etc.
marketRate cards, salary surveys, public benchmarks
case-studyPublic migration / customer story
judgementAnalyst judgment carried over (use sparingly)
regulatorFDA / FCC / SEC / etc. official text (compliance KBs)
cveNVD / GitHub Advisory / vendor security bulletin (security KBs)

Workflow 4 - Atomic write with rollback

The point: downstream consumers (generators, dashboards, slash commands) import a canonical filename. The refresh must be transparent to them - they should not need to learn a new filename. So:

  1. Archive the old file to <canonical>_<YYYYMMDD-HHMMSS>.<ext> where the timestamp is now - 1 second (the moment before the new file is written). The archive sits next to the canonical file.
  2. Write the new canonical file from the assembled entries.
  3. Verify by importing / parsing it. For Python KBs, python -c 'import <module>'. For JSON / YAML, parse and validate against a schema.
  4. Rollback automatically if verification fails - restore the archived file to canonical, surface the error.

Reference Python helper sketch:

python
import shutil
import time
import importlib
from pathlib import Path

def atomic_swap_kb(canonical: Path, new_content: str, importable_module: str) -> Path:
    archive_ts = time.strftime("%Y%m%d-%H%M%S", time.gmtime(time.time() - 1))
    archive = canonical.with_name(f"{canonical.stem}_{archive_ts}{canonical.suffix}")
    if canonical.exists():
        shutil.copy2(canonical, archive)
    canonical.write_text(new_content)
    try:
        importlib.invalidate_caches()
        importlib.import_module(importable_module)
    except Exception as exc:
        if archive.exists():
            shutil.copy2(archive, canonical)
        raise RuntimeError(f"Refresh aborted; canonical restored from {archive}") from exc
    return archive

For non-Python KBs the verification step is whatever proves the file is valid (JSON parse, YAML parse + schema check, SQL load + select).

Why archive-then-write-then-verify (not write-then-archive)?

If the write succeeds but verification fails, you still have the old file at the archive path - you can roll forward (keep the broken new file for diagnosis) or roll back (restore the archive). Either way, the canonical filename is never left in an unknown state.


Workflow 5 - Separate research columns from analyst-judgment columns

The most-overlooked part of this pattern. Two classes of fields live in the same KB:

ClassExamplesRefreshable from web?Refresh rule
Researchcategory, pricing, company_stability, market_position, competitor, release_cadence, cve_statusYesRegenerate every refresh
Judgmentdefault_decision, recommended_target, migration_strategy, decision_rationaleNo - depends on portfolio + intentCarry over from existing KB; for new items, use REVIEW - set after first run

Refresh only the research columns. Never overwrite analyst-judgment columns unless the user explicitly requests an analyst-judgment refresh (a separate, distinct operation). State this explicitly in the up-front warning.


Workflow 6 - REVIEW placeholders (never fabrication)

When coverage is thin (cap hit, sources disagree, vendor went quiet), do not invent. Mark the field with a placeholder:

"company_stability": "REVIEW - insufficient online coverage; last public funding 2024-Q3, no 2025/2026 disclosures found"

Add a judgement evidence tuple explaining the gap:

("judgement", "REVIEW placeholder: cap reached at 9 calls; vendor materials current to 2024-Q3 only.")

Surface every REVIEW prominently in the final summary so the analyst knows what to spot-check.


Workflow 7 - Per-item summary in the final report

The user needs to know what changed and what didn't. For each refreshed item, list the 2-3 most load-bearing sources (not all evidence - just the spine):

- Confluent Kafka - Confluent Cloud pricing (vendor-docs) + Gartner Magic
  Quadrant 2025 (analyst) + AWS MSK comparison (vendor-docs)
  -> 7 research columns refreshed; judgment fields carried over
- Apache Airflow - apache.org docs (vendor-docs) + Astronomer State of
  Airflow 2025 (analyst)
  -> 6 research columns refreshed; 1 REVIEW (cost_structure - vendor lists
     no fixed price, MWAA/Composer comparisons available)

End the summary with:

  • Archive path of the prior file (so the user can diff or roll back).
  • REVIEW placeholders count + brief reason for each.
  • Suggested next step (typically: re-run the downstream analysis to see new facts reflected).

Reference command structure

A /refresh-<kb-name> slash command implementing this pattern looks like this. Adapt to your KB.

markdown
---
description: Refresh the <KB name> from web research. POTENTIALLY LONG-RUNNING - <N> web-tool calls per item, capped at <CAP>.
---

The user wants to refresh the <KB name>.

Operating rules:

1. Source file: ...
2. Up-front warning: tell the user this is long-running and confirm.
3. Scope prompt: all / gaps / refresh-existing / specific list.
4. Enumerate items.
5. Dump current KB.
6. Per item, run the research protocol with HARD CAP at <CAP> web-tool calls.
7. Cross-reference <=3 sources per claim, >=2 independent or vendor+analyst.
8. Synthesize concise (1-3 sentence) answers per column.
9. Record per-claim evidence tuples with source tags.
10. REVIEW any column not corroborated within the cap; never fabricate.
11. Carry over judgment columns from existing KB; placeholders for new.
12. Apply: archive-then-write-then-verify; rollback on failure.
13. Summarize: per-item load-bearing sources, archive path, REVIEW count, next step.
14. Do NOT touch judgment columns or unrelated KBs.

A reference helper script (references/atomic-swap.py) implements the archive-write-verify-rollback step.


Anti-patterns

  1. No cap. "I'll just keep searching until I have enough." Result: hours of runtime, blown budget, and no signal-to-noise improvement past call 4-5.
  2. Single source per claim. Vendor pages are marketing; analysts can be wrong. Two independent corroborations or vendor-primary + analyst is the floor.
  3. More than 3 sources per claim. Adds noise without adding confidence; doubles the search budget.
  4. Mixing research and judgment. "I'll regenerate the whole row." Analyst-judgment columns depend on portfolio + intent context that the web does not have.
  5. Write before archive. Old file is lost if the write succeeds but verify fails.
  6. Silent fabrication. "I will just guess" - or, worse, "the model is confident" - is how a refresh becomes a liability.
  7. No up-front warning. Long operations without consent feel like an outage.
  8. Renaming the canonical file. Every downstream consumer breaks. Archive instead.
  9. No per-item summary. The user has no idea what changed.

When NOT to use this pattern

  • One-off queries - call WebSearch / WebFetch directly.
  • Streaming / continuous data - use a real ingestion pipeline.
  • Real-time price quotes / market ticks - use an API, not web search.
  • CVE-only refresh on a single library - just pip-audit / osv-scanner / npm audit.

The pattern shines when you have a structured KB, multiple items, periodic refresh, and you need every refresh to be predictable, reviewable, and reversible.


References

Related

  • Rule: 015-context-engineering.mdc - prompt packing, retrieval, compaction
  • Rule: 120-utilities.mdc - the underlying tools (lynx, curl, jq, ripgrep)
  • Rule: 316-zero-trust.mdc - audit and observability principles
  • Skill: core-engineering - general engineering discipline
  • Skill: skills-composition - chaining this with downstream analysis skills

Attribution

Pattern crystallized from a consulting-toolkit /facts-update command that refreshed 13 product KBs from web research with a 9-call cap and atomic-swap rollback. The discipline pays off most when a refresh feeds a downstream analysis: the analyst can trust the new facts because the refresh is bounded, attributable, and reversible.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Web Research Kb Refresh?

Refresh a project knowledge base from web research with strict tool-call budgets, cross-referenced sources, atomic file swaps, and rollback-on-failure. Use when refreshing a KB-backed analysis (vendor facts, compliance posture, market data, security advisories), running long web-research workflows that must be predictable in cost and time, or designing any "regenerate-from-the-web" command. Generalizes the /facts-update pattern of capping web-tool calls per unit of work, keeping research separate from analyst judgment, and writing back atomically with a timestamped archive.

Firwat Web Research Kb Refresh op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Web Research Kb Refresh besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Web Research Kb Refresh an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/web-research-kb-refresh an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Web Research Kb Refresh benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Web Research Kb Refresh benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Web Research Kb Refresh domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Web Research Kb Refresh gratis?

Jo. d-padmanabhan huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇