untrack .claude/settings.local.json from every repo in ~/ and add it to #2

Closed
opened 2026-05-13 19:01:53 +00:00 by brendan · 1 comment
Owner

Originally filed: 2026-05-13 in ~/features.md, block #0.
Cross-project companion issues: brendan/authd, brendan/buchinese, brendan/dashcam, brendan/firehose, brendan/inventory, brendan/movement, brendan/portman, brendan/tradebot

Feature requests queue

Maintained by the reporter role; consumed by the implementer role.
One item per block. Newest at the top.

2026-05-13 — fleet chore: untrack .claude/settings.local.json from every repo in ~/ and add it to each project's .gitignore. The file is Claude Code's per-machine permissions store and is meant to be machine-specific (it's the sibling of the checked-in .claude/settings.json); checking it in causes cross-machine permission drift and unnecessary diff noise on every Claude session.

Scope. Verified read-only against ~/<repo>/.git on 2026-05-13:

project .claude/settings.local.json tracked? already in .gitignore? action
authd YES NO untrack + gitignore
buchinese YES NO untrack + gitignore
dashcam YES NO untrack + gitignore
firehose YES NO untrack + gitignore
inventory YES NO untrack + gitignore
movement YES NO untrack + gitignore
sqlite-migrate YES NO untrack + gitignore
nanodrop no YES no-op — skip with note
portman no NO gitignore only (defensive — file exists locally)
tradebot no NO gitignore only (defensive — file exists locally)

Per-project recipe (7 untrack+gitignore PRs, 2 gitignore-only PRs, 1 no-op):

  1. Preserve local copy first. Inside the per-project worktree, the working-tree file .claude/settings.local.json must NOT be deleted from disk in the user's primary checkout. Use git rm --cached .claude/settings.local.json (the --cached flag drops it from the index while leaving the file on disk in the worktree; the user's primary ~/<repo> checkout is untouched until they pull, and once pulled the file already exists and gitignore prevents re-tracking). For projects where the file is already untracked (portman, tradebot), just add the .gitignore line.
  2. Append to .gitignore. Add a single line .claude/settings.local.json (or under an existing # Claude Code section if one exists). If the project's .gitignore already has a .claude/ pattern that would cover this file, double-check the intent — we want the sibling .claude/settings.json (and .claude/commands/, .claude/agents/, etc.) to remain checked in; only settings.local.json is machine-specific. If a broader .claude/* rule is present, narrow it.
  3. Single chore: commit per project. Suggested message: chore: untrack .claude/settings.local.json (machine-specific). For gitignore-only PRs: chore: gitignore .claude/settings.local.json (machine-specific).
  4. Branch + PR via the per-project worktree pattern (per ~/roles/_sub-claude-rules.md): branch chore/gitignore-claude-settings-local, auto-merge via the Gitea sync-from-main precondition. Refactor pass: noop on a sub-5-line diff. Security pass: zero in scope (gitignore + index-only change; no application code, no env, no auth).
  5. Verify locally before push. After git rm --cached, run git status and confirm: (a) .claude/settings.local.json shows up as a staged deletion, (b) the file still exists on disk (ls -la .claude/settings.local.json succeeds), (c) git check-ignore .claude/settings.local.json returns the path (proving gitignore now covers it). No other behavioral verification needed — this is purely a VCS-metadata change.
  6. No npm ci / tsc / vitest / docker build required. This is a meta-config change with zero code or dep impact. Skip the usual implementer test gauntlet.

Acceptance.

  • Every project listed in the table above (except nanodrop, which is already correct) has a merged PR.
  • git ls-files .claude/settings.local.json returns empty in every repo on main.
  • git check-ignore .claude/settings.local.json returns the path in every repo on main.
  • The user's local ~/<repo>/.claude/settings.local.json files are untouched (still exist, still contain the local permission rules) — verify by spot-checking 2-3 projects after the PRs land.
  • No .claude/settings.json (the checked-in counterpart) is accidentally untracked or gitignored — the rule must be specific to settings.local.json.

Filer notes.

  • This is a hygiene chore, not user-visible behavior. No bug pending against it; the user surfaced it during fleet-maintenance reflection on 2026-05-13.
  • Order doesn't matter; ship in any order, ideally batched in one implementer tick if the project-budget allows. Worst case 1-2 ticks (project budget is 1 PR per tick currently).
  • A standing rule belongs in ~/.claude/CLAUDE.md so new projects start with the gitignore line from day 1. Recommended addition: a short section under the existing Docker / iOS-font-size standing rules saying "Whenever you bootstrap a new repo or notice an unignored .claude/settings.local.json in any project, add it to that project's .gitignore. Never check settings.local.json in — it's the machine-specific sibling of the checked-in .claude/settings.json and tracking it causes cross-machine permission drift." This session can ship that rule add directly (the ~/.claude/CLAUDE.md file is fleet-maintenance scope, not project-code scope) — the implementer's job is the per-project retrofit only.
> **Originally filed:** 2026-05-13 in ~/features.md, block #0. > **Cross-project companion issues:** brendan/authd, brendan/buchinese, brendan/dashcam, brendan/firehose, brendan/inventory, brendan/movement, brendan/portman, brendan/tradebot # Feature requests queue > Maintained by the **reporter** role; consumed by the **implementer** role. > One item per block. Newest at the top. **2026-05-13 — fleet chore: untrack `.claude/settings.local.json` from every repo in `~/` and add it to each project's `.gitignore`. The file is Claude Code's per-machine permissions store and is meant to be machine-specific (it's the sibling of the checked-in `.claude/settings.json`); checking it in causes cross-machine permission drift and unnecessary diff noise on every Claude session.** **Scope.** Verified read-only against `~/<repo>/.git` on 2026-05-13: | project | `.claude/settings.local.json` tracked? | already in `.gitignore`? | action | |---|---|---|---| | authd | YES | NO | untrack + gitignore | | buchinese | YES | NO | untrack + gitignore | | dashcam | YES | NO | untrack + gitignore | | firehose | YES | NO | untrack + gitignore | | inventory | YES | NO | untrack + gitignore | | movement | YES | NO | untrack + gitignore | | sqlite-migrate | YES | NO | untrack + gitignore | | nanodrop | no | YES | **no-op — skip with note** | | portman | no | NO | gitignore only (defensive — file exists locally) | | tradebot | no | NO | gitignore only (defensive — file exists locally) | **Per-project recipe** (7 untrack+gitignore PRs, 2 gitignore-only PRs, 1 no-op): 1. **Preserve local copy first.** Inside the per-project worktree, the working-tree file `.claude/settings.local.json` must NOT be deleted from disk in the user's primary checkout. Use `git rm --cached .claude/settings.local.json` (the `--cached` flag drops it from the index while leaving the file on disk in the worktree; the user's primary `~/<repo>` checkout is untouched until they pull, and once pulled the file already exists and gitignore prevents re-tracking). For projects where the file is already untracked (portman, tradebot), just add the `.gitignore` line. 2. **Append to `.gitignore`.** Add a single line `.claude/settings.local.json` (or under an existing `# Claude Code` section if one exists). If the project's `.gitignore` already has a `.claude/` pattern that would cover this file, double-check the intent — we want the sibling `.claude/settings.json` (and `.claude/commands/`, `.claude/agents/`, etc.) to remain checked in; only `settings.local.json` is machine-specific. If a broader `.claude/*` rule is present, narrow it. 3. **Single `chore:` commit per project.** Suggested message: `chore: untrack .claude/settings.local.json (machine-specific)`. For gitignore-only PRs: `chore: gitignore .claude/settings.local.json (machine-specific)`. 4. **Branch + PR via the per-project worktree pattern** (per `~/roles/_sub-claude-rules.md`): branch `chore/gitignore-claude-settings-local`, auto-merge via the Gitea sync-from-main precondition. Refactor pass: noop on a sub-5-line diff. Security pass: zero in scope (gitignore + index-only change; no application code, no env, no auth). 5. **Verify locally before push.** After `git rm --cached`, run `git status` and confirm: (a) `.claude/settings.local.json` shows up as a staged deletion, (b) the file still exists on disk (`ls -la .claude/settings.local.json` succeeds), (c) `git check-ignore .claude/settings.local.json` returns the path (proving gitignore now covers it). No other behavioral verification needed — this is purely a VCS-metadata change. 6. **No `npm ci` / `tsc` / `vitest` / `docker build` required.** This is a meta-config change with zero code or dep impact. Skip the usual implementer test gauntlet. **Acceptance.** - Every project listed in the table above (except nanodrop, which is already correct) has a merged PR. - `git ls-files .claude/settings.local.json` returns empty in every repo on `main`. - `git check-ignore .claude/settings.local.json` returns the path in every repo on `main`. - The user's local `~/<repo>/.claude/settings.local.json` files are untouched (still exist, still contain the local permission rules) — verify by spot-checking 2-3 projects after the PRs land. - No `.claude/settings.json` (the checked-in counterpart) is accidentally untracked or gitignored — the rule must be specific to `settings.local.json`. **Filer notes.** - This is a hygiene chore, not user-visible behavior. No bug pending against it; the user surfaced it during fleet-maintenance reflection on 2026-05-13. - Order doesn't matter; ship in any order, ideally batched in one implementer tick if the project-budget allows. Worst case 1-2 ticks (project budget is 1 PR per tick currently). - A standing rule belongs in `~/.claude/CLAUDE.md` so new projects start with the gitignore line from day 1. Recommended addition: a short section under the existing Docker / iOS-font-size standing rules saying "Whenever you bootstrap a new repo or notice an unignored `.claude/settings.local.json` in any project, add it to that project's `.gitignore`. Never check `settings.local.json` in — it's the machine-specific sibling of the checked-in `.claude/settings.json` and tracking it causes cross-machine permission drift." This session can ship that rule add directly (the `~/.claude/CLAUDE.md` file is fleet-maintenance scope, not project-code scope) — the implementer's job is the per-project retrofit only.
brendan added the feature label 2026-05-13 19:01:53 +00:00
Author
Owner

Resolved: PR #4 (merge_commit e8d92f58dc)

Resolved: PR https://gitea.bchen.dev/brendan/sqlite-migrate/pulls/4 (merge_commit e8d92f58dc8e4823)
Sign in to join this conversation.