Skip to main content
Glama

Jury

Python 3.10+ License: MIT CLI: jury MCP: jury-mcp Architecture: Daemon--less

The Multi-Model Deliberation Engine & Consensus Substrate for AI Coding Agents and Developers.

Jury offloads high-stakes architectural planning, diff reviews, and adversarial verification from local coding agents to an orchestrated council of frontier models—operating with zero resident daemon footprint, zero host RCE vulnerabilities, and zero IDE timeouts.


Architecture Overview

                      ┌──────────────────────────────────────┐
                      │    Host Coding Agent / User IDE      │
                      │  (Cursor, Claude Desktop, Antigravity)│
                      └──────────────────┬───────────────────┘
                                         │
                   ┌─────────────────────┴─────────────────────┐
                   │                                           │
          [ Standalone CLI ]                           [ MCP Stdio Server ]
         `jury review | plan`                              `jury-mcp`
                   │                                           │
                   └─────────────────────┬─────────────────────┘
                                         ▼
                     ┌──────────────────────────────────────┐
                     │          Jury Mesh Core Engine       │
                     ├──────────────────────────────────────┤
                     │ • Secret Redaction (Entropy H ≥ 4.5) │
                     │ • POSIX Diff Clamper                 │
                     │ • 5-Vector Composite Cache Key       │
                     │ • Singleflight Request Coalescing    │
                     └───────────────────┬──────────────────┘
                                         ▼
   ┌────────────────────────────────────────────────────────────────────────┐
   │                  3-Stage Dialectical Falsification                     │
   │                                                                        │
   │  [Stage 1: Blind Ballots]                                              │
   │   Alpha (Architect)         Beta (Adversary)        Gamma (Minimalist) │
   │   e.g. DeepSeek / Claude    e.g. Llama 3.3 / Qwen   e.g. Qwen / GLM    │
   │            │                         │                       │         │
   │            └─────────────────────────┼───────────────────────┘         │
   │                                      ▼                                 │
   │  [Stage 2: Cross-Examination]                                          │
   │   • Unsubstantiated claims discarded                                   │
   │   • Balanced Position Calibration (BPC) 2-pass permutation             │
   │                                      │                                 │
   │                                      ▼                                 │
   │  [Stage 3: Decoupled Arbitration]                                      │
   │   Arbiter: Decoupled Judge (e.g. DeepSeek R1 / o3-mini / Qwen)         │
   │   • Reconciles conflicts & produces definitive verdict                 │
   │   • Synthesizes machine-actionable POSIX patch (`git apply`)           │
   │   • Generates OASIS SARIF v2.1.0 diagnostics                           │
   └──────────────────────────────────────┬─────────────────────────────────┘
                                          ▼
                     ┌──────────────────────────────────────┐
                     │   Daemon-less State Engine (WAL)     │
                     │        `~/.jury/state.db`            │
                     │ • OS FileLock + BEGIN IMMEDIATE      │
                     │ • Continuous Two-Phase Rate Limiting │
                     │ • Persistent Audit Ledger            │
                     └──────────────────────────────────────┘

Related MCP server: RepoPulse MCP Server

Key Capabilities

  • Zero-Daemon Architecture: Operates purely in-process using an embedded SQLite WAL database (~/.jury/state.db) guarded by OS file locks. No fragile Docker daemons, background services, or memory leaks.

  • Differentiated 4-Role Council:

    • Seat 1 (alpha): Systems Architect & Invariant Verifier (e.g. DeepSeek V3, Claude 3.7 Sonnet, GLM-5.3)

    • Seat 2 (beta): Adversary, Security & Race Condition Auditor (e.g. Llama 3.3 70B, Qwen 3.8, GPT-4o)

    • Seat 3 (gamma): Simplicity Minimalist & Anti-Bloat / YAGNI Advocate (e.g. Qwen 2.5 Coder, GLM-5.3)

    • Judge (arbiter): Decoupled Consensus Synthesizer & Patch Generator (e.g. DeepSeek R1, o3-mini)

  • Zero Host RCE Security: Raw shell execution is prohibited. Verification tests execute strictly via TypedVerificationContract with an immutable runner whitelist (pytest, mypy, cargo_test, npm_test, go_test) running under shell=False.

  • Pre-Flight Secret Redaction: All diffs and prompts are sanitized using high-confidence regex combined with Shannon entropy detection ($H \ge 4.5$), replacing credentials with deterministic synthetic tokens (<REDACTED_API_KEY:CRC32_HEX>).

  • 5-Vector Composite Cache Key: SHA-256 fingerprint over task_intent || git_head || unstaged_diff || staged_diff || untracked_hash || config_hash || prompt_version. Modifying any file instantly triggers cache invalidation.

  • Machine-Actionable Outputs:

    • Valid POSIX unified diffs (diff --git) ready for git apply.

    • Industry-standard OASIS SARIF v2.1.0 diagnostics for IDE problem panes and CI gates.


Installation

# Clone repository
git clone https://github.com/anixes/jury.git
cd jury

# Install in editable mode
pip install -e .

# Or with dev dependencies (pytest, etc.)
pip install -e ".[dev]"

Verify the installation:

jury --version
# Outputs: jury, version 3.0.0

Quickstart

1. Initialize Configuration & Agent Rules

Generate project-local configuration and IDE instruction files (AGENTS.md, .cursor/rules/jury.mdc, CLAUDE.md):

jury init

2. Configure Credentials & Providers

Jury is 100% provider-agnostic. You can use any OpenAI-compatible provider (OpenRouter, Groq, DeepSeek, Cerebras, OpenAI, Anthropic, Constellation Gate, or local Ollama / vLLM).

Set your API keys via environment variables:

# OpenRouter (Unified multi-model access)
export OPENROUTER_API_KEY="sk-or-v1-..."

# Groq (Ultra-fast LPU inference)
export GROQ_API_KEY="gsk_..."

# DeepSeek / OpenAI / Cerebras
export DEEPSEEK_API_KEY="sk-..."
export OPENAI_API_KEY="sk-..."

# Constellation Gate (Free frontier tier)
export TRIAD_API_KEY="cg-..."

Or configure your multi-provider council in .jury/config.yaml:

version: "3.0.0"

# 1. Register only the providers you use
providers:
  openrouter:
    base_url: "https://openrouter.ai/api/v1"
    api_key: "${OPENROUTER_API_KEY}"
  groq:
    base_url: "https://api.groq.com/openai/v1"
    api_key: "${GROQ_API_KEY}"
  deepseek:
    base_url: "https://api.deepseek.com/v1"
    api_key: "${DEEPSEEK_API_KEY}"
  constellation:
    base_url: "https://gateway.constellationgate.ai/v1"
    api_key: "${TRIAD_API_KEY}"
  ollama:
    base_url: "http://localhost:11434/v1"
    api_key: "ollama"

# 2. Assign any model from any provider to each seat
models:
  alpha:
    model_id: "deepseek/deepseek-chat"
    provider: "openrouter"
    role: "architect"
    max_diff_tokens: 16000
    description: "Systems Architect & Invariant Verifier"

  beta:
    model_id: "llama-3.3-70b-versatile"
    provider: "groq"
    role: "adversary"
    max_diff_tokens: 5500
    description: "Adversary & Security Auditor"

  gamma:
    model_id: "qwen/qwen-2.5-coder-32b-instruct"
    provider: "openrouter"
    role: "minimalist"
    max_diff_tokens: 16000
    description: "Simplicity Minimalist & Anti-Bloat"

  arbiter:
    model_id: "deepseek/deepseek-reasoner"
    provider: "deepseek"
    role: "arbiter"
    max_diff_tokens: 20000
    description: "Decoupled Judicial Arbiter"

strict_arbiter_decoupling: false
quorum_min: 2

3. Verify Health

Run pre-flight connectivity, token bucket, and database lock diagnostics:

jury test

Standalone CLI Usage

Code Review (jury review)

Audit working tree modifications before committing:

# Review staged changes
jury review --staged

# Review unstaged changes
jury review

# Strict CI Gate: fail build on non-approval or security findings
jury review --staged --strict

# Output machine-readable JSON or SARIF report
jury review --staged --json
jury review --staged --sarif report.sarif

Architectural Planning (jury plan)

Submit an architectural specification or feature request for rigorous multi-model critique:

jury plan --spec docs/rfc-caching.md
jury plan --spec "Design a distributed write-ahead log with raft consensus"

Freeform Consultation (jury ask)

Ask specific architectural or security questions:

jury ask "What are the edge-case failure modes of two-tier file locking on Windows NTFS?"

Audit Logs & Telemetry (jury logs)

Inspect deliberation history and metrics stored in SQLite WAL:

# View last 10 deliberation tickets
jury logs --limit 10

# View detailed JSON audit trail
jury logs --json

Model Context Protocol (MCP) Integration

Jury Mesh exposes native tools over stdio JSON-RPC for Claude Desktop, Cursor, Antigravity, Cline, and Roo Code.

Server Tools

  • jury_review: Reviews working tree changes or raw git diffs.

  • jury_plan: Conducts multi-model architectural falsification on a specification.

  • jury_ask: Deliberates on complex technical queries across juror models.

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "jury": {
      "command": "jury-mcp",
      "args": [],
      "env": {
        "TRIAD_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor / Cline Configuration

In .cursor/mcp.json:

{
  "mcpServers": {
    "jury": {
      "command": "jury-mcp",
      "args": []
    }
  }
}

Note on Stdio Hygiene: jury-mcp strictly isolates stdout exclusively for JSON-RPC framing. All internal logging, probe messages, and warnings are redirected to stderr.


Deterministic CLI Exit Codes

Jury Mesh provides deterministic, script-friendly exit codes for seamless CI/CD integration:

Exit Code

Classification

Description

0

APPROVED

Consensus reached, review approved, or command succeeded cleanly.

1

REJECTED

Changes requested, architectural objections raised, or test failed.

2

QUORUM_COLLAPSE

Upstream provider outage or failure to meet minimum quorum ($Q < Q_{min}$).

3

USAGE_ERROR

Invalid CLI arguments, missing configuration, or unreadable files.

4

SECURITY_VIOLATION

Secret leak detected or contract validation failure.


Development & Testing

Run the comprehensive test suite:

# Run unit tests
pytest tests/unit/ -v

# Run E2E suites
pytest tests/e2e/ -v

# Run full test suite with coverage
pytest --cov=src/jury tests/

License

MIT License. See LICENSE for details.

Available Tools

3 tools
jury_askB

Consult the multi-model architecture council for targeted design advice. Returns recommended architectural pattern, confidence score, tradeoff matrix, and concrete implementation examples.

NameRequiredDescriptionDefault
focusNoFocus domain for architecture council evaluation.general
queryNoAlternative alias for 'question'.
quickNoQuery top 2 models for accelerated low-latency consultation.
contextNoOptional context string or relative file path to context documentation/code.
questionYesThe architectural question or design query to consult on.

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden, and it does disclose the response shape (pattern, confidence, tradeoff matrix, examples), which is genuinely useful. It omits other behavioral facts of consequence: that 'context' accepts a relative file path the tool presumably reads from disk, and any indication of latency or cost (the schema hints at a 'quick' low-latency mode the description never mentions).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the purpose and followed by the return contract; every clause earns its place and nothing is padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter consult tool with no annotations and no output schema, the description covers purpose and return values well enough to call it correctly. The remaining gaps - sibling differentiation and the file-reading behavior of the context parameter - are real but secondary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters are already documented in the schema, making 3 the baseline. The description adds no parameter meaning at all - it never mentions focus, quick, context, or the question/query alias relationship, so it neither compensates for nor improves on the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb and resource: 'Consult the multi-model architecture council for targeted design advice', plus an explicit statement of what comes back (pattern, confidence, tradeoff matrix, examples). It does not differentiate itself from siblings jury_plan and jury_review, so an agent cannot tell from this text alone which of the three to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'targeted design advice' implies a design-time consult, but there is no explicit when-to-use, when-not-to-use, or named alternative among jury_plan and jury_review. The agent must infer the boundary from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

jury_planB

Deliberate an architectural implementation plan with the multi-model jury. Synthesizes consensus readiness score, critical risks, required modifications, and an actionable file execution plan.

NameRequiredDescriptionDefault
taskYesThe engineering task, specification, or implementation plan to deliberate.
optionsNoOptional execution flags: no_cache (bool), strict (bool), timeout_seconds (float).
async_modeNoIf true, immediately registers a singleflight task ticket (<10ms) and returns the ticket identifier for asynchronous follow-up.
context_filesNoOptional list of context file paths or globs to attach to the deliberation.

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full disclosure burden. It says what the deliberation yields, which is useful, but it never warns that a multi-model jury call is likely slow or expensive, that results may be cached, or what happens on timeout. The async ticket workflow is only described in the schema, not in the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is two tight sentences with the action front-loaded and the outputs enumerated immediately afterwards. No filler or repetition appears, though the output list could be trimmed slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Not penalized for the missing output schema, specifically because the description enumerates the return artifacts, which is what an output schema would have provided. No output schema exists and no annotations exist, and the description substitutes effectively by naming the four deliverables. It could go further by explaining the async follow-up path, but it is adequate for a four-parameter deliberation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, including the nested options object and its three flags, so the schema already defines every parameter. The description adds nothing about how 'task' should be phrased or how context_files or async_mode change the outcome, so the baseline of 3 holds.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Deliberate') and a specific resource ('an architectural implementation plan') and then lists the four artifacts produced: readiness score, risks, modifications, and a file execution plan. That is far more concrete than a tautology. It does not, however, separate this tool from its siblings jury_review and jury_ask, so an agent must guess which one to call when it has a plan.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage ('an architectural implementation plan') but never states when this tool should be used instead of jury_review or jury_ask, nor does it give prerequisites, exclusions, or cost or latency warnings. With two close siblings available, the missing comparison logic is a real gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

jury_reviewB

Review code changes or git diffs with the multi-model jury panel. Performs blind ballots, adversarial cross-examination, and decoupled arbitration, emitting findings, POSIX unified diff patches, and OASIS SARIF v2.1.0 diagnostics.

NameRequiredDescriptionDefault
diffNoThe unified git diff to review. If omitted, automatically reads from git.
focusNoBias deliberation rubric toward a specific domain.general
branchNoTarget branch to diff against (e.g. main, master).
stagedNoReview staged git changes (git diff --cached). Default: False.
strictNoEnforce strict security and finding checks (fails on unredacted secrets).

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description bears the full disclosure burden. It does well on outputs — blind ballots, adversarial cross-examination, decoupled arbitration, findings, POSIX diff patches, SARIF v2.1.0 diagnostics — which tells the agent this is a heavy multi-model deliberation that returns patches and diagnostics, not just prose. It omits cost/latency expectations for a multi-model panel, whether anything is written to disk or the repo, and what failure modes look like.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core action and followed by the mechanism and outputs. Dense jargon ('decoupled arbitration', 'OASIS SARIF v2.1.0') but each clause carries information; nothing is padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With five optional parameters, no output schema, and no annotations, the description covers the important bases: what it reviews, the deliberation model, and the shape of the return (findings, patches, SARIF). What is missing is operational context — cost, runtime, and whether it mutates anything — which matters for a multi-model panel.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter (diff, focus, branch, staged, strict) is already documented in the schema, including the enum values and defaults. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Review code changes or git diffs with the multi-model jury panel.' That is unambiguous and implicitly separates it from jury_plan (planning) and jury_ask (questioning), though it never names those siblings or states the distinction explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance. The closest thing is 'Review code changes or git diffs', which implies the input domain but says nothing about choosing this over jury_ask for a question or jury_plan for planning, nor about prerequisites such as needing a git repo when 'diff' is omitted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv3.0.0
    • First observedjury_ask
    • First observedjury_plan
    • First observedjury_review

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation4/5

The three tools target distinct modes: implementation planning, code/diff review, and targeted design advice. jury_plan and jury_ask both involve architectural consultation, so there is some potential overlap, but their outputs and use cases are differentiated well enough.

Naming Consistency5/5

All tools use the same jury_ prefix followed by a clear action verb: jury_plan, jury_review, jury_ask. The naming is predictable and consistent throughout.

Tool Count5/5

Three tools are well-scoped for a multi-model jury server: one for planning, one for review, and one for targeted advice. Each tool has a clear purpose and earns its place.

Completeness4/5

The server covers the core consultation workflows: planning, code review, and architectural advice. Minor gaps exist around session management, follow-up deliberation, or jury configuration, but agents can work around them.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Exposes code-review and issue-triage tools to AI assistants over stdio, letting them evaluate unified pull-request diffs for maintainer remarks, slice diffs into categorized AST hunks, and classify GitHub issues by priority while synthesizing minimal reproduction stubs.
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to open, edit, check, run, emit, and save source programs through structured, revision-checked tools over stdio, confining paths to the launch root and returning diagnostics with fixes for rejected edits.
    5 npm
    2
    Apache 2.0