panoptiblog #
An index of English-language standard.site publications. Authors are shown for attribution; they are not scored.
scripts/panoptiblog/index.mjs reads the network and writes one JSON dataset.
It keeps a saved record set between runs: a full walk seeds it, Jetstream
commits update it, and each run rebuilds the dataset from the current set. A
full walk reconciles the set every two weeks.
Running #
npm run panoptiblog:index -- --out scripts/panoptiblog/out/panoptiblog.json
The output and the DID cache are gitignored. Useful flags:
--top Nkeeps the top N publications, for a smaller file.--limit-repos Nreads only N repositories, for a smoke run.--concurrency Nchanges how many repositories are read at once.--incrementalapplies changes from the saved record set and Jetstream.--state FILEuses a local record set instead of the S3 one.--fullforces a full walk and refreshes that record set.--max-run-minutes Nbounds the crawl and build phase (default 240; 0 disables).--now ISOmakes the recency windows reproducible.--compacttrims the fields the public site does not render.--previous URLreads the last published dataset and records each publication's prior rank for day-over-day movement.--trending-days Npublishes the biggest upward rank jumps in the current top 100 over the last N days. It reads the datedall.jsonfiles under--history-baseand omitstrendingwhen none can be read.--history-base URLsets the dated dataset root (defaulthttps://substandard.blog/panoptiblog/history).--from FILEtrims an existing dataset instead of walking the network.--all-out FILE/--all-uploadwrite and upload the full dataset.--labeler-out FILE/--labeler-uploadare reserved for the author-stats labeler that will follow the dashboard. They are not part of this release.--lookup-out FILE/--lookup-uploadwrite and upload the lookup dataset: every ranked and every excluded publication, not just the top 100.--excluded-out FILEwrites every excluded publication with its exclusion label and spam reasons. It is an audit export, not part of the published run.--baseline FILEcompares the ecosystem metrics to another corpus; repeat it for several baselines. Accepts{name, periodDays, documents:[{text,title?,publishedAt?}]}or{name, metrics}.--prettyindents the output.
What it reads #
Four standard.site collections:
site.standard.publication— the blogs.site.standard.document— the posts.site.standard.graph.subscription— who follows a publication.site.standard.graph.recommend— who endorsed a document.
A full walk finds their repositories through the relay's
com.atproto.sync.listReposByCollection and reads each one from its PDS with
com.atproto.repo.listRecords. That walk seeds a saved record set. Later runs
read Jetstream, Bluesky's filtered firehose, from the saved cursor, and re-read
only the repositories named by a commit, an earlier failure, or a canary. A
full walk reconciles the set every two weeks, or when --full is set.
No credential is used. The relay, each PDS, and Jetstream are public.
What it computes #
Per publication: documents, words, median words, first and last post, posts in
the last thirty and ninety days, distinct subscribers, distinct recommenders,
top tags, out-links, readability, lexical diversity, word rarity from a bundled
English Zipf lists (FrequencyWords, MIT), cadence, reading time,
theme colors, icon, author attribution, and percentiles. The score is a
two-level tree: six composites (Audience, Volume, Consistency, Style, Pulse,
and Network) each average the percentiles of their factors; the overall score
averages the composites, one sixth each. Audience counts subscribers and
recommenders. For every factor whose zero means absence, zero scores zero and
positive values are ranked only against other positive values. Consistency
combines active months, the share of calendar months with a post up to the
latest post over at least six months, and cadence. Style includes structural
variety across headings, lists, quotes, code, and images. Pulse combines
recency and new audience; recent citations are a diagnostic. Recency gives
full credit for a post in the last 45 days, then decays. Time since the latest
post counts only in Recency, not in Consistency. Network counts inbound citations and source
range per 1,000 words of prose, plus at:// or Bluesky embeds. Self-links and
same-author links are excluded, and reciprocal links count.
Each composite and factor carries a name, an icon in the page, a one-line
description of its character, and the exact metric its info button shows. The
composite and factor weights are in method.tree; each row’s factor and
composite percentiles are in factors and composites. Missing factors and
zero weights are renormalized away. theme is the publication’s
standard.site basicTheme converted from RGB to CSS colors. previousRank
appears when a publication’s rank changed from the last published dataset;
previousGeneratedAt names that dataset.
Each row also carries diagnostics outside the score: new subscribers and recommenders in the last ninety days, median subscriber tenure, endorsement breadth, subscriber–recommender overlap, outbound and ecosystem link density, source mix, citation impact (PageRank), citation evenness, reciprocal share, recent citing sources, citation months, citation persistence, and posting acceleration. These are reported and are not canonical factors. The debug button on a row shows the raw counts, diagnostics, and factor percentiles. Bluesky engagement is not collected in this release.
Author profiles — display name, handle, and avatar — are fetched for attribution on each publication row. No author-level score, rank, or label is computed. A separate author-stats labeler will follow; it is not part of this score.
The scored cohort is English-only for now because the readability formulas, syllable heuristic, tokenizer, and Zipf list are English-specific. Publications in other languages are indexed and shown in the filter counts, not scored. This is a tooling limit, not a judgment. The rule is stated on the page and in the filter dialog.
Copies of one post, with the same opening and the same exact title, count once in every metric, so a republished post is not repetition.
Spam signals look for repetition, not for a topic. A publication is kept out of the rankings when at least half its documents share an opening, at least half its titles reduce to one pattern, or it publishes at least twenty documents a day with a median under a hundred words. A publication network is excluded when one owner has at least twenty publications, or five thousand documents across two publications with posts, or five million words across ten such publications. "Mostly empty" and "bulk volume" only lower a score. These are filters, not author scores.
An operator-maintained blocklist in scripts/panoptiblog/blocklist.json
excludes confirmed publications by DID. It runs before ranking and appears as
the blocklist spam reason. A new publication record from the same account
does not re-enter the ranking.
An operator-maintained bulk allowlist in
scripts/panoptiblog/bulk-allowlist.json exempts vetted publishers from the
publication-network rule only. Their publications still face the spam signals
and the minimum-word rule, so each one ranks or not on its own.
--bulk-allowlist FILE reads a different file.
A publication needs at least one thousand words to rank: a linkblog or an
empty shell is counted but not listed. Consistency is discounted until five
dated posts establish a history, so two posts cannot read as a sustained
cadence. A publication that sets
preferences.showInDiscover=false opts out of scoring: it is indexed and
shown in the filter counts, but it receives no score, rank, or percentile
label. --include-undiscoverable is a diagnostic override, not part of the
published run.
Documents carry prose in textContent or, for tools that predate it, in a
platform content union. The indexer reads the plaintext, text and content
keys of that union, so a Leaflet or pckt post counts its body rather than zero.
Out-links come from raw URLs, markdown links, HTML anchors, content link
facets, the document’s links field, and structured embeds or at:// references
inside the body. An image embed is not an out-link unless a link wraps it.
Links to another ranked publication or an atproto resource count as ecosystem
links; embedded posts are counted separately.
Self subscriptions and self recommends are not counted. The check is exact-DID; a second account is invisible.
Scoring core and ports #
The durable rules are in panoptiblog-invariants.md.
scripts/panoptiblog/scoring.mjs is the pure scoring core. It has no imports:
text metrics, analyzeDocument, factorValues, SCORE_TREE,
percentileRanks, and treeScore. The indexer imports it directly;
metrics.mjs keeps the cohort and publication-level model and re-exports the
core.
node scripts/panoptiblog/emit-score-tree.mjs writes
scripts/panoptiblog/score-tree.json from SCORE_TREE. The scoring test fails
if the file and tree differ. The JSON lists composite and factor ids, weights, scales, display caps, and the
bound used by the single-entity entry point.
scoreEntity(recordOrRecords, options) scores one document or a thread with no
cohort. It returns raw factor values, bounded 0–1 values, tree weights, and
cohort: { percentiles: null, score: null }. Subscribers and recommenders are 0
because no subscription graph is supplied; their bounded values are null.
Recency is absolute against now. Audience inflow has no single-entity
value without the graph. Factors without an absolute upper bound
(subscribers, recommenders, words, vocabulary, sources) have null bounded values.
Corpus-wide uniqueness and per-article contribution breakdowns are diagnostics,
not canonical composites.
The parity fixture is scripts/panoptiblog/fixtures/document-parity.json;
scoring.test.mjs checks every checked-in value.
Reading time and the ecosystem #
Reading time is words divided by 200. Each post and publication carries minutes and hours; the leaderboard shows the publication total.
totals.ecosystem is the corpus view, separate from a publication score:
hours published in the last 24 hours, 7-day and 30-day averages per day, total
hours, posts per day, active publications, new publications, the median
readability and lexical metrics, and link density.
By default the whole corpus is compared to its top 100 ranked publications.
--baseline replaces that with another corpus: {name, periodDays, documents:[{text,title?,publishedAt?}]} computes the same text metrics, and
{name, metrics} takes precomputed values. The dataset carries a comparison
and a 0-100 health index. No Substack corpus is shipped; supply one with
--baseline.
Reading the page #
Publications render as leaderboard rows: rank, publication identity, author attribution, six composite percentile cards, and one larger overall percentile. An arrow beside a name is movement in the published ranking since the previous run. With custom weights active, the rank cell also shows the published rank beneath the experimental one. Links in this view do not use the site-wide red underline.
The weights button opens a non-modal editor built from method.tree. On wide
screens it takes the ecosystem rail, so the list keeps its column; narrower
screens get a top sheet over the list. The six composite sliders share 100%;
moving one reallocates the rest in proportion. Selecting a composite shows its
factor sliders, which share 100% within that composite. The list stays
scrollable, so a weight change and its effect on the ranking can be read
together. Moving a weight recomputes the percentiles in this browser against
the full ranked cohort, re-ranks the top 100 shown, and stores the experiment
in localStorage; reset restores the published weights. The payload carries a
compact cohort array of factor vectors and warning counts for every ranked
publication, so these experiments are not renormalised against the visible top
100.
The “what’s included?” dialog shows the disjoint publication universe:
included, no posts, below minimum words, undiscoverable, not English, spam
(with reasons), and other. totals.universe is the source of truth for these
counts. The older emptyPublications, spamExcludedPublications,
undiscoverablePublications and belowMinimumWordsPublications fields mirror
its branches rather than tallying overlaps. totals.crawl gives the repository
side of the same funnel: repositories, read, skipped, failed, and truncated.
The dialog also shows loose or orphan documents. A publication that sets
preferences.showInDiscover=false opts out; it is not scored. Zero subscribers
is not an exclusion; it scores zero on the subscriber factor. Positive counts
are ranked against other positive publications.
scripts/panoptiblog/ui-smoke.mjs loads the built page in headless Chrome at
390px and 1000px and checks the leaderboard and details dialog layout. Build
first; --data FILE serves another dataset in place of the built one. It
prints SKIP and exits 0 without Chrome (set CHROME) or a build.
npm --prefix web run build
node scripts/panoptiblog/ui-smoke.mjs
Lookup data #
--lookup-out writes panoptiblog/lookup.json, a compact index for the
public lookup page. It carries generatedAt, previousGeneratedAt, the
publication and ranked totals, the crawl totals, and one row per publication —
ranked or excluded. Each row has rank, score and percentile for included
publications and null for the rest, plus previousRank, the exclusion label,
the exclusion reasons (spam and blocklist included), and the basic counts.
Ranked rows also carry path, the stable share page address; excluded rows
have path: null. The file is not trimmed to the top 100. --lookup-upload
sends it to s3://<bucket>/panoptiblog/lookup.json. --from cannot write one
because a trimmed dataset has no excluded rows.
Share pages #
Every ranked publication, including those outside the top 100, has a stable
page at /b/<key>, a card at /b/<key>.png and a badge at
/b/<key>-badge.svg. <key> is the publication at-uri in base64url, so the
address survives renames and re-ranks. The page carries canonical and unfurl
metadata and opens with a large panoptiblog brand and a compact publication
badge: its icon, name, author attribution, description and website, using the
publication's stored theme colors, corrected so text stays readable. It links
to the website when its URL is http or https. Below the badge, a rank and score
panel sits beside the six composites. The panel shows rank with its movement
from the previous run, the overall score, and one milestone. Top 100 is a gold
pill and takes precedence; below the top 100 a percentile tier replaces it in
red or silver. The composites are small
cards with the same line icons and red ten-segment bars as the leaderboard. No
other publication is named or compared against. A muted line at the foot gives
the crawl date. Outside the badge, the page and card use panoptiblog's own
colors.
The card follows the same grid. A header carries the panoptiblog brand and
address. Below it, the identity badge sits over the rank and score panel on the
left, and the composite cards fill the right. The badge spans one composite row
and leaves out the description. The task fetches the publication icon and author
avatar and converts them to PNG with sharp; failures fall back to initials.
Page and card use the composite raw values the leaderboard bars use, and both
are rendered from the in-memory ranked rows.
The badge is a static 360x96 SVG with the publication icon, name, rank and score. The page shows it with an HTML snippet that links back to the page, for the publication to copy onto its own site.
The scheduled job writes all three objects for every ranked publication after
the dataset uploads, plus a per-publication theme stylesheet, the shared
stylesheet at /b/blog.css, and a small /b/blog.js for image fallbacks and
copying the badge snippet. Objects are replaced in place while a publication
stays ranked and are left alone when it leaves, so a shared or embedded URL
keeps working. Failures are logged per publication and do not stop the run.
CloudFront serves /b/* from the data origin with the site security headers,
so the page uses external CSS and a self-hosted script but no inline script or
style.
Signing in #
A reader can sign in and subscribe to ranked publications from their rows.
The page is a public OAuth client with no secret. Its metadata is
web/public/panoptiblog-client-metadata.json, served at its own client_id
on the subdomain; the redirect URI is the subdomain root. The scope is
atproto repo:site.standard.graph.subscription?action=create&action=delete.
Listing records needs no scope.
Records have the extension's shape (publication at-uri and createdAt), so
each side sees the other's subscriptions. Unsubscribing deletes every record
for that publication, duplicates included. The header count covers the top 100
rows shown.
Logged out, the page loads no OAuth code. panoptiblog-account.js imports the
client chunk only on sign-in, on the redirect back, or when localStorage
holds panoptiblog.session from an earlier visit. The flow talks to the
reader's own PDS and authorization server, so the site CSP's connect-src
allows https:. Sign-in only completes on https://panoptiblog.substandard.blog/,
because that is the only redirect URI.
Quality models #
No pretrained “blog quality” model exists. The closest pretrained options:
- Automated essay scoring:
KevSun/IELTS_essay_scoringandJacobLinCool/IELTS_essay_scoring_safetensors(RoBERTa, MIT). Trained on IELTS essays, so out of distribution for blogs. - Readability:
agentlans/deberta-v3-base-readability-v2(DeBERTa-v3, Apache-2.0) andkiddom/modernbert-readability-grade-predictor(ModernBERT, MIT). Useful as a cross-check on the deterministic formulas. - Generated text:
desklib/ai-text-detector-v1.01(DeBERTa-v3-large, MIT, RAID) andonnx-community/tmr-ai-text-detector-ONNX. Treat as a spam signal, not a quality verdict; false positives are common on edited prose. - Writing-quality reward model:
ConicCat/Lamp-P-Writing-Quality-RM(Llama-3.2-3B, Llama licence). Research-grade and heavy.
The indexer calls no model. There is no placeholder model composite: a model scorer must be evaluated against human ratings and then added to an existing composite, with an audit entry and a version bump. The DeBERTa readability and detector models fit on a laptop GPU; CPU works for a sample but is slower. This environment reports no GPU, so the model pass is not part of the scheduled job.
Scheduled job #
scripts/panoptiblog/deploy.sh builds the image from
scripts/panoptiblog/Dockerfile, pushes it to ECR, and applies the ECS and
EventBridge resources in infra/main.tf. The rule runs once a day at 04:17
UTC.
The task runs the indexer with --incremental --top 100 --compact --upload --trending-days 5 --all-out /tmp/panoptiblog-all.json --all-upload --lookup-out /tmp/panoptiblog-lookup.json --lookup-upload. The task definition supplies
PANOPTIBLOG_BUCKET, PANOPTIBLOG_KEY for the site data,
PANOPTIBLOG_STATE_KEY for the record set, and PANOPTIBLOG_ALL_KEY for the
full corpus; the job writes s3://substandard.blog/panoptiblog/data.json for
the site and extension, all.json for full-data consumers, and lookup.json
for the lookup page.
The first --incremental run after a deploy finds no record set and does a
full walk, then writes one. Each later run applies Jetstream commits, re-reads
only the changed repositories plus canaries and earlier failures, and rewrites
the set. If the set is missing or unreadable, or Jetstream cannot replay from
its cursor, the run falls back to a full walk. An account's last status in the
replay wins: an inactive event removes its records, but an inactive event
followed by an active one, as in a PDS migration, re-reads the repository
instead. Failed repositories are retried next run; an incremental read keeps
their previous records. A full walk
rebuilds from successful reads, so a repository that fails during it may be
absent until the next retry. A full walk reconciles the set every two weeks.
The set carries the scoring method version; a new version forces a full walk
so older text measurements are not reused.
Every upload also writes a copy under panoptiblog/history/YYYY-MM-DD/,
named by the dataset's generatedAt date; the live root key is still the one
readers fetch. With --trending-days 5 the run reads the five prior dated
files and adds a trending block: the biggest upward rank jumps in the
current top 100, with the rank before and after the jump and the day it
landed. A truncated repository cannot trend. The same run renders
panoptiblog/og.png from the new dataset; a card failure logs and leaves the
dataset upload untouched. It then publishes
one /b/<key> page, /b/<key>.png card and /b/<key>-badge.svg badge per
ranked publication, and the shared /b/blog.css, after every dataset upload.
Pages, cards and badges for publications that left the ranking are deleted. The labeler flags
remain in the indexer for the author-stats labeler that will follow; they are
not part of this job.
CloudFront serves them from the bucket root, not from a release tree, so a
refresh does not need a site deploy.
The failure-rate gate runs before any dataset is written or uploaded, so a run
over --max-failure-rate leaves the published files untouched.
scripts/panoptiblog/deploy.sh --run starts one task immediately. The first
run requires scripts/deploy-site.sh to have been applied, because the site
infra owns the bucket and the release_sha variable.
The job uses the account's default VPC and needs outbound internet access. The
task role can read and write only the panoptiblog/ and b/ prefixes.
A transient repository read goes back on the work queue with exponential,
jittered backoff. The worker moves to another repository while it waits, so a
PDS stall does not hold a slot. Ordinary repositories get six attempts over ten
minutes; canaries get eight over fifteen, and are read first. Only a repository
that exhausts its budget keeps its previous records and is retried on the next
run. A permanent 400 or 404 is skipped instead. Rows kept that way carry
stale: true, and their share page and details views say the figures are from
an earlier crawl. A run refuses when more than 10% of ranked publications are
stale; --max-stale-share changes that limit. The HTTP layer also retries a
transient page, and a partial read is never merged. Reads to one PDS are capped
at four at a time and DID resolution at eight, and Retry-After is
honored when a host asks for a pause. Canaries are in the work list even when
discovery misses them and are re-read on every incremental run.
The indexer compares every crawled publication with
scripts/panoptiblog/canaries.json. More than two canaries missing, or below
their minDocs, refuses the run before upload; --allow-missing-canaries
downgrades that to a warning. A refusal names the repository error, when there
was one, that left the canary empty.
infra/main.tf sends failures to substandard@permadeath.com through an SNS
topic: a failed EventBridge invocation, the failure-rate gate, the canary gate,
an ECS task stopped with a non-zero exit, and a day with no upload. The email
subscription is pending until its owner clicks the confirmation link AWS
emails; Terraform cannot confirm it.
scripts/panoptiblog/check-freshness.mjs [file-or-url] exits non-zero when
generatedAt is more than 36 hours old. The page marks the same condition with
a stale badge.
scripts/panoptiblog/check-live.mjs checks the live site. Run it after every
deploy and from a daily check. It exits non-zero when:
- the live page loads different
/_astro/*.jsscripts than a local build, so the site deploy is older or newer than this checkout; panoptiblog/data.jsonis more than 36 hours old (--max-age-hours);- the dataset's
method.versionis notSCORE_VERSION, so the indexer image is behindscoring.mjs; - the top ranked publication's share page contains
handle.invalid.
It runs npm --prefix web run build first, which needs npm ci --prefix web
and writes only the ignored web/dist. Run it from the commit that should be
live. --no-build reuses an existing web/dist, and --dist <file> reads a
prebuilt page. --url points it at another site. --json prints one object
with each check. It exits 1 when a check fails and 2 on a bad option.
It complements check-freshness.mjs, which checks only a dataset's age and
also reads local files.
Hosting #
The page is at the root of panoptiblog.substandard.blog. The subdomain is an
alias on the same distribution; infra/viewer-request.js rewrites its root to
the built page, and every asset and the dataset keep their normal paths. The
old /panoptiblog path on substandard.blog redirects to the subdomain, and the
page's canonical URL is the subdomain root.
Deploying this release #
Deploy the indexer image first so the daily task cannot write the old schema:
scripts/panoptiblog/deploy.sh. Then run scripts/deploy-site.sh.
The site deploy upgrades panoptiblog/data.json at the bucket root when its
method version is older than the committed snapshot. If the root already has
the same version, it leaves the scheduled job's fresher copy alone. Running
scripts/panoptiblog/deploy.sh --run after both refreshes the root
immediately. Then run node scripts/panoptiblog/check-live.mjs.
Limits #
- A document with no readable prose in
textContentor a known content union counts as a post with zero words. - Words are prose tokens. Fenced code, HTML pre, script, and style blocks, Markdown and HTML tags, URLs, at:// references, image links, link definitions, and HTML comments are removed before counting; link text, Markdown image alt text, and footnote prose remain. Scripts that do not separate words with spaces are undercounted.
- Loose documents, whose
siteis an https URL rather than a publication record, are counted but not ranked. - A repository walk stops at 10,000 records. The count is reported as a
truncated repository, and its publication rows carry
truncated: true. The oldest posts are missing, so document and word counts are lower bounds and active months and cadence are left unset. - A repository whose account no longer resolves, or whose PDS answers 400, 404, 410 or 451, is skipped and counted separately from failures. The relay can name a repository a PDS no longer serves.
- Incremental runs read only repositories named by a Jetstream commit, an earlier failure, or a canary. A full walk reads every repository every two weeks to reconcile records the event log did not retain.
- The DID-to-PDS cache only saves the plc.directory lookup. It does not persist in the task container, so each run resolves the PDS hosts it needs.