CLI for agents: non-TTY safe run/confirmations, compact inspect, wait hints and exit codes
- Without a terminal, run behaves as --json, tui refuses and confirmations fail fast naming --yes instead of prompting. - inspect prints a compact summary by default; --step N, --transcripts and --json give detail. - wait names a failed run's stage and first diagnostic line, prints how to answer a run waiting on a person, and exits 2 when any run failed, was canceled or interrupted (1 stays for client errors). - help describes the current # outcome / # handoff format. - Task starter's Land stage drops edit to match format.md; skill docs document run --json --yes, retry --yes --json and the new behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,25 +12,38 @@ task with the least ceremony, and keep work small enough to verify.
|
||||
## Using it
|
||||
|
||||
`pipelines list` shows the registered workflows; `pipelines runs` shows history.
|
||||
Start a run with `pipelines run <name> "<task>"`, and inspect it with
|
||||
`pipelines inspect <id>`.
|
||||
From an agent's shell always pass `--yes` and `--json`; without a terminal the
|
||||
CLI never opens a full-screen view or prompts, and a missing `--yes` fails at once.
|
||||
Start a run with `pipelines run <name> "<task>" --json --yes` (prints the run id),
|
||||
and inspect it with `pipelines inspect <id>`: a compact summary (one line per
|
||||
step with status, outcome, duration and first diagnostic line, plus the final
|
||||
handoff). `--step N` shows one step in full, `--transcripts` adds transcripts,
|
||||
and `--json` is the full record.
|
||||
|
||||
After starting a run, always follow it with `pipelines wait <id>` until it
|
||||
finishes; never start a run and move on without waiting. Run the wait as a
|
||||
background command (one per run, or one loop over several ids) so the session is
|
||||
notified the moment the run ends, then read its result with
|
||||
`pipelines inspect <id> --json` and act on it: land, retry, or fix and report.
|
||||
`pipelines inspect <id>` and act on it: land, retry, or fix and report.
|
||||
`wait` prints one line per run, naming a failed run's stage and first diagnostic
|
||||
line, and exits 0 when every run succeeded, 2 when any failed, was canceled or
|
||||
interrupted, and 1 for a client error (unknown id, connection, `--timeout`).
|
||||
Do not poll with repeated `pipelines runs` calls, and do not tell the user a run
|
||||
is done, or will be reported, without a wait covering it. `wait` keeps blocking
|
||||
while a run is `waiting` on a human stage (`pipelines decide`, user's choice only).
|
||||
while a run is `waiting` on a human stage and prints how to answer it
|
||||
(`pipelines decide <id> --option KEY`, the user's choice only).
|
||||
|
||||
A run started from a repository's main checkout runs in its own worktree
|
||||
(`<repo>-runs/...`, branch `pipelines/run-...`); a failed run keeps that tree and
|
||||
its commits. Read `pipelines inspect <id> --json` before deciding: resume the
|
||||
failed stage (`pipelines retry <id>`; `--stage`/`--visit`, `--input-file`,
|
||||
`--mode=restart` from entry), fix directly, or continue from the preserved
|
||||
branch. Only `failed` runs can be retried; `interrupted` (server stopped
|
||||
mid-run) and `canceled` runs need a new run or direct work on their branch.
|
||||
its commits. Read `pipelines inspect <id>` before deciding: resume the
|
||||
failed stage (`pipelines retry <id> --yes --json`; `--stage`/`--visit`,
|
||||
`--input-file`, `--mode=restart` from entry), fix directly, or continue from the
|
||||
preserved branch. `failed` and `interrupted` (server stopped mid-run) runs can be
|
||||
retried: resume reruns the failed or interrupted stage, or starts the next stage
|
||||
after the last completed one. `canceled` runs need a new run or direct work on
|
||||
their branch. A retried stage's `input.md` carries a `# Previous attempt` section
|
||||
(why the last attempt failed) and, with `--input-file`, a `# Operator correction`
|
||||
section holding only the overridden keys.
|
||||
|
||||
## Use an existing pipeline
|
||||
|
||||
|
||||
Reference in New Issue
Block a user