Skip to content

Should a comma with nothing before it read as a family comma with an empty family? (, John Smith → given John, middle Smith) #892

Closed

Description

@derek73

Background. A name that starts with a comma, with nothing before it, is one of AGENTS.md's four comma shapes, so every change is swept against it. That sweep entered after #613's review found , PhD reading as given PhD, on the theory that CSV exports write an empty surname field that way. Real names almost never take this shape: 9 of about 6 million local-corpus names (FEC 4, tse 3, PSC 2; ClinicalTrials.gov, JRC-Names, nepal-candidates, tw-donors and UKEC none), counted 2026-10-25. Yet no rule defines what the shape means. Clauses in rules/H8, O6 and M2, and review findings in decisions/C1, S10, A1 and H5, each decide it locally, and #890's floor for fils added code for , Dr. fils. The sweep makes every change pay for the shape, and the answer is decided again each time.

Proposal: one rule and one invariant.

  1. The rule. A comma with nothing before it is a family comma whose family is empty. The rest reads as the given part after a family comma reads, and the family stays empty because the writer left it empty. A floor that keeps a family word doesn't apply there: the input names no family to lose. Today's readings already mostly agree:

    Input Master Its Smith, … twin
    , John Smith given John, middle Smith the same, plus family Smith
    , John Smith Jr. given John, middle Smith, suffix Jr. the same, plus family
    , PhD suffix PhD the same, plus family
    , Jr. suffix Jr. the same, plus family
    , John (Bob) Smith given John, middle Smith, nickname Bob the same, plus family
  2. The invariant. A test over a generated grid of given parts: ", X" reads as "Smith, X" reads, minus the family, its fields and ambiguity kinds alike. It replaces the empty head as a shape every comma sweep must include. A change that breaks the invariant gets one generic fix, or the shape is accepted with an entry. It never gets code of its own.

  3. AGENTS.md's comma sweep drops the empty head as a required shape and points at the invariant. The scattered clauses in H8, O6 and M2 collapse into the rule where they state the same thing.

  4. Code that exists only for the empty head, where the invariant shows it isn't needed, is removed, Gate generation readings by kind: fils, the Brazilian agnomens, default = false (#752, phase 2h) #890's empty-head floor included.

Questions

  1. Is "a family comma with an empty family" the right meaning? The alternative is to drop the comma, so , John Smith reads as John Smith, family Smith. That's more useful to a caller with a stray comma, but it contradicts the CSV reading the shape came from.

  2. The known exceptions. H1 and H8 move a title's lone name word to the family when there is nothing before the comma:

    Input Master Its twin
    , Dr. John title Dr., family John Smith, Dr. John → given John
    , Ma Dr. title Dr., family Ma Smith, Ma Dr. → given Ma

    Keep them as the rule's one exception (a title with one name word addresses that word as the family), or follow the invariant?

  3. What does the grid hold? At least: a title before or after the given part, a particle run, a bound given name, a maiden clause, a nickname, a trailing credential and generation, one-case writing, and the three orders.

Measure the rule and the invariant's fixes against master with --base. Report counts only: this is expected to move at most the 9 local names and the committed test rows.

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions