OFTR-002: Settings Discovery and Validation
Synced from
outfitter/docs/requirements/OFTR-002-settings.md. The repository is the source of truth.
Amendment (2026-07-17, RFC #165): settings moved from
.outfitter/to the.agentstree and dropped resource-selection keys.default_profile→default_agent(an agent slug); the formerdefault_agent(harness) →default_harness;profile_sources→sources;state_persistencemoved into settings; the nestedlocal/directory became a flatsettings.local.yml; theprofile_exportkey and theprofiles:map were removed. Section IDs are preserved so pinned-test traceability holds. The target design lives in docs/documentation/settings.md.
Overview
Section titled “Overview”Outfitter settings are the merged result of user, user-local, project, and project-local
.agents/settings.yml (and sibling .agents/settings.local.yml) files.
The internal Settings object is the single source of resolved configuration for commands. Settings
carry no resource selections — an agent’s loadout lives on the agent, not in settings.
Requirements
Section titled “Requirements”OFTR-002.1: Settings Locations
Section titled “OFTR-002.1: Settings Locations”- Outfitter MUST support a user settings file at
~/.agents/settings.yml. - Outfitter MUST support a user-local settings file at
~/.agents/settings.local.yml. - Outfitter MUST support a project settings file at
<project>/.agents/settings.yml. - Outfitter MUST support a project-local settings file at
<project>/.agents/settings.local.yml. settings.local.ymlMUST be a flat file besidesettings.yml; there is no nested local directory.- Outfitter MUST collectively refer to discovered settings files as
settings.ymlin user-facing documentation when discussing the merged settings concept.
OFTR-002.2: Settings Precedence
Section titled “OFTR-002.2: Settings Precedence”- Project-local settings MUST take precedence over project settings.
- Project settings MUST take precedence over user-local settings.
- User-local settings MUST take precedence over user settings.
- User settings MUST take precedence over cached remote settings, which take precedence over built-in defaults.
- Outfitter MUST expose the merged result as a conceptual internal
Settingsobject. - The Settings loader SHOULD be designed so future settings sources can be added without changing command implementations.
OFTR-002.3: Settings Schema
Section titled “OFTR-002.3: Settings Schema”- Outfitter MUST provide a JSON Schema for
settings.yml. - Outfitter MUST validate every discovered
settings.ymlfile against the settings JSON Schema before merging it. - Validation diagnostics MUST identify the file that failed validation.
- Validation diagnostics SHOULD identify the failing setting path when the validator provides that information.
OFTR-002.4: Default Agent and Harness
Section titled “OFTR-002.4: Default Agent and Harness”settings.ymlMAY declare adefault_agentnaming the agent slug that plainoutfitterruns when no agent is selected.settings.ymlMAY declare adefault_harnessofpi,claude, orcodexselecting the harness launched when--harnessis omitted.outfitter runMUST use the resolveddefault_agentwhen no agent is selected on the command line.- Outfitter MUST report an actionable error when no selected agent and no
default_agentare available. settings.ymlMAY declare anisolationofinheritorisolated, selecting whether a run stands on the harness configuration already present on the machine. Outfitter MUST default toinherit, MUST let--isolatedoverride it for a single run, and MUST honor the declared value only from home-scope settings.
OFTR-002.5: Sources in Settings
Section titled “OFTR-002.5: Sources in Settings”settings.ymlMAY contain asourcesarray of.agentspayload sources.- Each
sourcesentry MUST specify either a localpath, a remoteuri, or agithubshorthand. - A local-only
pathsource MUST resolve relative to the settings file containing it when the path is relative. - A local-only
pathsource MUST point to a directory containing a.agentspayload. - A
uriorgithubsource MUST be syncable byoutfitter sync. - A
uriorgithubsource MAY specifyrefto select a branch, tag, or commit. - A
uriorgithubsource MAY specifypathto load the payload from a repository subdirectory.
OFTR-002.6: Remote Settings Sources
Section titled “OFTR-002.6: Remote Settings Sources”settings.ymlMAY contain aremote_settingsarray.- Each
remote_settingsentry MUST specify either a remoteurior agithubshorthand. - Each
remote_settingsentry MUST specifypathto a settings-style YAML file inside the remote repository. - A
remote_settingsentry MAY specifyrefto select a branch, tag, or commit. - Outfitter MUST load cached remote settings files from their repository subpaths when resolving settings.
- Local discovered settings MUST take precedence over remote settings when both define the same setting.
OFTR-002.7: Cache Directory Setting
Section titled “OFTR-002.7: Cache Directory Setting”settings.ymlMAY contain acache_directorypath.- Relative
cache_directoryvalues MUST resolve relative to the settings file containing them. - When
cache_directoryis not configured, Outfitter MUST use~/.agents/cacheas the default cache directory. - Agent adapters MUST receive the resolved cache directory when composing a run so persistent projection links use the configured cache location.
OFTR-002.8: State Persistence in Settings
Section titled “OFTR-002.8: State Persistence in Settings”settings.ymlMAY contain astate_persistenceobject mapping adapter-declared state paths to a persistence strategy.- Outfitter MUST validate
state_persistencestrategy values as one ofsymlink,discard,warn,error, orprompt. - When
state_persistenceis omitted from all settings scopes, Outfitter MUST fall back to adapter default strategies. - Higher-precedence settings files MUST override lower-precedence
state_persistenceentries per state path.