feat(install): merge user settings and turn off bundled skills

Copying the repo's settings.json over ~/.claude/settings.json would delete
most of the operator's settings, so the installer now merges it. The merge
and the new settings land together, so no overwriting installer ever
deploys them.

The merge runs before any other file is deployed, so an invalid settings
file stops the install with nothing changed. It writes a complete temporary
file and renames it, so a failure cannot truncate the user's settings.

Impact: removing a setting from the repo no longer removes it from a
machine that already has it.

ADR: 0035
Refs: #280
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-12-04 19:48:53 +00:00
1 parent 0f2d9ede68
commit aa8319a1db
8 files changed
+191 -5

No files matched your search

+3 -2
View File
@@ -13,9 +13,10 @@ project repo (local overrides)
## Content deployment model
`scripts/install.sh` is a **deployer**, not a composer. It sources `scripts/deploy-manifest.sh` and deploys three categories:
`scripts/install.sh` is a **deployer**, not a composer, with one exception: user settings are merged, not copied. It sources `scripts/deploy-manifest.sh` and deploys four categories:
- **Files** (`DEPLOY_FILES`): `providers/claude-code/CLAUDE.md` → `~/.claude/CLAUDE.md`; `providers/claude-code/settings.json` → `~/.claude/settings.json`; `core/AGENTS.md` → `~/.agents/AGENTS.md`
- **Files** (`DEPLOY_FILES`): `providers/claude-code/CLAUDE.md` → `~/.claude/CLAUDE.md`; `core/AGENTS.md` → `~/.agents/AGENTS.md`
- **Merged JSON** (`DEPLOY_JSON_MERGES`): `providers/claude-code/settings.json` → `~/.claude/settings.json`. Settings only the user has are kept, including inside nested objects; where both set a value, the repo's wins, and arrays are replaced whole. Removing a setting from the repo does not remove it from a user's file. An existing file that is not a valid JSON object stops the install and is left untouched (ADR-0035)
- **Executables** (`DEPLOY_EXECUTABLES`): `providers/claude-code/statusline-command.sh` → `~/.claude/statusline-command.sh` (with `+x`)
- **Directories** (`DEPLOY_DIRS`): `core/` → `~/.claude/core/` (destination fully replaced on each deploy)