Skip to content
Back to skills

Approve Red

ASecurity

Approve the open stage's RED tests, unlocking implementation edits (human action)

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
developmentshellbashnodegit

Works with

  • claude code
  • terminal
  • cli

Security analysis

A100/100

Scanned November 25, 2026

npx -y skills add kknipe2k/Software-Build-Assurance-Kit --skill approve-red --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Approve Red?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Approve Red
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/kknipe2k-approve-red/badge)](https://www.skillsdirectory.com/skills/kknipe2k-approve-red)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Approve the open stage's RED tests, unlocking implementation edits (human action)
disable-model-invocation: true
---

You are confirming, **as the human reviewer**, that you have read the surfaced failing (RED) tests for the open stage and approve their design. This is gate 2 of the three-gate per-stage loop (plan → **red** → stage-end).

This is YOUR action, not the agent's — run it only after you have actually reviewed the test files the agent surfaced at the red-stop.

> **The RED-RELEASE line (M22 ruling 5).** In the two-brain flow the release arrives in the orchestrator's RED verdict packet as the explicit line `RED-RELEASE: approved - builder, run node scripts/approve-red.cjs --stage <id> --release-seq <n>`; the agent may run the command **only in response to that line**, with this command's `ask` prompt as your release click. Approval language without the line **is not a release** — the agent stops and tells you `/approve-red` is required. (Running it yourself in your own terminal, outside the Claude Code session, works too, with no prompt, except under a test runner or a package script, or where the process tree cannot be read.) The release reads the process tree, never the session id alone: run by a test runner or a package script it is refused wherever it runs, and from a Claude Code session it needs the prompt it asked (deterministic enforcement).

**Who releases.** The release is your click on this command's prompt in the build window, or the command run in your own terminal (human authorization). `/send --approval` in the orchestrator window carries the orchestrator's verdict and its RED-RELEASE line to the builder, and the builder runs this command only in answer to that line (agent judgment); the verdict is not itself a release.

Steps:

1. Run `node scripts/approve-red.cjs --stage <id> --release-seq <n>` as one command, nothing before or after it: `<id>` is the open stage (`.claude/stage-active`), `<n>` is the seq of the pending approval-request (the RED verdict on the channel), or `none` when no verdict is pending. It refuses any other stage or seq, and the red gate refuses any other form of the command except one read-only command that names it (cat, head, tail, wc, grep, rg, diff, cmp, ls, stat, or git add, diff, show, log, blame, status or commit, with no separator, substitution or redirect), which it does not judge under the Bash tool while it carries no parenthesis or brace outside quotes, since PowerShell runs a command inside one; under the PowerShell tool no read-only command naming it is exempt (deterministic enforcement). It first checks the read ledger: every read-first entry tagged `when: stage-open` and every path in the open stage prompt's `<read_first>` must have a recorded read (Read tool or Bash) - if one is missing it refuses with one line naming the file, and the agent reads it and you re-run. Then it records the approval (below) and atomically writes `.claude/red-approved`: the stage id, then the line that binds the record.
2. The PROC-001 PreToolUse red-gate now allows implementation edits for **this** stage, while the approval stands. Opening the next stage with `/stage` removes the red-approved marker (best effort; the approval record stays until the close archives it), so a fresh stage starts un-approved; closing the stage at commit (`node scripts/stage-active.cjs --clear`) removes the marker and archives the record into `.claude/measurements/<stage>/`.

If it errors with "no .claude/stage-active", there is no open stage — the gate is dormant and nothing needs approving.

**The approval record.** Every release appends one approval row to `.claude/channel/approval.json` and writes the marker as two lines: the stage id, then `record <sha256 of that row>`. The row says who released (the session's role), where (the repository identity), when (the prompt's time), the session, the released seq, the commit it was approved at, the scope (the Phase doc, its blob, and the sha256 of the stage's section) and every test file changed at approval, by sha256 and by its bytes in git's object store. A re-approval appends a row; nothing is overwritten. The release refuses, and approves nothing, when it cannot record this evidence: a missing `scripts/lib/read-ledger.cjs`, `scripts/lib/channel.cjs` or `scripts/lib/receipts.cjs` is one line naming the step and the repair, `node scripts/kit-update.cjs --adopt`. A release whose RED set is empty (no test file differs from HEAD), or that git cannot list (not a repository, or git did not run), is refused the same way: nothing is written.

**The five cases.** A change after the release is judged by what it touches, never by a hash alone:

| Case | Who decides | What checks it |
|---|---|---|
| (1) Implementation changes while the tests are made to pass | nobody: this is expected | nothing |
| (2) An edit inside an approved test file | the orchestrator's ack, with no keystroke from you | `channel.cjs publish --kind amendment`, then `channel.cjs ack`, which prints each file's diff summary |
| (3) A test file added, an approved one deleted or renamed, or a new stage id | you, with `/approve-red` again; the approval is void until then | the red gate checks the approved files before each implementation edit; the stage-end publish refuses a test file added after the release, and an approved one that is missing or renamed |
| (4) The approved scope changed: the stage's section, a section a ref names (the whole Scope beside a Key constraints ref), `docs/scope.md`, or the two locks of `docs/identity.md`, at HEAD or in the index | the orchestrator sends the amended scope, then you run `/approve-red` (human authorization); until then the amendment and stage-end publishes refuse, while the approval itself stands for the red gate | the amendment and stage-end publishes compare each with the record at HEAD and in the index, the bytes the commit will carry (deterministic enforcement); a ref's own refs are not followed, and a section no ref names is outside the record |
| (5) An amendment that removes or loosens an assertion | you, with `/approve-red`: the ack refuses it | the ack recounts the amended file with the test-honesty counters: fewer assertions, a skip or todo added, a literal changed, or an assertion rewritten |

**Un-approve (the void).** To take a release back, run `node scripts/approve-red.cjs --stage <id> --void --reason "<text>"` as one command. It appends a `void` row to the record, removes the marker and records a `red_voided` receipt; the next implementation edit is refused with `[red-gate] approval void - stage <id>'s RED approval was voided (<text>); the owner runs /approve-red`. The reason is 1 to 200 characters in double quotes, with none of `"`, `$`, a backtick, a backslash, `;`, `&`, `|`, `<` or `>`. The same permission prompt asks for it, because it is the same script.

> Honest scope: the gate is a process bar-raise, not a wall. It judges the edit tools and a short list of shell write constructs (a parser, not a sandbox: a script that writes a file itself is not judged). It catches an approved test file deleted, renamed or changed without an ack before the next implementation edit, and the ack refuses a loosened assertion; a test written weak before the release is caught only by this red-review and a mutation-kill check.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.