Repository navigation
Scope activation by host, add opt-in extended glyphs, measure font coverage - #20
Merged
Merged
Conversation
Closes #18. The frontmatter triggered on content alone: "whenever a response needs mathematical notation". The body already said "in a terminal coding agent", but the description is the only text a host matches against, so the skill fired on surfaces that render math natively and lowered fidelity there. The description now carries the surface predicate and an explicit exclusion, and a new block in "When this skill applies" spells both sides out. Checked against Codex source before choosing this lever: policy.allow_implicit_invocation in agents/openai.yaml is global, skills load from the same $HOME/.agents/skills root on CLI and desktop, and no documented field scopes a skill to a surface. Shipping allow_implicit_invocation: false would have disabled implicit use in Codex CLI, the primary case, to fix a second surface. README documents the per-user levers instead, including the [[skills.config]] name selector. Closes #19. Adds references/extended-glyphs.md, an opt-in set covering the Greek sub- and superscripts plus the rarer Latin capitals, with measured coverage per glyph. Scoped to single-character scripts: Rule 5 keeps bracketed big-operator bounds, so the mixed forms it exists to prevent cannot come back, and Rule 13 still bars the Mathematical Alphanumeric Symbols block. The reporter had already conceded both points. The gap list was wrong in three places, and #19 surfaced the first two. Superscript theta exists as U+1DBF and renders in four of twelve measured fonts, the same tier as the Latin blocks, so it joins the portable set instead of falling back to x^theta. Subscript rho exists as U+1D68; the recommendation to write I_rho stands, but the stated reason was wrong, since the gap is font coverage rather than Unicode. Superscript S shipped in Unicode 17.0 as U+A7F1, so "no glyph exists ... S X Y Z" went stale in September 2025. The list now separates "no code point exists" from "a code point exists but no font ships it", and states subscript capitals as 0/26, which it never mentioned at all. Measure instead of assume. scripts/measure-font-coverage.mjs reads the cmap table of twelve monospace fonts with no dependencies, six of the most widely installed programming fonts and six system fonts, and writes test/fixtures/font-coverage.json. Its output was cross-checked against fontTools on all 295 glyphs with zero mismatches. Every coverage number in SKILL.md, README.md and the extended reference is asserted against that fixture, so a typed number now fails the build. What the measurement found: 25 glyphs the cheatsheet advertised render in at most one of the twelve fonts, including the contour integral in Rule 5 and in the golden corpus, and both members of Rule 13's own exception. Those move to a new "Glyphs to avoid" section with substitutes that measure better, and the Cauchy formula now uses the bracketed selector the rest of Rule 5 already uses. Rule 13's exception keeps the Letterlike Symbols number sets, which fonts do carry, and drops the two Mathematical Alphanumeric members it had carved out. Also fixes docs/index.md, which linked openai/codex#15865 as a "still-open gap" though it is closed as a duplicate, and claimed Unicode "renders in every terminal" while Ubuntu's own default font carries none of the letter scripts. Both are the exact claims the suite already guarded, in the one public file neither guard read; the corpora are widened so the guards cover it now. Every new guard was mutation-tested to confirm it fails when its claim is removed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDfNddyYD8XqS4kMZGzxnu
Mutation testing found both. A glyph like double-struck F measures 1/12, so the "renders in at least one font" check passed even with it back in the number-sets row; the avoid list is the actual decision, so assert that nothing on it is recommended anywhere else. And a tier range could be tidied by dropping its weakest member, since the test recomputed min and max over whatever glyphs the row happened to list; the tier table must now account for every glyph the cheatsheet's script rows offer, which also added rows for superscript i and n, superscript theta, and the sign and paren scripts. The tier-row pattern also required a lowercase label, so it silently skipped the Greek letters row and never checked those numbers at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDfNddyYD8XqS4kMZGzxnu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #18. Closes #19.
#18: activation scoped to surfaces that cannot render LaTeX
The frontmatter triggered on content alone. The body already said "in a terminal
coding agent", but the description is the only text a host matches against, so
the skill fired on surfaces that render math natively and lowered fidelity there.
The description now carries the surface predicate plus an explicit exclusion, and
"When this skill applies" spells out both sides.
I checked the Codex source before picking this lever rather than the one the
issue suggested:
policy.allow_implicit_invocationinagents/openai.yamlis global. Shippingit as
falsewould disable implicit use in Codex CLI, the primary case, to fixa second surface.
codex-rs/core-skills/src/loader.rsloads CLI and desktop from the same$HOME/.agents/skillsroot, so there is no install-location split either.So the description is the only lever that helps everyone, and the README now
documents the per-user ones: the
[[skills.config]]nameselector in~/.codex/config.toml, and theopenai.yamlpolicy override.#19: opt-in extended glyph coverage
skills/math-unicode/references/extended-glyphs.mdcovers the Greek sub- andsuperscripts and the rarer Latin capitals, with measured coverage per glyph.
Scoped to single-character scripts: Rule 5 keeps bracketed big-operator bounds
and Rule 13 still bars the Mathematical Alphanumeric block, both of which the
reporter had already conceded.
The gap list was wrong in three places
Two of them #19 surfaced directly.
ν μ ρ θ σᶿU+1DBF exists and renders in 4/12 measured fonts, so θ joins the portable set.ᵨU+1D68 exists too;I_ρstill stands, but the gap is font coverage, not UnicodeU+A7F1 shipped in Unicode 17.0, September 2025. Stale for SThe list now separates "no code point exists" from "a code point exists but no
font ships it".
Measure instead of assume
scripts/measure-font-coverage.mjsreads thecmaptable of twelve monospacefonts with no dependencies: JetBrains Mono, Fira Code, Cascadia Code, Hack,
Source Code Pro, IBM Plex Mono, DejaVu Sans Mono, Liberation Mono, Ubuntu Mono,
Ubuntu Sans Mono, Noto Mono, Cousine. Output cross-checked against fontTools on
all 295 glyphs, zero mismatches. Every published coverage number is asserted
against the fixture, so a typed number fails the build.
What it found:
including
∮in Rule 5 and in the golden corpus, and both members of Rule 13'sown exception (
𝔼and𝔽at 1/12, the worst in the file). They move to a newGlyphs to avoid section with substitutes that measure better.
and IBM Plex Mono carry 0/17 subscripts and 0/19 capital superscripts, so
xᵢand
xᵀarrive through fontconfig fallback there. Documented, not changed:narrowing Rules 3 and 4 is a product call, not a bug fix.
scripts and none of the number sets. Only the digits survive.
docs/index.md
One sentence linked
openai/codex#15865as a "still-open gap" though it isclosed as a duplicate, and claimed Unicode "renders in every terminal". Both are
claims the suite already guarded, in the one public file neither guard read. The
corpora are widened.
Verification
restore, all caught. Two earlier holes that mutation testing exposed are fixed
in the second commit: a 1/12 glyph could return to the cheatsheet, and a tier
range could be tidied by dropping its weakest member.
Not in this PR
xᵢandxᵀ. The measurement argues for revisitingthat; it is a separate decision.
CLAUDE.local.md. A punctuation sweepwould bury this diff.
AGENTS.mdandCLAUDE.mdare untracked and not in.git/info/exclude, whileCLAUDE.local.mdrefers to "this repo's committedAGENTS.md".