Skip to content

Add a hero card to all six READMEs - #12

Merged
aaddrick merged 2 commits into
mainfrom
readme-hero-card
Aug 4, 2026
Merged

Add a hero card to all six READMEs#12
aaddrick merged 2 commits into
mainfrom
readme-hero-card

Conversation

@aaddrick

@aaddrick aaddrick commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Two commits: the card, then the generator that draws it.

What changed

A 1280x640 card at .github/assets/hero.png, shown above the title in README.md and the five translations, and scripts/make_card.py, which draws it from five vendored fonts in assets/fonts/.

The image is the style's own argument, drawn as two air traffic control flight progress strips. The unstyled reply is one undivided box whose text overruns the strip and fades off the right edge. The Attention Control reply is a field grid, one datum per box: ACTION, EDIT, STATE, NEXT. The example is the one already in "What changes", so the card and the README cite the same edit at src/auth.ts:47.

The header carries both tagline lines, including "Written for a reader with ADHD."

Alt text is translated in each of the five other READMEs, so a screen reader user does not hit an English string in a Korean file.

Why

A link to this repository unfurled as GitHub's generated card, which is what a reader saw on LinkedIn, Slack, and Discord before they saw a line of the style.

The unfurl is already fixed, and this PR is not what fixed it

GitHub takes og:image from the repository's social preview setting, not from README content, and exposes no REST endpoint for that upload. The same file was uploaded by hand at Settings, General, Social preview. Verified live:

before  og:image  https://opengraph.githubassets.com/6801222b.../aaddrick/attention-control
after   og:image  https://repository-images.githubusercontent.com/github-production-repository-image-32fea6/1320242957/...

Merging this PR does not change the unfurl, and reverting it would not change it back. CLAUDE.md now says so, so the next person to redraw the card knows there is a second step.

The generator is reproducible

A fresh render from the vendored fonts is byte-identical to the committed PNG:

8499f73a93e7aedba728e2b570d9124cda0acb0f6feb9afe83b1f340826bde40  .github/assets/hero.png

The fonts are vendored rather than downloaded. The script previously read them from google/fonts@main, and that branch moves, so the same script would draw a different card next month. 576 KB for the three Saira Condensed weights and two IBM Plex Mono weights the script actually opens. Both families are OFL, both license texts sit beside them, and NOTICE.md credits both with versions read from the font name tables.

No gate runs the generator

Pillow and NumPy are not test dependencies and CI installs neither. A checksum gate comparing a fresh render against the committed PNG would fail on a Pillow upgrade that changed encoding without changing a pixel. The card is a file you redraw and commit yourself, and CLAUDE.md states that alongside the two facts about it that no test can hold.

Gates

All four pass. tests/test_readmes.py is unaffected: it compares code fences, inline spans, and numbered rules, and a centered img tag is none of those. AGENTS.md is the regenerated mirror of CLAUDE.md.

All 5 generated files match their sources.
All 8 shipped config files parse.
Evaluation cases are valid.
Ran 75 tests in 0.016s -- OK

A link to this repository unfurls as GitHub's generated card: the owner
avatar, the repository name, and the description, in the same layout as
every other repository. The card is what a reader sees on LinkedIn, Slack,
and Discord before they see a single line of the style.

The image is the style's own argument, drawn as two air traffic control
flight progress strips. The unstyled reply is one undivided box; its text
overruns the strip and fades off the right edge. The Attention Control
reply is a field grid, one datum per box: ACTION, EDIT, STATE, NEXT. The
example is the one already in "What changes", so the card and the README
cite the same edit at src/auth.ts:47.

The header carries both tagline lines, including "Written for a reader
with ADHD." A card that names the discipline but not the reader it was
written for describes the wrong half of the project.

Alt text is translated in each of the five other READMEs, so a reader
using a screen reader does not hit an English string in a Korean file.

This commit does not change the unfurl. GitHub takes og:image from the
repository's social preview setting, not from README content, and there
is no REST endpoint for that upload:

  og:image  https://opengraph.githubassets.com/6801222b.../aaddrick/attention-control

The same file has to be uploaded by hand at Settings > General > Social
preview. It is 1280x640 and 372 KB, inside the 1 MB limit.

The generator is not committed. It needs Saira Condensed and IBM Plex
Mono, so vendoring it means vendoring six font files or adding a download
step to the build.

Four gates pass. tests/test_readmes.py is unaffected: it compares code
fences, inline spans, and numbered rules, and a centered img tag is none
of those.
PR #12 shipped .github/assets/hero.png with no way to redraw it. A change to
the header text, the example, or the harness list meant redrawing the card by
hand in an image editor, or reconstructing the script from nothing.

scripts/make_card.py draws the committed file. Verified: a fresh render from
the vendored fonts is byte-identical to the PNG already on this branch.

  8499f73a93e7aedba728e2b570d9124cda0acb0f6feb9afe83b1f340826bde40

The fonts are vendored, not downloaded. The build previously read them from
google/fonts@main, and that branch moves, so the same script would draw a
different card next month. assets/fonts/ holds the three Saira Condensed
weights and the two IBM Plex Mono weights the script actually opens, 576 KB.
Both families are OFL and both license texts sit beside them. NOTICE.md
credits both, with versions read from the font name tables: Saira Condensed
0.072, IBM Plex Mono 2.3.

No gate runs this script. Pillow and NumPy are not test dependencies, and CI
installs neither. A checksum gate comparing a fresh render against the
committed PNG would fail on a Pillow upgrade that changed encoding without
changing a pixel, so the card stays a file you redraw and commit yourself.
CLAUDE.md says so, next to the two facts about the card that no test holds:
it cites the same src/auth.ts:47 the README cites, and the social preview
upload is manual.

Four gates pass. AGENTS.md is the regenerated mirror.
@aaddrick
aaddrick merged commit 3c8a2a8 into main Aug 4, 2026
3 checks passed
@aaddrick
aaddrick deleted the readme-hero-card branch August 4, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant