← Work
// autonomous agents · hermes agent skill · v1.1.0

An autonomous committee that stress-tests AI code before you see it

Single-pass LLMs suffer from "First-Draft Sycophancy"—they write code that compiles, rationalize their initial choices, and rubber-stamp their own self-reviews. Critic-Refine v1.1.0 enforces a 3-tier adversarial tribunal: a dense logical blueprint generator, an anti-complacent polymorphic critic (with Zero-Context Blind Audits), and a judge applying a strict deductive scoring rubric.

★ GitHub Repo (v1.1.0) ↗ Read Dev.to Deep-Dive ↗
3-tierBlueprint · Critic · Judge
100 - ΔDeductive anti-sycophancy score
Blind AuditZero-context sub-agent isolation

The problem

Single-pass AI generators suffer from structural complacency and retroactive rationalization: they commit to an architectural path in the first 150 tokens, write verbose boilerplate that passes basic happy-path tests, and fall in love with their own explanations when asked to self-review.

In production, however, subtle failure modes remain undetected: floating-point precision imprecisions (1e-16) causing CPU micro-spins, silent float('nan') bypasses freezing thread pools, timing attacks in token comparisons, or memory leaks under concurrency. Standard chat assistants lack a built-in adversarial counterweight to catch these issues before handing code to the engineer.

What I built (v1.1.0 Upgrade)

An open-source, production-grade skill for Hermes Agent (v1.1.0) that intercepts high-stakes engineering tasks and runs an internal 3-phase adversarial tribunal before generating the final response.

  • Phase 1 — The Generator (Dense Logical Blueprint v1): Formalizes a compact technical blueprint (function signatures, state structs, concurrency locks, SQL/API flows) without boilerplate or comments to preserve context window attention and expose pure architecture.
  • Phase 2 — The Polymorphic Critic (Anti-Complacency Rule): Dynamically adopts the harshest domain persona (Principal Rust Systems Engineer, Staff DBA, Lead SecOps Pentester) and is strictly forbidden from approving Draft v1 as-is—it must uncover at least 3 concrete failure vectors (or focus 80% of its attack on mode:<focus>).
  • Phase 3 — The Arbitrating Judge (Mental Dry-Run & Deductive Rubric): Simulates execution against hostile inputs (null payloads, integer overflows, 100x concurrency spikes, mid-transaction disk crashes), runs up to 2 internal feedback loops, and scores confidence deductively from 100 (-5 pts per unverified infra assumption, -5 pts per non-isolated external dependency, -10 pts per edge case delegated to the caller).
  • Zero-Context Blind Audit (delegate_task Deep Mode): When touching >= 3 files or invoked with deep, spawns an isolated Critic sub-agent that receives only the user prompt and Draft v1—stripping the Generator's reasoning to eliminate confirmation bias.
LIVE 3-ROLE AGENT COMMITTEE SIMULATOR
Test Adversarial Code Audit, Flaw Teardown & Convergence

Select a high-stakes engineering task below to see the Generator's first draft, the Polymorphic Critic's attack vectors, and how the Judge Arbitrator patches subtle failure modes before delivery.

SELECT HIGH-STAKES PROBLEM:
01 · GENERATOR FIRST-PASS DRAFT INITIAL CONFIDENCE: 52%

        
02 · POLYMORPHIC CRITIC (SECOPS / THREAD AUDITOR) CRITICAL FLAW FOUND ⚠️
03 · JUDGE ARBITRATOR & FINAL GATE FINAL SCORE: 96 / 100
// HARDENED PRODUCTION IMPLEMENTATION

        
RADICAL TRADE-OFF TRANSPARENCY

RUNTIME Hermes Agent native skill (v1.1.0)
BLIND AUDIT delegate_task (≥ 3 files or deep)
MAX REVISIONS 2 internal feedback loops
DEDUCTIVE RUBRIC 100 base (-5 infra / -5 dep / -10 edge)

How it works

User Prompt high-stakes task PHASE #1 01 · Generator dense Blueprint v1 ✦ BLIND CRITIC #2 Polymorphic Critic ≥3 flaws · mode:<focus> PHASE #3 Judge Arbitrator dry-run & -5/-5/-10 Output Report 1:1 trace + deductive Feedback Loop (max 2x) anti-complacency: ≥3 flaws required

Adversarial audit is executed before the user ever sees a character of code.

Under the hood

PITFALL

The silent float('nan') infinite loop trap

In standard rate limiter or validation code, guards like if tokens <= 0: raise ValueError look airtight. But in Python and IEEE 754, comparisons against float('nan') always return False.

If an input payload passes NaN, it slips right past the validator into the while-loop, where self.tokens >= tokens is permanently False, triggering a 100% CPU infinite spin that hangs the worker thread.

// IEEE 754 EXPLOIT AUDIT · SILENT WORKER THREAD HANG
Naive Guard: tokens <= 0
100% CPU LOCK THREAD HANG
❌ float('nan') <= 0 evaluates to False! Bypasses guard into infinite loop.
Hardened Gate: math.isfinite()
AIRTIGHT EXCEPTION
✅ Traps NaN and Inf immediately, raising clean 400 Bad Request before thread acquires lock.
ARCHITECTURAL RULE: Never rely on inequality operators (<, >, <=, >=) to validate untrusted floats. Always enforce math.isfinite() at the network boundary.

FIX The Critic systematically checks numeric boundary conditions and enforces math.isfinite() across all arithmetic entry points.

DECISION

Zero-Context Blind Audit vs. In-Turn Scratchpad

When an LLM reviews its own code inside a single context window, it reads the Generator's persuasive justifications alongside the code, triggering confirmation bias. However, spawning OS sub-agents via delegate_task on trivial single-file snippets adds unnecessary coordination latency.

TRADE-OFF In v1.1.0, single-file tasks run in-turn via a dense logical blueprint (zero boilerplate). As soon as a task touches >= 3 files or includes the deep flag, Critic-Refine triggers a Zero-Context Blind Audit via delegate_task—passing only the raw prompt and Draft v1 to the Critic sub-agent without the Generator's reasoning.

PITFALL

The illusion of "flawless" 98/100 AI scores

Left to grade themselves, LLMs hallucinate arbitrary 95–98% confidence scores and present their code as universally optimal. In real engineering, every production fix involves trade-offs (e.g., mutex lock contention vs. thread safety) and residual assumptions.

DECISION v1.1.0 replaces "vibes-based" scoring with a strict deductive rubric starting at 100: -5 pts per unverified infra assumption, -5 pts per non-isolated external dependency, and -10 pts per edge case delegated to the caller—paired with 2 mandatory production monitoring alerts.

Results

Benchmarked across complex distributed and concurrent tasks:

  • Token Bucket Rate Limiter: Caught IEEE 754 micro-spin (sub-millisecond busy-waits) and reentrant deadlocks on threading.Lock.
  • Payment Webhooks: Replaced variable-time string comparisons with hmac.compare_digest (eliminating timing attacks) and blocked memory-bomb DoS attacks via stream chunk capping.
  • Write-Ahead Log Engine: Replaced fragile JSON appending with binary frame CRC32 verification and asynchronous group commit batching.

Stack

  • Hermes Agent: Open-source agent runtime by Nous Research
  • Skill Engine: Declarative markdown-based procedural agent memory
  • Multi-Agent Protocol: Actor-Critic adversarial pipeline with calibrated scoring
  • Google AI Studio (Gemini Flash): High-throughput reasoning backbone (>180 tokens/sec)

What I took away

Adversarial tension beats model size. A lightweight, cost-effective model constrained by an aggressive critic consistently out-engineers an unchecked flagship model that is left to grade its own work.