Llm council

From DNYoussef/context-cascade · View interactive version

Llm council is an AI agent skill from the GitHub repository DNYoussef/context-cascade. Multi-model consensus using Karpathy LLM Council pattern for critical decisions

How to use this skill

Skill file

LLM Council Skill


LIBRARY-FIRST PROTOCOL (MANDATORY)

Before writing ANY code, you MUST check:

Step 1: Library Catalog

Step 2: Patterns Guide

Step 3: Existing Projects

Decision Matrix

| Match | Action |

|-------|--------|

| Library >90% | REUSE directly |

| Library 70-90% | ADAPT minimally |

| Pattern exists | FOLLOW pattern |

| In project | EXTRACT |

| No match | BUILD (add to library after) |


Purpose

Run 3-stage multi-model consensus for critical decisions where:

Architecture (Karpathy Pattern)

STAGE 1: COLLECT
  +---> Claude ---> Response A
  |
Query --+---> Gemini ---> Response B
  |
  +---> Codex ----> Response C

STAGE 2: RANK
  Each model reviews others (anonymized)
  Produces rankings with rationale

STAGE 3: SYNTHESIZE
  Chairman aggregates rankings
  Produces final answer with consensus score

When to Use

Perfect For:

Don't Use When:

Usage

Basic Council

/llm-council "Should we use microservices or monolith for this system?"

With Threshold

/llm-council "Which auth approach is best?" --threshold 0.75

With Chairman Override

/llm-council "Architecture decision" --chairman gemini

Command Pattern

bash scripts/multi-model/llm-council.sh "<query>" "<threshold>" "<chairman>"

Configuration

| Parameter | Default | Description |

|-----------|---------|-------------|

| threshold | 0.67 | Minimum consensus score |

| chairman | claude | Model that synthesizes final answer |

| models | [claude, gemini, codex] | Participating models |

Consensus Scoring

Memory Integration

Results stored to Memory-MCP:

Output Format

{
  "query": "Original question",
  "final_answer": {
    "synthesis": "Combined answer...",
    "chairman": "claude"
  },
  "consensus_score": 0.85,
  "responses": {
    "claude": "...",
    "gemini": "...",
    "codex": "..."
  },
  "rankings": [
    {"model": "A", "rank": 1, "rationale": "..."}
  ]
}

Failure Modes

Deadlock (No Consensus)

Model Unavailable

Chairman Failure

Integration Examples

Architecture Decision

const decision = await runCouncil(
  "Microservices vs Monolith for our scale?",
  { threshold: 0.75 }
);

if (decision.consensus_score >= 0.75) {
  proceed(decision.final_answer);
} else {
  escalateToHuman(decision);
}

Security Assessment

const assessment = await runCouncil(
  "Is this authentication approach secure?",
  { threshold: 0.80 }
);
// Higher threshold for security decisions

Sources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.