Update documentation for the new analyze stage and artifact registry
This commit is contained in:
120
docs/cli.md
120
docs/cli.md
@@ -6,44 +6,46 @@
|
||||
narratio run --session-id 2026-04-04
|
||||
```
|
||||
|
||||
This uses default config discovery for `pipeline.yml` and `session.yml`; both files must be discoverable for this command to run.
|
||||
This command uses default config discovery for `pipeline.yml` and `session.yml`; both files must be discoverable unless you pass explicit `--config` and `--session` paths.
|
||||
|
||||
## Command Overview
|
||||
|
||||
Implemented commands:
|
||||
|
||||
- `run`: execute the full stage plan and persist manifest state.
|
||||
- `plan`: validate config, prepare workdir, and print run/skip decisions.
|
||||
- `resume`: continue from the first non-succeeded stage in the manifest.
|
||||
- `status`: read and print stage statuses from an existing manifest file.
|
||||
- `run-stage`: execute exactly one selected stage.
|
||||
- `run`: execute pipeline stages and persist manifest state.
|
||||
- `plan`: validate config, prepare workspace layout, and print stage run/skip decisions.
|
||||
- `resume`: continue from first non-succeeded stage unless forced.
|
||||
- `status`: read and print stage statuses from an existing manifest.
|
||||
- `run-stage`: execute exactly one stage.
|
||||
|
||||
Unknown commands print usage (`Usage: narratio <run|plan|status|resume|run-stage>`) and exit non-zero.
|
||||
Unknown commands print usage and exit non-zero.
|
||||
|
||||
For configuration field details, see [docs/config.md](./config.md). For operational lifecycle details, see [docs/operations.md](./operations.md).
|
||||
For config semantics, see [docs/config.md](./config.md). For operator lifecycle and recovery, see [docs/operations.md](./operations.md).
|
||||
|
||||
## Complete Flag Reference
|
||||
|
||||
### `run`
|
||||
|
||||
- `--config <path>`: optional explicit `pipeline.yml` path; if omitted, default locations are searched.
|
||||
- `--session <path>`: optional explicit `session.yml` path; if omitted, default locations are searched.
|
||||
- `--session-id <value>`: session template variable value for `session.yml` rendering.
|
||||
- `--force`: force stage execution (prevents skip of already-succeeded stages).
|
||||
- `--config <path>`: optional explicit `pipeline.yml` path.
|
||||
- `--session <path>`: optional explicit `session.yml` path.
|
||||
- `--session-id <value>`: session template variable value.
|
||||
- `--force`: force stage execution.
|
||||
- `--artifacts <names>`: analyze artifact keys to execute (repeatable or comma-separated).
|
||||
|
||||
### `plan`
|
||||
|
||||
- `--config <path>`
|
||||
- `--session <path>`
|
||||
- `--session-id <value>`
|
||||
- `--force`: show forced run decisions instead of normal skip behavior.
|
||||
- `--force`
|
||||
|
||||
### `resume`
|
||||
|
||||
- `--config <path>`
|
||||
- `--session <path>`
|
||||
- `--session-id <value>`
|
||||
- `--force`: run full stage order rather than starting at first non-succeeded stage.
|
||||
- `--force`
|
||||
- `--artifacts <names>`: analyze artifact keys to execute (repeatable or comma-separated).
|
||||
|
||||
### `run-stage`
|
||||
|
||||
@@ -51,6 +53,7 @@ For configuration field details, see [docs/config.md](./config.md). For operatio
|
||||
- `--session <path>`
|
||||
- `--session-id <value>`
|
||||
- `--force`
|
||||
- `--artifacts <names>`: analyze artifact keys to execute (repeatable or comma-separated).
|
||||
- positional `<stage>`: required stage name.
|
||||
|
||||
Valid stage names:
|
||||
@@ -74,31 +77,27 @@ Valid stage names:
|
||||
### `run`
|
||||
|
||||
Purpose:
|
||||
|
||||
- Validate configuration and execute all stages in canonical order.
|
||||
- Execute configured stages in canonical order.
|
||||
|
||||
Syntax:
|
||||
|
||||
```bash
|
||||
narratio run [--config <pipeline.yml>] [--session <session.yml>] [--session-id <id>] [--force]
|
||||
narratio run [--config <pipeline.yml>] [--session <session.yml>] [--session-id <id>] [--force] [--artifacts <name[,name...]>]
|
||||
```
|
||||
|
||||
Success output:
|
||||
|
||||
- `narratio run: session <session_id>; executed=<n> skipped=<n>; manifest=<path>`
|
||||
|
||||
Common failure cases:
|
||||
|
||||
- no pipeline config found in default search paths when `--config` is omitted.
|
||||
- no session config found in default search paths when `--session` is omitted.
|
||||
- invalid flags or unexpected positional arguments.
|
||||
- config/template/validation errors.
|
||||
- missing default config/session paths when flags omitted.
|
||||
- invalid template/rendered session mismatch.
|
||||
- unknown/invalid `--artifacts` value.
|
||||
- `--artifacts` with unknown configured artifact key.
|
||||
|
||||
### `plan`
|
||||
|
||||
Purpose:
|
||||
|
||||
- Validate config, load secrets (if configured), prepare workspace layout, and print per-stage run/skip decisions.
|
||||
- Validate config, load secrets (if configured), prepare workdir, and print stage run/skip decisions.
|
||||
|
||||
Syntax:
|
||||
|
||||
@@ -107,43 +106,38 @@ narratio plan [--config <pipeline.yml>] [--session <session.yml>] [--session-id
|
||||
```
|
||||
|
||||
Success output includes:
|
||||
|
||||
- `narratio plan: workdir prepared at <path>`
|
||||
- one line per stage (`<stage>: run|skip`)
|
||||
- `totals: run=<n> skip=<n>`
|
||||
|
||||
Common failure cases:
|
||||
|
||||
- same discovery, template, and validation failures as `run`.
|
||||
- same config/session discovery and validation failures as `run`.
|
||||
- secrets directory read failures when `pipeline.secrets.env_dir` is configured.
|
||||
|
||||
### `resume`
|
||||
|
||||
Purpose:
|
||||
|
||||
- Continue execution from manifest state for the same session.
|
||||
- Continue from session-manifest stage status.
|
||||
|
||||
Syntax:
|
||||
|
||||
```bash
|
||||
narratio resume [--config <pipeline.yml>] [--session <session.yml>] [--session-id <id>] [--force]
|
||||
narratio resume [--config <pipeline.yml>] [--session <session.yml>] [--session-id <id>] [--force] [--artifacts <name[,name...]>]
|
||||
```
|
||||
|
||||
Success output:
|
||||
|
||||
- either `narratio resume: session <session_id> has no remaining stages`
|
||||
- `narratio resume: session <session_id> has no remaining stages`
|
||||
- or `narratio resume: session <session_id>; executed=<n> skipped=<n>; manifest=<path>`
|
||||
|
||||
Common failure cases:
|
||||
|
||||
- same discovery/template/validation failures as `run`.
|
||||
- manifest load errors when an existing manifest is unreadable.
|
||||
- manifest load errors when existing manifest is unreadable.
|
||||
- invalid or unknown artifact selections.
|
||||
|
||||
### `status`
|
||||
|
||||
Purpose:
|
||||
|
||||
- Inspect an existing manifest file without running stages.
|
||||
- Inspect one manifest file without executing stages.
|
||||
|
||||
Syntax:
|
||||
|
||||
@@ -152,37 +146,37 @@ narratio status --manifest <manifest.json>
|
||||
```
|
||||
|
||||
Success output includes:
|
||||
|
||||
- `session_id: <id>`
|
||||
- `updated_at: <timestamp>`
|
||||
- `stages:` section with `- <stage>: <status>` entries.
|
||||
- `stages:` entries (`- <stage>: <status>`)
|
||||
|
||||
Common failure cases:
|
||||
|
||||
- missing `--manifest`.
|
||||
- manifest path unreadable or invalid JSON shape.
|
||||
- unreadable or invalid manifest path.
|
||||
|
||||
### `run-stage`
|
||||
|
||||
Purpose:
|
||||
|
||||
- Execute exactly one stage from the supported stage set.
|
||||
- Execute exactly one stage.
|
||||
|
||||
Syntax:
|
||||
|
||||
```bash
|
||||
narratio run-stage [--config <pipeline.yml>] [--session <session.yml>] [--session-id <id>] [--force] <stage>
|
||||
narratio run-stage [--config <pipeline.yml>] [--session <session.yml>] [--session-id <id>] [--force] [--artifacts <name[,name...]>] <stage>
|
||||
```
|
||||
|
||||
Success output:
|
||||
|
||||
- `narratio run-stage: stage=<name> executed=<n> skipped=<n> force=<true|false>; manifest=<path>`
|
||||
|
||||
Common failure cases:
|
||||
`--artifacts` behavior:
|
||||
- accepted only when `<stage>` is `analyze`.
|
||||
- names are normalized (trimmed, deduplicated, sorted).
|
||||
- unknown configured artifact keys fail.
|
||||
|
||||
- missing stage positional argument.
|
||||
Common failure cases:
|
||||
- missing stage positional arg.
|
||||
- unknown stage name.
|
||||
- same discovery/template/validation failures as `run`.
|
||||
- using `--artifacts` with any non-`analyze` stage.
|
||||
|
||||
## Common Workflows
|
||||
|
||||
@@ -192,39 +186,37 @@ Default-discovery run:
|
||||
narratio run --session-id 2026-04-04
|
||||
```
|
||||
|
||||
Explicit config/session run:
|
||||
Run only selected analyze artifacts:
|
||||
|
||||
```bash
|
||||
narratio run --config /etc/narratio/pipeline.yml --session ./session.yml --session-id 2026-04-04
|
||||
narratio run --session-id 2026-04-04 --artifacts session_recap,player_handout
|
||||
```
|
||||
|
||||
Plan before run:
|
||||
Resume with selected analyze artifacts:
|
||||
|
||||
```bash
|
||||
narratio plan --config /etc/narratio/pipeline.yml --session ./session.yml --session-id 2026-04-04
|
||||
narratio resume --session-id 2026-04-04 --artifacts player_handout
|
||||
```
|
||||
|
||||
Resume interrupted work:
|
||||
Run only analyze stage with selected artifacts:
|
||||
|
||||
```bash
|
||||
narratio resume --config /etc/narratio/pipeline.yml --session ./session.yml --session-id 2026-04-04
|
||||
```
|
||||
|
||||
Run one stage:
|
||||
|
||||
```bash
|
||||
narratio run-stage --config /etc/narratio/pipeline.yml --session ./session.yml --session-id 2026-04-04 polish
|
||||
narratio run-stage --session-id 2026-04-04 --artifacts player_handout analyze
|
||||
```
|
||||
|
||||
## Diagnostic / Recovery Commands
|
||||
|
||||
Read stage status from a manifest:
|
||||
Inspect stage status:
|
||||
|
||||
```bash
|
||||
narratio status --manifest <manifest.json>
|
||||
```
|
||||
|
||||
How to get manifest path:
|
||||
Get manifest path from previous output:
|
||||
- `run`, `resume`, and `run-stage` print `manifest=<path>` on success.
|
||||
|
||||
- `run`, `resume`, and `run-stage` success output includes `manifest=<path>`.
|
||||
- use that path with `status` for direct inspection.
|
||||
## `--artifacts` and `--force`
|
||||
|
||||
- `--artifacts` filters which configured artifacts are executable when analyze runs.
|
||||
- `--artifacts` does not imply `--force`.
|
||||
- If analyze is already `succeeded` and `--force` is not set, runner-level skip still applies.
|
||||
|
||||
Reference in New Issue
Block a user