From reaper
Runs batched investigation cycles testing hypotheses via proof verification, counterexample search, or security analysis with keep-or-discard discipline.
How this skill is triggered — by the user, by Claude, or both
Slash command
/reaper:investigateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The core research loop. Run N investigation cycles, each testing a hypothesis and applying keep-or-discard discipline.
The core research loop. Run N investigation cycles, each testing a hypothesis and applying keep-or-discard discipline.
Invoke this skill by name with an optional cycle count. On slash-command hosts, prefix with / (e.g. /investigate 10).
# Run 10 investigation cycles
investigate 10
# Default: 5 cycles
investigate
Default: 5 cycles if no argument given.
Always read before starting:
reaper-workspace/notes/problem-statement.md — model assumptions and property definitionsreaper-workspace/notes/ideas.md — the ideas to investigatereaper-workspace/notes/current-understanding.md — the "branch tip" of accumulated knowledgereaper-workspace/notes/results.md — what's been tried and what happenedLazy-load only when needed (do not read upfront — load only if a cycle's hypothesis requires it or the "when stuck" protocol calls for it):
reaper-workspace/notes/paper-summary.md — the source paper (if provided)reaper-workspace/notes/literature.md — known prior work (organized by same-goal and same-approach)reaper-workspace/papers/ — downloaded PDFs and per-paper notes (<id>-notes.md) from the literature review../reaper/references/methodology.md — proof/analysis patternsInvestigation runs in batches, not sequential cycles. Independent hypotheses are investigated in parallel by default; sequential execution is the fallback when dependencies exist.
while cycles_remaining > 0 and not converged:
Plan: read ideas.md + notes/results.md → dependency graph → batch of independent hypotheses
Dispatch: spawn one subagent per hypothesis (parallel, in one message)
Merge: collect results → update notes/results.md → integrate "keep" insights into current-understanding.md
ideas.md and notes/results.mdnotes/results.md to avoid repeating failed approaches.cycles_remaining./brainstorm to generate new ideas if needed.Spawn one subagent per hypothesis in the batch using your host's parallel-subagent mechanism (e.g. Claude Code's Agent tool, or the equivalent task/spawn primitive on other hosts; if the host has no parallel primitive, fall back to sequential execution). Launch all subagents in a single message for true parallelism. Each subagent receives:
current-understanding.md (read-only for the duration of the batch) — extract only the 2-3 findings most relevant to this subagent's hypothesis, not the full file. This keeps subagent context lean. Include a note: "For additional context, see current-understanding.md."notes/results.md, keep/discard verdict, and if keep: the insight to mergeContext efficiency: Do NOT send the full current-understanding.md to every subagent. Instead, read it once in the main agent, identify which findings are relevant to each hypothesis, and send only those. A typical excerpt is 200-500 words vs 2000-5000 for the full file.
Each subagent runs the single-cycle protocol independently:
If this cycle revisits a hypothesis that already has an investigation directory, reuse that directory — update its analysis.md and proof.md inline rather than creating a new directory. The cycle number in the directory name stays the same (the original); the notes/results.md row will be updated with the new cycle number.
For a new hypothesis, create reaper-workspace/investigations/NNN-<slug>/ where:
NNN is the assigned zero-padded cycle number (001, 002, ...)<slug> is a short descriptor (e.g., proof-lemma3, counterex-2party, alt-reduction)Do the actual research. This is the core intellectual work. Depending on the hypothesis:
../reaper/references/methodology.md for patterns.Write all work — reasoning, attempts, dead ends, insights — to reaper-workspace/investigations/NNN-<slug>/analysis.md. If revisiting, edit the existing analysis.md inline — update conclusions, revise reasoning, and integrate new findings into the existing structure rather than appending a new section. The file should always reflect the current best understanding of this hypothesis.
Within a single cycle, subagents MAY spawn sub-subagents for concurrent attack:
Use intra-cycle parallelism when the hypothesis is genuinely uncertain. If prior cycles strongly suggest the claim is true (or false), prefer the targeted approach.
For theoretical research (proving properties, security guarantees, or performance metrics), every claim must be stated and proved formally. Write proofs in reaper-workspace/investigations/NNN-<slug>/proof.md using this structure:
## Theorem/Lemma/Proposition N: <name>
**Statement.** <precise mathematical statement of the claim>
**Assumptions.**
- <each assumption listed explicitly, e.g., threat model, computational hardness, network model>
**Proof.**
<the proof body — each logical step explicit and justified>
1. <step> *(by <justification: definition / assumption / prior lemma / cited result>)*
2. <step> *(by ...)*
...
∎
**Proof technique:** <e.g., reduction, induction, simulation, hybrid argument, game hopping>
Consult ../reaper/references/methodology.md for the proof techniques catalog, reduction quality gate, and performance sanity checks. State the chosen proof technique in the proof header. If it doesn't work after a genuine attempt, log which technique failed and why, then try an alternative in the next cycle.
Requirements for formal proofs:
If a proof attempt fails or has gaps:
inconclusive with the gap describedDo not claim a property or metric holds without a proof. Conjectures must be clearly labeled as such.
Did this cycle produce genuine progress? A cycle counts as progress if it:
Simplicity criterion: A proof that achieves the same result with fewer assumptions is better. Replacing a 3-page case analysis with a one-paragraph reduction is progress even if the "result" is unchanged. Don't accumulate tangential findings that don't serve the research goal.
One "ping" per cycle: The cycle's outcome should be statable in a single sentence. If it can't be, the cycle tried to do too much — note this and decompose in the next cycle.
When a proof issue is found, do not just say "found a gap." Classify it:
partially-confirmed.inconclusive and pivot to whether the theorem itself is true via an alternative proof.refuted.partially-confirmed with the precise weakening stated.When a core property is confirmed, note the composition implications. Consult ../reaper/references/definitional-standards.md for domain-specific composition considerations (e.g., rewinding, shared setup, standalone vs compositional security).
Log composition limitations in the investigation's analysis.md even if the original hypothesis didn't ask about composition — this is critical context for the final report.
Prepare a row for reaper-workspace/notes/results.md:
| NNN | H# | action-type | outcome | confidence | status | one-sentence description |
Where:
Update-in-place rule: If this cycle revisits a hypothesis that already has a row in notes/results.md, the subagent should flag this as an update (not a new row). The main agent will update the existing row inline during the merge phase rather than appending a duplicate. The cycle number, outcome, confidence, and description should all reflect the latest result. The previous investigation directory remains in investigations/ for the audit trail.
Subagents return this row to the main agent rather than appending directly.
Cycle log: After preparing the results row, write a cycle log to reaper-workspace/logs/cycle-NNN-<slug>.md (using the same NNN and slug as the investigation directory). This is an append-only snapshot — never modify it after creation. Include:
# Cycle NNN: <hypothesis title>
- **Hypothesis**: H# — <statement>
- **Action**: <action-type>
- **Outcome**: <outcome> (confidence: <confidence>)
- **Verdict**: keep / discard
## Summary
<1-3 paragraph narrative: what was attempted, what was found, why the verdict>
When revisiting a hypothesis, create a new log file with the new cycle number (e.g., cycle-005-proof-lemma3.md even if cycle-001-proof-lemma3.md already exists). The slug may differ if the approach changed.
Default to one level LOWER than your instinct. If you think "high," write "medium" unless every single step is airtight.
Determine the verdict:
keep — The cycle produced genuine progress. Return the insight to merge into current-understanding.md.
discard — The cycle was a dead end. The investigation directory stays for the audit trail.
Subagents do NOT write to current-understanding.md directly — they return their verdict and insight to the main agent.
After all subagents in a batch complete:
reaper-workspace/notes/results.md. If a cycle revisits a hypothesis that already has a row, update the existing row inline with the new cycle number, outcome, confidence, and description — do not append a duplicate. Only append a new row for hypotheses appearing in the table for the first time. Keep rows ordered by hypothesis number.reaper-workspace/notes/current-understanding.md — the main agent writes this, preserving the single-writer constraint. Write as if explaining at a whiteboard — crystallize understanding, don't just append notes. The file should be coherent end-to-end, not a chronological log.ideas.md. If a hypothesis's status changed (resolved, deprioritized, subsumed), update it inline in ideas.md.reaper-workspace/notes/results.md after the row table:
## Batch Summary (Cycles NNN-MMM)
Keep findings:
- [1 sentence per keep cycle: what was found and why it matters]
Discard patterns:
- [1 sentence summarizing why cycles were discarded, if any pattern emerges]
These summaries serve two purposes: (a) /brainstorm can read summaries instead of full investigation directories, and (b) /synthesize can read summaries instead of loading all analysis.md files.When all remaining hypotheses form a dependency chain (H2 requires H1's result, H3 requires H2's, ...), the batch size is 1. This is equivalent to the traditional sequential loop — no subagents needed, the main agent runs Steps A–E directly and writes to current-understanding.md immediately on keep.
Plan the next batch. Do not pause, do not ask if you should continue.
Run all N cycles. The only valid early stop is genuine convergence: all hypotheses resolved with high confidence, and no new hypotheses worth pursuing. Uncertainty about whether the human wants you to continue is NEVER a reason to stop.
If a cycle is going nowhere, follow the escalation protocol in ../reaper/references/methodology.md (section "When Stuck: 8-Step Escalation"). The steps progress from re-reading existing materials, through searching for new literature (see ../reaper/references/search-tools.md for search commands, which use the arxiv.py and iacr.py scripts in the /search-paper skill), to trying radically different approaches.
When searching for new literature mid-investigation, download relevant papers to reaper-workspace/papers/, write per-paper notes (<id>-notes.md), and integrate findings into reaper-workspace/notes/literature.md inline — add new entries to the appropriate existing sections rather than appending a separate "Mid-Investigation Additions" section. Log the search as a cycle with action-type literature-search in notes/results.md.
If all escalation tactics are exhausted and the hypothesis remains stuck, log the cycle as inconclusive and continue to the next hypothesis. The orchestrator will call /brainstorm after the batch to generate new ideas based on the pattern of failures.
If after 3 cycles a hypothesis trends toward refutation (counterexample attempts partially succeed, proof attempts consistently fail at the same point, or you keep hitting the same structural gap):
refuted and status keep./brainstorm to generate follow-up hypotheses (e.g., proving the impossibility formally, exploring the minimal fix).Do not spend 10 cycles attempting minor variations of the same failed proof strategy. Three failures at the same point is a signal to change direction.
If an investigation cycle reveals that the problem formulation itself is wrong (not just that a hypothesis failed, but that the model assumptions, core question, or property definitions are mis-specified), trigger re-formalization:
reformulate and status keep.analysis.md, write a section ## Re-Formalization Signal containing:
REFORMULATE as the first line of the cycle description in notes/results.md, followed by a one-sentence summary.The orchestrator will re-invoke the /formalize-problem skill incorporating the re-formalization signal before resuming investigation.
If any cycle in a batch returns outcome reformulate, stop dispatching further batches and return control to the orchestrator with a re-formulation signal.
notes/results.md reflecting its latest state — revisits update inline, not appendcurrent-understanding.md only changes on keep cyclesanalysis.md reflecting the current best understanding (edited inline on revisit)current-understanding.md is written only by the main agent during the merge phase, never by subagentsnpx claudepluginhub sebastianelvis/reaper --plugin reaperProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.