testsAndMisc/docs/superpowers/contracts/app-icons-lyricanki-glyph-2026-08-21.json
Krzysztof kuhy Rudnicki 1d7271f023 Phase 2: enforce the 250-line cap and stop pushing red
Two pre-commit hooks and one pre-push extension, plus the _glyph_art split
that had to land first — the cap gate cannot be wired while any file is over
it, and the lyricanki note-ascender glyph had taken _glyph_art.py to 253.

file-length-cap runs check_file_length.sh --all repo-wide rather than on
staged files, so a file that grows past the cap in some other commit is still
caught. Proven to block, not assumed: with a deliberate 261-line file staged
the hook exits 1 and names it; with the file removed it passes.

ci-baseline-green is the user's option (a): refuse to build on a main that is
already red. It fails closed on a definitively failing baseline and warns-and-
passes on anything it cannot determine — offline, no gh, unauthenticated, no
settled runs — each call capped at 5s. Blocking every commit on network
reachability buys nothing when (b) is the real per-change guarantee.
CI_GREEN_SKIP=1 is the escape for a fix-forward commit. python-tests.yml is
excluded on purpose: it is path-filtered, so a shell-only commit never
triggers it and its "latest run" would produce false reds.

This hook already earned its place. Run against a red main earlier in this
session it refused with "Shell tests (failure)", which is how the broken
SETUP_SOURCES was found instead of being pushed over.

ci_mirror gains the shell-tests workflow's side-effect-free half — every
lib/tests/run_all.sh plus the workflow's own test list, the user's option (b).
That list is parsed out of shell-tests.yml rather than copied: a hardcoded
duplicate drifts the moment someone adds a test, and a mirror that quietly
checks less than CI is worse than no mirror because it reports safe. The
Arch-container half stays unmirrored — it wants root and an Arch userland.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3PzGc75gBcdxP3PkHXGcV
2026-08-21 16:41:31 +02:00

20 lines
2.4 KiB
JSON

{
"title": "note-ascender glyph and lyricanki registry entry for the icon family",
"objective": "Give ~/lyricanki an on-style launcher icon so it stops shipping the stock Flutter 'beach' icon, by extending the shared generator rather than hand-rolling a one-off. The glyph is a note whose stem drops past the head onto a flat baseline foot, so a single vertical stroke reads as both a music stem and a letterform ascender on a text line - the app turns songs into vocabulary. Success means lyricanki renders a family icon that is unambiguous at 48dp and clears the adaptive-icon safe box.",
"acceptance_criteria": [
"glyphs.get_glyph('note-ascender') resolves, and the registry holds 13 glyphs with every pre-existing one still importable.",
"apps.get_app('lyricanki') returns repo=~/lyricanki, accent=#B8862E (the shared family accent, not an app-specific colour), glyph=note-ascender, linux=False.",
"generate --app lyricanki --android emits six assets and rewrites the Android mipmaps with no safe-box warning, i.e. the glyph ink is within 560px on both axes.",
"The note-head's lowest point clears the baseline foot by at least MIN_NEGATIVE_SPACE (36px), computed as sqrt((rx*sin t)^2 + (ry*cos t)^2) below the ellipse centre rather than ry, so the head does not merge into the foot at launcher size.",
"python_pkg.app_icons keeps 100% line and branch coverage and passes ruff, mypy, pylint and bandit; every touched file stays under the 250-line cap.",
"The rendered icon is inspected at both 1024px and 48px and reads as a note on a baseline - not as a mailbox, which is what the first draft produced."
],
"out_of_scope": [
"The lyricanki repository's own generated assets and pubspec wiring - committed separately in ~/lyricanki.",
"Any change to the shared family constants in style.py (background, stroke weight, safe box, accent) - those govern every existing app's icon.",
"iOS, web, Windows and macOS icon targets; lyricanki is Android-only per decision Q6.",
"Re-rendering any other app's icons."
],
"verifier": "pre-commit run --files <staged>; python3 -m pytest python_pkg/app_icons --cov=python_pkg.app_icons --cov-report=term-missing (100% required); PYTHONPATH=~/testsAndMisc python3 -m python_pkg.app_icons generate --app lyricanki --android must print no safe-box warning; visual check of assets/icon/icon.png downscaled to 48px."
}