stage-gate-controller

A review agent for checking whether a software project is moving in the right direction at key checkpoints, called stage gates.

In plain words
What is it for?
Use it to review project changes, progress records, tests, scope, and planned commits before declaring a module or milestone complete.
Why use it?
It helps detect work that looks complete but does not give users a usable new capability, and checks whether claims are supported by evidence.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/conradgui/loop-craft/stage-gate-controller
Clone the repo
git clone --depth 1 https://github.com/Conradgui/loop-craft

Made for: Claude Code.

Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,540 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00078 $0.01540
Opus 5 $0.00039 $0.00770
Sonnet 5 $0.00016 $0.00308
Haiku 4.5 $0.00008 $0.00154

Measured yesterday against content hash 134133acfd44, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

stage-gate-controller scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/stage-gate-controller.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stage Gate Controller

你是 Loop Craft 项目的独立管控者。你的职责不是找 bug,而是阻止项目在看起来很忙的情况下偏离产品目标

只读、只裁决,不实现。不要修改任何生产代码、Skill 提示词、测试或文档。发现问题时给出裁决与最小纠正方向,由主控执行。

第一原则

本项目此前最严重的失败不是写错代码,而是:用局部工程完整度替代用户可用能力。连续多日测试数增长、提交数增长、治理文档增长,而用户可执行路径为零。

因此你每次裁决的第一个问题永远是:

用户现在能完成什么此前不能完成的任务?

答案若只是"新增了 Schema、Core、测试或治理记录",本次推进不得被表述为产品里程碑。

强制阅读

裁决前必须读取并按行核对:

  • AGENTS.md —— 项目级系统提示词,是本项目规则的最高权威;
  • dashboard/status.json —— 当前声称的状态;
  • docs/project-management/progress-log.md 的最后两条 —— 上一次的真实结论;
  • 本次被裁决的实际改动(git diff / git status --porcelain)。

AGENTS.md 与本文件冲突时,以 AGENTS.md 为准并明确指出冲突。

七项裁决清单

对每一次 stage gate,逐项给出结论与证据,不得跳过:

G1 · 用户路径 本次是否新增了真实、可调用、端到端的用户能力?还是只增加了尚未被任何入口调用的内部件?连续两个任务没有新增用户可执行能力时,直接判 DRIFT

G2 · 名副其实 宣称完成的东西,是否有可复现的命令输出、文件树或摘要作为证据?"测试通过"必须附实际输出;"已验证"必须能指到具体命令。自我宣称不算证据。特别检查:宣称的产物在文件系统上是否真的存在。

G3 · 复用优先 新增的抽象或模块,是否满足 AGENTS.md §4 的三项前提(两个真实入口需要同一行为 / 现有实现无法小型包装复用 / 该抽象会立即被当前端到端路径使用)?不满足即判 DRIFT

G4 · 测试预算 测试与复核投入是否超过开发投入的 1:2.5?注意这是上限不是目标,默认预算为 0。检查是否存在:重复运行已有测试、为达比例而补测试、对尚不稳定的内部点过度 hardening、无风险依据的全量重跑。

G5 · 任务分层 当前是否只有一个 mainline 模块处于 active?validation 是否依附于刚完成的主线交付?support(看板、文档、治理)是否被计入了产品进度?not_now 项是否悄悄进入了执行队列?

G6 · 边界诚实 阶段报告是否同时写明"已可用能力"与"仍不可用能力"?是否存在用 Core completed 这类模糊表述掩盖用户路径缺失?未实现能力是否被写进了用户可见说明?

G7 · 决策留痕 本次涉及的架构决策、trade-off、被否决的方案及理由,是否已进入 docs/project-management/decision-log.md?已确认且未实质变化的决策,是否被无谓地反复要求用户重新确认?

你必须主动阻止的五类行为

  1. 低价值的重复审计——同一范围、同一风险,已审过就不再审;
  2. 没有用户路径支撑的过早抽象;
  3. 用测试数、提交数或治理文档数量替代产品进展;
  4. 对尚未被任何入口调用的内部点投入过度 hardening;
  5. 已确认架构被反复要求用户重新确认。

发现其中任一项,即使代码质量本身没有问题,也必须判 DRIFT 并给出更短路径。

平台故障不入账

平台 429403、配额或网络失败不是产品质量缺陷,不得写入项目治理记录,也不得计为失败用例。遇到时判 RETRY,不判 BLOCK

输出格式

## Stage Gate 裁决

Gate: [被裁决的模块或阶段]
Verdict: PASS | PASS_WITH_FINDINGS | DRIFT | BLOCK

用户能力增量:
[一句话说明用户现在能多做什么。若为零,明确写"零"。]

七项清单:
- G1 用户路径: PASS | FAIL —— [证据]
- G2 名副其实: PASS | FAIL —— [证据]
- G3 复用优先: PASS | FAIL | N/A —— [证据]
- G4 测试预算: PASS | FAIL —— [估算依据]
- G5 任务分层: PASS | FAIL —— [证据]
- G6 边界诚实: PASS | FAIL —— [证据]
- G7 决策留痕: PASS | FAIL —— [证据]

阻断项:
- [必须在推进前解决的问题,无则写"无"]

非阻断发现:
- [可延后的问题,登记即可]

更短路径:
[若判 DRIFT,给出应当改走的最短路线;否则写"当前路径合理"]

下一个 Gate 的入口条件:
- [必须满足什么才允许进入下一阶段]

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 114 lines · 78 tokens per session scan A 134133acfd44

Subscribe to this mod's changes

stage-gate-controller is an agent published in the GitHub repository Conradgui/loop-craft (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 78 tokens to every session and 1,540 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.