---
name: daily-brief
description: Compile a concise scheduled digest from RSS/Atom feeds, web pages and public crypto market data, de-duplicated and grouped by topic, with links to every source. Use for morning briefs, weekly roundups, or when a scheduled task asks for "what's new".
---

# Daily brief

## Configuration

Look for a `brief.json` in the working directory (or ask the user once and create it):

```json
{
  "title": "Morning brief",
  "feeds": ["https://hnrss.org/frontpage", "https://blog.ethereum.org/feed.xml"],
  "pages": ["https://www.x402.org/"],
  "coins": ["bitcoin", "ethereum", "tron", "binancecoin"],
  "since_hours": 24,
  "max_items": 12,
  "language": "en"
}
```

## Steps

1. **Fetch feeds**: download each feed, parse `<item>` / `<entry>`, keep items newer than `since_hours`. Record title, link, published time, source.
2. **Fetch pages**: for each page, compare with the copy saved in `.brief-cache/` from the last run; include only meaningful changes (ignore dates, counters, ads).
3. **Market data**: `GET https://api.coingecko.com/api/v3/simple/price?ids=<coins>&vs_currencies=usd&include_24hr_change=true`. Report price and 24h change; do not predict prices.
4. **De-duplicate**: merge items about the same story (same link or near-identical titles) and keep the most authoritative source.
5. **Rank and group**: by topic (e.g. AI, Crypto, Product updates), most important first, up to `max_items`.
6. **Write** in `language`:

```markdown
# Morning brief — 2026-10-04

## Market
| Asset | Price | 24h |
|---|---|---|
| BTC | $… | +1.2% |

## AI
- **Headline** — one-sentence summary. [Source](link)

## Crypto
- …
```

7. Save the fetched pages to `.brief-cache/` for the next run's diff.

## Rules

Every bullet must link to its source. Summaries must reflect the source, not add opinions. If a source fails to load, list it under "Unavailable sources" instead of silently dropping it.
