Configuration Reference¶
Complete reference for every field in Marianne score YAML files. All types, defaults,
and constraints are extracted directly from the Pydantic v2 config models in
src/marianne/core/config/.
Table of Contents¶
- Top-Level Fields
- instruments
- InstrumentDef Sub-Config
- Instrument Fallbacks
- movements
- MovementDef Sub-Config
- workspace_lifecycle
- bridge
- MCP Server Sub-Config
- sheet
- SkipWhenCommand Sub-Config
- InjectionItem Sub-Config
- spec
- prompt
- parallel
- retry
- rate_limit
- circuit_breaker
- cost_limits
- stale_detection
- cross_sheet
- validations
- isolation
- grounding
- Grounding Hook Sub-Config
- conductor
- Conductor Preferences Sub-Config
- concert
- on_success (Post-Success Hooks)
- notifications
- learning
- Exploration Budget Sub-Config
- Entropy Response Sub-Config
- Auto Apply Sub-Config
- checkpoints
- Checkpoint Trigger Sub-Config
- ai_review
- logging
- feedback
- telemetry
- State and Misc
- DaemonConfig (Conductor)
- Hot Reload
- Socket Sub-Config
- Resource Limits Sub-Config
- Semantic Learning Sub-Config
Top-Level Fields¶
Source: src/marianne/core/config/job.py — JobConfig
| Field | Type | Default | Description |
|---|---|---|---|
name |
str |
required | Unique score name |
description |
str \| None |
None |
Human-readable description |
workspace |
Path |
./workspace |
Output directory. Resolved to absolute path at construction time. |
instrument |
str \| None |
None |
Profile, score alias, or capability class. The packaged classes are strong, workhorse, fast, cheap, writing, review, vision, local, high-context, image, video, and the family-neutral tier classes frontier, balanced, light; the vocabulary is the packaged classes/default.yaml itself, and a user (~/.marianne/classes.yaml) or venue (.marianne/classes.yaml) layer may define ANY further class name or tombstone a packaged one with null (GH #433). Run mzt instruments classes show to see resolved chains. If unset, defaults to claude-code. |
instrument_config |
InstrumentSettings |
{} |
Typed per-score overrides. Keys: timeout_seconds (sheet execution timeout), model, provider, interactive, interactive_max_nudges, interactive_nudge_message, interactive_nudge_policy, interactive_nudge_instrument, interactive_nudge_timeout_seconds, max_tokens, temperature, response_format, effort (reasoning effort in Marianne's vocabulary minimal, low, medium, high, xhigh, max, mapped by the resolved profile's effort: block; see below), tools (the harness tools this sheet may use, by the harness's own names; see below), first_output_timeout_seconds (CLI first-output silence bound, GH #502; omit to inherit the profile, a finite positive number to override, null to disable — see the CLI timeout section for the full semantics). Unknown keys warn as V010/V011; executor support still varies. |
instruments |
dict[str, InstrumentDef] |
{} |
Named instrument definitions local to this score. Declares reusable aliases referencing registered instrument profiles with optional overrides. Referenced by name in per-sheet or per-movement instrument: fields. See instruments. |
movements |
dict[int, MovementDef] |
{} |
Movement declarations. Map of movement number to MovementDef. Each movement can specify a name, instrument, instrument config, and voice count. See movements. |
instrument_fallbacks |
list[str] |
[] |
Score-level fallback chain. Each profile, alias, or class is expanded in place; a primary class's tail runs before declared fallbacks. See Instrument Fallbacks. |
Interactive continuation defaults to instrument_config.interactive_nudge_policy: static.
Set it to model with instrument_config.interactive_nudge_instrument naming a
registered inexpensive headless instrument to generate contextual inputs from
the idle screen. instrument_config.interactive_nudge_timeout_seconds is a
finite positive per-call limit (default 30 seconds), additionally bounded by
the sheet deadline. Invalid or failed model replies fall back to
interactive_nudge_message; an unrecoverable decision stops nudging and
leaves validations to judge the attempt. These settings work at all four
instrument override scopes. Missing instrument configuration uses static
continuation with a warning.
Note: The legacy
backend:block was removed. Scores that still contain one fail at parse time with "Unknown field 'backend'" — see the migration table in the Score Writing Guide for the field-by-field conversion. If noinstrument:is specified, Marianne defaults toclaude-code.
Per-sheet configuration is resolved for each attempt, including fallback
configuration. HTTP instruments share a pooled executor, but the model,
generation limits, HTTP timeout, schema, preamble and prompt extensions travel
with the request; they do not mutate another in-flight sheet's settings.
Any top-level key this reference does not list is dropped by the tolerant loader; when its value is a block (a mapping or a list) mzt validate warns V010 — the runtime implements no such block, so nothing it configures will happen (a key from an unmerged branch, such as deliver:, is the usual cause). A stray scalar is V011 INFO.
The same typed key set is checked at score instrument_config, movements.<N>.instrument_config, sheet.per_sheet_instrument_config.<N>, and instruments.<alias>.config. These scopes merge in that order, with an alias applied before a per-sheet override. An unknown key warns and is ignored; it does not change the sheet timeout.
first_output_timeout_seconds is tri-state like response_format (GH #502):
omitted inherits the CLI profile's first-output bound, a finite positive number
widens or narrows it for that scope, and null disables it for that sheet.
Once any stdout or stderr byte arrives, only the sheet timeout governs; the
sheet timeout also caps the override when it exceeds it. Applies to CLI
backends; HTTP and interactive backends warn and ignore it. See the
Instrument Guide for the profile-level setting and
worked examples.
effort sets the reasoning effort of one sheet (GH #535), in one vocabulary
for every harness, lowest first: minimal, low, medium, high, xhigh,
max. Any other word fails when the score loads. The resolved instrument
profile's effort: block maps the level to the harness's own word and says how
it is delivered (a flag, a config override, or an HTTP request-body field); see
the instrument guide
for the shapes and the table of what each builtin maps. minimal means the
least reasoning the seat offers: on a harness whose lowest level is low it
runs at low. A model row may narrow the map (opencode and crush levels
differ per model). The only measurement so far: on one small task, three runs per
level, Sonnet 5.5 spent about 2.3 times the reasoning tokens at max as at
high; low, medium and high did not differ; Haiku showed no usable effect.
Nothing has been measured on the other harnesses.
Omit the key, or set null in a narrower scope, to keep the profile default
(claude-code: max, or high on a schema sheet; every other builtin: the
harness's own default, no flag). It is refused, never downgraded, when the
profile declares no effort: block (claude-code-ollama, gemini-cli,
aider, goose, the builtin ollama, any user-layer copy made before the
block existed), when neither the profile nor the sheet's model maps the level,
when a schema sheet asks for a level outside effort.schema_levels
(claude-code refuses xhigh and max there; max with --json-schema
hangs), and when an interactive sheet runs on a mapping marked
interactive: false (the opencode TUI has no --variant). mzt validate
reports V335 with the accepted levels, naming the model when its row decides,
and dispatch refuses the same sheet. A fallback takes effort only from its own
alias or class entry config, never from the primary's; on the primary, a
capability-class entry's effort applies unless a score, movement or sheet
scope names effort.
instrument: claude-code
instrument_config:
effort: high # score default for every sheet
movements:
1:
instrument_config:
effort: low # recon movement
sheet:
per_sheet_instrument_config:
7:
effort: null # sheet 7 back to the profile default (max)
instruments:
reviewer:
chain:
- {profile: claude-code, config: {model: claude-sonnet-5-5, effort: medium}}
- {profile: codex-cli, config: {effort: medium}} # -c model_reasoning_effort=medium
The profile side, for authors of instrument profiles (full guide in instrument-guide.md):
effort: field |
Meaning |
|---|---|
delivery |
flag (<flag> <native>), config_override (<flag> <key>=<native>) or body_field (HTTP request JSON <key> = native; HTTP profiles only, CLI profiles use the other two) |
flag |
The effort flag, or the override switch (-c) |
key |
Config key or dotted request-body path; required by config_override and body_field |
levels |
Marianne level to native word; several levels may share a word. {} leaves the decision to each model row |
schema_levels |
Marianne levels a response_format sheet may use; unset = all mapped levels |
interactive |
Default true; false refuses an interactive sheet that sets effort |
A model row's effort_levels replaces levels for that model ({} = that
model has no control). A profile with no effort: block refuses the key.
tools narrows the toolset of one sheet (GH #534). It is a list of the
harness's own tool names, at any instrument_config scope (score, movement,
per-sheet, alias config, chain entry, capability-class entry). There is no
cross-harness vocabulary: on Claude Code the names are Bash, Read, Edit,
Write, Grep, Glob and so on, and another harness has its own. Absent or
null keeps the harness default, exactly as before; an empty list [] means no
tools. The resolved profile's top-level tools: block says which flag delivers
the list. That flag must be the one that removes the other tool definitions from
the model's context, not a permission-only flag. A profile with no tools:
block, or a name outside the block's known: list when one is declared, is
refused by mzt validate (V337) and at dispatch, never ignored. A fallback
takes tools only from its own entry. A capability-class entry's tools
applies unless a score, movement or sheet scope names tools.
instrument_config:
tools: [Read, Grep, Glob] # score default: read-only sheets
sheet:
per_sheet_instrument_config:
4:
tools: [Bash, Read, Edit, Write] # the sheet that builds
7:
tools: null # back to the harness default
tools: field |
Meaning |
|---|---|
delivery |
flag (the only shape) |
flag |
The switch that limits the tool definitions, --tools on Claude Code |
join |
comma (default, Bash,Read) or space |
known |
Optional list of accepted tool names; absent = any name is passed through |
interactive |
Default true; false refuses an interactive sheet that sets tools |
cli.command.allowed_tools_flag is retired: no code ever read it. A profile that
still carries it loads, and the field is ignored.
response_format is opt-in. For OpenAI-compatible HTTP profiles, an omitted
key inherits http.response_format, an explicit null disables it for that
sheet, and an object overrides it. Marianne validates the format declaration
and forwards it to the server; HTTP transport does not independently validate
the returned content against the JSON Schema. Server support is required.
The returned object is kept whole on the sheet record as structured_output
(credential-redacted, up to 64 KiB of compact JSON), so a caller reads it from
job.status or mzt status --json after the job completes; the output tail is
only the last 500 characters. The field belongs to the latest attempt: a
failed retry clears it. A larger object is not stored, and structured_output_omitted: true says
so; have the sheet write a file instead (GH #489).
For headless CLI profiles, schema mode requires type: json_schema and a
profile-declared cli.command.json_schema_flag. Marianne passes the schema to
that flag — with top-level $schema and $id removed, since Claude Code's
validator rejects a draft URL it cannot resolve (GH #479) — and validates the
returned structured JSON against it. The profile's schema_extra_flags, when
declared, replace extra_flags on that command (the shipped claude-code
profile drops from --effort max to --effort high for schema sheets, since
max with --json-schema hangs on Claude Code 2.1.307; a sheet's own effort
replaces that high only with a level in the profile's effort.schema_levels). An unsupported
profile or format fails explicitly. Interactive CLI execution does not provide
this schema contract, and score silence on interactive selects the profile's
cli.interactive.enabled_by_default — true for claude-code and antigravity —
so a schema sheet on those profiles must say interactive: false in some merged
scope or dispatch refuses it; mzt validate warns V331 first (GH #478). These
are different carriers for structured output, not interchangeable provider flags.
instruments¶
Source: src/marianne/core/config/job.py — JobConfig.instruments
Named instrument definitions local to this score. Each entry declares a reusable alias that
references a registered instrument profile with optional configuration overrides. These aliases
can then be used in instrument: fields on per-sheet or per-movement assignments.
instruments:
fast-writer:
profile: gemini-cli
config:
model: gemini-2.5-flash
timeout_seconds: 300
deep-thinker:
profile: claude-code
config:
timeout_seconds: 3600
reviewer:
chain:
- {profile: codex-cli, config: {model: gpt-6-astra}}
- {profile: claude-code, config: {model: claude-opus-5-5}}
- opencode
select: [spread, balance]
An alias binds one profile, or an ordered chain of entries with select
modifiers that decide which entry each sheet starts on; the rest of the chain
follows as that sheet's fallbacks, ahead of any instrument_fallbacks. Without
select, the first entry is every sheet's primary (the same as an
instrument_fallbacks list, written once). Modifiers compose in the order
written (sort first, then rotate, then balance at dispatch): [cheapest,
cycle] rotates the cheapest-first order; [cycle, cheapest] re-sorts after
rotating and so never rotates. A fan-out of three reviewers bound to the alias
above gets three different models in one movement (spread) and, when two of
them are busy at dispatch, starts on the idle one (balance). The authored
order is the order on an idle machine, so an alias is never surprising when
nothing else is running.
InstrumentDef Sub-Config¶
Source: src/marianne/core/config/job.py — InstrumentDef
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
profile |
str |
required unless chain |
min_length=1 | Name of the registered instrument profile (e.g., gemini-cli, claude-code). Must match a profile loaded by mzt instruments list. With chain, derived from the first entry. |
config |
dict |
{} |
Configuration overrides merged with the profile's defaults. Flat key-value pairs. With chain, applied to every entry beneath that entry's own config. |
|
chain |
list |
min 1 entry | Ordered entries the alias can bind: {profile, config} objects or bare profile names. Two entries with the same profile and model are refused. Mutually exclusive with profile. |
|
select |
list |
[] |
needs chain of ≥2 |
Modifiers, applied in the order written. cycle: each use of the alias, in sheet order, starts one entry further along (wrapping). spread: like cycle, restarting at each movement, so a fan-out's voices get distinct entries. cheapest: order entries by the profile's cost_per_1k_input for the entry's model, ascending. widest: order by context_window, descending. balance: at dispatch the conductor starts the sheet on the chain entry with the lowest live occupancy (running sheets over that route's cap; rate-limited and circuit-open entries excluded; ties keep order) and records the choice in the sheet's fallback history as balance. The whole entry moves: the chosen entry's config (its model, timeout, response_format, ...) is what the sheet runs with, and the displaced primary keeps its own config as a fallback. cycle+spread and cheapest+widest are refused; a modifier with nothing to choose between warns V330. |
Instrument Fallbacks¶
When a primary instrument is unavailable or rate-limited to exhaustion, Marianne can automatically try fallback instruments in order. Fallbacks are specified as a list of instrument names (profile names or score-local aliases).
Fallback chains can be set at three levels — per-sheet overrides replace (not merge with) inherited chains:
# Score-level default fallbacks (all sheets inherit this)
instrument: claude-code
instrument_fallbacks: [gemini-cli, codex-cli]
movements:
2:
name: Implementation
instrument: gemini-cli
# Movement-level fallbacks override score-level for sheets in this movement
instrument_fallbacks: [claude-code, aider]
sheet:
size: 1
total_items: 5
# Per-sheet fallback override (replaces, does not merge)
per_sheet_fallbacks:
3: [codex-cli] # Sheet 3 only falls back to codex-cli
Fallback resolution precedence (highest wins):
1. sheet.per_sheet_fallbacks[N] — per-sheet override
2. movements.N.instrument_fallbacks — per-movement default
3. Top-level instrument_fallbacks — score default
The mzt validate command checks fallback names against known profiles,
score aliases, and configured classes (V211 ERROR).
Capability Classes¶
Use a generic class when the score needs a kind of instrument rather than one specific profile:
Class files are read in order: the packaged default, ~/.marianne/classes.yaml,
then .marianne/classes.yaml relative to the reading process's working
directory: mzt validate reads it from where you run it, the conductor from
where it was started (the shipped systemd unit uses $HOME, so there the
conductor's "venue" layer is the user file). A score that uses a class a
.marianne/classes.yaml beside it redefines, when the conductor read a
different venue file, is refused at submit naming both paths (GH #510); start
the conductor from the project directory or move the definition to
~/.marianne/classes.yaml and run mzt conductor reload. mzt validate --json
reports each venue layer with resolved_from. A later definition replaces the
whole ordered chain; null removes
an inherited class. Resolution order is score alias, registered profile, then
class. Class chains become profile names before dispatch and are frozen in each
job's checkpoint. A global class edit affects new submissions; --fresh
creates a new snapshot.
Use mzt instruments classes show --json to inspect chains and source digests,
mzt instruments classes check to check configured chains, and
mzt instruments classes write --if-absent to generate a user map from
available shipped profiles. The writer backs up any existing file before an
authorized replacement and refuses hand edits unless given --force.
Class entries accept a profile name or {profile: NAME, config: {model: MODEL,
effort: LEVEL}}. effort is the Marianne reasoning level that entry runs at
(GH #535), so a user or venue classes.yaml can give every score that names
the class a level without editing the scores:
version: 1
classes:
review:
- {profile: codex-cli, config: {effort: medium}}
- {profile: claude-code, config: {model: claude-sonnet-5-5, effort: medium}}
- antigravity # no effort: the harness default
Tier classes: frontier, balanced, light¶
Three packaged classes name a capability tier instead of a job or a family, the way "Opus class, Sonnet class, Haiku class" does. Any family's model may sit in one, at the reasoning effort that makes it that tier:
| class | meaning | use for |
|---|---|---|
frontier |
Opus class | open or undefined work, design, adversarial review |
balanced |
Sonnet class | defined work, most builds |
light |
Haiku class | quick, mechanical, summaries, recon |
Each entry pins a model and, where the profile maps one, an effort
({profile: claude-code, config: {model: claude-opus-5-5, effort: medium}}).
For antigravity the effort is part of the model slug
(gemini-4-hydrogen-high), so the entry names the full slug and carries no
effort. A task may raise or lower effort within its class
(instrument_config.effort), but that is the author's choice, never a silent
change of class.
The chains are generated, not hand-written. marianne.instruments.tier_classes.tier_chains
reads the instrument catalog v2 (plugins/marianne/docs/ref/catalog/) and
applies these rules: only non-provisional tier claims count; only subscription,
free and local routes (never metered); superseded, deprecated, retired and
sunset models are skipped; each entry pins the lowest effort at which the model
reaches the tier and only an effort the profile maps (V335 would refuse the
rest); subscription routes come before free ones; and entries alternate
families so a fallback leaves the family that just failed. The packaged block in
classes/default.yaml (between the BEGIN/END generated markers) is the
output against the builtin profiles; regenerate it with
python -m marianne.instruments.tier_classes --catalog plugins/marianne/docs/ref/catalog --write-default
and never edit it by hand.
Your own layer is yours. mzt instruments classes tiers prints the three
chains as this machine resolves them from its registered profiles, with
availability; --write-proposal PATH writes a classes-file fragment you can
merge by hand into ~/.marianne/classes.yaml. It never writes a class layer
(it refuses a path that is one). A class you define in your layer replaces the
packaged chain whole; mzt instruments classes write does not emit tier
classes.
On the primary entry, a score, movement or sheet instrument_config.effort
wins over the class (null there restores the profile default); each fallback
entry uses only its own. V335 judges every entry against its own profile, and
V325 shows each entry's effort in the resolved chain. The packaged
default.yaml sets no effort. Other per-entry settings are refused because the
fallback path cannot carry them consistently. A score-level
instrument_config.model with a class primary is refused; put a fixed model in
a score alias instead.
movements¶
Source: src/marianne/core/config/job.py — JobConfig.movements
Movement declarations. Map of movement number to MovementDef. Movements are sequential execution
phases. Each movement can specify a name (for display in mzt status), an instrument
(overriding the score default), instrument configuration, and a voice count (shorthand for fan_out).
Movement numbers must be positive integers. The loader does not range-check
them against the stage count; a movement number with no sheet of its own is
silent at load and reported by V216 when it declares cadenzas — a cadenza
on a movement that has no sheet reaches nobody.
With sheet.size: 1 and sheet.start_item: 1, voices expands the movement
through the same fan-out engine as sheet.fan_out: dependencies, voice variables,
and sheet numbering all use the expanded sheets. An explicit sheet.fan_out
count takes precedence for that movement.
Declare the files a movement writes with produces:. Paths are workspace-relative
or {workspace}-prefixed; {sheet_num} expands to each concrete sheet number,
so fan-out voices can declare separate outputs. This is an ownership declaration:
it neither creates files nor verifies success. Keep output validations to check
the result. For the same path, explicit produces: ownership takes precedence
over sheet.stdout_to, which takes precedence over a sheet-gated file_exists
proxy. Independent paths from all three sources are combined. V108 suppresses
missing-file errors for declared cadenza outputs; V109 still warns if no producer
is a dependency ancestor. The foreign-artifact guard uses the same ownership map;
a shared declaration belongs to every voice that declares it.
movements:
1:
name: Planning
instrument: claude-code
2:
name: Implementation
voices: 3
produces:
- "{workspace}/implementation-{sheet_num}.md"
instrument: gemini-cli
instrument_config:
model: gemini-2.5-flash
3:
name: Review
instrument: claude-code
instrument_config:
timeout_seconds: 600
MovementDef Sub-Config¶
Source: src/marianne/core/config/job.py — MovementDef
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
name |
str \| None |
None |
Human-readable name for this movement. Shown in mzt status output. |
|
instrument |
str \| None |
None |
min_length=1 | Instrument for all sheets in this movement. Overrides the score-level instrument: but is overridden by per-sheet assignments. Can reference a score-local instruments: alias or a registered profile name. |
instrument_config |
InstrumentSettings |
{} |
Typed instrument overrides for this movement; unknown keys warn as V010/V011. | |
voices |
int \| None |
None |
>= 1 |
Number of parallel voices in this movement. Shorthand for fan_out: {N: voices}. |
produces |
list[str] |
[] |
Files this movement writes. Workspace-relative paths support {workspace} and {sheet_num}; each fan-out voice declares its own expanded outputs. Used for cadenza ordering and foreign-artifact checks; keep validations to check successful output. |
|
instrument_fallbacks |
list[str] |
[] |
Default fallback chain for sheets in this movement. Overrides score-level instrument_fallbacks. |
|
cadenzas |
list[MovementCadenzaItem] |
[] |
Context injections for every voice of this movement (GH #571). Each item is a prelude-shaped InjectionItem; the optional voice field narrows one item to a single fan-out voice, and paths may template on {{ voice }}. Read before the sheet.cadenzas items of each voice. |
Instrument resolution precedence (highest to lowest):
1. sheet.per_sheet_instruments (per-sheet override)
2. sheet.instrument_map (batch assignment)
3. movements.N.instrument (per-movement)
4. Top-level instrument: (score default)
5. claude-code (built-in default)
workspace_lifecycle¶
Source: src/marianne/core/config/workspace.py — WorkspaceLifecycleConfig
Controls how workspace files are handled across score iterations, particularly for self-chaining scores that reuse the same workspace.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
archive_on_fresh |
bool |
false |
Archive workspace files when --fresh flag is used. Moves non-preserved files to a numbered archive subdirectory. |
|
archive_dir |
str |
"archive" |
Subdirectory within workspace for archive storage. | |
archive_naming |
"iteration" \| "timestamp" |
"iteration" |
Naming scheme for archive directories. iteration reads .iteration file, timestamp uses current time. |
|
max_archives |
int |
0 |
>= 0 |
Maximum archive directories to keep. 0 = unlimited. When exceeded, oldest archives are deleted. |
scratch |
"remove" \| "keep" |
"remove" |
What happens to the job's scratch root <workspace>/.marianne-scratch when the job ends COMPLETED or FAILED. Every instrument receives its path as MARIANNE_SCRATCH; probe clones, mutants and worktrees belong there, not in a system temp directory, so nothing outlives the job (GH #460). keep leaves it for inspection. |
|
foreign_artifacts |
"warn" \| "quarantine" |
"warn" |
What happens when a sheet writes a file a later, non-ancestor sheet is declared to produce (its sheet-gated file_exists; GH #386). warn names it in the sheet's preflight warnings and leaves it; quarantine also moves it to <scratch>/quarantine/sheet-<N>/ before any downstream sheet can read it as upstream input, and the warning says where it went. |
|
preserve_patterns |
list[str] |
[".iteration", ".marianne-*", ".coverage", "archive/**", ".worktrees/**"] |
Glob patterns for files/directories to preserve (not archive). Matched against paths relative to workspace root. |
workspace_lifecycle:
archive_on_fresh: true
archive_dir: archive
max_archives: 10
scratch: remove # $MARIANNE_SCRATCH is deleted when the job ends
preserve_patterns:
- ".iteration"
- ".marianne-*"
- "archive/**"
bridge¶
Source: src/marianne/core/config/backend.py — BridgeConfig
Reserved score section: no runtime reader consumes bridge:. A score that sets
it receives V327; the retained syntax below does not enable Ollama MCP tools.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable bridge mode (Ollama with MCP tools) | |
mcp_proxy_enabled |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Enable MCP server proxy for tool access | |
mcp_servers |
list[MCPServerConfig] |
[] |
MCP servers to connect to | |
hybrid_routing_enabled |
bool |
false |
Reserved: no runtime reader (V327 warns when set). Enable hybrid routing between Ollama and Claude | |
complexity_threshold |
float |
0.7 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Complexity threshold for routing to Claude |
fallback_to_claude |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Fall back to Claude if Ollama execution fails | |
context_budget_percent |
int |
75 |
10–95 |
Reserved: no runtime reader (V327 warns when set). Percent of context window for tools (rest for conversation) |
MCP Server Sub-Config¶
Source: src/marianne/core/config/backend.py — MCPServerConfig
Each entry in bridge.mcp_servers.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
name |
str |
required | Unique name for this MCP server | |
command |
str |
required | Command to run the MCP server | |
args |
list[str] |
[] |
Command line arguments | |
env |
dict[str, str] |
{} |
Blocked keys: PATH, LD_PRELOAD, PYTHONPATH, API keys, etc. | Environment variables for the server |
working_dir |
str \| None |
None |
Working directory for the server | |
timeout_seconds |
float |
30.0 |
Timeout for server operations |
Retained syntax for the reserved bridge: section (V327 warns when a score sets it):
bridge:
enabled: true
mcp_proxy_enabled: true
mcp_servers:
- name: filesystem
command: "npx"
args: ["-y", "@anthropic/mcp-server-filesystem", "/home/user"]
hybrid_routing_enabled: true
complexity_threshold: 0.7
sheet¶
Source: src/marianne/core/config/job.py — SheetConfig
Defines how the work is divided into sheets (execution units).
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
size |
int |
1 |
>= 1 |
Number of items per sheet. One item per sheet is the default and what every shipped example uses; fan_out and voices require it. Set it higher only to batch items into fewer sheets |
total_items |
int |
required | >= 1 |
Total number of items to process |
start_item |
int |
1 |
>= 1 |
First item number (1-indexed) |
dependencies |
dict[int, list[int]] |
{} |
No self-references | Sheet dependency declarations. Map of sheet_num -> [prerequisites]. Sheets without entries are independent. |
skip_when |
dict[int, SkipWhenCommand] |
{} |
Conditional skip rules (#119, formerly skip_when_command; GH #570). Map of sheet_num -> SkipWhenCommand. Evaluated on fresh runs only; any doubt runs the sheet. Supports command predicates (exit 0 = skip, non-zero = run) and unchanged predicates (skip when inputs and products did not change since the last pass). Fail-open on timeout or error. |
|
stdout_to |
dict[int, str] |
{} |
Inside the workspace; V004 on a home-absolute path; V214 on a sheet outside the range | Per-sheet file for the instrument's full stdout (sheet.stdout_to). Map of sheet_num -> workspace-relative path (or {workspace}/...). The musician writes the whole reply there before validations run, so a sheet on an http profile, which has no filesystem, can meet file_exists/content_regex and hand the file to later sheets; stdout_tail keeps only the last 500 characters. A fanned-out stage gets one file per voice (answer-2.md, answer-3.md). A failed attempt writes nothing; a path that escapes the workspace is refused with a preflight warning. |
prompt_extensions |
dict[int, list[str]] |
{} |
Per-sheet prompt extensions. Map of sheet_num -> list of extension strings. Applied in addition to score-level prompt.prompt_extensions. |
|
prelude |
list[InjectionItem] |
[] |
Shared context injected into ALL sheets. Each item references a file and a category (context, skill, or tool). File paths support Jinja templating. Files are read at sheet execution time. |
|
cadenzas |
dict[int, list[InjectionItem]] |
{} |
Keys are concrete sheet numbers, also under fan-out; V216 outside the range | Per-sheet context injections. Map of sheet_num -> list of InjectionItems. Keys are concrete sheet numbers, also after fan-out expansion — under fan_out: {2: 3} a key 5 names the concrete sheet 5, not stage 5. To reach every voice of a stage, declare the cadenza on the movement: movements.<stage>.cadenzas (GH #571); a sheet reads its movement's items before its own sheet.cadenzas items. |
fan_out |
dict[int, int \| str] (authored YAML) |
{} |
Requires size=1, start_item=1; V338 when a '{{ variable }}' count cannot resolve |
Fan-out declarations. Map of numeric stage_num -> instance_count. Creates parallel instances of stages. Cleared after expansion. A count may instead be a quoted bare reference to one prompt.variables entry, '{{ chapter_count }}' (or a dotted '{{ book.count }}'), resolved at load to an integer 1-1000: the variable must be an integer or a string of ASCII digits with no sign (surrounding whitespace in the string is ignored), and an undeclared name, a non-integer or an out-of-range value is V338. Filters and arithmetic are refused. Literal counts are not capped. --var cannot change a width. The model field remains dict[int, int]; JobConfig resolves references before SheetConfig validates. |
fan_out_messaging |
"file" \| "none" |
"file" |
Fan-out messaging (fan_out.messaging conceptually). Use this sibling field, preserving the stage-to-count fan_out mapping. file prepares scratch-owned inboxes and adds polling instructions with sibling numbers and descriptions; none omits that prompt setup. Explicit use without concurrent voices emits V234 WARNING. |
|
fan_out_stage_map |
dict[int, dict[str, int]] \| None |
None |
Per-sheet fan-out metadata, populated by expansion. Survives serialization for resume support. | |
spec_tags |
dict[int, list[str]] |
{} |
Per-sheet spec fragment tag filters. Map of sheet_num -> list of tags. Only fragments matching at least one tag are injected for that sheet. Sheets without entries receive all fragments. |
|
descriptions |
dict[int, str] |
{} |
Human-readable labels for sheets (sheet.descriptions), map of sheet_num -> description; shown in mzt status. |
|
per_sheet_instruments |
dict[int, str] |
{} |
Positive int keys | Per-sheet instrument overrides. Map of sheet_num -> instrument_name. Highest precedence in the instrument resolution chain. Example: {3: 'gemini-cli', 5: 'codex-cli'}. |
per_sheet_instrument_config |
dict[int, InstrumentSettings] |
{} |
Per-sheet typed instrument overrides; unknown keys warn as V010/V011. Example: {3: {model: 'gemini-2.5-flash'}}. |
|
instrument_map |
dict[str, list[int]] |
{} |
No duplicate sheets | Batch instrument assignment. Map of instrument_name -> list of sheet numbers. Overrides score-level instrument for listed sheets. Overridden by per_sheet_instruments. A sheet cannot appear in multiple instrument lists. |
per_sheet_fallbacks |
dict[int, list[str]] |
{} |
Positive int keys | Per-sheet instrument fallback overrides. Map of sheet_num -> list of fallback instrument names. Replaces (does not merge with) inherited fallback chains. See Instrument Fallbacks. |
sheet:
size: 1
total_items: 7
dependencies:
2: [1]
3: [1]
4: [2, 3]
skip_when:
8:
command: 'grep -q "PHASES: 1" {workspace}/plan.md'
description: "Skip phase 2 if plan only has 1 phase"
timeout_seconds: 5
prelude:
- file: docs/architecture.md
as: context
- file: .claude/skills/debugging.md
as: skill
cadenzas:
3:
- file: "{{ workspace }}/02-output.md"
as: context
fan_out:
2: 3 # 3 parallel instances of stage 2
# Multi-instrument assignment
per_sheet_instruments:
3: gemini-cli # Sheet 3 uses Gemini
per_sheet_instrument_config:
3:
model: gemini-2.5-flash
instrument_map:
claude-code: [1, 2, 4, 5, 6, 7]
gemini-cli: [3]
Computed properties (not configurable):
- total_sheets — calculated as ceil((total_items - start_item + 1) / size)
- total_stages — original stage count before fan-out expansion
SkipWhenCommand Sub-Config¶
Source: src/marianne/core/config/execution.py — SkipWhenCommand
Defines a conditional skip rule for sheet execution (command or unchanged predicate). Exactly one of command or unchanged must be set. When the command exits 0, the sheet is skipped; when non-zero, it runs. When unchanged is true, the sheet is skipped if its inputs and declared products are unchanged since it last passed. On timeout, error, or evaluation doubt, the sheet runs (fail-open for safety).
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
command |
str \| None |
None |
(one of command / unchanged) |
Shell command to evaluate. Exit 0 = skip the sheet. Supports {workspace} template expansion. |
unchanged |
bool |
False |
(one of command / unchanged) |
Skip sheet if inputs and declared products are unchanged since last passed. Evaluated on fresh runs only. |
description |
str \| None |
None |
Human-readable reason for the skip condition | |
timeout_seconds |
float |
10.0 |
> 0, <= 60 |
Maximum seconds to wait for command. Command rules only; fail-open on timeout. |
sheet:
size: 1
total_items: 10
skip_when:
# Skip sheet 4 if tests already pass
4:
command: "cd {workspace} && pytest tests/ -x --tb=no -q"
description: "Skip if tests already pass"
timeout_seconds: 30
# Skip sheet 5 if inputs and outputs are unchanged since it last passed
5:
unchanged: true
description: "Skip re-drafting if inputs are unchanged"
# Skip sheet 8 if a marker file exists
8:
command: "test -f {workspace}/phase2-complete.marker"
description: "Skip phase 2 cleanup if already done"
InjectionItem Sub-Config¶
Source: src/marianne/core/config/job.py — InjectionItem
A single injection item referencing a file or a directory with a category. Used in prelude (all sheets), in cadenzas (per-sheet) and in a movement's cadenzas (every voice of the movement; those items may also set voice) to inject file content into prompts at category-appropriate locations. Exactly one of file or directory must be specified.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
file |
str \| None |
None |
mutually exclusive with directory |
Path to a single file to inject. Supports Jinja templating (e.g., {{ workspace }}/context.md). {{ score_dir }} anchors to the score file's directory. |
directory |
str \| None |
None |
mutually exclusive with file |
Path to a directory whose files are ALL injected (directory cadenza). Text files inject inline; binary files inject as structured read instructions with absolute paths. Supports Jinja templating. NOT recursive — only immediate children are injected; flatten or list subdirectories as separate items. |
as |
InjectionCategory |
required | "context", "skill", or "tool" |
Category determining prompt placement. See InjectionCategory below. |
required |
bool |
false |
Fail the sheet before execution when this attachment cannot be read. Persistent-agent identity, memory, and every load-bearing cadenza attachment should set this true — missing context then fails loudly instead of silently running degraded. Runtime context-delivery receipts record the resolved paths and hashes actually assembled into the prompt. |
|
max_bytes |
int \| None |
None |
> 0 |
Cap on the bytes this item injects (a directory sums its files). Over the cap, a required item fails the sheet before execution with the measured size; an optional item is dropped with a warning — never shipped as an over-sized prompt. Give every cadenza ledger that grows with every sheet (an active/ directory, a memory file) a cap; mzt validate reports V334 when a static path is already over it: an ERROR for a required item (the sheet cannot run), a WARNING for an optional one (GH #474, #515). The composing release checker measures the same files, so a lock cannot be written over a required item that cannot inject. Every attempt records what each item delivered (path, sha256, bytes) or why it was dropped as the sheet's prompt_receipt (GH #546; see mzt status --json in the CLI reference). |
voice |
int \| None |
None |
>= 1; movement cadenzas only |
Legal only on a movement cadenza item (movements.<n>.cadenzas[], GH #571): deliver the item to one voice of the movement — the fan-out instance number, 1-based. Unset reaches every voice. A voice spelled on a prelude or sheet.cadenzas item is an unknown field there: it is stripped and reported as a V010 warning that names movements.cadenzas.voice as its home. Not the same thing as the {{ voice }} template variable, which renders per voice inside a path (1 on a movement with a single voice). |
InjectionCategory values:
| Value | Prompt Placement | Purpose |
|---|---|---|
context |
After template body | Background knowledge and informational context |
skill |
After preamble (before template body) | Capability, methodology, or instructions |
tool |
After preamble (before template body) | Executable actions and available tooling |
sheet:
prelude:
- file: docs/architecture.md
as: context
- directory: "{{ score_dir }}/inputs" # every file in the directory
as: context
- file: .claude/skills/debugging.md
as: skill
required: true
cadenzas:
3:
- file: "{{ workspace }}/02-output.md"
as: context
Key behaviors:
- Items are read at sheet execution time, not config parse time — so dynamic outputs from earlier sheets are available via Jinja-templated paths.
- A common pattern: a small cli preflight stage curates/copies relevant files into one flat directory that a later sheet's directory: cadenza points at.
- Missing files for context category log a warning and are skipped — unless required: true, which fails the sheet before execution.
- Missing files for skill or tool category log an error and are skipped — set required: true to make the failure terminal.
- mzt validate checks static prelude/cadenza input paths (V108 ERROR) but skips Jinja-templated paths that cannot be resolved at validation time.
techniques¶
Source: src/marianne/core/config/techniques.py — TechniqueConfig
ECS-style technique components attached to a score or agent. The baton resolves active techniques for a sheet during agent-cycle phases; the compiler's technique wirer reads these declarations and injects the appropriate manifests, MCP access, and protocol config into each phase's cadenza context. Techniques are composable — multiple kinds may be attached simultaneously.
techniques:
a2a:
kind: protocol
phases: [recon, plan, work, integration, inspect, aar]
github:
kind: mcp
phases: [recon, work, integration]
config:
server: github
transport: stdio
mateship:
kind: skill
phases: [plan, aar]
config:
path: techniques/mateship.md
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
kind |
TechniqueKind |
required | skill, mcp, or protocol |
Component kind. skill — text-based methodology (memory protocol, mateship, coordination). mcp — MCP server tools via the shared pool. protocol — communication protocols (A2A, coordination). |
phases |
list[str] |
required | Phases where the technique is available (e.g., recon, plan, work, integration, inspect, aar). Empty list = declared but not active in any phase. Numbered movements map onto the same names (1→recon, 2→plan, 3→work, 4→integration, 5→inspect, 6→aar, later→work), and a declaration listing the sheet's movement number as a phase entry matches that movement. | |
required |
bool |
false |
Fail dispatch when an active skill technique document cannot be resolved. Modern persistent-agent specialist techniques should set this true. |
|
config |
dict |
{} |
Kind-specific configuration. mcp: server name, transport. skill: path to the skill document. protocol: protocol-specific settings. |
spec¶
Source: src/marianne/core/config/spec.py — SpecCorpusConfig
Configuration for the specification corpus. Controls where spec fragments are loaded
from and how they are filtered for injection into agent prompts. Spec loading is opt-in —
set spec_dir to enable.
| Field | Type | Default | Description |
|---|---|---|---|
spec_dir |
str |
"" |
Path to the specification corpus directory, relative to the project root. Empty string disables spec loading. |
include_claude_md |
bool |
false |
Include CLAUDE.md as a spec fragment. The loader looks for CLAUDE.md in the project root and includes it with name='claude_md'. |
When spec_dir is set, Marianne loads all YAML files in that directory as spec fragments.
Each fragment has a name, tags, kind, and content. Tags are used for per-sheet filtering
via sheet.spec_tags in SheetConfig — a map of sheet_num -> list of tags. Sheets
with spec_tags receive only fragments matching those tags; sheets without spec_tags
receive all fragments.
Each fragment file follows this schema (spec.fragments):
| Field | Type | Description |
|---|---|---|
name |
str |
Fragment identifier used in filtering logs |
tags |
list[str] |
Tags matched against sheet.spec_tags |
kind |
str |
Fragment kind label |
content |
str |
The fragment body injected into prompts |
data |
dict |
Structured payload for tool-driven fragments |
prompt¶
Source: src/marianne/core/config/job.py — PromptConfig
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
template |
str \| None |
None |
Cannot set both template and template_file |
Inline Jinja2 template |
template_file |
Path \| None |
None |
Cannot set both template and template_file |
Path to external .j2 template file |
variables |
dict[str, Any] |
{} |
Static variables available in template | |
stakes |
str \| None |
None |
Motivational stakes section appended to prompt | |
thinking_method |
str \| None |
None |
Thinking methodology injected into prompt | |
prompt_extensions |
list[str] |
[] |
Additional directives appended after the rendered task for all sheets. Entries are literal strings, not file loads or Jinja templates. Use prelude/cadenza attachments for file contents. Per-sheet extensions are appended after score-level extensions. Raw prompt mode omits extensions. |
For template variable reference, see the Score Writing Guide.
prompt:
template: |
Process items {{ start_item }} through {{ end_item }}.
Focus on: {{ variables.focus_area }}
variables:
focus_area: "error handling"
stakes: "This code will be deployed to production."
thinking_method: "Review failure modes before writing changes."
prompt_extensions:
- "Always write unit tests for new code."
- "Follow the existing code style in the project."
parallel¶
Source: src/marianne/core/config/execution.py — ParallelConfig
Enables running multiple sheets concurrently when the dependency DAG permits.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable parallel sheet execution | |
max_concurrent |
int |
3 |
1–10 |
Maximum sheets to execute concurrently |
fail_fast |
bool |
true |
Stop starting new sheets when one fails | |
stagger_delay_ms |
int |
0 |
0–5000 |
Delay in milliseconds between launching parallel sheets. Reduces rate limit surge when many sheets hit the same API. |
budget_partition |
bool |
true |
Not yet implemented | Reserved: no runtime reader (V327 warns when set). Partition cost budget across parallel branches. Accepted but not enforced; cost checks use global total. |
parallel:
enabled: true
max_concurrent: 3
fail_fast: true
stagger_delay_ms: 150 # 150ms between launches
retry¶
Source: src/marianne/core/config/execution.py — RetryConfig
Controls retry behavior including partial completion recovery.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
max_retries |
int |
3 |
>= 0 |
Maximum retry attempts per sheet |
base_delay_seconds |
float |
10.0 |
> 0, must be <= max_delay_seconds |
Initial delay between retries |
max_delay_seconds |
float |
3600.0 |
> 0 |
Maximum delay cap (1 hour) |
exponential_base |
float |
2.0 |
> 1 |
Exponential backoff multiplier |
jitter |
bool |
true |
Add randomness to delays | |
startup_failure_floor_seconds |
float |
120.0 |
>= 0 |
Minimum backoff after a startup failure: an attempt that exited non-zero within startup_failure_window_seconds did no work (the harness could not boot: locked local store, session not found, provider refused at launch). Raises the computed backoff to at least this; a longer backoff is unchanged; 0 disables (GH #470) |
startup_failure_window_seconds |
float |
60.0 |
> 0 |
An execution failure whose attempt lasted no longer than this is a startup failure. Timeouts, signals and rate limits never are |
max_completion_attempts |
int |
5 |
>= 0 |
Maximum completion prompt attempts before full retry |
completion_delay_seconds |
float |
5.0 |
>= 0 |
Reserved: no runtime reader (V327 warns when set). Delay between completion attempts (seconds) |
completion_threshold_percent |
float |
50.0 |
> 0, <= 100 |
Minimum pass percentage to trigger completion mode |
Completion mode: When a sheet partially passes validation (more than completion_threshold_percent), Marianne sends a targeted "complete the remaining work" prompt instead of a full retry. This is more efficient and preserves already-completed work.
Release behavior change: Earlier baton releases entered completion mode for any partial pass, ignoring this key. Now a result must exceed the threshold; results at or below it spend the ordinary retry budget. The default threshold is 50%, so scores that set 50 intentionally gain this gate. A value of 100 never enters completion mode.
retry:
max_retries: 5
base_delay_seconds: 15
max_delay_seconds: 600
exponential_base: 2.0
jitter: true
max_completion_attempts: 3
completion_threshold_percent: 50.0
rate_limit¶
Source: src/marianne/core/config/execution.py — RateLimitConfig
Reserved score section: the runtime does not read rate_limit:. A score that
sets it receives V327. Use a configured instrument profile for provider rate
handling; the table below describes retained syntax, not active behaviour.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
detection_patterns |
list[str] |
["rate.?limit", "usage.?limit", "quota", "too many requests", "429", "capacity", "try again later"] |
Must be valid regex | Regex patterns to detect rate limiting in output |
wait_minutes |
int |
60 |
>= 1 |
Reserved: no runtime reader (V327 warns when set). Minutes to wait when rate limited |
max_waits |
int |
24 |
>= 1 |
Reserved: no runtime reader (V327 warns when set). Maximum wait cycles (24 = 24 hours) |
max_quota_waits |
int |
48 |
>= 1 |
Reserved: no runtime reader (V327 warns when set). Maximum quota exhaustion wait cycles before failing (48 = 48 hours at 60min/wait) |
Retained syntax for the reserved rate_limit: section (V327 warns when a score sets it):
rate_limit:
detection_patterns:
- "rate.?limit"
- "too many requests"
- "429"
wait_minutes: 30
max_waits: 48
circuit_breaker¶
Source: src/marianne/core/config/execution.py — CircuitBreakerConfig
Reserved score section: the runtime does not read circuit_breaker:. A score
that sets it receives V327. The table below describes retained syntax, not
active CLOSED → OPEN → HALF_OPEN behaviour.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
true |
Enable circuit breaker pattern | |
failure_threshold |
int |
5 |
1–100 |
Consecutive failures before opening circuit |
recovery_timeout_seconds |
float |
300.0 |
> 0, <= 3600 |
Reserved: no runtime reader (V327 warns when set). Seconds in OPEN state before testing recovery (max 1 hour) |
cross_workspace_coordination |
bool |
true |
Reserved. In-process cross-job rate-limit coordination is structural (all jobs share one conductor) and always on; reserved for future cross-process coordination. | |
honor_other_jobs_rate_limits |
bool |
true |
Reserved. A rate limit detected by any job already pauses dispatch to that instrument for all jobs (matches this default). Setting false has no effect in-process. |
Retained syntax for the reserved circuit_breaker: section (V327 warns when a score sets it):
circuit_breaker:
enabled: true
failure_threshold: 5
recovery_timeout_seconds: 300
cross_workspace_coordination: true
cost_limits¶
Source: src/marianne/core/config/execution.py — CostLimitConfig
Prevents runaway costs by tracking token usage. When enabled, at least one of max_cost_per_sheet or max_cost_per_job must be set.
The baton arms the per-sheet cap for every sheet at registration and recovery;
an attempt that takes a sheet above its cap fails the sheet, including an
otherwise successful attempt.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable cost tracking and limit enforcement | |
max_cost_per_sheet |
float \| None |
None |
> 0 |
Maximum cost per sheet in USD |
max_cost_per_job |
float \| None |
None |
> 0 |
Maximum cost for entire score in USD |
cost_per_1k_input_tokens |
float |
0.003 |
> 0 |
Reserved: no runtime reader (V327 warns when set). Cost per 1000 input tokens (Claude Sonnet default: $0.003) |
cost_per_1k_output_tokens |
float |
0.015 |
> 0 |
Reserved: no runtime reader (V327 warns when set). Cost per 1000 output tokens (Claude Sonnet default: $0.015) |
warn_at_percent |
float |
80.0 |
> 0, <= 100 |
Reserved: no runtime reader (V327 warns when set). Emit warning at this percentage of limit |
Model-specific rates: Default rates are for Claude Sonnet. For Opus, use cost_per_1k_input_tokens: 0.015 and cost_per_1k_output_tokens: 0.075.
Default-off sections and V329¶
This release, a section with enabled: false stays off when you set a sibling
value but omit enabled. mzt validate emits V329 for readable sections such
as parallel, stale_detection, isolation, code_execution, judgment,
and concert. From the next release,
those settings will enable their section automatically. Write enabled: true
for current behavior, or explicit enabled: false to keep it off later.
The unread ai_review, bridge, checkpoints, feedback, grounding,
learning.exploration_budget, learning.entropy_response, and
learning.auto_apply sections remain reserved and emit V327 instead;
V329 does not promise that they will run.
stale_detection¶
Source: src/marianne/core/config/execution.py — StaleDetectionConfig
Detects hung sheet executions that produce no output.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable stale execution detection | |
idle_timeout_seconds |
float |
300.0 |
> 0 |
Maximum seconds of inactivity before marking stale. Recommended minimum 120s for LLM workloads. |
check_interval_seconds |
float |
30.0 |
> 0, must be < idle_timeout_seconds |
How often to check for idle executions |
max_idle_checks_before_kill |
int |
3 |
>= 1 |
Consecutive idle-and-still-alive checks before an idle sheet is killed (#344). 1 = kill on first idle check. |
watch_paths |
list[str] |
[] |
Directories outside the score workspace whose file writes count as activity (GH #516). Idle is measured from the newest write under the sheet's workspace; a musician that builds in the project's git worktree or a scratch clone writes nowhere the detector looks and is killed as idle while working. ~ and {{ workspace }}/{{ project_root }} templates allowed; an absent directory is ignored. |
stale_detection:
enabled: true
idle_timeout_seconds: 300
check_interval_seconds: 30
watch_paths: ["{{ project_root }}", "~/Projects/WORKSPACES/my-part"] # builds outside the workspace
cross_sheet¶
Source: src/marianne/core/config/workspace.py — CrossSheetConfig
Enables passing outputs and files between sheets. Set to null or omit to disable. When configured, later sheets can access {{ previous_outputs[N] }} and {{ previous_files }} in templates.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
auto_capture_stdout |
bool |
false |
Include previous sheets' stdout_tail in context |
|
max_output_chars |
int |
2000 |
> 0 |
Maximum characters per previous sheet output |
capture_files |
list[str] |
[] |
File path patterns to read between sheets. Supports Jinja2 templating. | |
lookback_sheets |
int |
3 |
>= 0 |
Number of previous sheets to include. 0 = all completed. |
cross_sheet:
auto_capture_stdout: true
max_output_chars: 4000
lookback_sheets: 5
capture_files:
- "{{ workspace }}/sheet-{{ sheet_num - 1 }}.md"
validate¶
Source: src/marianne/core/config/job.py — ValidateConfig
Score-local acknowledgement of advisory validation findings:
Only known WARN and INFO codes may be suppressed. Listing an ERROR code or an
unknown code emits V012 ERROR. Suppressed warnings do not fail mzt validate
--strict; they are listed in JSON suppressed while the existing valid and
issue-count keys retain their meanings. Use suppression only after reading the
finding in the score's context.
Validation dependency failures¶
When a profile or class-state operation raises inside a guarded preflight
check, Marianne logs validation.profiles_unavailable_skip at WARNING level
with exception information and a check identifier. Checks with multiple
guarded operations also include operation to identify the failed step.
| Affected check or summary | Fallback after the logged exception |
|---|---|
| Raw shell prompts (V307) | Profile loading failure returns no findings; class-map loading failure continues shell checks without custom class resolution. |
| Loop cost limits (V228) | Profile loading failure skips the cost check. |
| MCP instrument capabilities (V302) | Built-in profile loading failure skips the capability check. |
| Capability-class checks (V310, V311, V321–V325) | Profile/class-map loading failure skips the affected check. V311 also continues without response-format collection if that step fails; V323 skips on class-snapshot failure. |
| JSON class summary | Profile/class-map loading failure leaves layers, used, per_sheet, and failures as empty lists. |
These log warnings are separate from ValidationIssue findings: they do not
themselves change the exit code, trigger --strict, or appear in JSON issue
counts. validate.suppress applies to V-code findings, not these log events.
An empty result after a loading failure does not establish that the skipped
checks passed. Repair the reported failure and rerun validation. An exception
that escapes a check still becomes an ERROR finding in the validation runner.
No new score setting is required to enable these diagnostics.
validations¶
Source: src/marianne/core/config/execution.py — ValidationRule
A list of validation rules applied after each sheet execution. Supports staged execution — validations run in stage order, and if any validation in a stage fails, higher stages are skipped.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
type |
"file_exists" \| "file_modified" \| "content_contains" \| "content_regex" \| "command_succeeds" \| "path_in_scope" \| "field_match" \| "file_sha256" \| "csv_unique_key" |
required | Validation type | |
path |
str \| None |
None |
Required for file_exists, file_modified, content_contains, content_regex, path_in_scope, field_match, file_sha256, csv_unique_key |
File path. Supports {sheet_num}, {workspace} templates. |
pattern |
str \| None |
None |
Required for content_contains, content_regex. Must be valid regex for content_regex. |
Pattern for content matching |
command |
str \| None |
None |
Required for command_succeeds |
Shell command to run |
working_directory |
str \| None |
None |
Working directory for command (defaults to workspace) | |
path_scope |
str \| None |
None |
Optional for path_in_scope |
Allowed root for canonical path checks; defaults to {workspace} |
field_path |
str \| None |
None |
Required for field_match |
Dot/bracket JSON/YAML field path, such as summary.total or positions[0].symbol |
expected_value |
Any \| None |
None |
Optional for field_match |
Literal comparison value. If omitted, set source_path. Use expected_value: null to compare against an explicit JSON/YAML null. |
source_path |
str \| None |
None |
Optional for field_match |
Reference JSON/YAML file for source-field comparisons |
source_field_path |
str \| None |
None |
Optional for field_match |
Reference field path; defaults to field_path |
sha256 |
str \| None |
None |
Required for file_sha256 |
Expected 64-character SHA-256 hex digest |
key_field |
str \| None |
None |
Required for csv_unique_key |
CSV column whose values must be unique |
description |
str \| None |
None |
Human-readable description | |
stage |
int |
1 |
1–10 |
Validation stage. Lower stages run first; fail-fast on failure. |
condition |
str \| None |
None |
Condition for when this validation applies. See Condition syntax below. | |
retry_count |
int |
3 |
0–10 |
Retry attempts for file-based validations (helps with filesystem race conditions) |
retry_delay_ms |
int |
200 |
0–5000 |
Delay between retries in milliseconds |
Validation types:
| Type | Required Fields | What It Checks |
|---|---|---|
file_exists |
path |
File exists at the given path |
file_modified |
path |
File was modified during sheet execution |
content_contains |
path, pattern |
File contains the literal pattern string |
content_regex |
path, pattern |
File content matches the regex pattern |
command_succeeds |
command |
Shell command exits with code 0 |
path_in_scope |
path; optional path_scope |
Canonical path resolves inside an allowed root |
field_match |
path, field_path, and expected_value or source_path |
JSON/YAML field equals a literal or reference field |
file_sha256 |
path, sha256 |
File content matches a pinned SHA-256 digest |
csv_unique_key |
path, key_field |
CSV key column has no duplicate values |
Static preflight checks:
mzt validate also checks prompt/score contracts that are not runtime
validation rule types. Raw cli prompts are rendered with sheet variables and
checked as shell input: markdown headings, code fences, prose bullets, plain
prose, and bash -n parse failures are errors. Bash ${#...} length syntax in
Jinja templates is also an error because Jinja treats {# as a comment opener
and truncates the script. Fan-out scores with partial concrete instrument
assignment coverage produce warnings, as do exact section-label
content_contains validations whose literal label is absent from the prompt
template. Raw shell sheets that inherit non-raw LLM-style fallbacks warn because
that fallback can change deterministic shell intent into interpretive work.
Condition syntax:
Conditions control when a validation rule applies. Each condition compares a context variable against an integer value.
| Operator | Example | Meaning |
|---|---|---|
>= |
sheet_num >= 3 |
Greater than or equal |
<= |
stage <= 2 |
Less than or equal |
== |
instance == 1 |
Equal |
!= |
fan_count != 1 |
Not equal |
> |
sheet_num > 5 |
Greater than |
< |
total_stages < 4 |
Less than |
Boolean AND: Combine multiple conditions with " and " (space-delimited). All conditions must be true.
Available context variables:
| Variable | Type | Description |
|---|---|---|
sheet_num |
int |
Current sheet number (1-indexed) |
total_sheets |
int |
Total number of sheets |
start_item |
int |
First item number for this sheet |
end_item |
int |
Last item number for this sheet |
stage |
int |
Logical stage number (equals sheet_num when no fan-out) |
instance |
int |
Instance within fan-out group (1-indexed, default 1) |
fan_count |
int |
Total instances in this stage's fan-out group (default 1) |
total_stages |
int |
Original stage count before fan-out expansion |
For recognized comparison conditions, any variable that is missing or non-integer is treated as false. An unrecognized condition format still passes for compatibility.
validations:
# Stage 1: Check files exist
- type: file_exists
path: "{workspace}/output-{sheet_num}.md"
stage: 1
description: "Output file created"
# Stage 2: Run tests
- type: command_succeeds
command: "pytest tests/ -x"
stage: 2
description: "Tests pass"
# Stage 3: Code quality (only from sheet 3 onward)
- type: command_succeeds
command: "ruff check src/"
stage: 3
condition: "sheet_num >= 3"
description: "Lint clean"
# Only for fan-out primary instances
- type: command_succeeds
command: "python merge_results.py"
stage: 3
condition: "fan_count > 1 and instance == 1"
description: "Merge fan-out results (primary instance only)"
isolation¶
Source: src/marianne/core/config/workspace.py — IsolationConfig
Git worktree isolation for parallel-safe score execution. Each score runs in an isolated git working directory.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable worktree isolation | |
mode |
"none" \| "worktree" |
"worktree" |
Isolation method. Currently only worktree is supported. |
|
worktree_base |
Path \| None |
None |
Directory for worktrees. None resolves to <repo>/.worktrees at runtime. |
|
branch_prefix |
str |
"marianne" |
Pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$ |
Reserved: no runtime reader (V327 warns when set). Prefix for worktree branch names. Format: {prefix}/{job-id} |
source_branch |
str \| None |
None |
Branch to base worktree on. Default: current branch (HEAD). | |
cleanup_on_success |
bool |
true |
Remove worktree after successful score completion | |
cleanup_on_failure |
bool |
false |
Remove worktree when score fails. Default false for debugging. |
|
lock_during_execution |
bool |
true |
Lock worktree during execution with git worktree lock |
|
fallback_on_error |
bool |
true |
Continue without isolation if worktree creation fails |
Warning: Enabling both
parallelandisolationcauses parallel sheets to share the same worktree. Ensure parallel sheets don't write to overlapping paths.
grounding¶
Source: src/marianne/core/config/learning.py — GroundingConfig
Reserved score section: no runtime code reads grounding:. A score that sets
it receives V327. The table below describes retained syntax, not an active
grounding pass; validate outputs with validations: instead.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable external grounding hooks | |
hooks |
list[GroundingHookConfig] |
[] |
Grounding hook configurations | |
fail_on_grounding_failure |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Fail validation if grounding fails | |
escalate_on_failure |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Escalate to human if grounding fails (requires escalation handler) | |
timeout_seconds |
float |
30.0 |
> 0 |
Maximum time per grounding hook |
Grounding Hook Sub-Config¶
Source: src/marianne/core/config/learning.py — GroundingHookConfig
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
type |
"file_checksum" |
required | Hook type | |
name |
str \| None |
None |
Custom name (uses type if not specified) | |
expected_checksums |
dict[str, str] |
{} |
Reserved: no runtime reader (V327 warns when set). Map of file path to expected checksum | |
checksum_algorithm |
"md5" \| "sha256" |
"sha256" |
Reserved: no runtime reader (V327 warns when set). Checksum algorithm |
Retained syntax for the reserved grounding: section (V327 warns when a score sets it):
grounding:
enabled: true
hooks:
- type: file_checksum
name: critical_files
expected_checksums:
"output.py": "abc123..."
checksum_algorithm: sha256
conductor¶
Source: src/marianne/core/config/orchestration.py — ConductorConfig
Identifies who (or what) is conducting the job. Affects escalation behavior and output formatting.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
name |
str |
"default" |
1–100 chars | Human-readable conductor name |
role |
"human" \| "ai" \| "hybrid" |
"human" |
Role classification | |
identity_context |
str \| None |
None |
Max 500 chars | Reserved: no runtime reader (V327 warns when set). Brief description of the conductor's identity/purpose |
preferences |
ConductorPreferences |
(see sub-config) | Reserved: no runtime reader (V327 warns when set). Conductor interaction preferences |
Conductor Preferences Sub-Config¶
Source: src/marianne/core/config/orchestration.py — ConductorPreferences
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
prefer_minimal_output |
bool |
false |
Reserved: no runtime reader (V327 warns when set). Reduce console output verbosity | |
escalation_response_timeout_seconds |
float |
300.0 |
> 0 |
Reserved: no runtime reader (V327 warns when set). Maximum time to wait for escalation response (defaults to abort after timeout) |
auto_retry_on_transient_errors |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Automatically retry transient errors before escalating | |
notification_channels |
list[str] |
[] |
Reserved: no runtime reader (V327 warns when set). Preferred notification channels. Empty = use job-level settings. |
The whole conductor: score section is deprecated (V328): nothing reads it,
and conductor behaviour lives in ~/.marianne/conductor.yaml. Omit it.
concert¶
Source: src/marianne/core/config/orchestration.py — ConcertConfig
Concert orchestration chains multiple jobs in sequence. Each job can dynamically generate the config for the next.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable concert mode (job chaining via on_success hooks) |
|
max_chain_depth |
int |
5 |
1–100 |
Maximum chained jobs. Prevents infinite loops. |
cooldown_between_jobs_seconds |
float |
30.0 |
>= 0 |
Minimum wait between job transitions |
inherit_workspace |
bool |
true |
Child jobs inherit parent workspace if not explicitly specified | |
concert_log_path |
Path \| None |
None |
Reserved: no runtime reader (V327 warns when set). Consolidated concert log (default: workspace/concert.log) |
|
abort_concert_on_hook_failure |
bool |
false |
Abort entire concert if any hook fails |
on_success (Post-Success Hooks)¶
Source: src/marianne/core/config/orchestration.py — PostSuccessHookConfig
A list of hooks that execute after successful job completion. The root
on_failure: key takes the same hook list for terminal job failure:
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
type |
"run_job" \| "run_command" \| "run_script" |
required | Hook type | |
job_path |
Path \| None |
None |
Required for run_job |
Path to job config YAML. Supports {workspace} template. |
job_workspace |
Path \| None |
None |
Override workspace for chained job | |
inherit_learning |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Chained job shares outcome store with parent | |
command |
str \| None |
None |
Required for run_command/run_script |
Shell command or script path. Supports {workspace}, {job_id}, {sheet_count}. |
working_directory |
Path \| None |
None |
Working directory for command (default: job workspace) | |
description |
str \| None |
None |
Human-readable description | |
on_failure |
"continue" \| "abort" |
"continue" |
Action if hook fails: continue to next or abort remaining. Prefer the if_hook_fails spelling — on_failure here collides with the sheet-trigger key of the same name (V328 warns). |
|
timeout_seconds |
float |
300.0 |
> 0 |
Maximum hook execution time (5 min default) |
detached |
bool |
false |
Reserved: no runtime reader for hook-level detach (V327 warns when set); the trigger-level concert: {detached: true} action is the one that detaches. |
|
pause_before_chain |
bool |
false |
For run_job: hold the chain trigger after this job completes (PAUSED_AT_CHAIN) until mzt resume. |
|
fresh |
bool |
false |
For run_job: pass --fresh to start with clean state. Required for self-chaining jobs. |
on_success:
- type: run_job
job_path: "{workspace}/next-phase.yaml"
description: "Chain to next phase"
fresh: true
- type: run_command
command: "curl -X POST https://api.example.com/notify"
description: "Notify deployment"
notifications¶
Source: src/marianne/core/config/orchestration.py — NotificationConfig
A list of notification channel configurations.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
type |
"desktop" \| "slack" \| "webhook" \| "email" |
required | Notification channel type | |
on_events |
list[str] |
["job_complete", "job_failed"] |
Valid events: job_start, sheet_start, sheet_complete, sheet_failed, job_complete, job_failed, job_paused |
Events that trigger this notification |
config |
dict[str, Any] |
{} |
Channel-specific configuration |
notifications:
- type: desktop
on_events: [job_complete, job_failed]
- type: webhook
on_events: [sheet_failed]
config:
url: "https://hooks.slack.com/..."
learning¶
Source: src/marianne/core/config/learning.py — LearningConfig
Controls outcome recording, confidence thresholds, pattern application, and escalation.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
true |
Enable learning and outcome recording | |
outcome_store_type |
"json" \| "sqlite" |
"json" |
Backend for storing learning outcomes | |
outcome_store_path |
Path \| None |
None |
Reserved: no runtime reader (V327 warns when set). Path for outcome store (default: workspace/.marianne-outcomes.json) |
|
min_confidence_threshold |
float |
0.3 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Confidence below this triggers escalation (if enabled) |
high_confidence_threshold |
float |
0.7 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Confidence above this uses completion mode for partial failures |
escalation_enabled |
bool |
false |
Enable escalation for low-confidence decisions | |
use_global_patterns |
bool |
true |
Query and apply patterns from global learning store | |
exploration_rate |
float |
0.15 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Epsilon-greedy exploration rate. 0.0 = pure exploitation, 1.0 = try everything. |
exploration_min_priority |
float |
0.05 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Minimum priority threshold for exploration candidates |
entropy_alert_threshold |
float |
0.5 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Shannon entropy below this triggers alert for low diversity |
entropy_check_interval |
int |
100 |
>= 1 |
Reserved: no runtime reader (V327 warns when set). Check entropy every N pattern applications |
auto_apply_enabled |
bool |
false |
Deprecated — use auto_apply block |
Reserved: no runtime reader (V327 warns when set). Enable auto-apply for high-trust patterns |
auto_apply_trust_threshold |
float |
0.85 |
0.0–1.0 |
Deprecated — use auto_apply block |
exploration_budget |
ExplorationBudgetConfig |
(see sub-config) | Dynamic exploration budget configuration | |
entropy_response |
EntropyResponseConfig |
(see sub-config) | Reserved: no runtime reader (V327 warns when set). Automatic entropy response configuration | |
auto_apply |
AutoApplyConfig \| None |
None |
Reserved: no runtime reader (V327 warns when set). Structured autonomous pattern application config (replaces flat fields) |
Exploration Budget Sub-Config¶
Source: src/marianne/core/config/learning.py — ExplorationBudgetConfig
Nested under learning.exploration_budget. Maintains a dynamic exploration budget that prevents convergence to zero.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable dynamic exploration budget | |
floor |
float |
0.05 |
0.0–1.0, must be <= ceiling |
Reserved: no runtime reader (V327 warns when set). Minimum exploration budget (never below this) |
ceiling |
float |
0.50 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Maximum exploration budget |
decay_rate |
float |
0.95 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Decay per check interval. budget = max(floor, budget * decay_rate) |
boost_amount |
float |
0.10 |
0.0–0.5 |
Reserved: no runtime reader (V327 warns when set). Budget boost when entropy is low. budget = min(ceiling, budget + boost_amount) |
initial_budget |
float |
0.15 |
0.0–1.0, must be between floor and ceiling |
Reserved: no runtime reader (V327 warns when set). Starting exploration budget |
Entropy Response Sub-Config¶
Source: src/marianne/core/config/learning.py — EntropyResponseConfig
Nested under learning.entropy_response. Automatically injects diversity when pattern entropy drops.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable automatic entropy response | |
entropy_threshold |
float |
0.3 |
0.0–1.0 |
Entropy level that triggers diversity injection |
cooldown_seconds |
int |
3600 |
>= 60 |
Minimum seconds between responses (1 hour default) |
boost_budget |
bool |
true |
Boost exploration budget on low entropy | |
revisit_quarantine |
bool |
true |
Mark quarantined patterns for review | |
max_quarantine_revisits |
int |
3 |
0–10 |
Max quarantined patterns to revisit per response |
Auto Apply Sub-Config¶
Source: src/marianne/core/config/learning.py — AutoApplyConfig
Nested under learning.auto_apply. Enables high-trust patterns to be applied without human confirmation.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable autonomous pattern application | |
trust_threshold |
float |
0.85 |
0.0–1.0 |
Reserved: no runtime reader (V327 warns when set). Minimum trust score for autonomous application |
max_patterns_per_sheet |
int |
3 |
1–10 |
Reserved: no runtime reader (V327 warns when set). Maximum patterns to auto-apply per sheet |
require_validated_status |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Require patterns to have VALIDATED quarantine status | |
log_applications |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Log when patterns are auto-applied |
memory¶
Source: src/marianne/core/config/memory.py — MemoryConfig, MemoryBackendDecl, MemoryCaps, MemoryDefaults
Declares named memory attachments for the score. At dispatch the conductor opens a gateway session per attachment active in the sheet's phase and hands the musician six memory tools through an MCP shim (see Delivery to a sheet below). The key validates with V340-V347 and V350. A score without memory: loads and runs exactly as before. memory: {} is legal and attaches one default files-backed memory.
The files and cam backends and access: inherit are available today.
memory:
backends:
main: # attachment name: ^[a-z][a-z0-9-]{0,31}$
system: files
scope: person/legion
access: inherit
trust: gateway-only
trust_native: false
phases: ["all"]
caps: {recall_cap_bytes: 16384, provenance: required}
settings: {}
defaults: {recall_cap_bytes: 32768, provenance: required, lock_timeout_seconds: 10.0}
| Field | Type | Default | Description |
|---|---|---|---|
memory.backends |
map | {} |
Named attachments; each name matches ^[a-z][a-z0-9-]{0,31}$ |
memory.backends.<k>.system |
string | required | Backend id: files or cam (V340) |
memory.backends.<k>.scope |
string | none (local:default) |
<family>/<id> or <family>:<id> (V344) |
memory.backends.<k>.access |
string | inherit |
inherit or grant:<name>[@<version>]; no grant store exists yet, so grants fail V347 (V346) |
memory.backends.<k>.trust |
enum | gateway-only |
gateway-only, backend or trusted |
memory.backends.<k>.trust_native |
bool | false |
Opt in to expose the backend's native tools |
memory.backends.<k>.phases |
list | ["all"] |
all, movement numbers, or movement names (V342) |
memory.backends.<k>.caps |
object | defaults | recall_cap_bytes (1024 to 1048576, not above the score default) and provenance (V345) |
memory.backends.<k>.settings |
map | {} |
Passed to the backend unchanged; for cam see below (V350) |
memory.defaults |
object | see below | Score-level defaults |
memory.defaults.recall_cap_bytes |
int | 32768 |
Per-recall page cap in bytes |
memory.defaults.provenance |
enum | required |
required or optional; the deprecated off is read as optional (V349 INFO note) |
memory.defaults.lock_timeout_seconds |
float | 10.0 |
Outer timeout for one memory call |
The cam backend¶
system: cam attaches CAM, a separate program with its own licence, as a second memory backend. Marianne reaches it only across a process boundary over CAM's HTTP API, using the standard library; it does not import, copy or depend on CAM, and a test enforces that.
The address of a CAM server and the source of its key belong to the operator, not to a score. They are set once in the conductor configuration, under a name:
# ~/.marianne/conductor.yaml (the operator's file; read at start and on every reload)
memory_backends:
cam:
default: # endpoint name; a score that names none gets `default`
base_url: http://127.0.0.1:8321 # loopback http, or https with allow_remote: true
api_key_env: CAM_API_KEY # the NAME of an environment variable, never the key
timeout_seconds: 10
lab:
base_url: https://cam.lab.example
api_key_file: ~/.secrets/cam-lab # or the path of a file that holds the key
allow_remote: true
A score only names the endpoint:
memory:
backends:
shared:
system: cam
scope: project/demo
settings:
endpoint: lab # optional; default `default`
timeout_seconds: 5 # optional; may tighten the endpoint's timeout
Conductor setting (memory_backends.cam.<name>) |
Description |
|---|---|
base_url |
Required. http://127.0.0.1 or http://localhost only; any other host needs allow_remote: true and https://. Checked when the conductor config loads |
api_key_env / api_key_file |
Exactly one: an environment variable name, or a file path holding the key. Names and paths only; the key is never in a config file, a log or an error |
timeout_seconds |
Per-request ceiling (default 10); each request also stops at the call deadline |
allow_remote |
Permit a non-loopback host (https only). Default false |
A score's settings for system: cam may hold only endpoint and timeout_seconds. A score that sets base_url, api_key_env, api_key_file or allow_remote is refused: V350 reports it at mzt validate, and the dispatch refuses it again with memory_delivery_unsupported (the score file is not trusted with the conductor's environment variables or files, so it cannot send a credential to a server it names). A endpoint the conductor does not define is refused the same way, naming the endpoint and the memory_backends.cam.<name> key to set. These configuration refusals and the instrument refusal below share the memory_delivery_unsupported: prefix in their text; the class, not the text, decides what the baton does — a configuration refusal is MEMORY_CONFIG_ERROR and fails the sheet at once with E301 (GH #572), an instrument refusal is MEMORY_DELIVERY_UNSUPPORTED and moves the sheet to the next instrument. memory_backends is read when the conductor starts and on every reload (mzt conductor reload, SIGHUP, or the watcher). A reload replaces the whole endpoint table: the next dispatch resolves against it, and a session that is already open keeps the backend it was opened with. A changed endpoint gets a new backend; a removed endpoint refuses the next dispatch that names it. An invalid edit is declined whole and the running endpoints are kept.
What it can do today: declare, recall and health (a CAM running without an embedding model reports degraded, since recall is then lexical). verify, bind, forget, fetch, stream_facts and migration_ingest are refused with E7 capability_unsupported naming the operation, because CAM has no such operation yet. CAM recall has no cursor, so a recall is trimmed to the call's byte cap at a fact boundary on Marianne's side and the omitted facts are only counted. Every Marianne principal appears to CAM as the one key's principal until CAM ships stamped principals; the scope is passed through as CAM's scope.
The conductor builds the backend with backend_factory("cam") from the named endpoint; a CAM that is down fails the dispatch of that sheet with the attachment's name, the same all-or-nothing rule as any attachment.
The test tests/memory/test_cam_backend_live.py starts CAM's own server from a local CAM checkout and runs a real declare, recall, health and wrong-key round trip. It is marked cam_live and skips itself unless a CAM checkout with its own virtual environment exists (default ~/Projects/cam, or the directory in MARIANNE_CAM_DIR); CI has no CAM, so it skips there.
The gateway socket endpoint¶
marianne.memory.gateway also contains an in-process Gateway (six calls: declare, recall, verify, bind, forget, fetch; grants; hash-chained audit log) and, in marianne.memory.gateway.endpoint, a Unix-socket endpoint with a small synchronous client (marianne.memory.gateway.client). One listening socket exists per session, at <run_dir>/s/s_<hash16>.sock inside a 0700 directory, and the socket is the session: a request never names a session, principal or scope. The conductor hosts it at dispatch (see "Delivery to a sheet" below). Admission is same-UID via SO_PEERCRED: this stops other users, but it does not stop another process of the same user that learns the socket path. The protections against siblings are only the unguessable per-dispatch path, the 0700 directory and one session per socket.
Three library pieces sit between a sheet and the gateway:
marianne.memory.shimis a stdio MCP server (python -m marianne.memory.shim [--memory-budget-seconds 10.0], with the socket path in theMARIANNE_MEMORY_SOCKETenvironment variable;--socket <path>is accepted for manual use but the conductor never passes it) exposing exactly the six tools and forwarding each over the socket. It carries no identity, clamps every call to the budget, refuses an over-long input line, returns a gateway refusal as a tool result withisError: true(code, subtype, message, remedy), and exits non-zero with one stderr line when the socket is gone at startup.marianne.memory.resolve.resolve_memory(config, phase, user=..., run_dir=...)is a pure function from thememory:key and a sheet's phase to frozenResolvedBindingvalues (clamped caps, a stable UUIDv5 attachment id, the per-dispatch socket path). Withmemory:absent it returns nothing; withmemory: {}it returns onedefaultbinding (files,local:default). It reuses the technique phase matcher.marianne.memory.manifestrenders the prompt block (six tools and attachment names only) and the MCP config entry (shim command,--memory-budget-seconds, and anenvblock holdingMARIANNE_MEMORY_SOCKET, nothing else).
Delivery to a sheet¶
At dispatch the conductor reads the score's memory: key (marianne.daemon.baton.memory_gate). A score without the key runs exactly as before: no gateway, no socket, no session. For a score with the key, before a backend is acquired the conductor resolves the attachments active in the sheet's phase, opens one gateway session per attachment (principal person:<user>, never shown to the musician), binds one Unix socket per session and writes one per-dispatch MCP config (<workspace>/.marianne-memory/<hash>/mcp.json, owner-only) containing the score's technique servers plus one memory-<name> server per attachment. The prompt gains a short block naming the six tools and the attachments. When the sheet ends, finishes, fails or is cancelled, the sockets and sessions close and the config file is removed.
- Delivery is all-or-nothing: if any attachment cannot be opened, nothing stays open and the sheet's dispatch fails with a message that names the attachment and the backend's reason (
Memory setup failed before backend acquisition). - Memory reaches an instrument only through an MCP config. An instrument whose profile has neither
mcp_config_flagnormcp_config_workspace_path(for examplecli, which has no model), or whose backend cannot be handed a config, is refused at dispatch withmemory_delivery_unsupported: <instrument>: <reason>; the backend is released and nothing is left open. - A memory session is never handed to the musician unannounced. The memory block (the manifest) and the open sessions come from one call, so a session that is open while the sheet carries no memory block can only mean a caller on the dispatch path dropped the manifest (GH #556). The sheet is refused at dispatch with
memory_manifest_missing: this dispatch opened memory sessions (<dispatch id>) but carries no memory block; refusing to run a memory sheet without announcing its memory, and the log carriesadapter.memory_manifest_missing. The sheet never runs, the backend is released and the sessions close. Unlike the refusals above this one is not caused by the score: a correct dispatch path cannot produce it, so there is nothing to change in the score.mzt statusshows the start of the message on the failed sheet andmzt diagnosereports it in full. Report it as a bug against the conductor with themzt diagnoseoutput and the conductor logs. - An instrument refusal is not retried on the instrument that refused it.
memory_delivery_unsupported: <instrument>: <reason>andmemory_manifest_missing(GH #556) are both classifiedMEMORY_DELIVERY_UNSUPPORTED: the sheet moves to the next instrument in its fallback chain if one is left, with the refused attempt un-charged, and each instrument is tried once. With no instrument left the sheet fails withE505and the refusal's message. - A configuration refusal (GH #572) — a
camattachment whosesettingsthe conductor cannot deliver: anendpointit does not define, an operator-only key, another unknown key, or anendpointthat is not a name — is classifiedMEMORY_CONFIG_ERRORand fails the sheet at once withE301: it is neither retried nor moved along the fallback chain (no instrument can deliver a misconfigured attachment), and it does not count against the instrument, which never ran. The message names the attachment, and for an unknown endpoint or an operator-only setting also thememory_backends.cam.<name>key. In a flow job the sheet'son_failtrigger still fires, and the instrument is not charged there either. After the operator adds the endpoint and runsmzt conductor reload, re-run the job withmzt resume <job> --from-sheet N— a running job no longer sits in a retry window during which a hot reload could rescue it. - Only
access: inheritis available. The backend is chosen bymemory.backends.<name>.system(filesorcam) throughmarianne.memory.backends.backend_factory. Files-backed memory lives under~/.marianne/memory/files, the audit log under~/.marianne/memory/audit, and sockets under~/.marianne/run/s. - The shim receives its socket path in the
MARIANNE_MEMORY_SOCKETenvironment variable, not on its command line. This hides the path from other users only: a process of the same user can read/proc/<pid>/environtoo, and all jobs of one conductor share one principal, so a sheet with a shell can reach another job's memory session if it finds the socket path. - A memory server name that already exists in the technique MCP config is refused rather than overwritten.
checkpoints¶
Source: src/marianne/core/config/learning.py — CheckpointConfig
Reserved score section: no runtime code reads checkpoints:. A score that
sets it receives V327. The table below describes retained syntax, not an
active confirmation gate.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable proactive checkpoints | |
triggers |
list[CheckpointTriggerConfig] |
[] |
Checkpoint triggers to evaluate before each sheet |
Checkpoint Trigger Sub-Config¶
Source: src/marianne/core/config/learning.py — CheckpointTriggerConfig
Each trigger must have at least one condition (sheet_nums, prompt_contains, or min_retry_count).
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
name |
str |
required | Trigger identifier | |
sheet_nums |
list[int] \| None |
None |
Specific sheet numbers to checkpoint | |
prompt_contains |
list[str] \| None |
None |
Keywords that trigger checkpoint (case-insensitive) | |
min_retry_count |
int \| None |
None |
>= 0 |
Trigger if retry count >= this value |
requires_confirmation |
bool |
true |
Require explicit confirmation vs. just warn | |
message |
str |
"" |
Custom message shown when triggered |
Retained syntax for the reserved checkpoints: section (V327 warns when a score sets it):
checkpoints:
enabled: true
triggers:
- name: production_warning
prompt_contains: ["production", "deploy", "delete"]
message: "This sheet may affect production systems"
- name: high_retry
min_retry_count: 3
requires_confirmation: false
message: "Sheet has been retried multiple times"
ai_review¶
Source: src/marianne/core/config/workspace.py — AIReviewConfig
Reserved score section: no runtime code reads ai_review:. A score that sets
it receives V327. The table below describes retained syntax, not an active
reviewer pass; a review is a sheet of its own (see the review examples).
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable AI code review | |
min_score |
int |
60 |
0–100, must be <= target_score |
Minimum score to pass. Below triggers action. |
target_score |
int |
80 |
0–100 |
Target score for high quality |
on_low_score |
"retry" \| "warn" \| "fail" |
"warn" |
Reserved: no runtime reader (V327 warns when set). Action when score < min_score |
|
max_retry_for_review |
int |
2 |
0–5 |
Reserved: no runtime reader (V327 warns when set). Maximum retries when score is too low |
review_prompt_template |
str \| None |
None |
Custom prompt template for review |
Retained syntax for the reserved ai_review: section (V327 warns when a score sets it):
logging¶
Source: src/marianne/core/config/workspace.py — LogConfig
Reserved score section: the runtime does not read logging:. A score that sets
it receives V327. Set daemon logging under ~/.marianne/conductor.yaml; the
table below describes retained score syntax, not active log routing.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
level |
"DEBUG" \| "INFO" \| "WARNING" \| "ERROR" |
"INFO" |
Minimum log level | |
format |
"json" \| "console" \| "both" |
"console" |
file_path required when "both" |
Output format. The JSON renderer always serializes with ensure_ascii=True (issue #495): the JSON log stream may share stdout with --json machine output, so log records can never emit non-ASCII bytes regardless of configuration |
file_path |
Path \| None |
None |
Log file output path | |
max_file_size_mb |
int |
50 |
1–1000 |
Maximum log file size before rotation (MB). Rotation renames inline; gzip runs on a helper thread so the event loop never waits on it |
backup_count |
int |
5 |
0–100 |
Rotated log files to keep |
include_timestamps |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Include ISO8601 UTC timestamps | |
include_context |
bool |
true |
Reserved: no runtime reader (V327 warns when set). Include bound context (job_id, sheet_num) |
Retained syntax for the reserved logging: section (V327 warns when a score sets it):
feedback¶
Source: src/marianne/core/config/workspace.py — FeedbackConfig
Reserved score section: no runtime code reads feedback:. A score that sets
it receives V327. The table below describes retained syntax, not an active
extraction step.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Enable agent feedback extraction | |
pattern |
str |
"(?s)FEEDBACK_START(.+?)FEEDBACK_END" |
Must be valid regex | Regex with capture group to extract feedback |
format |
"json" \| "yaml" \| "text" |
"json" |
Format of extracted feedback block |
Retained syntax for the reserved feedback: section (V327 warns when a score sets it):
schedule¶
Source: src/marianne/core/config/orchestration.py — ScheduleConfig
Recurring execution for a score: when ticks fire, and how misses and overlaps are handled. One-shot scores omit this section entirely.
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
true |
Whether future ticks are enabled |
cron |
str \| None |
None |
Five-field cron expression (schedule.cron); exactly one of cron/interval |
interval |
str \| None |
None |
Positive s/m/h/d interval; exactly one of cron/interval |
timezone |
str \| None |
None |
Optional IANA timezone for tick times |
misfire |
"skip" \| "latest" |
"skip" |
Policy for ticks missed while the conductor was down |
overlap |
"skip" |
"skip" |
Reserved: always skip — a tick due while a run is active is dropped (overlap_skipped); no runtime reader yet, V327 warns when set |
jitter_seconds |
int |
0 |
Bounded dispatch jitter |
pin_source_digest |
bool |
false |
Opt in to daemon-side source pinning |
judgment¶
Source: src/marianne/core/config/judgment.py — JudgmentConfig
The judgment section configures the AI judgment client for FERMATA'd
sheets (#203). Off by default; when
enabled, an LLM judge may resolve a sheet paused for a composer decision
with confidence gating and a durable per-sheet cap.
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
false |
Enable the judgment client |
instrument |
str \| None |
None |
Instrument the judge runs through |
model |
str \| None |
None |
Model override for the judge |
min_confidence |
float |
0.8 |
Confidence below which a judgment is refused |
allowed_decisions |
list[str] |
["retry", "fail"] |
Decisions a judge may make (never accept) |
max_judgments_per_sheet |
int |
3 |
Durable per-sheet cap on automated judgments. The counter is persisted the moment a judgment resolves, so a conductor crash cannot hand the judge an extra turn (GH #382) |
agent_card¶
Source: src/marianne/core/config/a2a.py — AgentCard
The agent_card block is the agent identity card for A2A protocol
discovery. When set, the conductor
registers this card on job start so other agents can discover and
delegate tasks to this score's agent.
| Field | Type | Description |
|---|---|---|
name |
str |
Agent display name |
description |
str \| None |
What this agent does |
skills |
list[Skill] |
Advertised skills; each entry's id names the skill |
url |
str \| None |
Endpoint for A2A requests |
code_execution¶
Source: src/marianne/core/config/execution.py — CodeExecutionConfig
The code_execution section opts in to execution of agent-generated
code blocks (#209). Default off — agent code never runs unless a score
explicitly opts in.
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
false |
Execute agent-generated code blocks in a sandbox |
require_sandbox |
bool |
false |
Refuse to run code mode when bwrap is unavailable (fail-closed); default runs unsandboxed with a loud V304 warning |
timeout_seconds |
float |
30.0 |
Maximum wall-clock time for a single code block |
telemetry¶
Source: src/marianne/telemetry/config.py — TelemetryConfig
Default-off community telemetry. A score block alone collects nothing: the user
must also grant user-global consent with mzt telemetry consent --grant.
Consent lives in ~/.marianne/telemetry-consent.json, outside score YAML, and
score settings can never grant it. With both enabled, the daemon stages one
sanitized JSONL envelope (score config, job status, sheet outcomes) when a job
completes or fails. See telemetry.md for the data policy,
sanitizer scope, inspection, submission, and revocation.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
false |
Opt this score into local telemetry staging. Without separate user consent, no data is collected. | |
spool_path |
Path \| None |
None |
Custom JSONL spool for this score (default: ~/.marianne/telemetry.jsonl). Cannot be a reserved .lock filename or overlap consent/control files. |
|
endpoint |
str \| None |
None |
Reserved: no runtime reader. Submission endpoint is chosen per flush via mzt telemetry flush --push --endpoint. |
|
submit_mode |
"local_only" \| "push" |
"local_only" |
Reserved: no runtime reader. Collection is local regardless; sending happens only through the explicit flush command. |
State and Misc¶
Source: src/marianne/core/config/job.py — JobConfig
| Field | Type | Default | Description |
|---|---|---|---|
state_backend |
"json" \| "sqlite" |
"sqlite" |
Legacy, no effect on job state. The conductor registry is the sole state authority (#50, #333); this key only picks the workspace-local filename used for learning/outcome data. Omit it. |
state_path |
Path \| None |
None |
Reserved: no runtime reader (V327 warns when set). Legacy companion to state_backend; omit. |
source_path |
Path \| None |
None |
Loader-owned (D8): set by the loader to the score file's own path; a score that sets it is warned (V327). Never serialized. |
pause_between_sheets_seconds |
int |
2 |
Seconds to wait between sheets. >= 0. |
DaemonConfig (Conductor)¶
Source: src/marianne/daemon/config.py — DaemonConfig
Top-level configuration for the Marianne daemon process. Configured separately from score files (typically via ~/.marianne/conductor.yaml or CLI flags).
Essential Fields¶
These are the fields most users will configure:
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
max_concurrent_jobs |
int |
15 |
1–50 |
Maximum jobs executing simultaneously |
log_level |
"debug" \| "info" \| "warning" \| "error" |
"info" |
Daemon log level | |
job_timeout_seconds |
float |
86400.0 |
>= 60 |
Maximum accumulated RUNNING time per score (24 hours default); pause and conductor downtime do not spend it. |
learning.enabled |
bool |
true |
Semantic learning on/off | |
learning.instrument |
str |
"claude-code" |
Which instrument powers semantic analysis | |
profiler.enabled |
bool |
true |
Resource monitoring on/off |
Advanced Fields¶
Available but rarely need changing:
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
socket |
SocketConfig |
(see sub-config) | Unix domain socket configuration | |
pid_file |
Path |
~/.config/mzt/mzt.pid |
PID file for daemon process management | |
max_concurrent_sheets |
int |
25 |
1–100 |
Global parallel sheet limit enforced by Baton dispatch. |
resource_limits |
ResourceLimitConfig |
(see sub-config) | Resource constraints | |
state_backend_type |
"sqlite" |
"sqlite" |
Reserved — frozen to sqlite. Changing has no effect. | |
state_db_path |
Path |
~/.marianne/daemon-state.db |
Persistent job and recurring-schedule state database path | |
snapshot_dir |
Path \| None |
None (= snapshots/ beside state_db_path) |
Completion-snapshot directory; follows the state database by default (GH #432) | |
logging.root |
Path |
~/.marianne/logs |
Conductor-owned logging root | |
logging.event_log_name |
str |
conductor.log |
Primary conductor event log file | |
logging.max_file_size_mb |
int |
50 |
1–1000 |
Maximum event log size before rotation |
logging.backup_count |
int |
5 |
0–100 |
Rotated event logs to keep |
logging.compress |
bool |
true |
Compress rotated event logs | |
logging.retention_days |
int |
14 |
1–3650 |
Retention window for managed cleanup |
log_file |
Path \| None |
(derived) | Legacy alias normalized into logging.root and logging.event_log_name |
|
shutdown_timeout_seconds |
float |
300.0 |
>= 10 |
Max seconds for graceful shutdown |
monitor_interval_seconds |
float |
15.0 |
>= 5 |
Interval between resource monitor checks |
max_job_history |
int |
1000 |
>= 10 |
Completed/failed/cancelled jobs to keep in memory |
observer |
ObserverConfig |
(see sub-config) | Observer and event bus configuration. exclude_patterns (default .git/, __pycache__/, node_modules/, .venv/, *.pyc) filters the workspace file events; the recorder's own .marianne-observer.jsonl and the .marianne/ and .marianne-scratch/ bookkeeping directories are always excluded, so the timeline shows the musician's work, not the recorder's heartbeat |
|
orchestra |
OrchestraConfig |
(see sub-config) | Orchestra view: a public-safe fleet timeline, live over IPC and appended daily to ~/.marianne/orchestra/<day>.jsonl for replay. Keys: enabled (true), persist (true), directory, ring_size (2000, >= 100), keep_ended_seconds (1800). The projection carries score name, sheet, instrument, outcome, time and a short note (fallback transition, retry attempt, or the verbatim chain-refusal reason, which can name the child score's path) |
|
profiler |
ProfilerConfig |
(see sub-config) | System profiler (strace off by default, GPU probing off by default) | |
preflight |
PreflightConfig |
(see sub-config) | Preflight prompt analysis thresholds. Controls when prompts are warned or rejected based on estimated token count. | |
memory_backends |
MemoryBackendsConfig |
{} |
Operator-side memory endpoints: cam.<name>: {base_url, api_key_env \| api_key_file, allow_remote, timeout_seconds}. Scores name an endpoint; they cannot set an address or key source (see the cam backend). Hot — reload replaces the endpoint table (#573) |
|
hot_reload |
HotReloadConfig |
(see Hot Reload) | Opt-in watcher that hot-applies config and instrument profile changes without a restart | |
config_file |
Path \| None |
None |
Path to the YAML config file. Set automatically on startup; used by reload to re-read config from disk. |
Daemon Operational Profiles¶
Instead of configuring every field, use --profile to apply a preset:
mzt start # sensible defaults
mzt start --profile dev # debug logging, strace on, low concurrency
mzt start --profile intensive # 48h timeout, high resource limits
mzt start --profile minimal # profiler off, learning off, low concurrency
Profiles are partial overrides merged on top of your config file. Resolution order: defaults → config file → profile → CLI flags.
Built-in profiles:
| Profile | Description | Key Settings |
|---|---|---|
dev |
Marianne development / debugging | log_level: debug, max_concurrent_jobs: 2, strace_enabled: true, interval_seconds: 2.0 |
intensive |
Long-running production work | job_timeout_seconds: 172800 (48h), max_memory_mb: 16384, max_processes: 100 |
minimal |
Low-resource environments | max_concurrent_jobs: 2, profiler.enabled: false, learning.enabled: false |
Hot Reload¶
GH #408 — config and instrument-profile changes without a conductor restart.
A running conductor can re-read its config file and all instrument profile
directories (built-ins, ~/.marianne/instruments/, .marianne/instruments/)
through a single fail-closed reload path. Triggers:
| Trigger | How |
|---|---|
| CLI | mzt conductor reload (prints applied/declined) |
| IPC | daemon.reload JSON-RPC method |
| Signal | kill -HUP <conductor-pid> |
| Watcher | automatic, on file content change (see hot_reload below) |
Every reload validates the ENTIRE new config before applying anything.
On a config-file error the reload is fail-closed: the running config,
profile registry, and per-model caps are untouched and
config_generation does not advance.
Instrument profile files get keep-previous semantics instead: a profile
file that exists on disk but fails to load (broken YAML, schema
violation, read error) does NOT remove its live registry entry or caps —
the previous entry is retained, the file is reported in declined with
a profile load failed (<path>) prefix and the loader's reason, and the
reload result carries partial: true (generation still advances because
the config and every loadable profile were applied). Boot differs on
purpose: at boot there is no previous entry to keep, so a broken file is
skipped with a warning and the instrument is simply absent — repair the
file and reload to restore it.
Instrument profiles swap in place (#171 semantics: in-flight executions finish on their loaded profile), and per-model caps update with removal of entries whose profiles disappeared. A raised cap wakes waiting sheets on the next dispatch cycle; a lowered cap never cancels in-flight work — new dispatch waits for the running count to drain below the new limit (#231).
mzt conductor-status --json exposes config_generation,
config_loaded_at, the last reload outcome (last_config_reload, with
partial when profile files failed to load), and the live per-model caps
(model_concurrency). With --json, stdout carries only the JSON
document (safe for jq); with an explicit --socket, no PID file is
read and the daemon's own payload supplies the pid. All --json
output is ASCII-escaped strict UTF-8 emitted verbatim — the machine
contract shared by every command (issue #495; see
docs/cli-reference.md § JSON output).
Field reloadability — what a reload applies vs. what needs a restart
(changed restart-only fields are reported in declined and the running
value is kept):
| Field | Reload behavior |
|---|---|
max_concurrent_jobs |
Hot — concurrency gate resized in place (#231) |
max_concurrent_sheets |
Hot — live baton dispatch ceiling + scheduler resized |
per-model caps (max_concurrent in instrument profiles) |
Hot — set/changed/removed atomically |
| instrument profiles (new/edited/removed files) | Hot — registry swap + backend pool invalidation |
| instrument profile file broken at reload (YAML/schema/read error) | Partial — previous registry entry + caps retained; file reported in declined with the loader's reason and partial: true on the result. If the broken file overrode a name that another healthy profile (a built-in, or a lower-precedence directory) also declares, that healthy profile takes the name instead of the stale entry. Boot keeps skip-with-warning (no previous entry exists to keep) |
resource_limits |
Hot — monitor limits updated |
preflight (token thresholds) |
Hot — applied to new admissions |
job_timeout_seconds |
Hot — live read at job admission |
shutdown_timeout_seconds |
Hot — live read at shutdown |
max_job_history |
Hot — live read at eviction |
default_thinking_method |
Hot — live read at prompt build |
log_level |
Hot — logging level reconfigured |
hot_reload |
Hot — watcher reads live settings each cycle |
memory_backends |
Hot — endpoint table replaced whole; new dispatches resolve against it, open sessions keep their backend (#573) |
socket.* |
Restart-only |
pid_file |
Restart-only |
state_db_path |
Restart-only |
snapshot_dir |
Restart-only |
state_backend_type |
Restart-only (frozen to sqlite) |
config_file |
Restart-only (reload anchor identity) |
logging / log_file (destination) |
Restart-only — file handles held at boot |
observer |
Restart-only — recorder built at boot |
orchestra |
Restart-only — recorder built at boot |
learning |
Restart-only — semantic analyzer built at boot |
profiler |
Restart-only — collector built at boot |
mcp_pool |
Restart-only — server pool started at boot |
keyring |
Restart-only — key holders built at boot |
monitor_interval_seconds |
Restart-only — monitor loop cadence set at boot |
Watcher sub-config (hot_reload):
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
hot_reload.enabled |
bool |
true |
Watch the config file and profile directories; apply changes through the reload path automatically | |
hot_reload.debounce_seconds |
float |
2.0 |
>= 0.1 |
Settle window after a detected change before the reload fires |
The watcher polls file CONTENT hashes (stdlib only — no new dependency),
so editors' atomic rename-saves register correctly, and a mid-save parse
failure is harmless: the reload declines, and the settled content re-fires
on the next poll. A conductor started with --profile reloads with the
same profile overlay.
Socket Sub-Config¶
Source: src/marianne/daemon/config.py — SocketConfig
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
path |
Path |
~/.config/mzt/mzt.sock |
Unix domain socket path | |
permissions |
int |
0o660 |
Socket file permissions (owner+group read/write) | |
backlog |
int |
128 |
>= 1 |
Maximum pending connections in the listen queue (kernel caps at net.core.somaxconn). The queue drains only on the event loop; a full queue makes every read report the conductor busy (GH #455) |
max_connections |
int |
500 |
>= 1 |
Admitted clients; surplus connections receive a bounded capacity error |
max_concurrent_requests |
int |
50 |
>= 1 |
Concurrent ordinary RPCs, separate from streams |
max_streams |
int |
50 |
>= 1 |
Concurrent output and monitor subscriptions; peer EOF cancels them |
request_timeout |
float |
300.0 |
> 0 |
Seconds for ordinary dispatch, including capacity wait; a mutation timeout can leave its outcome uncertain |
write_timeout |
float |
10.0 |
> 0 |
Seconds to drain replies or stream output and close stalled transports |
Resource Limits Sub-Config¶
Source: src/marianne/daemon/config.py — ResourceLimitConfig
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
max_memory_mb |
int |
8192 |
>= 512 |
Maximum RSS memory (MB) before backpressure triggers |
max_processes |
int |
50 |
>= 5 |
Maximum child processes (backends + validation commands) |
max_api_calls_per_minute |
int |
60 |
>= 1 |
Not yet enforced. Global API rate limit across all jobs. Rate limiting currently works through externally-reported events. |
Semantic Learning Sub-Config¶
Source: src/marianne/daemon/config.py — SemanticLearningConfig
Controls the conductor's LLM-based analysis of sheet completions. The SemanticAnalyzer subscribes to EventBus sheet events, sends completion context to an LLM, and stores insights as SEMANTIC_INSIGHT patterns in the global learning store. These patterns are automatically picked up by the existing pattern injection pipeline.
Analysis runs through the instrument plugin system — any registered instrument profile (claude-code, opencode, ollama, ...) can power semantic analysis.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
enabled |
bool |
true |
Enable semantic learning. When the conductor is running, learning is on by default. | |
instrument |
str |
"claude-code" |
min_length=1 | Instrument profile name for semantic-analysis LLM calls. |
model |
str \| None |
None |
Model override for semantic analysis. None uses the instrument profile's default model. |
|
timeout_seconds |
float |
120.0 |
> 0 |
Per-analysis LLM call timeout (also bounds the shutdown drain wait). |
analyze_on |
list["success" \| "failure"] |
["success", "failure"] |
Non-empty, no duplicates | Which sheet outcomes trigger analysis |
max_concurrent_analyses |
int |
3 |
1–20 |
Maximum concurrent LLM analysis tasks. Controls API cost and system load. |
# Conductor config (conductor.yaml)
learning:
enabled: true
instrument: claude-code
model: claude-sonnet-4-6
timeout_seconds: 120
analyze_on: [success, failure]
max_concurrent_analyses: 3
Recurring Scores and Wall Limits¶
Scores may declare durable local recurrence. mzt run score.yaml registers or
replaces the source-owned schedule and also starts one immediate normal run.
Later runs use the same manager, Baton, cancellation, and receipt paths.
schedule:
interval: 1h # exactly one of interval or five-field cron
# cron: "30 8 * * 1-5"
timezone: Europe/Berlin # optional IANA zone for cron; omitted cron uses UTC
misfire: latest # skip (default) or latest, never a replay storm
jitter_seconds: 0
pin_source_digest: false # opt in to refusing source changes until re-registration
max_wall_seconds: 14400 # optional absolute deadline for each due tick
Intervals advance from their scheduled anchor rather than completion time.
Cron uses the declared IANA timezone (including DST), or UTC when omitted; it
never uses the host locale.
A tick due while a previous run of the same score is still active is always
skipped (overlap_skipped): the recurrence layer drops it without reading
schedule.overlap, so the field is reserved for a future second policy and
V327 warns when a score sets it.
Before each due action Marianne re-reads the YAML; deletion disables/removes
the schedule, and a changed unpinned source declaration replaces its projection.
With pin_source_digest: true, registration stores the source digest in the
daemon registry. A changed digest, score identity or removed schedule declaration
refuses the tick with source_drift_refused; it does not silently update the pin.
Conscious re-registration through mzt run amends the pin. The digest also
travels through child admission so a source change between tick checking and
submission is refused.
schedule.max_wall_seconds bounds a scheduled tick: it is an absolute deadline from the
tick's admission so one run cannot overlap the next, and pause, resume, pending
admission, and restart do not reset it. The root max_wall_seconds spelling
remains an alias for one release and produces V328; it does not cap one-shot
scores. Release change for the research skill: its generated one-shot
scores formerly carried this root key as a whole-run cap; the research
generator now omits it, and its alias sheet timeouts remain in force. The tick
limit is immutable on resume (mzt resume -c with a
different value is refused). For one-shot scores, bound execution per sheet
with instrument_config.timeout_seconds and
stale_detection, which measure the attempt rather than the calendar and so
survive pauses and conductor restarts (GH #435). The conductor's
job_timeout_seconds counts accumulated RUNNING time across resumes; paused
time and downtime do not consume it. Status diagnostics include the
schedule's last due/run/outcome, next due, and deadline evidence.
Preflight Sub-Config¶
Source: src/marianne/core/config/execution.py — PreflightConfig
Controls token count thresholds for pre-flight prompt analysis before sheet execution. Different instruments have different context windows — a 150K threshold that's correct for a 200K-context model is wrong for a 1M-context model. Set thresholds appropriate for the instruments in use.
| Field | Type | Default | Constraints | Description |
|---|---|---|---|---|
token_warning_threshold |
int |
50000 |
>= 0 |
Token count above which to warn during preflight. Set higher for large-context instruments. 0 to disable. |
token_error_threshold |
int |
150000 |
>= 0 |
Token count above which to error during preflight. 0 to disable. Warning threshold must be less than error threshold when both are set. |
# Conductor config for large-context instruments (1M+ context)
preflight:
token_warning_threshold: 200000
token_error_threshold: 800000
Flow control: expressions, loops, and triggers¶
sheet.loops and sheet.triggers use inclusive sheet spans (1 or 2-5). Under
fan_out, authored spans name stages and expand to concrete sheets at load time.
Old scores without these keys keep their existing behavior.
sheet:
size: 1
total_items: 2
loops:
1:
index: pass_no
until: 'file("done.txt").exists'
max_iterations: 5
triggers:
1:
on_fail:
- escalate: Inspect the first sheet before continuing.
2:
on_success:
- continue: true
A loop runs its range at least once and evaluates until after every complete
iteration. count requests an exact number of passes; count with until
acts as a cap. max_iterations defaults to 50. cost_limit_usd caps spend
inside the span, measured from the tokens each route reports at its profile's
price; a route whose profile cannot report a cost (raw shell, no token paths,
$0 pricing) leaves max_iterations as the only bound, and V228 names it. Any error while evaluating until (an undefined variable, an
incompatible comparison, division by zero, an arithmetic result out of range)
ends the loop with condition_error and fails the span's last sheet with E999
and a message naming the expression; it never leaves the loop mid-decision.
until is evaluated before the caps at every boundary: a loop whose goal is
met on the same pass that reaches count, max_iterations or
cost_limit_usd ends condition_met. When an until condition remains
false at a cap, the loop ends on that cap with a warning and the job
proceeds; use a validation for a required artifact. Loop spans may be separate or nested, and index names must be unique.
Use {{ loops.pass_no }} or {{ pass_no }} in prompts, {pass_no} in validations
scoped to the loop, and loop.pass_no in expressions. A global validation
cannot use a loop index that is unavailable on another sheet.
A loop's iteration cap may name a prompt.variables entry instead of a
literal — max_iterations: '{{ max_passes }}', or a dotted {{ book.count }} —
and so may count:
prompt:
variables:
max_passes: "12" # an integer, or a string of digits
sheet:
size: 1
total_items: 2
loops:
1:
index: pass_no
until: 'file("done.txt").exists'
max_iterations: '{{ max_passes }}'
The reference is resolved when the score loads, to an integer; the variable
must be an integer or a string of ASCII digits in 1-10000 (surrounding
whitespace and leading zeroes are ignored; signs are refused). The reference
must be bare — no filters, arithmetic or surrounding text. An undeclared
name, a non-integer or an out-of-range value is a coded error, V351, one
issue per failing loop and field whose metadata.span is the loop key as
written, instead of a pydantic int_parsing trace. Literal caps are
unchanged: a literal max_iterations keeps its own 1-10000 bound, and a
literal count has no upper bound. The resolved cap is fixed per run:
mzt run --var merges after it is resolved and cannot change it.
An until expression's var.x reads the merged variables at run time, so it
does see --var. That makes until: 'loop.pass_no >= var.max_passes' a
different tool from the cap: it ends the loop condition_met when the goal
is met rather than at a cap, and the max_iterations safety cap still
applies on top of it (a cap below the goal still ends the loop on the cap).
Because an expression never compares a number with a string, that form needs
max_passes as a bare integer in the YAML (max_passes: 12, not "12")
that --var does not override — a --var value is always a string.
Otherwise the loop ends condition_error and the span's last sheet fails
with E999 on the first pass. To read a --var value, compare it as text:
until: 'var.max_passes == "12"'.
Expressions support booleans, comparisons, arithmetic, parentheses, var.name,
loop.name, sheet(N)/sheet.current, and file("path") facts. File facts
include .exists, .modified, .contains("text"), and .matches("regex").
File paths are relative to the job workspace and expand {workspace}, the
score's prompt.variables and loop indices in the validation-engine {name}
form (file("{workspace}/done.txt")); a Jinja {{ workspace }} inside a
file() path is kept verbatim, so the file never exists and V233 refuses the
score. File reads are bounded and happen off the baton loop. Invalid expression syntax fails score load; an undefined
runtime variable fails the loop condition at its boundary. The legacy
validation(...) and output(...) expression forms are reserved.
on_success runs after a successful attempt. A failed attempt leaves its own
sheet FAILED whatever its on_fail chain does: skip and forward goto act on
other sheets, so a job whose last failure is handled by skip alone still
ends FAILED; use goto back to the failing sheet (or an earlier one) to retry
it, or continue: true to record the choice. on_fail replaces retry,
fallback, completion mode, and healing for that sheet, with one exception: an
instrument that cannot be reached at all (binary absent, endpoint refusing
connections) or that rejects the route's credentials still advances the
sheet's fallback chain first, and on_fail fires only once the chain is
exhausted. A skip or forward goto that targets
a sheet already in flight takes effect as soon as that attempt ends without
full success; the skipped sheet is never dispatched again. Each action object has
exactly one key: goto, skip, pause, escalate, run, concert, or
continue. Several actions form an ordered list. A backward goto reopens
sheets from its target through the current sheet; a forward goto deliberately
skips unrun sheets in between. pause persists a hold until mzt resume.
run executes a bounded shell command in the job workspace: its output goes to
a per-attempt log under .marianne-flow/, capped at 1 MiB, and a command that
passes the cap while running is ended like a timeout, with the outcome's error
naming the cap. concert submits a child score and does not wait for that child. Commands may repeat after a
conductor crash, so make their effects idempotent using MARIANNE_FLOW_ATTEMPT.
concert submits a child score and does not wait for that child: the action's
A trigger child is submitted with the parent's per-invocation variables (mzt run --var k=v), so one --var project_root=/abs on the root iteration binds the whole chain, exactly as it survives resume. score names the child score file (sheet.triggers.<span>.on_success[].concert.score),
with detached: true releasing the conductor from waiting on it. A score that
names itself self-chains: the trigger fires while the parent still runs, so the
child is admitted under a lineage id (<name>--chain<depth>--<UTC stamp>)
rather than the parent's own id, and concert.max_chain_depth (root
concert: block, enabled: true) is the only bound on the chain (GH #454).
Loop and trigger state is saved in the same checkpoint as sheet state.
On resume, a loop that ended in failure (range_failed or condition_error)
is reopened when sheet recovery leaves member sheets pending — back to
running with the in-flight iteration preserved, so the loop index is
available to recovered dispatches (GH #500). Loops that ended for a genuine
reason (condition_met, count_reached, max_iterations,
cost_limit_exceeded) stay closed, and a paused resume preserves loop state
exactly as persisted; --from-sheet reopens a failure-terminated loop only
when it still has a member sheet >= N.
See convergence-loop for a CLI-only score with a file expression and failure escalation.