Reorganize user and operator documentation
This commit is contained in:
135
docs/config.md
135
docs/config.md
@@ -15,26 +15,13 @@ Commands that accept `--config` load configuration in this order:
|
||||
|
||||
If none is available, the command fails with a config file not found error.
|
||||
|
||||
## Minimal Example
|
||||
## Maintained Examples
|
||||
|
||||
```yaml
|
||||
version: 2
|
||||
pipelines:
|
||||
dnd-session:
|
||||
input: seriatim
|
||||
references:
|
||||
party: ./dnd-spells-roster.txt
|
||||
glossary: ./dnd-spells-glossary.txt
|
||||
chunk:
|
||||
module: generic
|
||||
options:
|
||||
max_units: 50
|
||||
artifacts:
|
||||
spells:
|
||||
extract: dnd/spells
|
||||
```
|
||||
- [Minimal D&D spell configuration](../examples/dnd-spells.config.yml)
|
||||
- [Production-oriented D&D spell configuration](../examples/dnd-spells-production.config.yml)
|
||||
|
||||
The maintained fixture is [examples/dnd-spells.config.yml](../examples/dnd-spells.config.yml).
|
||||
Both complete files are validated by the CLI test suite. The fragments below
|
||||
illustrate individual fields and are not alternate complete configurations.
|
||||
|
||||
## Top-Level Fields
|
||||
|
||||
@@ -52,31 +39,21 @@ rejected; execution profiles now come from Scriptorium.
|
||||
|
||||
Built-in defaults:
|
||||
|
||||
```yaml
|
||||
concurrency:
|
||||
total_llm: 1
|
||||
diagnostics:
|
||||
work_dir: /tmp/notarius
|
||||
retention: auto
|
||||
workspace:
|
||||
diagnostics:
|
||||
enabled: true
|
||||
resume:
|
||||
enabled: false
|
||||
debug:
|
||||
enabled: false
|
||||
```
|
||||
|
||||
`workspace.directory` is unset by default. Without a workspace directory,
|
||||
diagnostics continue to use `/tmp/notarius`, and checkpoint and debug workspace
|
||||
features have no storage root.
|
||||
- `concurrency.total_llm`: `1`
|
||||
- `diagnostics.work_dir`: `/tmp/notarius`
|
||||
- `diagnostics.retention`: `auto`
|
||||
- `workspace.directory`: unset
|
||||
- `workspace.diagnostics.enabled`: `true`
|
||||
- `workspace.resume.enabled`: `false`
|
||||
- `workspace.debug.enabled`: `false`
|
||||
|
||||
No pipelines are built in. A run requires a configured pipeline.
|
||||
|
||||
If `scriptorium` is omitted, Notarius uses Scriptorium's built-in profile
|
||||
catalog. Prompt definitions may also name default profile IDs. The current D&D
|
||||
scene and spell prompts use Scriptorium prompt defaults when a module binding
|
||||
does not set `llm_profile`.
|
||||
scene and spell prompts default to the built-in `mistral-small-3` profile when a
|
||||
module binding does not set `llm_profile`. That built-in profile reads its
|
||||
credential from `OPENROUTER_API_KEY`.
|
||||
|
||||
## Scriptorium Profiles
|
||||
|
||||
@@ -159,23 +136,20 @@ Artifact lane fields:
|
||||
- `references`: optional compatibility alias for extractor reference bindings.
|
||||
Lane bindings override pipeline-level bindings for the same slot.
|
||||
|
||||
`notarius run` and `notarius config validate --pipeline` resolve the pipeline
|
||||
against the production module catalog and fail fast for unknown or incompatible
|
||||
module keys.
|
||||
Commands that resolve a pipeline fail for unknown or incompatible module keys.
|
||||
See [CLI Reference](cli.md) for command syntax.
|
||||
|
||||
Reference bindings are validated against reference slots declared by eligible
|
||||
chunk, extract, merge, and normalize targets during pipeline resolution. Required slots
|
||||
must be bound after config defaults, target-local references, lane-level
|
||||
compatibility bindings, and run-time `--reference` or `--without-reference`
|
||||
overrides are applied. Config-relative paths are resolved relative to the config
|
||||
file; CLI reference paths are resolved relative to the current working
|
||||
directory. Materialized bound files must be UTF-8 text. Materialized reference
|
||||
provenance is recorded for chunk, extractor, merger, and normalizer targets, and runtime
|
||||
reference content is passed to the target that declares the slot. Reference
|
||||
media types are inferred from file extensions, recorded as canonical base media
|
||||
types, and checked only when a module declares `AcceptedMediaTypes`; unknown
|
||||
extensions are recorded as `application/octet-stream`. Reference content is not
|
||||
written to diagnostics, logs, errors, or manifests.
|
||||
compatibility bindings, and command-line reference overrides are applied.
|
||||
Config-relative paths are resolved relative to the config file; command-line
|
||||
reference paths are resolved relative to the current working directory. Bound
|
||||
files must be UTF-8 text. Reference media types are inferred from file
|
||||
extensions and checked when a module restricts accepted types; unknown
|
||||
extensions use `application/octet-stream`. See [CLI Reference](cli.md#run) for
|
||||
command-line selectors and [Operations](operations.md) for recorded provenance
|
||||
and sensitive-data handling.
|
||||
|
||||
Pipeline-level `references` are defaults. They are valid when at least one
|
||||
eligible target in the full configured pipeline declares the slot, including
|
||||
@@ -252,7 +226,7 @@ Binding fields:
|
||||
- `llm_profile`: optional Scriptorium profile ID. Empty or omitted lets the
|
||||
Scriptorium prompt default select the profile.
|
||||
- `retries`: non-negative retry count for extra runtime attempts after the
|
||||
first attempt. The runner applies retries to `chunk`, `extract`, `merge`, and
|
||||
first attempt. Default: `0`. Supported on `chunk`, `extract`, `merge`, and
|
||||
`normalize` bindings.
|
||||
- `options`: optional module-specific settings.
|
||||
- `references`: optional reference bindings. Supported only for `chunk`,
|
||||
@@ -275,11 +249,6 @@ Validator bindings reject `references`, `retries`, and nested `validators`.
|
||||
During resolution, deterministic validators reject explicit `llm_profile`
|
||||
values.
|
||||
|
||||
The `--llm-profile` run flag overrides every effective LLM-capable module
|
||||
binding to use one Scriptorium profile ID: chunk, every selected lane extract,
|
||||
merge, and normalize binding. It does not override validator-specific
|
||||
`llm_profile` values.
|
||||
|
||||
Configured LLM-backed validators with explicit `llm_profile` values are
|
||||
validated against the configured Scriptorium profile source. Deterministic
|
||||
production validators do not call the LLM and must not set `llm_profile`.
|
||||
@@ -350,46 +319,13 @@ casts still must be present in the source transcript.
|
||||
`workspace` fields:
|
||||
|
||||
- `directory`: optional workspace root for Notarius-owned local state.
|
||||
- `diagnostics.enabled`: set to `false` to skip diagnostics run directories and
|
||||
diagnostics artifact writes. Default: `true`.
|
||||
- `diagnostics.retention`: `auto`, `always`, or `never`.
|
||||
- `resume.enabled`: boolean resume checkpointing setting. Default: `false`.
|
||||
- `debug.enabled`: boolean debug artifact setting. Default: `false`.
|
||||
|
||||
Use `/var/lib/notarius` as the standard production workspace directory. For
|
||||
local development, prefer a project-local ignored path such as
|
||||
`./.notarius/workspace`.
|
||||
|
||||
```yaml
|
||||
workspace:
|
||||
directory: /var/lib/notarius
|
||||
diagnostics:
|
||||
enabled: true
|
||||
retention: auto
|
||||
resume:
|
||||
enabled: false
|
||||
debug:
|
||||
enabled: false
|
||||
```
|
||||
|
||||
When `workspace.directory` is set, diagnostics are written under
|
||||
`<workspace.directory>/diagnostics/`.
|
||||
|
||||
When both `workspace.directory` and `workspace.resume.enabled` are set, runs
|
||||
write stage-owned checkpoint artifacts under
|
||||
`<workspace.directory>/checkpoints/`. `notarius run --resume` can reuse valid
|
||||
checkpoints from a compatible invocation. Checkpoints may contain source text,
|
||||
intermediate raw outputs, rejected outputs, metadata, and warnings. Protect the
|
||||
workspace as sensitive local state.
|
||||
|
||||
When both `workspace.directory` and `workspace.debug.enabled` are set, runs
|
||||
write per-invocation debug artifacts under
|
||||
`<workspace.directory>/debug/<run-id>/`. Debug artifacts may contain source
|
||||
material, reference material, prompt inputs, model outputs, validation payloads,
|
||||
and other sensitive content. Debug is disabled by default.
|
||||
- `diagnostics`: optional diagnostics settings defined below.
|
||||
|
||||
`workspace.resume.enabled` and `workspace.debug.enabled` are independent.
|
||||
Enabling one does not enable the other.
|
||||
Enabling one does not enable the other. For directory layout, state lifecycle,
|
||||
permissions, and sensitive content, see [Operations](operations.md).
|
||||
|
||||
## Diagnostics
|
||||
|
||||
@@ -399,9 +335,8 @@ Preferred workspace diagnostics fields:
|
||||
- `workspace.diagnostics.enabled`: set to `false` to skip creating diagnostics
|
||||
run directories and diagnostics artifacts. Default: `true`.
|
||||
- `workspace.diagnostics.retention`: `auto`, `always`, or `never`.
|
||||
When unset, the effective diagnostics retention default is `auto`.
|
||||
|
||||
When `workspace.directory` is set, diagnostics use
|
||||
`<workspace.directory>/diagnostics` as their work directory.
|
||||
`workspace.diagnostics.retention` overrides legacy diagnostics retention when
|
||||
set.
|
||||
|
||||
@@ -417,13 +352,9 @@ and `NOTARIUS_DIAGNOSTICS_RETENTION` inputs remain supported for compatibility.
|
||||
New configuration should use `workspace.directory` and
|
||||
`workspace.diagnostics.retention` instead.
|
||||
|
||||
`auto` retains diagnostics for failed runs and successful runs with warnings.
|
||||
`always` retains diagnostics for every run. `never` removes diagnostics for
|
||||
successful runs without regard to warnings; failed runs are retained.
|
||||
|
||||
The `--diagnostics-dir` run flag overrides the effective diagnostics work
|
||||
directory for that invocation. It affects diagnostics only and does not change
|
||||
the workspace directory.
|
||||
For retention behavior and the physical diagnostics layout, see
|
||||
[Operations](operations.md#retention). For the invocation-specific diagnostics
|
||||
override, see [CLI Reference](cli.md#run).
|
||||
|
||||
## Validation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user