<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Javier García Camacho — Engineering & AI]]></title><description><![CDATA[Javier García Camacho — Engineering & AI]]></description><link>https://dimoncelli.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 13:36:38 GMT</lastBuildDate><atom:link href="https://dimoncelli.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why Your Coding Agent Agrees With Its Own Bugs: Building cold-jury, a Zero-Dep Cross-CLI Review Gate]]></title><description><![CDATA[Applying Google's Elephant-Goldfish pattern and arXiv:2607.21656 to run sterile, cross-model hostile code reviews in Node.js]]></description><link>https://dimoncelli.hashnode.dev/why-your-coding-agent-agrees-with-its-own-bugs-cold-jury</link><guid isPermaLink="true">https://dimoncelli.hashnode.dev/why-your-coding-agent-agrees-with-its-own-bugs-cold-jury</guid><category><![CDATA[AI]]></category><category><![CDATA[Security]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[Open Source]]></category><dc:creator><![CDATA[Javier García Camacho]]></dc:creator><pubDate>Mon, 09 Nov 2026 08:57:20 GMT</pubDate><content:encoded><![CDATA[<p>If you ask the same coding agent session that just wrote a 300-line change to review its own <code>git diff</code> before committing, it will almost always rubber-stamp it.</p>
<p>That is not a prompt engineering problem. It is a structural context problem: over the course of the conversation, the model has already rationalized every shortcut, extra abstraction, and edge-case assumption in its context window. Asking it to audit that same thread asks it to contradict its own recent reasoning.</p>
<p>Recent empirical benchmarks confirm how steep this self-bias is. In <strong>Cross-Model LLM Code Review</strong> (<a href="https://arxiv.org/abs/2607.21656">arXiv:2607.21656</a>, evaluated across 116 tasks on LiveCodeBench):</p>
<ul>
<li>Having <strong>Claude Sonnet 4</strong> review its own drafts yielded <strong>+0.0 percentage points</strong> of improvement (<code>91.4%</code> -&gt; <code>91.4%</code>).</li>
<li>Having <strong>Claude Sonnet 4</strong> review drafts written by <strong>OpenAI Codex</strong> jumped pass rates from <strong><code>71.6%</code> to <code>89.7%</code> (+18.1 percentage points)</strong>.</li>
<li>Even a weaker model (<strong>GPT-4o-mini</strong>, <code>69.0%</code> baseline) reviewing <strong>Claude Sonnet 4</strong> improved Claude's final score from <strong><code>91.4%</code> to <code>94.0%</code> (+2.6 percentage points)</strong> because uncorrelated error distributions expose blind spots.</li>
</ul>
<p>To automate that cross-examination without cloud lock-in or heavy wrappers, I built and open-sourced <strong><a href="https://github.com/Dimoncelli/cold-jury">cold-jury</a></strong> (MIT).</p>
<hr />
<h3>What <code>cold-jury</code> Does</h3>
<p><code>cold-jury</code> is a zero-dependency Node.js (<code>&gt;=20.0.0</code>) CLI and universal AAIF Skill (<code>SKILL.md</code>, <code>agents/openai.yaml</code>, <code>.claude-plugin</code>) that implements Google's <strong><a href="https://github.com/google/elephant-goldfish-model">Elephant-Goldfish Model (EGM)</a></strong>:</p>
<ol>
<li><strong>Your coding agent is the Elephant</strong>: it holds full repository memory, user history, and task context.</li>
<li><strong><code>cold-jury</code> spawns three ephemeral Goldfish jurors</strong> in a <strong>different CLI</strong> (<code>Writer != Juror</code>) inside isolated temporary working directories (<code>fs.mkdtempSync</code>) with no conversation memory, no project dotfiles, and a stripped environment variable allowlist.</li>
</ol>
<p>Each juror receives only two inputs:</p>
<ul>
<li>A single-sentence scope specification (<code>--spec</code>).</li>
<li>The redacted unified <code>git diff</code>.</li>
</ul>
<hr />
<h3>The 4-Stage Pipeline</h3>
<h4>1. Local Pre-Flight Secret Shield (Before Any Subprocess Spawns)</h4>
<p>Sending a raw <code>git diff</code> or <code>--spec</code> string to an external CLI risks leaking live credentials that accidentally landed in the working tree. Before <code>cold-jury</code> spawns any child process, a local scanner inspects both the diff and the <code>--spec</code> text across <strong>17 credential families</strong>:</p>
<ul>
<li>Private keys (<code>-----BEGIN ... PRIVATE KEY-----</code>)</li>
<li>AWS (<code>AKIA...</code>, <code>ASIA...</code>), Stripe (<code>sk_live_...</code>, <code>rk_live_...</code>), Anthropic (<code>sk-ant-...</code>), OpenAI (<code>sk-proj-...</code>), GitHub (<code>ghp_...</code>, <code>github_pat_...</code>), Google (<code>AIza...</code>), Slack (<code>xoxb-...</code>), SendGrid (<code>SG....</code>)</li>
<li><code>.env</code> secret assignments, <code>Authorization: Bearer</code> headers, JWTs, database URIs with embedded passwords (<code>postgres://user:pass@...</code>), and high-entropy secret assignments.</li>
</ul>
<p>If a <strong><code>P0</code> secret</strong> is detected, <code>cold-jury</code> <strong>short-circuits immediately with exit code <code>1</code> (<code>BLOCK</code>)</strong> before a single byte leaves your machine. Lower-severity tokens are replaced in-memory with <code>[REDACTED:&lt;RULE_ID&gt;]</code>.</p>
<h4>2. Cross-Vendor Juror Selection (<code>Writer != Juror</code>)</h4>
<p><code>cold-jury doctor</code> discovers which CLIs are installed and authenticated on your machine across five supported engines:</p>
<ul>
<li><code>claude</code> (Anthropic Claude Code)</li>
<li><code>codex</code> (OpenAI Codex CLI)</li>
<li><code>gemini</code> (Google Gemini CLI)</li>
<li><code>opencode</code> (OpenCode CLI)</li>
<li><code>ollama</code> (Local Ollama models, verified via live HTTP <code>/api/tags</code> check so stopped daemons are marked <code>OFFLINE</code>)</li>
</ul>
<p>When you run <code>cold-jury review --author codex</code>, the selector automatically picks the highest-leverage available non-author CLI (prioritizing <code>claude &lt;-&gt; codex</code> cross-family pairings).</p>
<h4>3. Three Parallel Adversarial Probes in Sterile Rooms</h4>
<p>Instead of asking one generic "please review this diff" prompt, <code>cold-jury</code> runs three narrow, hostile probes concurrently (<code>Promise.allSettled</code>):</p>
<ul>
<li><strong><code>appsec</code></strong>: CWE-mapped vulnerabilities (command/SQL injection, SSRF, XSS, path traversal, auth bypass, hardcoded secrets).</li>
<li><strong><code>correctness</code></strong>: logic bugs, unhandled rejections, race conditions, off-by-one errors, null/undefined dereferences, broken edge cases.</li>
<li><strong><code>surgical</code></strong>: YAGNI and scope discipline (<code>ponytail-surgical-coding</code>) — flags drive-by refactors, unrequested abstractions, and dead code outside <code>--spec</code>.</li>
</ul>
<p>To prevent prompt injection from untrusted strings inside the diff itself, the diff is wrapped in per-run random nonce fences (<code>&lt;&lt;&lt;DIFF_8f3a...&gt;&gt;&gt;</code>), and every child process is spawned with <code>shell: false</code> (plus explicit <code>cmd.exe /d /s /c</code> metacharacter validation on Windows <code>.cmd</code> shims to mitigate <code>CVE-2024-27980</code>, and <code>--end-of-options</code> on <code>git diff</code> ranges to prevent <code>CWE-88</code> argument injection).</p>
<h4>4. Deterministic Gate (<code>PASS = 0</code>, <code>BLOCK = 1</code>)</h4>
<p>Findings are deduplicated across probes and evaluated against your severity threshold (<code>--fail-on P1</code> by default). Any <code>P0</code> or <code>P1</code> finding—or any failed/timed-out probe (fail-closed)—returns exit code <code>1</code>.</p>
<hr />
<h3>Quickstart (Zero Install or Universal Skill)</h3>
<p>You can run it directly from GitHub on any Node <code>&gt;=20</code> machine:</p>
<pre><code class="language-bash"># 1. Check installed CLIs and cross-review matrix
npx --yes github:Dimoncelli/cold-jury doctor

# 2. Run a cross-CLI hostile review on your current git diff
npx --yes github:Dimoncelli/cold-jury review \
  --author claude \
  --spec "Validate JWT audience claim and reject expired refresh tokens"

# 3. Install a non-bypassable git pre-push hook
npx --yes github:Dimoncelli/cold-jury init-hook
</code></pre>
<p>Or install it as a native <strong>Agent Skill</strong> for Claude Code, Codex, Gemini CLI, Cursor, or OpenCode:</p>
<pre><code class="language-bash">npx skills add Dimoncelli/cold-jury
</code></pre>
<p>The repository is MIT-licensed, ships with <code>0</code> runtime npm dependencies (<code>24 files, 31.6 kB</code> packed), and runs 164 automated tests across Linux, macOS, and Windows:</p>
<p>👉 <strong>GitHub Repository:</strong> <a href="https://github.com/Dimoncelli/cold-jury">https://github.com/Dimoncelli/cold-jury</a></p>
<p>I would love feedback from anyone running multi-agent coding workflows—especially on additional secret patterns, probe heuristics, or local Ollama model pairings you find effective for code review.</p>
]]></content:encoded></item></channel></rss>