# News Briefing Agent

Your own daily news briefing, in your language and about your countries, made by Claude while you sleep. You can read it, listen to it or publish it as a podcast.

Versión en español: [README.es.md](README.es.md)

## What happens every day

A scheduled task wakes up in Claude's cloud and does what a small newsroom would do:

1. It collects the news from your sources and from web searches.
2. It picks the stories that matter to you.
3. It reads them and writes what happened, why it matters and what to watch.
4. It writes a script meant to be heard.
5. It checks every number and name against the sources, and saves that check next to the script so you can read it.
6. It records the audio with a free open-source voice and saves it for you.

Your computer can be switched off.

## Choose how far you want to go

| Level | What you get | What you need |
| --- | --- | --- |
| 1. Read it | A written briefing in Claude | A paid Claude plan |
| 2. Listen to it | The briefing and an MP3 | Level 1 plus a free GitHub account |
| 3. Publish it | A podcast page and an RSS feed anyone can follow | Level 2 with a public repository |

Scheduled tasks need a paid Claude plan (Pro, Max, Team or Enterprise), and every run uses part of your usage allowance. The voice and GitHub's free tier cost nothing extra.

## Level 1: read it

Open [prompts/one-prompt.md](prompts/one-prompt.md), fill the five blanks, paste it into a new scheduled task in the Claude app and choose a time. That is all.

## Level 2: listen to it

### Get your copy

1. Create a free account at [github.com](https://github.com) if you do not have one.
2. Download the kit as a ZIP and unzip it. Create an empty **private** repository and upload everything inside the folder, including the `.github` folder, which some computers hide. On a Mac, press Command, Shift and period to see it.

### Connect Claude

3. Go to [claude.ai/code](https://claude.ai/code), connect your GitHub account and give Claude access to your new repository. If Claude later says it has no access to the repository, this is the step to repeat.

### Let it reach the news

By default, Claude's cloud blocks most websites, including news feeds. The voice still works, but the news does not arrive.

4. In [claude.ai/code](https://claude.ai/code), open the settings of the cloud environment your task will use and set **Network access** to **Full**. If you prefer to stay limited, add the address of every news site you use under Allowed domains.

Full access means the task can connect to any website. Keep passwords and keys out of this repository.

### Set it up

5. Start a session on your repository and write: **set up my briefing**. Claude asks about your language, countries, length and timezone, writes your settings and records a short sample.

### Schedule it

6. Go to [claude.ai/code/routines](https://claude.ai/code/routines) and click **New task**.
7. Select your repository and the same environment, and choose a time at least 30 minutes before you want to listen.
8. Paste this as the task:

   ```
   Read prompts/daily-run.md and do today's run.
   ```

9. Press "Run now" once and check the result before you trust the schedule.

### Listen

Each recording appears under **Releases** on your repository's page, named `ep-` and the date. Tap the MP3 to play or download it. Claude may also attach it to the run itself. Click Watch, then Custom, then Releases if you want GitHub to tell you about new ones.

## Level 3: publish it

Everything in your repository becomes public in this level, including your settings and past scripts.

1. In your repository: Settings, General, change the visibility to public.
2. Settings, Pages, set the source to **GitHub Actions**.
3. Settings, Secrets and variables, Actions, Variables: add `PUBLISH_SITE` with the value `true`.
4. After the next episode, your page is at `https://YOUR-NAME.github.io/YOUR-REPOSITORY/` and the feed is that address followed by `feed.xml`.
5. Add that feed address to any podcast app that accepts RSS links. To appear in Apple Podcasts or Spotify, submit the feed to them. They ask for a contact email in the feed and for your own cover art (replace `publish/cover.png` with a square image of at least 1400 pixels).

## What is in this folder

| File | What it is for |
| --- | --- |
| `prompts/setup.md` | The setup interview |
| `prompts/daily-run.md` | What the scheduled task does each day |
| `prompts/1-select.md` to `4-fact-check.md` | The four editorial steps. Edit them to change how your show thinks and sounds |
| `prompts/one-prompt.md` | The no-code version |
| `templates/my-briefing.md` | Blank settings |
| `templates/my-pronunciations.json` | Blank list of words the voice should say differently |
| `templates/sources/` | Starter sources by country and topic, plus a blank one |
| `voice/speak.py` | Turns a script into an MP3 |
| `voice/voices.md` | Which voices and languages exist |
| `.github/workflows/publish.yml` | Saves recordings and builds your podcast page |
| `CLAUDE.md` | Tells Claude how to help you with all of the above |

## Doing the audio by hand

You can record any text on your own computer too:

```bash
python3 -m pip install -r voice/requirements.txt
```

```bash
python3 voice/speak.py my-script.txt my-episode.mp3 --voice af_heart
```

The first time, it downloads the voice (about 350 MB).

## When something goes wrong

| Problem | What to do |
| --- | --- |
| Claude says it cannot reach the repository | Give Claude access to it on GitHub (step 3) |
| Every feed is blocked | Set the network access of your environment to Full (step 4) |
| A source returns nothing | Feeds move. Ask Claude to check `my-sources.md` and replace dead ones |
| No MP3 under Releases | Open the Actions tab of your repository and read the last run |
| The voice says a name badly | Add it to `my-pronunciations.json` |
| The run stops early | You may have used up your plan's allowance. Shorten the episode or use fewer sections |

Ask Claude about any of these in a session on your repository. It can read the files and explain them.

## Honest limits

- The voice is free and still sounds synthetic.
- Level 1 relies on web search alone, which can return old stories. Check the dates.
- AI can get facts wrong even after checking. Open the sources before you act on anything.
- Respect the terms of the outlets you use, and do not republish their articles. The briefing should be your own summary with links.
- Claude's scheduled tasks are new and their limits can change.

## Credit and license

Made by [Julián Revorio](https://www.linkedin.com/in/julianrevorio/) after building [El Briefing Diario](https://julianreves.github.io/briefing-diario/). The voice is [Kokoro](https://huggingface.co/hexgrad/Kokoro-82M) through [kokoro-onnx](https://github.com/thewh1teagle/kokoro-onnx). MIT license.
