---
description: Search and discover authoritative reference sources for a topic. Validates credibility, generates URL manifests for crawling.
argument-hint: <topic> [--vendor anthropic|openai|google] [--max-sources 10]
allowed-tools: WebSearch, WebFetch, Read, Write, Bash, Grep, Glob
---

# Reference Discovery

Search for authoritative reference sources on a given topic.

## Arguments
- `<topic>`: Required. The subject to find references for (e.g., "Claude system prompts")
- `--vendor`: Filter to specific vendor (anthropic, openai, google)
- `--max-sources`: Maximum sources to discover (default: 10)

## Workflow

### 1. Search Strategy
Use multiple search approaches:
- Official documentation sites
- Engineering blogs
- GitHub repositories
- Research papers
- Community guides

### 2. Source Validation

Evaluate each source for credibility:

| Tier | Description | Examples |
|------|-------------|----------|
| tier1_official | Vendor documentation | docs.anthropic.com |
| tier2_verified | Verified engineering blogs | anthropic.com/news |
| tier3_community | Community resources | GitHub repos, tutorials |

### 3. Output Manifest

Generate `manifest.json` in working directory:

```json
{
  "topic": "user provided topic",
  "discovered_at": "ISO timestamp",
  "sources": [
    {
      "url": "https://...",
      "title": "Page title",
      "source_type": "official_docs",
      "credibility_tier": "tier1_official",
      "vendor": "anthropic"
    }
  ]
}
```

### 4. Store Sources

Insert discovered sources into MySQL:
```bash
source ~/.envrc
mysql -u $MYSQL_USER -p"$MYSQL_PASSWORD" reference_library
```

Use the `sources` table schema from `~/.config/reference-curator/`.

## Example Usage

```
/reference-discovery Claude's system prompt best practices
/reference-discovery MCP server development --vendor anthropic
/reference-discovery prompt engineering --max-sources 20
```
