Skip to content
Documentation
Agent

research-loop

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

From plugin
llm-wiki
5010 skills10 agents

Claude Code

> /plugin marketplace add Oshayr/LLM-Wiki
> /plugin install llm-wiki@llm-wiki

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
@oshayr
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.

505 skills10 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
50
Star history of Oshayr/LLM-Wiki on GitHub, a chart by star-history.com

Other agents on llm-wiki.

backlink-manager

backlink-manager

Agent

Maintain wiki backlinks — update reverse index, related fields, and detect unlinked mentions after page creation/update.

@oshayr@oshayrInstall Agent
citation-explorer

citation-explorer

Agent

Explore citation chains for a topic. Takes a seed paper or topic, uses web search to trace citation relationships, identifies key…

@oshayr@oshayrInstall Agent
fact-checker

fact-checker

Agent

Verify factual claims in wiki pages against external sources. Extract claims, check for corroboration or contradiction, assign…

@oshayr@oshayrInstall Agent
research-processor

research-processor

Agent

Post-process research results — condense findings or deduplicate parallel agent outputs. Two modes.

@oshayr@oshayrInstall Agent
search-channel

search-channel

Agent

Parameterized search channel — web, academic, code, docs, or wikipedia. Returns normalized result arrays.

@oshayr@oshayrInstall Agent
search-orchestrator

search-orchestrator

Agent

Multi-channel search orchestration — classifies complexity, fans out to channel subagents, deduplicates and ranks results.

@oshayr@oshayrInstall Agent

More agents from other plugins.

docs-researcher

docs-researcher

Agent

Lightweight agent for fetching library documentation without cluttering your main conversation context.

context713d64k
@upstash@upstashInstall Agent
bundle-weaver

bundle-weaver

Agent

Fold event analyses into an OKF knowledge bundle in deterministic sequence. This is the only agent that writes `.okf/`, executing…

@scaccogatto@scaccogattoInstall Agent

Questions about research-loop.

Which coding agents can use research-loop?
research-loop installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.