# Trending Data JSON Schema

Generated by `github_trending_collect.sh` at `/home/ice/.hermes/scripts/github_trending_collect.sh`.

## Structure

```json
{
  "date": "YYYY-MM-DD",
  "source": "https://github.com/trending",
  "repos": [
    {
      "rank": 1,
      "name": "owner/repo",
      "url": "https://github.com/owner/repo",
      "language": "TypeScript",
      "stars": 70274,
      "description": "One-line trending description",
      "readme": "# Full README markdown/HTML content...",
      "readme_error": null,
      "topics": ["topic1", "topic2"]
    }
  ]
}
```

## Fields

| Field | Type | Notes |
|-------|------|-------|
| `rank` | int | 1-20, position on trending page (page may have fewer items) |
| `name` | string | `owner/repo` format |
| `url` | string | Full GitHub URL |
| `language` | string | Programming language (may be null/"None") |
| `stars` | int | Raw star count |
| `description` | string | Trending page description (English, short) |
| `readme` | string | Full README content — may contain HTML tags, markdown, badges. Can be very large (up to 100K+ chars for projects with extensive docs) |
| `readme_error` | string/null | Error message if README fetch failed |
| `topics` | string[] | GitHub topic tags (often empty in trending data) |

## Usage in LLM enrichment

The `readme` field is the primary source for LLM analysis. Strip HTML tags before feeding to your analysis logic. HTML tags in READMEs often cause the generate script's `extract_readme_info()` to produce garbage output (raw `<img>` tags as "problem" text), so LLM post-processing is essential.

Common README patterns to watch for:
- First paragraph after the title typically states the problem/purpose
- Feature lists under `## Features` or `## Key Features` headings
- Badges section at top (icons for CI, downloads, license) — skip these when extracting narrative
- Translation links (`[简体中文]`, `[日本語]`) — indicators of multi-language projects
