--- name: deep-research description: "Load for research tasks, architectural investigations, and vendor, library, or technology comparisons." license: MIT user-invocable: true argument-hint: "report [query] --output findings.md" metadata: author: "vanillagreen" source: "kendex" repository: "https://github.com/vanillagreencom/kendex" bugs: "https://github.com/vanillagreencom/kendex/issues" --- ## Project Instructions Problems with a kendex-owned skill go through `kendex report`; check ownership in the file first. # Deep Research - In Pi with the `web_research` tool active, use that tool. - Pass `outputPath` when creating a report. - In every other harness, run `scripts/deep-research` with `EXA_API_KEY` set, or with `KENDEX_KEY_FILE` naming a key file that holds it. ## Rules - Exa is the research source. Substitute a general web search only when Exa is unavailable and the user approves the fallback. - Use the caller's exact report path. When none is given, use `tmp/plans/-research.md`. - Return the readable report path and any sidecar path to the caller. The caller's selected handoff workflow owns delivery and retention. - Research on building against another system is held to [code-quality ยง Over-Engineering](../code-quality/SKILL.md#over-engineering). - For a vendor comparison, ask the research query for provider documentation that shows how each product performs the consumer's actual task. - Cite sources for material claims. - Provider payloads go in the sidecar JSON, never inline. By default the sidecar sits beside the report, named as the report with `.raw.json` in place of its extension: `findings.raw.json` for `findings.md`. - Sanitize evidence excerpts: source-page headings must not render as headings. - Revise any generated vendor comparison using [Vendor comparisons](#vendor-comparisons) before running `validate`. - Once the report and its sidecar exist, run `validate` and stop. - A report written by hand on the approved fallback route has no sidecar: run `validate` on the report alone. - Do no local reproduction, benchmarks, tests, code inspection or implementation unless the caller asked for it. ## Running ```bash .agents/skills/deep-research/scripts/deep-research report "question" --mode standard --output path/to/findings.md .agents/skills/deep-research/scripts/deep-research report --query-file prompt.txt --context-glob 'context-*.md' --mode full --output findings.md .agents/skills/deep-research/scripts/deep-research json "question" --output raw.json .agents/skills/deep-research/scripts/deep-research validate findings.md findings.raw.json .agents/skills/deep-research/scripts/deep-research doctor ``` `deep-research help` lists the flags and mode settings. The flags can override a mode's settings. - Use `lite` for an evidence brief. - `standard` and `full` request synthesized findings. - Use `full` when the research needs a separate request for each additional query. `--include-domain` is a hard host filter, not a quality filter: `--include-domain github.com` admits every repo on it and excludes everything else. - Name authoritative projects and organizations in the query text for quality. - Audit the returned source list either way. ## Validation ```bash .agents/skills/deep-research/scripts/deep-research validate path/to/findings.md path/to/findings.raw.json ``` `validate` checks structure only. Read the report yourself: - Find claims the cited sources contradict. - Spot-check material numbers against the sidecar source text. - Find off-topic sources that share an acronym or name with the subject. - Find recommendations with no claim-level support in Evidence and Sources. - Find results generalized past what the source established. ## Findings format - `templates/findings.md` carries exactly the sections `validate` requires, in order. - `Key Findings` holds distinct claims, not a restatement of the summary. - Record mode and source counts in `## Research Metadata`. ### Vendor comparisons - Start the recommendation with how each product performs the consumer's actual task, verified against the provider's documentation. - Rank features, price or popularity after presenting that evidence. - If the task involves contacting someone, name who the recipient sees as the sender and describe what the recipient experiences on first contact. - Mark gaps in the evidence under `Risks / Unknowns`. - If an unanswered question could change the choice, recommend a purchase only if the answer supports that choice.