# GOAT Flow: A Structured Workflow Framework for AI Programming Agents

> GOAT Flow is a structured workflow system designed for AI programming agents. It addresses common reliability issues in agent development through the READ→SCOPE→ACT→VERIFY execution loop, seven structured skills, safety hooks, and learning loops.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-04-20T21:14:52.000Z
- 最近活动: 2026-04-20T21:19:58.034Z
- 热度: 163.9
- 关键词: AI agent, Claude Code, Codex, Gemini CLI, workflow, harness engineering, execution loop, safety hooks, learning loop, multi-agent
- 页面链接: https://www.zingnex.cn/en/forum/thread/goat-flow-ai
- Canonical: https://www.zingnex.cn/forum/thread/goat-flow-ai
- Markdown 来源: floors_fallback

---

## Introduction / Main Post: GOAT Flow: A Structured Workflow Framework for AI Programming Agents

GOAT Flow is a structured workflow system designed for AI programming agents. It addresses common reliability issues in agent development through the READ→SCOPE→ACT→VERIFY execution loop, seven structured skills, safety hooks, and learning loops.

## Problem Background: Why Do We Need a Workflow Framework?

While current mainstream AI programming assistants (such as Claude Code, Codex, Gemini CLI) are powerful, they have systemic flaws when executing autonomously. They tend to guess the meaning of unread code, submit modifications without checking, create duplicate files instead of editing existing ones, and fail to learn from past mistakes. The root cause of these issues lies in the lack of structured execution constraints and cross-session memory mechanisms.

The traditional solution is to write detailed instruction files telling agents the rules to follow, but instruction files can only provide suggestions and cannot enforce compliance. GOAT Flow's core insight is: Agents need a set of non-skippable mechanisms, not just rules they should remember.

## Core Architecture: Five-Layer Protection System

GOAT Flow is built around five key concerns, each corresponding to a specific type of failure mode:

## 1. Execution Loop (READ → SCOPE → ACT → VERIFY)

This is GOAT Flow's core workflow pattern. Before performing any operation, the agent must first read the relevant code (READ), clarify the modification scope (SCOPE), execute specific modifications (ACT), and finally verify the results (VERIFY). The VERIFY phase requires running actual tests and citing specific pass/fail outputs instead of simple retellings. This mandatory sequence prevents agents from making blind modifications without understanding the codebase.

## 2. Structured Skill System

GOAT Flow provides seven predefined skill commands (e.g., /goat-review, /goat-plan, /goat-critique), each with clear phases and human checkpoints. This contrasts with free-form prompts, which tend to drift during execution. The skill system ensures agents always handle specific types of tasks in a consistent manner.

## 3. Safety Hooks (Enforcement Hooks)

The framework includes the deny-dangerous.sh hook by default, which intercepts tool calls before execution. This prevents dangerous operations such as rm -rf, force-push, and accessing key files. Unlike post-hoc audits, hooks block execution beforehand, providing true security protection.

## 4. Learning Loop

GOAT Flow maintains footguns (common pitfalls), lessons (learned experiences), decisions (decision records), and session logs in the .goat-flow/ directory. These contents are automatically read at the start of a session, enabling agents to avoid errors that were recorded last week. This cross-session memory mechanism addresses the root problem of agents repeating mistakes.

## 5. Autonomy Levels and Reference Templates

The framework defines three autonomy levels: Always (execute always), Ask First (ask before executing), Never (never execute), to prevent agents from overstepping their authority. It also provides reference templates for planning, security, compliance, and other fields to ensure outputs meet domain-specific professional standards.
