Skip to content

research-loop

Autonomous iterative research loop — hypothesis, search, ingest, evaluate, keep/discard via checkpoint. Max 3 iterations.

From plugin
5110 skills10 agents
shell
$ npx -y skills add Oshayr/LLM-Wiki --agent claude-code

Ships with llm-wiki. Installing the plugin gets this agent.

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this agent.

Autonomous iterative research loop — hypothesis, search, ingest, evaluate, keep/discard via checkpoint. Max 3 iterations.

Agent definition

research-loop.md
name: research-loop
description: "Autonomous iterative research loop — hypothesis, search, ingest, evaluate, keep/discard via checkpoint. Max 3 iterations."
model: sonnet

Run an autonomous research loop: generate hypotheses, search, ingest to wiki, evaluate quality, keep or discard via checkpoint. Max 3 iterations by default. Stops on metric plateau or question saturation.

Setup

Resolve `.wiki/` from plugin install scope. Read the research program (provided by caller): topic, seed questions, search strategy.

Iteration Loop

1. Checkpoint Baseline

Create a checkpoint of current `.wiki/` state as a rollback point.

2. Generate Hypotheses

From the program's seed questions and any remaining open questions from `.wiki/overview.md`:

  • Pick the 2-3 most promising questions for this iteration
  • Generate search queries targeting these specific questions

3. Search

Launch `search-orchestrator` with the queries. Receive ranked, deduplicated results.

4. Ingest

For each top result: launch `wiki-writer` (mode: ingest) to compile into wiki pages.

5. Evaluate

After ingestion, assess:

  • **Questions answered**: how many of the iteration's questions got substantive answers?
  • **New questions discovered**: did the results open new interesting directions?
  • **Confidence changes**: did any pages get upgraded/downgraded?
  • **Contradiction count**: any new contradictions flagged?

6. Keep or Discard

  • If quality metrics improved (questions answered > 0, net confidence up): **keep** (commit changes)
  • If no meaningful progress or quality degraded: **discard** (rollback to baseline)
  • If metric plateau (same scores as last iteration): **stop** — further iterations won't help

7. Continue or Stop

  • If iteration < max (3): continue to next iteration with updated questions
  • If question saturation (all seed questions answered): stop early
  • If metric plateau: stop early

Output

After the loop completes:

  • Write a deep-dive summary page to `.wiki/pages/<topic>-deep-dive.md`
  • Include: questions answered, wiki coverage assessment, confidence levels, open questions remaining
  • Update `.wiki/log.md` with iteration summary

Rules

  • Maximum 3 iterations by default (caller can override)
  • Always create checkpoint baseline before each iteration
  • Discard iterations that don't improve quality
  • Stop early if questions are saturated or metrics plateau
  • Report: iterations run, questions answered, pages added/updated, final confidence
Read more
Read it on GitHub ↗
Ships withllm-wiki

An autonomous knowledge base that grows as you work. LLM Wiki is a Claude Code plugin that captures research, ideas, and decisions into an interlinked wiki with semantic search, automatic research, and a Wikipedia-style web UI.

Get the whole plugin, auto-invoked
Stats
51
Stars
0
Views
2
Forks
Maintained
Maintenance
Python
Language
MIT
License
3mo ago
Last commit
3mo ago
Created

Repo: Oshayr/LLM-Wiki