/learning-loop:discoveryfrom learning-loop
Guides interactive research journeys on any topic using web search and vault context. Supports guided, branching, and checkpoint styles with configurable tone.
Ships in learning-loop. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Guided exploration of a topic through iterative research and conversation. You steer, subagents dig. Each round presents findings and offers directions. The journey produces vault artifacts (or not: your choice).
/discovery "topic": cold start, curious about something new/discovery "topic" with existing vault notes: warm start, build on what you know/discovery: no argument; ask what the user is curious aboutParse from the invocation or ask the user. All have defaults.
| Parameter | Options | Default |
|---|---|---|
| style | guided / branch / checkpoint | guided |
| tone | academic / conversational / persona | conversational |
| capture | full / surf | full |
Examples:
/discovery "spaced repetition": all defaults/discovery "spaced repetition" --style branch/discovery "spaced repetition" --surf: lightweight, no artifacts until asked/discovery --academic "CRISPR gene drives"Socratic. Present findings, ask "what angle interests you?", dig deeper in that direction. One question at a time. Follow the user's curiosity.
Choose-your-own-adventure. At each stage present 2-3 named branches with one-line descriptions. User picks. Follow that thread. Offer new branches at the next stop.
Research burst → synthesis → react. Less conversational, more "here's what I found, where next?" Good for deeper dives where the user wants substance before steering.
This skill emits provenance events for pipeline observability. Run each Bash command silently.
At session start (after scope identified):
ll-run provenance-emit.js '{"agent":"discovery","skill":"discovery","action":"session-start","intent_kind":"topic","config":{"style":"STYLE","capture":"MODE"}}'
At session end (after all rounds complete). Alongside the existing counters, include the common outcome shape: items_in (rounds run), items_out (notes created), items_flagged (0, discovery has no flagging concept), duration_ms:
ll-run provenance-emit.js '{"agent":"discovery","skill":"discovery","action":"session-end","notes_created":N,"rounds":R,"items_in":N,"items_out":N,"items_flagged":0,"duration_ms":N}'
Per-note tracking is handled automatically by the PostToolUse hook.
Use AskUserQuestion to help users discover and configure parameters. The goal is teaching the tool, not gatekeeping it.
No topic provided (/discovery):
Ask what the user is curious about. Include a brief mention of available options:
What topic would you like to explore?
Optional settings (all have sensible defaults):
- Style:
guided(Socratic, default) ·branch(choose-your-own-adventure) ·checkpoint(research burst then react)- Tone:
conversational(default) ·academic·persona(vault voice)- Mode:
full(captures notes, default) ·surf(explore only, no artifacts)
Topic provided, no other params (/discovery "topic"):
Proceed with defaults. Do NOT prompt: the user chose speed. Defaults are good.
Topic + partial params (/discovery "topic" --surf):
Proceed with provided params + defaults for the rest. Do NOT prompt for missing params: if they wanted to set them, they would have.
Full params provided: Just run.
Spawn both subagents concurrently, not sequentially (dispatch: skills-shared/dispatch.md):
Vault Scout (discovery-vault-scout): Search existing vault notes and episodic memory for what the user already knows about this topic.
{{VAULT}}/), angle (if any)Researcher (discovery-researcher): Search the web for landscape overview.
While agents work, confirm parameters with the user if any were ambiguous.
Run this after EVERY discovery-researcher return — orientation and every loop round — before presenting findings. The researcher returns an UNVERIFIED brief; subagents cannot spawn subagents, so this loop is the only verification gate.
Spawn a note-verifier agent (dispatch: skills-shared/dispatch.md) with a one-note batch (the agent contract is a list of 1-5 {path, content} entries; output is one ## Verification: <note title> section per note):
brief:<topic> (the brief is not a vault file; the label names its output section)Resolve all path placeholders in the prompt to literal absolute paths first (see agents-shared/vault-io.md → Placeholders). Track the verification round number across spawns; stop after round 3.
Branch on the ### Status: in the brief's ## Verification: section
[partial] in the brief and mention them when presenting.### Corrections section: adopt the corrected URLs and revised claim text it provides. Only remove or demote when no correction is offered:
Gaps & Uncertainties.Gaps & Uncertainties.Gaps & Uncertainties.
Then spawn a fresh note-verifier on the revised brief.Max 3 verification rounds per brief. If issues persist, append an ### Unresolved Verification Issues section to the brief and tell the user explicitly which findings are unverified.
After the loop settles, emit a provenance event (silently):
ll-run provenance-emit.js '{"agent":"discovery","skill":"discovery","action":"verify","target":"TOPIC -- ANGLE","status":"PASS|PARTIAL|ISSUES_FOUND","rounds":N}'
Findings never reach the user or the vault unverified — with one escape: findings still unresolved after the 3-round cap are explicitly flagged (the ### Unresolved Verification Issues section), never passed silently.
Combine agent results. Present in the chosen tone:
Conversational: "Here's what you already know about X... and here's the landscape..." Academic: Structured overview with terminology and source attribution. Persona: Hemingway/Musashi/Lao Tzu voice throughout.
Include:
Then, based on style:
Repeat until the user says "done", "wrap up", or similar:
User steers: picks a direction, asks a question, says "go deeper", or redirects
Research: launch discovery-researcher subagent with:
prior_rounds: summary of what's been covered (prevent repetition)existing_knowledge: vault scout findings + prior round findingsVerify: run Step 1.5 on the returned brief
Present: deliver findings in chosen style and tone
Capture (if full mode): after each round, dispatch a note-writer agent (dispatch: skills-shared/dispatch.md) to write an inbox note for the key insight discovered. You decide WHAT the note says; note-writer does the writing (persona voice, capture-rules, atomicity). Pass:
/literature step)0-inbox/Resolve all path placeholders to literal absolute paths before dispatch (see agents-shared/vault-io.md → Placeholders). Record the path each note-writer reports; Step 4.5 replays hooks on them. If the researcher returned a diagram, write it yourself to {{VAULT}}/Excalidraw/ and tell note-writer to embed it in the trail note with ![[diagram-name]].
Steering keywords the skill should recognize:
Full capture mode:
note-writer agent for the synthesis note. You supply the content decisions; note-writer writes it. The note must:
synthesis, max 3 tagssource: discovery in frontmatter5-maps/ — this is a hub note.0-inbox/ and let the promote-gate decide on the next pass. (Hub-detection still applies if it later grows link density.)5-maps/ rule will catch borderline cases — synthesis-tagged + link-dense + criteria-pass → 5-maps/, even from 0-inbox/.Surf mode:
note-writer per selected insight (same dispatch as Step 3 item 5)Both modes (source handoff): If noteworthy sources were found but not captured as literature notes:
Sources worth capturing (run /literature):
- "Source Title": why it matters
- "Source Title": why it matters
If any note-writer agents ran (trail notes, synthesis, or surf-mode captures), their Write calls bypassed PostToolUse: backlinks and edge inference didn't run. Replay the hook chain on every path note-writer reported (see skills-shared/hook-replay.md, targeted variant):
printf '%s\n' "$WRITTEN_PATH_1" "$WRITTEN_PATH_2" \
| ll-run sweep-hook-replay.mjs --stdin
Idempotent: safe on already-hooked notes. Skip if no note-writer ran. Surface any failures from the JSON summary in Step 5.
Discovery: "[topic]"
Style: guided | Rounds: N
Captured: N notes → 0-inbox/
Synthesis: "Synthesis Note Title" → 5-maps/ (hub, ≥10 links) | 0-inbox/ (thin)
Sources found: N (run /literature to capture)
Always spawn agents concurrently when they have no dependencies. Vault scout and researcher have no dependencies on each other at orientation time. See dispatch: skills-shared/dispatch.md.
Plain language. Analogies welcome. "Here's the intuition behind this..." Accessible, not dumbed down. Use this for the journey itself.
Precise terminology. Source attribution inline. Caveats acknowledged. "The evidence suggests..." Rigorous, not dry.
Hemingway/Musashi/Lao Tzu vault voice. Short sentences. No filler. Active voice. Present tense. Use sparingly for the journey: it's intense over long sessions.
Regardless of journey tone, all vault artifacts are written in persona voice. The journey is exploration; what sticks gets the Hemingway treatment.
/literature. Don't create literature notes during discovery.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub robinslange/learning-loop --plugin learning-loop24 skills in this plugin
/deepenStrengthen a single vault note with research. Usage: /learning-loop:deepen "note name" or /learning-loop:deepen (picks shallowest inbox note). Assesses maturity, researches gaps, rewrites in vault voice, promotes when ready./diagramGenerate an Excalidraw diagram for the vault. Usage: /learning-loop:diagram "concept or mechanism" or /learning-loop:diagram (infers from context). Produces .excalidraw.md in vault Excalidraw/ folder./doctorDiagnose your learning-loop installation. Runs health checks, presents issues, offers per-fix remediation, re-runs each check after the fix to confirm. Safe to run anytime; only makes changes you approve. Pass --redact to scan plugin data files for leaked credentials instead.Other plugins' skills for the same job