sidewise CLAUDE.md

A project instruction document for Sidewise, a news reader that collects articles from RSS feeds, which are regularly updated website feeds. It describes the app's architecture, feed sources, data parsing, and API output.

In plain words
What is it for?
Use it when developing or testing Sidewise, adding or checking news feeds, parsing article dates and links, or working on its stories API and Cloudflare Worker.
Why use it?
It gives a coding agent the project-specific context needed to change the right parts and preserve existing behavior. It also records checks for stale feeds and explains why publisher grouping affects bias results.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/nulljosh/sidewise/claude-md
Clone the repo
git clone --depth 1 https://github.com/nulljosh/sidewise
Per session 1,120 This file is loaded in full into every session.
When invoked 1,120 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01120 $0.01120
Opus 5 $0.00560 $0.00560
Sonnet 5 $0.00224 $0.00224
Haiku 4.5 $0.00112 $0.00112

Measured 2d ago against content hash 4992a5f519ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sidewise CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sidewise

RSS news reader across the feeds in src/feeds.js (incl. Hacker News, Fox, BBC, WSJ…). Flat Latest feed + Ground News-style bias view. sidewise.heyitsmejosh.com.

Architecture

Single Cloudflare Worker does everything. worker.js is routing + error handling only; the logic lives in src/ (feeds parse stories load mcp) so it can be tested without a Worker runtime. worker.js re-exports all of it, so check-feeds.mjs and tests import one path.

  • Fetches every RSS feed in FEEDS ( = [outlet, bias, url, publisher?] in src/feeds.js; add a source by appending a row — RSS 2.0 or Atom). publisher defaults to outlet and exists so one newsroom's two feeds (NY Post + NY Post Opinion) count as one voice, not two — counting outlets inflated bias bars and produced false blindspots. Run npm run feeds after adding one: it checks recency, not just item count, which is the only way to catch a "zombie" feed that still serves 200 OK from a frozen snapshot (CNN did exactly this for 3 years).
  • parseItems pulls title/link + a timestamp (pubDate/dc:date/published/updated, ts=0 when absent).
  • Returns two views in one /api/stories JSON payload:
    • latest — flat reverse-chron across all sources (dateless sinks to bottom), the default reader view.
    • storiescluster() groups same-story headlines by title-keyword overlap (naive O(n²), see ponytail: comment — upgrade to embeddings if quality matters), tags bias, flags blindspots (covered by one side only).
  • Serves the static site (via Workers Static Assets). public/index.html is the marketing page; public/reader.html is the actual web app. from the same deploy — no separate Pages project. Frontend defaults to Latest with a source picker + search; tabs switch to the bias view.
  • The feed pull (not the response) is cached ~2 min via the Cache API under a constant key; responses go out no-store because the zone CDN ignores query strings. A fresh deploy still serves the previous pull until that TTL expires — don't panic if new fields are missing for a couple of minutes.
  • Failure handling: each feed reports {ok, items, error}; a pull that loses more than half its feeds is degraded and falls back to the last good pull (stale: true) rather than serving a half-empty feed, and never overwrites it. /api/health 503s when degraded.

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 55 lines · 1,120 tokens per session scan A 4992a5f519ad

Subscribe to this mod's changes

sidewise CLAUDE.md is an instructions file published in the GitHub repository nulljosh/sidewise (1 stars, last pushed 2d ago), licensed MIT. It adds 1,120 tokens to every session, about $0.0056 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.