F-Keys\Tools\legible _◻✕
← Back Forward → ↑ Up Home Find Status Log
Address 📁 F-Keys\Tools\legible

legible

Three build gates for defects a linter has no opinion about, because none of them is a syntax error. Type too small to read, color that cannot be read on its own background, and a name that should be gone.

pip install legible · MIT · three commands, four GitHub Actions

What it does

Three build gates for defects a linter has no opinion about, because none of them is a syntax error. Each one exists because a person read something and could not.

pip install legible
typefloor ./src                  type below a readable floor
contrast-gate ./src              color that cannot be read on its surface
deadname-gate ./src              a name that should be gone

The rename gate is the unusual one

It fails a build when a retired name reaches a title, a footer, a byline, alt text or a comment — while leaving machine identifiers alone, because renaming a repository path or a published artifact breaks working links or contradicts a deposited record. Both halves matter. A gate that cannot tell those apart gets switched off within a week.

Written for a company rename. It is the same shape as the problem of a person changing their name and finding it in three hundred places, which is the harder version and the one worth getting right.

It will not tell you it passed when it did not

All three once reported OK on a directory they had never opened, because a bare path argument was ignored and each scanned itself instead. deadname-gate exits 2 rather than 0 when nothing is configured, and contrast-gate --require-pairs fails rather than passing a stylesheet that declares no colors at all.

How it works

  1. Install it, or add the Actionpip install legible locally, or drop one of the four Actions into a workflow.
  2. Point it at a directorytypefloor ./src, contrast-gate ./src, deadname-gate ./src. Exceptions live in a JSON file rather than suppressed inline, so what you allowed is one list you can read.
  3. Let it fail the buildThat is the point. A warning nobody reads is the same as no check at all.

The three gates

typefloorFails when type is declared below a readable floor. A linter has no view on 9px body text; a person does.
contrast-gateFails when a declared color cannot be read on a surface the same file declares. --require-pairs also fails a file that declares no pairs at all, because a vacuous pass looks exactly like a real one.
deadname-gateFails when a retired name reaches a title, a footer, a byline, alt text or a comment, and leaves machine identifiers alone, because renaming a published artifact breaks links or contradicts a deposited record.
It exits 2, not 0, unconfiguredAn unconfigured gate must not be mistakable for a passing one.
Four GitHub Actionstypefloor, contrast-gate, deadname-gate and cvd-palette, each usable on its own.
Written for a real renameThe rename gate came out of a company rename. It is the same shape as a person changing their name and finding it in three hundred places, which is the version worth getting right.

Specifications

Installpip install legible
LicenseMIT
Commandstypefloor, contrast-gate, deadname-gate
Actionstypefloor, contrast-gate, deadname-gate, cvd-palette
Sourcevince-gonzalez/f-keys

Questions

Why not just use a linter?
A linter checks syntax. None of these three are syntax errors — they are things a person could not read, which no parser has an opinion about.
Will it fight my existing style rules?
No. It only asserts the three things above, and every exception is recorded in a file rather than scattered through the source.
Do I have to use all three?
No. They are separate commands and separate Actions.
1 item Log  ·  Status F-Keys