尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证The Optimist - An online newspaper, using AI to rewrite high quality journalism from a respected source with a more positive angle whilst maintaing factual accuracy and tone of voice.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
A daily mirror of the Guardian's UK front page, rewritten with an optimistic point of view. Every fact, figure, quote and name is kept; only the framing changes. A personal, non-commercial experiment in editorial tone.
Not affiliated with Guardian News & Media. Article text is adapted from Guardian journalism under the Open Platform developer terms, with attribution and a link to the original on every article page. Bylines are pseudonymised; the real byline appears in the attribution line.查看完整 README ↗A daily mirror of the Guardian's UK front page, rewritten with an optimistic point of view. Every fact, figure, quote and name is kept; only the framing changes. A personal, non-commercial experiment in editorial tone.
Not affiliated with Guardian News & Media. Article text is adapted from Guardian journalism under the Open Platform developer terms, with attribution and a link to the original on every article page. Bylines are pseudonymised; the real byline appears in the attribution line.
Guardian front page (HTML) ──► fetch ──► raw.json
Guardian Content API ──┘ │
context ──► context.json (earlier Guardian coverage)
│
jobs ──► jobs.json
│
rewrite engine (one of two) ▼
• claude-code: Claude Code does it results.json ◄──┐
• api: Anthropic Message Batches │ │
tone ──► tone.json │
check ──► check.json │
│ │
revise ─────┴───────────┘ (until clean)
│
assemble ──► site.json → data/latest.json
│
astro build ──► GitHub Pages
jobs.json and writes results.json. Anything that honours that contract is an engine. scripts/rewrite-api.ts is the reference implementation on the Anthropic API (Sonnet 5 via the Batch API, structured outputs, prompt caching). The daily run uses Claude Code itself as the engine, on a scheduled cloud routine, so there is no API bill.scripts/tone.ts is a mechanical lint with no model behind it. It fails the run on an unchanged or cosmetically edited headline where the original carried a setback ("warns" swapped for "says" and nothing else moved), on a rewritten headline still centred on a word of loss, harm, threat or fear, and on any preview with no rewrite at all. It warns on a headline whose subject or object is the setback itself (cuts, delay, wait, surge, closure and the like) and on a score that contradicts the copy (a 0 with a "What's being done" line, a 3 built on doom). Quotations and house-style compounds such as "climate crisis" are exempt.scripts/check.ts runs two model reviewers on each pair: a fact check (Haiku, thinking off) that demotes anything with an unsupported or altered claim, and a tone review (Sonnet, low effort) that judges the copy against prompts/rewrite.md as an editor would, and writes notes for the writer.scripts/revise.ts sends every rewrite that failed a review back to the rewriter with the previous attempt and the notes, then check.ts --only=failed and tone.ts run again. Loop until clean. The daily routine does the same loop, with the reviews run in separate subagents so the writer never grades its own copy.data/<date>/drop.json (optional) maps content paths to a reason; scripts/assemble.ts leaves those stories out of the front page, article pages and related rails. The daily routine fills it with the stories too bleak for the paper to run.upside score (0–3) from the engine; an article's score, judged from its whole body, is the one its card uses. assemble ranks the cards in each container by it, strongest first, with the Guardian's order breaking ties, and then holds the front to a floor: a card scoring 0 never runs, on the front or in a related rail, and a card scoring 1 runs only beneath a card scoring 2 or more in the same container, never in the highlights strip. A story with no honest upside is left out rather than strained; the brief says so in as many words.fetch also runs one Content API search for recent stories from constructive sections (raw.candidates). The engine picks the genuinely good news into data/<date>/going-right.json; jobs gives each a preview job and assemble shows them as a container straight after the News block.progress line naming who is acting and how, built only from the copy and fact-checked with the rest. It runs under a "What's being done" label at the top of each article.scripts/context.ts runs one Content API search per News article, on its keyword tags, for recent Guardian pieces on the same story, and stores each with an excerpt of its opening (data/<date>/context.json). The engine may add one context line, 10–30 words, built only from one item's excerpt and citing its URL; it runs under the progress line with a link to the piece, and the fact check verifies it against the excerpt. The headline, standfirst and body never draw on it. Nothing comes from the open web: every fact on the site is checkable against Guardian copy under the same terms.prompts/rewrite.md holds the editorial rules: analyse each story for its upsides, build the headline entirely on the strongest one, move the setback to the standfirst, keep headlines short (eight to 12 words, 14 at most) and about people and outcomes, keep Guardian house style, never invent a fact, never make a cosmetic edit, and score a weak response (a postponed review, a call for action, a report that only sizes a problem) honestly rather than stretching it into a headline.cp .env.example .env # add GUARDIAN_API_KEY (and ANTHROPIC_API_KEY for the api engine)
npm install
npm run fetch # data/<today>/raw.json (--front-only needs no key)
npm run context # data/<today>/context.json (optional; earlier Guardian coverage per News article)
npm run jobs # data/<today>/jobs.json
npm run rewrite:api # data/<today>/results.json (or produce it with another engine)
npm run tone # data/<today>/tone.json (no key needed; exits 1 on errors)
npm run check # data/<today>/check.json (facts + tone; --no-tone for facts only)
npm run revise # re-run the failures with the reviewers' notes, then:
npm run check -- --only=failed && npm run tone
npm run assemble # data/<today>/site.json + data/latest.json
npm run build # dist/
npm test runs the unit tests (front-page parser, bylines, sanitiser, request builders). npm run dev previews the site; without data/latest.json it renders data/fixture/site.json.
| Path | What |
|---|---|
scripts/ | Pipeline CLIs and their libraries (lib/front.ts parser, lib/guardian-api.ts client, lib/bylines.ts, lib/sanitise.ts, lib/anthropic.ts, lib/tone.ts lint, lib/check-prompt.ts review prompts) |
prompts/rewrite.md | The system prompt every engine uses |
src/lib/types.ts | The data contract shared by pipeline and site |
src/ | Astro site: pages, components, styles (Guardian design tokens from @guardian/source) |
data/ | One folder per day plus latest.json; the site builds from latest.json only |
routine/ | Instructions for the scheduled Claude Code run |
Names are spoonerised (Marina Hyde → Harina Myde). Where the swap does not read cleanly, a deterministic stock name is used instead, so the same journalist always maps to the same alias. Agency bylines pass through unchanged.
The Guardian's typefaces are proprietary. The site uses free lookalikes by default; the font stacks live in one place in src/styles/tokens.css.