Workflow
Define the outcome
Describe the behavior you need and add acceptance criteria: the paths that must work, the failures to handle and what must stay true.
Think: establish the plan
The goal loop scopes the work before any code is written. A large goal is split into contracts, each with an owner, its dependencies and its checks. You review the plan when a decision changes the scope.
Execute: implement within the scope
Workers do the agreed work and record check results as they go. Parallel workers each get their own worktree and draft pull request. Action gates check every tool action along the way.
Verify: challenge the result
An independent reviewer reruns the checks against the acceptance criteria, and a critic probes the claims and the missing cases. A command counts toward a pass only when it tests what the criterion asks.
Review before completion
The completion record links each criterion to its check results and names what is still open. See Verification for verdicts tied to a commit.
When a code gate blocks progress
Read the failed condition, fix the cause and rerun the check. If the criterion itself is unclear, settle it first.
Autonomy levels
Each level keeps the checks of the one before it and hands one more kind of approval from you to a check. Keep branch protection and CI on at every level.
Level 0: you approve each action
- You approve: each shell command, file edit and web fetch the coding tool asks about. In Claude Code's Manual mode, file reads in the working directory and a built-in set of read-only commands run without asking.
- Turned on by: the coding tool's own permission prompts. No Asondy piece is needed.
Level 1: action gates refuse dangerous commands
- You approve: what the coding tool still asks about, and every push and merge.
- Turned on by: installing Asondy. The Destructive commands and Piped shell gates deny before a command runs, Push main denies a push to the default branch, and the Secret scan blocks prompts, tool calls and tool results that carry a secret. In Claude Code an action gate answers before the permission prompt, so a denied command never reaches you.
- Runs in: Claude Code. The OpenCode gates plugin runs the shell-command gates, and Codex, Gemini CLI, Qwen Code and Kimi Code deny a push to the default branch.
Level 2: gates hold code before it leaves
- You approve: merges. A push that passes its checks goes through without you.
- Turned on by: the Push gate, which runs the code gates and the secret scan before every push or pull request, and the Submission gate, which checks the submitted revision on the server where remote checking is enabled.
- Runs in: Claude Code, Codex, Gemini CLI, Qwen Code, Kimi Code and OpenCode, before the push command runs. In a repository where Asondy is active, its git hook also runs the gate for a push from any tool.
Level 3: the goal loop decides when work is done
- You approve: the goal and its acceptance criteria before the work starts, and the merge.
- Turned on by: the goal loop. The Stop hook holds completion until every pass cites a recorded result, an independent reviewer reruns the relevant checks, and a critic probes the claims and the missing cases.
- Runs in: Claude Code.
Level 4: parallel workers run unattended
- You approve: any exception to a failed check. A merge on red or unchecked CI is denied, and an agent cannot approve the exception.
- Turned on by: parallel workers, each in its own worktree with a draft pull request. A circuit breaker halts the run when a criterion keeps failing, injection attempts repeat or cycles make no progress, and on cost once you set a cap. A worker stops at a checkpoint before an irreversible high-stakes step, and where a deployment turns it on, risk-based intervention can pause a worker.
- Runs in: Claude Code.
Questions
How do I stop an AI coding agent from saying it is done when it is not?
Give the goal acceptance criteria. The Stop hook blocks completion until every pass cites a recorded result, and an independent reviewer reruns the checks instead of reading the agent's report.
Who checks the work an AI coding agent did?
Not the agent that did it. A separate reviewer reruns each check itself, and a critic looks for claims the checks do not back.
Can several coding agents work on one goal at the same time?
Yes. The goal is split into contracts, and each parallel worker gets its own worktree and draft pull request.
How much autonomy can I safely give Claude Code?
As much as your checks can verify. Action gates refuse destructive commands and pushes to main, push gates hold failing code, and the goal loop holds completion until an independent reviewer reruns the checks. Keep branch protection and CI on.
References
- About protected branches, GitHub Docs
- OWASP Top 10 for LLM Applications, OWASP GenAI Security Project
- Configure permissions, Claude Code Docs