Researcher v2.0 (USACF Research Generator)
Voice-to-research engineering for Claude Code. Transform rough questions into executable USACF swarm configurations.
Changelog
| Version |
Changes |
| v2.0 |
Full USACF integration: algorithm selection, claude-flow commands, adversarial review, fact-checking, memory namespaces |
| v1.0 |
Initial version based on Reprompter v4.1 |
Purpose
Turn your rough research questions into complete, executable multi-agent research prompts using the USACF framework.
The Problem:
- Research questions are often vague and unstructured
- Manual setup of research swarms is tedious
- Missing adversarial review leads to blind spots
- No systematic algorithm selection
The Solution:
Smart interview → USACF super-prompt with all phases, agents, and commands.
Process (4 steps)
Step 1: Receive raw input
Accept the user's rough research question (dictated, typed messily, or incomplete).
Trigger words: research, investigate, deep dive, analyze, research this
Step 2: Complexity detection
Auto-detect complexity to select algorithm:
- Simple (< 20 words, single topic) → CoT, 1-3 agents
- Medium (branching, comparison) → ToT, 4-8 agents
- Complex (comprehensive, multi-domain) → GoT, 9-15 agents
Step 3: Smart interview (gather user input)
Gather:
- Research Title - Name for this research
- Subject - What we're researching
- Subject Type - Product / Software / Business / Process / Organization
- Research Type - Competitive / Gap / Technical / Due Diligence / Market
- Objectives - What to find out (1-20, one per line)
- Constraints - Focus areas, limitations (optional)
- Depth - CoT / ToT / GoT
- Output - Brief / Full Report / Action Plan / Raw
Step 4: Generate USACF super-prompt + score
Generate complete executable configuration with:
- Initialization commands
- All phase agents (Discovery, Analysis, Adversarial, Synthesis)
- Memory operations
- Final report generator
- Quality score comparison
CRITICAL: MUST GENERATE COMPLETE SUPER-PROMPT
After interview completes, you MUST immediately:
- Select algorithm (CoT/ToT/GoT) based on complexity
- Generate full USACF super-prompt with ALL phases
- Include claude-flow commands for every operation
- Add adversarial review agents (red-team, fact-checker)
- Show quality score (before/after comparison)
- Offer to execute or copy
WRONG: Generate simple prompt without agents
RIGHT: Generate full USACF config with all phases, agents, memory ops
Algorithm selection matrix
| Complexity |
Algorithm |
Topology |
Agents |
When to Use |
| Simple |
Chain-of-Thought (CoT) |
Star |
1-3 |
"What is X?" Single topic |
| Medium |
Tree-of-Thought (ToT) |
Hierarchical |
4-8 |
"Compare X vs Y" Branching |
| Complex |
Graph-of-Thought (GoT) |
Mesh/Hive |
9-15+ |
"Comprehensive analysis" |
Complexity Indicators:
- Simple: Single topic, factual question, < 20 words
- Medium: "compare", "vs", "evaluate", "options"
- Complex: "comprehensive", "gaps and opportunities", multiple domains
USACF phases (all required for complex research)
Phase 0: Initialization
npx claude-flow@alpha init --force
npx claude-flow@alpha swarm init --topology {topology} --max-agents {N}
npx claude-flow@alpha memory store "session/config" '{...}' --namespace search
Phase 0.5: Meta-analysis
- Step-back prompting (principles, criteria)
- Self-ask decomposition (15-20 questions)
- Research planning (ReWOO)
Phase 1: Discovery (Parallel)
- component-identifier
- hierarchy-analyzer
- interface-mapper
- flow-tracer
Phase 2: Analysis (Parallel)
- 6 gap hunters (quality, performance, security, structural, capability, UX)
- 4 risk analysts (FMEA, edge cases, vulnerabilities, reliability)
Phase 2.5: Adversarial review (critical)
- red-team-reviewer: Challenge ALL findings
- fact-checker: RAG verification with web_search
- coordinator: Integrate feedback, update confidence
Phase 3: Synthesis (Parallel)
- quick-win-generator (0-3 months)
- strategic-generator (3-12 months)
- transformational-generator (12-36 months)
- pareto-optimizer (multi-objective portfolios)
Phase 4: Final report
- Ultra-brief (3 sentences)
- Executive summary
- Top 10 findings with confidence
- Recommended actions by horizon
- Limitations & uncertainties
Memory namespace convention
All agents store to namespaced memory:
# Session
session/config # Research configuration
# Meta
meta/principles # Core principles
meta/questions # Decomposed questions
meta/research-plan # Planned tasks
# Discovery
discovery/components # Identified components
discovery/hierarchy # Structural map
discovery/interfaces # APIs/contracts
discovery/flows # Data/control flows
# Gaps
gaps/quality # Quality gaps
gaps/performance # Performance gaps
gaps/security # Security gaps
# Risks
risks/fmea # Failure mode analysis
risks/edge-cases # Edge cases
risks/vulnerabilities # Security vulnerabilities
# Adversarial
adversarial/critiques # Red team challenges
adversarial/fact-check # Verified claims
# Opportunities
opportunities/quick-wins # 0-3 month wins
opportunities/strategic # 3-12 month plays
opportunities/transformational # 12-36 month bets
opportunities/pareto-recommendation # Optimal portfolio
# Output
output/final-report # Comprehensive report
Quality scoring
Always show before/after metrics:
| Dimension |
Before |
After |
Change |
| Clarity |
X/10 |
X/10 |
+X% |
| Algorithm Selection |
0/10 |
10/10 |
+∞ |
| Agent Design |
0/10 |
9/10 |
+∞ |
| Memory Ops |
0/10 |
10/10 |
+∞ |
| Adversarial |
0/10 |
9/10 |
+∞ |
| Fact Checking |
0/10 |
8/10 |
+∞ |
| Overall |
X/10 |
9+/10 |
+2000%+ |
Example
Before (rough input):
"look into what solana is doing with AI and how we compare"
After (USACF super-prompt):
# USACF Research: Solana AI Competitive Analysis
## Configuration
- Algorithm: ToT (medium complexity - comparison)
- Topology: Hierarchical
- Agents: 8
- Output: Executive Brief
## Phase 0: Initialization
[claude-flow init commands]
## Phase 1: Discovery
[4 parallel agents with memory stores]
## Phase 2: Analysis
[Gap hunters + risk analysts]
## Phase 2.5: Adversarial
[Red team + fact checker]
## Phase 3: Synthesis
[Opportunity generators + pareto optimizer]
## Phase 4: Report
[Final report generator]
Quality: 1.2/10 → 9.3/10 (+675%)
Tips for best results
- Be specific about competitors - Name them in the input
- Mention constraints early - "focus on Q1", "executive-level"
- State objectives - Even rough ones help
- Say "expand" - For full interview on simple queries
- Say "quick" - To skip interview for simple research
Comparison: Reprompter vs Researcher
| Aspect |
Reprompter |
Researcher |
| Trigger |
"reprompt" |
"research" / "researcher" |
| Purpose |
General prompts |
Research prompts |
| Output |
Structured prompt |
USACF swarm config |
| Agents |
None |
8-15 parallel agents |
| Memory |
No |
Full namespace system |
| Adversarial |
No |
Red team + fact checker |
| Algorithm |
No |
CoT/ToT/GoT selection |
1---2name: research-reprompter3description: Transform rough research questions into executable USACF research prompts. Use when user says "research", "research this", "investigate", "deep dive", "researcher", or pastes a research topic. Generates complete multi-agent swarm configuration with algorithm selection, claude-flow commands, and adversarial review.4---5
6# Researcher v2.0 (USACF Research Generator)
7
8> **Voice-to-research engineering for Claude Code. Transform rough questions into executable USACF swarm configurations.**
9
10## Changelog
11
12| Version | Changes |
13|---------|---------|
14| **v2.0** | Full USACF integration: algorithm selection, claude-flow commands, adversarial review, fact-checking, memory namespaces |
15| v1.0 | Initial version based on Reprompter v4.1 |
16
17## Purpose
18
19Turn your rough research questions into complete, executable multi-agent research prompts using the USACF framework.
20
21**The Problem:**
22- Research questions are often vague and unstructured
23- Manual setup of research swarms is tedious
24- Missing adversarial review leads to blind spots
25- No systematic algorithm selection
26
27**The Solution:**
28Smart interview → USACF super-prompt with all phases, agents, and commands.
29
30---
31
32## Process (4 steps)
33
34### Step 1: Receive raw input
35Accept the user's rough research question (dictated, typed messily, or incomplete).
36
37**Trigger words:** `research`, `investigate`, `deep dive`, `analyze`, `research this`
38
39### Step 2: Complexity detection
40**Auto-detect complexity to select algorithm:**
41- Simple (< 20 words, single topic) → CoT, 1-3 agents
42- Medium (branching, comparison) → ToT, 4-8 agents
43- Complex (comprehensive, multi-domain) → GoT, 9-15 agents
44
45### Step 3: Smart interview (gather user input)
46Gather:
471. **Research Title** - Name for this research
482. **Subject** - What we're researching
493. **Subject Type** - Product / Software / Business / Process / Organization
504. **Research Type** - Competitive / Gap / Technical / Due Diligence / Market
515. **Objectives** - What to find out (1-20, one per line)
526. **Constraints** - Focus areas, limitations (optional)
537. **Depth** - CoT / ToT / GoT
548. **Output** - Brief / Full Report / Action Plan / Raw
55
56### Step 4: Generate USACF super-prompt + score
57Generate complete executable configuration with:
58- Initialization commands
59- All phase agents (Discovery, Analysis, Adversarial, Synthesis)
60- Memory operations
61- Final report generator
62- Quality score comparison
63
64---
65
66## CRITICAL: MUST GENERATE COMPLETE SUPER-PROMPT
67
68**After interview completes, you MUST immediately:**
69
701. **Select algorithm** (CoT/ToT/GoT) based on complexity
712. **Generate full USACF super-prompt** with ALL phases
723. **Include claude-flow commands** for every operation
734. **Add adversarial review agents** (red-team, fact-checker)
745. **Show quality score** (before/after comparison)
756. **Offer to execute or copy**
76
77```text
78WRONG: Generate simple prompt without agents
79RIGHT: Generate full USACF config with all phases, agents, memory ops
80```
81
82---
83
84## Algorithm selection matrix
85
86| Complexity | Algorithm | Topology | Agents | When to Use |
87|------------|-----------|----------|--------|-------------|
88| Simple | Chain-of-Thought (CoT) | Star | 1-3 | "What is X?" Single topic |
89| Medium | Tree-of-Thought (ToT) | Hierarchical | 4-8 | "Compare X vs Y" Branching |
90| Complex | Graph-of-Thought (GoT) | Mesh/Hive | 9-15+ | "Comprehensive analysis" |
91
92**Complexity Indicators:**
93- Simple: Single topic, factual question, < 20 words
94- Medium: "compare", "vs", "evaluate", "options"
95- Complex: "comprehensive", "gaps and opportunities", multiple domains
96
97---
98
99## USACF phases (all required for complex research)
100
101### Phase 0: Initialization
102```bash
103npx claude-flow@alpha init --force
104npx claude-flow@alpha swarm init --topology {topology} --max-agents {N}
105npx claude-flow@alpha memory store "session/config" '{...}' --namespace search
106```
107
108### Phase 0.5: Meta-analysis
109- Step-back prompting (principles, criteria)
110- Self-ask decomposition (15-20 questions)
111- Research planning (ReWOO)
112
113### Phase 1: Discovery (Parallel)
114- component-identifier
115- hierarchy-analyzer
116- interface-mapper
117- flow-tracer
118
119### Phase 2: Analysis (Parallel)
120- 6 gap hunters (quality, performance, security, structural, capability, UX)
121- 4 risk analysts (FMEA, edge cases, vulnerabilities, reliability)
122
123### Phase 2.5: Adversarial review (critical)
124- **red-team-reviewer**: Challenge ALL findings
125- **fact-checker**: RAG verification with web_search
126- **coordinator**: Integrate feedback, update confidence
127
128### Phase 3: Synthesis (Parallel)
129- quick-win-generator (0-3 months)
130- strategic-generator (3-12 months)
131- transformational-generator (12-36 months)
132- pareto-optimizer (multi-objective portfolios)
133
134### Phase 4: Final report
135- Ultra-brief (3 sentences)
136- Executive summary
137- Top 10 findings with confidence
138- Recommended actions by horizon
139- Limitations & uncertainties
140
141---
142
143## Memory namespace convention
144
145All agents store to namespaced memory:
146
147```bash
148# Session
149session/config # Research configuration
150
151# Meta
152meta/principles # Core principles
153meta/questions # Decomposed questions
154meta/research-plan # Planned tasks
155
156# Discovery
157discovery/components # Identified components
158discovery/hierarchy # Structural map
159discovery/interfaces # APIs/contracts
160discovery/flows # Data/control flows
161
162# Gaps
163gaps/quality # Quality gaps
164gaps/performance # Performance gaps
165gaps/security # Security gaps
166
167# Risks
168risks/fmea # Failure mode analysis
169risks/edge-cases # Edge cases
170risks/vulnerabilities # Security vulnerabilities
171
172# Adversarial
173adversarial/critiques # Red team challenges
174adversarial/fact-check # Verified claims
175
176# Opportunities
177opportunities/quick-wins # 0-3 month wins
178opportunities/strategic # 3-12 month plays
179opportunities/transformational # 12-36 month bets
180opportunities/pareto-recommendation # Optimal portfolio
181
182# Output
183output/final-report # Comprehensive report
184```
185
186---
187
188## Quality scoring
189
190**Always show before/after metrics:**
191
192| Dimension | Before | After | Change |
193|-----------|--------|-------|--------|
194| Clarity | X/10 | X/10 | +X% |
195| Algorithm Selection | 0/10 | 10/10 | +∞ |
196| Agent Design | 0/10 | 9/10 | +∞ |
197| Memory Ops | 0/10 | 10/10 | +∞ |
198| Adversarial | 0/10 | 9/10 | +∞ |
199| Fact Checking | 0/10 | 8/10 | +∞ |
200| **Overall** | **X/10** | **9+/10** | **+2000%+** |
201
202---
203
204## Example
205
206**Before (rough input):**
207> "look into what solana is doing with AI and how we compare"
208
209**After (USACF super-prompt):**
210
211```markdown
212# USACF Research: Solana AI Competitive Analysis
213
214## Configuration
215- Algorithm: ToT (medium complexity - comparison)
216- Topology: Hierarchical
217- Agents: 8
218- Output: Executive Brief
219
220## Phase 0: Initialization
221[claude-flow init commands]
222
223## Phase 1: Discovery
224[4 parallel agents with memory stores]
225
226## Phase 2: Analysis
227[Gap hunters + risk analysts]
228
229## Phase 2.5: Adversarial
230[Red team + fact checker]
231
232## Phase 3: Synthesis
233[Opportunity generators + pareto optimizer]
234
235## Phase 4: Report
236[Final report generator]
237
238Quality: 1.2/10 → 9.3/10 (+675%)
239```
240
241---
242
243## Tips for best results
244
245- **Be specific about competitors** - Name them in the input
246- **Mention constraints early** - "focus on Q1", "executive-level"
247- **State objectives** - Even rough ones help
248- **Say "expand"** - For full interview on simple queries
249- **Say "quick"** - To skip interview for simple research
250
251---
252
253## Comparison: Reprompter vs Researcher
254
255| Aspect | Reprompter | Researcher |
256|--------|------------|------------|
257| **Trigger** | "reprompt" | "research" / "researcher" |
258| **Purpose** | General prompts | Research prompts |
259| **Output** | Structured prompt | USACF swarm config |
260| **Agents** | None | 8-15 parallel agents |
261| **Memory** | No | Full namespace system |
262| **Adversarial** | No | Red team + fact checker |
263| **Algorithm** | No | CoT/ToT/GoT selection |