Reorganize user and operator documentation
This commit is contained in:
120
docs/cli.md
120
docs/cli.md
@@ -3,27 +3,15 @@
|
||||
This is the canonical reference for the implemented Notarius command-line
|
||||
interface.
|
||||
|
||||
## Quick Run
|
||||
|
||||
```sh
|
||||
OPENROUTER_API_KEY=... \
|
||||
go run ./cmd/notarius run dnd-session \
|
||||
--config examples/dnd-spells.config.yml \
|
||||
--input examples/seriatim-minimal-transcript.json
|
||||
```
|
||||
|
||||
The maintained example uses prompt defaults and Scriptorium's built-in
|
||||
`mistral-small-3` profile, which reads `OPENROUTER_API_KEY`. To use another
|
||||
endpoint or model, configure a Scriptorium profile source and select its profile
|
||||
ID in config or with `--llm-profile`.
|
||||
For the minimal end-to-end invocation, see the [README](../README.md).
|
||||
|
||||
## Commands
|
||||
|
||||
```text
|
||||
notarius help
|
||||
notarius run <pipeline-id> --input path/to/source.json [--config path/to/config.yml] [--only lane-a,lane-b] [--resume] [--session-id id] [--reference selector=path] [--without-reference selector]
|
||||
notarius config validate --config path/to/config.yml [--pipeline pipeline-id] [--only lane-a,lane-b]
|
||||
notarius pipelines list --config path/to/config.yml [--json]
|
||||
notarius run <pipeline-id> --input path/to/source.json [--config path/to/config.yml] [--only lane-a,lane-b] [--output-dir path] [--diagnostics-dir path] [--llm-profile id] [--resume] [--session-id id] [--reference selector=path] [--without-reference selector]
|
||||
notarius config validate [--config path/to/config.yml] [--pipeline pipeline-id] [--only lane-a,lane-b]
|
||||
notarius pipelines list [--config path/to/config.yml] [--json]
|
||||
```
|
||||
|
||||
Running `notarius` with no arguments, `notarius help`, `notarius --help`, or
|
||||
@@ -37,20 +25,18 @@ file.
|
||||
Flags:
|
||||
|
||||
- `--input path`: required source input file.
|
||||
- `--config path`: config file path. If omitted, Notarius checks
|
||||
`NOTARIUS_CONFIG`, then `/usr/local/etc/notarius/config.yml`.
|
||||
- `--config path`: config file path. If omitted, Notarius uses the discovery
|
||||
rules in [Configuration](config.md#discovery).
|
||||
- `--only lane-a,lane-b`: run only the named artifact lanes. Values are
|
||||
comma-separated and must be non-empty.
|
||||
- `--resume`: reuse valid workspace checkpoints for this invocation. Requires
|
||||
an effective workspace directory and `workspace.resume.enabled: true`.
|
||||
- `--output-dir path`: output root. The run writes to `<path>/<run-id>/`.
|
||||
Defaults to `./notarius-output`.
|
||||
- `--resume`: request checkpoint reuse for this invocation. See
|
||||
[Operations](operations.md#checkpoints) for prerequisites and reuse behavior.
|
||||
- `--output-dir path`: output root. Defaults to `./notarius-output`.
|
||||
- `--diagnostics-dir path`: diagnostics work directory override for this
|
||||
invocation. It does not change the workspace directory.
|
||||
- `--llm-profile id`: override every effective LLM-capable pipeline module
|
||||
binding to use one Scriptorium profile ID. Validator-specific profiles are
|
||||
not overridden. Configured LLM-backed validators with explicit profiles are
|
||||
validated against the configured Scriptorium profile source.
|
||||
binding with one Scriptorium profile ID. Validator-specific profiles are not
|
||||
overridden.
|
||||
- `--session-id id`: pass a stable prompt session identifier through LLM-backed
|
||||
module calls.
|
||||
- `--reference selector=path`: bind a reference path to a chunk, extractor,
|
||||
@@ -63,23 +49,11 @@ On success, the command prints the completed pipeline ID, normalized output and
|
||||
rejected output counts, and the output directory. If the run completes with warnings,
|
||||
the warning count is printed to stderr.
|
||||
|
||||
Reference flags are resolved against selected chunk, extractor, merger, and normalizer
|
||||
targets before the run starts. Flat slot names are accepted only when exactly
|
||||
one selected target declares that slot. Bound reference files are read before
|
||||
pipeline work starts, validated as UTF-8 text, and recorded as provenance for
|
||||
the target that declares the slot. Runtime reference content is passed to the
|
||||
chunker, extractor, merger, or normalizer target that declares the slot. Notarius infers
|
||||
reference media types from file extensions for provenance and for optional slot
|
||||
checks. Reference content is not written to diagnostics, logs, errors, or
|
||||
manifests.
|
||||
|
||||
Reference binding precedence is:
|
||||
|
||||
1. pipeline-level config `references`;
|
||||
2. target-local config references, including legacy lane-level extractor
|
||||
`references`;
|
||||
3. `--reference` run flags;
|
||||
4. `--without-reference` run flags.
|
||||
Reference flags are resolved against selected chunk, extractor, merger, and
|
||||
normalizer targets before the run starts. Flat slot names are accepted only
|
||||
when exactly one selected target declares that slot. For configured reference
|
||||
bindings, precedence, path resolution, and validation, see
|
||||
[Configuration](config.md#pipelines).
|
||||
|
||||
`--reference` binds or replaces one slot for one selected target. Selectors are:
|
||||
|
||||
@@ -142,8 +116,7 @@ go run ./cmd/notarius run dnd-session \
|
||||
--session-id campaign-17-session-04
|
||||
```
|
||||
|
||||
Use `--resume` to reuse valid checkpoints from a previous compatible
|
||||
invocation:
|
||||
The resume flag can be added to an otherwise identical run invocation:
|
||||
|
||||
```sh
|
||||
go run ./cmd/notarius run dnd-session \
|
||||
@@ -152,13 +125,8 @@ go run ./cmd/notarius run dnd-session \
|
||||
--resume
|
||||
```
|
||||
|
||||
Plain `run` does not skip completed work. It executes the pipeline normally and
|
||||
refreshes checkpoints when checkpointing is enabled. `--resume` verifies each
|
||||
checkpoint before reuse and executes any missing, corrupt, or incompatible step
|
||||
normally.
|
||||
|
||||
For durable output, diagnostics, retention, and failure inspection, see
|
||||
[Operations](operations.md).
|
||||
For checkpoint behavior, durable output, diagnostics, retention, and failure
|
||||
inspection, see [Operations](operations.md).
|
||||
|
||||
## `config validate`
|
||||
|
||||
@@ -166,8 +134,8 @@ For durable output, diagnostics, retention, and failure inspection, see
|
||||
|
||||
Flags:
|
||||
|
||||
- `--config path`: config file path. If omitted, discovery uses
|
||||
`NOTARIUS_CONFIG`, then `/usr/local/etc/notarius/config.yml`.
|
||||
- `--config path`: config file path. If omitted, Notarius uses the discovery
|
||||
rules in [Configuration](config.md#discovery).
|
||||
- `--pipeline pipeline-id`: additionally resolve one configured pipeline against
|
||||
the production module catalog.
|
||||
- `--only lane-a,lane-b`: validate resolution for selected artifact lanes. This
|
||||
@@ -191,8 +159,8 @@ go run ./cmd/notarius config validate \
|
||||
|
||||
Flags:
|
||||
|
||||
- `--config path`: config file path. If omitted, discovery uses
|
||||
`NOTARIUS_CONFIG`, then `/usr/local/etc/notarius/config.yml`.
|
||||
- `--config path`: config file path. If omitted, Notarius uses the discovery
|
||||
rules in [Configuration](config.md#discovery).
|
||||
- `--json`: print `{"pipelines":[...]}` instead of one ID per line.
|
||||
|
||||
Examples:
|
||||
@@ -215,42 +183,6 @@ go run ./cmd/notarius pipelines list \
|
||||
- `2`: command syntax was invalid, a command was unknown, a required argument
|
||||
was missing, or a flag value was malformed.
|
||||
|
||||
## Implemented Production Pipeline Modules
|
||||
|
||||
The production CLI currently registers these module keys:
|
||||
|
||||
- input: `seriatim`
|
||||
- chunk: `generic`, `dnd/scenes`
|
||||
- extract: `dnd/spells`
|
||||
- merge: `appendorder`
|
||||
- normalize: `noop`
|
||||
- output: `json`
|
||||
|
||||
## Implemented Production Validators
|
||||
|
||||
The production CLI currently registers these validator keys:
|
||||
|
||||
- `generic/always_accept`
|
||||
- `generic/always_reject`
|
||||
- `generic/valid_json`
|
||||
- `generic/valid_json_schema`
|
||||
- `extract/dnd/spells/shape`
|
||||
- `extract/dnd/spells/source_refs`
|
||||
- `extract/dnd/spells/source_relatedness`
|
||||
|
||||
The production default chain for the `dnd/spells` extractor is:
|
||||
|
||||
1. `generic/valid_json`
|
||||
2. `generic/valid_json_schema`
|
||||
3. `extract/dnd/spells/shape`
|
||||
4. `extract/dnd/spells/source_refs`
|
||||
5. `extract/dnd/spells/source_relatedness`
|
||||
|
||||
Validator chain overrides are configured on `chunk`, lane `extract`, lane
|
||||
`merge`, and lane `normalize` bindings. Omitted overrides use production
|
||||
defaults, `validators: []` disables validation for that binding, and non-empty
|
||||
lists replace the default chain in configured order. Validator keys are resolved
|
||||
against the registered validator catalog.
|
||||
|
||||
For YAML structure, Scriptorium profile sources, environment overrides, and
|
||||
module binding syntax, see [Configuration](config.md).
|
||||
For YAML structure, defaults, Scriptorium profile sources, environment
|
||||
overrides, and selectable module and validator keys, see
|
||||
[Configuration](config.md).
|
||||
|
||||
Reference in New Issue
Block a user