From claude-research
Research paper analysis pipeline with parallel idea proposal and synthesis
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-research:research-pipelineThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
[RESEARCH PIPELINE - ITERATION {{ITERATION}}/{{MAX}}]
[RESEARCH PIPELINE - ITERATION {{ITERATION}}/{{MAX}}]
Your previous attempt did not output the completion promise. Continue working on the pipeline.
Research Pipeline is a multi-agent pipeline that systematically analyzes academic papers, identifies research gaps, and proposes novel methods with experiment plans. It processes a directory of reference papers through 8 stages: 3 sequential analysis stages, 3 parallel idea-proposal stages, a synthesis stage, and an experiment planning stage. Modeled after the ralph execution pattern with persistent state tracking.<Use_When>
<Do_Not_Use_When>
<Why_This_Exists> Research ideation requires structured analysis that most researchers do manually over weeks: reading papers, finding weaknesses, searching for complementary work, blending ideas, formalizing methods, designing architectures, and planning experiments. This pipeline automates the full sequence with specialized agents at each stage. Stages 4-6 run in parallel because idea blending, mathematical formulation, and architecture design are independent creative proposals that benefit from diverse perspectives — the synthesizer then unifies them. </Why_This_Exists>
<Pipeline_Overview>
[Sequential Phase: Analysis]
Stage 1: Paper Review ──────→ weaknesses per paper
Stage 2: Gap Search ────────→ papers compensating weaknesses
Stage 3: Summarization ─────→ structured summaries (all papers)
│
▼
[Parallel Phase: Idea Proposal] ← Stages 4, 5, 6 run SIMULTANEOUSLY
┌───────────────┼───────────────┐
│ │ │
▼ ▼ ▼
Stage 4: Stage 5: Stage 6:
Idea Math Architecture
Blender Expert Expert
│ │ │
└───────────────┼───────────────┘
│
▼
[Sequential Phase: Convergence]
Stage 7: Proposal Synthesis ─→ unified method from 4+5+6
Stage 8: Experiment Plan ────→ baselines & evaluation design
Stages 1-3 are sequential (each depends on previous).
Stages 4-6 are parallel (all read from stages 1-3, independent of each other).
Stages 7-8 are sequential (7 synthesizes 4-6, 8 plans experiments from 7).
State is persisted to .omc/research-pipeline/{session-id}/ for resume capability.
</Pipeline_Overview>
<Paper_Directory_Convention>
baseline_ (e.g., baseline_attention_is_all_you_need.pdf)baseline/ subdirectory<Execution_Policy>
agents/ directory for detailed promptsStage 1 - Paper Review (Identify weaknesses):
a. Read EACH paper in the directory using the Read tool (PDF support)
b. Read the agent prompt template from agents/paper-reviewer.md
c. For each paper, analyze and document:
Agent(prompt="[Read agents/paper-reviewer.md for full instructions]
You are an expert research paper reviewer. Read and analyze each of these papers thoroughly.
Papers: [list all PDF paths]
Baseline paper: [baseline filename]
Research goal: [goal]
Output a structured review with weaknesses for each paper.
Use weakness IDs (W-B1, W-B2 for baseline; W-{N}1 for others) for cross-referencing.",
subagent_type="general-purpose", model="opus")
f. Save output to stage-1-paper-review.md
g. Update pipeline.json: stage 1 status = complete
h. Verification: Confirm output contains weakness analysis for EVERY paper
Stage 2 - Gap Search (Find compensatory papers + download PDFs):
a. Read Stage 1 output (stage-1-paper-review.md)
b. Read the agent prompt template from agents/gap-scout.md
c. Extract the top weaknesses across all papers (prioritize baseline weaknesses)
d. Create the related_papers/ directory inside the paper directory:
mkdir -p {paper-directory}/related_papers
e. For each major weakness, search for papers that address it:
{paper-directory}/related_papers/ using curl
f. Spawn a Sonnet-tier agent:Agent(prompt="[Read agents/gap-scout.md for full instructions]
You are a research paper scout. Given these weaknesses from our literature review:
[Include weaknesses from Stage 1]
Research goal: [goal]
Search the web for papers that address each weakness. Use WebSearch and WebFetch.
Cross-disciplinary papers are welcome -- the area doesn't matter as long as the technique is relevant.
IMPORTANT - Paper Downloads:
For every relevant paper you find, download its PDF into this directory:
{paper-directory}/related_papers/
Use Bash with curl to download:
curl -L -o '{paper-directory}/related_papers/{FirstAuthor}_{Year}_{ShortTitle}.pdf' '{pdf_url}'
Track download status for each paper: [DOWNLOADED], [DOWNLOAD_FAILED], or [NO_PDF_AVAILABLE].
Verify each download with ls -la.",
subagent_type="general-purpose", model="sonnet")
g. Save output to stage-2-gap-search.md
h. Update pipeline.json: stage 2 status = complete
i. Verification: Confirm at least 1 compensatory paper found per major weakness
j. Verification: Confirm downloaded PDFs exist in {paper-directory}/related_papers/ with non-zero size
Stage 3 - Paper Summarization (Structured summaries):
a. Read Stage 1 output (original paper analyses) and Stage 2 output (found papers)
b. Read the agent prompt template from agents/paper-summarizer.md
c. Read downloaded related papers from {paper-directory}/related_papers/ using the Read tool (PDF support)
d. Create structured summaries for ALL papers (both original references and downloaded related papers)
e. For each paper, produce:
Agent(prompt="[Read agents/paper-summarizer.md for full instructions]
You are an expert research summarizer. Create structured summaries of all these papers.
Paper analyses: [Include Stage 1 output]
Found papers: [Include Stage 2 output]
Research goal: [goal]
IMPORTANT - Downloaded Related Papers:
Stage 2 downloaded related paper PDFs into: {paper-directory}/related_papers/
Read these PDFs using the Read tool to produce deeper summaries of the found papers
(not just abstract-level summaries from Stage 2 URLs).
Also create a comparative table and complementarity map.",
subagent_type="general-purpose", model="sonnet")
h. Save output to stage-3-summaries.md
i. Update pipeline.json: stage 3 status = complete
CRITICAL: Fire all three agents SIMULTANEOUSLY after Stage 3 completes. Each agent receives the same inputs (stages 1-3 outputs) but works independently on a different aspect of the proposal.
Stage 4 - Idea Blending (Creative synthesis — runs in PARALLEL):
a. Read ALL previous stage outputs (Stages 1-3)
b. Read the agent prompt template from agents/idea-blender.md
c. Identify complementary techniques across papers and propose 3-5 concrete blending strategies
d. Each strategy includes: blend name, source papers, core idea, expected benefit, challenges, novelty
e. Rank by expected impact and feasibility
f. Spawn simultaneously with Stages 5 and 6:
Agent(prompt="[Read agents/idea-blender.md for full instructions]
You are a creative research ideation expert.
Paper reviews: [Stage 1 output]
Gap search results: [Stage 2 output]
Paper summaries: [Stage 3 output]
Research goal: [goal]
Propose 3-5 ways to blend ideas from these papers into novel approaches.
Think creatively -- cross-disciplinary combinations are encouraged.
Rank strategies by impact and feasibility.",
subagent_type="general-purpose", model="opus")
g. Save output to stage-4-idea-blending.md
h. Update pipeline.json: stage 4 status = complete
Stage 5 - Mathematical Formulation (Formal method — runs in PARALLEL):
a. Read ALL previous stage outputs (Stages 1-3)
b. Read the agent prompt template from agents/math-expert.md
c. Based on the paper analyses and identified gaps, independently propose a mathematical formulation:
Agent(prompt="[Read agents/math-expert.md for full instructions]
You are a mathematical expert in machine learning and optimization.
Paper reviews with weaknesses: [Stage 1 output]
Compensatory papers: [Stage 2 output]
Paper summaries with key equations: [Stage 3 output]
Research goal: [goal]
Based on the identified weaknesses and available techniques, propose a rigorous
mathematical formulation for a novel method. Use LaTeX notation.
Define the problem, propose the method formally, specify the loss function,
and analyze theoretical properties.
You are working INDEPENDENTLY -- propose your own approach from the paper analyses.",
subagent_type="general-purpose", model="opus")
f. Save output to stage-5-math-formulation.md
g. Update pipeline.json: stage 5 status = complete
Stage 6 - Architecture Design (System architecture — runs in PARALLEL):
a. Read ALL previous stage outputs (Stages 1-3)
b. Read the agent prompt template from agents/arch-expert.md
c. Based on the paper analyses and identified gaps, independently propose a model/system architecture:
Agent(prompt="[Read agents/arch-expert.md for full instructions]
You are a senior ML systems architect.
Paper reviews with weaknesses: [Stage 1 output]
Compensatory papers: [Stage 2 output]
Paper summaries with architectures: [Stage 3 output]
Research goal: [goal]
Based on the identified weaknesses and available techniques, propose a concrete
model/system architecture for a novel method that addresses the key gaps.
Include component breakdown, data flow, training procedure, and comparison with baseline.
You are working INDEPENDENTLY -- propose your own architectural approach from the paper analyses.",
subagent_type="general-purpose", model="opus")
f. Save output to stage-6-architecture.md
g. Update pipeline.json: stage 6 status = complete
Parallel execution code pattern:
// Fire ALL THREE simultaneously — do NOT wait between them
Agent(prompt="[Stage 4: Idea Blending]...", model="opus") // Fire
Agent(prompt="[Stage 5: Math Expert]...", model="opus") // Fire
Agent(prompt="[Stage 6: Arch Expert]...", model="opus") // Fire
// Wait for ALL three to complete before proceeding to Stage 7
Stage 7 - Proposal Synthesis (Unify parallel proposals): a. Read ALL outputs from the parallel phase: Stage 4 (idea blending), Stage 5 (math formulation), Stage 6 (architecture design) b. Also read Stages 1-3 outputs for reference c. Synthesize the three independent proposals into a unified, coherent method:
Agent(prompt="You are a senior research director who synthesizes diverse technical proposals
into unified, coherent research directions.
Three independent expert agents have analyzed the same papers and proposed different aspects
of a novel method. Your job is to synthesize their outputs into ONE unified proposal.
Idea Blending proposals (creative combinations): [Stage 4 output]
Mathematical formulation (formal method): [Stage 5 output]
Architecture design (system design): [Stage 6 output]
Background:
Paper reviews: [Stage 1 output summary]
Research goal: [goal]
Instructions:
1. Identify where the three proposals CONVERGE (high-confidence directions)
2. Resolve CONFLICTS between proposals (choose strongest with justification)
3. Integrate the best from each:
- Best creative ideas from the Idea Blender
- Most rigorous math from the Math Expert
- Most practical architecture from the Arch Expert
4. Produce a UNIFIED proposal with: method name, core idea, math formulation,
architecture, novelty statement, and baseline comparison.
The unified proposal must be internally consistent -- the math must match the architecture,
and both must implement the core idea.",
subagent_type="general-purpose", model="opus")
e. Save output to stage-7-synthesis.md
f. Update pipeline.json: stage 7 status = complete
g. Verification: Confirm the synthesis references all three input proposals and produces a coherent unified method
Stage 8 - Experiment Planning (Baseline experiments):
a. Read Stage 7 output (unified proposal) and Stage 1 output (baseline paper analysis)
b. Also read Stage 3 (all paper summaries) for baseline and comparison methods
c. Read the agent prompt template from agents/experiment-planner.md
d. Design a comprehensive experiment plan:
Agent(prompt="[Read agents/experiment-planner.md for full instructions]
You are an expert experiment designer for ML research.
Unified method proposal: [Stage 7 output]
Baseline paper analysis: [Stage 1 baseline section]
All paper summaries: [Stage 3 output]
Research goal: [goal]
Design a comprehensive experiment plan with baselines, datasets, metrics, ablations,
and expected results. The baseline paper's method is the PRIMARY comparison target.",
subagent_type="general-purpose", model="opus")
f. Save output to stage-8-experiments.md
g. Update pipeline.json: stage 8 status = complete
final-report.md containing:
pipeline.json: overall status = complete
d. Print a summary of what was produced to the user
<State_Management>
{
"id": "research-YYYYMMDD-xxxxxx",
"goal": "The user's research goal",
"paperDir": "/absolute/path/to/papers",
"baselinePaper": "baseline_paper_name.pdf",
"papers": [
{"filename": "paper1.pdf", "isBaseline": false},
{"filename": "baseline_method.pdf", "isBaseline": true}
],
"relatedPapersDir": "{paperDir}/related_papers",
"status": "in_progress",
"currentPhase": "analysis",
"stages": [
{
"id": 1,
"name": "paper-review",
"phase": "analysis",
"parallel": false,
"description": "Review papers and identify weaknesses",
"status": "pending",
"outputFile": "stage-1-paper-review.md",
"startedAt": null,
"completedAt": null
},
{
"id": 2,
"name": "gap-search",
"phase": "analysis",
"parallel": false,
"description": "Search for papers compensating weaknesses",
"status": "pending",
"outputFile": "stage-2-gap-search.md",
"startedAt": null,
"completedAt": null
},
{
"id": 3,
"name": "summarization",
"phase": "analysis",
"parallel": false,
"description": "Create structured summaries of all papers",
"status": "pending",
"outputFile": "stage-3-summaries.md",
"startedAt": null,
"completedAt": null
},
{
"id": 4,
"name": "idea-blending",
"phase": "proposal",
"parallel": true,
"parallelGroup": "proposal",
"description": "Propose creative idea combinations",
"status": "pending",
"outputFile": "stage-4-idea-blending.md",
"startedAt": null,
"completedAt": null
},
{
"id": 5,
"name": "math-formulation",
"phase": "proposal",
"parallel": true,
"parallelGroup": "proposal",
"description": "Independent mathematical method formulation",
"status": "pending",
"outputFile": "stage-5-math-formulation.md",
"startedAt": null,
"completedAt": null
},
{
"id": 6,
"name": "architecture",
"phase": "proposal",
"parallel": true,
"parallelGroup": "proposal",
"description": "Independent model/system architecture design",
"status": "pending",
"outputFile": "stage-6-architecture.md",
"startedAt": null,
"completedAt": null
},
{
"id": 7,
"name": "synthesis",
"phase": "convergence",
"parallel": false,
"description": "Synthesize parallel proposals into unified method",
"status": "pending",
"outputFile": "stage-7-synthesis.md",
"startedAt": null,
"completedAt": null
},
{
"id": 8,
"name": "experiments",
"phase": "convergence",
"parallel": false,
"description": "Baseline experiments and evaluation plan",
"status": "pending",
"outputFile": "stage-8-experiments.md",
"startedAt": null,
"completedAt": null
}
],
"createdAt": "ISO timestamp",
"updatedAt": "ISO timestamp"
}
When the skill is re-invoked:
pipeline.json in .omc/research-pipeline/<Output_Formats>
# Paper Review Report
## Research Goal
{goal}
## Baseline Paper: {name}
### Key Contributions
- ...
### Methodology
- ...
### Results
- ...
### Weaknesses (Detailed)
1. **[W-B1] {short name}**: {weakness} — {evidence/reasoning}
- Severity: HIGH/MEDIUM/LOW
2. **[W-B2]**: ...
### Open Questions
- ...
## Paper: {name}
### Key Contributions
...
### Weaknesses
1. **[W-{id}1]**: ...
...
## Summary of Key Weaknesses Across All Papers
| Paper | ID | Weakness | Severity |
|-------|----|----------|----------|
| ... | ... | ... | ... |
# Gap Search Report
## Weakness → Compensatory Paper Mapping
### [W-B1]: {weakness description}
**Found Papers:**
1. **{Title}** ({Authors}, {Year}, {Venue})
- URL: {url}
- PDF: `[DOWNLOADED]` → `related_papers/{FirstAuthor}_{Year}_{ShortTitle}.pdf`
- Relevance: {how it addresses the weakness}
- Key technique: {what technique it offers}
## Cross-Disciplinary Findings
{Papers from unexpected domains that offer relevant techniques}
## Download Summary
| Paper | Filename | Status |
|-------|----------|--------|
| {Title} | `{filename}.pdf` | DOWNLOADED |
| {Title} | — | DOWNLOAD_FAILED: {reason} |
- Total downloaded: {count} / {total found}
- Download directory: `{paper-directory}/related_papers/`
# Unified Method Proposal
## Method Name: {name}
## One-Paragraph Summary
{What the method does, why it's novel, what it achieves}
## Convergence Analysis
### Where proposals agree:
- {convergence point 1}
- {convergence point 2}
### Conflicts resolved:
- {conflict}: chose {approach} because {justification}
## Core Idea
{From Idea Blender, refined with Math/Arch insights}
## Mathematical Formulation
{From Math Expert, refined to match chosen architecture}
## Architecture Design
{From Arch Expert, refined to implement chosen math}
## Novelty Statement
{What is genuinely new — not incremental combination}
## Comparison with Baseline
| Aspect | Baseline | Proposed | Improvement |
|--------|----------|----------|-------------|
| ... | ... | ... | ... |
# Experiment Plan
## Datasets
| Dataset | Size | Task | Source |
|---------|------|------|--------|
## Baselines
| Method | Paper | Why Include |
|--------|-------|-------------|
| {Baseline paper method} | {cite} | PRIMARY comparison target |
## Main Experiments
| Experiment | Goal | Metrics |
|------------|------|---------|
## Ablation Studies
| Ablation | What's Removed | Tests |
|----------|----------------|-------|
## Expected Results & Compute Budget
</Output_Formats>
<Tool_Usage>
Read tool to read PDF papers (Claude Code supports PDF reading natively)Read tool to read agent prompt templates from agents/ directoryAgent tool with subagent_type="general-purpose" for each stage's agentWrite tool to save stage outputs and stateEdit tool to update pipeline.json statusWebSearch (via agent) for Stage 2 paper searchingWebFetch (via agent) to access found paper abstracts/detailsGlob to list PDF files in the paper directory
</Tool_Usage><Escalation_And_Stop_Conditions>
<Final_Checklist>
The pipeline behavior can be customized via arguments:
--goal "<goal>" # Required: research objective
--baseline "<filename>" # Override baseline paper detection
--stages "1-3" # Run only specific stages (for partial re-runs)
--skip-search # Skip Stage 2 (if you already have all papers)
--top-k 3 # Number of blending strategies in Stage 4 (default: 5)
If oh-my-claudecode is installed, the pipeline can use specialized agents:
oh-my-claudecode:scientist (opus) for deep paper analysisoh-my-claudecode:document-specialist (sonnet) for web searchoh-my-claudecode:scientist (opus) for creative synthesisoh-my-claudecode:scientist (opus) for mathematical formulationoh-my-claudecode:architect (opus) for architecture designoh-my-claudecode:scientist (opus) for proposal synthesisWithout OMC, all stages use general-purpose agents with detailed prompts.
Running idea blending, mathematical formulation, and architecture design in parallel provides:
PDF reading fails?
One parallel agent failed?
Synthesis is incoherent?
Stage 2 finds irrelevant papers?
Original task: {{PROMPT}}
npx claudepluginhub mobled37/claude-singularity --plugin claude-researchOrchestrates the full academic research pipeline: research, writing, integrity checks, two-stage peer review, and revision. Coordinates deep-research, academic-paper, and academic-paper-reviewer skills into a reproducible 10-stage workflow.
Orchestrates full research pipeline from Brainstorming to Reporting via Planning, Implementation, Testing & Visualization phases with user checkpoints. Configurable for physics, AI/ML, statistics, math domains, depth, and agent personas.
Orchestrates a 9-stage academic research pipeline (research, write, integrity check, review, revise, re-review, re-revise, final integrity check, finalize) by dispatching alterlab-deep-research, alterlab-paper-writer, and alterlab-paper-reviewer with mandatory integrity verification and user confirmation checkpoints.