From e30220c70f721a3978efce5f0aa86cbade581d71 Mon Sep 17 00:00:00 2001 From: Real <1227620310@qq.com> Date: Mon, 1 Jun 2026 05:24:08 +0800 Subject: [PATCH] fix(memory): correct settings.json precedence chain order (Closes #130) (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 10-cli/README.md: policy → local → project → user (was project → local → policy → user) - 02-memory/README.md: reorder table levels 3/4/5 to local → project → user - 02-memory/README.md: update note text to match corrected order --- 02-memory/README.md | 6 +++--- 10-cli/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/02-memory/README.md b/02-memory/README.md index 5f7a29a..05d6b34 100644 --- a/02-memory/README.md +++ b/02-memory/README.md @@ -298,9 +298,9 @@ Claude Code settings (including `autoMemoryDirectory`, `claudeMdExcludes`, and o |-------|----------|-------| | 1 (Highest) | Managed policy (system-level) | Organization-wide enforcement | | 2 | `managed-settings.d/` (v2.1.83+) | Modular policy drop-ins, merged alphabetically | -| 3 | `~/.claude/settings.json` | User preferences | +| 3 | `.claude/settings.local.json` | Local overrides (git-ignored) | | 4 | `.claude/settings.json` | Project-level (committed to git) | -| 5 (Lowest) | `.claude/settings.local.json` | Local overrides (git-ignored) | +| 5 (Lowest) | `~/.claude/settings.json` | User preferences | **Platform-specific configuration (v2.1.51+):** @@ -310,7 +310,7 @@ Settings can also be configured via: These platform-native mechanisms are read alongside JSON settings files and follow the same precedence rules. -> **Note (v2.1.119)**: `/config` changes now persist to `~/.claude/settings.json`. Values written via `/config` participate in the normal project/local/policy precedence chain described above — they are no longer session-only. Use `/config` for interactive edits and edit `settings.json` files directly for scripted or managed configuration. +> **Note (v2.1.119)**: `/config` changes now persist to `~/.claude/settings.json`. Values written via `/config` participate in the normal policy/local/project precedence chain described above — they are no longer session-only. Use `/config` for interactive edits and edit `settings.json` files directly for scripted or managed configuration. ### Retention and Cleanup Settings diff --git a/10-cli/README.md b/10-cli/README.md index 5c38e32..c74c8a9 100644 --- a/10-cli/README.md +++ b/10-cli/README.md @@ -252,7 +252,7 @@ claude -p --json-schema '{"type":"object","properties":{"bugs":{"type":"array"}} | `--add-dir` | Add additional working directories | `claude --add-dir ../apps ../lib` | | `--setting-sources` | Comma-separated setting sources | `claude --setting-sources user,project` | -> **`/config` persistence (v2.1.119)**: Changes made interactively via the `/config` command are now written to `~/.claude/settings.json` and participate in the normal precedence chain (project → local → policy → user). Before v2.1.119, some `/config` changes were session-only. See [Memory & Settings](../02-memory/README.md) for the full precedence order. +> **`/config` persistence (v2.1.119)**: Changes made interactively via the `/config` command are now written to `~/.claude/settings.json` and participate in the normal precedence chain (policy → local → project → user). Before v2.1.119, some `/config` changes were session-only. See [Memory & Settings](../02-memory/README.md) for the full precedence order. | `--settings` | Load settings from file or JSON | `claude --settings ./settings.json` | | `--plugin-dir` | Load plugins from directory (repeatable) | `claude --plugin-dir ./my-plugin` |