* fix(setup/claude): keep settings.json's trailing newline and skip no-op rewrites (#5693)
bd setup claude (and bd init, which calls it) marshalled the Claude settings
map with json.MarshalIndent and wrote it unconditionally. MarshalIndent emits
no trailing newline, so every run stripped the one Claude Code's own writes
leave behind, and re-wrote the file even when no hook changed. Because bd init
git-adds .claude/settings.json, that surfaced as a staged diff with no
semantic content.
The same marshal-then-write pattern appears at four call sites in claude.go:
installClaude's settings write and its settings.local.json migration, and
removeClaude's settings write and its settings.local.json cleanup. Fixing one
would have left the bug live in the other three, so both halves are now shared
helpers -- marshalSettings appends the newline, writeSettingsIfChanged compares
against the bytes already on disk and returns early when they match -- and all
four sites go through them.
Reported by @maphew.
* chore(setup/claude): use the repo spelling "marshaled" in the new comments
The misspell linter flags British "marshalled"; CI pins golangci-lint
v2.10.1 and runs it with --new-from-merge-base, so both new comment lines
are in scope. Comment text only, no behaviour change.