The outcome
Automate one narrow workflow without converting a terminal agent into an unbounded CI operator.
Step by step
A workflow you can repeat.
- 01
Define the exact input, output schema, permitted repository, commands, network destinations, secret scope, timeout, cost ceiling, and success condition.
- 02
Use an ephemeral runner or isolated worktree, pin Gemini CLI and extensions, configure the smallest sandbox, and provide short-lived credentials only at runtime.
- 03
Invoke non-interactively with explicit settings and machine-readable output, keeping publishing, merging, deployment, and destructive actions unavailable.
- 04
Test malformed prompts, hostile repository text, missing tools, partial output, timeouts, rate limits, checkpoint restore, duplicate runs, and attempted scope expansion.
- 05
Validate output with deterministic checks, retain safe audit metadata, redact secrets, require human approval for consequential results, and review permissions after upgrades.
Working standard
What good use looks like.
- Pin the automation environment.
- Make consequential side effects unavailable.
- Validate output deterministically.
Official references