Repository navigation
Should a comma with nothing before it read as a family comma with an empty family? (, John Smith → given John, middle Smith) #892
Description
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.
-
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 Smithgiven John, middleSmiththe same, plus family Smith, John Smith Jr.given John, middleSmith, suffixJr.the same, plus family , PhDsuffix PhDthe same, plus family , Jr.suffix Jr.the same, plus family , John (Bob) Smithgiven John, middleSmith, nicknameBobthe same, plus family -
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. -
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.
-
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
-
Is "a family comma with an empty family" the right meaning? The alternative is to drop the comma, so
, John Smithreads asJohn Smith, familySmith. That's more useful to a caller with a stray comma, but it contradicts the CSV reading the shape came from. -
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. Johntitle Dr., familyJohnSmith, Dr. John→ givenJohn, Ma Dr.title Dr., familyMaSmith, Ma Dr.→ givenMaKeep them as the rule's one exception (a title with one name word addresses that word as the family), or follow the invariant?
-
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.
Activity
Read a comma with nothing before it as a family comma naming no surna…
Remove the empty head's own P6 site (#892) (#916)