Horace-Maxwell/factpack
Tentang
📰 Your personal daily news briefing agent. Reads 400+ sources overnight and sends one short, checked brief with links to your chat. Self-hosted, <$1/day. | 个人每日新闻简报助手
AI dan pembelajaran mesinYang dapat Anda lakukan
- Get a morning brief you can check. factpack daily --send posts one short brief to Discord, Telegram or WhatsApp. Every story links to its sources and every number is in them.
- Check an AI summary before you post it. factpack check draft.md -s <article-url> flags each sentence whose numbers or quotes aren't in the source.
- Give your agent a fact-check step. The FactPack skill teaches Claude Code, Codex and other agents to run the check and fix what it flags before answering.
- Measure a prompt or model change. Replay any frozen day through the changed pipeline and score recall, a sentence audit and a blind A/B.
Pertumbuhan bintang terukur
- dalam 24 jam
- +17
- dalam 7 hari
- Mengumpulkan riwayat
- dalam 15 hari
- Mengumpulkan riwayat
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliEnglish · 简体中文 · 日本語 · 한국어 · Español · Français · Deutsch · Português (Brasil)
Self-hosted briefing agent for Discord, Telegram and WhatsApp, under $1 a day.
🚀 Quickstart · 🌐 Live demo · 🔍 Try the demo · 🧪 Check any text · 🤖 Agent skill · 📊 Accuracy · 🧭 How it works
In your AI agent (Claude Code):
/plugin install factpack --marketplace Horace-Maxwell/factpack
Codex, Cursor, Gemini CLI and other Agent Skills hosts: npx skills add Horace-Maxwell/factpack -g · On your machine: uvx factpack demo
FactPack is a self-hosted briefing agent that reads ~400 sources overnight across news, AI labs, Hacker News, GitHub, arXiv and markets. It picks what matters and sends one short brief to Discord, Telegram or WhatsApp each morning. Every story links to its sources, numbers are checked against them, and it runs for under US$1 a day.
Table of contents
📸 Screenshots
![]() In your chat, every morning |
![]() The full edition, every card with its sources |
Chat brief and full Markdown edition, generated by the demo from fictional news.
More screenshots (the cut-sentence note, and the Chinese edition)

A card's footer says when the guards cut a sentence: here, a profit figure that appears in none of the sources.
![]() |
![]() |
The same demo with --lang zh: Simplified Chinese is what the production instance runs.
💡 What you can do with it
- Get a morning brief you can check.
factpack daily --sendposts one short brief to Discord, Telegram or WhatsApp. Every story links to its sources and every number is in them. - Check an AI summary before you post it.
factpack check draft.md -s <article-url>flags each sentence whose numbers or quotes aren't in the source. - Give your agent a fact-check step. The FactPack skill teaches Claude Code, Codex and other agents to run the check and fix what it flags before answering.
- Measure a prompt or model change. Replay any frozen day through the changed pipeline and score recall, a sentence audit and a blind A/B.
⚡ Why FactPack
Keeping up with the news usually means opening dozens of tabs and feeds before work even starts. FactPack does that reading overnight and puts one short brief with source links in your chat by morning.
| Typical AI digest | FactPack | |
|---|---|---|
| Sources | a handful of feeds | 627 cataloged; dead feeds disabled and new publishers proposed automatically |
| Selection | one prompt | LLM triage → LLM editor-in-chief → quotas, diversity and dedup enforced in code |
| Invented numbers | invisible | the sentence is cut if its numbers aren't in the cited articles; the edition says how many |
| Prompt injection | whatever the page says | article text is passed as data; mentions, links and markup are stripped from model output |
| Repeats | frequent | cross-day dedup and explicit follow-up labels |
| Quality | "trust us" | a published evaluation with its misses, and a frozen input for every day |
✨ Features
📬 Morning brief in chatOne short brief every morning in Discord, Telegram or WhatsApp, plus Markdown, an RSS feed and a git archive. Never sends twice. |
📡 Reads 400+ sources overnight627 sources cataloged: ~408 on by default, ~485 with a self-hosted RSSHub. Dead feeds are dropped, new ones proposed. |
🌐 Two output languagesSimplified Chinese in production, English in preview; sources in any language. |
✂️ Strict quotas and dedupModels choose and write; deterministic code enforces quotas, dedup and diversity before anything publishes. |
🤖 Agent skillOne skill file for Claude Code, Codex and 50+ Agent Skills hosts: check, demo, brief. |
▶️ 2-second offline demoNo API key:uvx factpack demo verifies all 6 guards on 12 fictional articles. |
🛡️ Deterministic fact guardsChecks numbers by value, traces quotes to sources, and strips markup against prompt injection. |
🧪 Check any textThe same guards as a CLI and a Python function, with JSON output and exit codes for agents and CI. |
⏪ Replayable frozen-input evalsFreezes each day's input so you can replay a change and score recall, a sentence audit and a blind A/B. |
🔍 See the guards work
The demo runs the real pipeline on twelve fictional articles, offline, with no API key. A scripted model stands in for the LLM and makes the mistakes real models make. Everything after it is production code, and the demo checks the written edition to confirm each mistake was caught.
uvx factpack demo # about 2 seconds; writes a full brief to ~/.factpack/data/demo/
uvx factpack demo --lang zh # the same, in Simplified Chinese
[!NOTE] What the guards cover today. Numbers in every written field (headline, lede, body, TL;DR, the closing take) must appear in the cited material, compared by value, so
$1.2bnmatches1.2 billionand12 亿. Quotes must be traceable to the source. Model output is plain text: no mentions, links, markup or code. Other claims are not yet checked sentence by sentence: a reversed cause, or a statement pinned on the wrong company, still gets through. That is why the published error rate is 4.9%, not 0.
🧪 Check any text
The guards also work on text FactPack didn't write: a summary, a newsletter draft, an agent's answer. Give it the text and the sources it claims to summarize.
uv run factpack check draft.md -s https://example.com/article -s notes/source.txt
✓ Arden Motors grew revenue 34% to $6.1bn last quarter.
✗ Net profit jumped 48%.
number not in any source: 48
✓ Margin hit 7.5%, and deliveries should reach 210,000.
✗ The CFO said "we are seeing record demand for vans" and "prices will double next year".
quote not found in the sources: prices will double next year
2 of 4 sentences flagged · 0 with mentions/links/markup
JSON for agents and CI · Python
--json prints a machine-readable report. The exit code is 0 when every sentence passes, 3 when any is flagged, and 1 for bad input, so CI and agents can branch on it.
uv run factpack check draft.md -s https://example.com/article --json
from factpack.check import check_text
report = check_text(draft, [source_text])
report["flagged"] # sentences with an unsupported number or quote
report["clean_text"] # the supported sentences, sanitized
Source URLs are fetched the way the pipeline fetches articles: one honest User-Agent, robots.txt respected, public hosts only. Claims without numbers or quotes are not judged.
🤖 Use it from your AI agent
FactPack ships an Agent Skill: it teaches your agent to save a draft, run factpack check against the sources, fix or drop each flagged sentence, and repeat until the check passes. It can also run the demo and build the brief.
| Agent | Install |
|---|---|
| Claude Code | /plugin install factpack --marketplace Horace-Maxwell/factpack |
| Codex, Cursor, Gemini CLI, Copilot and other Agent Skills hosts | npx skills add Horace-Maxwell/factpack -g |
| Anything that runs shell commands | uvx --from git+https://github.com/Horace-Maxwell/factpack factpack check … |
Then ask in plain words: "Check this summary against these three links before I post it."
📊 How accurate is it?
| Metric | Baseline | Target |
|---|---|---|
| Must-cover events reported the same day | 64.7% (51 events) | ≥ 85% |
| Fact sentences unsupported by their own sources | 4.9% (185 sentences) | ≤ 2% |
| Stories backed by a single source | 53% | ≤ 35% |
| Unlabelled cross-day repeats | 0.6 / day | 0 |
| Editions on time | 44 / 47 | 47 / 47 |
Measured on 47 production days (Simplified Chinese output), 8 blind-labelled golden days and a sentence audit of 64 sampled cards, on the production engine before this release. The stricter number check here hasn't been re-measured yet. Full report, with confidence intervals and error types: eval/BASELINE.en.md.
Caveats
- Golden days were labelled blind by Claude subagents from public references (Techmeme, Wikipedia Current Events, smol AINews, market close summaries), without seeing the brief. The sentence judgments were also made by Claude subagents. Neither has been reviewed by a person yet: treat them as "silver" labels.
- Judges saw the articles refetched later, not the exact text the writer saw.
- The samples are small and the intervals are wide.
🚀 Quickstart
git clone https://github.com/Horace-Maxwell/factpack && cd factpack
uv sync
export FACTPACK_DEEPSEEK_API_KEY=sk-... # or any OpenAI-compatible provider, see docs/configuration.md
uv run factpack status # what's configured: key, sources, RSSHub, delivery targets
uv run factpack daily # build today's brief into data/out/<date>/ (nothing is sent)
Runs on macOS and Linux (or Docker anywhere) with Python 3.12+. A run takes a few minutes and about 220k input and 60k output tokens, well under US$1 a day at DeepSeek's prices. Behind a proxy, set HTTPS_PROXY.
Output in data/out/<date>/ |
What it is |
|---|---|
digest.json |
the canonical structured edition |
<date>-早报.md / <date>-brief.md |
the full Markdown edition (Chinese / English) |
discord.txt |
the short chat version |
pool.json.gz |
the frozen input, for replays |
With Docker Compose (includes RSSHub)
cp .env.example .env # API key, delivery credentials
cp -r instance.example instance # set rsshub.base_url: http://rsshub:1200 and paths.data_dir: /data
docker compose run --rm factpack daily # build only
docker compose run --rm factpack daily --send # build + deliver
About 100 sources need a self-hosted RSSHub and stay off until you set rsshub.base_url. See docs/deployment.md.
🌐 Output languages
output.language |
Status | What's covered |
|---|---|---|
zh Simplified Chinese |
production, default | 47 days of daily editions, the published baseline |
en English |
preview | renderer, guards and demo; not yet measured on production days |
Set it in your instance settings (output: {language: en}). Sources can be in any language: numbers are matched by value across languages, so an English sentence can be grounded in a Chinese press release. More languages are roadmap item #1.
🧭 How it works
Models choose and write; code decides what may be published. Quotas, diversity and dedup are enforced after the editor model answers, and the guards run on everything a model writes. Details: docs/architecture.md.
📬 Run it every day
- Deliver to Discord (webhook), Telegram, Feishu, WeCom or DingTalk, or Discord and WhatsApp through OpenClaw:
factpack daily --send. It is idempotent and never sends twice. - Archive each day into a git repo, with an RSS feed, entity and source indexes, and weekly and monthly reports. An Obsidian vault is optional.
- Self-maintenance:
factpack evolvedisables dead feeds and queues newly discovered publishers for your review. - No server needed: fork the repo, add your keys, and GitHub Actions builds and sends the brief every morning (docs/github-actions.md).
- Deploy with
factpack schedule install(launchd or systemd), Docker Compose or GitHub Actions. A run missed to a reboot, sleep or a network outage is caught up automatically, andfactpack doctorchecks the machine (docs/deployment.md).
Your settings, delivery targets and evolve state live in a private instance directory, outside this repo:
cp -r instance.example ~/my-factpack && export FACTPACK_INSTANCE=~/my-factpack
🔬 Measure every change
uv run factpack replay --date <a-day-you-ran> --out eval/runs/my-idea --label "my idea" # same news, new pipeline
uv run factpack eval metrics eval/runs/my-idea # quality and cost
uv run factpack eval recall eval/runs/my-idea --golden eval/golden # must-cover recall
uv run factpack eval pairwise-prepare --a eval/runs/main --b eval/runs/my-idea --out eval/runs/ab # blinded A/B
factpack daily saves a frozen pool for every day it runs, so you can replay your own days. The published golden days come from the maintainer's private instance, so their pools aren't public; label your own days the same way to measure recall (eval/README.en.md).
📍 Roadmap
- More output languages. Verify facts once, then write natively per locale (all EU languages, Japanese, Korean, …), and measure English on production days.
- Must-cover checklist. Earnings, macro and regulatory calendars feed the editor, aimed at the biggest misses in our own eval.
- Semantic clustering and story tracking. Multilingual embeddings and a persistent story graph; a follow-up must say what's new.
- Sentence-level evidence. Every sentence carries a verbatim source span, checked by a second model family.
- "What do people think?" For any story or question: the distinct views in public comments and how many people hold each, built only on official platform APIs.
- Scheduled GitHub Actions deployment, and a searchable web archive.
❓ FAQ
Can FactPack output in English or other languages?
Yes for English, as a preview: set output.language: en. The renderer, the guards and the demo support it, but it hasn't been measured on production days yet. Simplified Chinese is the production default. More languages are roadmap item #1.
Which models work, and what does daily use cost?
DeepSeek by default: flash models for triage and cards, a pro model for the editor. Any OpenAI-compatible model with JSON mode works; OpenRouter and OpenAI endpoints are built in. A run uses about 220k input and 60k output tokens, well under US$1 a day at DeepSeek's prices.
What mistakes can still slip past the guards?
Numbers and quotes are checked deterministically. Other claims aren't yet, so a reversed cause or a statement pinned on the wrong company can get through. In the baseline, 4.9% of fact sentences were unsupported or contradicted by their own sources; the eval report lists the error types.
How were the 47-day baseline metrics labeled?
Golden days were labelled blind by Claude subagents from Techmeme, Wikipedia Current Events, smol AINews and market close summaries, without seeing the brief. Sentence judgments were also made by Claude subagents. None of it has been reviewed by a person yet, so treat them as silver labels. The samples are small; the report gives confidence intervals.
Do I need a self-hosted RSSHub to run it?
No. About 408 sources work out of the box. Roughly 100 more need RSSHub and stay off until you set rsshub.base_url; docker compose starts one for you.
Why is the demo model scripted?
So it runs anywhere in two seconds with no key, gives the same result every time, and makes known mistakes you can watch get caught. All the publishers, companies, people and places in it are fictional.
Is it polite to publishers? Is it investment advice?
One honest User-Agent, robots.txt for article pages, per-host concurrency limits, Retry-After honoured; Google News link decoding and SEC sources are opt-in. And no, it isn't investment advice: it summarizes reporting and links to the sources.
🤝 Contributing
Issues and PRs are welcome; see CONTRIBUTING.md, and AGENTS.md if you work with a coding agent. Changes to selection, prompts, clustering or grounding come with an eval run, so we can see whether they help, and factpack demo must still report 6/6.
⭐ Star History
Star the repo to track multi-language support and future error-rate reports.
🙏 Acknowledgements
FactPack builds on RSSHub, trafilatura, feedparser and httpx, and on the publishers who still offer RSS.
📄 License
Code: Apache-2.0. Golden-day labels: CC BY 4.0.
Jelajahi proyek terkait
Memuat…



