[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78AR2C8N4R81PD2SHTBFHPM":3,"skill-same:01M78AR2C8N4R81PD2SHTBFHPM":173},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M78AR2C8N4R81PD2SHTBFHPM","deep-research",null,"Use when the user asks for \"deep research\", a \"research report on\", a \"comprehensive analysis of\", to \"look into X in depth\", to \"write a report on X\", or any question needing multi-source synthesis beyond a single search — an autonomous multi-step deep research engine implementing an iterative Think → Search → Extract → Synthesize → Stop loop. The LLM drives every decision: what to search, what's relevant, what's missing, and when to stop. Produces a cited, magazine-quality report with inline citations, category-specific formatting, and research stats. For entity vetting\u002Fdossiers use entity-research; for news digests use news-monitoring; for source-grounded Q&A use notebooklm-mode.","moonlight-lupin\u002Fagent-skills","moonlight-lupin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F136997773?v=4","01M78AEDSH1N62R0RNWPWMWVQY","01M78AEDT8ZF85MTK6XYBQBTNT",123,"MIT","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: deep-research\ndescription: \"Use when the user asks for \\\"deep research\\\", a \\\"research report on\\\", a \\\"comprehensive analysis of\\\", to \\\"look into X in depth\\\", to \\\"write a report on X\\\", or any question needing multi-source synthesis beyond a single search — an autonomous multi-step deep research engine implementing an iterative Think → Search → Extract → Synthesize → Stop loop. The LLM drives every decision: what to search, what's relevant, what's missing, and when to stop. Produces a cited, magazine-quality report with inline citations, category-specific formatting, and research stats. For entity vetting\u002Fdossiers use entity-research; for news digests use news-monitoring; for source-grounded Q&A use notebooklm-mode.\"\nlicense: MIT\nmetadata:\n  version: 1.13.0\n  author: moonlight-lupin\n  platforms: [linux, macos, windows]\n  hermes:\n    tags: [research, deep-research, report, synthesis, iterative, citations, evidence-basis, provenance]\n    related_skills: [news-monitoring, entity-research, notebooklm-mode]\n---\n\n# Deep Research — Iterative Research Engine\n\nAn autonomous, multi-step research engine that performs exhaustive information\ngathering and synthesis. Unlike a single `web_search`, this skill implements an\niterative loop where the agent plans, searches, extracts, synthesizes, and\ndecides when to stop — producing a cited report with structured evidence,\nsource quality tiers, and explicit gaps\u002Fcontradictions sections.\n\nSee `references\u002Fstructured-evidence-format.md` for the evidence.json layer and\n`references\u002Fdocsgpt-concepts.md` for adaptive-depth concept mapping.\n\nFor the \"is there updated or custom firmware for device X?\" question class, follow\n`references\u002Ffirmware-support-status-research.md` — vendor download page + official-forum RSS + GitHub-API triangulation recipe.\n\n## When to use\n\n- User asks for \"deep research\", \"research report\", \"comprehensive analysis\"\n- User wants a written report on a topic (not just a quick answer)\n- Question requires multi-source synthesis with citations\n- User says \"look into X in depth\" or \"write a report on X\"\n\n## When NOT to use\n\n- **Entity vetting\u002Fdossiers** → use `entity-research` (has sanctions screening, structured lenses)\n- **Recurring news digests** → use `news-monitoring` (has cron, dedup, multi-language)\n- **Source-grounded Q&A from collected sources** → use `notebooklm-mode` (has vault + RAG)\n- **Quick factual question** → just use `web_search` directly\n- **Single-source extraction** → use `web_search` + `web_extract`\n\n## Architecture\n\n```\nUser question\n  → Step 0: Clarification (optional — assess if question is too vague)\n  → Step 1: Plan (sub-questions, key topics, success criteria, category, language, complexity)\n  → Step 2: Date grounding + language anchor\n  → Step 3: Iterative loop (max rounds = complexity cap: simple=2, moderate=3, complex=5)\n      ├─ 3a: Generate gap-driven queries (incl. refute queries from round 2+, empty-search refinement)\n      ├─ 3b: Search (web_search) + fetch (web_extract)\n      ├─ 3c: Quality filter + extraction + source quality classification + numbered citations\n      ├─ 3d: Synthesize into cumulative research state (with token budget check)\n      ├─ 3e: Structured evidence (optional: evidence.json for 5+ sources)\n      └─ 3f: Stopping check (LLM evaluates coverage + token budget)\n  → Step 4: Final report (overview-first structure, see template)\n  → Step 5: Stats summary\n```\n\n**Report output order (overview-first):** Executive Summary → comparison\u002Foverview table → detailed analysis per sub-question → contradictions → gaps → conclusion → source table. Readers get the answer and the at-a-glance comparison before the detailed reasoning.\n\n## Step 0 — Clarification (optional)\n\n**Arriving with a brief.** If the user has already confirmed a task brief (the `task-brief`\nskill) for this research, it is the Step 0 output: carry its Goal, Done-when tests, Context,\nConstraints and Assumptions straight into the Step 1 plan and don't ask its questions again.\nStill run the referent checks below if the brief leaves a name or acronym ambiguous.\n\nBefore planning, assess whether the question is specific enough to research productively. This step prevents wasting rounds on a question that's too vague.\n\n**When to clarify:**\n- The question is 1-5 words with no scope (\"research AI\", \"tell me about quantum computing\")\n- The question could mean very different things depending on intent (\"is X good?\" — good for what? for whom?)\n- The question lacks a clear angle (\"look into climate change\" — scientific? policy? economic?)\n\n**When NOT to clarify:**\n- The question already has sub-questions or specific parameters\n- The user explicitly says \"just research it\" or \"don't ask, just go\"\n- The question is specific enough to generate productive search queries immediately\n- The question is a simple factual lookup (\"what is the latest version of X?\", \"when did Y happen?\") — even if short, if the intent is clear, proceed\n- The user is responding to a prior clarification (don't loop)\n\n**How:** Present 1-3 short questions to the user that would narrow the scope. Keep it brief — this is a scope check, not an interview:\n\n> \"Before I start researching, I'd like to clarify:\n> 1. [narrowing question 1]\n> 2. [narrowing question 2]\n>\n> Please provide these details and I'll begin.\"\n\nIf the question is already specific, skip this step entirely and proceed to Step 1.\n\n**Proper-noun referent check (before Round 1):** when the question names a term\nthat could refer to either the user's own tooling\u002Fenvironment or a public product\n(a bot name, a codename, a vendor feature, a person), disambiguate the referent\nBEFORE running full rounds. If the user is available, ask once with the plausible\nreadings as options; if the user does not answer, proceed on the best\ninterpretation, say which one you chose in the plan, and let the user correct\ncourse cheaply. A wrong referent costs entire rounds of searching and a full\nrefocus — it is the most expensive research mistake this loop can make, more so\nthan any vague scope.\n\n**Acronym referent probe (cheap, before Round 1):** the same check applies to short\nacronyms that collide with unrelated high-ranking terms — a bare \"UI\", \"MAS\", or\n\"RAG\" matches medical scales, entertainment companies, or storage tech at the same\nrank as the intended referent. Run a 2-3 query precision probe (one query per\ncandidate reading) before committing rounds. If the probe is ambiguous, state the\nchosen reading in the plan header AND as an interpretation note at the top of the\nfinal report, so the user can correct course cheaply instead of re-running the loop.\n\n## Step 1 — Research Plan\n\nBefore searching, break the question into a research plan. Output:\n\n```\n## Research Plan\nQuestion: [user's question]\nDate: [current date]\nLanguage: [BCP 47 tag — e.g. en, zh-Hans, ja. Detect from query; user's explicit language preference overrides. Use consistently throughout the report.]\n\nSub-questions:\n1. [specific sub-question 1]\n2. [specific sub-question 2]\n3. [specific sub-question 3]\n4. [up to 6 total]\n\nKey topics:\n- [topic 1]\n- [topic 2]\n\nSuccess criteria:\n- [what would comprehensive coverage look like?]\n- [minimum: each sub-question has ≥1 source]\n\nDone when (2–4 checkable tests, one per line):\n- [e.g. \"each company row has a dated figure from its own disclosure, or says not found\"]\n- [e.g. \"every deal value states its basis (offer \u002F completion)\"]\n\nLoad-bearing claims (the 2–4 facts the conclusion rests on):\n- [claim] — who could observe it: [registry \u002F regulator \u002F company accounts \u002F statistics body]\n  — what would disprove it: [the finding that would overturn it]\n\nMode: [standard | comparison (items × fields)]   Recipe: [none | research-recipes\u002F\u003Cname>.md]\n\nReport category: [factual | comparison | product | how-to | fact-check | explainer]\n\nComplexity: [simple | moderate | complex]\n```\n\n**Done when.** Turn \"a good answer\" into 2–4 tests someone could tick or cross on delivery —\nabout the substance, not the format: the figures that must be current, the basis every amount\nmust state, the question each section must answer. Swap vague words for checks (\"latest\" →\nthe period; \"key players\" → the named list). They are run at Step 5.5. From a task brief, use\nits Done-when tests.\n\n**Load-bearing claims.** Name the few facts the answer depends on, and for each the party that\ncould actually observe it (the evidence route) and the finding that would disprove it. Round 1\nqueries go to those owners first — the registry, the regulator, the company's own accounts,\nthe statistics series — and round 2's refute query tests the disprove condition.\n\n**Comparison mode and recipes.** A \"compare these N things on these M points\" question runs as\nan items × fields grid whose outline the user approves before any search, with a search budget\nof at least one query per item plus two. Each item starts from its own latest disclosure,\ncells take the newest figure in the run, and queries off the grid are dropped. A repeated job\ncan start from a saved recipe. Both: `references\u002Fcomparison-mode-and-recipes.md`.\n\n**Complexity assessment and adaptive depth:**\nClassify the question's complexity to determine the maximum number of research rounds. This prevents over-searching simple questions and under-searching complex ones.\n\n| Complexity | Max rounds | Per-round breadth | When to use |\n|---|---|---|---|\n| **simple** | 2 | 2 | Single-factual question, narrow scope, 1-2 sub-questions. Example: \"What is the latest version of Python?\" |\n| **moderate** | 3 | 3 | Multi-faceted question, 3-4 sub-questions, comparison or how-to. Example: \"Compare Qdrant vs pgvector for RAG\" |\n| **complex** | 5 | 4 | Broad scope, 5-6 sub-questions, requires deep synthesis across domains. Example: \"Comprehensive analysis of the self-hosting vs managed API tradeoff for AI infrastructure\" |\n\nThe complexity cap is a **maximum**, not a target. The stopping check (Step 3f) still governs early termination. A simple question that finds comprehensive answers in 1 round should stop at 1 — the cap of 2 means it *can* go to 2 if needed, not that it *must*.\n\n**Search budget** (adapted from upstream `research-input.ts` presets + `estimateMaxSearches`): announce the budget in the plan — \"Search budget: ≤N queries\", N = per-round breadth × max rounds (script: `estimate-budget --breadth B --rounds R`). When round 2+ runs deep-dive chains (§3a), the upper bound is tree-mode: `estimate-budget --breadth B --rounds R --halving`, upstream's breadth-halving recursion. The budget is a ceiling the loop must not exceed; prefer the cheapest round that answers well, per the §3f stopping check.\n\n**Language anchoring:** Detect the output language from the query and normalize to a BCP 47 tag (e.g. `en`, `zh-Hans`, `zh-Hant`, `ja`). Use it consistently throughout — executive summary, analysis, contradictions, gaps, conclusion. Source titles, URLs, proper nouns, and code may stay in their original language; search queries may use any language that helps evidence gathering. If the user explicitly switches language mid-research, update the anchor and use the new language for all subsequent output.\n\n**Report category detection:**\n- \"vs\", \"compare\", \"better than\" → **comparison**\n- \"best\", \"top\", \"recommend\", \"buy\" → **product**\n- \"how to\", \"guide\", \"steps\" → **how-to**\n- \"is it true\", \"verify\", \"fact check\" → **fact-check**\n- \"what is\", \"explain\", \"overview\" → **explainer**\n- default → **factual**\n\n## Step 2 — Date Grounding\n\nInject the current date before any search. This is **mandatory** — LLMs default to training-cutoff years, producing stale queries.\n\n> Today's date is {current date as \"DD Month YYYY\"}. When a search query needs a year or refers to \"latest\"\u002F\"current\"\u002F\"this year\", use {current year} or relative wording — never a year inferred from training data.\n\n## Step 3 — Iterative Loop\n\n### Round structure\n\nEach round follows: **Query → Search → Extract → Synthesize → Check Stop**\n\nRun **max N rounds** where N = complexity cap from Step 1 (simple=2, moderate=3, complex=5). Most topics converge in 2-3 rounds. The cap is a ceiling, not a target.\n\nQuery rules, fetch budgets, quote anchoring, the synthesis template, the evidence store, and stop conditions are in `references\u002Fstep3-iterative-loop.md`.\n\n| When you hit | Read |\n|---|---|\n| Query generation, search and fetch, extraction, anchoring, synthesis, or the stopping check | `references\u002Fstep3-iterative-loop.md` |\n| Evidence-store commands and the three delivery gates | `references\u002Fvalidation-gates.md` |\n| The evidence.json intermediate | `references\u002Fstructured-evidence-format.md` |\n| Source families, shelf lives, the basis of money figures, user-supplied reports, date forms | `references\u002Fevidence-hygiene.md` |\n| A \"compare N things on M points\" question, or a repeated research job | `references\u002Fcomparison-mode-and-recipes.md` |\n| The default search or reader fails, or the plan needs a country, language or date filter | `references\u002Fsearch-and-fetch-fallbacks.md` |\n\n1. **3a — Query Generation (gap-driven)** — Breadth comes from the Step 1 preset (simple=2, moderate=3, complex=4). Round 1 targets plan sub-questions; later rounds target gaps and recorded follow-ups.\n2. **3b — Search and Fetch** — Use the donsetch MCP search\u002Ffetch tools when the user asked for them; otherwise `web_search` \u002F `web_extract`. Never abort over a provider preference. *Optional, paid:* when the plan needs the **same public facts for several organisations** (size, mandate, sector exposure, recent commitments), one Exa Agent API run can collect them as cited rows (about US$0.10 a run, ceiling US$1.10; quote first; organisations only, never people). Its output enters the evidence store like any other source — each fact keeps the page it cites and gets its own label. Procedure: `entity-research\u002Freferences\u002Forganisation-evidence-exa.md`.\n3. **3b.1 — Evidence Persistence (mandatory for 5+ source reports)** — From round 1, persist with `init-run`, `register-source`, `add-claim`, `add-evidence`, and `check-quote` on `scripts\u002Fresearch_validation.py`.\n4. **3c — Quality Filter and Extraction** — Discard low-quality results before extracting.\n5. **Verbatim snippet anchoring (mandatory for claims you store)** — Every stored claim carries a verbatim contiguous excerpt from that source's page text.\n6. **Evidence basis — the four-label discipline** — Tag every material fact with the basis you are asserting it on.\n7. **3d — Synthesis** — Fold this round's extractions into the cumulative research state.\n8. **3e — Structured Evidence (recommended for reports with 5+ sources)** — Write the `evidence.json` intermediate before the final report. Format: `references\u002Fstructured-evidence-format.md`.\n9. **3f — Stopping Check** — After synthesis, decide whether the report is comprehensive enough. Otherwise open another round, up to the cap.\n\n## Step 4 — Final Report\n\nProduce the final report. Minimum 800 words (scale with topic complexity).\n\n**Output order is overview-first**: the reader gets the answer and the at-a-glance comparison *before* the detailed reasoning. Do not bury the comparison table after the per-topic analysis.\n\nCarry each material fact's **evidence-basis tag** inline (§3c), lead on `[VERIFIED]` \u002F `[SOURCED]`, keep `[REASONED]` \u002F `[ESTIMATED]` claims framed as indicative, and paste the **Evidence key** legend below the Sources table so the tags decode.\n\n**Findings, not process, in the body.** The report reads as research on the subject: no\nclaim IDs, store or gate mechanics, rebuilt stores, rewordings or tool names in the sections.\nProcess facts a reader needs to weigh the evidence go in one plain sentence under Gaps\n(\"figures rest on search summaries, not full page text\"); everything else goes in the stats\nblock and `\u003Crun_dir>`.\n\n**Synthesis prompt structure:** When writing the final report, explicitly consult: (1) the original question, (2) the research plan (sub-questions, success criteria), (3) the cumulative research state from all rounds, (4) the evidence.json if produced, and (5) the numbered source list. Do not rely on the cumulative state alone if it has been compressed across many rounds — go back to the per-round findings to verify key claims. This prevents detail loss when the research state was aggressively summarized due to token budget pressure.\n\n### Structure\n\n```markdown\n# [Report Title]\n\n> **Research date:** [date] · **Rounds:** [N] · **Sources:** [N] · **Category:** [type]\n\n## Executive Summary\n[2-3 paragraph overview of key findings — the answer up front. If using structured evidence, note claim count and refute count here so the reader knows the evidence base.]\n\n## [Comparison Table | Overview | Key Findings at a Glance]\n[For comparison reports: a markdown table comparing options\u002Fentities across criteria. For factual\u002Fexplainer reports: a numbered list of key findings with claim references. This section gives the reader the complete picture in one screen — the detailed analysis below is the supporting reasoning, not the main event. If using structured evidence, cite claim IDs like [c1], [c3] in table cells or list items.]\n\n## [## Section per sub-question]\n[Detailed analysis with inline citations — this is the supporting reasoning for the overview above. Each section traces back to the overview claims.]\n\n### [### Subsections as needed]\n[...]\n\n## Contradictions\n[If sources disagree, present both sides with attribution. Do not silently arbitrate. If no contradictions found, state \"No direct contradictions between sources.\" This section is REQUIRED — its absence is a quality signal that counter-evidence wasn't searched.]\n\n## Gaps\n[What couldn't be determined from available sources. Each gap should note: what's unknown, why it matters, and whether it could be resolved with more research. If using structured evidence, reference the writing_context items. If no gaps, state \"No significant gaps identified.\" **Source-set bias check (mandatory):** the first gap line must state the bias your whole source set shares — one dominant language, era, school, jurisdiction, or industry — adapted from Munger inversion. A homogeneous source set is itself a gap, even when every individual source is primary-tier.]\n\n## Conclusion\n[Synthesis of findings, implications, remaining uncertainties — ties back to the executive summary and overview. The conclusion confirms or qualifies the overview, it doesn't introduce new analysis.]\n\n---\n## Sources\n\n**Quality distribution:** [N] primary · [N] secondary · [N] tertiary — [healthy\u002Facceptable\u002Fweak]\n\n| # | Title | URL | Quality | Accessed |\n|---|-------|-----|---------|----------|\n| 1 | [title] | [url] | primary\u002Fsecondary\u002Ftertiary | [date] |\n\n**Citation format:** Inline citations use `[N]` matching the source table above. On first mention of a source, include `[N]` — subsequent mentions may use `[N]` alone. For claims from the same source, cite the number once per paragraph unless the source is paginated.\n\n**Evidence key** — `[VERIFIED]` corroborated across ≥2 independent, cited, dated sources · `[SOURCED]` from one named source, not independently corroborated · `[REASONED]` analytical judgement \u002F inference · `[ESTIMATED]` calculation or stated assumption.\n```\n\n### Category-specific overview sections\n\n| Category | Overview section format |\n|---|---|\n| **comparison** | Markdown table comparing options across criteria, with a verdict row or column. The detailed sections below provide the reasoning per option. |\n| **product** | Ranked list with pros\u002Fcons, price range, and a \"top pick\" callout. Detailed sections cover each product. |\n| **how-to** | Numbered overview of the steps. Detailed sections cover prerequisites, execution, and troubleshooting per step. |\n| **fact-check** | Evidence for\u002Fagainst the claim in a two-column table, with a preliminary verdict. Detailed sections assess source credibility and reasoning. |\n| **explainer** | Numbered key findings or a \"progressive depth\" overview (simple → deep). Detailed sections go deeper per concept. Glossary if technical. |\n| **factual** | Numbered key findings with claim references. Detailed sections provide the supporting evidence per finding. |\n\n### Fallback report\n\nIf LLM synthesis fails (timeout, error, garbled output), compile raw findings into a basic report:\n- List all findings grouped by sub-question\n- Include source URLs and keep each finding's evidence-basis tag\n- Add note: \"This is a raw findings compilation; synthesis was not completed.\"\n- Never output \"No information could be gathered\" if any sources were fetched — always compile what exists.\n\n## Step 5 — Research Stats\n\nAfter the report, output a compact stats block:\n\n```\n---\n📊 Research stats: [duration] · [N] rounds · [N] queries · [N] page fetches · [N] sources cited · provider: [donsetch\u002Fbuilt-in]\n```\n\n## Step 5.5 — Validation Gates (mandatory before delivery)\n\n**Deterministic gates** — `scripts\u002Fresearch_validation.py`, stdlib-only, checks structure not judgment. Every report with 5+ sources passes three gates before delivery: `validate-report` (structure), `verify-citations` (inline `[N]` ↔ Sources rows), and `verify-claims --strict` (stored evidence must support each factual claim; a claim stored with `basis: verified` needs sources on ≥2 different sites; at least one `polarity: refute` claim, or `--refute-none \"\u003Cwhat you searched>\"`). **Loop:** validate → fix → re-run all three, max 3 cycles; still failing → stop and report the remaining problems to the user honestly. Never skip the gates, never deliver with a red gate. Quick 2-3 source reports (no store): `verify-claims` warns instead of failing — record it in the stats block. Full contract, flags, and the failure loop: `references\u002Fvalidation-gates.md`.\n\n**Optional Jev pre-screen.** On instances with TypeSafe Jev configured, add `--jev-prescreen` to `verify-claims` for an advisory semantic pre-check that flags gate false-reds\u002Ffalse-greens before the deterministic run. It degrades to a clean SKIPPED line when Jev is not set up — never blocks, never changes the gate's exit code. See the contract in `references\u002Fvalidation-gates.md`.\n\n**Then run the plan's Done-when tests yourself** — the gates check structure, these check the\nanswer. Read the report against each test and fix what fails (a stale figure, an amount without\nits basis); a test that still fails is reported to the user as outstanding, plainly. Record the\nresult in the stats block (\"done-when: 3\u002F4 met — [the outstanding one]\").\n\n**Snippet anchoring prerequisite.** `verify-claims` scores the *stored* snippets — it cannot tell a well-copied quote from a well-paraphrased one. That is what `check-quote` (§3c) is for: a red gate whose snippets never passed `check-quote` means anchoring was skipped, which is itself a defect. Anchor first, store second, gate third.\n\n## Step 6 — Follow-up Report Revision (optional)\n\nFor \"verify X in the earlier report\" \u002F \"update the pricing section\" requests on a delivered report. Adapted from upstream's evidence panel + `report-revision.ts`: a follow-up researches narrowly and patches **only the passages citing the finding** — the rest of the report stays byte-identical.\n\n1. **Map.** `python3 \u003Cskill_dir>\u002Fscripts\u002Fresearch_validation.py map-citations --report \u003Creport.md> [--citation N]` returns the top-level blocks citing each `[N]` (code fences excluded; exit 1 = no block cites N). This defines exactly what a follow-up may touch — nothing else.\n2. **Bounded follow-up research.** One round, ≤2 query directions derived from the target finding and the user's instruction. Same snippet-first triage and quality filter (§3b\u002F§3c); new page text joins the existing run dir; register new sources before citing them.\n3. **Patch cited blocks only.** Revise the blocks from step 1 (tables and lists are updated as whole blocks). Leave unrelated paragraphs untouched. If the evidence contradicts the existing claim, state the correction; if it is insufficient, say so instead of inventing a fix.\n4. **Sources.** Append new entries to the Sources table with the next free numbers; never renumber existing citations — old inline `[N]`s must keep resolving.\n5. **History.** Save the revision as `\u003Cname>-rev.md` next to the original (`-rev2`, `-rev3`, … for further rounds). The original file stays untouched; on failure or cancellation, nothing is saved.\n6. **Re-run all three gates** (Step 5.5) on the revised report before delivery. A red gate after revision means the revision did not land cleanly — fix, don't ship.\n\n## Follow-on Investment Analysis (optional)\n\nWhen the report covers an investment question and the user provides deal parameters, build a quantitative pro-forma using `execute_code`. Always model the as-is use as a baseline. See `references\u002Freal-estate-investment-analysis.md` for the template.\n\nSee `references\u002Fstructured-evidence-format.md` for the evidence.json schema and writing-context vs claims distinction.\n\n## Vault Integration (optional)\n\nFor larger research tasks (10+ sources) or when the user may want to follow up with grounded Q&A:\n\n1. Create a vault per `notebooklm-mode` at `\u003Cproject_folder>\u002Fresearch-\u003Ctopic>\u002F`\n2. Save each source as a numbered file in `sources\u002F` with verbatim extracts\n3. Use `ingest_source.py` to write + index atomically\n4. After the report, tell the user: \"Sources saved to vault at [path]. You can ask follow-up questions grounded in these sources — say 'notebooklm mode' to query the vault.\"\n\nThis is optional — the skill works fully without a vault for one-off reports.\n\n## Persistent citation database (absorbed source-tracker)\n\nFor research that spans sessions, keep a portable SQLite citation database instead of scattering URLs. The scripts live in `scripts\u002Fsource_db.py` and `scripts\u002Furl_health.py` (formerly the standalone source-tracker skill). Full workflow doc: `references\u002Fcitation-database.md` (schema details in `citation-schema.md`, export formats in `citation-export-formats.md`).\n\n- Add every source at the moment it passes the quality filter, before synthesis: `python scripts\u002Fsource_db.py add --url URL --topic TOPIC --title TITLE --type web --session-id RUN_ID`. Never add an invented URL — only URLs observed through a real source channel.\n- Database path: set `SOURCE_TRACKER_DB` or pass `--db-path`; for multi-session work use an explicit path (for example `\u003Cproject>\u002F.hermes\u002Fresearch\u002Fsources.db`). The default `.\u002Fsources.db` depends on the current working directory.\n- Before final delivery: `python scripts\u002Fsource_db.py dedup` (merges http\u002Fhttps and `www.` URL variants; the survivor keeps the earliest `accessed_at`), then `python scripts\u002Fsource_db.py export --topic TOPIC --format markdown --output bibliography.md` (also `bibtex`, `csv`, `json`).\n- Link health before final citations: `python scripts\u002Furl_health.py --stale-days 30 --batch-size 50` — it HEAD-checks stale URLs and marks HTTP >= 400 as dead (`verified = 0`). Dead links are recorded, not errors.\n- URL normalization: canonical storage lowercases scheme\u002Fhost, strips fragments and non-root trailing slashes, preserves query strings; dedup comparison additionally treats http\u002Fhttps and `www.` variants as one source.\n\n## Subagent Mode (optional)\n\nFor genuinely parallel research across distinct sub-topics (e.g. researching 3 unrelated companies):\n\n```\ndelegate_task(\n  goal=\"Research [sub-topic] as part of a deep-research project. Run web searches, extract content, and return findings with source URLs and titles.\",\n  context=\"You are a research subagent. Topic: [sub-topic]. Sub-questions: [list]. Use web_search and web_extract. Return structured findings with citations.\",\n  toolsets=[\"web\"]\n)\n```\n\n**Rules:**\n- Only use subagents when sub-topics are genuinely independent\n- Collect results from all subagents, then synthesize yourself\n- Never delegate the synthesis step — the orchestrator must see all findings\n- Subagent summaries are self-reports — verify source URLs exist before citing\n\n## Concurrency and Rate Limits\n\n- Full-page fetches are on-demand and budgeted (§3b): ≤2\u002Fround, run-wide cap by complexity — snippets carry the triage\n- If `web_extract` fails on a URL, note it and move on — don't retry endlessly\n- If `web_search` returns no results, apply the §3a refinement protocol including the identical-rewrite stop\n\n## External provider head-to-head (optional benchmarking)\n\nWhen the user wants this stack benchmarked against an external research\nprovider (e.g. Perplexity), read `references\u002Fresearch-provider-benchmark.md`\nfirst. Standing rules: same raw question to both sides, no date or scope\ninjection; verify the provider's central claims independently before scoring;\nreport cost, breadth, and complementary positioning rather than a single winner.\n\n## Pitfalls\n\n- **Overclaiming basis** — when torn between two labels, pick the weaker one. A source's \"about half\" stays `~50% [SOURCED]`.\n- **Conflating claims with context** — subject facts are claims; scope, methodology, and availability limits are writing_context.\n- **Subagent self-reports** — verify source URLs exist before citing. The orchestrator synthesizes.\n- **Clarification: one round** — if the reply is still vague, proceed with the best interpretation of intent.\n- **Complexity misclassification** — complexity is breadth of synthesis, not how impressive the topic sounds. A narrow factual topic with six sub-questions is moderate.\n- **Token budget fills before the cap** — on long extractions, summarize aggressively when context is tight rather than waiting for the round ceiling.\n- **Word-boundary matching** — \"port\" matching \"transport\" or \"support\" is a false hit; filter on topical relevance, not substring overlap.\n- **Keyless search noise on jurisdiction- or regulator-scoped questions** — when a keyless `web_search` returns `weak:true`\u002Fdegraded and is dominated by unrelated verticals, re-run with the authority or domain named in the query (\"Singapore Monetary Authority\", `site:mas.gov.sg`) before concluding anything is absent. Absence from a noisy keyless result set is not evidence of absence — the same query re-scoped routinely returns the primary documents that were missing.\n- **Mid-research re-scope** — when the user narrows the question after Round 1, do not restart the loop on the new scope: run one targeted pass, cite only sources that answer the narrowed scope, and state in the report what changed versus the broader framing.\n- **Store claims are quote-shaped** — the deterministic scorer supports a claim only when ONE stored snippet covers every figure, year AND entity the claim text carries; anything else caps at `partial`−0.01 (strict red for factual). The law, validated live three times in one session: multi-fact claims split per snippet, claim text byte-aligns to its quote, and prose paraphrase stays in the report body. Instances of the same law: **CJK claims** extract no tokens, so even an identical snippet scores ~0.33 — byte-identical claim text (entity axis 1.0) or anchor via `check-quote` (tokenization-free) instead; **glommed capitalized runs** (\"Scrape URL FIRECRAWL\" → one entity `scrape url`) never set-match a claim that says \"Firecrawl\" alone; **alphanumeric brand prefixes** (\"x402\" → figure `402`) cap unless the snippet carries the brand text. Diagnose with the script's `_figures`\u002F`_entities`\u002F`_tokens` helpers before rewriting.\n- **Anchored to the wrong substrate** — `check-quote --source-id` reads `pages\u002F\u003Csource_id>.txt`; verify the id resolves to the URL the sentence actually came from before treating a mismatch as fabrication — the same sentence on another page's file gives a false red.\n- **Unanchored snippets** — storing a snippet (or evidence) that never passed `check-quote` is how a smooth paraphrase becomes \"evidence\": the scorer sees familiar tokens and rates it supported. Verbatim excerpt, checked against the saved page text (`\u003Crun_dir>\u002Fpages\u002F\u003Csource_id>.txt`), repair-once on mismatch — never massage the snippet toward the claim, never splice across paragraphs. No contiguous excerpt exists? The claim is not evidence-backed; store it honestly and let the gate flag it.\n- **Store CLI ordering and field pairs** — the subcommand must precede `--dir` (`research_validation.py add-claim --dir \u003Cd> ...`, never `--dir \u003Cd> add-claim`). `add-claim` takes claim+kind+polarity+basis+snippet+source_id; `add-evidence` takes evidence_snippet+source_id — swapping the pairs stores the snippet in source_id and surfaces later as unregistered-source_id warnings. `basis` takes ONLY the four labels — a source TIER name (`primary`\u002F`secondary`) is rejected (rc 2), and `kind` takes no `refute` value: refute is a **polarity**. When looping store calls in a script, check every response's JSON — a rejected call exits 2 silently while the loop's \"stored\" message lies.\n- **Citation density in the body** — every Sources row must be cited at least once (`verify-citations` fails on uncited rows); required sections (`## Executive Summary`, `## Contradictions`, `## Gaps`, `## Conclusion`) must be `##`-level, not `#`.\n- **One story counted twice** — a press release and three articles reprinting it are one\n  source family; two sites is not two sources. `[VERIFIED]` needs two independent families\n  (`references\u002Fevidence-hygiene.md` §1).\n- **A stale figure presented as current** — give every time-sensitive fact its as-of period and\n  flag it past its shelf life; undated figures are flagged as undated (`evidence-hygiene.md` §2).\n- **An offer headline reported as the deal value** — the announced and completion values of one\n  deal are different bases. State the basis of every money figure and reconcile before\n  choosing (`evidence-hygiene.md` §3).\n- **A fixed budget spread across a grid** — nine queries over eight items leaves each a single\n  snippet and no context. Size a comparison run at one query per item plus two.\n- **A stale headline from a search summary** — leading a comparison row with a full-year figure\n  when the same run found the later interim one. Start each item from its own latest\n  disclosure; the newest figure in the run wins.\n- **Searching before the comparison outline is agreed** — a field redefined after the searches\n  means re-running every item.\n- **Process noise in the report** — claim IDs, gate failures and store rebuilds belong in the\n  stats block and the run folder, not in the findings.\n- **Fallback if synthesis fails** — compile raw findings with citations and tags; empty output is the failure mode.\n- **Evidence key** — paste the four-label legend under the Sources table so `[VERIFIED]` \u002F `[SOURCED]` \u002F `[REASONED]` \u002F `[ESTIMATED]` decode.\n\n## Related Work\n\n[Odysseus](https:\u002F\u002Fgithub.com\u002Fpewdiepie-archdaemon\u002Fodysseus) — PewDiePie's self-hosted AI workspace — includes a \"Deep Research\" feature with multi-step web research and source reading, conceptually similar to this skill's Think → Search → Extract → Synthesize → Stop loop. This skill is a pure-prompt workflow (no UI, no server) designed to run inside any agent's tool loop.\n\n[AnotiaWang\u002Fdeep-research-web-ui](https:\u002F\u002Fgithub.com\u002FAnotiaWang\u002Fdeep-research-web-ui) (MIT) — Nuxt UI wrapping dzhng\u002Fdeep-research with a hardened engine, and the main vendor source for this skill. **Vendored:** verbatim-quote evidence anchoring, v1.8.2 (`shared\u002Futils\u002Fsearch-learning.ts` → `check-quote`, §3c); structured search mini-plans with frozen constraints, planning discipline and provider guidance, v1.9.0 (`shared\u002Futils\u002Fsearch-plan.ts` → §3a); search-budget presets + breadth-halving estimate, v1.9.0 (`shared\u002Futils\u002Fresearch-input.ts` → Step 1 + `estimate-budget`); bounded deep-dive threading on follow-up directions, v1.9.0 (`lib\u002Fcore\u002Fdeep-research.ts` → §3a); six-way round-outcome taxonomy with per-reason bounded retry, v1.9.1 (`shared\u002Futils\u002Fsearch-assessment.ts` → §3a); snippet-first on-demand reading with fetch budgets, v1.9.0 (`lib\u002Fcore\u002Fread-source.ts` → §3b); term-scored verbatim passage selection, v1.9.0 (`lib\u002Fcore\u002Fsource-context.ts` → §3d); surgical report revision with citation→block mapping, v1.9.0 (`shared\u002Futils\u002Freport-revision.ts` → Step 6 + `map-citations`). **Evaluated, not vendored:** full tree recursion, streaming-JSON structured-output repair, UI\u002Fdeployment layers, and dzhng's \"the source is irrelevant\" prompt (contradicts this skill's provenance discipline). Full two-sided map: `references\u002Fanotiawang-deep-research-concepts.md`.\n\n[Anjos2\u002Frecursive-research](https:\u002F\u002Fgithub.com\u002FAnjos2\u002Frecursive-research) (MIT) — Claude Code prompt skill for long-cycle recursive research. **Vendored (v1.9.2, guidance-level):** saturation-based stop signal (§3f), coverage balancing across plan sub-questions (§3a), mandatory source-set bias check in the Gaps section (Step 4). **Not vendored:** cycle machinery, WDM weighted-source scoring, per-domain seed source lists, preventive context-pause thresholds, local-corpus mode. The ≤5% threshold is unvalidated upstream (repo last pushed 2026-04-22, no field hardening); it ships as a signal, not a rule. Map: `references\u002Frecursive-research-concepts.md`.\n\n[DocsGPT](https:\u002F\u002Fgithub.com\u002Farc53\u002FDocsGPT) (arc53, MIT) — ResearchAgent Plan → Research → Synthesize with adaptive depth, clarification, token-budget tracking, and empty-search refinement. Mapping: `references\u002Fdocsgpt-concepts.md`.\n\n`references\u002Fskills-monetization.md` — condensed AI-skills monetization knowledge bank (marketplaces, what sells, pricing) from the 2026-07-01 research dossier.\n\n## Evals\n\n`evals\u002Frouting-fixtures.json` holds lightweight contract fixtures — sample request →\nexpected routing, required output fields, and forbidden output patterns. They are\nspecs, not run against a live model; the repo-root `tests\u002Ftest_routing_fixtures.py`\nvalidates they stay well-formed and route to real skills.\n","# Deep Research — Iterative Research Engine\n\nAn autonomous, multi-step research engine that performs exhaustive information\ngathering and synthesis. Unlike a single `web_search`, this skill implements an\niterative loop where the agent plans, searches, extracts, synthesizes, and\ndecides when to stop — producing a cited report with structured evidence,\nsource quality tiers, and explicit gaps\u002Fcontradictions sections.\n\nSee `references\u002Fstructured-evidence-format.md` for the evidence.json layer and\n`references\u002Fdocsgpt-concepts.md` for adaptive-depth concept mapping.\n\nFor the \"is there updated or custom firmware for device X?\" question class, follow\n`references\u002Ffirmware-support-status-research.md` — vendor download page + official-forum RSS + GitHub-API triangulation recipe.\n\n## When to use\n\n- User asks for \"deep research\", \"research report\", \"comprehensive analysis\"\n- User wants a written report on a topic (not just a quick answer)\n- Question requires multi-source synthesis with citations\n- User says \"look into X in depth\" or \"write a report on X\"\n\n## When NOT to use\n\n- **Entity vetting\u002Fdossiers** → use `entity-research` (has sanctions screening, structured lenses)\n- **Recurring news digests** → use `news-monitoring` (has cron, dedup, multi-language)\n- **Source-grounded Q&A from collected sources** → use `notebooklm-mode` (has vault + RAG)\n- **Quick factual question** → just use `web_search` directly\n- **Single-source extraction** → use `web_search` + `web_extract`\n\n## Architecture\n\n```\nUser question\n  → Step 0: Clarification (optional — assess if question is too vague)\n  → Step 1: Plan (sub-questions, key topics, success criteria, category, language, complexity)\n  → Step 2: Date grounding + language anchor\n  → Step 3: Iterative loop (max rounds = complexity cap: simple=2, moderate=3, complex=5)\n      ├─ 3a: Generate gap-driven queries (incl. refute queries from round 2+, empty-search refinement)\n      ├─ 3b: Search (web_search) + fetch (web_extract)\n      ├─ 3c: Quality filter + extraction + source quality classification + numbered citations\n      ├─ 3d: Synthesize into cumulative research state (with token budget check)\n      ├─ 3e: Structured evidence (optional: evidence.json for 5+ sources)\n      └─ 3f: Stopping check (LLM evaluates coverage + token budget)\n  → Step 4: Final report (overview-first structure, see template)\n  → Step 5: Stats summary\n```\n\n**Report output order (overview-first):** Executive Summary → comparison\u002Foverview table → detailed analysis per sub-question → contradictions → gaps → conclusion → source table. Readers get the answer and the at-a-glance comparison before the detailed reasoning.\n\n## Step 0 — Clarification (optional)\n\n**Arriving with a brief.** If the user has already confirmed a task brief (the `task-brief`\nskill) for this research, it is the Step 0 output: carry its Goal, Done-when tests, Context,\nConstraints and Assumptions straight into the Step 1 plan and don't ask its questions again.\nStill run the referent checks below if the brief leaves a name or acronym ambiguous.\n\nBefore planning, assess whether the question is specific enough to research productively. This step prevents wasting rounds on a question that's too vague.\n\n**When to clarify:**\n- The question is 1-5 words with no scope (\"research AI\", \"tell me about quantum computing\")\n- The question could mean very different things depending on intent (\"is X good?\" — good for what? for whom?)\n- The question lacks a clear angle (\"look into climate change\" — scientific? policy? economic?)\n\n**When NOT to clarify:**\n- The question already has sub-questions or specific parameters\n- The user explicitly says \"just research it\" or \"don't ask, just go\"\n- The question is specific enough to generate productive search queries immediately\n- The question is a simple factual lookup (\"what is the latest version of X?\", \"when did Y happen?\") — even if short, if the intent is clear, proceed\n- The user is responding to a prior clarification (don't loop)\n\n**How:** Present 1-3 short questions to the user that would narrow the scope. Keep it brief — this is a scope check, not an interview:\n\n> \"Before I start researching, I'd like to clarify:\n> 1. [narrowing question 1]\n> 2. [narrowing question 2]\n>\n> Please provide these details and I'll begin.\"\n\nIf the question is already specific, skip this step entirely and proceed to Step 1.\n\n**Proper-noun referent check (before Round 1):** when the question names a term\nthat could refer to either the user's own tooling\u002Fenvironment or a public product\n(a bot name, a codename, a vendor feature, a person), disambiguate the referent\nBEFORE running full rounds. If the user is available, ask once with the plausible\nreadings as options; if the user does not answer, proceed on the best\ninterpretation, say which one you chose in the plan, and let the user correct\ncourse cheaply. A wrong referent costs entire rounds of searching and a full\nrefocus — it is the most expensive research mistake this loop can make, more so\nthan any vague scope.\n\n**Acronym referent probe (cheap, before Round 1):** the same check applies to short\nacronyms that collide with unrelated high-ranking terms — a bare \"UI\", \"MAS\", or\n\"RAG\" matches medical scales, entertainment companies, or storage tech at the same\nrank as the intended referent. Run a 2-3 query precision probe (one query per\ncandidate reading) before committing rounds. If the probe is ambiguous, state the\nchosen reading in the plan header AND as an interpretation note at the top of the\nfinal report, so the user can correct course cheaply instead of re-running the loop.\n\n## Step 1 — Research Plan\n\nBefore searching, break the question into a research plan. Output:\n\n```\n## Research Plan\nQuestion: [user's question]\nDate: [current date]\nLanguage: [BCP 47 tag — e.g. en, zh-Hans, ja. Detect from query; user's explicit language preference overrides. Use consistently throughout the report.]\n\nSub-questions:\n1. [specific sub-question 1]\n2. [specific sub-question 2]\n3. [specific sub-question 3]\n4. [up to 6 total]\n\nKey topics:\n- [topic 1]\n- [topic 2]\n\nSuccess criteria:\n- [what would comprehensive coverage look like?]\n- [minimum: each sub-question has ≥1 source]\n\nDone when (2–4 checkable tests, one per line):\n- [e.g. \"each company row has a dated figure from its own disclosure, or says not found\"]\n- [e.g. \"every deal value states its basis (offer \u002F completion)\"]\n\nLoad-bearing claims (the 2–4 facts the conclusion rests on):\n- [claim] — who could observe it: [registry \u002F regulator \u002F company accounts \u002F statistics body]\n  — what would disprove it: [the finding that would overturn it]\n\nMode: [standard | comparison (items × fields)]   Recipe: [none | research-recipes\u002F\u003Cname>.md]\n\nReport category: [factual | comparison | product | how-to | fact-check | explainer]\n\nComplexity: [simple | moderate | complex]\n```\n\n**Done when.** Turn \"a good answer\" into 2–4 tests someone could tick or cross on delivery —\nabout the substance, not the format: the figures that must be current, the basis every amount\nmust state, the question each section must answer. Swap vague words for checks (\"latest\" →\nthe period; \"key players\" → the named list). They are run at Step 5.5. From a task brief, use\nits Done-when tests.\n\n**Load-bearing claims.** Name the few facts the answer depends on, and for each the party that\ncould actually observe it (the evidence route) and the finding that would disprove it. Round 1\nqueries go to those owners first — the registry, the regulator, the company's own accounts,\nthe statistics series — and round 2's refute query tests the disprove condition.\n\n**Comparison mode and recipes.** A \"compare these N things on these M points\" question runs as\nan items × fields grid whose outline the user approves before any search, with a search budget\nof at least one query per item plus two. Each item starts from its own latest disclosure,\ncells take the newest figure in the run, and queries off the grid are dropped. A repeated job\ncan start from a saved recipe. Both: `references\u002Fcomparison-mode-and-recipes.md`.\n\n**Complexity assessment and adaptive depth:**\nClassify the question's complexity to determine the maximum number of research rounds. This prevents over-searching simple questions and under-searching complex ones.\n\n| Complexity | Max rounds | Per-round breadth | When to use |\n|---|---|---|---|\n| **simple** | 2 | 2 | Single-factual question, narrow scope, 1-2 sub-questions. Example: \"What is the latest version of Python?\" |\n| **moderate** | 3 | 3 | Multi-faceted question, 3-4 sub-questions, comparison or how-to. Example: \"Compare Qdrant vs pgvector for RAG\" |\n| **complex** | 5 | 4 | Broad scope, 5-6 sub-questions, requires deep synthesis across domains. Example: \"Comprehensive analysis of the self-hosting vs managed API tradeoff for AI infrastructure\" |\n\nThe complexity cap is a **maximum**, not a target. The stopping check (Step 3f) still governs early termination. A simple question that finds comprehensive answers in 1 round should stop at 1 — the cap of 2 means it *can* go to 2 if needed, not that it *must*.\n\n**Search budget** (adapted from upstream `research-input.ts` presets + `estimateMaxSearches`): announce the budget in the plan — \"Search budget: ≤N queries\", N = per-round breadth × max rounds (script: `estimate-budget --breadth B --rounds R`). When round 2+ runs deep-dive chains (§3a), the upper bound is tree-mode: `estimate-budget --breadth B --rounds R --halving`, upstream's breadth-halving recursion. The budget is a ceiling the loop must not exceed; prefer the cheapest round that answers well, per the §3f stopping check.\n\n**Language anchoring:** Detect the output language from the query and normalize to a BCP 47 tag (e.g. `en`, `zh-Hans`, `zh-Hant`, `ja`). Use it consistently throughout — executive summary, analysis, contradictions, gaps, conclusion. Source titles, URLs, proper nouns, and code may stay in their original language; search queries may use any language that helps evidence gathering. If the user explicitly switches language mid-research, update the anchor and use the new language for all subsequent output.\n\n**Report category detection:**\n- \"vs\", \"compare\", \"better than\" → **comparison**\n- \"best\", \"top\", \"recommend\", \"buy\" → **product**\n- \"how to\", \"guide\", \"steps\" → **how-to**\n- \"is it true\", \"verify\", \"fact check\" → **fact-check**\n- \"what is\", \"explain\", \"overview\" → **explainer**\n- default → **factual**\n\n## Step 2 — Date Grounding\n\nInject the current date before any search. This is **mandatory** — LLMs default to training-cutoff years, producing stale queries.\n\n> Today's date is {current date as \"DD Month YYYY\"}. When a search query needs a year or refers to \"latest\"\u002F\"current\"\u002F\"this year\", use {current year} or relative wording — never a year inferred from training data.\n\n## Step 3 — Iterative Loop\n\n### Round structure\n\nEach round follows: **Query → Search → Extract → Synthesize → Check Stop**\n\nRun **max N rounds** where N = complexity cap from Step 1 (simple=2, moderate=3, complex=5). Most topics converge in 2-3 rounds. The cap is a ceiling, not a target.\n\nQuery rules, fetch budgets, quote anchoring, the synthesis template, the evidence store, and stop conditions are in `references\u002Fstep3-iterative-loop.md`.\n\n| When you hit | Read |\n|---|---|\n| Query generation, search and fetch, extraction, anchoring, synthesis, or the stopping check | `references\u002Fstep3-iterative-loop.md` |\n| Evidence-store commands and the three delivery gates | `references\u002Fvalidation-gates.md` |\n| The evidence.json intermediate | `references\u002Fstructured-evidence-format.md` |\n| Source families, shelf lives, the basis of money figures, user-supplied reports, date forms | `references\u002Fevidence-hygiene.md` |\n| A \"compare N things on M points\" question, or a repeated research job | `references\u002Fcomparison-mode-and-recipes.md` |\n| The default search or reader fails, or the plan needs a country, language or date filter | `references\u002Fsearch-and-fetch-fallbacks.md` |\n\n1. **3a — Query Generation (gap-driven)** — Breadth comes from the Step 1 preset (simple=2, moderate=3, complex=4). Round 1 targets plan sub-questions; later rounds target gaps and recorded follow-ups.\n2. **3b — Search and Fetch** — Use the donsetch MCP search\u002Ffetch tools when the user asked for them; otherwise `web_search` \u002F `web_extract`. Never abort over a provider preference. *Optional, paid:* when the plan needs the **same public facts for several organisations** (size, mandate, sector exposure, recent commitments), one Exa Agent API run can collect them as cited rows (about US$0.10 a run, ceiling US$1.10; quote first; organisations only, never people). Its output enters the evidence store like any other source — each fact keeps the page it cites and gets its own label. Procedure: `entity-research\u002Freferences\u002Forganisation-evidence-exa.md`.\n3. **3b.1 — Evidence Persistence (mandatory for 5+ source reports)** — From round 1, persist with `init-run`, `register-source`, `add-claim`, `add-evidence`, and `check-quote` on `scripts\u002Fresearch_validation.py`.\n4. **3c — Quality Filter and Extraction** — Discard low-quality results before extracting.\n5. **Verbatim snippet anchoring (mandatory for claims you store)** — Every stored claim carries a verbatim contiguous excerpt from that source's page text.\n6. **Evidence basis — the four-label discipline** — Tag every material fact with the basis you are asserting it on.\n7. **3d — Synthesis** — Fold this round's extractions into the cumulative research state.\n8. **3e — Structured Evidence (recommended for reports with 5+ sources)** — Write the `evidence.json` intermediate before the final report. Format: `references\u002Fstructured-evidence-format.md`.\n9. **3f — Stopping Check** — After synthesis, decide whether the report is comprehensive enough. Otherwise open another round, up to the cap.\n\n## Step 4 — Final Report\n\nProduce the final report. Minimum 800 words (scale with topic complexity).\n\n**Output order is overview-first**: the reader gets the answer and the at-a-glance comparison *before* the detailed reasoning. Do not bury the comparison table after the per-topic analysis.\n\nCarry each material fact's **evidence-basis tag** inline (§3c), lead on `[VERIFIED]` \u002F `[SOURCED]`, keep `[REASONED]` \u002F `[ESTIMATED]` claims framed as indicative, and paste the **Evidence key** legend below the Sources table so the tags decode.\n\n**Findings, not process, in the body.** The report reads as research on the subject: no\nclaim IDs, store or gate mechanics, rebuilt stores, rewordings or tool names in the sections.\nProcess facts a reader needs to weigh the evidence go in one plain sentence under Gaps\n(\"figures rest on search summaries, not full page text\"); everything else goes in the stats\nblock and `\u003Crun_dir>`.\n\n**Synthesis prompt structure:** When writing the final report, explicitly consult: (1) the original question, (2) the research plan (sub-questions, success criteria), (3) the cumulative research state from all rounds, (4) the evidence.json if produced, and (5) the numbered source list. Do not rely on the cumulative state alone if it has been compressed across many rounds — go back to the per-round findings to verify key claims. This prevents detail loss when the research state was aggressively summarized due to token budget pressure.\n\n### Structure\n\n```markdown\n# [Report Title]\n\n> **Research date:** [date] · **Rounds:** [N] · **Sources:** [N] · **Category:** [type]\n\n## Executive Summary\n[2-3 paragraph overview of key findings — the answer up front. If using structured evidence, note claim count and refute count here so the reader knows the evidence base.]\n\n## [Comparison Table | Overview | Key Findings at a Glance]\n[For comparison reports: a markdown table comparing options\u002Fentities across criteria. For factual\u002Fexplainer reports: a numbered list of key findings with claim references. This section gives the reader the complete picture in one screen — the detailed analysis below is the supporting reasoning, not the main event. If using structured evidence, cite claim IDs like [c1], [c3] in table cells or list items.]\n\n## [## Section per sub-question]\n[Detailed analysis with inline citations — this is the supporting reasoning for the overview above. Each section traces back to the overview claims.]\n\n### [### Subsections as needed]\n[...]\n\n## Contradictions\n[If sources disagree, present both sides with attribution. Do not silently arbitrate. If no contradictions found, state \"No direct contradictions between sources.\" This section is REQUIRED — its absence is a quality signal that counter-evidence wasn't searched.]\n\n## Gaps\n[What couldn't be determined from available sources. Each gap should note: what's unknown, why it matters, and whether it could be resolved with more research. If using structured evidence, reference the writing_context items. If no gaps, state \"No significant gaps identified.\" **Source-set bias check (mandatory):** the first gap line must state the bias your whole source set shares — one dominant language, era, school, jurisdiction, or industry — adapted from Munger inversion. A homogeneous source set is itself a gap, even when every individual source is primary-tier.]\n\n## Conclusion\n[Synthesis of findings, implications, remaining uncertainties — ties back to the executive summary and overview. The conclusion confirms or qualifies the overview, it doesn't introduce new analysis.]\n\n---\n## Sources\n\n**Quality distribution:** [N] primary · [N] secondary · [N] tertiary — [healthy\u002Facceptable\u002Fweak]\n\n| # | Title | URL | Quality | Accessed |\n|---|-------|-----|---------|----------|\n| 1 | [title] | [url] | primary\u002Fsecondary\u002Ftertiary | [date] |\n\n**Citation format:** Inline citations use `[N]` matching the source table above. On first mention of a source, include `[N]` — subsequent mentions may use `[N]` alone. For claims from the same source, cite the number once per paragraph unless the source is paginated.\n\n**Evidence key** — `[VERIFIED]` corroborated across ≥2 independent, cited, dated sources · `[SOURCED]` from one named source, not independently corroborated · `[REASONED]` analytical judgement \u002F inference · `[ESTIMATED]` calculation or stated assumption.\n```\n\n### Category-specific overview sections\n\n| Category | Overview section format |\n|---|---|\n| **comparison** | Markdown table comparing options across criteria, with a verdict row or column. The detailed sections below provide the reasoning per option. |\n| **product** | Ranked list with pros\u002Fcons, price range, and a \"top pick\" callout. Detailed sections cover each product. |\n| **how-to** | Numbered overview of the steps. Detailed sections cover prerequisites, execution, and troubleshooting per step. |\n| **fact-check** | Evidence for\u002Fagainst the claim in a two-column table, with a preliminary verdict. Detailed sections assess source credibility and reasoning. |\n| **explainer** | Numbered key findings or a \"progressive depth\" overview (simple → deep). Detailed sections go deeper per concept. Glossary if technical. |\n| **factual** | Numbered key findings with claim references. Detailed sections provide the supporting evidence per finding. |\n\n### Fallback report\n\nIf LLM synthesis fails (timeout, error, garbled output), compile raw findings into a basic report:\n- List all findings grouped by sub-question\n- Include source URLs and keep each finding's evidence-basis tag\n- Add note: \"This is a raw findings compilation; synthesis was not completed.\"\n- Never output \"No information could be gathered\" if any sources were fetched — always compile what exists.\n\n## Step 5 — Research Stats\n\nAfter the report, output a compact stats block:\n\n```\n---\n📊 Research stats: [duration] · [N] rounds · [N] queries · [N] page fetches · [N] sources cited · provider: [donsetch\u002Fbuilt-in]\n```\n\n## Step 5.5 — Validation Gates (mandatory before delivery)\n\n**Deterministic gates** — `scripts\u002Fresearch_validation.py`, stdlib-only, checks structure not judgment. Every report with 5+ sources passes three gates before delivery: `validate-report` (structure), `verify-citations` (inline `[N]` ↔ Sources rows), and `verify-claims --strict` (stored evidence must support each factual claim; a claim stored with `basis: verified` needs sources on ≥2 different sites; at least one `polarity: refute` claim, or `--refute-none \"\u003Cwhat you searched>\"`). **Loop:** validate → fix → re-run all three, max 3 cycles; still failing → stop and report the remaining problems to the user honestly. Never skip the gates, never deliver with a red gate. Quick 2-3 source reports (no store): `verify-claims` warns instead of failing — record it in the stats block. Full contract, flags, and the failure loop: `references\u002Fvalidation-gates.md`.\n\n**Optional Jev pre-screen.** On instances with TypeSafe Jev configured, add `--jev-prescreen` to `verify-claims` for an advisory semantic pre-check that flags gate false-reds\u002Ffalse-greens before the deterministic run. It degrades to a clean SKIPPED line when Jev is not set up — never blocks, never changes the gate's exit code. See the contract in `references\u002Fvalidation-gates.md`.\n\n**Then run the plan's Done-when tests yourself** — the gates check structure, these check the\nanswer. Read the report against each test and fix what fails (a stale figure, an amount without\nits basis); a test that still fails is reported to the user as outstanding, plainly. Record the\nresult in the stats block (\"done-when: 3\u002F4 met — [the outstanding one]\").\n\n**Snippet anchoring prerequisite.** `verify-claims` scores the *stored* snippets — it cannot tell a well-copied quote from a well-paraphrased one. That is what `check-quote` (§3c) is for: a red gate whose snippets never passed `check-quote` means anchoring was skipped, which is itself a defect. Anchor first, store second, gate third.\n\n## Step 6 — Follow-up Report Revision (optional)\n\nFor \"verify X in the earlier report\" \u002F \"update the pricing section\" requests on a delivered report. Adapted from upstream's evidence panel + `report-revision.ts`: a follow-up researches narrowly and patches **only the passages citing the finding** — the rest of the report stays byte-identical.\n\n1. **Map.** `python3 \u003Cskill_dir>\u002Fscripts\u002Fresearch_validation.py map-citations --report \u003Creport.md> [--citation N]` returns the top-level blocks citing each `[N]` (code fences excluded; exit 1 = no block cites N). This defines exactly what a follow-up may touch — nothing else.\n2. **Bounded follow-up research.** One round, ≤2 query directions derived from the target finding and the user's instruction. Same snippet-first triage and quality filter (§3b\u002F§3c); new page text joins the existing run dir; register new sources before citing them.\n3. **Patch cited blocks only.** Revise the blocks from step 1 (tables and lists are updated as whole blocks). Leave unrelated paragraphs untouched. If the evidence contradicts the existing claim, state the correction; if it is insufficient, say so instead of inventing a fix.\n4. **Sources.** Append new entries to the Sources table with the next free numbers; never renumber existing citations — old inline `[N]`s must keep resolving.\n5. **History.** Save the revision as `\u003Cname>-rev.md` next to the original (`-rev2`, `-rev3`, … for further rounds). The original file stays untouched; on failure or cancellation, nothing is saved.\n6. **Re-run all three gates** (Step 5.5) on the revised report before delivery. A red gate after revision means the revision did not land cleanly — fix, don't ship.\n\n## Follow-on Investment Analysis (optional)\n\nWhen the report covers an investment question and the user provides deal parameters, build a quantitative pro-forma using `execute_code`. Always model the as-is use as a baseline. See `references\u002Freal-estate-investment-analysis.md` for the template.\n\nSee `references\u002Fstructured-evidence-format.md` for the evidence.json schema and writing-context vs claims distinction.\n\n## Vault Integration (optional)\n\nFor larger research tasks (10+ sources) or when the user may want to follow up with grounded Q&A:\n\n1. Create a vault per `notebooklm-mode` at `\u003Cproject_folder>\u002Fresearch-\u003Ctopic>\u002F`\n2. Save each source as a numbered file in `sources\u002F` with verbatim extracts\n3. Use `ingest_source.py` to write + index atomically\n4. After the report, tell the user: \"Sources saved to vault at [path]. You can ask follow-up questions grounded in these sources — say 'notebooklm mode' to query the vault.\"\n\nThis is optional — the skill works fully without a vault for one-off reports.\n\n## Persistent citation database (absorbed source-tracker)\n\nFor research that spans sessions, keep a portable SQLite citation database instead of scattering URLs. The scripts live in `scripts\u002Fsource_db.py` and `scripts\u002Furl_health.py` (formerly the standalone source-tracker skill). Full workflow doc: `references\u002Fcitation-database.md` (schema details in `citation-schema.md`, export formats in `citation-export-formats.md`).\n\n- Add every source at the moment it passes the quality filter, before synthesis: `python scripts\u002Fsource_db.py add --url URL --topic TOPIC --title TITLE --type web --session-id RUN_ID`. Never add an invented URL — only URLs observed through a real source channel.\n- Database path: set `SOURCE_TRACKER_DB` or pass `--db-path`; for multi-session work use an explicit path (for example `\u003Cproject>\u002F.hermes\u002Fresearch\u002Fsources.db`). The default `.\u002Fsources.db` depends on the current working directory.\n- Before final delivery: `python scripts\u002Fsource_db.py dedup` (merges http\u002Fhttps and `www.` URL variants; the survivor keeps the earliest `accessed_at`), then `python scripts\u002Fsource_db.py export --topic TOPIC --format markdown --output bibliography.md` (also `bibtex`, `csv`, `json`).\n- Link health before final citations: `python scripts\u002Furl_health.py --stale-days 30 --batch-size 50` — it HEAD-checks stale URLs and marks HTTP >= 400 as dead (`verified = 0`). Dead links are recorded, not errors.\n- URL normalization: canonical storage lowercases scheme\u002Fhost, strips fragments and non-root trailing slashes, preserves query strings; dedup comparison additionally treats http\u002Fhttps and `www.` variants as one source.\n\n## Subagent Mode (optional)\n\nFor genuinely parallel research across distinct sub-topics (e.g. researching 3 unrelated companies):\n\n```\ndelegate_task(\n  goal=\"Research [sub-topic] as part of a deep-research project. Run web searches, extract content, and return findings with source URLs and titles.\",\n  context=\"You are a research subagent. Topic: [sub-topic]. Sub-questions: [list]. Use web_search and web_extract. Return structured findings with citations.\",\n  toolsets=[\"web\"]\n)\n```\n\n**Rules:**\n- Only use subagents when sub-topics are genuinely independent\n- Collect results from all subagents, then synthesize yourself\n- Never delegate the synthesis step — the orchestrator must see all findings\n- Subagent summaries are self-reports — verify source URLs exist before citing\n\n## Concurrency and Rate Limits\n\n- Full-page fetches are on-demand and budgeted (§3b): ≤2\u002Fround, run-wide cap by complexity — snippets carry the triage\n- If `web_extract` fails on a URL, note it and move on — don't retry endlessly\n- If `web_search` returns no results, apply the §3a refinement protocol including the identical-rewrite stop\n\n## External provider head-to-head (optional benchmarking)\n\nWhen the user wants this stack benchmarked against an external research\nprovider (e.g. Perplexity), read `references\u002Fresearch-provider-benchmark.md`\nfirst. Standing rules: same raw question to both sides, no date or scope\ninjection; verify the provider's central claims independently before scoring;\nreport cost, breadth, and complementary positioning rather than a single winner.\n\n## Pitfalls\n\n- **Overclaiming basis** — when torn between two labels, pick the weaker one. A source's \"about half\" stays `~50% [SOURCED]`.\n- **Conflating claims with context** — subject facts are claims; scope, methodology, and availability limits are writing_context.\n- **Subagent self-reports** — verify source URLs exist before citing. The orchestrator synthesizes.\n- **Clarification: one round** — if the reply is still vague, proceed with the best interpretation of intent.\n- **Complexity misclassification** — complexity is breadth of synthesis, not how impressive the topic sounds. A narrow factual topic with six sub-questions is moderate.\n- **Token budget fills before the cap** — on long extractions, summarize aggressively when context is tight rather than waiting for the round ceiling.\n- **Word-boundary matching** — \"port\" matching \"transport\" or \"support\" is a false hit; filter on topical relevance, not substring overlap.\n- **Keyless search noise on jurisdiction- or regulator-scoped questions** — when a keyless `web_search` returns `weak:true`\u002Fdegraded and is dominated by unrelated verticals, re-run with the authority or domain named in the query (\"Singapore Monetary Authority\", `site:mas.gov.sg`) before concluding anything is absent. Absence from a noisy keyless result set is not evidence of absence — the same query re-scoped routinely returns the primary documents that were missing.\n- **Mid-research re-scope** — when the user narrows the question after Round 1, do not restart the loop on the new scope: run one targeted pass, cite only sources that answer the narrowed scope, and state in the report what changed versus the broader framing.\n- **Store claims are quote-shaped** — the deterministic scorer supports a claim only when ONE stored snippet covers every figure, year AND entity the claim text carries; anything else caps at `partial`−0.01 (strict red for factual). The law, validated live three times in one session: multi-fact claims split per snippet, claim text byte-aligns to its quote, and prose paraphrase stays in the report body. Instances of the same law: **CJK claims** extract no tokens, so even an identical snippet scores ~0.33 — byte-identical claim text (entity axis 1.0) or anchor via `check-quote` (tokenization-free) instead; **glommed capitalized runs** (\"Scrape URL FIRECRAWL\" → one entity `scrape url`) never set-match a claim that says \"Firecrawl\" alone; **alphanumeric brand prefixes** (\"x402\" → figure `402`) cap unless the snippet carries the brand text. Diagnose with the script's `_figures`\u002F`_entities`\u002F`_tokens` helpers before rewriting.\n- **Anchored to the wrong substrate** — `check-quote --source-id` reads `pages\u002F\u003Csource_id>.txt`; verify the id resolves to the URL the sentence actually came from before treating a mismatch as fabrication — the same sentence on another page's file gives a false red.\n- **Unanchored snippets** — storing a snippet (or evidence) that never passed `check-quote` is how a smooth paraphrase becomes \"evidence\": the scorer sees familiar tokens and rates it supported. Verbatim excerpt, checked against the saved page text (`\u003Crun_dir>\u002Fpages\u002F\u003Csource_id>.txt`), repair-once on mismatch — never massage the snippet toward the claim, never splice across paragraphs. No contiguous excerpt exists? The claim is not evidence-backed; store it honestly and let the gate flag it.\n- **Store CLI ordering and field pairs** — the subcommand must precede `--dir` (`research_validation.py add-claim --dir \u003Cd> ...`, never `--dir \u003Cd> add-claim`). `add-claim` takes claim+kind+polarity+basis+snippet+source_id; `add-evidence` takes evidence_snippet+source_id — swapping the pairs stores the snippet in source_id and surfaces later as unregistered-source_id warnings. `basis` takes ONLY the four labels — a source TIER name (`primary`\u002F`secondary`) is rejected (rc 2), and `kind` takes no `refute` value: refute is a **polarity**. When looping store calls in a script, check every response's JSON — a rejected call exits 2 silently while the loop's \"stored\" message lies.\n- **Citation density in the body** — every Sources row must be cited at least once (`verify-citations` fails on uncited rows); required sections (`## Executive Summary`, `## Contradictions`, `## Gaps`, `## Conclusion`) must be `##`-level, not `#`.\n- **One story counted twice** — a press release and three articles reprinting it are one\n  source family; two sites is not two sources. `[VERIFIED]` needs two independent families\n  (`references\u002Fevidence-hygiene.md` §1).\n- **A stale figure presented as current** — give every time-sensitive fact its as-of period and\n  flag it past its shelf life; undated figures are flagged as undated (`evidence-hygiene.md` §2).\n- **An offer headline reported as the deal value** — the announced and completion values of one\n  deal are different bases. State the basis of every money figure and reconcile before\n  choosing (`evidence-hygiene.md` §3).\n- **A fixed budget spread across a grid** — nine queries over eight items leaves each a single\n  snippet and no context. Size a comparison run at one query per item plus two.\n- **A stale headline from a search summary** — leading a comparison row with a full-year figure\n  when the same run found the later interim one. Start each item from its own latest\n  disclosure; the newest figure in the run wins.\n- **Searching before the comparison outline is agreed** — a field redefined after the searches\n  means re-running every item.\n- **Process noise in the report** — claim IDs, gate failures and store rebuilds belong in the\n  stats block and the run folder, not in the findings.\n- **Fallback if synthesis fails** — compile raw findings with citations and tags; empty output is the failure mode.\n- **Evidence key** — paste the four-label legend under the Sources table so `[VERIFIED]` \u002F `[SOURCED]` \u002F `[REASONED]` \u002F `[ESTIMATED]` decode.\n\n## Related Work\n\n[Odysseus](https:\u002F\u002Fgithub.com\u002Fpewdiepie-archdaemon\u002Fodysseus) — PewDiePie's self-hosted AI workspace — includes a \"Deep Research\" feature with multi-step web research and source reading, conceptually similar to this skill's Think → Search → Extract → Synthesize → Stop loop. This skill is a pure-prompt workflow (no UI, no server) designed to run inside any agent's tool loop.\n\n[AnotiaWang\u002Fdeep-research-web-ui](https:\u002F\u002Fgithub.com\u002FAnotiaWang\u002Fdeep-research-web-ui) (MIT) — Nuxt UI wrapping dzhng\u002Fdeep-research with a hardened engine, and the main vendor source for this skill. **Vendored:** verbatim-quote evidence anchoring, v1.8.2 (`shared\u002Futils\u002Fsearch-learning.ts` → `check-quote`, §3c); structured search mini-plans with frozen constraints, planning discipline and provider guidance, v1.9.0 (`shared\u002Futils\u002Fsearch-plan.ts` → §3a); search-budget presets + breadth-halving estimate, v1.9.0 (`shared\u002Futils\u002Fresearch-input.ts` → Step 1 + `estimate-budget`); bounded deep-dive threading on follow-up directions, v1.9.0 (`lib\u002Fcore\u002Fdeep-research.ts` → §3a); six-way round-outcome taxonomy with per-reason bounded retry, v1.9.1 (`shared\u002Futils\u002Fsearch-assessment.ts` → §3a); snippet-first on-demand reading with fetch budgets, v1.9.0 (`lib\u002Fcore\u002Fread-source.ts` → §3b); term-scored verbatim passage selection, v1.9.0 (`lib\u002Fcore\u002Fsource-context.ts` → §3d); surgical report revision with citation→block mapping, v1.9.0 (`shared\u002Futils\u002Freport-revision.ts` → Step 6 + `map-citations`). **Evaluated, not vendored:** full tree recursion, streaming-JSON structured-output repair, UI\u002Fdeployment layers, and dzhng's \"the source is irrelevant\" prompt (contradicts this skill's provenance discipline). Full two-sided map: `references\u002Fanotiawang-deep-research-concepts.md`.\n\n[Anjos2\u002Frecursive-research](https:\u002F\u002Fgithub.com\u002FAnjos2\u002Frecursive-research) (MIT) — Claude Code prompt skill for long-cycle recursive research. **Vendored (v1.9.2, guidance-level):** saturation-based stop signal (§3f), coverage balancing across plan sub-questions (§3a), mandatory source-set bias check in the Gaps section (Step 4). **Not vendored:** cycle machinery, WDM weighted-source scoring, per-domain seed source lists, preventive context-pause thresholds, local-corpus mode. The ≤5% threshold is unvalidated upstream (repo last pushed 2026-04-22, no field hardening); it ships as a signal, not a rule. Map: `references\u002Frecursive-research-concepts.md`.\n\n[DocsGPT](https:\u002F\u002Fgithub.com\u002Farc53\u002FDocsGPT) (arc53, MIT) — ResearchAgent Plan → Research → Synthesize with adaptive depth, clarification, token-budget tracking, and empty-search refinement. Mapping: `references\u002Fdocsgpt-concepts.md`.\n\n`references\u002Fskills-monetization.md` — condensed AI-skills monetization knowledge bank (marketplaces, what sells, pricing) from the 2026-07-01 research dossier.\n\n## Evals\n\n`evals\u002Frouting-fixtures.json` holds lightweight contract fixtures — sample request →\nexpected routing, required output fields, and forbidden output patterns. They are\nspecs, not run against a live model; the repo-root `tests\u002Ftest_routing_fixtures.py`\nvalidates they stay well-formed and route to real skills.\n",{"name":5,"license":14,"metadata":23,"description":7},{"author":9,"hermes":24,"version":37,"platforms":38},{"tags":25,"related_skills":33},[26,5,27,28,29,30,31,32],"research","report","synthesis","iterative","citations","evidence-basis","provenance",[34,35,36],"news-monitoring","entity-research","notebooklm-mode","1.13.0",[39,40,41],"linux","macos","windows","main","e943e3285cd03c44b2c762a9a52328e3d16444b1","research\u002Fdeep-research",22,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills","https:\u002F\u002Fhermes-agent.nousresearch.com","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin","Accounting\u002FFP&A\u002FM&A\u002FPERE guy by day, AI\u002Fself-host\u002Fprogramming hobbyist by night. \r\n\r\nPassionate in solving practical business issues.","2026-11-13 19:46:18",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add moonlight-lupin\u002Fagent-skills --skill deep-research",{"tool":57,"command":58},"bunx","bunx skills add moonlight-lupin\u002Fagent-skills --skill deep-research",{"tool":60,"command":61},"pnpm","pnpm dlx skills add moonlight-lupin\u002Fagent-skills --skill deep-research","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002FSKILL.md",true,[65,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,145,149,153,157,161,165,169],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"evals\u002Frouting-fixtures.json","REFERENCE","参考文档",5356,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Fevals\u002Frouting-fixtures.json",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fanotiawang-deep-research-concepts.md",7357,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fanotiawang-deep-research-concepts.md",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fcitation-database.md",11163,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fcitation-database.md",{"path":80,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fcitation-entry-template.yaml",204,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fcitation-entry-template.yaml",{"path":84,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fcitation-export-formats.md",2569,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fcitation-export-formats.md",{"path":88,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fcitation-schema.md",3603,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fcitation-schema.md",{"path":92,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fcomparison-mode-and-recipes.md",5406,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fcomparison-mode-and-recipes.md",{"path":96,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fdocsgpt-concepts.md",4483,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fdocsgpt-concepts.md",{"path":100,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fevidence-hygiene.md",4694,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fevidence-hygiene.md",{"path":104,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Ffirmware-support-status-research.md",4084,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Ffirmware-support-status-research.md",{"path":108,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002Freal-estate-investment-analysis.md",4930,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Freal-estate-investment-analysis.md",{"path":112,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Frecursive-research-concepts.md",2853,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Frecursive-research-concepts.md",{"path":116,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":117,"sourceHtmlUrl":118},"references\u002Fresearch-provider-benchmark.md",3670,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fresearch-provider-benchmark.md",{"path":120,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":121,"sourceHtmlUrl":122},"references\u002Fsearch-and-fetch-fallbacks.md",6141,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fsearch-and-fetch-fallbacks.md",{"path":124,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":125,"sourceHtmlUrl":126},"references\u002Fskills-monetization.md",6877,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fskills-monetization.md",{"path":128,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":129,"sourceHtmlUrl":130},"references\u002Fstep3-iterative-loop.md",22851,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fstep3-iterative-loop.md",{"path":132,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":133,"sourceHtmlUrl":134},"references\u002Fstructured-evidence-format.md",14804,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fstructured-evidence-format.md",{"path":136,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":137,"sourceHtmlUrl":138},"references\u002Fvalidation-gates.md",13188,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Freferences\u002Fvalidation-gates.md",{"path":140,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":143,"sourceHtmlUrl":144},"scripts\u002Fresearch_validation.py","SCRIPT","脚本",56039,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Fscripts\u002Fresearch_validation.py",{"path":146,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":147,"sourceHtmlUrl":148},"scripts\u002Fsource_db.py",20897,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Fscripts\u002Fsource_db.py",{"path":150,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":151,"sourceHtmlUrl":152},"scripts\u002Furl_health.py",5165,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Fscripts\u002Furl_health.py",{"path":154,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":155,"sourceHtmlUrl":156},"tests\u002F__init__.py",0,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Ftests\u002F__init__.py",{"path":158,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":159,"sourceHtmlUrl":160},"tests\u002Ftest_gate_hardening_v180.py",14677,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Ftests\u002Ftest_gate_hardening_v180.py",{"path":162,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":163,"sourceHtmlUrl":164},"tests\u002Ftest_quote_anchoring_v190.py",8904,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Ftests\u002Ftest_quote_anchoring_v190.py",{"path":166,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":167,"sourceHtmlUrl":168},"tests\u002Ftest_research_validation.py",2735,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Ftests\u002Ftest_research_validation.py",{"path":170,"resourceType":141,"resourceTypeDesc":142,"sizeBytes":171,"sourceHtmlUrl":172},"tests\u002Ftest_source_db.py",8232,"https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fdeep-research\u002Ftests\u002Ftest_source_db.py",[174,181,188,195,202,208],{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":18},"01M78ATNRV7RYQ8M314V0QZX18","website-scraping","Generic playbook for extracting structured data from any website — hotel prices, flight fares, e-commerce listings, real estate, jobs, competitor product catalogues, anything where the goal is to turn one or more URLs into clean records on disk. Use this skill whenever the user mentions scraping, harvesting, extracting, or pulling data from a website; names a specific site or competitor they want data from; asks how to handle JavaScript-rendered pages, Cloudflare blocks, bot detection, Turnstile challenges, or Playwright; wants to monitor prices over time; needs to automate a copy-paste research task; or says things like \"just get the data from X\" or \"I need a script that grabs N from site Y\". Covers recon, picking the lightest extraction tool that works, surviving anti-bot defences, and writing clean JSONL output with a run manifest. Scope is scraping only — landing data in a database, scheduling, and downstream pipeline work are explicitly out of scope and live in other tools.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fweb-scraping\u002Fwebsite-scraping\u002FSKILL.md",[],[],{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":185,"categories":186,"keywords":187,"publishedAt":18},"01M78ATK9XGEKSH3QRN7P2MEER","greet","Greets a named person warmly.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fclaude_plugin_sample\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":194,"publishedAt":18},"01M78ATEAQB5CK2D4MKPCW4YHQ","skill-quality-review","Use when auditing or reviewing skill quality — batch checks across a library, deep per-skill grep methodology, usage stats, efficacy testing, or fix planning. Single consolidated home for the writing-for-agents review framework and the 3-surface review methodology.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fskill-quality-review\u002FSKILL.md",[],[],{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":201,"publishedAt":18},"01M78AT58EM57023QSC79S8R6D","people-enrichment","Use when the user has a list of names or companies and wants their job, employer, work history, LinkedIn URLs or company profiles looked up, or wants to find people or companies matching criteria — trigger on phrases like \"enrich these contacts\", \"find their LinkedIn\", \"look up these people\", \"who works at X\", \"find directors at Y\", \"enrich these companies\", or \"get firmographics for\". Enrich and search People Data Labs (PDL) Person and Company data, writing results to .xlsx. Five operations: enrich named PEOPLE into a profile, employment history and LinkedIn URL; IDENTIFY an ambiguous person as several scored candidates; SEARCH people by criteria (company, title, location); enrich COMPANIES into firmographics (industry, size, employees, HQ, founded, LinkedIn); and SEARCH companies by criteria. Do not scrape LinkedIn directly — this uses a licensed data aggregator (PDL) instead, for legal and reliability reasons.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fpeople-enrichment\u002FSKILL.md",[],[],{"skillNo":203,"name":36,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":207,"publishedAt":18},"01M78AT0AZJ7WFY73766NBA1EC","Source-grounded research pipeline inspired by NotebookLM. Collect verbatim source extracts into a temporary workspace, then answer questions and create deliverables grounded in those sources. Two grounding modes: strict (vault-only) and augmented (vault + labeled [background] knowledge). Trigger when the user asks to research a topic from sources, wants NotebookLM-style grounded answers, asks to build a resource vault, or says \"notebooklm mode\".","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fnotebooklm-mode\u002FSKILL.md",[],[],{"skillNo":209,"name":34,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":213,"publishedAt":18},"01M78ASTJVZ9G5JY6GM40SF909","Use when a topic or news stream needs recurring monitoring — cover it with web search, multi-language sources, digest formatting, and automated delivery via Hermes cron jobs. Covers search strategy, source selection, Chinese-language platforms, and digest templates.","https:\u002F\u002Fgithub.com\u002Fmoonlight-lupin\u002Fagent-skills\u002Fblob\u002Fmain\u002Fresearch\u002Fnews-monitoring\u002FSKILL.md",[],[]]