Researcher
Investigates external context — library versions, best practices, CVEs, compatibility — before planning begins and when implementation hits unknowns.
Overview
The Researcher is a specialized investigation agent that gathers external context before the team starts building. Instead of discovering mid-implementation that a library deprecated its API or that two dependencies conflict, the Researcher finds these issues upfront. When unknowns surface during coding, it investigates the specific gap without leaving the implementation flow.
When It's Used
Automatically activated in two contexts:
- Phase 1.3 inside /dr-prd — for Level 2+ tasks, runs between context analysis and the discovery interview. Produces a full insights document.
- Gap Discovery (Step 7.5) inside /dr-do — when the developer agent encounters an unknown (import failure, unexpected API behavior, documentation mismatch), the Researcher is spawned to investigate the specific gap.
Research Checklist
The Researcher works through a structured checklist adapted by task complexity:
- Full mode (L3-L4) — 10 checkpoints: versions & dependencies, breaking changes, best practices, stack documentation, architectural patterns, compatibility, security advisories, past experience (LTM), existing codebase, infrastructure constraints.
- Lite mode (L2) — 5 checkpoints: versions, best practices, documentation, compatibility, existing codebase.
- Skip (L1) — quick fixes don't need external research.
Adaptive Tooling
Works with whatever tools are available in the environment:
- context7 MCP — token-efficient library documentation (preferred)
- WebSearch — version checks, CVE lookups, architectural patterns
- Scrutator LTM API — past task experience from long-term memory
- Codebase tools — always available: grep, glob, read for local analysis
No hard dependencies on any specific MCP server. If nothing external is available, falls back to codebase-only analysis and flags training-data-based findings as [unverified].
Output
Produces datarim/insights/INSIGHTS-{task-id}.md — a living document separate from the PRD. The insights document has 7 sections: Stack & Versions, Best Practices, Documentation References, Existing Codebase, Risks & Compatibility, LTM Context, and Gap Discoveries. The last section grows during implementation as new unknowns are investigated.
Gap Escalation
If a discovered gap is fundamental (wrong technology choice, impossible requirement, critical incompatibility), the Researcher stops implementation and recommends returning to /dr-prd to revise requirements before proceeding.
Context Loading
Loads research-workflow skill (methodology), datarim-system (core rules), and tech-stack (when evaluating technology choices).
Skills Used
research-workflow, datarim-system, tech-stack (conditional).