step5-review-gate

step5-review-gate is a command for GitHub Copilot from srnichols/plan-forge. It costs 23 tokens per session (1,189 once invoked), scanned A, original, MIT.

A read-only review step for checking completed code against its plan and project rules. It also looks for drift, meaning changes that no longer match the agreed work.

In plain words
What is it for?
Use it as a final quality gate after implementation and completeness checks, producing either a pass or a lockout for fixes.
Why use it?
It provides an independent check before shipping and can catch missing work or unintended changes.

Command for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt.

Good fit Use it as a final quality gate after implementation and completeness checks, producing either a pass or a lockout for fixes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/srnichols/plan-forge/step5-review-gate
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.

Clone the repo
git clone --depth 1 https://github.com/srnichols/plan-forge

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for step5-review-gate

README.md
[![agentmods](https://agentmods.dev/badge/commands/srnichols/plan-forge/step5-review-gate.svg)](https://agentmods.dev/commands/srnichols/plan-forge/step5-review-gate)
Your own site
<a href="https://agentmods.dev/commands/srnichols/plan-forge/step5-review-gate"><img src="https://agentmods.dev/badge/commands/srnichols/plan-forge/step5-review-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 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,189 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00023 $0.01189
Opus 5 $0.00012 $0.00594
Sonnet 5 $0.00005 $0.00238
Haiku 4.5 $0.00002 $0.00119

Measured today against content hash 5f35d51c1ddd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

step5-review-gate 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 today.

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.

.github/prompts/step5-review-gate.prompt.md · 111 lines

How it starts

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

Step 5: Review & Audit Gate

Pipeline: Step 5 of 5 (Session 3 — Review & Audit)
When: After completeness sweep passes (Step 4), in a fresh agent session
Model suggestion: Claude or Gemini — best at independent critical analysis and drift detection
Verdict: PASS (ship it) or FAIL (lockout — fix and re-review)

Replace <YOUR-HARDENED-PLAN> with your hardened plan filename.


Read these files first:

  1. docs/plans/AI-Plan-Hardening-Runbook.md (Section 6.2 + Drift Detection Prompt)
  2. docs/plans/.md
  3. .github/copilot-instructions.md
  4. .github/instructions/ (relevant guardrail files for this phase)
  5. docs/plans/DEPLOYMENT-ROADMAP.md

Now act as a REVIEWER GATE + DRIFT DETECTION AGENT.

You are an independent quality gate. You should be a different session from the one that wrote the code.

Pre-review context check:

  • Check OpenBrain (if configured): search_thoughts("<plan topic> review", project: "<YOUR PROJECT NAME>") — load prior review findings, recurring issues, and known patterns
  • Check LiveGuard memories: Read .forge/liveguard-memories.jsonl if present — recent drift violations and incidents may flag known problem areas

--- PART A: CODE REVIEW ---

Review checklist:

  1. SCOPE COMPLIANCE — All changes within the Scope Contract?
  2. FORBIDDEN ACTIONS — Off-limits files/folders touched?
  3. ARCHITECTURE — Code follows layer separation?
  4. ERROR HANDLING — Proper error types, no empty catch blocks?
  5. NAMING — Follows project naming conventions?
  6. PATTERNS — Follows existing patterns from .github/instructions/?
  7. TESTING — New features covered by tests?
  8. SECURITY — Input validation? No secrets in code?

For each finding, assign: 🔴 Critical / 🟡 Warning / 🔵 Info

Output Part A:

# File Finding Severity Rule Violated

--- PART B: DRIFT DETECTION ---

Compare Scope Contract against actual changes:

  1. SCOPE CREEP — Work not in Scope Contract?
  2. UNPLANNED FILES — Files not in any Execution Slice?
  3. NON-GOAL VIOLATIONS — Work contradicting Out of Scope?
  4. FORBIDDEN ACTIONS — Off-limits touched?
  5. ARCHITECTURAL DRIFT — Patterns conflicting with instructions?

Output Part B:

File Issue Violated Section

--- COMBINED SUMMARY ---

  • Code Review: Critical: N | Warnings: N | Info: N
  • Drift Detection: Drift found: Yes/No (N issues)
  • Verdict: PASS or FAIL (LOCKOUT)

Do NOT modify any files. Report only.

If the verdict is PASS and the phase is Small or Medium (≤5 slices), you may proceed to Step 6 (Ship) in this same session — Session 4 is optional for smaller features. For Large phases (6+ slices), a separate Session 4 is recommended to avoid context exhaustion.


Read the full file on GitHub · 111 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. today First seen · 111 lines · 23 tokens per session scan A 5f35d51c1ddd

Subscribe to this mod's changes

step5-review-gate is a command published in the GitHub repository srnichols/plan-forge (5 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 1,189 once invoked, about $0.0001 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-09-08.