heyytars

Stage Gate Loops — Development skill for Claude Code

Development community

Deterministic gates between agent stages: a check after every step, a stop at the first failure, and a rerun of only the stage that broke.

How to install Stage Gate Loops

This entry records only its repository, not the path inside it, so there is no exact command to give. Open heyytars/stage-gate-loops and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Stage Gate Loops does

Deterministic gates between agent stages: a check after every step, a stop at the first failure, and a rerun of only the stage that broke.

Alternatives in Development

  • Om Tidy — Self-maintenance pass — acts on every hygiene flag: archives completed work, groups loose clusters, splits ove 4.6k ★
  • PropMotion — Claude Code skill: make one 3D object perform in your SwiftUI app 108 ★
  • Adversarial Dev — GAN-inspired three-agent harness that pits a generator against an adversarial evaluator to build applications 97 ★

README

Stage gate loops: four stages, each ending in a gate that must pass before the next stage runs

stage gate loops

**Every stage of an agent's work ends at a gate. The gate passes, the next stage runs. The gate fails, the line stops.**

[![ci](https://github.com/heyytars/stage-gate-loops/actions/workflows/ci.yml/badge.svg)](https://github.com/heyytars/stage-gate-loops/actions/workflows/ci.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-1a7f37.svg)](LICENSE) [![python](https://img.shields.io/badge/python-3.9%2B-0969da.svg)](pyproject.toml) [![GitHub Action](https://img.shields.io/badge/GitHub%20Action-composite-1a7f37.svg)](action.yml)

`sgl` is a small runner for that pattern. A gate is any command: exit `0` means pass, anything else stops the run. No model grades the work, so there is nothing to argue with. A schema either validates or it doesn't. Tests either pass or they don't.

It works with any agent: Claude Code, Codex, your own scripts, or plain cron. PyYAML is the only dependency.

Try it in a minute

pip install git+https://github.com/heyytars/stage-gate-loops
git clone https://github.com/heyytars/stage-gate-loops
cd stage-gate-loops/examples/blog-publish && sgl run pipeline.yaml
A real sgl run: stage 3 fails the no-em-dash gate, the failure is handed back, and only stage 3 runs again

The draft broke one rule. The gate caught it at stage 3, the exact failing line went back to the agent, and only stage 3 ran again. Research did not repeat, and publish never saw a bad draft.

The examples use offline stub agents, so they run free and give the same result every time. Point them at a real model with `AGENT_CMD="claude