Zing Forum

Reading

PlanGate: A Gated Governance Workflow for AI Coding Agents

A governance-first workflow framework for AI programming agents. It uses two human approval gates (C-3 and C-4) to ensure AI does not write production code until it receives approval for clear plans and test cases.

AI编码门控工作流治理框架Claude CodeCodex CLI审批机制TDDScrum
Published 2026-05-01 14:13Recent activity 2026-05-01 14:22Estimated read 5 min
PlanGate: A Gated Governance Workflow for AI Coding Agents
1

Section 01

PlanGate: Introduction to the Gated Governance Workflow for AI Coding Agents

PlanGate is a governance-first workflow framework for AI programming agents. Its core philosophy is 'admit no code before', using a dual-gate mechanism of C-3 (plan approval) and C-4 (PR review) to ensure AI does not write production code until it gets human approval for plans and test cases. The framework emphasizes approval boundaries, audit capabilities, and Scrum affinity, aiming to balance AI efficiency and human oversight.

2

Section 02

Why Do We Need Gated Mechanisms for AI Coding?

Current AI coding tools generally have the problem of excessive autonomy, leading to deviations in demand understanding, lack of auditability, uncontrollable quality, and absence of human oversight. PlanGate uses a structured gated mechanism to fix human judgment points at key nodes, ensuring AI work remains within a controllable range.

3

Section 03

Dual-Gate Architecture and Complete Workflow

PlanGate sets two human approval gates: C-3 and C-4.

Gate Timing Judgment Options
C-3 After plan review, before implementation APPROVE/CONDITIONAL/REJECT
C-4 After AI implementation, on GitHub PR APPROVE/REQUEST CHANGES

Complete process: Human writes PBI → AI generates plan → C-3 approval → AI implementation (TDD) → Automatic verification (L0/V1-V4) → Create PR → C-4 review → Merge.

4

Section 04

Six Core Design Principles

  1. Plan First: Implementation is only allowed after generating plans, todos, and test cases;
  2. Gate Control: C3/C4 cannot be bypassed;
  3. Built-in Verification: Multi-layer verification including L0 (lint correction), V1 (acceptance check), etc.;
  4. State Persistence: All records are stored in docs/working/TASK-XXXX/ to form an audit trail;
  5. Execution Layer Separation: Separation of Workflow/Skill/Agent (v7+);
  6. Control OS: Includes components like Intent, Mode (v7.2+).
5

Section 05

Typical Workflow and Multi-Tool Collaboration

Typical steps:

  1. Create working context (/working-context TASK-XXXX);
  2. Edit PBI input (clarify Why/What/acceptance criteria);
  3. Generate plan (/ai-dev-workflow plan);
  4. C-3 review;
  5. Execute implementation (/ai-dev-workflow exec);
  6. C-4 review.

Supports multi-tool collaboration:

Tool Role Status
Claude Code Plan generation, execution orchestration Fully supported
Codex CLI External review, parallel execution Fully supported
Gemini CLI External review Supported
OpenCode Implementation agent Supported
Cursor Implementation agent Planned
6

Section 06

Governance Value and Scrum Affinity

Governance Value: Provides complete audit trails, clear responsibility division, compliance support, and risk control. Scrum Affinity: PBI aligns with product backlog, plan approval corresponds to Sprint planning meetings, PR review corresponds to code review practices, and state persistence supports Sprint retrospectives.

7

Section 07

Conclusion and Application Scenarios

PlanGate represents the evolution of AI-assisted coding towards governance priority. It does not limit AI capabilities but ensures it maximizes value within the correct boundaries. Suitable for teams balancing AI efficiency and human oversight, its dual-gate architecture, multi-tool support, and extensible DSL allow it to adapt to various scenarios from small projects to enterprise applications.