gauntlet-loop
Skill1 starsChanged 17 days agoMITView on GitHub
Bounded multi-agent quality improvement loop that prevents infinite iterations, self-grading delusions, and regression churn. Orchestrates Builder, Fresh Critic, Automated Gate (with web application security headers and visual breakpoint audit), and Integrator roles with strict stop conditions (proof of passing, 2-round score plateau, regression, or max iteration budget). Generates GAUNTLET_JOB_CONTRACT.md, ITERATION_LEDGER.md, and ACCEPTANCE_PACKET.md.
We split this skill into the rules it gives an agent
10 rules. 0 are common, 8 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Every invocation resolves to exactly one mode.
- Distinctive: line 61
Do NOT use this skill when:
- Distinctive: line 118
When evaluating web endpoints or frontend components:
- Very specific: line 121
CMS-Cohesion & Hardcoded Copy Gate: When CMS/page builder is detected, ensure all editable marketing copy and customizable styles live …
- Very specific: line 122
Verified Deploy Gate: Before marking any web delivery task complete, verify the preview/staging URL returns HTTP 200 without runtime fatal …
- Distinctive: line 132
Name the Bar: If the user supplied a reference, use it.
- Distinctive: line 187
When the user asks to *"make a gauntlet prompt"* or *"loop until it beats X"*, craft ONE short, paste-ready prompt (120–180 words):
- Distinctive: line 197
Self-Grading Bias: Never allow the builder subagent to evaluate its own work.
- Distinctive: line 201
Ignoring Score Plateau: If round 2 scores 7.5 and round 3 scores 7.4, STOP immediately.
- Distinctive: line 209
Before declaring gauntlet completion:
“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🛡️ Gauntlet Loop — Bounded Multi-Agent Quality Improvement Loop
A deterministic, bounded quality improvement loop that eliminates infinite token burns, self-grading delusions, and regression churn. Deploys an unyielding, 4-role protocol (Freeze → Build → Fresh Critic → Automated Gate → Integrator) with hard mathematically enforced termination boundaries, OWASP security header verification, and multi-viewport visual regression gates.
Modes
Every invocation resolves to exactly one mode. Load only the matched reference:
| Mode | Trigger phrases | Behavior | Reference |
bar-selection-and-blind-critique | "gauntlet-loop bar-selection-and-blind-critique", "bar-selection-and-blind-critique" | The Bar Selection & Blind Critique Protocol | references/bar-selection-and-blind-critique.md |
gauntlet-protocol | "gauntlet-loop gauntlet-protocol", "gauntlet-protocol" | Gauntlet Loop Protocol Reference | references/gauntlet-protocol.md |
web-security-visual-gate | "gauntlet-loop web-security-visual-gate", "web-security-visual-gate" | Web Application Security & Visual Regression Gate Reference | references/web-security-visual-gate.md |
When to Use
Trigger Conditions
Execute this skill when:
- Multi-Round Code/Doc Refinement: A complex task requires iterative quality improvement across multiple passes.
- Preventing Self-Grading Delusion: The builder agent must NOT evaluate its own output; an isolated Fresh Critic must score the work against frozen criteria.
- Web Application Hardening Gate: Iterating on web apps, frontend templates, or API servers requiring strict security headers (CSP, HSTS) and responsive viewport checks (375px, 768px, 1280px).
- Hard Stop Boundaries Required: Guarding against runaway agent loops where changes oscillate or degrade previous passes.
- Mission-Critical Delivery: High-stakes deliverables requiring an ironclad
ACCEPTANCE_PACKET.md.
Anti-Triggers
Do NOT use this skill when:
- The task is a trivial one-liner fix or typo correction (use direct editing).
- The task is exploratory research without a concrete deliverable (use research subagent).
- Task dependencies are heavily coupled and unsplit (run
coupling-routerfirst).
Quick Reference
The 4 Gauntlet Roles & Blind Reference Bar
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────────┐ ┌─────────────────┐
│ BUILDER │ ────▶ │ FRESH CRITIC │ ────▶ │ AUTOMATED GATE │ ────▶ │ INTEGRATOR │
│ Minimal, clean │ │ Blind audit vs │ │ Tests, types, secret scans, │ │ Merges ONLY the │
│ diff candidate │ │ NAMED REAL BAR │ │ security headers & viewports│ │ #1 largest fix │
└─────────────────┘ └─────────────────┘ └─────────────────────────────┘ └─────────────────┘🎯 "The Bar is the Whole Trick" Doctrine
The loop only produces quality if the thing it compares against is real:
- Named: A specific entity, not an abstract category ("Nike's running landing page", not "modern athletic sites").
- Fetchable: The critic can obtain the raw reality (live URL screenshot, published article, test suite).
- Comparable: Both artifacts can sit side-by-side so a judge can pick a winner.
| Goal Type | Concrete Passing Bar | Measurable Half |
| Web Apps & UI | Live site of named best-in-class product screenshotted at 375px & 1440px. | Zero layout shift, CSP/HSTS headers, zero horizontal scroll overflow. |
| Code & CLI Tools | Top-tier open source repository implementation (e.g. Bun, Ripgrep, Hono). | Benchmark latency, memory footprint, 100% test pass rate. |
| Writing & Essays | Specific published article by named author (e.g. Julia Evans, Paul Graham). | Reading grade level, clarity score, word count parity. |
| System Research | Named industry whitepaper or peer-reviewed methods section. | Citation count, empirical receipts, falsifiable claims. |
Stop Conditions Matrix
| Condition | Trigger Rule | Action |
| ✅ Proof of Passing | All automated tests green + Critic score $\ge 9.0/10$ + zero blockers + security/visual gates pass | TERMINATE (SUCCESS) → Output ACCEPTANCE_PACKET.md |
| 🛑 Score Plateau | 2 consecutive rounds without net score improvement ($\Delta \le 0$) | TERMINATE (PLATEAU) → Emit Dead-Letter escalation |
| 📉 Score Regression | Round score drops by $> 1.0$ point or automated tests break | REVERT to previous round baseline & halt |
| ⏳ Budget Exhaustion | Reaches max_iterations (default: 3 rounds, hard max: 5) | TERMINATE (BUDGET) → Deliver current best checkpoint |
| 👤 Human Override | Explicit user halt or steering directive | HALT immediately |
Right-sized change verification (tiers — do not over/under-check)
Match the check depth to the change's blast radius before committing, so small edits don't burn tokens and risky ones don't slip (keeper: 99rebels/regression-guard):
| Tier | When | Minimum check |
| 🟢 Tier 1 (light, ~200-300 tokens) | 1 file, <10 lines, no signature changes | signature scan + import integrity |
| 🟡 Tier 2 (standard, ~1-2k tokens) | 2-3 files, 10-50 lines, or a shared utility touched | caller trace + test suite + orphan check |
| 🔴 Tier 3 (deep, ~3-5k tokens) | >3 files, >50 lines, or signature/API changes | transitive trace + behavioral contract + alignment + test generation |
This is a checkpoint, not a controller — it surfaces findings for the agent/user to decide, and it runs after the change before the full test suite. Most changes are Tier 1 (80%+).
Web Application Automated Gate Checklist
When evaluating web endpoints or frontend components:
- Security Headers (OWASP): CSP, HSTS,
X-Frame-Options: DENY,X-Content-Type-Options: nosniff,Referrer-Policy: strict-origin-when-cross-origin. - Responsive Viewports: Tested at
375px(mobile),768px(tablet),1280px(desktop) for zero horizontal scrollbar overflow (scrollWidth === innerWidth). - CMS-Cohesion & Hardcoded Copy Gate: When CMS/page builder is detected, ensure all editable marketing copy and customizable styles live inside CMS collections/globals/tokens. Hardcoded text blocks (>60 chars) or inline CSS bypassing tokens must be flagged (
bun anti-drift.ts --scan-cms-cohesion). - Verified Deploy Gate: Before marking any web delivery task complete, verify the preview/staging URL returns HTTP 200 without runtime fatal exceptions (
bun anti-drift.ts --verify-deploy <url>).
Procedure
Option A: Autonomous Multi-Role Execution Loop
Step 1 — Set the Real Bar & Freeze the Job Contract (GAUNTLET_JOB_CONTRACT.md)
- Intake triage ratchet (superpowers/brainstorming S1): classify the job aloud as spike (throwaway probe), bounded (fixed-scope fix), or architectural (structural change). Complexity upgrades the path, never downgrades it. Human-approval gate before ANY code on every path — freeze the contract first, build never.
- Name the Bar: If the user supplied a reference, use it. If not, offer 2 or 3 candidate bars (one line each) and wait for their pick.
- Lock Contract: Record in workspace root:
- Goal: Precise, measurable objective statement.
- Concrete Bar: Named fetchable reference artifact.
- Acceptance Criteria: 3–5 binary checkboxes + OWASP security headers + responsive viewports.
- Automated Proof Commands: Pinned commands (
bun test,tsc --noEmit,SecretScan.ts, curl header audits). - Iteration Budget: Max rounds (default 3, hard ceiling 5).
Step 2 — Round Execution Loop (with Blind A/B Critique)
Round N (N = 1..max_rounds):
1. BUILD: Builder produces candidate patch based strictly on previous round critic feedback.
- **Fresh worker per task (superpowers/subagent-driven-development S3)**: spawn a fresh worker per round/task with the brief file as the single source — never paste prior-round history. Per-task review against spec + quality.
- **Fix-loop cap with escalation (S3)**: hard cap 5 rounds; rounds 4–5 escalate (stronger model / narrower scope) and any further failure escalates to human with ledger receipt. **Ledger over memory**: `ITERATION_LEDGER.md` is the source of truth (compaction-proof) — rulings recorded there, not carried in context.
- **Evidence baseline pre-step (#35)**: before producing a fix, run the target test/command to capture its RED (failing) state. A fix may not enter the loop without this baseline on record — the loop later proves the fix turned it green.
- **High-certainty sweep gate (#34)**: when working from an issue/finding list, deep-review each candidate first, then touch ONLY small, high-certainty bugs with a clear root cause. Refuse large or uncertain changes as out of scope — note them in the ledger and return, don't burn the round on guesswork.
- **Sweep autonomy ladder (lane A #7 brooks-sweep)**: safe changes (typos, formatting, isolated renames, pinned-dependency bumps with green gate) auto-apply; risky changes (API/signature, migrations, security headers, cross-file refactors) require explicit confirm-first. Read-only audit stays excluded from auto-apply.
2. AUDIT (Blind A/B): Spawn isolated Fresh Critic subagent with NO memory of builder reasoning.
- Strip labels from candidate and bar.
- Put candidate next to the bar blind; judge which is better and name the single biggest remaining gap.
- **Root-cause-before-fix (superpowers/systematic-debugging S5)**: no fix scores above 5 on Correctness without a named root cause (Symptom→Source chain); symptom-only patches are rejected feedback, not progress. **3 failed fixes → question architecture**: three rounds failing on the same root cause stops the fix loop — escalate to an architecture question instead of burning rounds 4–5 on the same shape.
- **Second-model review gate + refusal routing (lane A #12 gbrain-cross-modal-review)**: on high-stakes rounds, route the blind critique to a second model; on critic refusal, silently switch reviewer (log the switch in the ledger) rather than stalling the loop.
- **Metric honesty** (source: `addyosmani/agent-skills` agents `web-performance-auditor`): never fabricate a measurement — unmeasured = `not measured`, lab ≠ field.
- **No-persona-spawns** (source: `addyosmani/agent-skills` agents rule): the critic never delegates to sub-reviewers; orchestration belongs to the loop caller.
- **Prove-It** (H12 test-engineer rule): already landed as the TDD iron law above (S4) — cited, not duplicated.
- **Adversarial reviewer** (source: lane H1 #7 `doubt-driven-development`): prompt critic to disprove, not confirm; evidence = ARTIFACT+CONTRACT only, never CLAIM; non-triviality gate (5 criteria); CLAIM→EXTRACT→DOUBT→RECONCILE→STOP with 3-cycle cap, then STOP/escalate.
- Score 0.0–10.0 across: Correctness (40%), Minimal Diff (25%), Edge Cases (20%), Architecture (15%).
3. GATE: Run automated proof suite AND integrity checks AND Web App Security & Visual Gate:
- **TDD iron law — Automated Gate clause (superpowers/tdd S4)**: watch the test FAIL first or it proves nothing; code written before its failing test is deleted and the round restarts. Evidence (RED receipt) before claim, every round.
- **Discover-the-Stack-First preamble** (source: `addyosmani/agent-skills` `test-driven-development`): read package.json/wrappers/framework/conventions/CI before the first test; focused-test command in the loop, full suite before completion; never assume `npm test`.
- **Testing-patterns bar** (source: `addyosmani/agent-skills` `references/testing-patterns`): AAA structure, names `[unit]-[behavior]-[condition]`, mock-at-boundaries-only matrix (mock DB/HTTP/FS/clock; never mock internals or pure functions), and the 8-row anti-pattern table. JS/TS syntax illustrative — principles portable across stacks.
- **Test-bloat gate (#33)**: every generated or altered test must be non-vacuous and independently valuable — it must be capable of failing on the defect class it guards and must assert something the other tests don't. Strip assertions that can never fire and near-duplicate asserts added to inflate coverage; a screen of smoke asserts inflates line-and-assert counts, not proof.
- Check 5 mandatory security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy).
- Check 3 responsive viewports (375px, 768px, 1280px) for zero horizontal overflow.
- **Quality-bar regression check**: scan the round's diff for a lowered bar — new suppression directives, skipped or deleted tests, weakened assertions, thresholds edited down. Any of these zeroes the round score (0.0): a build that passes because the bar was lowered is a regression, not a pass.
- **Fail-closed eval check**: confirm the proof suite contains at least one test that CAN fail on the defect class the round claims to fix. If nothing in the suite could have caught the defect, a green run proves nothing — the round does not pass until a capable test exists (write it, watch it fail on the pre-fix state).
- Any test failure, missing critical security header, visual overflow, quality-bar regression, or failed fail-closed check zeroes the round score (0.0).
4. RECORD: Append round metrics, header receipts, viewport outcomes, and finding counts (new findings vs fixed findings this round) to ITERATION_LEDGER.md — the ledger is the convergence instrument: when new findings outnumber fixed findings two rounds running, the loop is diverging, not converging — stop and escalate instead of burning the remaining budget. **Deduplicate by root cause before counting**: if a finding from a previous round reappears (even under new phrasing), it is NOT a new finding — it is an unfinished one and counts against convergence, not for it.
- **Tech-debt roadmap (#32)**: after each bounded loop, write the fixed/refused findings into a durable TECHNICAL_DEBT.md (workspace `.agents/artifacts/`) — root cause, file, ref and one-line fix — so improvement stays stateful across sessions and checkpoints survive the loop ending. This roadmap is the persistent backlog, distinct from the per-run convergence ledger.
- **Tech-debt sprint mode (lane A #8 tech-debt-sprint)**: when the contract scopes a debt sprint, run inventory taxonomy first (TODOs, outdated deps, missing tests, god objects) → fix smells → remove dead code → harden review pass. Each phase logs into the ledger; refused items land in TECHNICAL_DEBT.md.
5. DECIDE: Evaluate Stop Conditions Matrix.Step 3 — Integrator Gate
The Integrator agent NEVER merges bulk diffs. It isolates and applies only the single highest-impact delta that directly improved the score, preserving all previously verified baselines.
Step 4 — Acceptance Packet Synthesis (ACCEPTANCE_PACKET.md)
Upon reaching success termination, compile the final artifact:
- Summary of rounds executed and score trajectory ($R_1 \rightarrow R_N$).
- Verbatim execution receipts of automated proof commands, security headers, and viewport checks.
- Verified diff summary and signature.
Option B: Gauntlet Prompt Synthesizer Mode
When the user asks to "make a gauntlet prompt" or "loop until it beats X", craft ONE short, paste-ready prompt (120–180 words):
- Set the Bar: Name a concrete, fetchable reference.
- Break into Pieces: Smallest judgeable components.
- Blind Critic Directive: Fresh critic puts output next to the bar blind with labels stripped and names the #1 biggest gap.
- Offer to Run: Append flat line:
I can run this here.
Pitfalls
- Self-Grading Bias: Never allow the builder subagent to evaluate its own work. The critic MUST run in an isolated conversation context.
- Overlooking Security Headers: Shipping web apps or APIs with missing CSP or HSTS headers.
- Horizontal Scroll Blowout: Failing to audit the 375px mobile viewport for layout blowouts.
- Diff Bloat Across Iterations: Reject candidates that expand the diff surface by $>30%$ without a proportional score increase.
- Ignoring Score Plateau: If round 2 scores 7.5 and round 3 scores 7.4, STOP immediately. Do not attempt round 4.
- Lowered-Bar Green: Passing the gate by suppressing, skipping, or weakening checks in the same diff — the gate measures the artifact, not the artifact's ability to evade measurement.
- Vacuous Green: Accepting a green proof suite that contains no test capable of failing on the round's defect class — an unevaluatable claim is not a pass; add the capable test first.
Verification
Before declaring gauntlet completion:
GAUNTLET_JOB_CONTRACT.mdexists with frozen acceptance criteria.ITERATION_LEDGER.mdlogs every round with objective critic score breakdown.- All automated proof commands exit with return code
0. - Web applications pass security header audit (CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy).
- Multi-viewport visual check passes at 375px, 768px, and 1280px with zero horizontal overflow.
ACCEPTANCE_PACKET.mdis generated with final verification receipts.- CMS-Cohesion audit passes when a CMS or visual page builder is present.
- Live deployment preview is verified with HTTP 200 response receipt.
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- duolahypercho/gauntlet-loop★ 157same name
- emaraschio/cursor-commands★ 9same name
- sidneyswift/skills★ 9same name
- NicholasSpisak/gauntlet-loop★ 4same name
- protonspy/spec-claude-code★ 4same name
- trilwu/gauntlet-loop-skills★ 3same name
- Kohulan/orthonym-skills★ 2same name
- rubenmarcus/agent-skills★ 2same name
- alexanderpino/skills★ 1same name
- callmeradical/skills★ 1same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use graphify, grill-me and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
IgorGanapolskySkillgraphify
Query the local Graphify-Labs AST knowledge graph for ThumbGate architecture questions (what connects X to Y, explain a symbol, PreToolUse/gates/adapters). Slash: /graphify.
Also in 3 projects that use this
GoogleSkillgrill-me
A relentless interview to sharpen a plan or design.
Also in 4 projects that use this
GoogleSkillgrilling
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 4 projects that use this
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
- accountsSkill
- analyticsSkill
- automationSkill
- brandSkill
- client-commsSkill
- contentSkill
- crmSkill
- databaseSkill
- designSkill
- devopsSkill
- growthSkill
- gtmSkill
- incident-responseSkill
- mobileSkill
- opsSkill
- paidadsSkill
- qa-launchSkill
- researchSkill
- retainSkill
- sales-enablementSkill
- seoSkill
- smmSkill
- telegramSkill
- webdevSkill
- context-anchorSkill
- coupling-routerSkill
- evidence-ledgerSkill
- relaySkill
- secretarySkill
- gitSkill
- new-projectSkill
- updateagentsSkill
- updatedocsSkill
- animateSkill
- designscopeSkill
- refactorSkill
- auditSkill
- code-reviewSkill
- dead-letterSkill
- humanizeSkill
- muse-securitySkill
- puaSkill
- clean-system-cacheSkill
- coachSkill
- periodic-retreatSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

