Skip to content

docs-hygiene(rename-references): Form 14 is case-sensitive, so a title-cased heading falls through to a LESS safe classification #1394

Description

@kyle-sexton

Observation

rename-references Form 14 (document title / declared name, added in #1386) is case-sensitive:

^#{1,6}\s+`?<old>`?\s*$
^(name|title):\s*("<old>"|'<old>'|<old>)\s*$

A container whose own README titles itself in title case — # Re-Anchor for a plugin named re-anchor, or # Testing for testing — is missed by Form 14 entirely.

The consequence is not merely a miss. Form 14 is what routes a title match through its scope rule (Certain only in container-owned files, always Ambiguous for a common-word token). When Form 14 does not fire, the line falls through to bare-token Form 2 instead, which — for a token absent from the English-verb blocklist — defaults to Certain. So a title-cased heading gets a less safe classification than a lowercase one, which inverts the intent.

Raised as a minor note during #1386's review and deliberately not fixed there.

Why it was not fixed inline

The obvious patch — make Form 14 case-insensitive — is wrong on its own. #1386 established (with verified in-repo examples) that Form 14 over-reaches on ordinary-word container names: renaming a testing plugin already matches README.md:86 (### Testing, a marketplace category heading), and architecture matches plugins/miro/README.md:39. Adding case-insensitivity widens that blast radius to every casing variant of a common word in every document, which is precisely the over-reach the scope rule was added to bound.

Fixing it correctly means the scope rule has to be load-bearing first — the constraint that keeps a title match Certain only in container-owned files must be reliable enough that widening the match set is safe. That is a design question, not a regex tweak, so it earns its own issue rather than a half-fix.

Direction (open decision — not settled)

Candidates, in rough order of preference:

  1. Case-insensitive matching gated on the scope rule. Match any casing, but rate Certain ONLY inside container-owned files, and Ambiguous everywhere else regardless of token shape. Leans entirely on the scope rule being correct.
  2. Case-insensitive only when the token is not an ordinary English word. A coined or hyphenated name (re-anchor) has no legitimate title-case prose sense, so widening is safe; a common word does. Needs a word-shape test the skill does not currently have.
  3. Leave case-sensitive, document the gap explicitly on the form, so a reader knows a title-cased heading needs a manual pass. Cheapest, and honest, but leaves the Form 2 fall-through inversion in place.

Whichever is chosen, the Form 2 fall-through is the part that must not survive: a heading that Form 14 declines to match should not thereby become more likely to auto-apply.

Acceptance

  • Form 14's casing behavior is stated explicitly in context/patterns.md, whatever the resolution.
  • A title-cased heading no longer receives a less safe classification than its lowercase equivalent.
  • Validated on both axes per patterns.md "Phase 6" — recall against a real fixture, precision reported beside bare-token Form 2's count on the same tree.
  • An eval case covers the title-cased heading path.

Collision risk

Searched open and closed issues for rename-references, Form 14, case-sensitiv, title. Nothing covers this. #1283 is the parent (the pattern-library gap that introduced Forms 13–15); this is a follow-on from #1386's review, not a duplicate of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: lowNice-to-have, cosmetic, or speculative; opportunistic.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions