Make a set of things consistent along one dimension: identify the set's members,
pick a canonical form for the dimension the user named, and conform every member
to it without changing what any member means or does.
Target
jj show --git
Arguments: $ARGUMENTS
The arguments name the dimension of consistency (e.g. "error message wording",
"test naming", "heading capitalization") and optionally the files or text that
form the set. Operate on the set named in the arguments if given. Otherwise
operate on the things changed in the current commit shown above. If the
dimension is missing, infer it from the conversation. If you still cannot
determine the set or the dimension, ask the user and stop.
Principles
- One dimension per pass. Conform only the dimension the user named. Other
inconsistencies you notice go in the report, not in the edits. Mixing
dimensions makes the change hard to review and easy to get wrong
- Consistency must preserve meaning. Rewording a message, renaming a test, or
reordering keys must not change behavior or a claim. If conforming a member
would change its meaning, it is a deliberate exception: leave it and say why
- The canonical form comes from the set, not from taste (see "Choosing the
canonical form"). Invent a new form only when no existing member is fit to
copy, and say so in the report
- Membership is a judgment call for borderline things. A thing that
superficially resembles the set but serves a different purpose is not a
member. Conforming it couples unrelated things. When unsure, leave it out and
note it
These aren't exhaustive. Reason from first principles when none fits cleanly.
Workflow
- Determine the dimension and the set from the arguments and conversation (see
"Target"). State both in one sentence before editing, so the user can catch a
wrong guess early
- List every member with its current form. Search beyond the obvious files: a
set defined by purpose (all error messages, all CLI flags, all section
headings) is scattered
- Pick the canonical form (see "Choosing the canonical form"). If two forms are
equally defensible and the choice matters, ask the user which to use and
stop. Otherwise pick and note the choice in the report
- If every member already matches, tell the user and stop. Don't manufacture
edits
- Conform each member to the canonical form:
- In prose, comments, and config, edit the wording or structure in place
- For identifiers, treat each change as a behavior-preserving rename: update
every reference, and never break a name that callers outside the set depend
on
- If any code changed, run the covering tests or a typecheck to confirm
behavior is unchanged. Pure prose edits need no test run
- Report: the dimension and canonical form, each member changed (from what to
what), members left as deliberate exceptions and why, borderline non-members
you excluded, and other inconsistent dimensions you noticed but did not touch
Choosing the canonical form
- Count first. When most members already agree, the majority form is canonical
unless the user said otherwise. Conforming the few to the many is the
smallest, safest change
- On a tie, prefer the form that is clearest on its own terms: the one a
newcomer would understand without seeing the others
- Follow the form the user prescribed even when it is the minority, and report
the scale of the resulting change
- If the best form needs vocabulary the project doesn't use consistently, stop
and suggest
/ubiquitize-language instead of splitting the project's
vocabulary further
Fixing mistakes
- A test or typecheck breaks after a rename: you missed a reference or the name
is used outside the set. Find the other references or restore the original
name
- A conformed member now says something false or does something different: the
member was a borderline non-member or an exception. Revert it and move it to
the exceptions in the report
1---2name: homogenize3description: Make a set of things (code, prose, config, docs) consistent along a dimension the user names, by picking a canonical form and conforming every member to it.4---56Make a set of things consistent along one dimension: identify the set's members,7pick a canonical form for the dimension the user named, and conform every member8to it without changing what any member means or does.910# Target1112```!13jj show --git14```1516Arguments: $ARGUMENTS1718The arguments name the dimension of consistency (e.g. "error message wording",19"test naming", "heading capitalization") and optionally the files or text that20form the set. Operate on the set named in the arguments if given. Otherwise21operate on the things changed in the current commit shown above. If the22dimension is missing, infer it from the conversation. If you still cannot23determine the set or the dimension, ask the user and stop.2425# Principles2627- One dimension per pass. Conform only the dimension the user named. Other28 inconsistencies you notice go in the report, not in the edits. Mixing29 dimensions makes the change hard to review and easy to get wrong30- Consistency must preserve meaning. Rewording a message, renaming a test, or31 reordering keys must not change behavior or a claim. If conforming a member32 would change its meaning, it is a deliberate exception: leave it and say why33- The canonical form comes from the set, not from taste (see "Choosing the34 canonical form"). Invent a new form only when no existing member is fit to35 copy, and say so in the report36- Membership is a judgment call for borderline things. A thing that37 superficially resembles the set but serves a different purpose is not a38 member. Conforming it couples unrelated things. When unsure, leave it out and39 note it4041These aren't exhaustive. Reason from first principles when none fits cleanly.4243# Workflow44451. Determine the dimension and the set from the arguments and conversation (see46 "Target"). State both in one sentence before editing, so the user can catch a47 wrong guess early482. List every member with its current form. Search beyond the obvious files: a49 set defined by purpose (all error messages, all CLI flags, all section50 headings) is scattered513. Pick the canonical form (see "Choosing the canonical form"). If two forms are52 equally defensible and the choice matters, ask the user which to use and53 stop. Otherwise pick and note the choice in the report544. If every member already matches, tell the user and stop. Don't manufacture55 edits565. Conform each member to the canonical form:57 - In prose, comments, and config, edit the wording or structure in place58 - For identifiers, treat each change as a behavior-preserving rename: update59 every reference, and never break a name that callers outside the set depend60 on616. If any code changed, run the covering tests or a typecheck to confirm62 behavior is unchanged. Pure prose edits need no test run637. Report: the dimension and canonical form, each member changed (from what to64 what), members left as deliberate exceptions and why, borderline non-members65 you excluded, and other inconsistent dimensions you noticed but did not touch6667# Choosing the canonical form6869- Count first. When most members already agree, the majority form is canonical70 unless the user said otherwise. Conforming the few to the many is the71 smallest, safest change72- On a tie, prefer the form that is clearest on its own terms: the one a73 newcomer would understand without seeing the others74- Follow the form the user prescribed even when it is the minority, and report75 the scale of the resulting change76- If the best form needs vocabulary the project doesn't use consistently, stop77 and suggest `/ubiquitize-language` instead of splitting the project's78 vocabulary further7980# Fixing mistakes8182- A test or typecheck breaks after a rename: you missed a reference or the name83 is used outside the set. Find the other references or restore the original84 name85- A conformed member now says something false or does something different: the86 member was a borderline non-member or an exception. Revert it and move it to87 the exceptions in the report