Config: support a user-level config layer or fall back to the primary worktree's config.local.yaml

Author: thefotiosCreated Sep 29, 2026Updated Sep 29, 2026

Problem

.compound-engineering/config.local.yaml is resolved from git rev-parse --show-toplevel only (the ce-config-layers rule and docs/guides/configuration.md). There is no user-level layer, and a linked worktree does not see the primary checkout's file.

Personal, non-secret preferences such as plan_model, brainstorm_model, cross_model_peer, and cross_model_review_mode describe the user, not the checkout. Because config.local.yaml is normally gitignored, every new worktree starts without it. Anyone who works in many worktrees (one per branch or agent) must re-create the file each time, or the settings silently do not apply.

docs/brainstorms/2026-03-25-config-storage-redesign-requirements.md describes user-level defaults and a user_state_dir (~/.compound-engineering), but the shipped resolution reads only the two repo files.

Current workaround

A post-checkout git hook that symlinks a shared file (~/.claude/ce-config.local.yaml) into each checkout's .compound-engineering/config.local.yaml. It works, but it is per-repo, untracked, and invisible to /ce-setup diagnostics.

Proposal

Either of these would remove the need for the workaround. The first is preferred.

  1. User-level layer. Add ~/.compound-engineering/config.yaml (honoring $XDG_CONFIG_HOME/compound-engineering/config.yaml) as the lowest-precedence layer. Resolution order: <repo>/.compound-engineering/config.local.yaml, then <repo>/.compound-engineering/config.yaml, then the user-level file, then the skill default. docs_root stays repo-only.
  2. Primary-worktree fallback. When the current checkout is a linked worktree and has no config.local.yaml, read the one in the primary worktree (the parent of git rev-parse --git-common-dir).

Related: /ce-setup could report which layer supplied each active key.

Notes

  • Existing precedence is unchanged. A repo config.local.yaml or config.yaml value still wins over the user-level file.
  • Keys that are inherently repo-specific (docs_root, sweep_state_path, feedback_sources) should stay repo-only. The user-level file would accept only personal preference keys.

Source: EveryInc/compound-engineering-plugin