From d9ced918c5d75c48c74a9784cda8748343e10884 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Thu, 22 Oct 2026 18:05:33 -0700 Subject: [PATCH 1/4] Admit a Fixed Set of Emoji Callout Markers in the Prose Gate Add a tier 4 of six emoji markers, each alone or followed by VARIATION SELECTOR-16. Every other emoji and a stray selector still flag. Co-Authored-By: Claude Sonnet 5.5 --- .agents/skills/comment-and-doc-style/SKILL.md | 10 ++++- .../.source-digests/comment-and-doc-style | 2 +- .../skills/comment-and-doc-style/SKILL.md | 10 ++++- .github/actions/prose-gate/prose_lint.py | 13 ++++++- .github/skills/comment-and-doc-style/SKILL.md | 10 ++++- scripts/README.md | 2 +- tests/test_prose_lint.py | 39 +++++++++++++++++++ 7 files changed, 77 insertions(+), 9 deletions(-) diff --git a/.agents/skills/comment-and-doc-style/SKILL.md b/.agents/skills/comment-and-doc-style/SKILL.md index 3dab41740..c0c59496e 100644 --- a/.agents/skills/comment-and-doc-style/SKILL.md +++ b/.agents/skills/comment-and-doc-style/SKILL.md @@ -317,9 +317,15 @@ silent pass, a letter of a recorded name excepted per the bullet below. - **Tier 3, always legitimate.** Scientific and unit symbols whose ASCII form would be a lie: micro (U+00B5), degree (U+00B0), ohm (U+2126), pi (U+03C0), superscript two and three (U+00B2, U+00B3), section (U+00A7). Keep the symbol, never approximate it away or spell it out. +- **Tier 4, emoji callout markers.** Six, each admitted alone or followed by VARIATION SELECTOR-16 + (U+FE0F): warning (U+26A0), information (U+2139), check mark (U+2705), cross mark (U+274C), memo + as the note marker (U+1F4DD), and light bulb (U+1F4A1). The gate keeps reporting every other + emoji, and a U+FE0F not directly after one of the six. A downstream repository needs no markup + to carry one. - **Unicode a developer deliberately typed** stays regardless of tier, such as emoji used for - emphasis or as callout markers. Never strip a developer's own characters, this is developer - authored text and not a license for the agent to add its own. + emphasis. Never strip a developer's own characters, this is developer authored text and not a + license for the agent to add its own. The gate admits only the tier-4 markers, so another + developer-typed emoji is classified here before it passes. - **A letter in a recorded name keeps its actual spelling.** A person's or a place's name that a document records as data is written with its own letters and the marks they carry, since folding one to ASCII records a different name. Anywhere else a letter the agent writes that no diff --git a/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style b/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style index 41710e01e..7e6d44e7b 100644 --- a/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style +++ b/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style @@ -1 +1 @@ -d6793f184056ef85 +50fe2b9f35bc2751 diff --git a/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md b/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md index 3dab41740..c0c59496e 100644 --- a/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md +++ b/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md @@ -317,9 +317,15 @@ silent pass, a letter of a recorded name excepted per the bullet below. - **Tier 3, always legitimate.** Scientific and unit symbols whose ASCII form would be a lie: micro (U+00B5), degree (U+00B0), ohm (U+2126), pi (U+03C0), superscript two and three (U+00B2, U+00B3), section (U+00A7). Keep the symbol, never approximate it away or spell it out. +- **Tier 4, emoji callout markers.** Six, each admitted alone or followed by VARIATION SELECTOR-16 + (U+FE0F): warning (U+26A0), information (U+2139), check mark (U+2705), cross mark (U+274C), memo + as the note marker (U+1F4DD), and light bulb (U+1F4A1). The gate keeps reporting every other + emoji, and a U+FE0F not directly after one of the six. A downstream repository needs no markup + to carry one. - **Unicode a developer deliberately typed** stays regardless of tier, such as emoji used for - emphasis or as callout markers. Never strip a developer's own characters, this is developer - authored text and not a license for the agent to add its own. + emphasis. Never strip a developer's own characters, this is developer authored text and not a + license for the agent to add its own. The gate admits only the tier-4 markers, so another + developer-typed emoji is classified here before it passes. - **A letter in a recorded name keeps its actual spelling.** A person's or a place's name that a document records as data is written with its own letters and the marks they carry, since folding one to ASCII records a different name. Anywhere else a letter the agent writes that no diff --git a/.github/actions/prose-gate/prose_lint.py b/.github/actions/prose-gate/prose_lint.py index 06aadb520..bf813f913 100755 --- a/.github/actions/prose-gate/prose_lint.py +++ b/.github/actions/prose-gate/prose_lint.py @@ -3,7 +3,7 @@ markdownlint, cspell, actionlint, and editorconfig-checker all pass on prose that breaks these rules, so nothing enforced them before this script. Rules implemented: - charset Non-ASCII judged against the three tiers the charset rule defines. + charset Non-ASCII judged against the tiers the charset rule defines, tier 4 being six emoji markers. charset-unknown Non-ASCII in no tier, bar a Latin letter and its U+0300-U+036F diacritics. semicolon No semicolon in prose, outside a series or labeled pair carrying a comma. dash No spaced hyphen joining or interrupting a sentence. @@ -1087,6 +1087,12 @@ def discover( } ) +# Tier 4 is six emoji callout markers, each admitted alone or before VARIATION SELECTOR-16. +# They are warning, information, check mark, cross mark, memo (note), and light bulb. +# Every other emoji flags, and so does a selector not directly after one of these. +TIER4 = frozenset({"\u26a0", "\u2139", "\u2705", "\u274c", "\U0001f4dd", "\U0001f4a1"}) +VARIATION_SELECTOR_16 = "\ufe0f" + CHARSET_CLASSIFY = ( "classify it in ptr727/ProjectTemplate:" ' the comment-and-doc-style skill\'s "Character set" section' @@ -2065,10 +2071,15 @@ def charset_findings(lineno: int, line: str) -> list[tuple[int, str, str]]: """ out: list[tuple[int, str, str]] = [] carrier = False + marker = False for pos, ch in enumerate(line): + after_marker, marker = marker, ch in TIER4 if ch.isascii(): carrier = ch.isalpha() continue + if marker or (after_marker and ch == VARIATION_SELECTOR_16): + carrier = False + continue name = unicodedata.name(ch, f"U+{ord(ch):04X}") category = unicodedata.category(ch) if ( diff --git a/.github/skills/comment-and-doc-style/SKILL.md b/.github/skills/comment-and-doc-style/SKILL.md index 3dab41740..c0c59496e 100644 --- a/.github/skills/comment-and-doc-style/SKILL.md +++ b/.github/skills/comment-and-doc-style/SKILL.md @@ -317,9 +317,15 @@ silent pass, a letter of a recorded name excepted per the bullet below. - **Tier 3, always legitimate.** Scientific and unit symbols whose ASCII form would be a lie: micro (U+00B5), degree (U+00B0), ohm (U+2126), pi (U+03C0), superscript two and three (U+00B2, U+00B3), section (U+00A7). Keep the symbol, never approximate it away or spell it out. +- **Tier 4, emoji callout markers.** Six, each admitted alone or followed by VARIATION SELECTOR-16 + (U+FE0F): warning (U+26A0), information (U+2139), check mark (U+2705), cross mark (U+274C), memo + as the note marker (U+1F4DD), and light bulb (U+1F4A1). The gate keeps reporting every other + emoji, and a U+FE0F not directly after one of the six. A downstream repository needs no markup + to carry one. - **Unicode a developer deliberately typed** stays regardless of tier, such as emoji used for - emphasis or as callout markers. Never strip a developer's own characters, this is developer - authored text and not a license for the agent to add its own. + emphasis. Never strip a developer's own characters, this is developer authored text and not a + license for the agent to add its own. The gate admits only the tier-4 markers, so another + developer-typed emoji is classified here before it passes. - **A letter in a recorded name keeps its actual spelling.** A person's or a place's name that a document records as data is written with its own letters and the marks they carry, since folding one to ASCII records a different name. Anywhere else a letter the agent writes that no diff --git a/scripts/README.md b/scripts/README.md index 70c33af11..1b9c5cd80 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -40,7 +40,7 @@ Every Docker command has a timeout. The output identifies target counts, phase b Enforces the [`GOVERNANCE.md`][governance] "Documentation Style Conventions" rules that no linter checks: non-ASCII judged against the charset rule's three tiers, a semicolon in prose, a spaced hyphen joining or interrupting a sentence, a duplicated consecutive word, a British spelling, and the shape of a comment's prose. It carries one rule from elsewhere in that document, `home-path`, which comes from "Representative Data in Agent-Authored Text" and catches an absolute home path naming a real account. That rule closes the pattern-detectable sliver of its section and nothing beyond it, since the exposure the section exists for was name-shaped and no pattern finds a name. `OPERATIONS.md` is exempt because its runbooks carry the literal path an operator types. -The tiers decide by context rather than by a flat ban. Tier 1 carries no meaning its ASCII form loses and always flags. Tier 2 is an operator, kept next to a figure or another operator and replaced between words, so a threshold table reads as the range it is. Tier 3 is a unit or scientific symbol whose ASCII form would be a lie and never flags. Developer-typed characters such as emoji are preserved regardless of tier, and an un-tiered one other than a Latin letter or a U+0300-U+036F diacritic it carries is still reported as `charset-unknown` until it is classified. +The tiers decide by context rather than by a flat ban. Tier 1 carries no meaning its ASCII form loses and always flags. Tier 2 is an operator, kept next to a figure or another operator and replaced between words, so a threshold table reads as the range it is. Tier 3 is a unit or scientific symbol whose ASCII form would be a lie and never flags. Tier 4 is a fixed set of six emoji callout markers (warning, information, check mark, cross mark, memo, light bulb), each admitted alone or followed by VARIATION SELECTOR-16, and a U+FE0F anywhere else still flags. Developer-typed characters such as other emoji are preserved by the rule but not admitted by the gate, and an un-tiered one other than a Latin letter or a U+0300-U+036F diacritic it carries is still reported as `charset-unknown` until it is classified. A character in no tier is a `charset-unknown` finding rather than a silent pass, since a gate that allows whatever it does not recognize stops gating as the character set grows. A Latin letter, with any diacritic from the U+0300-U+036F combining block that it carries, is the exception and never flags, since it may spell a recorded name, which the charset rule says keeps its actual spelling, and nothing tells a name from a word by its characters. A letter of another script, a compatibility form such as a ligature, any other mark, and a diacritic standing alone still flag, so the gate covers the Latin part of that rule and nothing wider. Classifying one is a fleet-law edit, so the whole-tree step that reports the backlog is warn-only, while the pull request gate blocks on one the change itself introduces. Which letters count as Latin follows the Unicode data of the Python running the gate, so a letter newer than that data is still reported. diff --git a/tests/test_prose_lint.py b/tests/test_prose_lint.py index 68c5d5f7e..38790e193 100755 --- a/tests/test_prose_lint.py +++ b/tests/test_prose_lint.py @@ -246,6 +246,45 @@ def test_a_latin_named_symbol_is_still_reported(self) -> None: self.kinds("a \u271d here\n", {"charset", "charset-unknown"}), ) + def test_a_callout_marker_is_admitted_alone_or_with_variation_selector_16(self) -> None: + """Tier 4 admits six emoji markers, each bare or followed by VARIATION SELECTOR-16.""" + rules = {"charset", "charset-unknown"} + self.assertEqual(6, len(prose_lint.TIER4)) + for ch in prose_lint.TIER4: + with self.subTest(codepoint=f"U+{ord(ch):04X}"): + self.assertEqual([], self.kinds(f"> {ch} **Note:** text\n", rules)) + self.assertEqual([], self.kinds(f"> {ch}\ufe0f **Note:** text\n", rules)) + + def test_the_reported_warning_pair_is_admitted(self) -> None: + """The pair that rendered as a finding in the original report now passes.""" + line = "> \u26a0\ufe0f **Warning:** Example callout.\n" + self.assertEqual([], self.kinds(line, {"charset", "charset-unknown"})) + + def test_a_non_callout_emoji_is_still_reported_even_with_variation_selector_16(self) -> None: + """Only the fixed set is admitted, so any other emoji flags, selector or not.""" + rules = {"charset", "charset-unknown"} + for ch in ("\U0001f680", "\u2764", "\u2728", "\u2603"): + with self.subTest(codepoint=f"U+{ord(ch):04X}"): + self.assertNotIn(ch, prose_lint.TIER4) + self.assertEqual(["charset-unknown"], self.kinds(f"a {ch} here\n", rules)) + self.assertEqual( + ["charset-unknown", "charset-unknown"], + self.kinds(f"a {ch}\ufe0f here\n", rules), + ) + + def test_a_stray_variation_selector_16_is_still_reported(self) -> None: + """The selector is admitted only directly after a marker, never alone or after a gap.""" + rules = {"charset", "charset-unknown"} + marker = chr(0x26A0) + for text in ( + "stray \ufe0f here", + f"{marker} \ufe0f here", + f"{marker}\ufe0f\ufe0f here", + "\ufe0f" + marker + " here", + ): + with self.subTest(text=text): + self.assertEqual(["charset-unknown"], self.kinds(f"{text}\n", rules)) + def test_a_mark_that_spells_no_name_is_still_reported(self) -> None: """A mark that is no diacritic, or that no Latin letter carries, is reported, not passed.""" rules = {"charset", "charset-unknown"} From d50bbae6cc1b8d7cff3f734a8e671fd2012b07dc Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Thu, 22 Oct 2026 18:08:35 -0700 Subject: [PATCH 2/4] Treat a Callout Marker as No Lowercase Sentence Start and Pin the Marker Set Co-Authored-By: Claude Sonnet 5.5 --- .agents/skills/comment-and-doc-style/SKILL.md | 10 +++++----- .../.source-digests/comment-and-doc-style | 2 +- .../skills/comment-and-doc-style/SKILL.md | 10 +++++----- .github/actions/prose-gate/prose_lint.py | 15 ++++++++++----- .github/skills/comment-and-doc-style/SKILL.md | 10 +++++----- scripts/README.md | 4 ++-- tests/test_prose_lint.py | 12 ++++++++++-- 7 files changed, 38 insertions(+), 25 deletions(-) diff --git a/.agents/skills/comment-and-doc-style/SKILL.md b/.agents/skills/comment-and-doc-style/SKILL.md index c0c59496e..9cfe3d3e8 100644 --- a/.agents/skills/comment-and-doc-style/SKILL.md +++ b/.agents/skills/comment-and-doc-style/SKILL.md @@ -317,15 +317,15 @@ silent pass, a letter of a recorded name excepted per the bullet below. - **Tier 3, always legitimate.** Scientific and unit symbols whose ASCII form would be a lie: micro (U+00B5), degree (U+00B0), ohm (U+2126), pi (U+03C0), superscript two and three (U+00B2, U+00B3), section (U+00A7). Keep the symbol, never approximate it away or spell it out. -- **Tier 4, emoji callout markers.** Six, each admitted alone or followed by VARIATION SELECTOR-16 +- **Tier 4, emoji callout markers.** Each is admitted alone or followed by VARIATION SELECTOR-16 (U+FE0F): warning (U+26A0), information (U+2139), check mark (U+2705), cross mark (U+274C), memo as the note marker (U+1F4DD), and light bulb (U+1F4A1). The gate keeps reporting every other - emoji, and a U+FE0F not directly after one of the six. A downstream repository needs no markup - to carry one. + emoji, and a U+FE0F not directly after a listed marker. A downstream repository needs no markup + to carry one, and an agent may write one only where it is mirroring a callout a developer typed. - **Unicode a developer deliberately typed** stays regardless of tier, such as emoji used for emphasis. Never strip a developer's own characters, this is developer authored text and not a - license for the agent to add its own. The gate admits only the tier-4 markers, so another - developer-typed emoji is classified here before it passes. + license for the agent to add its own. Among emoji the gate admits only the tier-4 markers, so + another developer-typed emoji is classified here before it passes. - **A letter in a recorded name keeps its actual spelling.** A person's or a place's name that a document records as data is written with its own letters and the marks they carry, since folding one to ASCII records a different name. Anywhere else a letter the agent writes that no diff --git a/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style b/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style index 7e6d44e7b..313c46d12 100644 --- a/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style +++ b/.claude-plugin/fleet-skills/.source-digests/comment-and-doc-style @@ -1 +1 @@ -50fe2b9f35bc2751 +ffd0a72a845531f3 diff --git a/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md b/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md index c0c59496e..9cfe3d3e8 100644 --- a/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md +++ b/.claude-plugin/fleet-skills/skills/comment-and-doc-style/SKILL.md @@ -317,15 +317,15 @@ silent pass, a letter of a recorded name excepted per the bullet below. - **Tier 3, always legitimate.** Scientific and unit symbols whose ASCII form would be a lie: micro (U+00B5), degree (U+00B0), ohm (U+2126), pi (U+03C0), superscript two and three (U+00B2, U+00B3), section (U+00A7). Keep the symbol, never approximate it away or spell it out. -- **Tier 4, emoji callout markers.** Six, each admitted alone or followed by VARIATION SELECTOR-16 +- **Tier 4, emoji callout markers.** Each is admitted alone or followed by VARIATION SELECTOR-16 (U+FE0F): warning (U+26A0), information (U+2139), check mark (U+2705), cross mark (U+274C), memo as the note marker (U+1F4DD), and light bulb (U+1F4A1). The gate keeps reporting every other - emoji, and a U+FE0F not directly after one of the six. A downstream repository needs no markup - to carry one. + emoji, and a U+FE0F not directly after a listed marker. A downstream repository needs no markup + to carry one, and an agent may write one only where it is mirroring a callout a developer typed. - **Unicode a developer deliberately typed** stays regardless of tier, such as emoji used for emphasis. Never strip a developer's own characters, this is developer authored text and not a - license for the agent to add its own. The gate admits only the tier-4 markers, so another - developer-typed emoji is classified here before it passes. + license for the agent to add its own. Among emoji the gate admits only the tier-4 markers, so + another developer-typed emoji is classified here before it passes. - **A letter in a recorded name keeps its actual spelling.** A person's or a place's name that a document records as data is written with its own letters and the marks they carry, since folding one to ASCII records a different name. Anywhere else a letter the agent writes that no diff --git a/.github/actions/prose-gate/prose_lint.py b/.github/actions/prose-gate/prose_lint.py index bf813f913..4be45b59f 100755 --- a/.github/actions/prose-gate/prose_lint.py +++ b/.github/actions/prose-gate/prose_lint.py @@ -3,7 +3,7 @@ markdownlint, cspell, actionlint, and editorconfig-checker all pass on prose that breaks these rules, so nothing enforced them before this script. Rules implemented: - charset Non-ASCII judged against the tiers the charset rule defines, tier 4 being six emoji markers. + charset Non-ASCII judged against the tiers the charset rule defines, tier 4 being emoji markers. charset-unknown Non-ASCII in no tier, bar a Latin letter and its U+0300-U+036F diacritics. semicolon No semicolon in prose, outside a series or labeled pair carrying a comma. dash No spaced hyphen joining or interrupting a sentence. @@ -1087,7 +1087,7 @@ def discover( } ) -# Tier 4 is six emoji callout markers, each admitted alone or before VARIATION SELECTOR-16. +# Tier 4 is a fixed set of emoji callout markers, each admitted alone or before VARIATION SELECTOR-16. # They are warning, information, check mark, cross mark, memo (note), and light bulb. # Every other emoji flags, and so does a selector not directly after one of these. TIER4 = frozenset({"\u26a0", "\u2139", "\u2705", "\u274c", "\U0001f4dd", "\U0001f4a1"}) @@ -2059,6 +2059,11 @@ def neighbor(step: int) -> str: ) +def starts_lowercase(text: str) -> bool: + """Whether the text opens with a lowercase letter, a tier-4 marker being no letter.""" + return text[:1].islower() and text[0] not in TIER4 + + def charset_findings(lineno: int, line: str) -> list[tuple[int, str, str]]: """Every non-ASCII character on the line, judged against its tier. @@ -2412,7 +2417,7 @@ def comment_wrap_findings(path: Path, raw: str, lines: list[str]) -> list[tuple[ and prev_body and not SENT_END.search(prev_body) and not SENT_END.search(prev_whole) - and body[:1].islower() + and starts_lowercase(body) ) if continuation: out.append( @@ -2426,7 +2431,7 @@ def comment_wrap_findings(path: Path, raw: str, lines: list[str]) -> list[tuple[ # A label opening a definition is exempt, since the lowercase word is the name being defined. elif ( leading - and body[:1].islower() + and starts_lowercase(body) and not COMMENT_LABEL.match(body) and not is_tool_directive(body) ): @@ -3259,7 +3264,7 @@ def check_file( p and not SENT_END.search(p) and not p.endswith((":", "-", "|")) - and stripped[0].islower() + and starts_lowercase(stripped) ): out.append( ( diff --git a/.github/skills/comment-and-doc-style/SKILL.md b/.github/skills/comment-and-doc-style/SKILL.md index c0c59496e..9cfe3d3e8 100644 --- a/.github/skills/comment-and-doc-style/SKILL.md +++ b/.github/skills/comment-and-doc-style/SKILL.md @@ -317,15 +317,15 @@ silent pass, a letter of a recorded name excepted per the bullet below. - **Tier 3, always legitimate.** Scientific and unit symbols whose ASCII form would be a lie: micro (U+00B5), degree (U+00B0), ohm (U+2126), pi (U+03C0), superscript two and three (U+00B2, U+00B3), section (U+00A7). Keep the symbol, never approximate it away or spell it out. -- **Tier 4, emoji callout markers.** Six, each admitted alone or followed by VARIATION SELECTOR-16 +- **Tier 4, emoji callout markers.** Each is admitted alone or followed by VARIATION SELECTOR-16 (U+FE0F): warning (U+26A0), information (U+2139), check mark (U+2705), cross mark (U+274C), memo as the note marker (U+1F4DD), and light bulb (U+1F4A1). The gate keeps reporting every other - emoji, and a U+FE0F not directly after one of the six. A downstream repository needs no markup - to carry one. + emoji, and a U+FE0F not directly after a listed marker. A downstream repository needs no markup + to carry one, and an agent may write one only where it is mirroring a callout a developer typed. - **Unicode a developer deliberately typed** stays regardless of tier, such as emoji used for emphasis. Never strip a developer's own characters, this is developer authored text and not a - license for the agent to add its own. The gate admits only the tier-4 markers, so another - developer-typed emoji is classified here before it passes. + license for the agent to add its own. Among emoji the gate admits only the tier-4 markers, so + another developer-typed emoji is classified here before it passes. - **A letter in a recorded name keeps its actual spelling.** A person's or a place's name that a document records as data is written with its own letters and the marks they carry, since folding one to ASCII records a different name. Anywhere else a letter the agent writes that no diff --git a/scripts/README.md b/scripts/README.md index 1b9c5cd80..4300b4726 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -38,9 +38,9 @@ Every Docker command has a timeout. The output identifies target counts, phase b ## `prose_lint.py` -Enforces the [`GOVERNANCE.md`][governance] "Documentation Style Conventions" rules that no linter checks: non-ASCII judged against the charset rule's three tiers, a semicolon in prose, a spaced hyphen joining or interrupting a sentence, a duplicated consecutive word, a British spelling, and the shape of a comment's prose. It carries one rule from elsewhere in that document, `home-path`, which comes from "Representative Data in Agent-Authored Text" and catches an absolute home path naming a real account. That rule closes the pattern-detectable sliver of its section and nothing beyond it, since the exposure the section exists for was name-shaped and no pattern finds a name. `OPERATIONS.md` is exempt because its runbooks carry the literal path an operator types. +Enforces the [`GOVERNANCE.md`][governance] "Documentation Style Conventions" rules that no linter checks: non-ASCII judged against the charset rule's tiers, a semicolon in prose, a spaced hyphen joining or interrupting a sentence, a duplicated consecutive word, a British spelling, and the shape of a comment's prose. It carries one rule from elsewhere in that document, `home-path`, which comes from "Representative Data in Agent-Authored Text" and catches an absolute home path naming a real account. That rule closes the pattern-detectable sliver of its section and nothing beyond it, since the exposure the section exists for was name-shaped and no pattern finds a name. `OPERATIONS.md` is exempt because its runbooks carry the literal path an operator types. -The tiers decide by context rather than by a flat ban. Tier 1 carries no meaning its ASCII form loses and always flags. Tier 2 is an operator, kept next to a figure or another operator and replaced between words, so a threshold table reads as the range it is. Tier 3 is a unit or scientific symbol whose ASCII form would be a lie and never flags. Tier 4 is a fixed set of six emoji callout markers (warning, information, check mark, cross mark, memo, light bulb), each admitted alone or followed by VARIATION SELECTOR-16, and a U+FE0F anywhere else still flags. Developer-typed characters such as other emoji are preserved by the rule but not admitted by the gate, and an un-tiered one other than a Latin letter or a U+0300-U+036F diacritic it carries is still reported as `charset-unknown` until it is classified. +The tiers decide by context rather than by a flat ban. Tier 1 carries no meaning its ASCII form loses and always flags. Tier 2 is an operator, kept next to a figure or another operator and replaced between words, so a threshold table reads as the range it is. Tier 3 is a unit or scientific symbol whose ASCII form would be a lie and never flags. Tier 4 is a fixed set of emoji callout markers (warning, information, check mark, cross mark, memo, light bulb), each admitted alone or followed by VARIATION SELECTOR-16, and a U+FE0F anywhere else still flags. Developer-typed characters such as other emoji are preserved by the rule but not admitted by the gate, and an un-tiered one other than a Latin letter or a U+0300-U+036F diacritic it carries is still reported as `charset-unknown` until it is classified. A character in no tier is a `charset-unknown` finding rather than a silent pass, since a gate that allows whatever it does not recognize stops gating as the character set grows. A Latin letter, with any diacritic from the U+0300-U+036F combining block that it carries, is the exception and never flags, since it may spell a recorded name, which the charset rule says keeps its actual spelling, and nothing tells a name from a word by its characters. A letter of another script, a compatibility form such as a ligature, any other mark, and a diacritic standing alone still flag, so the gate covers the Latin part of that rule and nothing wider. Classifying one is a fleet-law edit, so the whole-tree step that reports the backlog is warn-only, while the pull request gate blocks on one the change itself introduces. Which letters count as Latin follows the Unicode data of the Python running the gate, so a letter newer than that data is still reported. diff --git a/tests/test_prose_lint.py b/tests/test_prose_lint.py index 38790e193..f7fa37b1f 100755 --- a/tests/test_prose_lint.py +++ b/tests/test_prose_lint.py @@ -247,9 +247,10 @@ def test_a_latin_named_symbol_is_still_reported(self) -> None: ) def test_a_callout_marker_is_admitted_alone_or_with_variation_selector_16(self) -> None: - """Tier 4 admits six emoji markers, each bare or followed by VARIATION SELECTOR-16.""" + """Tier 4 admits the documented emoji markers, each bare or followed by VARIATION SELECTOR-16.""" rules = {"charset", "charset-unknown"} - self.assertEqual(6, len(prose_lint.TIER4)) + documented = {0x26A0, 0x2139, 0x2705, 0x274C, 0x1F4DD, 0x1F4A1} + self.assertEqual(documented, {ord(ch) for ch in prose_lint.TIER4}) for ch in prose_lint.TIER4: with self.subTest(codepoint=f"U+{ord(ch):04X}"): self.assertEqual([], self.kinds(f"> {ch} **Note:** text\n", rules)) @@ -272,6 +273,13 @@ def test_a_non_callout_emoji_is_still_reported_even_with_variation_selector_16(s self.kinds(f"a {ch}\ufe0f here\n", rules), ) + def test_a_marker_opening_a_comment_or_line_is_not_a_lowercase_letter(self) -> None: + """U+2139 is category Ll, yet a marker opening a comment is no lowercase sentence start.""" + info = chr(0x2139) + self.assertTrue(info.islower()) + self.assertFalse(prose_lint.starts_lowercase(f"{info}\ufe0f Run setup first.")) + self.assertTrue(prose_lint.starts_lowercase("run setup first.")) + def test_a_stray_variation_selector_16_is_still_reported(self) -> None: """The selector is admitted only directly after a marker, never alone or after a gap.""" rules = {"charset", "charset-unknown"} From 164fbcff2e337159d534eaaa37a18f5f2982d9f0 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Thu, 22 Oct 2026 18:18:05 -0700 Subject: [PATCH 3/4] Name Tier 4 in the Classification Hint and Couple It to the Skill Text Co-Authored-By: Claude Sonnet 5.5 --- .github/actions/prose-gate/prose_lint.py | 2 +- tests/test_prose_lint.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/actions/prose-gate/prose_lint.py b/.github/actions/prose-gate/prose_lint.py index 4be45b59f..af208af44 100755 --- a/.github/actions/prose-gate/prose_lint.py +++ b/.github/actions/prose-gate/prose_lint.py @@ -1096,7 +1096,7 @@ def discover( CHARSET_CLASSIFY = ( "classify it in ptr727/ProjectTemplate:" ' the comment-and-doc-style skill\'s "Character set" section' - " and prose_lint.py's TIER1, TIER2, or TIER3 table" + " and prose_lint.py's TIER1, TIER2, TIER3, or TIER4 table" ) COMBINING_DIACRITICS = frozenset(chr(c) for c in range(0x300, 0x370)) - { diff --git a/tests/test_prose_lint.py b/tests/test_prose_lint.py index f7fa37b1f..b4a246fc4 100755 --- a/tests/test_prose_lint.py +++ b/tests/test_prose_lint.py @@ -219,7 +219,7 @@ def test_an_unclassified_character_names_where_to_classify_it(self) -> None: [(_, kind, message)] = prose_lint.check_file(path, {"charset-unknown"}) self.assertEqual("charset-unknown", kind) self.assertIn('the comment-and-doc-style skill\'s "Character set" section', message) - self.assertIn("prose_lint.py's TIER1, TIER2, or TIER3 table", message) + self.assertIn("prose_lint.py's TIER1, TIER2, TIER3, or TIER4 table", message) self.assertIn("classify it in ptr727/ProjectTemplate:", message) self.assertNotIn("GOVERNANCE.md", message) @@ -411,11 +411,22 @@ def test_tier_three_is_allowed_rather_than_replaced(self) -> None: self.assertNotIn(chr(cp), prose_lint.TIER1) self.assertNotIn(chr(cp), prose_lint.TIER2) + def test_tier_four_markers_are_exactly_the_skill_text(self) -> None: + """The markers the rule text names, less the selector it admits, are the gate's set.""" + m = re.search(r"^- \*\*Tier 4,(.*?)(?=^- \*\*)", self.section, re.MULTILINE | re.DOTALL) + if m is None: + self.fail("the Tier 4 bullet moved, so the parse is blind") + named = {int(h, 16) for h in re.findall(r"U\+([0-9A-Fa-f]{4,6})\b", m.group(1))} + named.discard(ord(prose_lint.VARIATION_SELECTOR_16)) + self.assertEqual(named, {ord(ch) for ch in prose_lint.TIER4}) + def test_the_tiers_do_not_overlap(self) -> None: t1, t2, t3 = set(prose_lint.TIER1), set(prose_lint.TIER2), set(prose_lint.TIER3) + t4 = set(prose_lint.TIER4) self.assertEqual(set(), t1 & t2) self.assertEqual(set(), t1 & t3) self.assertEqual(set(), t2 & t3) + self.assertEqual(set(), t4 & (t1 | t2 | t3)) class TestDupword(BaitCase): From 76161f8afe84831172924e05197b067dbd04ef39 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Thu, 22 Oct 2026 18:24:23 -0700 Subject: [PATCH 4/4] Pin Each Lowercase-Start Caller With an End-to-End Marker Bait Co-Authored-By: Claude Sonnet 5.5 --- tests/test_prose_lint.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/test_prose_lint.py b/tests/test_prose_lint.py index b4a246fc4..312117649 100755 --- a/tests/test_prose_lint.py +++ b/tests/test_prose_lint.py @@ -280,6 +280,38 @@ def test_a_marker_opening_a_comment_or_line_is_not_a_lowercase_letter(self) -> N self.assertFalse(prose_lint.starts_lowercase(f"{info}\ufe0f Run setup first.")) self.assertTrue(prose_lint.starts_lowercase("run setup first.")) + def test_a_marker_opening_a_line_is_no_continuation_or_lowercase_start(self) -> None: + """Each caller of the lowercase test treats a marker as a sentence start, end to end.""" + info = chr(0x2139) + comment_rules = {"comment-wrap", "comment-case"} + for opener in (info, f"{info}\ufe0f"): + with self.subTest(opener=opener): + self.assertEqual( + [], + self.kinds( + f"# A sentence that keeps\n# {opener} Run setup first.\n", + comment_rules, + "bait.py", + ), + ) + self.assertEqual( + [], self.kinds(f"# {opener} Run setup first.\n", comment_rules, "bait.py") + ) + self.assertEqual( + [], + self.kinds( + f"A sentence that keeps\n{opener} Run setup first.\n", {"sentence-split"} + ), + ) + self.assertEqual( + ["comment-wrap"], + self.kinds("# A sentence that keeps\n# going on.\n", comment_rules, "bait.py"), + ) + self.assertEqual( + ["sentence-split"], + self.kinds("A sentence that keeps\ngoing on.\n", {"sentence-split"}), + ) + def test_a_stray_variation_selector_16_is_still_reported(self) -> None: """The selector is admitted only directly after a marker, never alone or after a gap.""" rules = {"charset", "charset-unknown"}