Skip to main content
LatticeAG

Poly Series

PolyGnosis

Hermes Skill

Hermes Agent skill for adversarial multi-model consensus - independent solve, critique, formal scoring, verified synthesis.

Quick start

Start with the primary command, then continue with the full workflow below.

git clone --depth=1 https://github.com/mosesman831/PolyGnosis.git /tmp/polygnosis

Problem

A single model's hallucination risk is unacceptable for mission-critical work where a wrong answer costs real money, reputation, or safety - yet most AI workflows still bet everything on one model's opinion. Naive multi-agent systems don't fix this: they run several agents on the same model, so the same blind spots and failure modes repeat in every independent answer. There is no formal way to decide which of several competing solutions is actually best - the strongest code often loses to the most confident-sounding answer. Even a good synthesis can regress below the best individual solution, and nothing explains why the final verdict was reached or what risks remain.

Solution

PolyGnosis eliminates single-model hallucination risk by routing complex problems through a formal adversarial consensus protocol built on the PolyBrain orchestration pattern. Three or more frontier models from genuinely different model families solve independently from dynamically assigned expert personas (Security Auditor, DB Consultant, Backend Architect), then a hostile critic model cross-reviews every solution for bugs, hallucinations, edge cases, and security flaws. Formal ranking algorithms - Reciprocal Rank Fusion (RRF) and Borda Count - convert LLM per-axis scores (0-10 across 5 dimensions) into a deterministic winner, so no single opinionated model dominates the outcome. A Constitutional Quality Gate rejects the synthesis if it regressed versus the best individual solution, a Meta-Reviewer explains the verdict, and severe bugs persist to a Reflexion corrections buffer injected into future solver prompts.

How it works

01

Clone and install the skill into Hermes: git clone --depth=1 https://github.com/mosesman831/PolyGnosis.git /tmp/polygnosis, remove the .git folder, and copy the skill to ~/.hermes/skills/research/polygnosis.

02

Configure model aliases in ~/.hermes/skills/research/polygnosis/config.yaml - orchestrator, solver_1/2/3, critic, synthesizer, meta_reviewer, fallback - where solvers must be different model families to enforce diversity.

03

Validate the config with python ~/.hermes/skills/research/polygnosis/scripts/validate_config.py.

04

Use it in chat - tell Hermes what you want (e.g. "Use PolyGnosis to design a production-grade JWT auth middleware in Rust") and Hermes runs the consensus protocol; or run the boardroom pipeline directly by piping the objective to python ~/.hermes/skills/research/polygnosis/scripts/boardroom_pipeline.py.

05

Phase 0: the Orchestrator builds a structured problem statement with success criteria and dynamically assigns expert personas with matching tool restrictions (read-only personas get web,file; builders get terminal,file,web via hermes chat -t).

06

Phases 1-1.5: 3+ solvers run in parallel via ThreadPoolExecutor; an Early Resolution circuit checks for unanimous consensus and bypasses critique + scoring when found (massive cost and latency savings).

07

Phases 2-3: a critic hunts bugs in each solution (CRITICAL/HIGH issues saved to .corrections_buffer.json), then LLM per-axis scores (Correctness, Efficiency, Maintainability, Robustness, Security) are fused with RRF + Borda Count for the formal ranking.

08

Phases 4-6: the Synthesizer merges the strongest elements, the Constitutional Quality Gate compares synthesis vs. best individual solution (FAIL falls back to the top individual solution), and the Meta-Reviewer explains the consensus decision.

Technical architecture

Each handoff carries structured context through the product's execution path. Hover a node to inspect its role.

01

Orchestrate

Step 1: Orchestrate receives structured context from the prior stage and prepares it for the next handoff.

02

Parallel Solve

Step 2: Parallel Solve receives structured context from the prior stage and prepares it for the next handoff.

03

Early Resolution

Step 3: Early Resolution receives structured context from the prior stage and prepares it for the next handoff.

04

Adversarial Critique

Step 4: Adversarial Critique receives structured context from the prior stage and prepares it for the next handoff.

05

Consensus Scoring

Step 5: Consensus Scoring receives structured context from the prior stage and prepares it for the next handoff.

06

Synthesis

Step 6: Synthesis receives structured context from the prior stage and prepares it for the next handoff.

07

Quality Gate

Step 7: Quality Gate receives structured context from the prior stage and prepares it for the next handoff.

08

Meta-Review

Step 8: Meta-Review receives structured context from the prior stage and prepares it for the next handoff.

When to use

  • Mission-critical engineering design where a hallucination costs real money, reputation, or safety.
  • Architecture/code decisions that deserve multiple independent expert perspectives plus adversarial review.
  • Problems where you need a mathematically defensible winner among competing solutions, not the loudest answer.
  • Security-sensitive tasks that benefit from a hostile critic hunting vulnerabilities before deploy.
  • Workflows that must enforce model diversity - three genuinely different model architectures, not just different prompts.
  • When you want self-improving output, where past severe bugs are injected into future solver prompts.

Not for

  • Quick, low-stakes questions where one good model call is cheaper than a multi-model consensus run.
  • Tasks where your provider pool can't supply 3+ distinct model families (config requires different architectures per solver).
  • Interactive, real-time chat - the full protocol (solve to critique to score to synthesize to gate to meta-review) takes minutes.
  • When chosen models hang - some (e.g. gpt-5-mini via certain providers) can hang 600s+ in hermes chat subagent calls; test with hermes chat -q "ping" -m your-model first.

Features

Parallel solve - 3+ distinct model families solve independently from specialized personas via ThreadPoolExecutor

Adversarial critique - a dedicated critic model hunts bugs, hallucinations, edge cases, security flaws, and architecture issues

Formal consensus scoring - LLM per-axis scores (0-10 across 5 dimensions) ranked deterministically by RRF + Borda Count

Constitutional Quality Gate - rejects synthesized output that regressed below the best individual solution

Meta-review - explains why the verdict was reached, which flaws were rejected, and remaining risks

Dynamic personas - orchestrator generates domain-specific expert roles from the problem statement

Asymmetric tool allocation - personas get role-matched toolsets enforced via hermes chat -t

Reflexion corrections buffer - CRITICAL/HIGH severity bugs persisted and injected into future solver prompts

Early Resolution circuit - unanimous consensus bypasses critique + scoring phases

Graceful degradation - solver timeouts don't crash the pipeline; minimum quorum (default 2 solvers) keeps consensus meaningful

Debate rounds - configurable critique to revise loop, default 2 rounds

Config-driven - solver_count, scoring_algorithm (rrf | borda | hybrid), quality_gate_enabled, early_resolution_enabled in config.yaml

Install and usage

usage.sh
# 1. Clone and install the skill
git clone --depth=1 https://github.com/mosesman831/PolyGnosis.git /tmp/polygnosis
rm -rf /tmp/polygnosis/.git
cp -r /tmp/polygnosis ~/.hermes/skills/research/polygnosis
rm -rf /tmp/polygnosis

# 2. Edit config.yaml with your model aliases
#    (orchestrator, solver_1/2/3, critic, synthesizer, meta_reviewer, fallback)
#    solvers must be different model families
hermes config edit  # then edit ~/.hermes/skills/research/polygnosis/config.yaml

# 3. Validate config
python ~/.hermes/skills/research/polygnosis/scripts/validate_config.py

# 4. Use it - just tell Hermes what you want in a chat:
"Use PolyGnosis to design a production-grade JWT auth middleware in Rust"
# Hermes loads the skill and runs the consensus protocol for you.

# Advanced/manual use - run the boardroom pipeline directly:
echo "Build a production-grade database connection pool in Go with connection
health checks and graceful draining" |   python ~/.hermes/skills/research/polygnosis/scripts/boardroom_pipeline.py

Architecture explorer

Problem

A single model's hallucination risk is unacceptable for mission-critical work where a wrong answer costs real money, reputation, or safety - yet most AI workflows still bet everything on one model's opinion. Naive multi-agent systems don't fix this: they run several agents on the same model, so the same blind spots and failure modes repeat in every independent answer. There is no formal way to decide which of several competing solutions is actually best - the strongest code often loses to the most confident-sounding answer. Even a good synthesis can regress below the best individual solution, and nothing explains why the final verdict was reached or what risks remain.

Solution

PolyGnosis eliminates single-model hallucination risk by routing complex problems through a formal adversarial consensus protocol built on the PolyBrain orchestration pattern. Three or more frontier models from genuinely different model families solve independently from dynamically assigned expert personas (Security Auditor, DB Consultant, Backend Architect), then a hostile critic model cross-reviews every solution for bugs, hallucinations, edge cases, and security flaws. Formal ranking algorithms - Reciprocal Rank Fusion (RRF) and Borda Count - convert LLM per-axis scores (0-10 across 5 dimensions) into a deterministic winner, so no single opinionated model dominates the outcome. A Constitutional Quality Gate rejects the synthesis if it regressed versus the best individual solution, a Meta-Reviewer explains the verdict, and severe bugs persist to a Reflexion corrections buffer injected into future solver prompts.