Skip to content

Layered zdev configuration

Zdev separates project settings, work records, and user or repository preferences:

  1. .zdev/config.toml holds project identity, repository topology, and record policy.
  2. Area, slice, and task files are work records rather than preferences.
  3. .zdev/workers.toml (and its global counterpart) holds preferences: worker profiles, t3.verifier-harness, workspace.branching, and shadow.push. Each can have a user-wide default and a repository override.

Project settings stay in the repository because they govern how zdev interprets shared work and handles cleanup. Preferences can vary by user or repository without changing the task records.

zdev init creates .zdev/config.toml, and zdev config and project integration installation read, update, and atomically replace it. Root discovery only checks for the file’s presence, while status, checks, task selection, branch operations, cleanup, and integration guidance parse it. Area commands manage .zdev/<area>/area.toml separately. Preferences use the strict workers.toml format described below.

local refers to the initialized repository found by discovery or --root; global refers to the current user’s preference file. repo-only keys appear in local and effective reads, but --global cannot write them. Repository-local is not the same as clone-private: the project’s personal, project, pull-request, or shadow record policy still determines whether .zdev is shared.

CLI key Value Scope Mutation
project.name non-empty project name repo-only Set by zdev init; read-only afterward.
project.record personal, project, pull-request, or shadow repo-only Set by zdev init, or changed from personal to shadow by zdev shadow adopt; read-only otherwise.
project.trunk Git branch name, or absent repo-only Set or unset locally.
project.default-area existing area tag, or absent repo-only Set or unset locally.
project.guidance auto, agents, zdev, or a safe repository-relative Markdown path; absent means auto repo-only Set or unset locally. Project integration install also records the source it uses.
worker.codex.routine-implementer worker profile global and local Set or unset.
worker.codex.implementer worker profile global and local Set or unset.
worker.codex.verifier worker profile global and local Set or unset.
worker.codex.advanced-implementer worker profile global and local Set or unset.
worker.codex.planner worker profile global and local Set or unset.
worker.claude.routine-implementer worker profile global and local Set or unset.
worker.claude.implementer worker profile global and local Set or unset.
worker.claude.verifier worker profile global and local Set or unset.
worker.claude.advanced-implementer worker profile global and local Set or unset.
worker.claude.planner worker profile global and local Set or unset.
worker.opencode.routine-implementer worker profile global and local Set or unset.
worker.opencode.implementer worker profile global and local Set or unset.
worker.opencode.verifier worker profile global and local Set or unset.
worker.opencode.advanced-implementer worker profile global and local Set or unset.
worker.opencode.planner worker profile global and local Set or unset.
worker.pi.routine-implementer worker profile global and local Set or unset.
worker.pi.implementer worker profile global and local Set or unset.
worker.pi.verifier worker profile global and local Set or unset.
worker.pi.advanced-implementer worker profile global and local Set or unset.
worker.pi.planner worker profile global and local Set or unset.
worker.omp.routine-implementer worker profile global and local Set or unset.
worker.omp.implementer worker profile global and local Set or unset.
worker.omp.verifier worker profile global and local Set or unset.
worker.omp.advanced-implementer worker profile global and local Set or unset.
worker.omp.planner worker profile global and local Set or unset.
worker.agy.routine-implementer worker profile global and local Set or unset.
worker.agy.implementer worker profile global and local Set or unset.
worker.agy.verifier worker profile global and local Set or unset.
worker.agy.advanced-implementer worker profile global and local Set or unset.
worker.agy.planner worker profile global and local Set or unset.
t3.verifier-harness codex, claude, or inherit; absent means codex global and local Set or unset.
workspace.branching on-request or isolated; absent means on-request global and local Set or unset.
shadow.push never or after-commit; absent means never global and local Set or unset. Applies only to shadow records.

A worker profile is set as a whole: either inherit, or a non-empty model paired with an effort from inherit, low, medium, high, xhigh, or max. Writing the pair atomically avoids leaving a file with a model and no effort. Setting effort = inherit specifies the model while omitting the harness effort control; a whole-profile inherit omits both.

The built-in worker defaults for normal are described in Worker profiles:

Harness Routine implementer Implementer Verifier Advanced implementer
Codex gpt-6.1-sol medium gpt-6.1-sol high gpt-6.1-sol high gpt-6.1-sol xhigh
Claude claude-opus-5-5 low claude-opus-5-5 medium claude-opus-5-5 medium claude-opus-5-5 high
OpenCode openai/gpt-6.1-sol medium openai/gpt-6.1-sol high anthropic/claude-opus-5-5 inherit openai/gpt-6.1-sol xhigh
Pi openai/gpt-6.1-sol medium openai/gpt-6.1-sol high anthropic/claude-opus-5-5 low openai/gpt-6.1-sol xhigh
OMP openai/gpt-6.1-sol medium openai/gpt-6.1-sol high anthropic/claude-opus-5-5 low openai/gpt-6.1-sol xhigh

The Oh My Pi adapter renders these two abstract fields into its native combined syntax and rejects any pair it cannot express instead of dropping a field.

Project identity and record policy have no default. An absent trunk resolves to null (unbound), an absent default area resolves to null (relying on unambiguous area selection), and an absent guidance setting resolves to auto.

t3.verifier-harness selects the harness for verifier-role workers under T3 orchestration: task verification, standalone review, audit, and task-bundle challenge. With the default codex, a T3 coordinator dispatches those workers to its single available Codex instance with the Codex verifier profile, even when the coordinator itself runs Claude Code. Setting claude prefers a Claude Code instance, and inherit stays on the coordinator’s own provider instance. A harness or model named in the user’s request overrides this preference. If the preferred harness has no available instance or does not advertise the resolved model, the coordinator states the fallback and uses its own provider instance. See the T3 Code reference for run-time details. Other roles and harness-native routes ignore this key.

workspace.branching controls whether new work creates a branch or worktree automatically. With the default on-request, agents create areas on the checked-out project trunk and implement single tasks in the current checkout; they create a branch or worktree only when asked or when a route requires one (parallel batches, rolling research, or an assigned source worktree). Under on-request, zdev area create without --branch or --trunk creates a trunk area whenever the configured trunk is checked out and the record policy allows trunk areas. With isolated, agents create an area branch and implement in a worktree, and zdev area create without a mode flag binds the checked-out branch. An explicit --branch or --trunk flag, or a branch or worktree request from the user, always takes precedence. Pull-request records always create isolated areas, and existing areas keep their recorded mode.

Area fields (tag, title, objective, branch, parent, base_commit, and optional execution_profiles) live in area.toml, not zdev config. Manage execution_profiles with zdev area profile AREA (show all harnesses), zdev area profile AREA HARNESS (inspect one harness), zdev area profile AREA HARNESS PROFILE (set or replace it), and zdev area profile AREA HARNESS --clear (remove it); changing one harness leaves the others untouched. Slice and task records stay in Markdown and are managed by their own domain commands. schema_version is format metadata rather than a configurable key, and per-invocation flags such as output format, repository root, integration scope, destination, and --force are not persisted.

Each repository can have two configuration files:

  • .zdev/config.toml is the strict project record.
  • .zdev/workers.toml is the optional local preference file holding worker profiles, t3.verifier-harness, workspace.branching, and shadow.push.

The global preference file uses the first absolute base in this order:

  1. An absolute, non-empty XDG_CONFIG_HOME resolves to $XDG_CONFIG_HOME/zdev/workers.toml.
  2. Otherwise an absolute, non-empty HOME resolves to $HOME/.config/zdev/workers.toml.
  3. Otherwise an absolute, non-empty USERPROFILE resolves to $USERPROFILE/.config/zdev/workers.toml.

An unset, empty, or relative variable is skipped and resolution moves to the next one. If none is absolute, the command fails with Cannot locate global zdev configuration; set XDG_CONFIG_HOME, HOME, or USERPROFILE to an absolute path and changes nothing. Paths are lexically normalized rather than canonicalized because the file may not exist yet, so reported global origins are always absolute. There is no zdev-specific path override.

Worker resolution is whole-profile, in this order:

  1. the local .zdev/workers.toml profile;
  2. the matching global profile;
  3. the built-in profile.

An explicit inherit overrides lower layers rather than falling through. Profiles are never merged field by field, so an effort from one scope cannot silently attach to a model from another.

Project values come only from .zdev/config.toml, followed by the defaults above where applicable. Harness-native settings can still override or reject rendered model controls later; zdev reports the settings it supplies to integration rendering, not the model a provider ultimately runs.

Both preference files use this hand-editable TOML schema:

schema_version = 1
[codex.implementer]
model = "gpt-6.1-sol"
effort = "high"
[codex.verifier]
inherit = true
[t3]
verifier-harness = "claude"
[workspace]
branching = "isolated"

The optional [t3] table accepts only verifier-harness, [workspace] accepts only branching, and [shadow] accepts only push. Global and local files share the same schema. A missing preference file acts as an empty layer. Removing the final entry from a file leaves a deterministic file containing only schema_version = 1 rather than deleting the file. Local and effective operations require .zdev/config.toml. Because all role tables are optional, files that define only implementer and verifier remain valid under schema version 1.

The commands are:

zdev config show [--global | --local]
zdev config get [--global | --local] <key>
zdev config set [--global | --local] [--allow-divergent] <key> <value>...
zdev config unset [--global | --local] <key>
zdev config trunk [<branch>] [--allow-divergent]

--global and --local are mutually exclusive. Global --format text|json and --root options work as on other zdev commands, and --root does not change the global file location.

Reads without a scope show the effective value. Scoped reads show only values stored in that scope, without injecting defaults or values from another scope. show succeeds with an empty values array when a selected worker scope has no entries, while get of an absent scoped key fails without output.

Writes default to local. A global write works outside a repository, whereas a local write or an unscoped read requires an initialized repository. Passing a repo-only key with --global fails as an unsupported scope.

Scalar settings take one value:

zdev config set project.trunk main
zdev config set project.default-area improvements
zdev config set project.guidance docs/build.md
zdev config set --global t3.verifier-harness inherit
zdev config set workspace.branching isolated

A worker key takes either inherit or a model-and-effort pair:

zdev config set --global worker.codex.implementer gpt-6.1-sol high
zdev config set worker.codex.verifier inherit

set replaces the value in the selected scope. unset removes only that scope’s entry, exposing the next layer if one exists; unsetting a missing entry is an error. project.name and project.record are readable through show and get, while set and unset reject them and point to zdev init and the record-policy documentation.

A successful worker-profile set or unset reminds you to refresh that harness integration instead of rewriting it automatically: a local change prints zdev skill install <harness> --scope project --force, and a global change prints zdev skill install <harness> --scope user --force. Changes to project keys, t3.verifier-harness, workspace.branching, and shadow.push omit the refresh fields and hint because they do not alter rendered worker controls; the T3 coordinator, zdev area create, zdev commit, and harness workflows read those keys directly when needed.

zdev config trunk [<branch>] is a branch-aware shorthand: omitting <branch> uses the checked-out branch, while passing an explicit branch writes the same value as zdev config set project.trunk <branch>. The generic set form never infers a branch. When explicit trunk areas exist, both forms run the locked ancestry and ownership checks in Trunk-based area work. --allow-divergent is accepted only for local trunk writes and waives only a resolved false ancestry result.

Keys appear in the order shown in the scope table above: project keys first, then harnesses in codex, claude, opencode, pi, omp, agy order (each with routine-implementer, implementer, verifier, advanced-implementer, and planner), then t3.verifier-harness, workspace.branching, and shadow.push. A scoped view omits keys not stored in that scope. JSON objects use lexical key order (from serde_json::Value and serde_json::to_string_pretty), while arrays keep the registry and precedence order defined here. Every output ends with a single newline. Paths use / separators, with repository-relative local paths and absolute global paths.

Human show prints one effective or stored value per line. Lower-precedence candidates follow the winning value on indented shadows lines. Strings use TOML quoting, profiles use TOML inline-table notation, and null is literal.

The effective view includes every supported key. The following examples show selected rows to illustrate values, scope, and precedence. The defaults table above records the dated model choices.

Selected human rows have this form:

project.name = "checkout" [local .zdev/config.toml]
project.record = "project" [local .zdev/config.toml]
project.trunk = null [default]
project.default-area = "payments" [local .zdev/config.toml]
shadows null [default]
project.guidance = "auto" [default]
worker.codex.implementer = { model = "gpt-6.1-sol", effort = "high" } [local .zdev/workers.toml]
shadows { model = "gpt-5.5", effort = "xhigh" } [global /home/alice/.config/zdev/workers.toml]
shadows { model = "gpt-6.1-sol", effort = "high" } [default]
workspace.branching = "on-request" [default]

The same selected rows have this JSON shape:

{
"schema_version": 1,
"scope": "effective",
"values": [
{
"key": "project.name",
"origin": {
"path": ".zdev/config.toml",
"scope": "local"
},
"shadowed": [],
"value": "checkout"
},
{
"key": "project.record",
"origin": {
"path": ".zdev/config.toml",
"scope": "local"
},
"shadowed": [],
"value": "project"
},
{
"key": "project.trunk",
"origin": {
"path": null,
"scope": "default"
},
"shadowed": [],
"value": null
},
{
"key": "project.default-area",
"origin": {
"path": ".zdev/config.toml",
"scope": "local"
},
"shadowed": [
{
"origin": {
"path": null,
"scope": "default"
},
"value": null
}
],
"value": "payments"
},
{
"key": "project.guidance",
"origin": {
"path": null,
"scope": "default"
},
"shadowed": [],
"value": "auto"
},
{
"key": "worker.codex.implementer",
"origin": {
"path": ".zdev/workers.toml",
"scope": "local"
},
"shadowed": [
{
"origin": {
"path": "/home/alice/.config/zdev/workers.toml",
"scope": "global"
},
"value": {
"effort": "xhigh",
"model": "gpt-5.5"
}
},
{
"origin": {
"path": null,
"scope": "default"
},
"value": {
"effort": "high",
"model": "gpt-6.1-sol"
}
}
],
"value": {
"effort": "high",
"model": "gpt-6.1-sol"
}
},
{
"key": "workspace.branching",
"origin": {
"path": null,
"scope": "default"
},
"shadowed": [],
"value": "on-request"
}
]
}

scope is always present: effective for an unscoped read and global or local for a scoped show. shadowed is always present, including when empty. An origin always contains path then scope; default origins use a null path. Scoped views omit unstored keys instead of emitting null placeholders.

For a fixture with two global profiles, zdev config show --global is exactly:

worker.codex.implementer = { model = "gpt-5.5", effort = "xhigh" } [global /home/alice/.config/zdev/workers.toml]
worker.codex.verifier = { inherit = true } [global /home/alice/.config/zdev/workers.toml]

Its JSON form is exactly:

{
"schema_version": 1,
"scope": "global",
"values": [
{
"key": "worker.codex.implementer",
"origin": {
"path": "/home/alice/.config/zdev/workers.toml",
"scope": "global"
},
"shadowed": [],
"value": {
"effort": "xhigh",
"model": "gpt-5.5"
}
},
{
"key": "worker.codex.verifier",
"origin": {
"path": "/home/alice/.config/zdev/workers.toml",
"scope": "global"
},
"shadowed": [],
"value": {
"inherit": true
}
}
]
}

Assume the repository locally sets the implementer to gpt-6.1-sol high and the global value above is present. zdev config get worker.codex.implementer is exactly:

worker.codex.implementer = { model = "gpt-6.1-sol", effort = "high" } [local .zdev/workers.toml]
shadows { model = "gpt-5.5", effort = "xhigh" } [global /home/alice/.config/zdev/workers.toml]
shadows { model = "gpt-6.1-sol", effort = "high" } [default]

Its JSON form is exactly:

{
"key": "worker.codex.implementer",
"origin": {
"path": ".zdev/workers.toml",
"scope": "local"
},
"schema_version": 1,
"shadowed": [
{
"origin": {
"path": "/home/alice/.config/zdev/workers.toml",
"scope": "global"
},
"value": {
"effort": "xhigh",
"model": "gpt-5.5"
}
},
{
"origin": {
"path": null,
"scope": "default"
},
"value": {
"effort": "high",
"model": "gpt-6.1-sol"
}
}
],
"value": {
"effort": "high",
"model": "gpt-6.1-sol"
}
}

Successful mutation output is also stable. For example:

Set worker.codex.implementer in global /home/alice/.config/zdev/workers.toml.
Refresh integration: zdev skill install codex --scope user --force
{
"integration_refresh_command": "zdev skill install codex --scope user --force",
"integration_refresh_required": true,
"key": "worker.codex.implementer",
"origin": {
"path": "/home/alice/.config/zdev/workers.toml",
"scope": "global"
},
"schema_version": 1,
"status": "set",
"value": {
"effort": "high",
"model": "gpt-6.1-sol"
}
}

After removing a local override whose global fallback is the fixture above, the human result is:

Unset worker.codex.implementer from local .zdev/workers.toml.
Effective value: { model = "gpt-5.5", effort = "xhigh" } [global /home/alice/.config/zdev/workers.toml]
Refresh integration: zdev skill install codex --scope project --force

The JSON result is:

{
"effective": {
"origin": {
"path": "/home/alice/.config/zdev/workers.toml",
"scope": "global"
},
"value": {
"effort": "xhigh",
"model": "gpt-5.5"
}
},
"integration_refresh_command": "zdev skill install codex --scope project --force",
"integration_refresh_required": true,
"key": "worker.codex.implementer",
"origin": {
"path": ".zdev/workers.toml",
"scope": "local"
},
"schema_version": 1,
"status": "unset"
}

No supported key is sensitive. Model identifiers, effort names, area tags, and repository-relative guidance paths are ordinary configuration. Zdev does not read or display credentials or harness secrets, and it rejects unknown keys, including credential-like ones.

Both worker files and .zdev/config.toml are strict, versioned TOML. Parsing rejects an unsupported schema version, an unknown table or key, a duplicate key, an unknown harness or role, an empty model, an unknown effort, inherit combined with another field, and an explicit model-effort pair the selected adapter cannot express.

Additional key validation is narrow:

  • project.trunk uses Git branch-name canonicalization. Without explicit trunk areas it can name a branch that does not exist yet. With trunk areas, the old and candidate tips must exist and be inspectable, the complete area ownership graph must stay valid, and the old tip must be contained by the candidate unless --allow-divergent waives a resolved false ancestry result.
  • project.default-area must be a valid segment naming an existing area.
  • project.guidance accepts the three named modes or a safe repository-relative Markdown path. File presence and guidance markers are checked when an integration is installed or checked.
  • t3.verifier-harness accepts only codex, claude, or inherit.
  • workspace.branching accepts only on-request or isolated.
  • shadow.push accepts only never or after-commit.
  • Worker validation is syntactic and adapter-specific; zdev does not contact a provider or verify account access to a model.

An effective read validates every present source it consults before producing output. A scoped global operation consults only the global preference file; a scoped local operation validates the project record and the local preference file. Malformed or unreadable files fail with the path and offending field rather than falling back silently, leaving the user to repair the named hand-editable file.

Unknown keys, unsupported scopes or values, a missing scoped get or unset, an uninitialized local operation, and an unavailable configuration home all fail through zdev’s text or JSON error envelope without printing a success payload or modifying any file. Missing preference files and missing profile tables are normal fallbacks on effective reads.

For a mutation, zdev validates arguments and required inputs first. On the first global mutation it creates the resolved parent zdev directory and opens workers.lock there; if directory or lock creation fails, no configuration file changes. Local project and preference writes take the repository’s Git-path zdev-state.lock. Under the lock, zdev rereads the target, computes and serializes the complete document, writes and syncs a temporary file in the destination directory, and atomically replaces the destination so a publication failure leaves the previous file untouched. Each command modifies at most one file, so no cross-file rollback is needed.

Serialization is deterministic and preserves values rather than comments or hand-formatted layout. Hand edits are supported inputs; the next CLI mutation normalizes that file.

zdev config profile provides typed list, show, set, unset, set-default, unset-default, and resolve subcommands. Definitions live in the schema-version-1 worker file under profiles.<name>.<harness>.<role>, with an optional default_profile. Top-level harness tables act as the normal profile. Model and effort are written together, and the complete document and harness controls are validated before the atomic write.

Resolution checks an explicit role profile first, then --run-profile, then the area profile for the selected harness (when --area is passed), then a saved local or global default, and finally normal. Local named rows override global rows. A missing role in a named profile falls back to effective normal, except an omitted planner, which first checks that profile’s advanced-implementer. Unknown profile names and profiles undefined for the requested harness are errors. Read-only list, show, and resolve commands never rewrite configuration files. Changing or clearing the saved default reports the refresh command for each installed integration at the selected project or user scope.

.zdev/config.toml keeps its schema version, field names, and strict parsing. zdev config trunk and the generic zdev config subcommands operate on the same typed project fields without moving project state into a preference file.

.zdev/workers.toml (described in Worker profiles) is the local layer. A repository-local profile overrides the global file, which overrides the built-in default. User-scoped integration install and check consult global then built-in; project-scoped install and check consult local, global, then built-in. Explicit inherit is authoritative at either scope.

Install and check share the same resolver and report the zdev origin they rendered. Repositories without either worker file render the built-in profiles deterministically. No command scans or imports harness-native configuration.