Deep Research Skill (Subagent Workspace)
This copy exists inside the research workspace so the subagent sees the same contract from its own sandbox.
Execution Summary
- Initialize
tmp/artifacts withpython scripts/init_research_run.py --topic "<goal-summary>" --language "<language>" --task-date "<YYYY-MM-DD>" --workspace "."at the start of every new task, even if old files already exist intmp/. This step must succeed before any search begins. Then readtmp/research_plan.jsonand treatreport_targetas the only valid destination for the report. - Follow the 5-stage pipeline from
SOUL.md:plan -> scout -> harvest -> verify -> synthesize. - In scout, use the local Tavily adapter as the default path:
python scripts/tavily.py "<query>" --query-family baseline --append-query-log tmp/query_log.json --append-source-registry tmp/source_registry.json --output tmp/tavily_last.json - Keep raw
web_searchbounded: normally no more than 2 broad or recencyweb_searchcalls before the first harvest pass. After that, prefer Tavily plus targetedweb_fetch. - After each broad
web_search, materialize the top 1-2 novel external URLs into artifacts withpython scripts/materialize_query_results.py --provider web_search --query "<query>" --query-family <family> --urls <url1> <url2> --append-query-log tmp/query_log.json --append-source-registry tmp/source_registry.json. - Run a mini-harvest pass for shortlist models and shortlist claims before synthesis; snippets alone are not enough for final findings.
- Run
python scripts/expand_research_coverage.py --workspace "<workspace-root>"after the first verify pass. If it reportsneeded=true, execute only the suggested follow-up queries, harvest up to 2 new sources per unresolved core question, and run it once more. - Build evidence in JSON artifacts first, then run
python scripts/normalize_research_artifacts.py --workspace "<workspace-root>". - Keep machine-readable JSON artifacts ASCII-safe where practical; prefer English strings in artifacts even when the final report is in Russian.
- Lint the report with
python scripts/report_lint.py --report "<absolute-report-path>" --workspace "<workspace-root>". - Validate the report with
python scripts/validate_research_report.py --report "<absolute-report-path>". - Finalize the M2M JSON with
python scripts/finalize_research_run.py --report "<absolute-report-path>"and return that JSON verbatim.
Non-Negotiables
- Search tools are discovery tools, not evidence by themselves.
- Do not manually inspect environment secrets during research; rely on the local Tavily adapter to resolve
TAVILY_API_KEY. - Do not reuse stale
tmp/state across tasks; the current run must be anchored by a freshly initializedtmp/research_plan.jsonwhose topic and task date match the current request. - On a fresh run, do not open old files in
reports/to continue from them. Only usetmp/research_plan.json.report_targetunless the task explicitly says to resume a previous run. web_fetchor equivalent full-page retrieval is required for high-value sources.- If
web_fetchon Reddit, YouTube, LinkedIn, forums, or other low-value community pages returns a wall of CSS, a login wall, or unusable boilerplate, stop retrying that page and keep it only as discovery context. - Every high-impact claim must have fetched supporting evidence before it can stay
verified. - Use inline Markdown links in findings and a numbered bibliography at the end.
- Each finding bullet, paragraph, or table row must contain at least one inline Markdown link to a supporting external source.
- Only real external
http/httpsURLs fromsource_registry.jsonmay be cited; never use local files liketmp/tavily_last.jsonor other workspace artifacts as evidence. - Treat
source_countas a soft breadth signal, not the success criterion. - Preserve breadth honestly: keep discovery-only external URLs in
source_registry.jsonwhen they are novel, canonical, and useful for breadth accounting, even if they remainfetched=false. - Materialize
web_searchbreadth the same way as Tavily breadth; otherwisesource_countand coverage breadth will stay artificially low. - Anchor the report to the task date and mention it explicitly in the report body.
- Do not return
SUCCESSif required artifacts are missing, stale, not materialized on disk, or eitherreport_lint.pyor the validator fails. - Do not handcraft the final M2M JSON; return the finalizer output verbatim.
- Do not create ad hoc mutation scripts inside
tmp/; use the checked-in scripts underscripts/and update artifact JSON directly. - High-impact claims require two independent supporting sources whenever possible.
- Machine-readable JSON artifacts should stay English and ASCII-safe; keep Russian for the user-facing report only.