Mark Pitt
claude-skills
  1. claude-skills
  2. AI engineering
  3. omp-harness
  4. references/config-layers.md

A file in omp-harness

references/config-layers.md

Markdown 3.9 KB
config-layers.mdMarkdown, rendered

Config layers, precedence and what to commit

Contents

  1. The files
  2. Precedence
  3. Reading and writing settings
  4. Commit or gitignore: the tradeoff
  5. Per-run overlays

1. The files

FileLayerEvidence
~/.omp/agent/config.ymlGlobal, for every projectconfirmed from files
<repo>/.omp/config.ymlProject, read from the working directoryconfirmed from files and from omp config list --scope help text (<cwd>/.omp)
~/.omp/agent/models.ymlProviders and their modelsconfirmed from files
~/.omp/agent/lsp.jsonLanguage serversconfirmed from files
~/.omp/agent/rules/*.mdTTSR rulesconfirmed from files
~/.omp/agent/skills/<name>/SKILL.mdPersonal skillsconfirmed from files
<repo>/.omp/hooks/pre/*.tsProject hook filesconfirmed from files; automatic loading is verify with omp --help

The agent directory is printed by omp config path. Do not hard-code ~/.omp/agent in anything shared; use $(omp config path) in local scripts.

2. Precedence

The project config header states the order: global, then project, then CLI overlay, then runtime. Later layers win. Runtime means changes made in the running session through /settings.

Two checks confirm the layering on a machine:

omp config get KEY                    # the merged value
omp config list --scope=project       # only the keys the project layer sets, as written

--scope on list takes global or project (help text). Use the two together to see which layer a value came from.

3. Reading and writing settings

Confirmed subcommands:

omp config list [--scope=global|project] [--json]
omp config get KEY
omp config set KEY VALUE...
omp config reset KEY
omp config path
omp config init-xdg                   # help lists it; read `omp config init-xdg --help` before use

Writing with set is convenient but its target layer is verify with omp --help. For a value that belongs to a project, edit the project's .omp/config.yml directly and check with omp config get.

Values in config list can include credentials on some setups. Use --scope=project for shared notes, and redact before pasting output anywhere.

4. Commit or gitignore: the tradeoff

A project's .omp/ holds two kinds of thing:

  • Shared: hooks, bash approval patterns, the agreed role for each job, the rules everyone should follow. These belong in git, so a clone behaves the same way.
  • Personal: a local endpoint, a role set to a model one person has access to, a profile preference. These do not belong in a shared file.

Pick one of these, per repository:

ChoiceEffectUse when
Commit .omp/config.yml with only shared settingsClones match; personal settings stay in the global fileMost repositories
Commit .omp/ and set modelRoleStorage: projectRole choices made in the UI land in the shared file, so commit them deliberatelyThe team agrees the roles
Gitignore .omp/Nothing in the folder is shared; hooks are not shared eitherThe whole project file is personal to one machine or one person

Whichever you choose, check the ignore state with git check-ignore -v .omp/config.yml. An empty output means the file is not ignored. Do not assume either way.

modelRoleStorage: project is stated in the project config header: role changes made in the model selector save to the project file, and other /settings changes still go to the global file.

5. Per-run overlays

--config FILE loads an extra config-style file for one run. It can be given more than once (confirmed from help). It sits above the project layer and below runtime changes, so it is the right place for a temporary local-only run, instead of editing a shared file:

omp --config /tmp/local-only.yml --offline -p "reply with the word ready"

Keep such overlay files outside the repository, and delete them after the run.