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:
2026-12-03 00:27:14 +00:00
parent accb9970b6
commit 2bde6b6344
16 changed files with 658 additions and 56 deletions
+19 -7
View File
@@ -8,7 +8,7 @@ EXECUTE
provider-check Validate a provider/model with a tool-free response
run [name] [prompt] Fuzzy selection, multiline prompt, live inspector
runs List audited runs; --pipeline filters results
inspect <run-id> Inspect stages, outputs, errors and status
inspect <run-id> Compact run summary; --step N, --transcripts, --json for detail
wait <run-id> ... Block until runs finish, then report each (read-only)
cancel <run-id> Cancel a run; changes are NOT rolled back
decide <run-id> [stage] Choose an option for a run waiting on a person
@@ -74,14 +74,26 @@ Options: --url ws://127.0.0.1:8080/connect --json --help
Use pipelines help <command> for its flags. Names with spaces must be quoted.
Stage result format:
Model and agent stages accept a line-oriented result. The first non-empty line
is the declared outcome, followed by "# " sections. "# output" is required and
short (a JSON object carrying the next stage's data); additional sections are
free-form markdown evidence. The legacy {"outcome":...,"output":...} JSON
envelope remains accepted for compatibility.
A model stage writes markdown to output.md. Only "# outcome" is parsed: its
first non-blank line is exactly one of the stage's declared outcome words
(case-insensitive). "# handoff" is the short note the next stage receives;
everything else is free markdown evidence. Larger results go in public/.
# handoff
Changed a.go; tests pass. Review the retry path.
# outcome
done
Agents and scripts (no terminal): pass --yes and --json. Without a terminal the
CLI never opens a full-screen view or prompts; a missing --yes fails at once.
pipelines run "bug fix" "Fix the layout" --json --yes
pipelines wait <run-id> exit 0 succeeded, 2 a run failed/canceled/interrupted, 1 client error
pipelines inspect <run-id> compact summary (--step N, --transcripts, --json)
pipelines retry <run-id> --yes --json
Examples:
pipelines run "bug fix" "Fix the layout" --json
pipelines run "bug fix" "Fix the layout" --json --yes
pipelines run "bug fix" "Fix the layout" --model openai/gpt-5 --stage-model review=openai/o4 --json
Authoring examples — use only when the operator explicitly requested a definition change: