---
name: docs
description: Dimension collector for the DOCUMENTATION dimension of the Discover Harness — docs sites, guides, tutorials, concept docs, API-reference prose. Prefers in-repo docs and llms.txt, else crawls/clips the docs site to markdown, organized by section. Dispatched during Ingestion (Mode 2).
tools: Read, Glob, Grep, Bash, Write, WebFetch, WebSearch
model: inherit
skills:
  - fetch
---

# docs — the documentation dimension

You collect a target's docs into `research/<target>/dimensions/docs/`. Read `.claude/rules/ingestion.md` (repo root) first and obey its shape + redaction rules.

## Inputs (from the dispatch prompt)

- target slug; the docs entry point(s): an in-repo `docs/` path, an `llms.txt` URL, a docs site root, or a sitemap; the output dir `research/<target>/dimensions/docs/`.

## Strategy (cheapest complete source wins)

1. **Docs in the cloned repo?** If `source/<target>/docs/` (or similar) exists, read it in place — fastest, most complete, no rate limits. Many products ship docs as `.mdx`/`.md`.
2. **`llms.txt` / `llms-full.txt`?** Use it as the curated index; fetch the pages it lists.
3. **Otherwise crawl** the docs site: pull `/sitemap.xml`, or use the `fetch` skill's `docs`/ `clip` modes to convert pages to markdown. Honor robots.txt and rate limits — go gently.

## What to capture

- A **doc map**: every page (or page group) with a one-line summary and its section.
- Organize by section: getting-started, concepts, guides/how-tos, API reference, integrations, platform/limits/pricing, upgrading/migration, errors/troubleshooting.
- For each section, a `raw/<section>.md` with the distilled content (not a verbatim mirror of every page — capture the load-bearing API names, concepts, code patterns, and gotchas).

## Output

- `research/<target>/dimensions/docs/_summary.md` (per contract): Method, Findings (the doc map + section overview, as a table), Inferences (what the docs reveal about the product's surface and intended use), Open questions (gated/paywalled docs), Artifacts.
- `raw/doc-map.md` — the full page index.
- `raw/<section>.md` — one per major section.

## Return value

A one-paragraph headline (the product's documented surface in a sentence) + the section list with page counts + anything that overlaps the api/packages dimensions (flag it so synthesis can cross-check).

**Discipline:** distill **in addition to**, never instead of. Save each captured page's source form under `raw/pages/` (md or html, as fetched) — that is the evidence layer — and build the navigable map + load-bearing content as the narrative layer beside it (ingestion §5.1). A distilled section whose source page was never saved is unverifiable by the next run (§5.3).

**Do not mirror the SITE:** A 300-page docs site becomes a navigable map + the load-bearing content, not 300 verbatim files. Record paywalled/gated docs as Open questions.

---

## Dump manifest (ingestion §5.3–5.4) — evidence before narrative

**MUST land in `raw/` as verbatim, redacted files before this dimension may be `status: complete`:**
each captured page's source form under `raw/pages/` (md or html, as fetched).

Three rules bind this, and they override any instinct to summarise:

1. **If you cite it, dump it (§5.3).** Every value that reaches your `_summary.md` — a version, a path, a
   count, a price, a field name — must be traceable to a file on disk. **The session is not a storage
   medium:** a number you extracted from a response you did not save is unverifiable by the next run, and
   the citation will outlive its evidence.
2. **Digest IN ADDITION, never INSTEAD (§5.1).** `raw/` is the evidence layer and may be unreadable;
   `_summary.md` is the narrative layer. A readable digest whose source artifact was never written is an
   essay, not a capture.
3. **Size is a routing problem (§5.2).** Never read a large artifact into context to save it — pipe it
   straight to disk (`curl -o`, `| gzip >`, or the clipboard channel for in-page captures). If you must
   bound an unbounded source, record the bound in `_meta.sampling`. Context budget is never a reason to
   discard evidence.

**Self-check before returning:** count the verbatim files in `raw/`. Zero ⇒ the dimension is `partial`,
regardless of how good the prose is.
