一键导入
deep-research
Autonomous deep research on codebases and technical topics with structured report output via map-reduce explorer architecture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Autonomous deep research on codebases and technical topics with structured report output via map-reduce explorer architecture.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Agent-only canonical output templates for rp1 artifacts. Load when producing structured markdown to ensure format consistency and routing metadata.
Ask about rp1 capabilities, discover skills, and get workflow guidance.
Evidence-gated tech debt and bloat detection. Scouts signals, ranks by materiality, validates by refutation, reports up to 5 findings with actions.
Synchronizes user-facing documentation with the current knowledge base through validate -> stale gate -> scan -> approval -> process orchestration.
Orchestrates parallel KB generation using spatial analysis and a map-reduce architecture with incremental and feature-learning modes.
Analyzes systems holistically to provide strategic recommendations balancing cost, quality, performance, complexity, and business objectives with quantified trade-offs.
| name | deep-research |
| description | Autonomous deep research on codebases and technical topics with structured report output via map-reduce explorer architecture. |
| allowed-tools | Bash(echo *), Bash(rp1 *) |
| metadata | {"category":"strategy","is_workflow":true,"workflow":{"run_policy":"fresh","identity_args":[]},"version":"1.2.0","tags":["research","analysis","exploration","core"],"created":"2025-12-16T00:00:00.000Z","updated":"2026-04-12T00:00:00.000Z","author":"cloud-on-prem/rp1","arguments":[{"name":"RESEARCH_TOPIC","type":"string","required":true,"description":"The research topic or questions (freeform text)"}],"sub_agents":["rp1-base:research-explorer","rp1-base:research-reporter"]} |
You are executing the Deep Research workflow. You coordinate autonomous research through a map-reduce architecture: clarify intent, spawn parallel explorers, synthesize findings, and delegate report generation.
CRITICAL: Commands CAN spawn agents. You will spawn research-explorer agents for exploration and research-reporter for report generation. Do NOT delegate orchestration to another agent.
stateDiagram-v2
[*] --> clarify
clarify --> plan : intent_clear
plan --> explore : plan_ready
explore --> synthesize : exploration_complete
synthesize --> report : synthesis_complete
report --> [*] : done
On each phase transition, report via:
rp1 agent-tools emit \
--workflow deep-research \
--type status_change \
--run-id {RUN_ID} \
--name "Research: {brief summary of research topic}" \
--step {CURRENT_STATE} \
--data '{"status": "running"}'
RUN_ID comes from the generated Workflow Bootstrap sectionState Progression Protocol:
--step with --data '{"status": "running"}' when you enter that state→ [*] transitions): report with --data '{"status": "completed"}' and --close-run when the step's work finishesExample sequence:
--step clarify --data '{"status": "running"}' # entering clarify phase
--step plan --data '{"status": "running"}' # intent clear, entering plan phase
--step explore --data '{"status": "running"}' # plan ready, entering explore phase
--step synthesize --data '{"status": "running"}' # exploration done, entering synthesize phase
--step report --data '{"status": "running"}' # synthesis done, entering report phase
--step report --data '{"status": "completed"}' --close-run # report work finished, workflow done
Use the pre-resolved projectRoot, kbRoot, and workRoot values from the generated Workflow Bootstrap section. Do not re-resolve directories manually, do not call resolve-args, and do not generate a UUID manually.
Goal: Understand exactly what the user wants to research before spawning explorers.
Analyze the RESEARCH_TOPIC to identify:
Prompt the user if RESEARCH_TOPIC is ambiguous about:
Clear requests (skip clarification):
Ambiguous requests (ask clarification):
After clarification (or immediately if clear), construct:
RESEARCH_INTENT:
- mode: single-project | multi-project | technical-investigation
- primary_questions: [list of specific questions to answer]
- target_projects: [list of project paths, or ["."] for current]
- focus_areas: [architecture | patterns | implementation | integration | performance]
- depth: overview | standard | deep
Goal: Define explorer assignments for parallel execution.
Based on RESEARCH_INTENT:
Single-project mode:
Multi-project mode:
Technical investigation mode:
For each explorer, prepare:
.rp1/context/ (for codebase explorers)CRITICAL: Spawn ALL explorers in PARALLEL within a SINGLE message.
For each explorer:
{% dispatch_agent "rp1-base:research-explorer" %} Explore and return JSON findings. EXPLORATION_TARGET: {target} QUESTIONS: {stringify(questions)} EXPLORATION_TYPE: {type} KB_PATH: {kb_path}
Return structured JSON per output contract. {% enddispatch_agent %}
Naming convention: explorer-{n} where n is 1, 2, 3...
Wait for ALL explorers to complete before proceeding.
CRITICAL: Use extended thinking for this entire phase.
Parse JSON output from each explorer:
Handle failures:
Combine findings from all explorers:
Using extended thinking, analyze merged findings to:
Based on synthesis, create actionable recommendations:
Identify diagrams that would aid understanding:
For each diagram, specify:
Construct the synthesis data JSON for the reporter:
{
"topic": "<research topic>",
"scope": "single-project | multi-project | technical-investigation",
"projects_analyzed": ["<path1>", "<path2>"],
"research_questions": ["<q1>", "<q2>"],
"executive_summary": "<1-2 paragraph summary>",
"findings": [
{
"id": "F-001",
"category": "<category>",
"title": "<title>",
"description": "<description>",
"confidence": "high | medium | low",
"evidence": [...]
}
],
"comparative_analysis": {
"aspects": ["<aspect1>", "<aspect2>"],
"comparison_table": [
{"aspect": "<aspect>", "project_a": "<approach>", "project_b": "<approach>", "analysis": "<comparison>"}
]
},
"recommendations": [
{
"id": "R-001",
"action": "<action>",
"priority": "high | medium | low",
"rationale": "<why>",
"implementation_notes": "<how>"
}
],
"diagram_specs": [
{
"id": "D-001",
"title": "<title>",
"type": "flowchart | sequence | er | class",
"description": "<what to visualize>",
"elements": ["<element descriptions>"]
}
],
"sources": {
"codebase": ["<file:line> - <description>"],
"external": ["<URL> - <description>"]
},
"metadata": {
"explorers_spawned": "<count>",
"kb_status": {"<project>": {"available": true, "files_loaded": ["..."]}},
"files_explored": "<total_count>",
"web_searches": "<total_count>"
}
}
The reporter handles output file naming (slugification, directory creation, deduplication).
{% dispatch_agent "rp1-base:research-reporter" %} Generate research report. SYNTHESIS_DATA: {stringify(synthesis_data)} REPORT_TYPE: {standard | comparative} WORK_ROOT: {workRoot}
Return JSON with report status and path. {% enddispatch_agent %}
Parse JSON output:
Handle failure:
After extracting report_path, register it in the artifact database:
rp1 agent-tools emit \
--workflow deep-research \
--type artifact_registered \
--run-id {RUN_ID} \
--step report \
--data '{"path": "{report_path}", "feature": "research", "storageRoot": "project"}'
Output a concise summary to the user:
## Research Complete
**Topic**: {research_topic}
**Scope**: {scope}
**Projects Analyzed**: {project_list}
### Key Findings
{2-3 sentence summary of most important findings}
### Recommendations
- {Top recommendation 1}
- {Top recommendation 2}
### Report
Full report saved to: `{report_path}`
**Methodology**:
- Explorers spawned: {count}
- KB files loaded: {list or "none available"}
- Files explored: {count}
- Web searches: {count}
- Diagrams generated: {count}
{% include_shared "anti-loop.md" %}
File-specific constraints:
If blocked:
CRITICAL - Keep Output Focused:
| Error | Action |
|---|---|
| Ambiguous topic | Ask ONE clarifying question |
| No target projects | Default to current directory |
| Explorer JSON invalid | Skip explorer, continue if >50% succeed |
| >50% explorers fail | Abort with clear error message |
| Reporter fails | Output synthesis summary directly to user |
| No findings | Report "no significant findings" with methodology |