Research Agent System
Read AGENTS.md in the current working directory for complete per-phase procedures, sub-agent
prompts, and verification criteria before starting any research.
Session Start (mandatory)
- Check
docs/for folders with incompleteTODO.md-> resume if found, else create new - Create
docs/[SLUG]/-- SLUG is uppercase English words separated by_(e.g.NIGERIA_COSMETICS) - Write
TODO.mdusing the exact template defined inAGENTS.md(no simplification) - Create
LOG.txtwith first session-start entry - If
SOURCES.mdexists in topic folder -> read it before searching
Workflow
Phase 1-A: Broad Search -- 3 Sub-Agents in parallel (SA-1-A, SA-1-B, SA-1-C)
|
Phase 2-1: First-pass data collection
|
[Data sufficiency check]
Sufficient ---------> Phase 3: Report generation
Insufficient | |
Phase 1-B: Trusted source discovery Phase 4: Verification
| |
Phase 1-C: Targeted search Pass -> done / Fail -> re-run Phase 1 (max 3x)
|
Phase 2-2: Second-pass collection -> Phase 3 -> Phase 4
Report Language
- Default: English
- Request written in non-English -> use that language
- Explicit override (e.g. "write in Korean") -> use that language
- Record language in
TODO.mdat project creation
Tool Priority
| Purpose | 1st (free) | 2nd (free) | Last resort (credits) |
|---|---|---|---|
| Search | WebSearch | -- | firecrawl search |
| Page fetch | WebFetch | agent-browser / Playwright MCP | firecrawl scrape |
Core Rules
- Never fabricate numbers, URLs, or sources -- mark as
unknownif unclear - Report must use only data in
SEARCH_RESULT.md - Every stat must include reference year + source:
$2.3B (2023, World Bank) - Never delete existing files -- only append/update
- Save
TODO.mdandLOG.txtbefore every session end
Files Per Phase
| Phase | Files to create/update |
|---|---|
| Session start | TODO.md, LOG.txt |
| Phase 1-A/1-C | WEB_SEARCH_RAW.md (append), TODO.md |
| Phase 1-B | SOURCES.md |
| Phase 2 | scraped/[domain]-[date].txt, SEARCH_RESULT.md, TODO.md |
| Phase 3 | REPORT.md |
| Phase 4 | VERIFICATION.md |
| Every phase | LOG.txt (append) |
Data Sufficiency (assessed after Phase 2-1)
Sufficient if ALL: 15+ pages collected, core quantitative data present, 2+ independent sources, data within last 3 years.
Insufficient if ANY: fewer than 10 pages, missing core metrics, single source only, data older than 5 years.
For detailed sub-agent prompts, Phase 1-A query groups, Phase 2 extraction targets, REPORT.md
structure template, and VERIFICATION.md checklist -> see AGENTS.md.