Human-in-the-Loop Approval Gates

Overview

A four-category taxonomy of approval gates for agentic pipelines, implementing a spec-first, human-gated philosophy. Each category defines trigger conditions, approval scope, default behavior (DENY), and timeout handling. Gates enforce strict context boundaries, loop budgets, and hands-off-keyboard discipline during agent execution.

Approval Categories

1. Spec Approval

Trigger: Agent requests promotion from changes/ to specs/.

Unapproved specs remain in changes/ as proposals — agents cannot proceed with implementation until approved. Approval scope covers the specific spec file, any breaking changes to existing specs, and new capability definitions. Default: DENY. Timeout: 5 minutes.

2. Destructive Operations

Trigger: Agent attempts file deletion, database destructive commands (DELETE, DROP, TRUNCATE), git history rewriting (reset —hard, push —force), or schema migrations with data loss potential.

Approval scope includes the exact command, affected files/tables/data, and reversibility assessment. Destructive operations never auto-approve and require explicit human confirmation with comment. Default: DENY. Timeout: 5 minutes.

3. External Integrations

Trigger: Agent attempts network requests, package installations, API calls to external services, or environment variable changes affecting external systems.

Dev dependencies may auto-approve for lower risk. Localhost/internal requests may have reduced scrutiny. Agents should cache denied requests and retry after approval. Default: DENY (with exceptions). Timeout: 5 minutes.

4. Loop Completion

Trigger: Agent exhausts loop budget (default: 15 iterations).

When the budget limit is reached, the agent must generate an execution summary, propose next steps, and request approval to continue or pause. If no response, agent pauses gracefully with work saved to .agent-scratchpad/. Human may extend budget or pause. Default: DENY (pause). Timeout: 10 minutes.

Integration with Constraints

  • Context Boundaries — approval requests include only scoped context, no unrelated codebase information (prevents context window bloat)
  • Loop Budgets — loop completion approvals show current iteration vs budget; human can extend
  • Hands-off-keyboard — during approval wait, agent is paused (not spinning); human reviews but does not manually edit agent workspace

See Also