Lukasz Boryn 12659c76d1 refactor(skills): pull call-charon and commit-atomic-jj under the line cap
Both sat at 117 against CLAUDE.md §5's ≤110 cap, and the commit git/jj
twins had drifted out of skeleton parity. The two are coupled: shortening
the jj variant's Principles alone would have created the asymmetry.

The overage was restatement of each skill's own siblings, so this is a
dedup, not a split — no new sibling file.

- refactor(call-charon): point DISPATCH and REVIEW FLOTILLA at
  crossing-format.md §isolation, §builder-brief and §reviewer-brief
  rather than restating them; 117 -> 106
- refactor(commit-atomic-jj): move `jj split`'s parent-side trap into
  anti-patterns.md as its own named section, and collapse the workflow
  tail that restated three anti-patterns already written there; 117 -> 108
- docs(commit-atomic-git): add `## When to use`, levelling the twins'
  `^## ` skeletons by addition, never by subtraction from jj; 97 -> 104
- docs(commit-atomic-jj): point anti-patterns.md's two back-references at
  sections that exist (§5 -> §6, and "Workflow step 5" -> the `jj new` step)
- docs(okf): record that a line-based grep is an unsound reference gate

implements blueprint 016
2026-07-30 13:51:03 +02:00

65 lines
2.7 KiB
Markdown

# commit-atomic-jj anti-patterns
## `jj describe` before `jj diff`
You'll commit debug `cat()`s, stray `browser()` calls, and TODO
scratchpads. Read every line of every diff before you describe.
## "Mixed bag" commits
`refactor + fix + new feature` in one change is three regressions waiting
to happen and an unrevertable mess. If the diff touches more than one
concern, `jj split` before describing.
## Past-tense / declarative messages
`"added auth"`, `"auth now works"`. These don't complete the implicit
prefix *"this change will…"*. Use the imperative — `"add OAuth2 login
flow"`, `"fix token refresh on 401"`.
## No scope
`feat: add login` is weaker than `feat(auth): add OAuth2 login flow`.
Scope is the smallest area the change touches; it makes the log
greppable and the change's footprint visible at a glance.
## Docs in the next commit
"I'll update the README after." You won't. Docstrings, README sections,
CLAUDE.md updates for a new flag or env var — same change or it doesn't
ship. See SKILL.md §6 *"Docs travel with the code"*.
## Skipping `jj new` after describe
Edits land in the just-described change; its message rots into a lie. Always
open a fresh `@` immediately after `jj describe` — SKILL.md §Workflow, the
`jj new -m 'WIP'` step.
## Assuming `jj split` puts the selected paths in the child
It puts them in the **first (parent)** commit and leaves the rest in `@`.
Select the paths for the change you want *underneath*, not the one you want
to keep working on — `-m` names that parent, and `@` inherits the original
message until you describe it explicitly.
## Backgrounding a `jj` mutation
Running `jj squash` / `describe` / `split` / `new` as a *background*
command (e.g. a chained `ruff format && jj squash …` fired detached)
fails — observed three times in one session, exit 144, the format step
succeeding and the `jj` step dying. A mutating `jj` op snapshots and
rewrites the working copy; backgrounding it races the harness's own
working-copy snapshot and the op aborts. Run every `jj` mutation in the
**foreground**, one at a time. Background is for long read-only work
(builds, test runs), never for sealing a commit.
## Letting a `jj` op spawn an editor headlessly
`jj describe`, `split`, and `commit` open `$JJ_EDITOR` (often a full TUI like
nvim) when no `-m` is given. In a headless / non-terminal context the editor
has no stdout to attach to, so it hangs or crashes — the transaction never
commits and `split` can leave you mid-operation. Always pass `-m` for the
message, and guard with `JJ_EDITOR=true` so any unexpected editor invocation
is an instant no-op instead of a hang. `split` describes its *first* part
from `-m`; describe the remaining `@` explicitly afterwards.