You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: External research agent — web search for API details, design patterns, best practices, and technology validation. Returns structured markdown, does NOT write files.
4
+
tools: Read, WebSearch, WebFetch, Bash
5
+
---
6
+
7
+
# External Research Agent
8
+
9
+
## Role
10
+
You perform targeted external research using web search to gather API details, design patterns, architecture approaches, best practices, and technology evaluations. You synthesize findings into structured, actionable markdown for downstream analysis workflows.
11
+
12
+
Spawned by: analyze-with-file (Phase 2), brainstorm-with-file, or any workflow needing external context.
13
+
14
+
**CRITICAL**: Return structured markdown only. Do NOT write any files unless explicitly instructed in the prompt.
15
+
16
+
## Process
17
+
18
+
1.**Parse research objective** — Understand the topic, focus area, and what the caller needs
When `--yes` or `-y`: Auto-confirm exploration decisions, use recommended analysis angles.
11
11
12
12
<purpose>
13
-
Interactive collaborative analysis workflow combining codebase exploration (cli-explore-agent) with CLI-assisted analysis (Gemini/Codex). Produces a documented discussion timeline with evolving understanding, decision trails, and actionable conclusions.
13
+
Interactive collaborative analysis workflow combining codebase exploration (cli-explore-agent), external research (workflow-research-agent), and CLI-assisted analysis (Gemini/Codex). Produces a documented discussion timeline with evolving understanding, decision trails, and actionable conclusions.
14
14
15
15
Invoked when user needs deep, multi-perspective analysis of a topic or codebase question — e.g., architecture review, implementation analysis, concept exploration, or decision evaluation.
16
16
17
-
Produces: `discussion.md` (evolving analysis document with TOC, rounds, narrative synthesis), `explorations.json`/`perspectives.json` (structured findings), `conclusions.json` (final synthesis with recommendations). All artifacts stored in `.workflow/.analysis/{session-id}/`.
17
+
Produces: `discussion.md` (evolving analysis document with TOC, rounds, narrative synthesis), `explorations.json`/`perspectives.json` (structured findings), `research.json` (external research findings), `conclusions.json` (final synthesis with recommendations). All artifacts stored in `.workflow/.analysis/{session-id}/`.
18
18
</purpose>
19
19
20
20
<conventions>
@@ -80,8 +80,9 @@ All `AskUserQuestion` calls MUST comply:
**Phase A2 — External Research** (parallel with Phase A, runs when topic involves technologies/patterns/APIs):
182
+
183
+
Determine if external research would add value — skip for purely internal codebase questions (e.g., "how does module X work"), run for topics involving technology choices, best practices, architecture patterns, API usage, or comparison with industry standards.
184
+
185
+
```javascript
186
+
// External research — runs in PARALLEL with Phase A codebase exploration
187
+
// Skip if topic is purely internal codebase navigation
-**继续深入**: Direction correct — deepen automatically or user specifies direction (combines agree+deepen and agree+suggest)
399
+
-**外部研究**: Need external research on specific technology/pattern/best practice (spawns workflow-research-agent)
337
400
-**调整方向**: Different focus or specific questions to address
338
-
-**补充信息**: User has additional context, constraints, or corrections to provide
339
401
-**分析完成**: Sufficient -> exit to Phase 4
340
402
341
403
4.**Process Response** (always record user choice + impact to discussion.md):
@@ -347,9 +409,14 @@ const priorContext = `
347
409
-**"Other" is auto-provided** by AskUserQuestion — covers user-specified custom direction (no need for separate "suggest next step" option)
348
410
- Execute selected direction -> merge newcode_anchors/call_chains -> record confirmed assumptions + deepen angle
349
411
350
-
**调整方向** -> AskUserQuestion (header: "新方向", user selects or provides custom via "Other") -> new CLI exploration -> Record Decision (old vs new direction, reason, impact)
412
+
**外部研究**-> Spawn workflow-research-agent for targeted research:
413
+
-AskUserQuestion (header:"研究主题", freetext via "Other"): What specific technology/pattern/approach needs external research?
414
+
- Spawn research agent with topic + current codebase context (from explorations.json)
415
+
- Merge research findings into explorations.json`external_research` section
- Record research findings as Key Findings in discussion.md
351
418
352
-
**补充信息** -> Capture user input, integrate into context, answer questions via CLI/analysis if needed -> Record corrections/additions + updated understanding
419
+
**调整方向** -> AskUserQuestion (header: "新方向", user selects or provides custom via "Other") -> new CLI exploration -> Record Decision (old vs new direction, reason, impact)
0 commit comments